/* jackychen.xyz — v2 (2026)
   Warm editorial base · cinematic night sections · small heritage touches. */

:root {
  --paper: #f5f0e6;
  --paper-2: #fbf8f2;
  --ink: #1c1a17;
  --muted: #5e574d;
  --rule: #d9d0c1;
  --accent: #b8391b;
  --accent-strong: #8e2a12;
  --jade: #2f6b5e;
  --seal: #a8322a;

  --night: #0f0e0c;
  --night-2: #1a1815;
  --night-ink: #eee8dd;
  --night-muted: #a8a094;
  --night-rule: #2e2a25;
  --amber: #e9a23b;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --han: "Noto Serif TC", "Songti TC", serif;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 4px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14120f;
    --paper-2: #1c1915;
    --ink: #eee8dd;
    --muted: #aaa194;
    --rule: #35302a;
    --accent: #e8754f;
    --accent-strong: #f39a7c;
    --jade: #74b8a6;
    --night: #0a0908;
    --night-2: #15130f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, video, canvas, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
button { font: inherit; color: inherit; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

/* ---- type helpers ---------------------------------------------------------- */
.eyebrow {
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.scene {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex; gap: 10px; align-items: center;
}
.scene::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.display {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.65; color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }
.section-title { font: 400 clamp(34px, 4.4vw, 52px)/1.05 var(--serif); letter-spacing: -0.015em; }

/* ---- header / footer ------------------------------------------------------- */
.site-header { padding-block: 24px; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-name { font: 600 21px/1 var(--serif); letter-spacing: -0.01em; }
.seal {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  background: var(--seal); color: #f8f1e6;
  border-radius: 3px;
  font: 700 21px/1 var(--han);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #f8f1e6 22%, transparent);
}
.seal--sm { width: 22px; height: 22px; font-size: 13px; box-shadow: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; }
@media (max-width: 480px) { .site-nav { gap: 0 14px; font-size: 14px; } }
.site-nav a { color: var(--ink); text-decoration: none; padding-block: 10px; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }

.site-footer { border-top: 1px solid var(--rule); margin-top: 96px; padding-block: 28px 40px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-footer .made { display: inline-flex; align-items: center; gap: 10px; }


/* ---- reveal-on-scroll (only when JS is running) ------------------------------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- hero -------------------------------------------------------------------- */
.hero { padding-block: clamp(32px, 7vw, 88px) 40px; }
.hero h1 { font-size: clamp(46px, 8.2vw, 104px); max-width: 11.5em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { margin-top: 28px; }
.hero .eyebrow { margin-bottom: 22px; }

/* contact sheet: real photos laid out like a strip of film frames */
.contact-sheet {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.frame { margin: 0; position: relative; }
.frame button { all: unset; cursor: zoom-in; display: block; width: 100%; }
.frame button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.frame img {
  width: 100%; height: 100%; object-fit: cover;
  background: var(--rule);
  filter: saturate(.92) contrast(1.02);
  transition: filter .5s, transform .5s;
}
.frame button:hover img { filter: saturate(1.08); }
.frame figcaption {
  margin-top: 8px;
  font: 500 10.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  display: flex; justify-content: space-between; gap: 8px;
}
.frame--a { grid-column: 1 / span 6; } .frame--a img { aspect-ratio: 3 / 2; }
.frame--b { grid-column: 7 / span 3; } .frame--b img { aspect-ratio: 4 / 5; }
.frame--c { grid-column: 10 / span 3; } .frame--c img { aspect-ratio: 4 / 5; }
@media (max-width: 760px) {
  .frame--a { grid-column: 1 / -1; }
  .frame--b { grid-column: 1 / span 6; }
  .frame--c { grid-column: 7 / span 6; }
}

/* ---- generic section ------------------------------------------------------------ */
.section { padding-block: clamp(64px, 9vw, 120px) 0; }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 46em; }

/* ---- now / saga --------------------------------------------------------------------- */
.now { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .now { grid-template-columns: 1fr; } }
.now-card { border-top: 2px solid var(--ink); padding-top: 22px; display: grid; gap: 18px; }
.now-card h2 { font: 600 clamp(40px, 5vw, 60px)/1 var(--serif); letter-spacing: -0.02em; }
.now-card .tag { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--accent); }
.now-card p { font-size: 18px; }
.now-aside { border-top: 1px solid var(--rule); padding-top: 22px; display: grid; gap: 14px; }
.now-aside p { color: var(--muted); }
.now-aside blockquote { margin: 0; font: italic 400 clamp(22px, 2.4vw, 28px)/1.35 var(--serif); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--ink); border-radius: 999px;
  color: var(--ink); background: transparent; text-decoration: none;
  font: 500 15px/1 var(--sans); cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- index of things made -------------------------------------------------------------- */
.made-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.made-list li { border-bottom: 1px solid var(--rule); }
.made-list a, .made-list .row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 4px 24px; align-items: baseline;
  padding: 18px 0; color: var(--ink); text-decoration: none;
}
.made-list a:hover .title { color: var(--accent); }
.made-list a:hover .arrow { transform: translateX(4px); color: var(--accent); }
.made-list .year { font: 500 13px/1.6 var(--mono); color: var(--muted); }
.made-list .title { font: 400 clamp(22px, 2.4vw, 28px)/1.2 var(--serif); transition: color .2s; }
.made-list .desc { grid-column: 2; font-size: 15.5px; color: var(--muted); max-width: 44em; }
.made-list .kind { font: 500 11px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; display: flex; gap: 10px; align-items: baseline; }
.made-list .arrow { display: inline-block; transition: transform .2s; }
@media (max-width: 640px) {
  .made-list a, .made-list .row { grid-template-columns: 56px minmax(0, 1fr); }
  .made-list .kind { grid-column: 2; grid-row: 3; }
}

/* ---- night sections (film + light) ---------------------------------------------------------- */
.night {
  background: var(--night); color: var(--night-ink);
  margin-top: clamp(80px, 10vw, 140px);
  padding-block: clamp(64px, 9vw, 120px);
  --muted: var(--night-muted);
  --rule: var(--night-rule);
  --accent: var(--amber);
  --accent-strong: #f6c878;
  --ink: var(--night-ink);
}
.night + .night { margin-top: 0; padding-top: 0; }
.night .scene { color: var(--night-muted); }

/* The Light */
.light {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
@media (max-width: 860px) { .light { grid-template-columns: 1fr; } }
.light-stage {
  position: relative;
  background: radial-gradient(120% 80% at 50% 100%, #1b1611 0%, #0b0a09 70%);
  border: 1px solid var(--night-rule);
  border-radius: 6px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  cursor: pointer;
}
.light-stage canvas { width: 100%; height: 100%; }
.light-stage .hud {
  position: absolute; inset: auto 14px 12px 14px;
  display: flex; justify-content: space-between; gap: 12px;
  font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--night-muted);
  pointer-events: none;
}
.light-stage .hint {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--night-ink);
  background: rgba(15, 14, 12, .6); padding: 8px 12px; border-radius: 999px;
  pointer-events: none; transition: opacity .6s;
}
.light-stage.touched .hint { opacity: 0; }
.light-copy { display: grid; gap: 18px; }
.light-copy h2 { font: 400 clamp(40px, 5.4vw, 68px)/1 var(--serif); letter-spacing: -0.02em; }
.light-copy h2 em { color: var(--amber); }
.light-copy p { color: var(--night-muted); }
.light-copy p strong { color: var(--night-ink); font-weight: 500; }
.states { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--night-rule); }
.states li {
  display: grid; grid-template-columns: 22px 110px minmax(0, 1fr); gap: 12px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--night-rule); font-size: 15px; color: var(--night-muted);
  transition: color .3s;
}
.states li .swatch { width: 10px; height: 10px; border-radius: 50%; align-self: center; }
.states li b { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--night-ink); }
.states li.active { color: var(--night-ink); }
.states li.active b { color: var(--amber); }
.light-copy .hold-btn { justify-self: start; border-color: var(--night-ink); color: var(--night-ink); }
.light-copy .hold-btn:hover, .light-copy .hold-btn.pressed { background: var(--amber); border-color: var(--amber); color: #1a1208; }
.fineprint { font-size: 13.5px; color: var(--night-muted); }

/* The real heart: photos + bench-test video */
.heart-real { margin-top: clamp(48px, 7vw, 88px); display: grid; gap: 18px; }
.heart-wide img { aspect-ratio: 4 / 3; }
.heart-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .heart-row { grid-template-columns: 1fr; } }
.heart-day img { aspect-ratio: 960 / 870; }
.heart-stack { display: grid; gap: 18px; }
.heart-video video { width: 100%; aspect-ratio: 1280 / 454; object-fit: cover; background: #000; border-radius: 2px; }
.heart-stack .frame img { aspect-ratio: 4 / 3; }

/* Film reel */
.reel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 900px) { .reel { grid-template-columns: 1fr; max-width: 560px; } }
.film { margin: 0; display: grid; gap: 12px; }
.film-player {
  position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 3px; overflow: hidden;
  border: 1px solid var(--night-rule);
}
.film-player button {
  all: unset; position: absolute; inset: 0; cursor: pointer;
  display: grid; place-items: center;
}
.film-player button:focus-visible { outline: 2px solid var(--amber); outline-offset: -4px; }
.film-player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; filter: grayscale(.25) contrast(1.05); transition: opacity .3s, filter .3s; }
.film-player button:hover img { opacity: .92; filter: none; }
.film-player .play {
  position: relative; z-index: 1;
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(15, 14, 12, .7); border: 1px solid rgba(238, 232, 221, .6);
  display: grid; place-items: center;
}
.film-player .play svg { width: 18px; height: 18px; margin-left: 3px; fill: var(--night-ink); }
.film-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film-player .letterbox { position: absolute; left: 10px; top: 9px; z-index: 1; font: 500 10px/1 var(--mono); letter-spacing: .14em; color: rgba(238,232,221,.8); }
.film figcaption { display: grid; gap: 4px; }
.film .film-title { font: 400 22px/1.25 var(--serif); color: var(--night-ink); }
.film .film-meta { font: 500 11px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--night-muted); }

