/* =========================================
   person.css - キャストページ
   ========================================= */

#person-view {
    background-color: #050505;
    min-height: 100vh;
    color: #ffffff;
    padding-bottom: 80px;
}

/* ---- ヒーロー ---- */
.person-hero {
    position: relative;
    padding: 130px 4% 60px;
    background-image: var(--person-bg, none);
    background-size: cover;
    background-position: center 20%;
    overflow: hidden;
}

.person-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(5,5,5,0.97) 35%, rgba(5,5,5,0.65) 100%),
        linear-gradient(to top, rgba(5,5,5,1) 0%, transparent 40%);
    z-index: 1;
}

.person-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 44px;
    max-width: 900px;
}

/* ---- 写真 ---- */
.person-photo-wrapper {
    flex-shrink: 0;
}

.person-photo {
    width: 190px;
    height: 270px;
    object-fit: cover;
    object-position: top;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.85);
    display: block;
}

.person-photo-placeholder {
    width: 190px;
    height: 270px;
    background: #1c1c1c;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.85);
}

.person-photo-placeholder .material-symbols-outlined {
    font-size: 72px;
    color: #444;
}

/* ---- テキスト情報 ---- */
.person-info {
    flex: 1;
    padding-bottom: 8px;
}

.person-label {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin: 0 0 10px;
    font-weight: 700;
}

.person-name {
    font-size: 3rem;
    font-weight: 900;
    margin: 0 0 18px;
    letter-spacing: -1.5px;
    line-height: 1.05;
}

.person-bio {
    font-size: 0.92rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.68);
    max-width: 580px;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- 出演作品セクション ---- */
.person-works-section {
    padding: 10px 4% 20px;
}

.person-works-group {
    margin-bottom: 52px;
}

.person-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: #ffffff;
}

/* ---- 作品カードグリッド ---- */
.person-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.person-work-card {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #161616;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.person-work-card:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 36px rgba(0,0,0,0.7);
}

.person-work-thumb {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111;
}

.person-work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.person-work-card:hover .person-work-thumb img {
    transform: scale(1.05);
}

.person-work-no-img {
    width: 100%;
    height: 100%;
    background: #1e1e1e;
}

.person-work-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.person-work-card:hover .person-work-overlay {
    opacity: 1;
}

.person-work-overlay .material-symbols-outlined {
    font-size: 52px;
    color: #ffffff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}

.person-work-info {
    padding: 10px 12px 12px;
}

.person-work-title {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
    line-height: 1.3;
}

.person-work-year {
    font-size: 0.73rem;
    color: #888;
    margin-top: 4px;
}

.person-no-works {
    color: #555;
    padding: 60px 0;
    text-align: center;
    font-size: 1rem;
}

/* ---- レスポンシブ ---- */
@media (max-width: 768px) {
    .person-hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .person-photo {
        width: 130px;
        height: 185px;
    }

    .person-photo-placeholder {
        width: 130px;
        height: 185px;
    }

    .person-name {
        font-size: 2rem;
    }

    .person-works-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
}
