/* ==========================================================================
   youfufan.top — shared design system (dark & gold)
   One stylesheet for every page: tokens, base type, header, footer, and the
   components (tiles, buttons, figures, dialog, lightbox). Page layouts are
   grouped at the bottom: hub, résumé, photography, capstone, 404.
   ========================================================================== */

:root {
  --ground:    #0d0f14;               /* page */
  --panel:     #12151d;               /* raised surfaces: dialog, mat tiles */
  --panel-2:   #181c28;
  --ink:       #e8e4dc;               /* text */
  --stone:     #9b978f;               /* captions, secondary text */
  --hairline:  rgba(232, 228, 220, .12);
  --gold:      #c9923a;               /* accent: labels, actions, buttons */
  --gold-hi:   #e5aa56;               /* accent on hover, italic highlights */
  --gold-line: rgba(201, 146, 58, .45);
  --night:     #07080b;               /* lightbox */

  --font: 'Albert Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
          'Noto Sans CJK SC', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Cormorant Garamond', 'Songti SC', 'STSong', 'Noto Serif CJK SC',
          'Noto Serif SC', 'SimSun', Georgia, serif;

  --max:      1280px;
  --pad:      clamp(20px, 3.4vw, 48px);   /* page gutter */
  --gap:      clamp(16px, 1.7vw, 24px);   /* grid gap */
  --section:  clamp(56px, 6vw, 88px);     /* space between sections */
  --header-h: 68px;
  --ease:     cubic-bezier(.2, .7, .2, 1);
}

/* ─── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* film grain — the old site's texture, kept faint */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
/* width/height attributes must not set the used height: let width and
   aspect-ratio drive it. Images that need a fixed height set one by class. */
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
strong { font-weight: 600; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--ground); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.skip-link {
  position: absolute; left: var(--pad); top: -80px; z-index: 210;
  padding: 10px 16px; background: var(--gold); color: var(--ground); font-size: 14px;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* ─── Type ───────────────────────────────────────────────────────────── */
.eyebrow {
  font-size: 12px; font-weight: 500; line-height: 1.4;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold);
}
.display {
  font-family: var(--font-display);
  font-size: clamp(56px, 8.4vw, 124px); font-weight: 300;
  letter-spacing: -.02em; line-height: .9;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.6vw, 80px); font-weight: 300;
  letter-spacing: -.015em; line-height: 1; text-wrap: balance;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.2vw, 46px); font-weight: 400;
  letter-spacing: -.01em; line-height: 1.1; text-wrap: balance;
}
.display em, .page-title em, .section-title em, .brand em { font-style: italic; color: var(--gold-hi); }
.lead {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.9vw, 27px); font-weight: 400;
  line-height: 1.4; text-wrap: pretty;
}
.muted { color: var(--stone); }

.prose { max-width: 40em; font-size: 18px; line-height: 1.75; text-wrap: pretty; color: #d9d5cd; }
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--ink); }
.prose em { font-style: italic; }
.prose a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--gold); }

.link {
  font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  text-decoration-color: var(--gold);
}
.link:hover { color: var(--gold-hi); }

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  border: 1px solid var(--gold); background: var(--gold); color: var(--ground);
  font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--gold-line); }
.btn--ghost:hover { background: transparent; border-color: var(--gold-hi); color: var(--gold-hi); }
.btn .icon { width: 16px; height: 16px; }
.text-btn {
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--stone);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
}
.text-btn:hover { color: var(--ink); }
.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Segmented control — language switches */
.seg { display: inline-flex; border: 1px solid var(--gold-line); }
.seg button {
  min-height: 44px; min-width: 52px; padding: 0 16px;
  border: 0; background: transparent; color: var(--stone);
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--gold-line); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--ground); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 5px 12px; border: 1px solid var(--hairline); font-size: 13px; line-height: 1.4; color: var(--stone); }
.tag--key { border-color: var(--gold-line); color: var(--gold-hi); }

/* Hairline rows: label ↔ value */
.rows { border-bottom: 1px solid var(--hairline); }
.rows > li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 0; border-top: 1px solid var(--hairline); font-size: 15px;
}

