/* =========================================================
   Clara Zhang — Editorial Minimalism × Modern Academic × Dark Cinematic
   ========================================================= */

:root {
  --charcoal: #17191D;
  --warm-white: #F5F3EF;
  --soft-gray: #A7A9AD;
  --silver: #C8C7C3;
  --burgundy: #552D36;

  --bg: var(--warm-white);
  --bg-alt: #ECE9E3;
  --fg: var(--charcoal);
  --fg-soft: #3E4148;
  --muted: #676A70;           /* text-safe gray on warm white */
  --line: var(--silver);
  --line-strong: #8E8F92;
  --accent: var(--burgundy);
  --accent-soft: rgba(85, 45, 54, .08);
  --ph-a: #E7E4DE;
  --ph-b: #E0DCD5;
  --shadow: 0 30px 60px -30px rgba(23, 25, 29, .25);

  --serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --max: 1320px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--charcoal); --bg-alt: #1E2126; --fg: var(--warm-white); --fg-soft: #D9D7D2;
    --muted: var(--soft-gray); --line: #34373D; --line-strong: #5A5D63;
    --accent: #C2909B; --accent-soft: rgba(194, 144, 155, .1);
    --ph-a: #1F2227; --ph-b: #23262C; --shadow: 0 30px 60px -30px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--charcoal); --bg-alt: #1E2126; --fg: var(--warm-white); --fg-soft: #D9D7D2;
  --muted: var(--soft-gray); --line: #34373D; --line-strong: #5A5D63;
  --accent: #C2909B; --accent-soft: rgba(194, 144, 155, .1);
  --ph-a: #1F2227; --ph-b: #23262C; --shadow: 0 30px 60px -30px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--burgundy); color: var(--warm-white); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--fg); color: var(--bg); padding: 10px 16px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type helpers ---------- */
