@property --accent { syntax: "<color>"; inherits: true; initial-value: #9cf6c9; }
@property --accent2 { syntax: "<color>"; inherits: true; initial-value: #f2eddf; }

:root {
  --bg: #06070a;
  --ink: #efeae0;
  --dim: rgba(239, 234, 224, .58);
  --faint: rgba(239, 234, 224, .34);
  --line: rgba(239, 234, 224, .12);
  --glass: rgba(12, 13, 17, .52);
  --accent: #9cf6c9;
  --accent2: #f2eddf;
  --sans: "Inter", "SF Pro Display", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(20px, 6vw, 96px);
  transition: --accent 1.4s var(--ease), --accent2 1.4s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { color: var(--ink); font-family: var(--sans); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; }
body.loading { overflow: hidden; }
::selection { background: var(--accent); color: #06070a; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
kbd { font-family: var(--mono); font-size: .72em; padding: .1em .45em; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.04); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 300; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 16px; }

/* ---------- layers ---------- */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.6s var(--ease); }
body.ready #gl { opacity: 1; }
.gl-fallback { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1s;
  background: radial-gradient(50% 45% at 72% 42%, color-mix(in oklab, var(--accent) 26%, transparent), transparent 70%),
              radial-gradient(40% 40% at 18% 82%, color-mix(in oklab, var(--accent2) 14%, transparent), transparent 70%); }
.no-webgl .gl-fallback { opacity: 1; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, transparent 50%, rgba(0,0,0,.72)); }
.grain { position: fixed; inset: -100px; z-index: 90; pointer-events: none; opacity: .065; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-40px,22px)} 40%{transform:translate(28px,-36px)} 60%{transform:translate(-18px,-12px)} 80%{transform:translate(36px,30px)} 100%{transform:translate(0,0)} }
main { position: relative; z-index: 2; }

/* ---------- preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; flex-direction: column; justify-content: space-between; padding: var(--pad);
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--dim);
  clip-path: inset(0 0 0 0); transition: clip-path 1.1s var(--ease) .1s; }
.preloader.done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.pl-top, .pl-bottom { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.pl-count { font-family: var(--sans); font-weight: 800; font-size: clamp(96px, 22vw, 320px); line-height: .8; letter-spacing: -.06em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pl-bar { width: min(40vw, 420px); height: 1px; background: var(--line); overflow: hidden; }
.pl-bar i { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- cursor ---------- */
.cursor { display: none; }
.fine .cursor { display: block; position: fixed; inset: 0 auto auto 0; z-index: 150; pointer-events: none; mix-blend-mode: difference; }
.fine body, .fine a, .fine button { cursor: none; }
.fine input { cursor: text; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
.cursor-ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid rgba(255,255,255,.7); display: grid; place-items: center; transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s, border-color .3s; }
.cursor-ring span { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: #000; opacity: 0; transition: opacity .2s; }
.cursor.hover .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255,255,255,.12); }
.cursor.label .cursor-ring { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: #fff; border-color: #fff; }
.cursor.label .cursor-ring span { opacity: 1; }
.cursor.down .cursor-ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; }