/* ─── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(13, 15, 20, .84);
  -webkit-backdrop-filter: saturate(1.2) blur(12px); backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  transition: background-color .3s, border-color .3s;
}
.site-header__inner {
  max-width: var(--max); height: 100%; margin-inline: auto; padding-inline: var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: .01em; white-space: nowrap; }
.site-nav { display: flex; gap: clamp(20px, 2.6vw, 40px); font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.site-nav a { padding: 8px 0; text-underline-offset: 8px; text-decoration-thickness: 1px; text-decoration-color: var(--gold); transition: color .2s; }
.site-nav a:hover { color: var(--gold-hi); }
.site-nav a[aria-current="page"] { color: var(--gold-hi); text-decoration-line: underline; }
.menu-btn {
  display: none; min-height: 44px; padding: 0; border: 0; background: none;
  font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
}
/* Over a hero photo: transparent until the photo scrolls away */
.site-header--overlay:not(.is-solid):not(.menu-open) {
  background: transparent; border-color: transparent; color: #FFFFFF;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.page-solid { padding-top: var(--header-h); }

/* ─── Footer ─────────────────────────────────────────────────────────── */
.site-footer { max-width: var(--max); margin: var(--section) auto 0; padding-inline: var(--pad); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 32px;
  padding: 22px 0 30px; border-top: 1px solid var(--hairline);
  font-size: 13px; line-height: 1.6; color: var(--stone);
}
.site-footer__copy { display: flex; flex-direction: column; gap: 2px; }
.site-footer__badge { display: inline-flex; align-items: center; gap: 8px; transition: color .2s; }
.site-footer__badge:hover { color: var(--ink); }
.site-footer__badge img { width: 16px; height: 18px; }

/* ─── Hero (hub + photography) ───────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  height: 72vh; height: 72svh; min-height: 460px; max-height: 760px;
  background: var(--ground); color: #FFFFFF;
}
.hero__media, .hero__slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; user-select: none; -webkit-user-drag: none;
}
.hero__slide { opacity: 0; transition: opacity 1.6s ease; }
.hero__slide.is-active { opacity: 1; }
/* the photo dissolves into the page below it */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, var(--ground) 0%, rgba(13, 15, 20, .72) 20%, rgba(13, 15, 20, .12) 55%, rgba(13, 15, 20, 0) 70%),
    linear-gradient(to bottom, rgba(13, 15, 20, .55) 0%, rgba(13, 15, 20, 0) 22%);
}
.hero__content { position: absolute; left: 0; right: 0; bottom: clamp(28px, 6vh, 56px); z-index: 1; }
.hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 14px; color: var(--gold-hi); }
.hero__eyebrow::before { content: ""; width: 40px; height: 1px; background: var(--gold); }
.hero__sub { font-size: clamp(15px, 1.3vw, 18px); letter-spacing: .04em; color: rgba(232, 228, 220, .86); }
.hero__cta { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; }
.hero__count { font-size: 13px; letter-spacing: .14em; color: rgba(232, 228, 220, .7); font-variant-numeric: tabular-nums; }

/* ─── Section head (shared by gallery, about, …) ─────────────────────── */
.section { padding-top: var(--section); }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap;
  padding-bottom: 22px; margin-bottom: 36px; border-bottom: 1px solid var(--hairline);
}
.section-head__title { display: flex; flex-direction: column; gap: 12px; }
.section-head__meta { font-size: 14px; color: var(--stone); }

