/* =====================================================================
   style.css — 配色、字體與版面。改配色只要動最上面的 :root
   ===================================================================== */

:root {
  --ink:    #0d0d0c;   /* 底色 */
  --ink-2:  #161614;   /* 面板 */
  --ink-3:  #22221f;
  --paper:  #eeece5;   /* 主要文字 */
  --mute:   #9a978e;   /* 次要文字（對 --ink 對比 7:1） */
  --dim:    #6b6962;   /* 只給裝飾與大字以外不用 */
  --line:   rgba(238, 236, 229, .14);
  --line-2: rgba(238, 236, 229, .28);
  --signal: #d7ff4a;   /* 唯一的飽和色：只給「訊號」與目前狀態 */
  --signal-ink: #141a00;

  --font-sans:  "Geist", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Noto Serif TC", "Songti TC", serif;
  --font-mono:  "Geist Mono", "Noto Sans TC", ui-monospace, monospace;

  --gx: clamp(16px, 4vw, 56px);          /* 左右留白 */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io:  cubic-bezier(.65, 0, .35, 1);
  --header-h: 64px;
}

/* ------------------------------ reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
::selection { background: var(--signal); color: var(--signal-ink); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
:root[lang="zh-TW"] .mono { letter-spacing: .08em; }

.skip-link {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 10px 14px; background: var(--signal); color: var(--signal-ink);
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: none; }

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

/* 游標：只在有滑鼠的裝置啟用（app.js 加 .has-cursor） */
.cursor { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.cursor-dot, .cursor-ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--signal); }
.cursor-ring {
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out),
              background-color .3s, border-color .3s;
}
.cursor-ring em {
  font: 500 11px/1 var(--font-mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase;
  color: var(--signal-ink); opacity: 0; transition: opacity .2s;
}
.cursor.is-link .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--signal); }
.cursor.is-label .cursor-ring { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--signal); border-color: var(--signal); }
.cursor.is-label .cursor-ring em { opacity: 1; }
.cursor.is-label .cursor-dot, .cursor.is-link .cursor-dot { opacity: 0; }
.cursor.is-hidden { opacity: 0; }
.cursor.on-light .cursor-dot { background: var(--ink); }
.cursor.on-light .cursor-ring { border-color: rgba(13,13,12,.35); }
.cursor.on-light.is-link .cursor-ring { border-color: var(--ink); }
.cursor.on-light.is-label .cursor-ring { background: var(--ink); border-color: var(--ink); }
.cursor.on-light .cursor-ring em { color: var(--paper); }

/* ------------------------------ 開場 ------------------------------ */
.loader {
  position: fixed; inset: 0; z-index: 99; background: var(--ink);
  display: grid; place-items: end start; padding: var(--gx);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s var(--ease-io);
}
.no-js .loader, .loader.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.loader-inner { display: grid; gap: 14px; width: min(420px, 100%); }
.loader-label { color: var(--mute); }
.loader-value { font: 400 clamp(64px, 12vw, 160px)/.85 var(--font-serif); font-variant-numeric: tabular-nums; }
.loader-value small { font: 12px var(--font-mono); margin-left: 8px; color: var(--mute); letter-spacing: .04em; }
.loader-bar { height: 1px; background: var(--line); position: relative; overflow: hidden; }
.loader-bar i { position: absolute; inset: 0; background: var(--signal); transform-origin: left; transform: scaleX(0); }

/* ------------------------------ 頁首 ------------------------------ */
.masthead {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  padding: 0 var(--gx);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  mix-blend-mode: difference;   /* 疊在任何底上都看得見 */
  transition: transform .6s var(--ease-out);
}
.masthead.is-hidden { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: -.01em; justify-self: start; min-height: 44px; }
.brand svg { width: 26px; height: 26px; fill: none; stroke: var(--paper); stroke-width: 2.4; stroke-linecap: round; }
.menu { display: flex; gap: 4px; }
.menu a {
  position: relative; padding: 12px 14px; font-size: 14px; color: var(--paper);
  display: inline-flex; align-items: center; min-height: 44px;
}
.menu a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 10px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease-out);
}
.menu a:hover::after, .menu a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.masthead-right { justify-self: end; display: flex; align-items: center; gap: 18px; }
.clock { color: var(--paper); opacity: .7; }
.lang {
  min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid rgba(238,236,229,.35); border-radius: 999px;
  font-size: 13px; color: var(--paper); transition: background-color .3s, color .3s;
}
.lang:hover { background: var(--paper); color: var(--ink); }

