/* ============================================================
   XREAL.CC — 黑盒·自对弈 / Black Box · Self-Play
   Palette: ink #060607 · bone #EDEAE2 · amber #E8A33D · seal #C8502E
   ============================================================ */

/* ---------- fonts ---------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-var.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/plex-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'XR Serif Disp';
  src: url('../fonts/noto-serif-sc-disp.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}

/* ---------- tokens & reset ---------- */
:root {
  --ink: #060607;
  --ink-2: #0b0b0e;
  --ink-3: #121216;
  --bone: #edeae2;
  --bone-dim: #a09c92;
  --bone-faint: #615e56;
  --amber: #e8a33d;
  --amber-dim: rgba(232, 163, 61, 0.55);
  --seal: #c8502e;
  --hairline: rgba(237, 234, 226, 0.08);
  --hair-amber: rgba(232, 163, 61, 0.16);
  --serif: 'XR Serif Disp', 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --sans: 'Space Grotesk', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'PingFang SC', 'Microsoft YaHei', monospace;
  --pad: clamp(20px, 5vw, 72px);
  --sec-gap: clamp(96px, 16vh, 180px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: var(--ink); }

.serif { font-family: var(--serif); font-weight: 640; letter-spacing: 0.02em; }
.mono  { font-family: var(--mono); font-weight: 400; letter-spacing: 0.06em; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
em { font-style: normal; color: var(--amber); }
strong { font-weight: 600; }
code { font-family: var(--mono); font-size: 0.88em; color: var(--amber); }

:focus-visible { outline: 1.5px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

/* film grain */
.grain {
  position: fixed; inset: -50%; z-index: 9; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-2%,2%); }
  40% { transform: translate(2%,-1%); } 60% { transform: translate(-1%,-2%); } 80% { transform: translate(1%,2%); }
}

/* ---------- header ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad);
  background: linear-gradient(to bottom, rgba(6,6,7,0.92), rgba(6,6,7,0.75) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; letter-spacing: 0.14em; }
.brand-piece {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--amber);
  background: conic-gradient(from 220deg, var(--amber) 0 140deg, transparent 140deg);
  box-shadow: 0 0 12px rgba(232,163,61,0.35);
}
.brand-tld { color: var(--bone-faint); }
.site-nav { display: flex; gap: clamp(14px, 3vw, 34px); font-size: 12px; }
.site-nav a { color: var(--bone-dim); padding: 4px 2px; position: relative; transition: color 0.25s; }
.site-nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--amber); transition: right 0.3s cubic-bezier(0.7, 0, 0.3, 1);
}
.site-nav a:hover { color: var(--bone); }
.site-nav a:hover::after { right: 0; }
.lang-switch { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--bone-faint); }
.lang-switch button { color: var(--bone-faint); letter-spacing: 0.08em; padding: 3px 4px; transition: color 0.2s; }
.lang-switch button:hover { color: var(--bone); }
.lang-switch button.is-active { color: var(--amber); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(72px + 4vh) var(--pad) 64px;
  background:
    radial-gradient(1100px 520px at 78% 30%, rgba(232,163,61,0.07), transparent 60%),
    repeating-linear-gradient(to right, transparent 0 119px, rgba(237,234,226,0.025) 119px 120px),
    repeating-linear-gradient(to bottom, transparent 0 119px, rgba(237,234,226,0.025) 119px 120px),
    var(--ink);
}
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 88px); align-items: center;
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--amber); letter-spacing: 0.22em; margin-bottom: 26px; }
.tick { width: 26px; height: 1px; background: var(--amber); display: inline-block; box-shadow: 0 0 8px var(--amber-dim); }
.hero-title {
  font-size: clamp(44px, 7.2vw, 104px);
  line-height: 1.14; font-weight: 760; letter-spacing: 0.01em;
  margin-bottom: 30px;
  text-shadow: 0 0 60px rgba(232,163,61,0.12);
}
html[lang="en"] .hero-title { font-family: var(--sans); font-weight: 640; letter-spacing: -0.015em; line-height: 1.05; }
.hero-sub { max-width: 56ch; color: var(--bone-dim); font-size: clamp(15px, 1.25vw, 17.5px); margin-bottom: 38px; }
.hero-sub strong { color: var(--bone); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; font-size: 14px; letter-spacing: 0.04em;
  border: 1px solid var(--amber); border-radius: 2px;
  transition: transform 0.2s, box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn-solid { background: var(--amber); color: #141006; font-weight: 600; box-shadow: 0 0 24px rgba(232,163,61,0.25); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 6px 34px rgba(232,163,61,0.4); }
.btn-ghost { color: var(--amber); border-color: rgba(232,163,61,0.5); }
.btn-ghost:hover { background: rgba(232,163,61,0.08); transform: translateY(-2px); }

.hero-chips { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; font-size: 11.5px; color: var(--bone-faint); letter-spacing: 0.12em; }
.hero-chips li { display: inline-flex; align-items: center; gap: 8px; }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* board */
.hero-board { display: flex; flex-direction: column; gap: 14px; }
.board-frame {
  border: 1px solid var(--hair-amber);
  background: linear-gradient(160deg, #0b0b0e 0%, #08080a 100%);
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(0,0,0,0.6), 0 0 44px rgba(232,163,61,0.06) inset;
  padding: 12px 14px 10px;
}
.board-hud, .board-foot { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; letter-spacing: 0.14em; color: var(--bone-faint); }
.board-hud { padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
.board-foot { padding-top: 9px; border-top: 1px solid var(--hairline); gap: 12px; }
.hud-live { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--seal); box-shadow: 0 0 9px var(--seal); animation: pulse 1.4s infinite; }
.hud-move { color: var(--bone-dim); }
.hud-last { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-eval { flex: 0 0 84px; height: 3px; background: rgba(237,234,226,0.12); border-radius: 2px; overflow: hidden; }
.hud-eval i { display: block; height: 100%; width: 50%; background: linear-gradient(90deg, var(--seal), var(--amber)); transition: width 0.8s cubic-bezier(0.6, 0, 0.3, 1); }
#jieqi-board { width: 100%; height: auto; display: block; margin: 6px auto; }
.board-note { font-size: 12.5px; color: var(--bone-faint); line-height: 1.7; max-width: 46ch; }

.scroll-cue {
  position: absolute; left: var(--pad); bottom: 26px;
  font-size: 11px; letter-spacing: 0.2em; color: var(--bone-faint);
  display: inline-flex; align-items: center; gap: 10px; transition: color 0.25s;
}
.scroll-cue::before { content: ''; width: 1px; height: 34px; background: linear-gradient(to bottom, transparent, var(--amber)); animation: drip 2s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.scroll-cue:hover { color: var(--amber); }

/* ---------- sections common ---------- */
.section { padding: var(--sec-gap) var(--pad); max-width: 1280px; margin: 0 auto; }
.sec-label {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 11.5px; color: var(--amber); letter-spacing: 0.26em;
  margin-bottom: 34px;
}
.sec-label::before { content: ''; width: 34px; height: 1px; background: var(--hair-amber); align-self: center; }
.sec-label-en { color: var(--bone-faint); letter-spacing: 0.3em; }
.section h2 { font-size: clamp(30px, 4.4vw, 58px); line-height: 1.3; font-weight: 700; margin-bottom: 28px; }
html[lang="en"] .section h2.serif { font-family: var(--sans); letter-spacing: -0.01em; font-weight: 620; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 0.8, 0.3, 1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- thread ---------- */
.statement { max-width: 26em; font-size: clamp(27px, 3.6vw, 49px); }
.statement em { color: var(--amber); }
.thread-grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(30px, 5vw, 72px); margin-top: clamp(30px, 5vh, 56px); align-items: start;
}
.portrait { position: relative; }
.portrait img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(0.92);
  border-radius: 3px;
}
.portrait::after {
  content: ''; position: absolute; inset: 0; border-radius: 3px;
  background: linear-gradient(180deg, rgba(232,163,61,0.12), rgba(6,6,7,0.24) 70%);
  mix-blend-mode: multiply; pointer-events: none;
}
.portrait::before {
  content: ''; position: absolute; inset: -10px 10px 10px -10px; z-index: -1;
  border: 1px solid var(--hair-amber); border-radius: 3px;
}
.portrait figcaption { margin-top: 12px; font-size: 10.5px; letter-spacing: 0.22em; color: var(--bone-faint); }
.thread-bio p { color: var(--bone-dim); margin-bottom: 20px; max-width: 62ch; font-size: 15.5px; }
.thread-bio p em { color: var(--amber); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-top: 30px; }
.facts div { border-top: 1px solid var(--hairline); padding-top: 12px; }
.facts dt { font-size: 10.5px; letter-spacing: 0.2em; color: var(--bone-faint); margin-bottom: 6px; }
.facts dd { font-size: 13px; letter-spacing: 0.04em; color: var(--bone); }
.facts dd.accent { color: var(--amber); }

/* ---------- projects ---------- */
.projects h2 { margin-bottom: clamp(30px, 5vh, 54px); }
.flagship {
  position: relative;
  border: 1px solid var(--hair-amber); border-radius: 4px;
  padding: clamp(24px, 4vw, 48px);
  background:
    radial-gradient(700px 300px at 90% 0%, rgba(232,163,61,0.06), transparent 65%),
    var(--ink-2);
  box-shadow: 0 24px 70px rgba(0,0,0,0.4);
  margin-bottom: 22px;
  overflow: hidden;
}
.flagship::after {
  content: '揭'; position: absolute; right: -0.12em; bottom: -0.34em;
  font-family: var(--serif); font-weight: 900; font-size: clamp(160px, 24vw, 320px);
  color: transparent; -webkit-text-stroke: 1px rgba(232,163,61,0.1);
  pointer-events: none; user-select: none; line-height: 1;
}
.flag-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.proj-index { font-size: 11px; color: var(--bone-faint); letter-spacing: 0.2em; }
.badge {
  font-size: 10px; letter-spacing: 0.18em; color: var(--bone-dim);
  border: 1px solid var(--hairline); padding: 5px 10px; border-radius: 20px; white-space: nowrap;
}
.badge-live { color: var(--amber); border-color: rgba(232,163,61,0.4); }
.flag-name { font-size: clamp(26px, 3.4vw, 42px); font-weight: 700; margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
.flag-code { font-size: 12px; color: var(--amber); letter-spacing: 0.24em; border: 1px solid var(--hair-amber); padding: 4px 9px; border-radius: 2px; }
.flag-desc { color: var(--bone-dim); max-width: 68ch; margin-bottom: 26px; font-size: 15.5px; position: relative; z-index: 1; }
.flag-arch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  font-size: 11px; letter-spacing: 0.16em; color: var(--amber);
  padding: 14px 16px; border: 1px dashed rgba(232,163,61,0.28); border-radius: 3px;
  width: fit-content; margin-bottom: 24px; position: relative; z-index: 1;
  background: rgba(232,163,61,0.03);
}
.flag-arch i { color: var(--bone-faint); font-style: normal; }
.flag-metrics { display: flex; flex-wrap: wrap; gap: 8px 26px; list-style: none; font-size: 11.5px; letter-spacing: 0.1em; color: var(--bone-dim); position: relative; z-index: 1; }
.flag-metrics li::before { content: '▸ '; color: var(--amber); }

.proj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.proj-card {
  border: 1px solid var(--hairline); border-radius: 4px;
  padding: 26px 24px 24px; background: var(--ink-2);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
}
.proj-card:hover { transform: translateY(-5px); border-color: var(--hair-amber); box-shadow: 0 18px 44px rgba(0,0,0,0.45), 0 0 24px rgba(232,163,61,0.05); }
.card-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.proj-link { color: var(--amber); letter-spacing: 0.14em; font-size: 10.5px; opacity: 0.85; transition: opacity 0.2s; }
.proj-link:hover { opacity: 1; text-shadow: 0 0 12px var(--amber-dim); }
.proj-card h3 { font-size: 17.5px; font-weight: 600; letter-spacing: 0.01em; }
.proj-card p { font-size: 13.5px; color: var(--bone-dim); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; }
.tags li { font-size: 9.5px; letter-spacing: 0.14em; color: var(--bone-faint); border: 1px solid var(--hairline); padding: 3px 8px; border-radius: 2px; }
.proj-more {
  align-items: center; justify-content: center; flex-direction: row; gap: 12px;
  color: var(--bone-dim); font-size: 12px; letter-spacing: 0.16em;
  border-style: dashed;
}
.proj-more:hover { color: var(--amber); }
.more-arrow { transition: transform 0.25s; }
.proj-more:hover .more-arrow { transform: translateX(6px); }

/* ---------- facets ---------- */
.facets h2 { max-width: 20em; }
.facets-sub { color: var(--bone-dim); margin-bottom: clamp(36px, 6vh, 64px); max-width: 50ch; }
.piece-row {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 26px);
  perspective: 1200px;
}
.piece { position: relative; aspect-ratio: 1 / 1.38; }
.piece-inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.3, 0.8, 0.3, 1);
  display: block;
}
.piece.is-open .piece-inner { transform: rotateY(180deg); }
.piece-front, .piece-back {
  position: absolute; inset: 0; border-radius: 6px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.piece-front {
  border: 1px solid var(--hair-amber);
  background:
    radial-gradient(closest-side at 50% 44%, rgba(232,163,61,0.13), transparent 72%),
    var(--ink-3);
  box-shadow: 0 14px 34px rgba(0,0,0,0.5) , inset 0 0 0 6px rgba(6,6,7,0.6);
}
.piece-front::before {
  content: ''; width: 52%; aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid rgba(232,163,61,0.5);
  background: repeating-conic-gradient(rgba(232,163,61,0.16) 0 12deg, transparent 12deg 24deg);
  box-shadow: 0 0 22px rgba(232,163,61,0.14);
}
.piece-front::after { content: '?'; position: absolute; font-family: var(--mono); font-size: 11px; color: var(--amber-dim); bottom: 10%; letter-spacing: 0.2em; }
.piece:hover .piece-front::before { box-shadow: 0 0 34px rgba(232,163,61,0.3); }
.piece-back {
  transform: rotateY(180deg);
  border: 1px solid rgba(232,163,61,0.42);
  background: linear-gradient(165deg, #17130c, #0c0b09 70%);
  box-shadow: 0 14px 34px rgba(0,0,0,0.5), 0 0 30px rgba(232,163,61,0.08);
  padding: 12px; text-align: center; gap: 6px;
}
.piece-back b { font-size: clamp(30px, 4.4vw, 58px); font-weight: 800; color: var(--amber); line-height: 1.1; text-shadow: 0 0 24px rgba(232,163,61,0.3); }
.piece-back i { font-style: normal; font-size: 9px; letter-spacing: 0.3em; color: var(--bone-faint); }
.piece-back small { font-size: 11px; line-height: 1.6; color: var(--bone-dim); display: block; }
.facets-hint { text-align: center; margin-top: 30px; font-size: 10.5px; letter-spacing: 0.3em; color: var(--bone-faint); }

/* ---------- photos ---------- */
.photos-sub { color: var(--bone-dim); margin-bottom: clamp(34px, 6vh, 60px); max-width: 60ch; }
.gallery { columns: 3 300px; column-gap: 18px; }
.ph { break-inside: avoid; margin-bottom: 18px; position: relative; cursor: zoom-in; border-radius: 3px; overflow: hidden; }
.ph img {
  width: 100%; border-radius: 3px;
  aspect-ratio: 3 / 2; object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s;
  filter: brightness(0.97);
  background: var(--ink-3);
}
.ph-p img { aspect-ratio: 2 / 3; }
.ph:hover img { transform: scale(1.035); filter: brightness(1.02); }
.ph figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 14px 12px;
  font-size: 10.5px; letter-spacing: 0.18em; color: var(--bone);
  background: linear-gradient(to top, rgba(6,6,7,0.82), transparent);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
}
.ph:hover figcaption { opacity: 1; transform: none; }

/* lightbox */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4,4,5,0.94);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.lightbox figure { max-width: min(92vw, 1400px); max-height: 88vh; display: flex; flex-direction: column; gap: 12px; }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 3px; box-shadow: 0 40px 120px rgba(0,0,0,0.8); }
.lightbox figcaption { font-size: 11px; letter-spacing: 0.2em; color: var(--bone-dim); text-align: center; }
.lb-close { position: absolute; top: 22px; right: 26px; font-size: 12px; letter-spacing: 0.18em; color: var(--bone-dim); padding: 8px; }
.lb-close:hover { color: var(--amber); }
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: var(--bone-dim); padding: 18px 20px;
  transition: color 0.2s, transform 0.2s;
}
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-prev:hover, .lb-next:hover { color: var(--amber); }