/* ---------- chrome ---------- */
.progress { position: fixed; left: 0; top: 0; right: 0; height: 2px; z-index: 120; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.topbar { position: fixed; z-index: 110; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 22px var(--pad);
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; mix-blend-mode: difference; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand b { font-family: var(--sans); font-size: 18px; letter-spacing: -.02em; }
.brand span { color: var(--dim); font-size: 10px; }
.topnav { display: flex; gap: clamp(14px, 2.6vw, 40px); }
.topnav a { position: relative; padding: 6px 2px; color: var(--dim); transition: color .3s; }
.topnav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.topnav a:hover, .topnav a.active { color: var(--ink); }
.topnav a:hover::after, .topnav a.active::after { transform: scaleX(1); transform-origin: left; }
.top-right { display: flex; align-items: center; gap: 18px; }
.clock { color: var(--dim); font-variant-numeric: tabular-nums; }
.kbar-btn { display: flex; gap: 4px; padding: 6px; border-radius: 10px; }
.kbar-btn kbd { color: var(--ink); }

.rail { position: fixed; right: calc(var(--pad) * .4); top: 50%; transform: translateY(-50%); z-index: 100; display: flex; flex-direction: column; gap: 14px; }
.rail a { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--faint); }
.rail a span { opacity: 0; transform: translateX(8px); transition: opacity .35s, transform .5s var(--ease); white-space: nowrap; }
.rail a i { width: 18px; height: 1px; background: currentColor; transition: width .5s var(--ease), background .4s; }
.rail a:hover span, .rail a.active span { opacity: 1; transform: none; }
.rail a.active { color: var(--ink); }
.rail a.active i { width: 36px; background: var(--accent); }

/* ---------- typography helpers ---------- */
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.char { display: inline-block; transform: translate3d(0, 108%, 0) rotate(6deg); opacity: 0; transition: transform 1.2s var(--ease), opacity 1.2s var(--ease); transition-delay: calc(var(--i) * 32ms + var(--d, 0ms)); will-change: transform; }
.in .char, .char.in { transform: none; opacity: 1; }
[data-reveal] { opacity: 0; transform: translate3d(0, 36px, 0); filter: blur(6px); transition: opacity 1.1s var(--ease), transform 1.3s var(--ease), filter 1.1s var(--ease); transition-delay: var(--d, 0ms); }
[data-reveal].in { opacity: 1; transform: none; filter: none; }
.sec-index { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--dim); margin-bottom: clamp(28px, 5vh, 56px); }
.sec-index span { color: var(--accent); }
.sec-index::after { content: ""; flex: 0 0 64px; height: 1px; background: var(--line); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--accent); margin-bottom: 18px; }
.h2 { font-size: clamp(36px, 5.4vw, 84px); line-height: 1.04; font-weight: 750; letter-spacing: -.035em; margin-bottom: 28px; }
.h2.big { font-size: clamp(64px, 13vw, 220px); line-height: .86; letter-spacing: -.06em; }
.h2.big .char:nth-child(n+6) { color: var(--accent); text-shadow: 0 0 40px color-mix(in oklab, var(--accent) 50%, transparent); }
.lead { max-width: 640px; font-size: clamp(15px, 1.15vw, 18px); color: var(--dim); margin-bottom: 28px; }
.lead.center { margin-left: auto; margin-right: auto; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--dim); background: rgba(255,255,255,.02); transition: border-color .3s, color .3s; }
.chips li:hover { border-color: var(--accent); color: var(--ink); }
.chips.sm li { font-size: 10px; padding: 4px 10px; }

/* spotlight glass card */
.spot { position: relative; isolation: isolate; background: var(--glass); border: 1px solid var(--line); border-radius: 24px; backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); overflow: hidden; }
.spot::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s; background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--accent) 16%, transparent), transparent 42%); }
.spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--accent), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px var(--pad) clamp(40px, 9vh, 96px); }
.hero-kicker { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--dim); margin-bottom: 22px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.hero-title { font-weight: 850; line-height: .84; letter-spacing: -.055em; }
.hero-title .line:first-child { font-size: clamp(88px, 17vw, 300px); }
.hero-title .en { font-size: clamp(40px, 8.4vw, 150px); color: transparent; -webkit-text-stroke: 1px rgba(239,234,224,.7); letter-spacing: -.03em; margin-top: .08em; }
.hero-title .en .char { color: transparent; }
.hero-role { margin-top: 30px; font-size: clamp(16px, 1.5vw, 22px); color: var(--dim); }
.hero-role b { color: var(--ink); font-weight: 600; font-family: var(--sans); display: inline-block; min-width: 9em; }
.hero-role .sep { color: var(--accent); margin: 0 .4em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 64px); margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 860px; }
.hero-meta span { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--faint); }
.hero-meta strong { font-weight: 600; font-size: 15px; }
.scroll-hint { position: absolute; right: var(--pad); bottom: clamp(40px, 9vh, 96px); display: flex; flex-direction: column; align-items: center; gap: 14px; font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--dim); writing-mode: vertical-rl; }
.scroll-hint i { width: 1px; height: 80px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: drip 2s var(--ease) infinite; }
@keyframes drip { to { top: 110%; } }