/* Credits */
.credits { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--night-rule); text-align: center; display: grid; gap: 6px; }
.credits p { font: 500 11px/1.9 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--night-muted); }

/* ---- photo grid ------------------------------------------------------------------------------------------ */
.photo-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.pg-bike { grid-column: 9 / span 4; }
.pg-bike img { aspect-ratio: 2 / 3; object-fit: cover; }
.pg-clouds { grid-column: 1 / span 8; } .pg-clouds img { aspect-ratio: 4 / 3; }
@media (max-width: 760px) {
  .pg-bike, .pg-clouds { grid-column: 1 / -1; }
  .pg-bike img { aspect-ratio: 2 / 3; height: auto; }
}

/* ---- interests ----------------------------------------------------------------------------------- */
.featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
@media (max-width: 860px) { .featured { grid-template-columns: 1fr; } }
.feature { border-top: 2px solid var(--ink); padding-top: 18px; display: grid; gap: 12px; align-content: start; }
.feature .num { font: italic 400 20px/1 var(--serif); color: var(--accent); }
.feature h3 { font: 400 clamp(26px, 2.8vw, 32px)/1.1 var(--serif); letter-spacing: -0.01em; }
.feature p { font-size: 16.5px; color: var(--muted); }
.also { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 32px; }
.also div { border-top: 1px solid var(--rule); padding: 16px 0; display: grid; gap: 4px; }
.also h4 { margin: 0; font: 600 16px/1.3 var(--sans); }
.also p { font-size: 15px; color: var(--muted); line-height: 1.5; }