/* ─── Tiles (image + caption) ────────────────────────────────────────── */
.tile {
  display: flex; flex-direction: column; align-items: stretch;
  padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
}
.tile__media { display: block; position: relative; overflow: hidden; background: var(--panel); }
.tile__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92); transition: transform .8s var(--ease), filter .8s var(--ease); }
.tile__media::after { content: ""; position: absolute; inset: 0; border: 1px solid transparent; transition: border-color .4s; pointer-events: none; }
.tile:hover .tile__media img { transform: scale(1.04); filter: saturate(1.05); }
.tile:hover .tile__media::after { border-color: var(--gold-line); }
.tile:focus-visible { outline-offset: 6px; }
.tile__caption { padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.tile__title { font-family: var(--font-display); font-size: clamp(24px, 2vw, 30px); font-weight: 400; line-height: 1.1; }
.tile__desc { max-width: 34em; font-size: 15px; line-height: 1.55; color: var(--stone); }
.tile__action {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  transition: color .2s;
}
.tile__action::after { content: "→"; letter-spacing: 0; transition: transform .3s var(--ease); }
.tile:hover .tile__action { color: var(--gold-hi); }
.tile:hover .tile__action::after { transform: translateX(4px); }

/* ─── Figures ────────────────────────────────────────────────────────── */
.figure figcaption { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--stone); max-width: 46em; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom img { width: 100%; height: auto; }
.figure--plate .zoom { background: #FFFFFF; padding: 6px; }

/* ─── Table ──────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; }
.table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table th {
  padding: 0 16px 12px 0; border-bottom: 1px solid var(--gold-line); text-align: left;
  font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--hairline); }
.table .num, .table th.num { text-align: right; }
.table tr.is-best td { font-weight: 600; color: var(--gold-hi); }
.table tr.is-base td { color: var(--stone); }

/* ─── Dialog (Private Dashboard) ─────────────────────────────────────── */
.dialog {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(5, 6, 9, .72);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: fade-in .2s ease;
}
.dialog__panel {
  width: min(540px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 24px 36px 36px;
  background: linear-gradient(160deg, rgba(201, 146, 58, .07), rgba(201, 146, 58, 0) 45%), var(--panel);
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: rise-in .28s var(--ease);
}
.dialog__top { display: flex; justify-content: space-between; align-items: center; }
.dialog__close {
  width: 44px; height: 44px; margin-right: -12px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--stone); cursor: pointer;
}
.dialog__close:hover { color: var(--ink); }
.dialog__close .icon { width: 20px; height: 20px; stroke-width: 1.4; }
.dialog__title { margin-top: 6px; font-family: var(--font-display); font-size: 36px; font-weight: 400; line-height: 1.15; }
.dialog__text { margin-top: 16px; font-size: 16px; line-height: 1.6; }
.dialog__text + .dialog__text { margin-top: 10px; }
.dialog__actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.dialog__note { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--stone); }
.svc-list { margin-top: 20px; border-bottom: 1px solid var(--hairline); }
.svc-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--hairline); transition: background-color .2s;
}
.svc-list__name { display: block; font-size: 18px; font-weight: 500; }
.svc-list__desc { display: block; font-size: 14px; color: var(--stone); }
.svc-list__open { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.svc-list a:hover .svc-list__open { color: var(--gold-hi); }

/* ─── Lightbox (built by site.js) ────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
  background: rgba(7, 8, 11, .97); color: var(--ink);
  animation: fade-in .2s ease;
}
.lightbox__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding: 8px var(--pad); font-size: 14px;
}
.lightbox__heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; min-width: 0; }
.lightbox__title { font-family: var(--font-display); font-size: 22px; }
.lightbox__count { color: var(--gold); letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.lightbox__close {
  width: 44px; height: 44px; margin-right: -10px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; color: inherit; cursor: pointer;
}
.lightbox__close .icon { width: 22px; height: 22px; stroke-width: 1.4; }
.lightbox__stage { position: relative; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 clamp(8px, 7vw, 104px); }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; padding: 0; border: 1px solid var(--hairline); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(13, 15, 20, .6); color: inherit; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lightbox__nav:hover { border-color: var(--gold); color: var(--gold-hi); }
.lightbox__nav .icon { width: 22px; height: 22px; }
.lightbox__nav--prev { left: clamp(8px, 2vw, 32px); }
.lightbox__nav--next { right: clamp(8px, 2vw, 32px); }
.lightbox__caption { padding: 12px var(--pad) 0; text-align: center; font-size: 14px; line-height: 1.5; color: var(--stone); }
.lightbox__strip { display: flex; gap: 8px; overflow-x: auto; padding: 14px var(--pad) 18px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.lightbox__thumb {
  flex: none; width: 60px; height: 60px; padding: 0; border: 0;
  background: var(--panel-2); opacity: .4; cursor: pointer; transition: opacity .15s;
}
.lightbox__thumb:hover { opacity: .8; }
.lightbox__thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--gold); }
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Motion ─────────────────────────────────────────────────────────── */
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } }

