/* ===========================
   CSS — Iliana Chen Portfolio
   =========================== */

/* --- Variables --- */
:root {
    --wine: #8B2635;
    --wine-light: #A63D4D;
    --cream: #FAF7F2;
    --charcoal: #2D2D2D;
    --warm-gray: #6B6560;
    --light-gray: #E8E4DF;
    --white: #FFFFFF;
    --font-title: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
    --nav-height: 64px;
    --section-pad: 80px;
    --grid-gap: 12px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.6;
    font-size: 16px;
}

/* --- Language Switcher --- */
#lang-switch {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.lang-btn {
    border: none;
    background: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--warm-gray);
    transition: all 0.2s;
}

.lang-btn:hover { color: var(--wine); }

.lang-btn.active {
    background: var(--wine);
    color: var(--white);
}

/* --- Navigation --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    height: var(--nav-height);
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--light-gray);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.nav-logo {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 600;
    color: var(--wine);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--charcoal);
    font-size: 13px;
    font-weight: 400;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-links a:hover { background: var(--light-gray); color: var(--wine); }
.nav-links a.active { background: var(--wine); color: var(--white); }

/* --- Hero --- */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero--no-photo .hero-bg {
    /* 图片缺失时，背景纯色 + 红色微光，更克制 */
    background:
        radial-gradient(ellipse at 20% 50%, rgba(139,38,53,0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(139,38,53,0.08) 0%, transparent 50%),
        var(--cream);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(139,38,53,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(139,38,53,0.05) 0%, transparent 50%),
        linear-gradient(160deg, var(--cream) 0%, #F0EBE3 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 120px 24px 80px;
    max-width: 700px;
}

.hero-sub {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wine);
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(48px, 8vw, 88px);
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero-tagline {
    font-family: var(--font-title);
    font-size: clamp(18px, 3vw, 26px);
    font-style: italic;
    color: var(--warm-gray);
    margin-bottom: 8px;
}

.hero-school {
    font-size: 14px;
    color: var(--warm-gray);
    margin-bottom: 32px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 40px;
}

.badge {
    background: var(--wine);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.hero-cta {
    display: inline-block;
    padding: 14px 36px;
    background: var(--wine);
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.25s;
    box-shadow: 0 4px 20px rgba(139,38,53,0.3);
}

.hero-cta:hover {
    background: var(--wine-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(139,38,53,0.4);
}

/* --- Sections --- */
.section-dark { background: var(--charcoal); color: var(--cream); }
.section-light { background: var(--cream); }

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--section-pad) 24px;
}

/* ===========================
   CV — Curriculum Vitae
   排版简洁大方专业：双栏 + 顶部名卡 + 时间线徽章 + 打印友好
   =========================== */
.cv { background: #FFFFFF; }

.cv .section-title { color: var(--charcoal); }
.cv .section-sub { margin-top: -16px; margin-bottom: 32px; color: var(--warm-gray); }

/* 顶部联系条 */
.cv-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    margin-bottom: 48px;
    background: linear-gradient(135deg, #FAF7F2 0%, #F0EBE3 100%);
    border-left: 4px solid var(--wine);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.cv-name-block { flex: 0 0 auto; }
.cv-name {
    font-family: var(--font-title);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
}
.cv-name-cn { font-weight: 400; color: var(--warm-gray); font-style: italic; }
.cv-role {
    font-family: var(--font-title);
    font-style: italic;
    color: var(--wine);
    font-size: 16px;
    margin-top: 4px;
}
.cv-contact-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 6px 20px;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: var(--charcoal);
    flex: 1 1 480px;
}
.cv-contact-list li { display: flex; align-items: center; gap: 8px; }
.cv-ic { font-size: 14px; opacity: 0.8; }
.cv-contact-list a {
    color: var(--charcoal);
    text-decoration: none;
    border-bottom: 1px dotted var(--light-gray);
    transition: all 0.2s;
}
.cv-contact-list a:hover { color: var(--wine); border-bottom-color: var(--wine); }

/* 双栏布局 */
.cv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 56px;
    align-items: start;
}
.cv-main { min-width: 0; }
.cv-side { position: sticky; top: calc(var(--nav-height) + 16px); }

.cv-block { margin-bottom: 36px; }
.cv-block:last-child { margin-bottom: 0; }

.cv-h {
    font-family: var(--font-title);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--wine);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--light-gray);
}