/* ---- principles -------------------------------------------------------------------------------------- */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; } }
.principle { display: grid; gap: 10px; align-content: start; }
.principle h3 { font: 400 26px/1.15 var(--serif); }
.principle h3 em { color: var(--accent); }
.principle p { font-size: 16px; color: var(--muted); }
.provenance { margin-top: 24px; font: 500 11px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* sonder tooltip-ish definition */
.define { border-bottom: 1px dotted currentColor; cursor: help; position: relative; }

/* ---- archive pull quote -------------------------------------------------------------------------------- */
.pull {
  margin: 0; padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  display: grid; gap: 18px;
}
.pull blockquote { margin: 0; font: 400 clamp(28px, 3.8vw, 46px)/1.18 var(--serif); letter-spacing: -0.01em; max-width: 22em; }
.pull blockquote::before { content: "“"; color: var(--accent); }
.pull blockquote::after { content: "”"; color: var(--accent); }
.pull figcaption { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; font-size: 15px; color: var(--muted); }

/* ---- play + writing cards ----------------------------------------------------------------------------------- */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }
.card { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 6px; padding: clamp(22px, 3vw, 32px); display: grid; gap: 16px; align-content: start; }
.card h3 { font: 400 32px/1.1 var(--serif); }
.mini-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); width: min(100%, 288px); border: 2px solid var(--ink); background: var(--ink); gap: 1px; }
.mini-grid span { aspect-ratio: 1; background: var(--paper-2); display: grid; place-items: center; font: 600 13px/1 var(--sans); color: var(--ink); }
.mini-grid { background: color-mix(in srgb, var(--ink) 35%, var(--paper-2)); }
.mini-grid span:nth-child(9n+4), .mini-grid span:nth-child(9n+7) { border-left: 1.5px solid var(--ink); }
.mini-grid span:nth-child(n+28):nth-child(-n+36), .mini-grid span:nth-child(n+55):nth-child(-n+63) { border-top: 1.5px solid var(--ink); }

/* ---- lightbox ----------------------------------------------------------------------------------------------- */
dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 92vh;
}
dialog.lightbox::backdrop { background: rgba(10, 9, 8, .9); }
dialog.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; }
dialog.lightbox p { color: #d8d0c4; text-align: center; font: 500 12px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-top: 10px; }
dialog.lightbox .close {
  position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.4); color: #fff; cursor: pointer; font-size: 20px;
}

/* ---- prose pages (about / archive) --------------------------------------------------------------------------------- */
.page-head { padding-block: clamp(32px, 6vw, 80px) 24px; display: grid; gap: 18px; }
.page-head h1 { font-size: clamp(44px, 7vw, 88px); }
.prose { max-width: 40em; }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font: 400 clamp(28px, 3.4vw, 38px)/1.15 var(--serif); margin: 1.8em 0 .6em; }
.prose blockquote { margin: 1.4em 0; padding-left: 20px; border-left: 2px solid var(--accent); font-family: var(--serif); font-style: italic; font-size: 1.15em; }

.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 28px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.timeline .when { font: 500 13px/1.7 var(--mono); color: var(--muted); }
.timeline .what { display: grid; gap: 4px; }
.timeline .what b { font-weight: 600; }
.timeline .what span { color: var(--muted); font-size: 16px; }
@media (max-width: 640px) { .timeline li { grid-template-columns: 1fr; } }