/* Photos settle in as they decode instead of snapping into place. The .js
   guard keeps every image at full opacity when scripting is off, and the
   transition rides on .is-in so the starting state never animates. */
.js .fade-img { opacity: 0; transform: scale(1.015); }
.js .fade-img.is-in {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease), transform 1.4s var(--ease);
}

/* A gold rule draws itself under the hovered nav link. */
.site-nav a { position: relative; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.site-nav a:hover::after { transform: scaleX(1); }
.site-header.menu-open .site-nav a::after { content: none; }

/* Album covers stack two frames so the cover can drift through the album
   while it is hovered or focused (photography/index.html drives the timing). */
.album__cover .album__shot { position: absolute; inset: 0; }
/* outranks .album__cover img, which also sets transition */
.album__cover .album__shot--next {
  opacity: 0;
  transition: opacity .7s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
}
.album__cover .album__shot--next.is-shown { opacity: 1; }
.album__name { transition: color .3s; }
.album:hover .album__name { color: var(--gold-hi); }

/* Photo swaps inside the viewer crossfade rather than flashing. */
.lightbox__img { transition: opacity .35s var(--ease); }
.lightbox__img.is-swapping { opacity: 0; }

/* ==========================================================================
   Page layouts
   ========================================================================== */

/* ─── Hub ────────────────────────────────────────────────────────────── */
.intro { padding-top: var(--section); align-items: start; }
.intro__portrait {
  grid-column: 1 / span 4; width: 100%; aspect-ratio: 1; object-fit: cover;
  outline: 1px solid var(--gold-line); outline-offset: 8px;
}
.intro__body {
  grid-column: 6 / span 7; display: flex; flex-direction: column; gap: 28px;
  /* stretch to the portrait so both columns start and end on the same line */
  align-self: stretch; justify-content: space-between;
}
/* Education-only intro (lead paragraph removed 2026-10): center the two degree rows */
.intro__body--edu { justify-content: center; }
.rows--edu { max-width: 34em; }
.rows--edu > li { display: block; padding: 26px 0; }
.rows--edu .edu-degree {
  display: block; font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 34px); font-weight: 400;
  letter-spacing: -.01em; color: var(--ink); margin-bottom: 8px;
}
.rows--edu .muted { font-size: 16px; }

.hub-tiles { padding-top: var(--section); row-gap: 56px; }
.hub-tiles .tile:nth-child(1) { grid-column: 1 / span 7; }
.hub-tiles .tile:nth-child(2) { grid-column: 8 / span 5; }
.hub-tiles .tile:nth-child(3) { grid-column: 1 / span 5; }
.hub-tiles .tile:nth-child(4) { grid-column: 6 / span 7; }
.tile--tall .tile__media { height: clamp(240px, 27vw, 360px); }
.tile--short .tile__media { height: clamp(210px, 22vw, 300px); }
.tile__media--mat {
  display: flex; flex-direction: column; justify-content: space-between; padding: clamp(24px, 2.6vw, 36px);
  background: radial-gradient(120% 90% at 85% 10%, rgba(201, 146, 58, .16), rgba(201, 146, 58, 0) 60%), var(--panel);
  border: 1px solid var(--hairline);
}
.tile__media--mat .icon { width: 48px; height: 48px; stroke-width: .9; color: var(--gold); }
.tile__media--mat span { font-size: 14px; letter-spacing: .08em; color: var(--stone); }