/* 经历时间线 */
.cv-item { margin-bottom: 24px; }
.cv-item:last-child { margin-bottom: 0; }
.cv-item-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}
.cv-year {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 16px;
    color: var(--charcoal);
    background: var(--cream);
    padding: 2px 10px;
    border-radius: 4px;
    flex: 0 0 auto;
    letter-spacing: 0.02em;
}
.cv-role-line {
    font-weight: 600;
    font-size: 15px;
    color: var(--charcoal);
}
.cv-item-sub {
    font-style: italic;
    font-size: 13px;
    color: var(--warm-gray);
    margin-bottom: 6px;
    padding-left: 0;
}
.cv-item p {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin-top: 6px;
}
.cv-item--minor .cv-year { background: transparent; color: var(--warm-gray); font-weight: 400; }
.cv-item--minor p { font-size: 13px; color: var(--warm-gray); }

/* Studio list */
.cv-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cv-list li {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    padding-left: 18px;
    position: relative;
}
.cv-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--wine);
    font-size: 12px;
    top: 4px;
}

/* Sidebar: Education */
.cv-edu { font-size: 14px; line-height: 1.6; }
.cv-edu-degree {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 15px;
    color: var(--charcoal);
    margin-bottom: 2px;
}
.cv-edu-spec {
    font-size: 13px;
    color: var(--wine);
    font-weight: 600;
    margin-bottom: 6px;
}
.cv-edu-org {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 4px;
}
.cv-edu-when {
    font-size: 12px;
    color: var(--warm-gray);
    letter-spacing: 0.02em;
}

/* Sidebar: Skills */
.cv-skill-group { margin-bottom: 14px; }
.cv-skill-group:last-child { margin-bottom: 0; }
.cv-skill-h {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wine);
    margin-bottom: 4px;
}
.cv-skill-b {
    font-size: 13px;
    line-height: 1.6;
    color: #444;
}

/* Sidebar: Downloads */
.cv-downloads { padding-top: 12px; }
.cv-dl {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: var(--cream);
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    text-decoration: none;
    color: var(--charcoal);
    transition: all 0.2s;
}
.cv-dl:hover { background: var(--white); border-color: var(--wine); transform: translateX(2px); }
.cv-dl-ic { font-size: 20px; flex: 0 0 auto; }
.cv-dl-txt { display: flex; flex-direction: column; }
.cv-dl-txt strong { font-size: 13px; font-weight: 600; }
.cv-dl-txt span { font-size: 11px; color: var(--warm-gray); }

.cv-ref-note {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--light-gray);
    font-size: 12px;
    color: var(--warm-gray);
    text-align: center;
    font-style: italic;
}

/* 响应式：双栏折叠为单栏 */
@media (max-width: 900px) {
    .cv-contact { padding: 20px; flex-direction: column; align-items: flex-start; }
    .cv-contact-list { grid-template-columns: 1fr; }
    .cv-grid { grid-template-columns: 1fr; gap: 32px; }
    .cv-side { position: static; }
}
@media (max-width: 600px) {
    .cv-item-head { flex-wrap: wrap; }
    .cv-year { font-size: 14px; padding: 2px 8px; }
}

/* 打印：紧凑 + 单栏 + 隐藏下载按钮 */
@media print {
    .cv { background: white; }
    .cv-grid { grid-template-columns: 1fr; gap: 24px; }
    .cv-side { position: static; }
    .cv-downloads, #navbar, #lang-switch, footer, .hero-cta { display: none !important; }
    .cv-contact { box-shadow: none; border-radius: 0; background: white; border-left: 3px solid var(--wine); padding: 16px 0; margin-bottom: 24px; }
    .cv-block { break-inside: avoid; margin-bottom: 18px; }
    .cv-h { break-after: avoid; }
    .section-title, .cv-name { color: black; }
    a { color: black; text-decoration: none; }
}