/* ---------- marquee ---------- */
.marquee { position: relative; overflow: hidden; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(6,7,10,.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.marquee-track { display: flex; width: max-content; gap: 36px; align-items: center; animation: marquee 38s linear infinite; font-size: clamp(22px, 3vw, 44px); font-weight: 750; letter-spacing: -.02em; white-space: nowrap; }
.marquee-track b { color: var(--accent); font-size: .6em; }
.marquee-track span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1px var(--dim); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.sec { position: relative; min-height: 100vh; padding: clamp(100px, 18vh, 200px) var(--pad); }

.about-grid { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 620px); gap: clamp(32px, 6vw, 96px); align-items: start; }
.portrait { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 5; transform-style: preserve-3d; transition: transform .6s var(--ease); background: #111; }
.portrait img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.4s var(--ease), filter .8s; filter: grayscale(.35) contrast(1.05); }
.portrait:hover img { transform: scale(1.02); filter: none; }
.portrait-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; pointer-events: none; }
.portrait-scan::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(transparent, color-mix(in oklab, var(--accent) 22%, transparent), transparent); animation: scan 4.5s linear infinite; }
@keyframes scan { from { top: -30%; } to { top: 100%; } }
.portrait figcaption { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: rgba(6,7,10,.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.portrait figcaption span { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--accent); }
.portrait figcaption small { font-size: 11px; color: var(--dim); }
.feature-card { padding: 22px 24px; margin: 8px 0 26px; }
.fc-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--accent); }
.feature-card strong { display: block; font-size: 19px; margin: 6px 0 4px; }
.feature-card p { color: var(--dim); font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 28px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--line); }
.facts div { padding: 16px 18px; background: rgba(8,9,12,.72); }
.facts dt { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--faint); }
.facts dd { font-weight: 650; font-size: 16px; }

.num-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.num { padding: clamp(24px, 3vw, 44px); min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end; }
.num strong { font-size: clamp(52px, 6.6vw, 112px); line-height: .9; letter-spacing: -.05em; font-weight: 800; font-variant-numeric: tabular-nums; }
.num strong span { background: linear-gradient(180deg, var(--ink), color-mix(in oklab, var(--accent) 70%, var(--ink))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.num p { margin-top: 14px; color: var(--dim); }
.num small { position: absolute; top: 22px; right: 24px; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--faint); }

/* ---------- horizontal work ---------- */
.h-wrap { position: relative; height: calc(var(--n) * 95vh); }
.h-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 90px var(--pad) 50px; }
.h-head { display: flex; justify-content: space-between; align-items: center; }
.h-head .sec-index { margin-bottom: 26px; }
.h-count { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--dim); }
.h-count b { color: var(--ink); font-size: 22px; }
.h-track { display: flex; gap: clamp(20px, 3vw, 48px); will-change: transform; }
.case { flex: 0 0 min(80vw, 1120px); min-height: min(68vh, 640px); display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(24px, 4vw, 64px); padding: clamp(28px, 3.6vw, 56px); border-radius: 32px; }
.case-top { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--dim); }
.case-top time { margin-left: auto; color: var(--ink); }
.case-no { color: #06070a; background: var(--accent); padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.case h3 { font-size: clamp(40px, 4.8vw, 82px); line-height: .98; letter-spacing: -.045em; margin: 26px 0 14px; font-weight: 800; }
.case h3 em { font-style: normal; color: transparent; -webkit-text-stroke: 1px var(--accent); }
.case-org { font-weight: 600; margin-bottom: 14px; }
.case-main > p:not(.case-org) { color: var(--dim); font-size: 15px; max-width: 560px; }
.points { margin-top: 20px; display: grid; gap: 10px; }
.points li { position: relative; padding-left: 22px; font-size: 14px; }
.points li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--accent); }
.case-side { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; border-left: 1px solid var(--line); padding-left: clamp(20px, 3vw, 44px); }
.metric strong { display: block; font-size: clamp(64px, 8vw, 140px); line-height: .85; letter-spacing: -.06em; font-weight: 850; background: linear-gradient(160deg, var(--ink), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric span { display: block; margin-top: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--dim); }
.mini { display: grid; gap: 10px; }
.mini div { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.mini dd { font-weight: 700; font-size: 18px; }
.mini dt { font-size: 12px; color: var(--dim); }
.flow { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; }
.flow span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; }
.flow i { flex: 1; max-width: 80px; height: 1px; background: linear-gradient(90deg, var(--line), var(--accent)); position: relative; }
.flow i::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: flowdot 1.8s var(--ease) infinite; }
@keyframes flowdot { from { right: 100%; opacity: 0; } 30% { opacity: 1; } to { right: 0; } }
.h-progress { margin-top: 30px; height: 1px; background: var(--line); }
.h-progress i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- education ---------- */
.edu-stack { display: grid; gap: 0; max-width: 820px; border-top: 1px solid var(--line); }
.edu-row { position: relative; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 18px; padding: 24px 6px; border-bottom: 1px solid var(--line); overflow: hidden; }
.edu-row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 16%, transparent), transparent); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.edu-row:hover::before { transform: scaleX(1); }
.edu-row span { font-family: var(--mono); color: var(--accent); }
.edu-row strong { font-size: clamp(20px, 2.2vw, 32px); letter-spacing: -.02em; }
.edu-row small { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--dim); text-align: right; }
.edu-row.award strong { color: var(--accent); }

