/* ── Person detail ─────────────────────────────────────────── */
.person-detail {
    width: 100%;
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.person-detail__hero {
    margin-bottom: 2.5rem;
}

.person-detail__back {
    display: inline-block;
    margin-bottom: 1.25rem;
    font-size: .85rem;
    color: #555;
    text-decoration: none;
}

.person-detail__back:hover { color: #111; }

.person-detail__hero-body {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.person-detail__photo-wrap {
    flex-shrink: 0;
    width: 180px;
}

.person-detail__photo {
    width: 100%;
    border-radius: 10px;
    display: block;
    object-fit: cover;
    aspect-ratio: 2 / 3;
}

.person-detail__photo--placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #d8d8d8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: #999;
}

.person-detail__info {
    flex: 1;
    min-width: 0;
}

.person-detail__name {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 .35rem;
    color: #111;
}

.person-detail__dept {
    font-size: .9rem;
    color: #666;
    margin: 0 0 1rem;
}

.person-detail__meta {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: 1.25rem;
}

.person-detail__meta-item {
    font-size: .85rem;
    color: #444;
}

.person-detail__meta-label {
    font-weight: 600;
    margin-right: .35rem;
}

.person-detail__bio-wrap {
    font-size: .9rem;
    line-height: 1.7;
    color: #333;
}

.person-detail__bio-wrap--clamped .person-detail__bio {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.person-detail__bio--empty {
    color: #aaa;
    font-style: italic;
    font-size: .9rem;
}

.overview-toggle {
    margin-top: .5rem;
    background: none;
    border: none;
    color: #555;
    font-size: .82rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* ── Filmography grid ──────────────────────────────────────── */
.person-filmography {
    padding-top: 1rem;
    border-top: 1px solid #ececec;
}

.person-filmography__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    color: #111;
}

.person-filmography__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .75rem;
}

.person-credit-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    border: 1px solid #ececec;
    transition: box-shadow .15s, transform .15s;
}

.person-credit-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    transform: translateY(-3px);
}

.person-credit-card__poster-wrap {
    position: relative;
    background: #d8d8d8;
}

.person-credit-card__poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

.person-credit-card__poster--empty {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #d0d0d0;
}

.person-credit-card__type {
    position: absolute;
    top: .4rem;
    left: .4rem;
    font-size: .65rem;
    font-weight: 700;
    padding: .15rem .4rem;
    border-radius: 4px;
    color: #fff;
    text-transform: uppercase;
}

.person-credit-card__type--movie { background: rgba(30, 30, 30, .75); }
.person-credit-card__type--tv    { background: rgba(0, 80, 180, .75); }

.person-credit-card__rating {
    position: absolute;
    bottom: .4rem;
    right: .4rem;
    background: rgba(0, 0, 0, .72);
    color: #ffc107;
    font-size: .68rem;
    font-weight: 700;
    padding: .15rem .4rem;
    border-radius: 4px;
}

.person-credit-card__body {
    padding: .55rem .65rem .65rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.person-credit-card__title {
    font-size: .78rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.person-credit-card__character {
    font-size: .7rem;
    color: #666;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.person-credit-card__year {
    font-size: .7rem;
    color: #999;
    margin-top: auto;
}

.person-credit-card--hidden {
    display: none;
}

.person-filmography__more {
    margin-top: 1.5rem;
    text-align: center;
}

.person-filmography__btn {
    padding: .6rem 2rem;
    border-radius: 999px;
    border: 2px solid #333;
    background: transparent;
    font-size: .85rem;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.person-filmography__btn:hover {
    background: #333;
    color: #fff;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .person-detail__hero-body {
        gap: 1.25rem;
    }

    .person-detail__photo-wrap {
        width: 130px;
    }

    .person-detail__name {
        font-size: 1.5rem;
    }

    .person-filmography__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .person-detail__hero-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .person-detail__photo-wrap {
        width: 140px;
    }

    .person-detail__meta {
        align-items: center;
    }

    .person-filmography__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.person-detail .share-buttons__label { color: #888; }
.person-detail .share-btn {
    background: rgba(0,0,0,.07);
    border-color: rgba(0,0,0,.15);
    color: #333;
}
.person-detail .share-btn:hover {
    background: rgba(0,0,0,.15);
    border-color: rgba(0,0,0,.25);
    color: #000;
}
.person-detail .share-btn--x:hover       { background: #000; border-color: #000; color: #fff; }
.person-detail .share-btn--facebook:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.person-detail .share-btn--whatsapp:hover { background: #25d366; border-color: #25d366; color: #fff; }