.section-title {
    font-family: var(--font-title);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: inherit;
}

.section-sub {
    font-size: 16px;
    color: var(--warm-gray);
    margin-top: -16px;
    margin-bottom: 32px;
}

.section-dark .section-sub { color: #9A9490; }

.unit-header {
    margin-bottom: 24px;
}

.unit-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--wine);
    background: rgba(139,38,53,0.1);
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.section-dark .unit-label {
    background: rgba(250,247,242,0.15);
    color: #E8C4C4;
}

.unit-desc {
    font-size: 17px;
    color: var(--warm-gray);
    max-width: 680px;
    line-height: 1.7;
    margin-bottom: 36px;
}

.section-dark .unit-desc { color: #A8A09A; }

/* --- Production Tabs --- */
.production-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.tab-btn {
    border: 1.5px solid var(--light-gray);
    background: var(--white);
    padding: 7px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--warm-gray);
    transition: all 0.2s;
}

.tab-btn:hover { border-color: var(--wine); color: var(--wine); }

.tab-btn.active {
    background: var(--wine);
    border-color: var(--wine);
    color: var(--white);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- Photo Grid --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--grid-gap);
}

.photo-grid.full-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    display: block;
}

.photo-grid picture {
    display: block;
    width: 100%;
}

.photo-grid img:hover {
    transform: scale(1.025);
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

/* 视频项：保持比例，不要圆角（视频本身就有黑边） */
.photo-item--video { aspect-ratio: 16/9; }
.photo-item--video video { border-radius: 3px; aspect-ratio: 16/9; object-fit: cover; }

/* --- PDF Grid --- */
.photo-grid[data-type="pdf"] {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.pdf-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 1.5px solid var(--light-gray);
    padding: 12px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--charcoal);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.pdf-item:hover {
    border-color: var(--wine);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.pdf-icon { font-size: 22px; }

.doc-note {
    font-size: 13px;
    color: var(--warm-gray);
    margin-top: 12px;
    font-style: italic;
}

/* --- Video Section --- */
.video-section {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.video-item {
    border-radius: 8px;
    overflow: hidden;
    background: var(--charcoal);
}

.video-item video {
    width: 100%;
    display: block;
    max-height: 240px;
    object-fit: cover;
}

.video-caption {
    padding: 10px 14px;
    font-size: 12px;
    color: #A8A09A;
    background: rgba(255,255,255,0.05);
}

/* --- About --- */
.about-content {
    max-width: 720px;
}

.about-text p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: inherit;
}

.about-text p:last-child { margin-bottom: 0; }

.about-projects, .about-skills {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.section-light .about-projects,
.section-light .about-skills {
    border-top-color: var(--light-gray);
}

.about-projects h3, .about-skills h3 {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--wine);
}

.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-list li {
    font-size: 15px;
    line-height: 1.5;
    color: inherit;
}

.project-list strong {
    font-weight: 600;
    min-width: 40px;
    display: inline-block;
}

/* --- Page Banner（各页通用顶部 banner）--- */
.page-banner {
    padding: 100px 0 60px;
    background: var(--cream);
    border-bottom: 1px solid rgba(139, 38, 53, 0.1);
    text-align: center;
}
.page-banner--short { padding: 80px 0 40px; }
.page-banner .banner-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--wine);
    margin: 0 0 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.page-banner .banner-sub {
    font-size: 1.05rem;
    color: var(--warm-gray);
    margin: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Featured 卡片（主页精选）--- */
.featured {
    padding: 80px 0;
}
.featured .section-title {
    text-align: center;
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    color: var(--charcoal);
    margin: 0 0 8px;
}
.featured .section-sub {
    text-align: center;
    color: var(--warm-gray);
    margin: 0 0 48px;
    font-size: 1rem;
}
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}
.feature-card {
    display: block;
    text-decoration: none;
    color: var(--charcoal);
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.feature-img {
    width: 100%;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s;
}
.feature-card:hover .feature-img { transform: scale(1.05); }
.feature-meta { padding: 20px 24px 24px; }
.feature-year {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--wine);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.feature-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--charcoal);
    margin: 0 0 6px;
    font-weight: 600;
}
.feature-desc {
    font-size: 0.9rem;
    color: var(--warm-gray);
    margin: 0;
    line-height: 1.5;
}
.featured-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-primary, .btn-ghost {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary {
    background: var(--wine);
    color: var(--cream);
    border-color: var(--wine);
}
.btn-primary:hover {
    background: #6f1e2b;
    border-color: #6f1e2b;
    transform: translateY(-1px);
}
.btn-ghost {
    background: transparent;
    color: var(--charcoal);
    border-color: rgba(45, 45, 45, 0.3);
}
.btn-ghost:hover {
    background: var(--charcoal);
    color: var(--cream);
}
.btn-ghost--light {
    color: var(--cream);
    border-color: rgba(250, 247, 242, 0.4);
}
.btn-ghost--light:hover {
    background: var(--cream);
    color: var(--charcoal);
}

/* --- About Mini（主页简版）--- */
.about-mini-text {
    max-width: 720px;
    margin: 0 0 24px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(250, 247, 242, 0.92);
}

/* --- Hero Dots（轮播指示器）--- */
.hero-dots {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(250, 247, 242, 0.4);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}
.hero-dot:hover { background: rgba(250, 247, 242, 0.7); }
.hero-dot.active {
    background: var(--cream);
    transform: scale(1.3);
}

/* --- Hero Scroll（向下滚动提示）--- */
.hero-scroll {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 28px;
    height: 44px;
    border: 2px solid rgba(250, 247, 242, 0.7);
    border-radius: 14px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}
.hero-scroll-icon {
    width: 4px;
    height: 8px;
    background: rgba(250, 247, 242, 0.8);
    border-radius: 2px;
    animation: scrollHint 1.5s ease-in-out infinite;
}
@keyframes scrollHint {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50%      { transform: translateY(8px); opacity: 1; }
}

/* --- Year header（works 页）--- */
.year-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.year-tag {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--wine);
    background: rgba(139, 38, 53, 0.08);
    padding: 4px 12px;
    border-radius: 3px;
    letter-spacing: 0.05em;
}
.year-tag--light {
    color: var(--cream);
    background: rgba(250, 247, 242, 0.12);
}
.section-title--inline {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

/* --- About 页布局 --- */
.about-section { padding: 80px 0; }
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 48px;
    align-items: start;
}
.about-photo img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.about-h {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--wine);
    margin: 24px 0 12px;
    font-weight: 600;
}
.about-h:first-child { margin-top: 0; }
.about-text p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--charcoal);
    margin: 0 0 16px;
}
.about-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 48px;
}
.about-edu { font-size: 0.95rem; line-height: 1.7; color: var(--charcoal); }
.about-edu-degree { font-weight: 600; font-size: 1.05rem; margin: 0 0 4px; }
.about-edu-spec { color: var(--wine); margin: 0 0 4px; font-style: italic; }
.about-edu-org { margin: 0 0 4px; }
.about-edu-when { margin: 0; color: var(--warm-gray); font-size: 0.9rem; }
.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.about-list li {
    margin: 0 0 14px;
    padding-left: 16px;
    border-left: 2px solid var(--wine);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--charcoal);
}
.about-list li strong { color: var(--wine); }