/* ---------- skills bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.cell { padding: 28px; min-height: 220px; display: flex; flex-direction: column; gap: 10px; transition: transform .6s var(--ease); }
.cell:hover { transform: translateY(-4px); }
.c-wide { grid-column: span 2; }
.c-tall { grid-row: span 2; }
.cell-no { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--accent); }
.cell h4 { font-size: clamp(20px, 1.8vw, 28px); letter-spacing: -.02em; line-height: 1.2; }
.cell p { color: var(--dim); font-size: 14px; }
.big-num { display: block; font-size: clamp(90px, 10vw, 170px); line-height: .85; letter-spacing: -.06em; color: var(--accent); }
.games { margin-top: auto; display: grid; gap: 0; }
.games li { display: flex; justify-content: space-between; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); counter-increment: g; }
.games li span::before { content: "0" counter(g) "  "; font-family: var(--mono); color: var(--faint); font-size: 11px; }
.games small { font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: .1em; }
.pipe { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.pipe i { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--line); position: relative; }
.pipe i:not(:last-child)::after { content: "→"; position: absolute; right: -10px; color: var(--accent); }
.tool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: auto; }
.tool-list div { padding: 14px; border: 1px solid var(--line); border-radius: 14px; transition: border-color .3s, background .3s; }
.tool-list div:hover { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); }
.tool-list strong { display: block; font-size: 16px; }
.tool-list small { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--faint); }
.cell.meta { justify-content: flex-end; background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 12%, rgba(12,13,17,.6)), rgba(12,13,17,.5)); }

/* ---------- markets ---------- */
.market-list { margin: 10px 0 40px; border-top: 1px solid var(--line); }
.mrow { position: relative; display: grid; grid-template-columns: 80px minmax(140px, 1fr) 1fr minmax(120px, 280px); gap: 20px; align-items: center; padding: clamp(18px, 3vh, 30px) 6px; border-bottom: 1px solid var(--line); overflow: hidden; }
.mrow::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: translateY(101%); transition: transform .6s var(--ease); }
.mrow:hover::before { transform: none; }
.mrow:hover, .mrow:hover small, .mrow:hover span { color: #06070a; }
.mrow span { font-family: var(--mono); font-size: 14px; color: var(--accent); transition: color .3s; }
.mrow strong { font-size: clamp(28px, 4vw, 64px); letter-spacing: -.04em; line-height: 1; transition: transform .6s var(--ease); }
.mrow:hover strong { transform: translateX(14px); }
.mrow small { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--dim); transition: color .3s; }
.spark { width: 100%; height: 48px; }
.note { font-size: 12px; color: var(--faint); }