/* ------------------------------ Hero ------------------------------ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; align-items: end;
  padding: calc(var(--header-h) + 24px) var(--gx) clamp(28px, 5vh, 56px);
  overflow: hidden; isolation: isolate;
}
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after {   /* 讓底部字的背後稍微壓暗 */
  content: ""; position: absolute; inset: auto 0 0; height: 55%; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, var(--ink) 8%, transparent);
}
.hero-inner { display: grid; gap: clamp(16px, 3vh, 32px); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-kicker { color: var(--mute); display: flex; gap: 10px; align-items: center; }
.hero-alt { color: var(--mute); display: flex; gap: 14px; align-items: baseline; }
.hero-alt [lang] { font: 500 15px/1 var(--font-serif); letter-spacing: .2em; color: var(--paper); text-transform: none; }
.hero-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 rgba(215,255,74,.6); animation: ping 2.4s var(--ease-out) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(215,255,74,.55); } 70%, 100% { box-shadow: 0 0 0 12px rgba(215,255,74,0); } }

.hero-name {
  font: 400 clamp(84px, 27.6vw, 560px)/.8 var(--font-serif);
  letter-spacing: -.035em;
  margin-left: -.04em; padding-bottom: .1em;
  white-space: nowrap;
  display: flex; flex-wrap: wrap; column-gap: .18em;
}
.hero-name .word { display: inline-flex; overflow: hidden; padding: .02em .04em .24em; margin: -.02em -.04em -.24em; }
.hero-name .char { display: inline-block; transform: translateY(105%); transition: transform 1.3s var(--ease-out); transition-delay: calc(var(--i) * 45ms + 150ms); }
.hero-name em { font-style: italic; }
.is-ready .hero-name .char { transform: none; }

.hero-foot {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end;
  border-top: 1px solid var(--line); padding-top: clamp(16px, 2.4vh, 24px);
}
.hero-role { font-size: clamp(20px, 2.1vw, 30px); line-height: 1.2; letter-spacing: -.015em; max-width: 22ch; }
:root[lang="zh-TW"] .hero-role { max-width: 18em; letter-spacing: .02em; }
.hero-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: end; gap: 6px 36px; }
.hero-meta dt { color: var(--mute); font-size: 11px; }
.hero-meta dd { color: var(--paper); text-transform: none; font-size: 13px; letter-spacing: 0; }
.hero-meta div { display: grid; gap: 6px; }
.hero-meta .live dd { color: var(--signal); }
.fade-up { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, .6s); }
.is-ready .fade-up { opacity: 1; transform: none; }

.scroll-cue {
  position: absolute; right: var(--gx); top: calc(var(--header-h) + 24px);
  writing-mode: vertical-rl; display: flex; align-items: center; gap: 12px; color: var(--mute); min-width: 44px;
}
.scroll-cue i { width: 1px; height: 64px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--paper); animation: drip 2.2s var(--ease-io) infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ------------------------------ 共用段落標頭 ------------------------------ */
section { position: relative; }
.section-head {
  display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; align-items: baseline; gap: 16px;
  padding-bottom: clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--line);
}
.section-index { color: var(--signal); }
.section-title { font: 400 clamp(44px, 6.4vw, 104px)/.9 var(--font-serif); letter-spacing: -.025em; }
:root[lang="zh-TW"] .section-title { font-weight: 500; letter-spacing: .02em; font-size: clamp(36px, 5vw, 80px); }
.section-count { color: var(--mute); }
.section-lede { grid-column: 2 / -1; max-width: 46ch; color: var(--mute); font-size: 17px; margin-top: 12px; }
:root[lang="zh-TW"] .section-lede { max-width: 32em; }