/* --- Timeline（4 年时间线）--- */
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 800px;
}
.timeline li {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(250, 247, 242, 0.1);
    align-items: baseline;
}
.timeline li:last-child { border-bottom: none; }
.timeline-year {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--wine);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.timeline-h {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0;
    color: var(--cream);
    line-height: 1.5;
}

/* --- CV 页布局 --- */
.cv { padding: 60px 0 80px; }
.cv-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 32px;
    padding: 24px 28px;
    background: rgba(139, 38, 53, 0.05);
    border-left: 4px solid var(--wine);
    border-radius: 0 4px 4px 0;
    margin-bottom: 40px;
}
.cv-name-block { display: flex; flex-direction: column; justify-content: center; }
.cv-name {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--charcoal);
    margin: 0 0 4px;
    font-weight: 600;
    line-height: 1.2;
}
.cv-name-cn { color: var(--wine); font-weight: 500; font-style: normal; font-size: 0.95em; }
.cv-role {
    font-size: 0.95rem;
    color: var(--wine);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.cv-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    font-size: 0.9rem;
    align-content: center;
}
.cv-contact-list li { display: flex; align-items: center; gap: 6px; }
.cv-ic { font-size: 1rem; opacity: 1; color: var(--wine); display: inline-block; width: 1.2em; text-align: center; }
.cv-contact-list a { color: var(--charcoal); text-decoration: none; }
.cv-contact-list a:hover { color: var(--wine); }

