.person-article {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(20rem, 0.68fr) minmax(0, 1.55fr);
    gap: var(--title-overview-gap);
}

.person-profile-card {
    grid-column: 1;
    grid-row: 1;
}

.person-biography-card {
    grid-column: 2;
    grid-row: 1;
}

.person-profile-card,
.person-biography-card {
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface-raised);
    box-shadow: 0 1.25rem 3rem rgb(17 24 32 / 7%);
}

.person-profile-card {
    padding: 1rem;
}

.person-portrait {
    position: relative;
    min-width: 0;
    padding: 0;
    margin: 0;
    border-radius: var(--radius-card-small);
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-surface-muted);
}

.person-portrait img,
.person-portrait__placeholder {
    width: 100%;
    height: 100%;
}

.person-portrait img {
    display: block;
    object-fit: cover;
    object-position: center top;
}

.person-portrait__caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 0.45rem 0.55rem;
    background: rgb(17 24 32 / 82%);
    color: #fff;
    font-size: 0.75rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.person-profile-card__information {
    min-width: 0;
    margin-top: 1rem;
}

.person-profile-card--without-image .person-profile-card__information {
    margin-top: 0;
}

.person-profile-card h1 {
    margin: 0;
    color: var(--color-copy-strong);
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.person-profile-card__age,
.person-profile-card__secondary,
.person-profile-card__place {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.45;
}

.person-profile-card__age {
    margin-top: 0.65rem;
    font-size: 0.88rem;
    font-weight: 650;
}

.person-profile-card__age span {
    font-weight: 500;
}

.person-profile-card__secondary {
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.person-profile-card__place {
    padding-top: 0.7rem;
    border-top: 1px solid var(--color-border);
    margin-top: 0.7rem;
    color: var(--color-copy);
    font-size: 0.875rem;
}

.person-biography-card {
    padding: clamp(1.25rem, 2.4vw, 2rem);
}

.person-information__bio {
    color: var(--color-copy);
    font-size: var(--font-size-copy);
    line-height: var(--line-height-copy);
}

.person-information__bio :where(p, ul, ol) {
    margin-block: 0 1em;
}

.person-information__bio > :last-child {
    margin-bottom: 0;
}

.person-biography-card__empty {
    margin: 0;
    color: var(--color-muted);
    font-size: var(--font-size-copy);
}

.person-credits {
    display: grid;
    min-width: 0;
    grid-column: 1 / -1;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.person-featured-titles {
    min-width: 0;
    grid-column: 1 / -1;
    margin-top: 0;
}

.person-ranking-card {
    min-width: 0;
    padding: clamp(1.25rem, 2.4vw, 2rem);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    grid-column: 1 / -1;
    background: var(--color-surface-raised);
    box-shadow: 0 1.25rem 3rem rgb(17 24 32 / 7%);
}

.person-ranking-card > h2 {
    margin: 0;
    color: var(--color-copy-strong);
    font-size: var(--font-size-section-title);
    font-weight: var(--font-weight-section-title);
    letter-spacing: -0.035em;
    line-height: 1.18;
    text-wrap: balance;
}

.person-ranking-card__snapshot {
    margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

.person-ranking-card .ranking-snapshot__item a[aria-disabled='true'] {
    cursor: default;
}

.person-credit-section {
    margin-top: 0;
}

.person-credit-section__content {
    padding-top: 0.35rem;
}

.person-filmography-table-wrapper {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: var(--color-brand-ink) var(--color-surface-muted);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.person-filmography-table {
    min-width: 50rem;
    table-layout: auto;
}

.person-directed-table {
    min-width: 36rem;
    table-layout: auto;
}

.person-filmography-table th,
.person-filmography-table td,
.person-directed-table th,
.person-directed-table td {
    width: auto;
}

.person-filmography-table th:first-child,
.person-filmography-table td:first-child {
    width: 34%;
}

.person-filmography-table th:last-child,
.person-filmography-table td:last-child,
.person-directed-table th:last-child,
.person-directed-table td:last-child {
    width: 14.5rem;
}

.person-filmography-table__date {
    color: var(--color-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.person-role-list {
    display: grid;
    padding: 0;
    margin: 0;
    gap: 0.3rem;
    list-style: none;
}

.person-role-list .title-cast__role {
    margin-left: 0.2rem;
}

@media (max-width: 68rem) {
    .person-article {
        grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.35fr);
    }

}

@media (max-width: 48rem) {
    .person-article {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .person-profile-card,
    .person-credits,
    .person-ranking-card,
    .person-featured-titles,
    .person-biography-card {
        grid-column: 1;
        grid-row: auto;
    }

    .person-profile-card h1 {
        font-size: clamp(1.5rem, 7vw, 1.9rem);
    }

    .person-profile-card__age,
    .person-profile-card__place,
    .person-profile-card__secondary {
        font-size: 0.9375rem;
    }

    .person-information__bio {
        font-size: 1rem;
        line-height: 1.65;
    }

    .person-portrait__caption {
        font-size: 0.75rem;
    }

    .person-filmography-table-wrapper {
        overflow: hidden;
    }

    .person-filmography-table,
    .person-directed-table {
        width: 100%;
        min-width: 0;
        table-layout: auto;
    }

    .person-filmography-table thead,
    .person-directed-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        border: 0;
        margin: -1px;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        overflow: hidden;
        white-space: nowrap;
    }

    .person-filmography-table tbody,
    .person-directed-table tbody {
        display: block;
    }

    .person-filmography-table tbody tr,
    .person-directed-table tbody tr {
        display: grid;
        padding: 0.75rem 0.85rem;
        gap: 0.18rem;
    }

    .person-filmography-table td,
    .person-directed-table td {
        display: block;
        width: auto;
        padding: 0;
    }

    .person-filmography-table td:first-child,
    .person-directed-table td:first-child {
        width: auto;
        padding-bottom: 0.12rem;
        color: var(--color-copy-strong);
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.35;
    }

    .person-filmography-table td:nth-child(2) {
        display: flex;
        min-width: 0;
        align-items: baseline;
        color: var(--color-copy);
        font-size: 0.9rem;
        line-height: 1.4;
        gap: 0.25rem;
    }

    .person-filmography-table td:nth-child(2)::before {
        flex: 0 0 auto;
        color: var(--color-muted);
        content: 'Papel:';
        font-weight: 700;
    }

    .person-filmography-table td:nth-child(2) .person-role-list {
        min-width: 0;
    }

    .person-filmography-table__date {
        color: var(--color-muted);
        font-size: 0.8125rem;
        line-height: 1.4;
        white-space: normal;
    }

    .person-filmography-table__date::before {
        content: none;
    }
}

@media (max-width: 22rem) {
    .person-profile-card {
        padding: 0.75rem;
    }

    .person-profile-card h1 {
        font-size: 1.35rem;
    }

    .person-profile-card__age,
    .person-profile-card__place,
    .person-profile-card__secondary {
        font-size: 0.875rem;
    }

    .person-biography-card {
        padding: 1rem;
    }
}