.kicker {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.kicker .num { color: var(--accent); font-variant-numeric: tabular-nums; }
.kicker::after { content: ""; flex: 0 0 40px; height: 1px; background: var(--line-strong); }
.display { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 1.02; }
.h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
.h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--fg-soft); max-width: 62ch; }
.muted { color: var(--muted); }
.serif-i { font-family: var(--serif); font-style: italic; }
.small { font-size: 13px; }
.label { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.nav { display: flex; gap: clamp(14px, 1.8vw, 28px); }
.nav a { font-size: 13px; letter-spacing: .04em; color: var(--fg-soft); position: relative; padding: 6px 0; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right .35s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav a[aria-current="page"] { color: var(--fg); }
.tools { display: flex; align-items: center; gap: 6px; }
.tool-btn {
  height: 36px; min-width: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; letter-spacing: .08em;
  transition: border-color .2s, background .2s;
}
.tool-btn:hover { border-color: var(--fg); }
.tool-btn svg { width: 16px; height: 16px; }
.menu-btn { display: none; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}

@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column;
  padding: 20px var(--gutter) 40px; opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  overflow-y: auto;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu .top { display: flex; justify-content: space-between; align-items: center; height: calc(var(--header-h) - 20px); }
.mobile-menu ol { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: m; }
.mobile-menu li { border-top: 1px solid var(--line); }
.mobile-menu li:last-child { border-bottom: 1px solid var(--line); }
.mobile-menu ol a { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; font-family: var(--serif); font-size: clamp(1.8rem, 7vw, 2.6rem); line-height: 1.1; }
.mobile-menu a .n { font-family: var(--sans); font-size: 12px; color: var(--accent); width: 24px; }
body.menu-open { overflow: hidden; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.tight { padding: clamp(48px, 6vw, 80px) 0; }
.section.alt { background: var(--bg-alt); }
.section-head { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: clamp(40px, 5vw, 72px); }
@media (min-width: 900px) { .section-head { grid-template-columns: 5fr 7fr; align-items: end; } .section-head .lead { justify-self: end; } }

/* Page header (inner pages) */
.page-head { padding: clamp(56px, 9vw, 130px) 0 clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.page-head .display { max-width: 18ch; }
.page-head .lead { margin-top: 28px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(28px, 4vw, 56px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 4vw, 64px); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 7fr 5fr; align-items: stretch; } }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--fg); margin-bottom: clamp(28px, 4vw, 48px); }
.hero-name { font-size: clamp(4.2rem, 13vw, 11rem); line-height: .86; letter-spacing: -0.035em; font-weight: 500; }
.hero-name .l2 { display: block; padding-left: clamp(0px, 8vw, 140px); font-style: italic; }
.hero-labels { list-style: none; padding: 0; margin: clamp(28px, 3vw, 40px) 0 0; display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero-labels li:not(:last-child)::after { content: "|"; margin: 0 14px; color: var(--line-strong); }
.hero-title { font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 2.9rem); line-height: 1.12; margin: clamp(32px, 4vw, 56px) 0 20px; max-width: 20ch; }
.hero-title em { color: var(--accent); }
.hero-sub { font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--fg-soft); max-width: 52ch; }
.hero-desc { color: var(--muted); max-width: 52ch; font-size: 15px; }
.hero-figure { position: relative; margin: 0; }
.hero-figure .frame { height: 100%; min-height: 420px; }
.hero-figure figcaption { position: absolute; left: 0; bottom: -28px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.motto { margin-top: clamp(72px, 9vw, 120px); font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2.3vw, 1.8rem); text-align: center; color: var(--fg-soft); padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Contents index */
.contents { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .contents { grid-template-columns: repeat(4, 1fr); } }
.contents a { padding: 22px 18px 26px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; transition: color .25s, padding .35s var(--ease); }
.contents a:hover { color: var(--accent); padding-left: 8px; }
.contents .n { font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.contents .t { font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.15; }

/* ---------- Photo frames & placeholders ---------- */
.frame { position: relative; overflow: hidden; background: var(--ph-a); width: 100%; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; filter: saturate(.92) contrast(1.02); }
.frame.zoomable { cursor: zoom-in; }
.frame.zoomable:hover img { transform: scale(1.025); }
.frame.placeholder {
  background: repeating-linear-gradient(135deg, var(--ph-a) 0 14px, var(--ph-b) 14px 15px);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; text-align: center;
}
.frame.placeholder .ph-label { padding: 16px; max-width: 30ch; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); line-height: 1.6; }
.frame.placeholder .ph-label b { display: block; color: var(--fg-soft); font-weight: 500; margin-bottom: 4px; }
.frame-btn { display: block; width: 100%; text-align: left; }

/* ---------- To-be-added note ---------- */
.todo { border-left: 2px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; font-size: 14px; color: var(--muted); font-style: italic; max-width: 70ch; }
.todo::before { content: attr(data-label); display: block; font-style: normal; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.todo-inline { color: var(--muted); font-style: italic; border-bottom: 1px dashed var(--line-strong); }

/* ---------- Badges & tags ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--fg-soft); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.badge.progress::before, .badge.exploration::before { background: var(--accent); animation: pulse 2.4s infinite; }
.badge.completed::before, .badge.seminar::before, .badge.project::before { background: var(--fg); }
@keyframes pulse { 50% { opacity: .3; } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tags li { font-size: 12.5px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 2px; color: var(--fg-soft); }

/* ---------- Project cards ---------- */
.cards { display: grid; gap: clamp(40px, 4vw, 56px) clamp(24px, 3vw, 40px); grid-template-columns: 1fr; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; gap: 18px; }
.card .frame { aspect-ratio: 3 / 2; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.card-meta .num { font-family: var(--serif); font-size: 1.4rem; color: var(--accent); }
.card h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); transition: color .25s; }
.card .cat { font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.card p { color: var(--fg-soft); font-size: 15px; margin: 0; }
.card a.cover { display: block; overflow: hidden; }
.card:hover h3 { color: var(--accent); }
.card:hover .frame img { transform: scale(1.03); }
.arrow-link { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .06em; padding-bottom: 4px; border-bottom: 1px solid currentColor; align-self: flex-start; transition: gap .3s var(--ease), color .2s; }
.arrow-link:hover { gap: 16px; color: var(--accent); }
.card-large { grid-column: 1 / -1; }
@media (min-width: 900px) { .card-large { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; align-items: end; } }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 4vw, 56px); }
.chip { font-size: 13px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; transition: all .2s; }
.chip:hover { border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- Interests ---------- */
.interests { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 700px) { .interests { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .interests { grid-template-columns: repeat(5, 1fr); } }
.interest { padding: 28px 24px 32px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; transition: color .25s; }
@media (min-width: 1100px) { .interest { border-bottom: 0; border-right: 1px solid var(--line); padding: 28px 24px 8px; } .interest:first-child { padding-left: 0; } .interest:last-child { border-right: 0; } }
.interest h3 { font-size: 1.5rem; }
.interest p { font-size: 14.5px; color: var(--muted); margin: 0; }
.interest:hover h3 { color: var(--accent); }

/* ---------- Editorial split ---------- */
.split { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 80px); }
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; }
  .split.rev { grid-template-columns: 7fr 5fr; }
  .split.rev > :first-child { order: 2; }
  .split .sticky { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}