.cv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}
.cv-block { margin-bottom: 32px; }
.cv-h {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--wine);
    margin: 0 0 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(139, 38, 53, 0.2);
    font-weight: 600;
}
.cv-block p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--charcoal);
    margin: 0 0 12px;
}
.cv-item { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid rgba(45, 45, 45, 0.08); }
.cv-item:last-child { border-bottom: none; }
.cv-item-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.cv-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--wine);
    background: rgba(139, 38, 53, 0.08);
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
}
.cv-role-line { font-weight: 600; font-size: 1rem; color: var(--charcoal); }
.cv-item-sub { font-size: 0.9rem; color: var(--wine); margin: 0 0 6px; font-style: italic; }
.cv-item--minor { border-bottom: none; padding-bottom: 0; }
.cv-item--minor .cv-role-line { font-weight: 500; font-size: 0.95rem; }

.cv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cv-list li {
    margin-bottom: 14px;
    padding-left: 16px;
    border-left: 2px solid var(--wine);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--charcoal);
}
.cv-list li strong { color: var(--wine); }

.cv-skill-group { margin-bottom: 12px; }
.cv-skill-h { font-weight: 600; color: var(--wine); margin: 0 0 2px; font-size: 0.9rem; }
.cv-skill-b { font-size: 0.85rem; line-height: 1.55; color: var(--charcoal); margin: 0; }
.cv-downloads { padding: 16px; background: rgba(139, 38, 53, 0.05); border-radius: 4px; }
.cv-dl {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 4px;
    margin-top: 8px;
    text-decoration: none;
    color: var(--charcoal);
    transition: background 0.2s;
}
.cv-dl:hover { background: var(--cream); }
.cv-dl-ic { font-size: 1.4rem; }
.cv-dl-txt { display: flex; flex-direction: column; }
.cv-dl-txt strong { font-size: 0.9rem; }
.cv-dl-txt span { font-size: 0.8rem; color: var(--warm-gray); }
.cv-ref-note {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid rgba(45, 45, 45, 0.1);
    font-size: 0.85rem;
    color: var(--warm-gray);
    font-style: italic;
}

/* --- Contact 页布局 --- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 48px;
    align-items: start;
    padding: 60px 0 80px;
}
.contact-info { font-size: 1rem; }
.contact-item { margin: 0 0 16px; }
.contact-link {
    color: var(--wine);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
}
.contact-link:hover { text-decoration: underline; }
.contact-note {
    display: block;
    font-size: 0.85rem;
    color: var(--warm-gray);
    margin-top: 2px;
}
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contact-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.contact-list a { color: var(--charcoal); text-decoration: none; }
.contact-list a:hover { color: var(--wine); }
.contact-form label {
    display: block;
    margin-bottom: 16px;
}
.contact-form label span {
    display: block;
    font-size: 0.85rem;
    color: var(--warm-gray);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(45, 45, 45, 0.2);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--wine);
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form button {
    border: none;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    cursor: pointer;
}
.form-note {
    font-size: 0.8rem;
    color: var(--warm-gray);
    margin: 12px 0 0;
    font-style: italic;
}

/* --- Works 页 production tabs --- */
.production-tabs { margin: 32px 0; }
.tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(45, 45, 45, 0.1);
    padding-bottom: 8px;
}
.tab-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(45, 45, 45, 0.2);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:hover { background: rgba(139, 38, 53, 0.05); }
.tab-btn.active {
    background: var(--wine);
    color: var(--cream);
    border-color: var(--wine);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.4s; }
