.profile {
    --profile-card-padding: 32px; /* used for negative margins for horizontal rules */
    --profile-tombstone-gap: 12px; /* used to calculate card with on desktop/tablet */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    align-self: stretch;
    background: #f9f9f9;
}

.profile-header-gap {
    height: 6px;
    background: var(--brand-primary);
}

/* .profile-header */

.profile-header {
    color: white;
    width: 100%;
    background: url(../images/header-background.png) 50% 50% / cover no-repeat, linear-gradient(90deg, #08349B 0%, #031235 100%);
}

.profile-header__wrap {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    padding: 40px 32px;
    justify-content: space-between;
    align-items: flex-end;
    align-self: stretch;
}

.profile-header__left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.profile-header__thumb {
    width: 112px;
    height: 112px;
    padding: 4px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.profile-header__thumb img {
    display: block;
    border-radius: 8px; /* if logo background is non-white, must match the border radius of container */
}

.profile-header__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.profile-header__text-top {
    color: #FFF;
    font-size: 32px;
    font-variation-settings: "wght" 584;
    line-height: 40px; /* 125% */
    letter-spacing: -0.56px;
}

.profile-header__text-bottom {
    /* noop */
}

.profile-header__text-bottom-header {
    color: #FFF;
    font-size: 20px;
    font-variation-settings: "wght" 584;
    line-height: 26px; /* 130% */
}

.profile-header__text-bottom-subtext {
    display: flex;
    align-items: center;
    gap: 4px;
    /* font */
    color: #FFF;
    font-size: 16px;
    line-height: 22px; /* 137.5% */
}

.profile-header__tag {
    display: flex;
    padding: 0 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 100px;
    background: var(--brand-primary);
    /* font */
    color: #FFF;
    font-size: 12px;
    font-variation-settings: "wght" 584;
    line-height: 16px; /* 133.333% */
    letter-spacing: 0.32px;
}

/* .profile-meta-banner */

.profile-meta-banner {
    display: none; /* becomes flex on smaller resolutions */
    align-items: flex-start;
    align-self: stretch;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #FFF;
}

.profile-meta-banner__side {
    display: flex;
    padding: 12px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex: 1 0 0;
    align-self: stretch;
    background: rgba(50, 108, 244, 0.08);
    position: relative;
}

.profile-meta-banner__side:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    opacity: 0.15;
    background: #31353F;
}

.profile-meta-banner__top {
    color: #08349B;
    text-align: center;
    font-size: 12px;
    line-height: 16px; /* 133.333% */
    letter-spacing: 0.32px;
    opacity: 0.8;
}

.profile-meta-banner__bottom {
    color: var(--brand-primary);
    text-align: center;
    font-size: 14px;
    font-variation-settings: "wght" 584;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
}

/* .profile-body */

.profile-body {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    align-self: stretch;
    padding: 0 20px 48px;
}

.profile-body__side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    flex: 0 1 auto;
    min-width: 0;
}

.profile-body__side--left {
    width: 444px;
}

@media screen and (min-width: 1128px) {
    .profile-body__side--left {
        width: 764px;
    }
}

@media screen and (min-width: 768px) and (max-width: 1127px) {
    .profile-body__side--left {
        /* min_width + (max_width - min_width) * (100vw - min_breakpoint) / (max_breakpoint - min_breakpoint) */
        width: calc(444px + 320 * (100vw - 768px) / (1127 - 768));
    }
}

.profile-body__side--right {
    width: 240px;
}

@media screen and (min-width: 1128px) {
    .profile-body__side--right {
        width: 300px;
    }
}

@media screen and (min-width: 768px) and (max-width: 1127px) {
    .profile-body__side--right {
        /* min_width + (max_width - min_width) * (100vw - min_breakpoint) / (max_breakpoint - min_breakpoint) */
        width: calc(240px + 60 * (100vw - 768px) / (1127 - 768));
    }
}

/* .profile-card */

.profile-card {
    display: flex;
    padding: var(--profile-card-padding);
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    align-self: stretch;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #FFF;
}

.profile-card__header {
    color: #08349B;
    font-size: 14px;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
    text-transform: uppercase;
}

.profile-card__separator {
    margin: 0 calc(-1 * var(--profile-card-padding));
    height: 0.5px;
    background: rgba(0, 0, 0, 0.20);
    align-self: stretch;
}

.profile-card__separator:last-child {
    display: none;
}

.profile-card__body {
    color: #31353F;
    font-size: 16px;
    line-height: 22px; /* 137.5% */
    max-width: 100%;
    overflow: hidden; /* in case of long description text like links */
}

.profile-card__noop {
    /* noop - just a general child with no special style */
}

/* .profile-expander */