/* ------------------------------ Statement ------------------------------ */
.statement { padding: clamp(120px, 22vh, 240px) var(--gx); }
.statement-text {
  font-size: clamp(28px, 4.3vw, 72px); line-height: 1.08; letter-spacing: -.028em; font-weight: 350;
  max-width: 19ch; max-width: min(19ch, 100%);
  text-wrap: balance;
}
.statement-text { max-width: 22ch; }
:root[lang="zh-TW"] .statement-text { font-size: clamp(26px, 3.6vw, 58px); line-height: 1.4; letter-spacing: .02em; max-width: 20em; font-weight: 400; }
.statement-text .w { opacity: .14; transition: opacity .35s linear; }
.statement-text .w.on { opacity: 1; }
.statement-text .em { font-family: var(--font-serif); font-style: italic; color: var(--signal); letter-spacing: -.01em; }
:root[lang="zh-TW"] .statement-text .em { font-style: normal; }

/* ------------------------------ Path（Rate vs. Range） ------------------------------ */
.path { height: 420vh; padding: 0 var(--gx); }
.path-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; grid-template-rows: auto 1fr; gap: clamp(16px, 3vh, 40px);
  padding: calc(var(--header-h) + 8px) 0 clamp(20px, 4vh, 48px);
}
.path-stage { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: clamp(24px, 4vw, 64px); min-height: 0; }
.path-chart { width: 100%; height: 100%; min-height: 0; overflow: visible; }
.path-chart .grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.path-chart .grid .major { stroke: var(--line-2); }
.path-chart text { fill: var(--mute); font: 11px var(--font-mono); letter-spacing: .04em; }
.path-chart .axis-label { fill: var(--dim); text-transform: uppercase; }
.path-chart .trace-bg { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 5; vector-effect: non-scaling-stroke; }
.path-chart .trace { fill: none; stroke: var(--signal); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.path-chart .stop circle { fill: var(--ink); stroke: var(--line-2); stroke-width: 1.5; transition: fill .4s, stroke .4s, r .4s var(--ease-out); vector-effect: non-scaling-stroke; }
.path-chart .stop .halo { fill: none; stroke: var(--signal); opacity: 0; }
.path-chart .stop.reached circle.dot { stroke: var(--signal); }
.path-chart .stop.active circle.dot { fill: var(--signal); stroke: var(--signal); }
.path-chart .stop.active .halo { animation: halo 2s var(--ease-out) infinite; }
@keyframes halo { 0% { opacity: .9; r: 6; } 100% { opacity: 0; r: 30; } }
.path-chart .stop text { fill: var(--mute); transition: fill .4s; font-size: 12px; }
.path-chart .stop.reached text { fill: var(--paper); }

.path-side { display: grid; grid-template-rows: auto 1fr; gap: 24px; min-height: 0; }
.path-readout { display: grid; gap: 10px; color: var(--mute); }
.path-km { font: 400 clamp(64px, 8vw, 132px)/.85 var(--font-serif); letter-spacing: -.03em; color: var(--paper); font-variant-numeric: tabular-nums; }
.path-km small { font: 12px var(--font-mono); letter-spacing: .04em; color: var(--signal); margin-left: 10px; text-transform: uppercase; }
.path-cards { position: relative; align-self: end; min-height: 300px; }
.path-card {
  position: absolute; inset: auto 0 0; display: grid; gap: 14px;
  opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease-out), transform .8s var(--ease-out); pointer-events: none;
}
.path-card.active { opacity: 1; transform: none; pointer-events: auto; }
.path-card.past { transform: translateY(-24px); }
.path-card .pc-top { display: flex; justify-content: space-between; gap: 12px; color: var(--mute); border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.path-card .pc-km { color: var(--signal); }
.path-card h3 { font: 400 clamp(28px, 2.6vw, 42px)/1.05 var(--font-serif); letter-spacing: -.01em; }
:root[lang="zh-TW"] .path-card h3 { font-weight: 500; font-size: clamp(24px, 2.1vw, 34px); line-height: 1.3; }
.path-card p { color: var(--mute); max-width: 42ch; }
.path-card .pc-now { display: inline-flex; align-items: center; gap: 8px; color: var(--signal); }
.path-card .pc-now::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.path-progress { display: flex; gap: 6px; margin-top: 8px; }
.path-progress i { flex: 1; height: 2px; background: var(--line); transition: background-color .4s; }
.path-progress i.on { background: var(--paper); }

/* ------------------------------ Work ------------------------------ */
.work { padding: clamp(120px, 18vh, 200px) var(--gx) clamp(80px, 12vh, 140px); }
.work-item { border-bottom: 1px solid var(--line); }
.work-row {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, .7fr) 64px 40px; align-items: center; gap: 16px;
  padding: clamp(22px, 3.2vw, 40px) 0; position: relative;
}
.work-row::before {   /* 滑過時從左邊長出來的底色 */
  content: ""; position: absolute; inset: 0 calc(var(--gx) * -1); background: var(--ink-2); z-index: -1;
  transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease-out);
}
.work-row:hover::before, .work-item.open .work-row::before { transform: scaleY(1); }
.work-idx { color: var(--dim); transition: color .3s; }
.work-title {
  font: 400 clamp(32px, 4.6vw, 76px)/.95 var(--font-serif); letter-spacing: -.02em;
  transition: transform .7s var(--ease-out), color .3s;
}
:root[lang="zh-TW"] .work-title { font-weight: 500; font-size: clamp(26px, 3.4vw, 56px); line-height: 1.15; letter-spacing: .01em; }
.work-row:hover .work-title { transform: translateX(18px); }
.work-row:hover .work-idx, .work-item.open .work-idx { color: var(--signal); }
.work-kind { color: var(--mute); font-size: 14px; }
.work-year { color: var(--mute); text-align: right; }
.work-plus { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; position: relative; justify-self: end; transition: background-color .3s, border-color .3s, transform .6s var(--ease-out); }
.work-plus::before, .work-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1px; margin: -.5px 0 0 -6px; background: var(--paper); transition: transform .5s var(--ease-out), background-color .3s; }
.work-plus::after { transform: rotate(90deg); }
.work-item.open .work-plus { transform: rotate(180deg); background: var(--signal); border-color: var(--signal); }
.work-item.open .work-plus::before, .work-item.open .work-plus::after { background: var(--signal-ink); }
.work-item.open .work-plus::after { transform: rotate(0deg); }