.contact { padding-top: var(--section); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.contact__list { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 12px; }
.contact__item { padding: 0 clamp(18px, 2.4vw, 32px); font-size: clamp(19px, 1.7vw, 23px); font-weight: 300; line-height: 1.3; transition: color .2s; }
.contact__item + .contact__item { border-left: 1px solid var(--gold-line); }
a.contact__item:hover { color: var(--gold-hi); }

/* ─── Résumé ─────────────────────────────────────────────────────────── */
.cv-head { padding-top: clamp(40px, 5vw, 72px); }
.cv-head__grid { align-items: center; }
.cv-head__text { grid-column: 1 / span 8; display: flex; flex-direction: column; gap: 22px; }
.cv-head__portrait {
  grid-column: 10 / span 3; width: 100%; aspect-ratio: 1; object-fit: cover;
  outline: 1px solid var(--gold-line); outline-offset: 8px;
}
.cv-name .en { font-style: italic; color: var(--gold-hi); }
.cv-contact { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 15px; }
.cv-contact a, .cv-contact span { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.cv-contact a:hover { color: var(--gold-hi); }
.cv-contact .icon { width: 16px; height: 16px; color: var(--gold); }
.cv-toolbar { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cv-toolbar .seg { margin-right: auto; }

.cv-sec { padding-top: clamp(44px, 4.4vw, 64px); }
.cv-sec__grid { border-top: 1px solid var(--gold-line); padding-top: 20px; row-gap: 20px; }
.cv-sec__head { grid-column: 1 / span 3; display: flex; flex-direction: column; gap: 10px; }
.cv-sec__title { display: flex; flex-direction: column; gap: 2px; }
.cv-sec__title .cn { font-family: var(--font-display); font-size: 30px; font-weight: 500; }
.cv-sec__title .en { font-family: var(--font-display); font-size: 20px; font-style: italic; color: var(--stone); }
.cv-sec__body { grid-column: 4 / span 9; }
.bi { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; }
.bi-lang { margin-bottom: 8px; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.bi-lang ~ .bi-lang { margin-top: 18px; }
.bi-col p { font-size: 16px; line-height: 1.75; color: #d9d5cd; text-wrap: pretty; }
.bi-col p + p { margin-top: .9em; }
.bi-col strong { color: var(--ink); }
.bi-col.cn p { line-height: 1.95; }
.xp-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px 32px; padding: 26px 0; border-top: 1px solid var(--hairline); }
.xp-item:first-child { padding-top: 0; border-top: 0; }
.xp-item:last-child { padding-bottom: 0; }
.xp-date { font-size: 14px; line-height: 1.6; color: var(--stone); font-variant-numeric: tabular-nums; }
.xp-date .now { display: block; margin-top: 6px; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.xp-org { font-family: var(--font-display); font-size: 26px; font-weight: 500; line-height: 1.3; }
.xp-org .en { display: block; margin-top: 2px; font-family: var(--font); font-size: 15px; font-weight: 400; color: var(--stone); }
.xp-sub { margin-top: 8px; font-size: 14px; color: var(--stone); }
.xp-sub .t-cn + .t-en::before { content: " · "; }
.xp-body > .bi { margin-top: 20px; }
.xp-body > .tags { margin-top: 20px; }
.key { font-weight: 600; color: var(--gold-hi); }
.award { display: flex; flex-direction: column; gap: 6px; }
.award h3 { font-family: var(--font-display); font-size: 24px; font-weight: 500; line-height: 1.4; }
.award h3 .t-en { display: block; font-family: var(--font); font-size: 15px; font-weight: 400; color: var(--stone); }
.award p { font-size: 15px; color: var(--stone); }
.award p .t-cn + .t-en::before { content: " · "; }

/* Language modes (body.lang-cn / .lang-en / .lang-both) */
body.lang-cn .t-en, body.lang-cn .en, body.lang-cn .bi-col.en { display: none !important; }
body.lang-en .t-cn, body.lang-en .cn, body.lang-en .bi-col.cn { display: none !important; }
body.lang-cn .bi, body.lang-en .bi { grid-template-columns: 1fr; }
body.lang-cn .bi-lang, body.lang-en .bi-lang { display: none; }
body.lang-cn .xp-sub .t-en::before, body.lang-en .xp-sub .t-en::before,
body.lang-cn .award p .t-en::before, body.lang-en .award p .t-en::before { content: none; }
body.lang-en .cv-sec__title .en { font-size: 30px; font-style: normal; font-weight: 500; color: var(--ink); }
body.lang-en .xp-org .en { font-family: var(--font-display); font-size: 26px; font-weight: 500; color: var(--ink); margin-top: 0; }
body.lang-en .award h3 .t-en { font-family: var(--font-display); font-size: 24px; font-weight: 500; color: var(--ink); }

/* ─── Photography ────────────────────────────────────────────────────── */
.year { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.year + .year { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--hairline); }
.year__label {
  grid-column: 1 / span 2; align-self: start; position: sticky; top: calc(var(--header-h) + 24px);
  font-family: var(--font-display); font-size: clamp(40px, 4vw, 60px); font-weight: 300; line-height: 1; color: var(--gold-hi);
}
.year__albums { grid-column: 3 / span 10; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px var(--gap); }
.album { display: flex; flex-direction: column; gap: 14px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.album__cover { display: block; position: relative; aspect-ratio: 1; overflow: hidden; background: var(--panel); }
.album__cover img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92); transition: transform .8s var(--ease), filter .8s var(--ease); }
.album__cover::after { content: ""; position: absolute; inset: 0; border: 1px solid transparent; transition: border-color .4s; }
.album:hover .album__cover img { transform: scale(1.04); filter: saturate(1.05); }
.album:hover .album__cover::after { border-color: var(--gold-line); }
.album:focus-visible { outline-offset: 6px; }
.album__caption { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.album__name { font-family: var(--font-display); font-size: 24px; font-weight: 500; }
.album__meta { font-size: 12px; letter-spacing: .08em; color: var(--stone); white-space: nowrap; }

.seasons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.season { display: flex; flex-direction: column; gap: 12px; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in; }
.season__img { display: block; aspect-ratio: 1; overflow: hidden; background: var(--panel); }
.season__img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92); transition: transform .8s var(--ease), filter .8s var(--ease); }
.season:hover .season__img img { transform: scale(1.04); filter: saturate(1.05); }
.season__cap { display: flex; align-items: baseline; gap: 10px; }
.season__cap .cn { font-family: var(--font-display); font-size: 24px; color: var(--gold-hi); }
.season__cap .en { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); }
.essay-grid { margin-top: clamp(48px, 6vw, 80px); }
.essay { grid-column: 3 / span 8; font-size: 18px; line-height: 2; max-width: none; }
.essay p + p { margin-top: 1.3em; }

/* ─── Capstone ───────────────────────────────────────────────────────── */
.progress { position: fixed; top: 0; left: 0; z-index: 60; height: 2px; width: 0; background: var(--gold); }
.cs-head { padding-top: clamp(40px, 5vw, 72px); }
.cs-head__grid { align-items: end; }
.cs-head__text { grid-column: 1 / span 7; display: flex; flex-direction: column; gap: 24px; }
.cs-head__meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.cs-head__figure { grid-column: 9 / span 4; }
.cs-head__figure .zoom { aspect-ratio: 1; overflow: hidden; outline: 1px solid var(--gold-line); outline-offset: 10px; }
.cs-head__figure img { height: 100%; object-fit: cover; }

.article { padding-top: var(--section); }
.article__grid { align-items: start; }
.toc { grid-column: 1 / span 3; position: sticky; top: calc(var(--header-h) + 32px); }
.toc ol { margin-top: 14px; border-top: 1px solid var(--gold-line); }
.toc a {
  display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--hairline);
  font-size: 14px; line-height: 1.4; color: var(--stone); transition: color .2s;
}
.toc a:hover { color: var(--ink); }
.toc a.is-current { color: var(--gold-hi); font-weight: 500; }
.toc__n { width: 22px; flex: none; font-variant-numeric: tabular-nums; }
.article__body { grid-column: 4 / span 9; }
.cs-sec + .cs-sec { margin-top: clamp(56px, 5vw, 80px); padding-top: clamp(44px, 4vw, 56px); border-top: 1px solid var(--hairline); }
.cs-sec > .section-title { margin: 12px 0 28px; }
.cs-sec .figure { margin-top: 40px; }
.arch { width: 100%; height: auto; padding: clamp(12px, 2vw, 28px); background: #FAFAF8; }
.iter { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--hairline); }
.iter__title { font-family: var(--font-display); font-size: clamp(26px, 2.4vw, 32px); font-weight: 500; margin-bottom: 18px; }
.iter__title .v { font-style: italic; color: var(--gold-hi); }
.fig-pair { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.fig-pair .figure { margin-top: 0; }
.cs-note { margin-top: 16px; font-size: 14px; color: var(--stone); }
.cs-end {
  margin-top: clamp(72px, 7vw, 104px); padding-top: 32px; border-top: 1px solid var(--gold-line);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 32px;
}
.cs-end p { font-size: 14px; color: var(--stone); max-width: 38em; }

/* ─── 404 ────────────────────────────────────────────────────────────── */
.notfound { padding-top: clamp(56px, 8vw, 120px); display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.notfound .lead { max-width: 30em; color: var(--stone); }
.notfound__actions { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .year__label { grid-column: 1 / -1; position: static; margin-bottom: 24px; }
  .year__albums { grid-column: 1 / -1; }
  .essay { grid-column: 2 / span 10; }
  .toc { display: none; }
  .article__body { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .year__albums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-sec__head { grid-column: 1 / -1; }
  .cv-sec__body { grid-column: 1 / -1; }
  .cs-head__text { grid-column: 1 / -1; }
  .cs-head__figure { grid-column: 1 / span 8; margin-top: 48px; }
}
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  body { font-size: 16px; }
  .site-nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .site-header.menu-open .site-nav {
    display: flex; flex-direction: column; gap: 0;
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    padding: 16px var(--pad) 40px; background: var(--ground); overflow-y: auto;
    letter-spacing: 0; text-transform: none;
    animation: fade-in .2s ease;
  }
  .site-header.menu-open .site-nav a {
    padding: 16px 0; border-bottom: 1px solid var(--hairline);
    font-family: var(--font-display); font-size: 38px; font-weight: 400; line-height: 1.1;
  }
  .hero__count { display: none; }

  .intro__portrait { grid-column: 1 / span 8; max-width: 200px; margin: 8px 0 0 8px; }
  .intro__body { grid-column: 1 / -1; margin-top: 36px; gap: 24px; }
  .hub-tiles { row-gap: 44px; }
  .hub-tiles .tile:nth-child(n) { grid-column: 1 / -1; }
  .tile--tall .tile__media { height: 220px; }
  .tile--short .tile__media { height: 190px; }
  .contact { align-items: flex-start; text-align: left; }
  .contact__list { flex-direction: column; align-items: flex-start; row-gap: 0; }
  .contact__item { padding: 0; min-height: 44px; display: flex; align-items: center; font-size: 21px; }
  .contact__item + .contact__item { border-left: 0; }

  .cv-head__text { grid-column: 1 / -1; order: 2; }
  .cv-head__portrait { grid-column: 1 / span 6; max-width: 160px; order: 1; margin: 8px 0 28px 8px; }
  .bi { grid-template-columns: 1fr; gap: 24px; }
  .xp-item { grid-template-columns: 1fr; gap: 8px; }
  .xp-date br { display: none; }
  .xp-date .now { display: inline; margin: 0 0 0 8px; }

  .year + .year { margin-top: 40px; padding-top: 32px; }
  .year__albums { gap: 32px 12px; }
  .album__caption { flex-direction: column; gap: 2px; }
  .album__name { font-size: 20px; }
  .seasons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .essay { grid-column: 1 / -1; font-size: 17px; line-height: 1.95; }

  .cs-head__figure { grid-column: 1 / -1; }
  .prose { font-size: 17px; }
  .fig-pair { grid-template-columns: 1fr; gap: 32px; }
  .lightbox__nav { display: none; }
  .dialog__panel { padding: 20px 24px 28px; }
}

/* Chinese text: no negative tracking, looser leading */
:lang(zh) { letter-spacing: normal; }
.prose:lang(zh) { line-height: 1.95; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ─── Print (résumé): always light, whatever the screen theme ────────── */
@media print {
  @page { size: A4; margin: 14mm; }
  :root {
    --ground: #FFFFFF; --panel: #FFFFFF; --ink: #111111; --stone: #555555;
    --hairline: #DDDDDD; --gold: #7A5A22; --gold-hi: #7A5A22; --gold-line: #C9A56A;
  }
  html, body { background: #FFFFFF; }
  body { font-size: 10pt; padding-top: 0 !important; }
  body::before, .site-header, .skip-link, .cv-toolbar, .site-footer__badge, .progress { display: none !important; }
  .bi-col p { color: #222222; }
  .wrap { padding-inline: 0; }
  .cv-head { padding-top: 0; }
  .cv-head__portrait { outline: none; }
  .cv-name { font-size: 32pt; }
  .cv-sec { padding-top: 16pt; }
  .xp-item, .award { break-inside: avoid; }
  .site-footer { margin-top: 16pt; }
  a { text-decoration: none; }
}
