/* ───────── reset & tokens ───────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --bg-elev: #111;
    --text: #ededed;
    --text-mid: #888;
    --text-dim: #555;
    --border: #1c1c1c;
    --border-mid: #2a2a2a;
    --accent: #ccff00;
    --accent-soft: rgba(204, 255, 0, 0.55);

    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-serif: "Noto Serif SC", "Source Han Serif", serif;
    --font-body: "Inter", "Noto Sans SC", system-ui, sans-serif;
    --font-cn: "Noto Sans SC", system-ui, sans-serif;

    --max: 1280px;
    --pad-x: clamp(20px, 4vw, 56px);
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

p {
    margin: 0 0 12px;
}

p:last-child {
    margin-bottom: 0;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 500;
    letter-spacing: -0.01em;
}

dl,
ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

.accent {
    color: var(--accent);
}

/* ───────── header ───────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: saturate(160%) blur(8px);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px var(--pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.nav-primary {
    display: flex;
    align-items: center;
    gap: 28px;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.nav-primary a {
    position: relative;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.nav-primary a:hover,
.nav-primary a:focus-visible {
    color: var(--accent);
}

.nav-primary a.ext {
    color: var(--text-mid);
}

.nav-primary a.ext:hover {
    color: var(--accent);
}

/* ───────── hero (poster-style, keyword frame + right-aligned center) ───────── */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #000;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* big, but height-capped so landscape doesn't crop the bottom */
    width: min(1260px, 94vw, calc((100vh - 80px) * 0.82));
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-elev);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    filter: brightness(0.96) contrast(1.08) saturate(1.05);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    /* darken left (face) and right (ear) edges, keep mid-tones */
    background:
        linear-gradient(90deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.04) 40%, rgba(0,0,0,0.04) 55%, rgba(0,0,0,0.4) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.25) 100%);
    pointer-events: none;
}

/* ── overlay (top + center + bottom) ── */
.hero-overlay {
    position: relative;
    z-index: 1;
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(48px, 7vh, 80px) var(--pad-x) clamp(36px, 5vh, 64px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.78);
    font-family: "Noto Sans SC", system-ui, sans-serif;
    font-weight: 300;
}

/* ── 3-column grids ── */
.hero-top,
.hero-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: clamp(20px, 4vw, 60px);
    align-items: start;
}

.hero-col--left   { text-align: left;   }
.hero-col--center { text-align: center; }
.hero-col--right  { text-align: right;  }

/* ── type grid blocks ── */
.poster-block {
    margin-bottom: 16px;
}

.poster-label {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
    margin-bottom: 6px;
}

.poster-tag {
    font-family: "Noto Sans SC", var(--font-display), sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin: 0;
}

.poster-text {
    font-family: "Noto Sans SC", var(--font-display), sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
    margin: 0;
}

.poster-text a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.poster-text a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── CENTER: name + slogan, pushed right over the ear / dark area ── */
.hero-mid {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: clamp(16px, 3vh, 32px) var(--pad-x) clamp(16px, 3vh, 32px) 0;
}

.hero-text {
    max-width: clamp(200px, 24vw, 300px);
    text-align: left;
    color: rgba(255, 255, 255, 0.86);
}

.poster-eyebrow {
    font-family: var(--font-display), "Noto Sans SC", sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.32em;
    color: rgba(255, 255, 255, 0.58);
    text-transform: uppercase;
    margin: 0 0 6px;
}

.poster-name {
    font-family: "Noto Sans SC", sans-serif;
    font-weight: 300;
    font-size: 11px;
    line-height: 1.7;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
}

.poster-name-en {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.5em;
    color: rgba(255, 255, 255, 0.68);
    margin: 2px 0 10px;
}

.poster-slogan {
    font-family: "Noto Sans SC", sans-serif;
    font-weight: 300;
    font-size: 11px;
    line-height: 1.85;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.poster-slogan span {
    color: rgba(204, 255, 0, 0.75);
}

/* ── scroll cue ── */
.hero-scroll {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 0.32em;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-scroll:hover {
    color: var(--accent);
}

/* ── responsive ── */
@media (max-width: 720px) {
    .hero-bg img {
        object-position: center 28%;
    }
    .hero-top,
    .hero-bottom {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: left !important;
    }
    .hero-col--center,
    .hero-col--right {
        text-align: left;
    }
    .hero-mid {
        justify-content: flex-start;
        padding-right: 0;
    }
}

/* ───────── bio intro ───────── */
.bio-intro {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad-x) clamp(40px, 6vw, 80px);
}

.bio-intro-inner {
    max-width: 720px;
    opacity: 0.45;
    font-size: 13px;
    line-height: 1.85;
    color: var(--text-mid);
}

.bio-intro-inner > p {
    margin: 0;
}

.bio-credits {
    margin-top: 20px;
}

.bio-credits p,
.bio-exhibitions p {
    margin: 0;
}

.bio-exhibitions {
    margin-top: 20px;
}

/* ───────── section heads ───────── */
.section-head {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(60px, 9vw, 120px) var(--pad-x) clamp(28px, 4vw, 48px);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 24px;
    border-top: 1px solid var(--border);
}

.section-num {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--text-dim);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(40px, 7vw, 96px);
    line-height: 1;
    letter-spacing: -0.03em;
}