.prod-desc {
    font-size: 0.95rem;
    color: var(--warm-gray);
    margin: 0 0 24px;
    line-height: 1.6;
    font-style: italic;
}


.contact-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 18px;
}

.contact-icon { font-size: 24px; }

.contact-item a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.contact-item a:hover { border-color: var(--wine); }

.contact-note {
    font-size: 15px;
    color: #9A9490;
    margin-top: 12px;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(20, 18, 16, 0.96);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active { display: flex; }

.lb-content {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lb-content video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
}

.lb-caption {
    margin-top: 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    text-align: center;
}

.lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
}

.lb-close:hover { background: rgba(255,255,255,0.2); }

.lb-prev, .lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 40px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
}

.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.2); }

/* --- Footer --- */
footer {
    background: var(--charcoal);
    color: #6B6560;
    text-align: center;
    padding: 32px 24px;
    font-size: 13px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .nav-links { display: none; }
    #navbar { border-bottom-color: transparent; }
    :root { --section-pad: 60px; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .hero-content { padding-top: 100px; }
    .cv-grid { grid-template-columns: 1fr; }
    .cv-contact { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .hero-dots { bottom: 60px; }
    .page-banner { padding: 80px 0 40px; }
    .year-header { flex-direction: column; gap: 8px; }
}

@media (max-width: 600px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .video-section { grid-template-columns: 1fr; }
    .hero-badges { gap: 6px; }
    .badge { font-size: 11px; padding: 4px 10px; }
    .section-inner { padding: 48px 16px; }
    .featured-grid { grid-template-columns: 1fr; }
    .cv-contact-list { grid-template-columns: 1fr; }
    .timeline li { grid-template-columns: 60px 1fr; gap: 16px; }
    .timeline-year { font-size: 0.95rem; }
    .lang-switch { top: 8px; right: 8px; }
}

/* --- 404 Page --- */
.cv-role-sub { color: var(--warm-gray); font-size: 0.9rem; margin-top: 0.6rem; padding-left: 0.6rem; border-left: 2px solid var(--wine-light); }
.contact-ic { color: var(--wine); display: inline-block; width: 1.2em; text-align: center; font-weight: 600; }
.page-404 { background: var(--cream); }
.error-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 60px;
    text-align: center;
}
.error-inner {
    max-width: 560px;
    width: 100%;
}
.error-code {
    font-family: var(--font-serif);
    font-size: clamp(96px, 16vw, 160px);
    font-weight: 700;
    color: var(--wine);
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -0.04em;
    /* 轻微淡入 */
    animation: errorFloat 6s ease-in-out infinite;
}
@keyframes errorFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.error-h {
    font-family: var(--font-serif);
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 600;
    color: var(--charcoal);
    margin: 0 0 16px;
    line-height: 1.3;
}
.error-p {
    color: var(--warm-gray);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 32px;
}
.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.error-hint {
    font-size: 0.85rem;
    color: var(--warm-gray);
    margin: 0;
    font-style: italic;
}
.error-hint a {
    color: var(--wine);
    text-decoration: none;
}
.error-hint a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .error-page { padding: 60px 16px 40px; }
    .error-actions { flex-direction: column; align-items: stretch; }
    .error-actions .btn-primary,
    .error-actions .btn-ghost { width: 100%; }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#hero .hero-content > * {
    animation: fadeInUp 0.6s ease-out both;
}

#hero .hero-sub { animation-delay: 0.1s; }
#hero .hero-title { animation-delay: 0.2s; }
#hero .hero-tagline { animation-delay: 0.3s; }
#hero .hero-school { animation-delay: 0.35s; }
#hero .hero-badges { animation-delay: 0.4s; }
#hero .hero-cta { animation-delay: 0.5s; }
/* ============================================================
   ENHANCEMENTS — 交互与观感优化（追加，覆盖上方默认）
   ============================================================ */