/* ---------- contact ---------- */
.contact { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 110vh; }
.contact .sec-index { justify-content: center; }
.contact-title { font-size: clamp(44px, 7.4vw, 132px); letter-spacing: -.05em; line-height: .98; }
.mega-mail { display: inline-block; margin: 16px 0 44px; font-size: clamp(26px, 5vw, 84px); font-weight: 800; letter-spacing: -.04em; background: linear-gradient(90deg, var(--ink), var(--accent), var(--accent2), var(--ink)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 7s linear infinite; word-break: break-all; }
@keyframes shine { to { background-position: 300% 0; } }
.actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: min(100%, 1080px); }
.act { display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 2px 10px; padding: 20px 22px; border-radius: 18px; }
.act span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--faint); grid-column: 1; }
.act strong { grid-column: 1; font-size: 16px; }
.act b { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 22px; color: var(--accent); transition: transform .5s var(--ease); }
.act:hover b { transform: translate(3px, -3px) rotate(8deg); }
.act.primary { background: color-mix(in oklab, var(--accent) 88%, #000); border-color: transparent; color: #06070a; }
.act.primary span, .act.primary b { color: rgba(6,7,10,.7); }
.footer { position: relative; z-index: 2; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 28px var(--pad) 36px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--faint); }
.footer button:hover { color: var(--accent); }

/* ---------- palette & toast ---------- */
.palette { margin: 14vh auto auto; width: min(620px, calc(100vw - 32px)); background: transparent; border: 0; color: var(--ink); }
.palette::backdrop { background: rgba(3,4,6,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.palette[open] .pal-box { animation: palIn .45s var(--ease); }
@keyframes palIn { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
.pal-box { background: rgba(14,15,19,.92); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 40px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03) inset; }
.pal-input { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.pal-input span { color: var(--accent); font-size: 20px; }
.pal-input input { flex: 1; background: none; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 16px; }
#palList { max-height: 50vh; overflow: auto; padding: 8px; }
#palList li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer; }
#palList li small { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--faint); }
#palList li[aria-selected="true"] { background: color-mix(in oklab, var(--accent) 16%, transparent); }
#palList li[aria-selected="true"] small { color: var(--accent); }
.pal-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--faint); }
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 260; transform: translate(-50%, 30px); opacity: 0; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; transition: opacity .4s, transform .6s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .c-tall { grid-row: auto; }
  .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail { display: none; }
}
@media (max-width: 900px) {
  .topnav { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 380px; }
  .num-grid { grid-template-columns: repeat(2, 1fr); }
  .num { min-height: 170px; }
  .h-wrap { height: auto; }
  .h-sticky { position: relative; height: auto; overflow: visible; padding: 100px var(--pad) 40px; }
  .h-track { flex-direction: column; transform: none !important; }
  .case { flex: auto; grid-template-columns: 1fr; min-height: 0; }
  .case-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 22px; }
  .h-progress, .h-count { display: none; }
  .mrow { grid-template-columns: 48px 1fr; }
  .mrow small { display: none; }
  .mrow .spark { grid-column: 1 / -1; height: 36px; }
  .scroll-hint { display: none; }
}
@media (max-width: 560px) {
  .bento, .num-grid { grid-template-columns: 1fr; }
  .c-wide { grid-column: auto; }
  .facts { grid-template-columns: 1fr; }
  .actions { grid-template-columns: 1fr; }
  .clock { display: none; }
  .edu-row { grid-template-columns: 36px 1fr; }
  .edu-row small { grid-column: 2; text-align: left; }
  .case-top time { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .grain { display: none; }
}

/* screenshot / QA mode: ?instant */
html.instant *, html.instant *::before, html.instant *::after { transition: none \!important; animation: none \!important; }

/* preloader failsafe: never trap visitors if JS/WebGL is slow or blocked */
@keyframes plFailsafe { to { visibility: hidden; pointer-events: none; } }
@keyframes loadFailsafe { to { overflow: auto; } }
.preloader { animation: plFailsafe 0s linear 8s forwards; }
body.loading { animation: loadFailsafe 0s linear 8s forwards; }
html.instant .preloader { display: none !important; }
html.instant body.loading { overflow: auto; }
/* QA: final states for every reveal in ?instant mode */
html.instant .char, html.instant [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