.work-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .8s var(--ease-out); }
.work-item.open .work-detail { grid-template-rows: 1fr; }
.work-detail > div { overflow: hidden; }
.work-detail-inner {
  display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1fr); gap: 16px 16px;
  padding: 8px 0 clamp(32px, 4vw, 56px);
  opacity: 0; transform: translateY(-10px); transition: opacity .5s, transform .8s var(--ease-out);
}
.work-item.open .work-detail-inner { opacity: 1; transform: none; transition-delay: .12s; }
.work-art-inline { grid-column: 2; aspect-ratio: 4 / 3; background: var(--ink-2); border: 1px solid var(--line); }
.work-art-inline svg { width: 100%; height: 100%; }
.work-copy { grid-column: 3; display: grid; gap: 20px; align-content: start; padding-left: clamp(0px, 2vw, 32px); }
.work-summary { font-size: 18px; line-height: 1.5; }
.work-points { display: grid; gap: 10px; color: var(--mute); }
.work-points li { display: grid; grid-template-columns: 18px 1fr; }
.work-points li::before { content: "→"; color: var(--signal); }
.work-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.work-tags span { border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; color: var(--mute); }
.work-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* 滑過時跟著游標的預覽（桌機） */
.work-preview {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  width: clamp(280px, 26vw, 420px); aspect-ratio: 4 / 3;
  background: var(--ink-2); border: 1px solid var(--line-2);
  opacity: 0; transform: translate(-50%, -50%) scale(.85); transition: opacity .35s, scale .5s var(--ease-out);
  overflow: hidden; display: none;
}
.has-cursor .work-preview { display: block; }
.work-preview.on { opacity: 1; }
.work-preview svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .35s; }
.work-preview svg.on { opacity: 1; }