.prose { max-width: 66ch; font-size: 17px; }
.prose p { color: var(--fg-soft); }
.prose p:first-child::first-letter { font-family: var(--serif); float: left; font-size: 4.4em; line-height: .82; padding: 6px 10px 0 0; color: var(--accent); }
.prose.no-drop p:first-child::first-letter { all: unset; }
.pull { font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; margin: 48px 0 0; padding-left: 24px; border-left: 2px solid var(--accent); max-width: 26ch; }

/* Values */
.values { display: grid; grid-template-columns: 1fr; counter-reset: v; }
@media (min-width: 900px) { .values { grid-template-columns: repeat(3, 1fr); } }
.value { padding: 32px 0; border-top: 1px solid var(--fg); }
@media (min-width: 900px) { .value { padding: 32px 32px 0 0; } .value + .value { padding-left: 32px; border-left: 1px solid var(--line); } }
.value .n { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.1rem; }
.value h3 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin: 8px 0 14px; }
.value p { color: var(--fg-soft); margin: 0; max-width: 34ch; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 1fr; gap: 12px 40px; padding: 36px 0; border-top: 1px solid var(--line); }
@media (min-width: 800px) { .tl-item { grid-template-columns: 220px 1fr; } }
.tl-period { font-size: 13px; letter-spacing: .06em; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tl-item h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.tl-item .deg { margin: 6px 0 16px; font-size: 16px; color: var(--fg-soft); }
.tl-item .place { font-size: 13px; color: var(--muted); }

/* Gallery */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(12, 1fr); gap: 16px; } .gallery > * { grid-column: span 4; } .gallery > *:nth-child(5n+1) { grid-column: span 7; } .gallery > *:nth-child(5n+2) { grid-column: span 5; } }
.gallery .frame { height: 100%; min-height: 220px; }
@media (min-width: 900px) { .gallery .frame { min-height: 320px; } }