/* --- Hero 作品大图 + 柔和遮罩（保持深色标题可读）--- */
.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    /* 入场缓慢放大，电影感 */
    animation: heroZoom 14s ease-out both;
}

/* Hero 三图轮播 — 12s 一轮，每张图显示 ~3.3s + 淡入淡出 */
.hero-photo--a,
.hero-photo--b,
.hero-photo--c {
    animation: heroZoom 14s ease-out both, heroCrossfade3 12s ease-in-out infinite;
}
.hero-photo--a { animation-delay: 0s, 0s; }
.hero-photo--b { animation-delay: 0s, -4s; }   /* B 提前 4s 启动（1/3 周期） */
.hero-photo--c { animation-delay: 0s, -8s; }   /* C 提前 8s 启动（2/3 周期） */

@keyframes heroCrossfade3 {
    /* 12s 一轮：0-3.3s 显, 3.3-4.3s 淡出, 4.3-11.3s 隐, 11.3-12s 淡入 */
    0%        { opacity: 1; }
    27.5%     { opacity: 1; }    /* 3.3s 仍在显示 */
    35.83%    { opacity: 0; }    /* 4.3s 已淡出 */
    94.17%    { opacity: 0; }    /* 11.3s 仍隐藏 */
    100%      { opacity: 1; }    /* 12s 淡入完成 */
}
.hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 0;
    /* 奶白渐变压在图片上，越靠中心越亮，保证标题清晰 */
    background:
        radial-gradient(ellipse at center, rgba(250,247,242,0.78) 0%, rgba(250,247,242,0.42) 55%, rgba(45,45,45,0.18) 100%);
}
@keyframes heroZoom {
    from { transform: scale(1.08); }
    to   { transform: scale(1); }
}

/* --- 图片淡入（用动画实现，默认就是可见，绝不会把图藏住）--- */
.photo-grid img,
.video-item video {
    animation: imgFade 0.5s ease both;
    transition: box-shadow 0.25s, transform 0.25s;
}
@keyframes imgFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* 加载失败的占位（灰底，便于一眼看出哪张没找到）*/
.photo-grid img.broken {
    animation: none;
    opacity: 1;
    object-fit: contain;
    background: var(--light-gray);
    min-height: 120px;
}

/* --- 自检提示条（图片找不到时出现）--- */
#diag-banner {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 3000;
    max-width: min(92vw, 680px);
    background: #2D2D2D;
    color: #FAF7F2;
    border: 1px solid var(--wine-light);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
#diag-banner code {
    background: rgba(255,255,255,0.12);
    padding: 1px 6px;
    border-radius: 4px;
    word-break: break-all;
}
#diag-banner button {
    margin-left: 8px;
    background: none;
    border: none;
    color: #E8C4C4;
    cursor: pointer;
    font-size: 16px;
}

/* --- 标签页切换淡入 --- */
.tab-content { display: none; }
.tab-content.active {
    display: block;
    animation: tabFade 0.45s ease both;
}
@keyframes tabFade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- 滚动渐入（区块进入视口时浮现）--- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
    will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* --- 导航：当前区块下划线动效更顺滑 --- */
.nav-links a { position: relative; }
.nav-links a.active { background: var(--wine); color: var(--white); }

/* --- 灯箱淡入 + 图片加载态 --- */
.lightbox {
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.lightbox.active { opacity: 1; }
.lb-content img, .lb-content video {
    animation: lbPop 0.35s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes lbPop {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}
.lb-loading {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 按钮/卡片的统一过渡更顺滑 --- */
.hero-cta, .tab-btn, .lang-btn, .nav-links a, .pdf-item, .contact-item a {
    transition: all 0.25s cubic-bezier(.2,.7,.2,1);
}

/* --- 尊重“减少动态效果”的系统偏好（无障碍）--- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .photo-grid img, .video-item video { opacity: 1; transform: none; }
    /* reduced motion: 只显示 A，关闭轮播 */
    .hero-photo--b, .hero-photo--c { display: none; }
}
