/**
 * プロフィール (Issue #153 PR6)
 *
 * - 旧版のローカル :root（グローバルトークンを上書きする地雷）を撤去
 * - グラスモーフィズムの大箱・オーロラ/粒子アニメ・ホバー字下げを廃止して平坦化
 * - デスクトップ2カラム: 写真列（左・sticky）｜本文（右・max-width: var(--measure)）
 * - 見出しはミンサー下線（kk-page-title / kk-section-title）
 * - 色はすべてトークン＝ライト/ダーク自動追従（旧ダーク3ブロックは削除）
 * - モバイルのカルーセル挙動（JS・クラス）は不変
 */

.profile-page {
    padding: var(--space-2) 20px var(--space-4);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-page .container {
    max-width: var(--container-max);
    margin: 0 auto;
}

/* ================================
   2カラムレイアウト
   ================================ */

.profile-content {
    display: grid;
    grid-template-columns: minmax(300px, 400px) 1fr;
    gap: var(--space-4);
    align-items: start;
}

/* ================================
   写真列（デスクトップ: sticky 縦並び）
   ================================ */

.profile-image-column {
    position: sticky;
    top: var(--space-2);
}

.profile-images-container {
    width: 100%;
}

.profile-carousel {
    position: relative;
}

.profile-carousel-track {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.profile-carousel-indicators {
    display: none; /* デスクトップでは非表示 */
}

.profile-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-card);
    transition: transform 0.3s ease;
}

.profile-image-wrapper:hover {
    transform: translateY(-4px);
}

.profile-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.3s ease;
}

.profile-image-wrapper:hover .profile-image {
    box-shadow: var(--shadow-card-hover);
}

/* ================================
   本文列（読み物: measure幅）
   ================================ */

.profile-text-column {
    max-width: var(--measure);
    min-width: 0;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--heading);
    margin-bottom: var(--space-2);
    text-align: center;
}

/* リード（詩）パネル */
.profile-lead {
    font-size: 1.02rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-panel);
    box-shadow: var(--shadow-card);
}

.profile-poem {
    text-align: center;
    margin: var(--space-2) 0;
    padding: var(--space-2);
    background: var(--bg-inset);
    border-radius: 10px;
}

.profile-poem p {
    margin-bottom: 0.8rem;
    line-height: 1.9;
    font-size: 1rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.profile-poem p:last-child {
    margin-bottom: 0;
}

.profile-note {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 14px 0 0;
}

/* 見出し（ミンサー下線は kk-section-title を継承） */
.profile-subtitle {
    margin-top: 0;
    margin-bottom: var(--space-3);
}

/* カード内小見出し（控えめサイズ） */
.kk-section-title--sub {
    font-size: 1.25rem;
    margin-bottom: var(--space-2);
}

.kk-section-title--sub::after {
    width: 84px;
    height: 6px;
    margin-top: 8px;
}

/* 経歴本文 */
.profile-biography {
    line-height: 2;
    color: var(--text-secondary);
    font-size: 1.02rem;
}

.profile-biography p {
    margin-bottom: 1.6rem;
}

.profile-biography p strong {
    color: var(--heading);
    font-weight: 600;
    font-size: 1.08rem;
}

/* メディア関連リスト */
.profile-media-title {
    margin-top: var(--space-4);
}

.profile-media-list {
    list-style: none;
    padding-left: 0;
    margin: var(--space-2) 0 0;
}

.profile-media-list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 12px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.02rem;
}

.profile-media-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.15rem;
}

/* ================================
   レスポンシブ
   ================================ */

@media (max-width: 900px) {
    .profile-content {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .profile-image-column {
        position: static;
    }

    .profile-text-column {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .profile-images-container {
        max-width: 350px;
        margin: 0 auto;
        position: relative;
    }

    /* モバイルでカルーセル化（JSの前提クラス・数値は不変） */
    .profile-carousel {
        position: relative;
        overflow: hidden;
        border-radius: var(--radius-card);
    }

    .profile-carousel-track {
        display: flex;
        flex-direction: row;
        gap: 0;
        transition: transform 0.3s ease;
        width: 600%; /* 6枚分 = 600% */
    }

    .profile-image-wrapper {
        flex: 0 0 16.666%; /* 100% / 6枚 = 16.666% */
        border-radius: 0;
    }

    .profile-image-wrapper:hover {
        transform: none;
    }

    /* インジケーター表示 */
    .profile-carousel-indicators {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: var(--space-2);
    }

    .profile-carousel-indicators .indicator {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: none;
        background: var(--bg-inset-strong);
        cursor: pointer;
        transition: background 0.3s ease, transform 0.3s ease;
        padding: 0;
    }

    .profile-carousel-indicators .indicator.active {
        background: var(--accent);
        transform: scale(1.2);
    }

    .profile-name {
        font-size: 1.6rem;
    }

    .profile-lead {
        padding: var(--space-2);
        margin-bottom: var(--space-3);
    }

    .profile-biography {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .profile-images-container {
        max-width: 280px;
    }

    .profile-name {
        font-size: 1.4rem;
    }

    .profile-poem p {
        font-size: 0.92rem;
    }
}

/* ================================
   印刷・アクセシビリティ
   ================================ */

@media print {
    .profile-page {
        background: white;
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-page {
        animation: none;
    }

    .profile-image-wrapper:hover {
        transform: none;
    }
}
