/* =========================================================
   Person detail
   ========================================================= */

.person-hero
{
    --person-portrait-width: clamp(210px, 18vw, 230px);
    --person-portrait-height: clamp(315px, 27vw, 345px);
    position: relative;
    display: grid;
    grid-template-columns: var(--person-portrait-width) minmax(0, 1fr) minmax(230px, 310px);
    grid-template-areas:
        "portrait identity career"
        "portrait biography career";
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1.25rem 2rem;
    height: calc(var(--person-portrait-height) + 4.5rem);
    padding: 1.5rem 0 3rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.person-hero-portrait
{
    grid-area: portrait;
    align-self: start;
    width: var(--person-portrait-width);
    height: var(--person-portrait-height);
    border-radius: var(--bs-border-radius);
}

.person-hero-portrait-image
{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-hero-portrait .media-image-lightbox-trigger
{
    height: 100%;
}

.person-hero-identity
{
    grid-area: identity;
    align-self: start;
    min-width: 0;
}

.person-hero-eyebrow
{
    display: block;
    margin-bottom: .45rem;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}

/*
.person-hero-name
{
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: .98;
}
*/

.person-hero-facts
{
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1rem;
    font-size: .9rem;
}

.person-hero-fact
{
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    min-width: 0;
}

a.person-hero-fact
{
    color: inherit;
}

.person-hero-biography
{
    grid-area: biography;
    align-self: start;
    min-width: 0;
    max-height: 100%;
}

.person-biography-copy
{
    position: relative;
}

.person-biography-text
{
    line-height: 1.65;
}

.person-biography-copy.is-collapsed .person-biography-text
{
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}

.person-biography-toggle
{
    display: inline-flex;
    align-items: center;
    padding: 0;
    margin-top: .5rem;
    font-size: inherit;
    line-height: inherit;
}

.person-biography-toggle[hidden]
{
    display: none;
}

.person-career
{
    grid-area: career;
    display: flex;
    align-self: start;
    height: var(--person-portrait-height);
    min-width: 0;
    max-height: var(--person-portrait-height);
    overflow: hidden;
    flex-direction: column;
}

.person-career-heading
{
    margin-bottom: 1.5rem;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.person-career-range
{
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1.25rem;
    font-size: 1.15rem;
}

.person-career-range > span
{
    height: 2px;
    background: var(--rf-complementary);
}

.person-career-kpis
{
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.person-career-kpis span
{
    display: flex;
    flex-direction: column;
    color: var(--bs-secondary-color);
    font-size: .8rem;
    text-align: left;
}

.person-career-kpis strong
{
    color: var(--bs-body-color);
    font-size: 1.5rem;
    line-height: 1;
}

.person-career-activity
{
    display: flex;
    align-items: end;
    gap: .35rem;
    height: 6rem;
    flex: 0 0 6rem;
    margin-top: auto;
    padding-top: .25rem;
}

.person-career-decade
{
    display: flex;
    height: 100%;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: end;
    text-align: center;
}

.person-career-bar-chart
{
    display: block;
    width: 100%;
    height: 4.6rem;
}

.person-career-bar
{
    fill: rgba(var(--rf-complementary-rgb), .68);
}

.person-career-decade-label
{
    overflow: hidden;
    padding-top: .25rem;
    color: var(--bs-secondary-color);
    font-size: .65rem;
    text-overflow: clip;
}

@media (min-width: 992px)
{
    .person-hero:not(.is-biography-expanded) .person-hero-biography
    {
        display: flex;
        align-self: stretch;
        min-height: 0;
        overflow: hidden;
        flex-direction: column;
        padding-bottom: .35rem;
    }

    .person-hero:not(.is-biography-expanded) .person-biography-copy.is-collapsed
    {
        display: flex;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
    }

    .person-hero:not(.is-biography-expanded) .person-biography-copy.is-collapsed .person-biography-text
    {
        min-height: 0;
        flex: 1 1 auto;
    }

    .person-hero:not(.is-biography-expanded) .person-biography-toggle
    {
        flex: 0 0 auto;
    }

    .person-hero.is-biography-expanded
    {
        height: auto;
        min-height: calc(var(--person-portrait-height) + 4.5rem);
    }

    .person-hero.is-biography-expanded .person-hero-biography
    {
        max-height: none;
    }
}

@media (max-width: 991.98px)
{
    .person-hero
    {
        --person-portrait-width: clamp(150px, 24vw, 210px);
        --person-portrait-height: clamp(225px, 36vw, 315px);
        grid-template-columns: var(--person-portrait-width) minmax(0, 1fr);
        grid-template-areas:
            "portrait identity"
            "portrait biography"
            "career career";
        grid-template-rows: auto minmax(0, 1fr) auto;
        height: auto;
    }

    .person-career
    {
        height: auto;
        max-height: none;
        padding-top: 1.5rem;
        padding-left: 0;
        border-top: 1px solid var(--bs-border-color);
        border-left: 0;
    }

    .person-career-activity
    {
        max-width: 32rem;
    }
}

@media (max-width: 575.98px)
{
    .person-hero
    {
        --person-portrait-width: min(34vw, 8.5rem);
        --person-portrait-height: min(51vw, 12.75rem);
        grid-template-columns: var(--person-portrait-width) minmax(0, 1fr);
        grid-template-areas:
            "portrait identity"
            "biography biography"
            "career career";
        grid-template-rows: auto;
        gap: 1.25rem 1rem;
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    .person-hero-name
    {
        font-size: clamp(1.75rem, 9vw, 2.6rem);
    }

    .person-hero-facts
    {
        flex-direction: column;
        gap: .35rem;
        font-size: .82rem;
    }

    .person-biography-copy.is-collapsed .person-biography-text
    {
        -webkit-line-clamp: 4;
    }
}