.section-aside {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* ───────── works ───────── */
.works {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad-x) clamp(60px, 9vw, 120px);
}

.works-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--text-mid);
    padding: 0 0 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    position: sticky;
    top: 57px;
    background: var(--bg);
    z-index: 10;
}

.works-nav a {
    position: relative;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.works-nav a:hover,
.works-nav a:focus-visible {
    color: var(--accent);
}

.works-nav a::before {
    content: counter(workNav, decimal-leading-zero);
    counter-increment: workNav;
    color: var(--text-dim);
    margin-right: 6px;
    font-size: 11px;
}

@counter-style workNavStyle {
    system: extends decimal;
    pad: 2;
}

.works-nav {
    counter-reset: workNav;
    list-style: none;
}

/* ───────── category ───────── */
.category {
    padding-top: 56px;
}

.category-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 20px;
    padding-bottom: 28px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.cat-num {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--text-dim);
}

.cat-title {
    font-family: var(--font-display), var(--font-serif);
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.cat-title-cn {
    font-family: var(--font-display);
    font-size: 0.55em;
    font-weight: 500;
    margin-left: 14px;
    color: var(--text-mid);
    letter-spacing: 0.02em;
}

.cat-count {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    text-transform: uppercase;
    white-space: nowrap;
}

.category-subhead {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--text-mid);
    text-transform: uppercase;
    padding: 32px 0 12px;
    margin: 0;
}

/* ───────── work article ─────────
   所有 work 统一使用 3 列网格：序号列 / 封面图列 / 文本列（左图右字） */
.work {
    display: grid;
    grid-template-columns: minmax(40px, 56px) minmax(0, 0.9fr) minmax(0, 1.1fr);
    column-gap: clamp(18px, 2.6vw, 36px);
    row-gap: 14px;
    padding: 36px 0 32px;
    border-bottom: 1px solid var(--border);
    align-items: start;
}

.work-head {
    grid-column: 1 / -1;
}

.work-subtitle {
    grid-column: 2 / -1;
    margin: 0 0 4px;
}

/* ───────── featured work — 与 .work 共享样式（保留特例） ───────── */
/* Featured 的所有子元素位置由 .work 默认规则决定，无额外覆盖 */

/* 封面图：左列（grid column 2），缩略图限制宽度 */
.work-cover {
    grid-column: 2;
    grid-row: auto;
    margin: 0;
    max-width: 240px;
    overflow: hidden;
    border: 1px solid var(--border-mid);
    align-self: start;
}

.work-cover img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: filter 0.4s ease, transform 0.6s ease;
}

.work:hover .work-cover img {
    filter: brightness(1.06);
    transform: scale(1.01);
}

/* 横版作品（如《无耻之徒》原片 4:3）保留原比例 */
.work > .work-cover--landscape {
    max-width: 360px;
}

.work > .work-cover--landscape > img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* 文本信息：右列（grid column 3） */
.work-info {
    grid-column: 3;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 4px;
}

.work-info .work-meta,
.work-info .work-links {
    grid-column: auto;
}

/* ───────── 非 Featured 板块（没有 .work-info 包裹）—— 元数据/链接直放第 3 列 ───────── */
.work > .work-meta,
.work > .work-links {
    grid-column: 3;
    margin: 0;
    padding: 0;
}

.work--featured .work-meta > div,
.work--featured .work-links > div {
    grid-template-columns: 64px 1fr;
    padding: 4px 0;
}

.work-head {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(60px, 80px) 1fr auto;
    column-gap: clamp(16px, 3vw, 36px);
    align-items: baseline;
}

.work-no {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--text-dim);
}

.work-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(18px, 2.1vw, 24px);
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 0;
    transition: color 0.2s ease;
}

.work:hover .work-title {
    color: var(--accent);
}

.work-year {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--text-mid);
    white-space: nowrap;
}

.work-subtitle {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-mid);
}

/* dl — definition list */
.work-meta,
.work-links {
    display: grid;
    row-gap: 8px;
}