.profile-expander {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-expander button {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    opacity: 0.5;
}

.profile-expander button[data-expanded="true"] svg {
    transform: rotate(180deg);
}

.profile-expander button:hover span {
    text-decoration: underline;
    text-underline-position: from-font;
}

.profile-expander button span {
    color: #31353F;
    font-size: 14px;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
}

.profile-expander button svg {
    width: 16px;
    height: 16px;
    transition: none;
}

/* .profile-meta */

.profile-meta {
    display: flex;
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    align-self: stretch;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #FFF;
}

.profile-meta__stat {
    display: flex;
    padding: 12px 0;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    align-self: stretch;
    border-radius: 8px;
    background: rgba(50, 108, 244, 0.08);
}

.profile-meta__stat-top {
    color: #08349B;
    font-size: 14px;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
    opacity: 0.8;
}

.profile-meta__stat-bottom {
    color: var(--brand-primary);
    text-align: center;
    font-size: 20px;
    font-variation-settings: "wght" 584;
    line-height: 26px; /* 130% */
}

/* .profile-tombstones */

.profile-tombstones {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    align-self: stretch;
    max-height: 490px;
    overflow: scroll;
}

.profile-tombstones__header {
    /* noop */
}

.profile-tombstones__header-tag {
    display: flex;
    padding: 4px 12px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 100px;
    border: 1px solid var(--brand-primary);
    background: #F9F9F9;
    text-transform: uppercase;
    margin-left: -2px;
    /* font */
    color: var(--brand-primary);
    font-size: 14px;
    font-variation-settings: "wght" 584;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
}

.profile-tombstones__body {
    display: flex;
    align-items: flex-start;
    gap: var(--profile-tombstone-gap);
    align-self: stretch;
    flex-wrap: wrap;
}

/* .profile-tombstone */

.profile-tombstone {
    width: calc(50% - var(--profile-tombstone-gap) / 2);
    display: flex;
    padding: 20px;
    flex-direction: column;
    align-self: stretch;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(49, 53, 63, 0.03);
    position: relative;
    overflow: hidden; /* cut off star graphic */
}

.profile-tombstone__star {
    position: absolute;
    right: -1px;
    bottom: 0;
    width: 49px;
    height: 46px;
    display: block;
    pointer-events: none;
}

.profile-tombstone__top {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    align-self: stretch;
}

.profile-tombstone__title {
    color: #31353F;
    font-size: 20px;
    font-variation-settings: "wght" 584;
    line-height: 26px; /* 130% */
}

.profile-tombstone__text {
    color: #31353F;
    font-size: 14px;
    font-variation-settings: "wght" 400;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
    opacity: 0.8;
}

.profile-tombstone__bottom {
    width: 100%;
}

.profile-tombstone__type {
    display: flex;
    padding: 4px 8px;
    align-items: center;
    gap: 4px;
    border-radius: 4px;
    background: rgba(149, 179, 248, 0.30);
}

.profile-tombstone__type span {
    color: #08349B;
    text-align: right;
    font-size: 14px;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
    text-transform: uppercase;
}

.profile-tombstone__type svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.profile-tombstone__actor {
    color: #31353F;
    font-size: 16px;
    font-variation-settings: "wght" 584;
    line-height: 22px; /* 137.5% */
}

.profile-tombstone__date {
    color: #31353F;
    font-size: 14px;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
}

.profile-tombstone__bottom-row {
    display: flex;
    align-items: flex-start;
}

.profile-tombstone__bottom-row:nth-child(1) {
    margin-bottom: 8px;
}

.profile-tombstone__bottom-row:nth-child(2) {
    margin-bottom: 12px;
}

/* .profile-sectors */

.profile-sectors {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.profile-sectors__header {
    color: #08349B;
    font-size: 14px;
    font-variation-settings: "wght" 584;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
    text-transform: uppercase;
}

.profile-sectors__sectors {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-sectors__sector {
    display: flex;
    padding: 7px 12px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    background: #EFF3FE;
    /* font */
    color: var(--brand-primary);
    font-size: 14px;
    font-variation-settings: "wght" 584;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
}

/* .profile-join */

.profile-join {
    display: flex;
    padding: 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    align-self: stretch;
    border-radius: 12px;
    background: linear-gradient(180deg, #08349B 0%, #031235 100%);
}

.profile-join__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    align-self: stretch;
}

.profile-join__header-top {
    color: #FFF;
    font-size: 16px;
    font-variation-settings: "wght" 584;
    line-height: 22px; /* 137.5% */
    text-transform: uppercase;
}

.profile-join__header-bottom {
    color: #FFF;
    font-size: 16px;
    line-height: 22px; /* 137.5% */
    opacity: 0.6;
}

.profile-join__body {
    display: flex;
    align-items: stretch;
    gap: 8px;
    align-self: stretch;
}

.profile-join__option {
    display: flex;
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex: 1 0 0;
    border-radius: 12px;
    border: 1px solid var(--brand-primary);
    background: rgba(50, 108, 244, 0.36);
}

.profile-join__option--buyside {
    border: 1px solid var(--orange-500);
    background: rgba(198, 93, 33, 0.52);
}

.profile-join__option--buyside .profile-join__option-button {
    background: var(--orange-500);
}

.profile-join__option--buyside .profile-join__option-button:hover {
    background: var(--orange-600);
}

.profile-join__option--sellside {
    border: 1px solid var(--green-600);
    background: rgba(43, 121, 86, 0.52);
}

.profile-join__option--sellside .profile-join__option-button {
    background: var(--green-600);
}

.profile-join__option--sellside .profile-join__option-button:hover {
    background: var(--green-700);
}

.profile-join__option-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    align-self: stretch;
}

.profile-join__option-title {
    color: #FFF;
    font-size: 20px;
    font-variation-settings: "wght" 584;
    line-height: 26px; /* 130% */
}

.profile-join__option-description {
    color: #FFF;
    font-size: 14px;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
    opacity: 0.6;
}

.profile-join__option-bottom {
    width: 100%;
}

.profile-join__option-button {
    display: flex;
    height: 48px;
    padding: 10px 0;
    justify-content: center;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    border-radius: 4px;
    background: var(--brand-primary);
    width: 100%;
    border: 0;
    font: inherit;
    font-variation-settings: "slnt" 0;
    box-shadow: none;
}

.profile-join__option-button:hover {
    background: var(--blue-600);
}

.profile-join__option-button span {
    color: #FFF;
    text-align: center;
    font-size: 16px;
    font-variation-settings: "wght" 584;
    line-height: 22px; /* 137.5% */
}

.profile-join__option-button svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.profile-join__footer {
    display: flex;
    padding: 8px 12px;
    align-items: flex-start;
    gap: 8px;
    align-self: stretch;
    border-radius: 8px;
    background: rgba(50, 108, 244, 0.20);
}

.profile-join__footer img {
    width: 16px;
    height: 16px;
    display: block;
}

.profile-join__footer-text {
    color: #F9F9F9;
    font-size: 14px;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
    opacity: 0.6;
}

/* .profile-team */

.profile-team {
    display: flex;
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    align-self: stretch;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #FFF;
}

.profile-body__side--left .profile-team {
    display: none;
}

.profile-team__header {
    color: #08349B;
    font-size: 14px;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
    text-transform: uppercase;
}

.profile-team__header strong {
    font-variation-settings: "wght" 584;
}

.profile-team__members {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-team__member {
    display: flex;
    align-items: center;
    gap: 16px;
    align-self: stretch;
}

.profile-team__member-avatar {
    border-radius: 50%;
    overflow: hidden;
    background: var(--grey-100);
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
}

.profile-team__member-avatar img {
    display: block;
    width: 100%;
    height: 100%;
}

.profile-team__member-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* .profile-floating-cta */

.profile-floating-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 0.5px solid rgba(49, 53, 63, 0.20);
    background: #FFF;
    transition: transform 0.2s ease;
}

.profile-floating-cta:not([data-ready="true"]) {
    transform: translateY(100%);
}

@media screen and (max-width: 600px) {
    .profile-floating-cta:not([data-ready="true"]) {
        transform: translateY(0);
    }
}

.profile-floating-cta[data-hide="true"] {
    transform: translateY(100%);
}

.profile-floating-cta__wrap {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    padding: 16px 20px;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
}

.profile-floating-cta__button {
    display: flex;
    padding: 11px 0;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex: 1 0 0;
    border-radius: 4px;
    box-shadow: none;
    background: var(--brand-primary);
}

.profile-floating-cta__button:hover {
    background: var(--blue-600);
}

.profile-floating-cta__button span {
    color: #FFF;
    text-align: center;
    font-size: 14px;
    font-variation-settings: "wght" 584;
    line-height: 18px; /* 128.571% */
    letter-spacing: 0.16px;
}

.profile-floating-cta__button svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.profile-floating-cta__button--buyside {
    background: var(--orange-500);
}

.profile-floating-cta__button--buyside:hover {
    background: var(--orange-600);
}

.profile-floating-cta__button--sellside {
    background: var(--green-600);
}

.profile-floating-cta__button--sellside:hover {
    background: var(--green-700);
}

/* .profile-floating-cta ~ #hubspot-messages-iframe-container */

.profile-floating-cta[data-ready="true"] ~ #hubspot-messages-iframe-container {
    transition: transform 0.2s ease;
    transform: none;
}

.profile-floating-cta[data-ready="true"]:not([data-hide="true"]) ~ #hubspot-messages-iframe-container {
    transform: translateY(-79px);
}