/* Skills */
.skill-legend { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-bottom: 48px; font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot.applied { background: var(--fg); }
.dot.course { border: 1.5px solid var(--fg); }
.dot.learning { border: 1.5px dashed var(--accent); }
.skill-group { display: grid; grid-template-columns: 1fr; gap: 16px 48px; padding: 40px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .skill-group { grid-template-columns: 4fr 8fr; } }
.skill-group h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }
.skill-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
@media (min-width: 640px) { .skill-list { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.skill-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.skill-list .ev { font-size: 11.5px; color: var(--muted); text-align: right; }
.skill-list .ev a { border-bottom: 1px solid var(--line-strong); }
.skill-list .ev a:hover { color: var(--accent); }

/* Languages */
.lang-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.lang-tab { padding: 14px 22px 16px; font-family: var(--serif); font-size: 1.35rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s; }
.lang-tab:hover { color: var(--fg); }
.lang-tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.lang-panel { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 900px) { .lang-panel { grid-template-columns: 6fr 6fr; } }
.lang-native { font-family: var(--serif); font-size: clamp(4rem, 10vw, 8rem); line-height: 1; color: var(--fg); opacity: .9; }
.lang-level { margin: 18px 0 24px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.cefr { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 8px 0 8px; max-width: 420px; }
.cefr span { font-size: 11px; text-align: center; padding: 8px 0; border: 1px solid var(--line); color: var(--muted); }
.cefr span.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cefr span.target { border: 1px dashed var(--accent); color: var(--accent); }
.focus-list { list-style: none; padding: 0; margin: 0; counter-reset: f; }
.focus-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; counter-increment: f; }
.focus-list li::before { content: counter(f, decimal-leading-zero); font-size: 11px; color: var(--accent); padding-top: 5px; }

.words { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: 1fr; }
@media (min-width: 800px) { .words { grid-template-columns: repeat(3, 1fr); } }
.word { background: var(--bg); padding: 28px; }
.word .w { font-family: var(--serif); font-size: 2rem; }

/* Beyond — magazine features */
.feature { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (min-width: 900px) {
  .feature-grid { grid-template-columns: 6fr 6fr; }
  .feature:nth-of-type(even) .feature-grid > .feature-media { order: 2; }
}
.feature-media { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; align-items: end; }
.feature-media.single { grid-template-columns: 1fr; }
.feature-media .frame:first-child { aspect-ratio: 4/5; }
.feature-media .frame:nth-child(2) { aspect-ratio: 1/1; margin-bottom: 15%; }
.feature-media.single .frame { aspect-ratio: 3/2; }
.feature h2 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 28px; }
.feature .lead { font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.4; color: var(--fg); }
.feature .body { color: var(--fg-soft); max-width: 56ch; }

/* Creative */
.creative-hero { background: #121418; color: var(--warm-white); }
.creative-hero .lead, .creative-hero .kicker { color: #B9B8B4; }
.creative-hero .kicker .num { color: #C2909B; }
.creative-hero .kicker::after { background: #5A5D63; }
.empty { border: 1px solid var(--line); padding: clamp(32px, 5vw, 56px); text-align: center; color: var(--muted); }
.empty .glyph { font-family: var(--serif); font-size: 2.6rem; font-style: italic; color: var(--line-strong); display: block; margin-bottom: 10px; }
.fiction-note { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; padding: 6px 12px; margin-top: 28px; opacity: .8; }
.char-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.char-grid .frame { aspect-ratio: 4/5; margin-bottom: 14px; }

/* Journal */
.journal-tools { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.journal-tools .chips { margin: 0; }
.search { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--fg); padding: 6px 0; min-width: min(320px, 100%); }
.search input { border: 0; background: none; color: var(--fg); font: inherit; font-size: 15px; outline: none; width: 100%; }
.search svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item a { display: grid; grid-template-columns: 1fr; gap: 8px 40px; padding: 32px 0; border-top: 1px solid var(--line); }
@media (min-width: 800px) { .post-item a { grid-template-columns: 160px 1fr 200px; align-items: start; } }
.post-item h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); transition: color .25s; }
.post-item a:hover h2 { color: var(--accent); }
.post-item .ex { color: var(--fg-soft); margin: 10px 0 0; font-size: 15px; }
.post-item .frame { aspect-ratio: 3/2; }
.cat-overview { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); margin-top: 24px; }
@media (min-width: 900px) { .cat-overview { grid-template-columns: repeat(5, 1fr); } }
.cat-overview div { padding: 24px 20px 24px 0; border-bottom: 1px solid var(--line); }
.cat-overview h3 { font-size: 1.3rem; margin-bottom: 8px; }
.cat-overview p { font-size: 13px; color: var(--muted); margin: 0; }

.article-head { padding: clamp(56px, 8vw, 110px) 0 40px; max-width: 900px; }
.article-head h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; margin: 16px 0 24px; }
.article-layout { display: grid; grid-template-columns: 1fr; gap: 48px; padding-bottom: 96px; }
@media (min-width: 1000px) { .article-layout { grid-template-columns: 220px minmax(0, 1fr); } .toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }
.toc ol { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; }
.toc li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.toc li.sub { padding-left: 14px; font-size: 13px; }
.toc a:hover { color: var(--accent); }
.article-body { max-width: 68ch; font-size: 18px; line-height: 1.75; }
.article-body h2 { font-size: 2rem; margin: 2em 0 .6em; scroll-margin-top: calc(var(--header-h) + 20px); }
.article-body h3 { font-size: 1.5rem; margin: 1.6em 0 .5em; scroll-margin-top: calc(var(--header-h) + 20px); }
.article-body a { color: var(--accent); border-bottom: 1px solid currentColor; }
.article-body blockquote { margin: 1.6em 0; padding-left: 24px; border-left: 2px solid var(--accent); font-family: var(--serif); font-style: italic; font-size: 1.4em; line-height: 1.4; }
.article-body img { margin: 2em 0; }
.article-body code { font-family: var(--mono); font-size: .85em; background: var(--bg-alt); padding: 2px 6px; }
.article-body ul, .article-body ol { padding-left: 1.2em; }

/* Project detail */
.proj-head { padding: clamp(48px, 7vw, 100px) 0 40px; }
.proj-head h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1.02; margin: 18px 0 28px; max-width: 16ch; }
.facts { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--fg); margin-top: 40px; }
@media (min-width: 800px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts div { padding: 16px 24px 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 15px; }
.proj-cover { aspect-ratio: 21/9; }
@media (max-width: 700px) { .proj-cover { aspect-ratio: 3/2; } }
.proj-section { display: grid; grid-template-columns: 1fr; gap: 16px 48px; padding: 48px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .proj-section { grid-template-columns: 4fr 8fr; } }
.proj-section h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.proj-section .content { font-size: 17px; color: var(--fg-soft); max-width: 68ch; }
.proj-section .content p:last-child { margin: 0; }
.process { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.process li { counter-increment: p; display: grid; grid-template-columns: 48px 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); }
.process li::before { content: counter(p, decimal-leading-zero); font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.2rem; line-height: 1.4; }
.cases { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: 1fr; }
@media (min-width: 700px) { .cases { grid-template-columns: 1fr 1fr; } }
.case { background: var(--bg); padding: 28px; }
.case h3 { font-size: 1.45rem; margin-bottom: 14px; }
.case dl { margin: 0; font-size: 14.5px; }
.case dt { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-top: 10px; }
.case dd { margin: 2px 0 0; color: var(--fg-soft); }
.next-proj { display: block; padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--fg); }
.next-proj .t { font-family: var(--serif); font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; transition: color .25s; }
.next-proj:hover .t { color: var(--accent); }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--fg); }
.contact-list li { display: grid; grid-template-columns: 1fr; gap: 4px 24px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
@media (min-width: 700px) { .contact-list li { grid-template-columns: 200px 1fr; } }
.contact-list .v { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); word-break: break-word; }
.contact-list a.v:hover { color: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; border: 1px solid var(--fg); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; transition: background .25s, color .25s; }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* CTA */
.cta { text-align: center; padding: clamp(80px, 12vw, 160px) 0; }
.cta h2 { font-size: clamp(2rem, 4.6vw, 3.8rem); max-width: 20ch; margin: 0 auto 40px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 13px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-name { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--fg); line-height: 1; margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-links a:hover { color: var(--fg); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(12, 13, 15, .94); display: none; align-items: center; justify-content: center; padding: 56px 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1400px, 100%); max-height: 100%; object-fit: contain; box-shadow: var(--shadow); }
.lightbox .lb-btn { position: absolute; color: #F5F3EF; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(245,243,239,.3); border-radius: 50%; }
.lightbox .lb-btn:hover { border-color: #F5F3EF; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-cap { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #C8C7C3; font-size: 13px; padding: 0 72px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .mobile-menu, .lightbox { display: none !important; }
}