/* 生成圖的共用樣式 */
.art .a-grid { stroke: rgba(238,236,229,.08); stroke-width: 1; }
.art .a-line { fill: none; stroke: var(--paper); stroke-width: 1.5; }
.art .a-faint { fill: none; stroke: rgba(238,236,229,.32); stroke-width: 1.2; }
.art .a-sig { fill: none; stroke: var(--signal); stroke-width: 2; }
.art .a-fill { fill: var(--signal); }
.art .a-box { fill: none; stroke: rgba(238,236,229,.38); }
.art .a-boxon { fill: rgba(215,255,74,.14); stroke: var(--signal); }
.art text { fill: var(--mute); font: 10px var(--font-mono); letter-spacing: .05em; }
.art .t-sig { fill: var(--signal); }
.art .draw { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); }
.on .art .draw, .art.on .draw, .work-item.open .art .draw { animation: draw 1.6s var(--ease-out) forwards; animation-delay: var(--dl, 0s); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ------------------------------ 按鈕 ------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border: 1px solid var(--line-2); border-radius: 999px; font-size: 15px;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease-out), border-color .45s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--paper); border-radius: inherit;
  transform: translateY(101%); transition: transform .55s var(--ease-out);
}
.btn:hover { color: var(--ink); border-color: var(--paper); }
.btn:hover::before { transform: none; }
.btn .arr { transition: transform .45s var(--ease-out); }
.btn:hover .arr { transform: translate(3px, -3px); }
.btn.primary { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
.btn.primary::before { background: var(--paper); }

/* ------------------------------ Stats ------------------------------ */
.stats { padding: 0 var(--gx); }
.stats-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-list li { padding: clamp(28px, 4vw, 56px) clamp(12px, 2vw, 28px); display: grid; gap: 14px; align-content: space-between; min-height: clamp(180px, 22vw, 300px); }
.stats-list li + li { border-left: 1px solid var(--line); }
.stat-num { font: 400 clamp(60px, 8.4vw, 148px)/.85 var(--font-serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-num sup { font-size: .38em; vertical-align: top; position: relative; top: .25em; margin-left: .04em; color: var(--signal); letter-spacing: 0; }
.stat-label { color: var(--mute); max-width: 18ch; font-size: 15px; min-height: 3.1em; }

/* ------------------------------ About ------------------------------ */
.about { padding: clamp(120px, 18vh, 200px) var(--gx); }
.about-grid { display: grid; grid-template-columns: 80px minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; padding-top: clamp(32px, 5vw, 64px); }
.about-body { grid-column: 2; font-size: clamp(22px, 2.3vw, 34px); line-height: 1.25; letter-spacing: -.015em; max-width: 26ch; text-wrap: pretty; }
:root[lang="zh-TW"] .about-body { line-height: 1.6; letter-spacing: .02em; max-width: 20em; font-size: clamp(20px, 1.9vw, 28px); }
.about-cols { grid-column: 3; display: grid; gap: 48px; padding-left: clamp(0px, 2vw, 32px); }
.about-sub { color: var(--signal); margin-bottom: 12px; font-weight: 400; }
.about-dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.about-dl dt { color: var(--mute); font-size: 14px; }
.about-dl dd { font-size: 15px; }
.about-dl a { border-bottom: 1px solid var(--line-2); transition: border-color .3s, color .3s; }
.about-dl a:hover { color: var(--signal); border-color: var(--signal); }

/* ------------------------------ 進場動畫 ------------------------------ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.line-reveal { transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-io); }
.line-reveal.in { transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ------------------------------ Contact / Footer ------------------------------ */
.contact { position: relative; padding: clamp(40px, 8vh, 80px) 0 0; background: var(--paper); color: var(--ink); overflow: hidden; }
.contact ::selection { background: var(--ink); color: var(--paper); }
.marquee { overflow: hidden; border-bottom: 1px solid rgba(13,13,12,.15); padding-bottom: clamp(20px, 3vh, 32px); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span {
  font: 400 clamp(56px, 9vw, 150px)/1 var(--font-serif); letter-spacing: -.03em; white-space: nowrap; padding-right: .4em;
  display: inline-flex; align-items: center; gap: .4em;
}
.marquee-track span i { width: .32em; height: .32em; border-radius: 50%; background: var(--ink); display: inline-block; }
.marquee-track span:nth-child(even) { font-style: italic; }
@keyframes marquee { to { transform: translateX(-50%); } }
.contact-inner { padding: clamp(56px, 10vh, 120px) var(--gx); display: grid; gap: 28px; }
.contact-kicker { color: rgba(13,13,12,.6); }
.contact-title { font: 400 clamp(38px, 7.6vw, 140px)/.95 var(--font-serif); letter-spacing: -.03em; overflow-wrap: anywhere; }
.mail-link { background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .8s var(--ease-out); padding-bottom: .04em; }
.mail-link:hover { background-size: 100% 2px; }
.mail-link em { font-style: italic; }
.contact-body { max-width: 42ch; font-size: 18px; color: rgba(13,13,12,.72); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact .btn { border-color: rgba(13,13,12,.25); }
.contact .btn::before { background: var(--ink); }
.contact .btn:hover { color: var(--paper); border-color: var(--ink); }
.contact .btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.contact .btn.primary::before { background: var(--signal); }
.contact .btn.primary:hover { color: var(--signal-ink); }
.colophon {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 22px var(--gx) calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(13,13,12,.15);
  color: rgba(13,13,12,.62); text-transform: none; letter-spacing: 0;
}
.colophon a { color: var(--ink); border-bottom: 1px solid rgba(13,13,12,.3); display: inline-flex; min-height: 24px; align-items: center; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 96; padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--paper); border: 1px solid var(--line-2);
  transform: translate(-50%, calc(100% + 40px)); visibility: hidden;
  transition: transform .6s var(--ease-out), visibility 0s .6s;
}
.toast.on { transform: translate(-50%, 0); visibility: visible; transition: transform .6s var(--ease-out); }

/* ------------------------------ 響應式 ------------------------------ */
@media (max-width: 1100px) {
  .hero-foot { grid-template-columns: 1fr; }
  .hero-meta { justify-content: start; }
  .work-row { grid-template-columns: 56px minmax(0, 1fr) 56px 40px; }
  .work-kind { display: none; }
  .work-detail-inner { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); }
  .section-head { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .about-grid { grid-template-columns: 56px minmax(0, 1fr); }
  .about-cols { grid-column: 2; padding-left: 0; grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-list li:nth-child(3) { border-left: 0; }
  .stats-list li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --header-h: 56px; }
  .menu { display: none; }
  .masthead { grid-template-columns: 1fr auto; }
  .clock { display: none; }
  .hero-name { font-size: 43vw; line-height: .8; white-space: normal; flex-direction: column; }
  .hero-name .word + .word { margin-top: -.02em; }
  .contact-title { font-size: 7.9vw; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-meta div:last-child { grid-column: 1 / -1; }
  .scroll-cue { display: none; }
  .section-head { grid-template-columns: 1fr auto; }
  .section-index { grid-row: 1; }
  .section-title { grid-column: 1 / -1; }
  .section-count { grid-row: 1; grid-column: 2; }
  .section-lede { grid-column: 1 / -1; }

  .path { height: 520vh; }
  .path-stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; }
  .path-cards { min-height: 236px; align-self: stretch; }
  .path-side { gap: 8px; }
  .path-readout { grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; }
  .path-readout .mono { order: 2; }
  .path-km { font-size: 44px; }
  .path-card p { font-size: 15px; }

  .work-row { grid-template-columns: 36px minmax(0, 1fr) 40px; gap: 12px; }
  .work-year { display: none; }
  .work-row:hover .work-title { transform: none; }
  .work-detail-inner { grid-template-columns: 1fr; }
  .work-art-inline, .work-copy { grid-column: 1; padding-left: 0; }

  .about-grid { grid-template-columns: 1fr; }
  .about-body, .about-cols { grid-column: 1; }
  .about-cols { grid-template-columns: 1fr; gap: 40px; }
  .about-dl > div { grid-template-columns: 96px 1fr; }

  .stats-list li { min-height: 160px; }
  .stat-num { font-size: clamp(52px, 15vw, 80px); }
  .colophon { flex-direction: column; }
}

/* ------------------------------ 減少動態 ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .grain { animation: none; }
  .marquee-track { animation: none; }
  .statement-text .w { opacity: 1; }
  .art .draw { stroke-dashoffset: 0; }
}

/* ------------------------------ 列印 ------------------------------ */
@media print {
  .grain, .cursor, .loader, .masthead, .field, .scroll-cue, .marquee, .work-preview, .toast { display: none !important; }
  body, .contact { background: #fff; color: #000; }
  .path { height: auto; }
  .path-sticky { position: static; height: auto; }
  .statement-text .w, .reveal { opacity: 1 !important; transform: none !important; }
  .work-detail { grid-template-rows: 1fr; }
  .work-detail-inner { opacity: 1; transform: none; }
}

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