.work-meta > div,
.work-links > div {
    display: grid;
    grid-template-columns: 64px 1fr;
    column-gap: 20px;
    align-items: start;
    padding: 6px 0;
}

.work-meta dt,
.work-links dt {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding-top: 2px;
}

.work-meta dd,
.work-links dd {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
}

.work-links a {
    color: var(--text);
    border-bottom: 1px solid var(--border-mid);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.work-links a:hover,
.work-links a:focus-visible {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.link-sep {
    color: var(--text-dim);
    margin: 0 8px;
    user-select: none;
}

/* password row */
.link-row--pwd dd {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pwd {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border: 1px solid var(--border-mid);
    background: var(--bg-elev);
    color: var(--accent);
    user-select: all;
}

.copy-btn {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-mid);
    background: transparent;
    border: 1px solid var(--border-mid);
    padding: 5px 12px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.copy-btn:hover,
.copy-btn:focus-visible {
    color: var(--bg);
    background: var(--accent);
    border-color: var(--accent);
}

.copy-btn.is-done {
    color: var(--accent);
    border-color: var(--accent);
}

/* ───────── about ───────── */
.about {
    border-top: 1px solid var(--border);
}

.about-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad-x) clamp(60px, 9vw, 120px);
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}

.about-bio p {
    font-family: var(--font-serif);
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 24px;
    max-width: 620px;
}

.about-tools {
    border-left: 1px solid var(--border-mid);
    padding-left: 24px;
}

.tools-section-label {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 14px;
}

.tools-section-label:not(:first-child) {
    margin-top: 28px;
}

.tools-list {
    display: grid;
    row-gap: 10px;
}

.tools-list > div {
    display: grid;
    grid-template-columns: 100px 1fr;
    column-gap: 16px;
    align-items: start;
    padding: 4px 0;
}

.tools-list dt {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    padding-top: 2px;
}

.tools-list dd {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text);
    margin: 0;
}

.tools-bonus {
    display: grid;
    row-gap: 10px;
}

.tools-bonus li {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text);
    padding-left: 18px;
    position: relative;
}

.tools-bonus li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 600;
}

/* ───────── contact ───────── */
.contact {
    border-top: 1px solid var(--border);
}

.contact-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad-x) clamp(80px, 10vw, 140px);
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}

.contact-cta {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(22px, 3vw, 36px);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 40px;
}

.contact-list {
    display: grid;
    row-gap: 14px;
}

.contact-list li {
    display: grid;
    grid-template-columns: 80px 1fr;
    column-gap: 20px;
    align-items: baseline;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

.contact-list .k {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.contact-list a {
    font-size: 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border-mid);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-list a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.contact-side {
    border-left: 1px solid var(--border-mid);
    padding-left: 24px;
}

.contact-links-title {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.contact-links {
    display: grid;
    row-gap: 12px;
    font-size: 14px;
}

.contact-links a {
    display: inline-block;
    border-bottom: 1px solid var(--border-mid);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-links a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.contact-qr {
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.contact-qr img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    background: #fff;
    padding: 4px;
    border: 1px solid var(--border);
}

.contact-qr p {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    line-height: 1.5;
    max-width: 160px;
}

/* ───────── footer ───────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px var(--pad-x);
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-dim);
}

/* ───────── responsive ───────── */
@media (max-width: 880px) {
    .about-inner,
    .contact-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .works-nav {
        position: static;
        gap: 16px;
        font-size: 12px;
    }

    .work-head {
        grid-template-columns: minmax(40px, 60px) 1fr;
    }

    .work-year {
        grid-column: 2 / -1;
        margin-top: 4px;
    }

    .work-subtitle {
        grid-column: 2 / -1;
    }

    /* Mobile: 所有 work（Featured + AIGC + MV 等）都堆叠 */
    .work {
        grid-template-columns: minmax(40px, 60px) 1fr;
    }
    .work-cover,
    .work-cover--landscape {
        grid-column: 2 / -1;
        max-width: 360px;
    }
    .work-info,
    .work-meta,
    .work-links {
        grid-column: 2 / -1;
    }

    .work-meta > div,
    .work-links > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .about-side,
    .contact-side {
        border-left: none;
        border-top: 1px solid var(--border-mid);
        padding-left: 0;
        padding-top: 32px;
    }

    .section-head {
        grid-template-columns: 1fr auto;
    }

    .section-head .section-num {
        grid-column: 1;
    }

    .section-aside {
        grid-column: 2;
    }
}

@media (max-width: 520px) {
    .nav-primary {
        gap: 16px;
        font-size: 12px;
    }

    .brand {
        font-size: 12px;
    }

    .site-footer {
        flex-direction: column;
    }
}