/* ---------- endgame ---------- */
.endgame { padding-bottom: 60px; }
.endgame h2 { max-width: 21em; }
.now-list { list-style: none; margin: 30px 0 44px; display: grid; gap: 10px; }
.now-list li { display: flex; gap: 18px; align-items: baseline; font-size: 12.5px; letter-spacing: 0.1em; color: var(--bone-dim); }
.now-list li > span:first-child { color: var(--seal); font-size: 10px; letter-spacing: 0.24em; flex: 0 0 40px; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 20px; }
.email-chip {
  font-size: clamp(22px, 3.6vw, 44px); font-weight: 640; color: var(--bone);
  border-bottom: 2px solid var(--amber);
  padding-bottom: 4px;
  transition: color 0.25s, text-shadow 0.25s;
  word-break: break-all;
}
.email-chip:hover { color: var(--amber); text-shadow: 0 0 30px rgba(232,163,61,0.35); }
.resume-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

.site-foot { margin-top: clamp(70px, 12vh, 120px); border-top: 1px solid var(--hairline); padding-top: 28px; }
.foot-counter { font-size: 11px; letter-spacing: 0.16em; color: var(--bone-faint); margin-bottom: 14px; }
.foot-counter b { color: var(--amber); font-weight: 500; }
.foot-line { font-size: 13px; color: var(--bone-dim); margin-bottom: 8px; }
.foot-credit { font-size: 9.5px; letter-spacing: 0.22em; color: var(--bone-faint); }

/* QA/print mode (?flat): fixed hero height so the page can be captured whole */
html.flat .hero { min-height: 780px; }
html.flat .scroll-cue { display: none; }
html.flat .grain { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding-top: calc(72px + 2vh); }
  .hero-board { max-width: 520px; }
  .piece-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .site-nav { display: none; }
  .thread-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 320px; }
  .proj-grid { grid-template-columns: 1fr; }
  .piece-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .gallery { columns: 2 150px; column-gap: 10px; }
  .ph { margin-bottom: 10px; }
  .ph figcaption { opacity: 1; transform: none; padding: 22px 10px 8px; font-size: 9px; }
  .scroll-cue { display: none; }
  .hero-title { font-size: clamp(40px, 11.5vw, 64px); }
  .email-chip { font-size: clamp(19px, 5.6vw, 30px); }
}