/* .profile-wyswiyg */

.profile-wysiwyg p,
.profile-wysiwyg ul,
.profile-wysiwyg ol {
    margin-bottom: 0;
}

/* media query: tablet */

@media screen and (max-width: 1279px) {
    .profile {
        --profile-card-padding: 20px;
        gap: 32px;
    }

    .profile-body {
        padding: 0 32px 24px;
        gap: 18px;
    }

    .profile-body__side {
        gap: 12px;
    }

    .profile-header__wrap {
        padding: 52px 32px;
    }

    .profile-header__left {
        gap: 24px;
    }

    .profile-header__thumb {
        width: 120px;
        height: 120px;
        border-radius: 10px;
    }

    .profile-header__text {
        gap: 12px;
    }

    .profile-header__text-top {
        font-size: 28px;
    }

    .profile-header__text-bottom {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .profile-card--tombstones {
        padding-top: 32px; /* this seems like a design bug */
        padding-bottom: 32px; /* this seems like a design bug */
    }

    .profile-card__body {
        font-size: 14px;
        line-height: 18px; /* 128.571% */
        letter-spacing: 0.16px;
    }

    .profile-expander {
        gap: 12px;
    }

    .profile-meta {
        padding: 14px;
    }

    .profile-meta__stat-bottom {
        font-size: 16px;
        line-height: 22px;
    }

    .profile-team {
        padding: 16px;
    }

    .profile-team__member-avatar {
        width: 44px;
        height: 44px;
    }

    .profile-tombstone__title {
        font-size: 16px;
        line-height: 22px; /* 137.5% */
    }

    .profile-tombstone__type span {
        font-size: 12px;
        line-height: 16px; /* 133.333% */
    }

    .profile-tombstone__actor {
        font-size: 14px;
        line-height: 18px; /* 128.571% */
    }

    .profile-sectors__sectors {
        margin-right: -2px;
    }

    .profile-sectors__sector {
        padding: 5px 10px;
    }

    .profile-join {
        padding: 20px;
    }

    .profile-join__header-bottom {
        font-size: 14px;
        line-height: 18px; /* 128.571% */
    }

    .profile-join__body {
        flex-direction: column;
    }
}

/* media query: mobile (large) */

@media screen and (max-width: 719px) {
    .profile {
        gap: 0;
    }

    .profile-body {
        padding-top: 20px;
    }
}

/* media query: mobile (small) */

@media screen and (max-width: 600px) {
    .profile {
        --profile-tombstone-gap: 8px;
    }

    .profile-header__wrap {
        padding: 32px 20px;
    }

    .profile-header__left {
        gap: 16px;
    }

    .profile-header__thumb {
        width: 80px;
        height: 80px;
        border-radius: 12px;
    }

    .profile-header__tag {
        font-size: 10px;
        padding: 0 8px;
    }

    .profile-header__text {
        gap: 16px;
    }

    .profile-header__text-top {
        font-size: 21px;
        line-height: 26px; /* 130% */
    }

    .profile-header__text-bottom-header {
        font-size: 13px;
        line-height: 16px; /* 133.333% */
    }

    .profile-header__text-bottom-subtext {
        font-size: 13px;
        line-height: 16px; /* 133.333% */
        gap: 8px;
    }

    .profile-meta-banner {
        display: flex;
    }

    .profile-body {
        padding: 20px;
    }

    .profile-body__side--left {
        width: auto;
    }

    .profile-body__side--left .profile-team {
        display: flex;
        padding: 20px;
        gap: 12px;
    }

    .profile-body__side--right {
        display: none;
    }

    .profile-card {
        gap: 20px;
    }

    .profile-card__header {
        font-size: 12px;
        line-height: 16px;
    }

    .profile-card--tombstones {
        padding: 20px;
    }

    .profile-card--tombstones .profile-card__header {
        font-size: 14px; /* this seems like a design bug */
        line-height: 18px; /* this seems like a design bug */
    }

    .profile-expander {
        gap: 16px;
    }

    .profile-team__header {
        font-size: 12px;
        line-height: 16px;
    }

    .profile-team__member-avatar {
        width: 54px;
        height: 54px;
    }

    .profile-tombstone {
        width: auto;
        flex: 1 1 auto;
        padding: 16px;
        gap: 24px;
    }

    .profile-tombstone__text {
        font-size: 12px;
        line-height: 16px;
    }

    .profile-join__option-title {
        font-size: 16px;
        line-height: 22px;
    }
}
