/* Layout: X-style left rail + wide main column; hero, then the line-drawn
   archive shelf, then plain-reading sections (the "list" view). */
:root {
  --bg: #ffffff;
  --fg: #0f1419;
  --muted: #5d6770;
  --line: #0f1419;
  --panel: #f1f2f3;
  --hair: #e2e5e8;
  --accent: #ff6b1a;
  --accent-2: #ffbb2e;
  --font: "Geist", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, "PingFang SC", "Noto Sans SC", monospace;
  --stroke: 1.5px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --fg: #eceff1; --muted: #8e979f; --line: #d6dbdf;
    --panel: #15181b; --hair: #2a2f34; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --fg: #eceff1; --muted: #8e979f; --line: #d6dbdf;
  --panel: #15181b; --hair: #2a2f34; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 40px;
  padding: 40px 24px 28px max(28px, env(safe-area-inset-left, 0px));
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 500; }
.brand-icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  text-decoration: none; color: var(--muted); padding: 8px 0; font-size: 17px; transition: color .15s;
}
.side-nav a:hover, .side-nav a.is-current { color: var(--fg); }
.side-nav a.is-current { font-weight: 500; }
.profile { margin-top: auto; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--fg); color: var(--bg); font-weight: 600;
}
.profile-text { display: flex; flex-direction: column; line-height: 1.25; font-size: 14px; }
.profile-text span { color: var(--muted); }

.topbar { display: none; }

.main {
  padding-block: 64px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(32px, env(safe-area-inset-right, 0px));
  max-width: 1240px;
  min-width: 0;
}

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.h-strong, .h-soft { display: block; letter-spacing: -0.035em; line-height: 1.04; }
.h-soft { color: var(--muted); }
h1 { font-size: clamp(38px, 5.4vw, 64px); }
h2 { font-size: clamp(30px, 3.6vw, 44px); }
.mark { position: relative; white-space: nowrap; }
.mark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.06em; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 55%, var(--hair));
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px; align-items: end; margin-bottom: 56px;
}
.hero-side { display: flex; flex-direction: column; gap: 14px; max-width: 46ch; color: var(--fg); }
.hero-side p { color: var(--muted); }
.hero-side .hero-belief { color: var(--fg); font-weight: 500; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px;
  text-decoration: none; font-weight: 500; font-size: 15px; transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--fg); color: var(--bg); }
.btn-soft { background: var(--panel); color: var(--fg); }

/* ---------- Cabinet ---------- */
.shelf-section { margin-bottom: 28px; }
.cabinet {
  border: var(--stroke) solid var(--line);
  padding: 6px;
  user-select: none;
}
.cabinet-inner { border: var(--stroke) solid var(--line); }
.compartment { position: relative; height: 244px; overflow: visible; }
.board { height: 9px; border-top: var(--stroke) solid var(--line); border-bottom: var(--stroke) solid var(--line); background: var(--bg); position: relative; z-index: 4; }
.room { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.room .wall { fill: var(--panel); stroke: var(--line); stroke-width: var(--stroke); vector-effect: non-scaling-stroke; }
.room .back { fill: var(--bg); stroke: var(--line); stroke-width: var(--stroke); vector-effect: non-scaling-stroke; }

.row {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: space-evenly; gap: 12px;
  padding: 0 4% 0;
}

.item { position: relative; flex: none; transition: opacity .3s ease, filter .3s ease; }
.cabinet.focus .item:not(.is-active) { opacity: .3; }
.cabinet.focus .item.word { opacity: .3; }

/* Box */
.box {
  --fh: 84px;
  display: block; width: clamp(150px, 16vw, 236px); height: 196px;
  text-decoration: none; color: var(--fg); cursor: pointer; margin-bottom: -1px;
}
.box-back {
  position: absolute; left: 18px; right: -18px; bottom: 16px; height: var(--fh);
  border: var(--stroke) dashed var(--line); border-left: 0;
}
.box-front {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--fh); z-index: 3;
  background: var(--panel); border: var(--stroke) solid var(--line);
  display: grid; place-items: center; padding: 6px 10px; text-align: center;
  font-size: 16px; line-height: 1.25;
}
.box-art {
  position: absolute; left: 10%; right: 12%; bottom: calc(var(--fh) - 26px); height: 78px; z-index: 2;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.card {
  position: absolute; bottom: 0; background: var(--bg); border: var(--stroke) solid var(--line);
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.box.is-active .box-art { transform: translateY(-24px); }
.box.is-active .card:nth-child(1) { transform: rotate(-4deg) translateY(-4px); }
.box.is-active .card:nth-child(2) { transform: rotate(2deg) translateY(-10px); }
.box.is-active .card:nth-child(3) { transform: rotate(5deg) translateY(-2px); }

/* card art details */
.bar { position: absolute; height: 4px; border-radius: 2px; background: var(--hair); }
.dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--hair); }
.card.phone { border-radius: 9px; }
.card.phone::before { content: ""; position: absolute; top: 4px; left: 50%; width: 14px; height: 3px; margin-left: -7px; border-radius: 2px; background: var(--line); }
.card .num { position: absolute; left: 10px; top: 8px; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.card.film { border-style: solid; }
.card.film::before, .card.film::after {
  content: ""; position: absolute; left: 4px; right: 4px; height: 0; border-top: 3px dotted var(--line);
}
.card.film::before { top: 4px; } .card.film::after { bottom: 4px; }
.seal { position: absolute; width: 20px; height: 20px; border-radius: 50%; border: var(--stroke) solid var(--line); }
.sign { position: absolute; font-family: var(--mono); font-size: 12px; }

/* Book */
.book { width: 44px; height: var(--bh, 150px); }
.book-front { position: absolute; inset: 0; background: var(--bg); border: var(--stroke) solid var(--line); z-index: 2; }
.book-back { position: absolute; left: 12px; right: -12px; top: -12px; bottom: 6px; border: var(--stroke) dashed var(--line); border-left: 0; border-bottom: 0; }

/* Name words */
.word { height: 96px; margin-bottom: 2px; cursor: default; }
.word svg { height: 100%; width: auto; display: block; overflow: visible; }
.word text { font-family: var(--font); font-weight: 800; font-size: 100px; letter-spacing: 2px; stroke-linejoin: round; transition: fill .35s, stroke .35s; }
.word .w-back { fill: none; stroke: var(--line); stroke-width: 1.6px; }
.word .w-front { fill: var(--bg); stroke: var(--line); stroke-width: 1.6px; }
.cabinet.lit .word { opacity: 1 !important; }
.cabinet.lit .word .w-front { fill: var(--fg); }
.cabinet.lit .word .w-back { stroke: var(--accent); }

.shelf-hint { margin-top: 14px; color: var(--muted); font-size: 14px; }
.shelf-hint a { color: var(--fg); }

/* ---------- Sections ---------- */
.section { padding-top: 88px; border-top: 1px solid var(--hair); margin-top: 72px; scroll-margin-top: 24px; }
#overview { margin-top: 48px; }
.section-head { margin-bottom: 36px; }
.prose { display: flex; flex-direction: column; gap: 14px; max-width: 62ch; }
.prose p { color: var(--muted); }
.prose p:first-child { color: var(--fg); font-size: 18px; }
.fine { margin-top: 20px; font-size: 13px; color: var(--muted); max-width: 70ch; }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 44px; }
.fact { background: var(--panel); border-radius: 20px; padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fact-value { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.fact-label { color: var(--muted); font-size: 15px; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; }
.roles { margin: 0; display: flex; flex-direction: column; }
.roles div { padding: 16px 0; border-top: 1px solid var(--hair); display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 16px; }
.roles div:last-child { border-bottom: 1px solid var(--hair); }
.roles dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding-top: 3px; }
.roles dd { margin: 0; color: var(--muted); }

/* Status pills */
.status {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
}
.status.published { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.status.published::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.status.concept, .status.planning { border-style: dashed; color: var(--muted); border-color: var(--muted); }
.status.experimental::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; color: var(--muted); background: var(--panel); padding: 3px 10px; border-radius: 999px; }

.link-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.link-note { font-size: 13px; color: var(--muted); }

/* Featured project */
.featured {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px;
  background: var(--panel); border-radius: 28px; padding: 36px; margin-bottom: 28px;
}
.featured-text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.featured-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.featured h3 { font-size: 40px; letter-spacing: -0.035em; line-height: 1; }
.kind { color: var(--muted); }
.featured p { color: var(--muted); max-width: 56ch; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.shot {
  border: 1.5px dashed var(--muted); border-radius: 18px; aspect-ratio: 9 / 19; max-width: 100%;
  display: grid; place-items: center; padding: 10px; text-align: center;
  font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--bg);
}
.shot.wide { aspect-ratio: 4 / 3; border-radius: 14px; }
.shot small { display: block; margin-top: 4px; opacity: .75; }

/* File list (projects) */
.file-list { border-top: var(--stroke) solid var(--line); }
.file { border-bottom: 1px solid var(--hair); }
.file summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) 120px 140px 24px; gap: 16px; align-items: center;
  padding: 20px 4px;
}
.file summary::-webkit-details-marker { display: none; }
.file-name { display: flex; flex-direction: column; min-width: 0; }
.file-name strong { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.file-name span { color: var(--muted); font-size: 14px; }
.file-years { font-family: var(--mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chev { width: 20px; height: 20px; transition: transform .25s; stroke: currentColor; fill: none; stroke-width: 1.6; }
.file[open] .chev, .honor[open] .chev { transform: rotate(180deg); }
.file summary:hover .file-name strong { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.file-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; padding: 4px 4px 28px; }
.file-body .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.file-body p { color: var(--muted); }
.mini-title { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ticks li { padding-left: 18px; position: relative; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 1.5px; background: var(--fg); }
.note { font-size: 14px; color: var(--muted); border-left: 2px solid var(--hair); padding-left: 12px; }

/* ERBI */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.big-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.big-stat { border: var(--stroke) solid var(--line); border-radius: 22px; padding: 22px; min-width: 0; }
.big-stat b { display: block; font-size: clamp(44px, 6vw, 72px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.big-stat span { color: var(--muted); font-size: 15px; }
.meta-line { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 18px; font-size: 14px; }
.meta-line span { color: var(--muted); }
.meta-line b { font-weight: 500; color: var(--fg); }
.evidence { display: flex; flex-direction: column; gap: 14px; }
.ev-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 16px; background: var(--panel); text-decoration: none; }
.ev-link strong { font-weight: 500; }
.ev-link span { font-size: 13px; color: var(--muted); }
.ev-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* Creative */
.timeline { list-style: none; margin: 0; padding: 0; border-left: var(--stroke) solid var(--line); }
.timeline li { position: relative; padding: 0 0 26px 26px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: var(--stroke) solid var(--line); }
.timeline li:last-child::before { background: var(--accent); border-color: var(--accent); }
.timeline time { font-family: var(--mono); font-size: 13px; display: block; margin-bottom: 2px; }
.timeline p { color: var(--muted); }
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.works .shot { aspect-ratio: 3 / 4; border-radius: 14px; }
.account { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 14px; }
.account strong { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.account span { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* Honors */
.honor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.honor { position: relative; border: var(--stroke) solid var(--line); border-radius: 4px; background: var(--bg); }
.honor::before { /* folder tab */
  content: ""; position: absolute; top: -9px; left: 18px; width: 92px; height: 9px;
  border: var(--stroke) solid var(--line); border-bottom: 0; background: var(--panel);
}
.honor.example { border-style: dashed; }
.honor.example::before { border-style: dashed; }
.honor summary { list-style: none; cursor: pointer; padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); }
.honor summary::-webkit-details-marker { display: none; }
.honor-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.honor-cat { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.honor h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.honor-sub { color: var(--muted); font-size: 14px; }
.stamp { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; border: 1px solid var(--accent); color: var(--accent); padding: 2px 7px; border-radius: 3px; }
.honor-body { padding: 18px 20px 20px; display: grid; gap: 14px; border-top: var(--stroke) solid var(--line); }
.honor-body dl { margin: 0; display: grid; gap: 12px; }
.honor-body dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.honor-body dd { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.cert { border: 1.5px dashed var(--muted); border-radius: 6px; aspect-ratio: 4 / 3; max-width: 100%; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; padding: 10px; }
.cert img { width: 100%; height: 100%; object-fit: contain; }

/* About */
.beliefs { list-style: none; margin: 0 0 48px; padding: 0; border-top: var(--stroke) solid var(--line); }
.beliefs li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--hair); }
.beliefs strong { font-size: 20px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; }
.beliefs span { color: var(--muted); }
.like-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 48px; }
.like-col { background: var(--panel); border-radius: 22px; padding: 24px; min-width: 0; }
.like-col h3 { font-size: 20px; margin-bottom: 14px; letter-spacing: -0.015em; }
.closing { max-width: 60ch; display: flex; flex-direction: column; gap: 12px; }
.closing h3 { font-size: 30px; letter-spacing: -0.03em; }
.closing p { color: var(--muted); }
.signature { font-family: var(--mono); font-size: 13px; color: var(--fg) !important; }

/* Contact */
.contact-list { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.contact-list div { background: var(--panel); border-radius: 18px; padding: 18px 20px; min-width: 0; }
.contact-list dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.contact-list dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.contact-list dd.pending { color: var(--muted); font-weight: 400; }

.footer { margin-top: 88px; padding-top: 22px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; font-family: var(--mono); }
.noscript { padding: 16px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .box { width: clamp(136px, 16vw, 190px); }
  .word { height: 80px; }
}
@media (max-width: 960px) {
  .app { display: block; }
  .sidebar { display: none; }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
  .topbar {
    display: flex; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg);
    align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    padding-block: 12px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    border-bottom: 1px solid var(--hair);
  }
  .menu-btn { font: inherit; font-size: 14px; background: var(--panel); color: var(--fg); border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
  .top-nav { flex-basis: 100%; display: flex; flex-direction: column; padding: 8px 0 4px; }
  .top-nav[hidden] { display: none; }
  .top-nav a { text-decoration: none; padding: 10px 0; font-size: 17px; border-top: 1px solid var(--hair); }
  .main { padding-block: 36px 32px; padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .hero { grid-template-columns: 1fr; gap: 24px; margin-bottom: 36px; }
  .featured, .file-body, .split, .overview-grid { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding-top: 64px; margin-top: 56px; scroll-margin-top: 72px; }
}
@media (max-width: 640px) {
  .compartment { height: 196px; }
  .row { gap: 8px; padding: 0 5%; }
  .box { --fh: 62px; width: 44%; max-width: 190px; height: 150px; }
  .box-art { height: 56px; bottom: calc(var(--fh) - 20px); }
  .box.is-active .box-art { transform: translateY(-18px); }
  .box-front { font-size: 14px; }
  .box-back { left: 12px; right: -12px; bottom: 10px; }
  .word { height: 58px; }
  .book { width: 32px; }
  .facts { grid-template-columns: 1fr; }
  .featured { padding: 22px; border-radius: 22px; }
  .featured h3 { font-size: 32px; }
  .file summary { grid-template-columns: minmax(0, 1fr) auto 20px; gap: 10px; }
  .file-years { display: none; }
  .beliefs li { grid-template-columns: 1fr; gap: 6px; }
  .like-cols { grid-template-columns: 1fr; }
  .big-stats { grid-template-columns: 1fr; }
  .roles div { grid-template-columns: 1fr; gap: 4px; }
  .contact-list { grid-template-columns: 1fr; }
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
.featured .tag { background: var(--bg); }
.ev-link strong { font-size: 16px; color: var(--fg); }


.shot { align-content: center; gap: 2px; }

/* ---------- Language toggle ---------- */
.lang-btn {
  font: inherit; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--panel); color: var(--fg); border: 0; border-radius: 999px; padding: 8px 14px; transition: background .15s;
}
.lang-btn:hover { background: var(--hair); }
.lang-globe { font-size: 11px; font-weight: 600; letter-spacing: -0.02em; border: 1px solid currentColor; border-radius: 5px; padding: 0 4px; line-height: 16px; }
.side-lang { margin-top: auto; align-self: flex-start; }
.top-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- Cenvara devices ---------- */
.featured-name { display: flex; align-items: center; gap: 16px; }
.app-icon { width: 64px; height: 64px; border-radius: 22.5%; flex: none; box-shadow: 0 6px 18px -8px rgba(0,0,0,.45); }
.devices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; perspective: 1200px; }
.device { margin: 0; border-radius: 22px; overflow: hidden; background: #0d0f10; box-shadow: 0 0 0 5px #15181a, 0 0 0 6px #2b2f33, 0 22px 40px -22px rgba(0,0,0,.55); aspect-ratio: 585 / 1266; max-width: 100%; }
.device img { display: block; width: 100%; height: 100%; object-fit: cover; }
.device:nth-child(2) { transform: translateY(-22px); }

/* ---------- CJK typography ---------- */
:lang(zh) .h-strong, :lang(zh) .h-soft, :lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; }
:lang(zh) .h-strong, :lang(zh) .h-soft { line-height: 1.18; }
:lang(zh) .eyebrow, :lang(zh) .mini-title, :lang(zh) .roles dt, :lang(zh) .status, :lang(zh) .honor-cat { letter-spacing: .04em; }
:lang(zh) body, :lang(zh) .prose p { line-height: 1.75; }

/* ---------- Scroll motion (scroll-driven; static where unsupported) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry calc(var(--d, 0) * 4%) entry calc(60% + var(--d, 0) * 6%);
    }
    @keyframes reveal-up { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }

    .devices .device {
      animation: device-in linear both; animation-timeline: view();
      animation-range: entry calc(var(--i) * 8%) cover 40%;
    }
    @keyframes device-in { from { opacity: 0; transform: translateY(80px) rotateX(18deg); } }

    .cabinet {
      animation: cab-out linear both; animation-timeline: view(); animation-range: exit 10% exit 90%;
    }
    @keyframes cab-out { to { transform: scale(.94); opacity: .35; } }

    .timeline { border-left-color: transparent; position: relative; }
    .timeline::before {
      content: ""; position: absolute; left: -1.5px; top: 0; bottom: 0; width: 1.5px; background: var(--line);
      transform-origin: top; animation: line-draw linear both; animation-timeline: view(); animation-range: entry 20% cover 55%;
    }
    @keyframes line-draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }

    .section-head .h-soft {
      animation: soft-in linear both; animation-timeline: view(); animation-range: entry 10% entry 90%;
    }
    @keyframes soft-in { from { opacity: 0; transform: translateX(-24px); } }
  }
}

@media (max-width: 960px) {
  .devices { gap: 10px; }
  .device { border-radius: 18px; box-shadow: 0 0 0 4px #15181a, 0 0 0 5px #2b2f33, 0 16px 30px -18px rgba(0,0,0,.5); }
}
@media (max-width: 640px) {
  .app-icon { width: 52px; height: 52px; }
  .device:nth-child(2) { transform: translateY(-12px); }
  .lang-btn { padding: 8px 12px; }
}

.nw { white-space: nowrap; }
.app-icon { outline: 1px solid var(--hair); outline-offset: -1px; }

/* ---------- Evidence images & works ---------- */
.ev-shots { align-items: start; }
.ev-img { margin: 0; border-radius: 14px; overflow: hidden; background: #111; box-shadow: 0 0 0 1px var(--hair); }
.ev-img img { display: block; width: 100%; height: auto; }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.mini-stats div { background: var(--panel); border-radius: 16px; padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mini-stats b { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 13px; color: var(--muted); }
.works { grid-template-columns: 1fr; gap: 14px; }
.work { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: center; text-decoration: none; color: var(--fg); }
.work-img { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 800 / 445; max-width: 100%; background: #111; }
.work-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.work:hover .work-img img { transform: scale(1.04); }
.play { position: absolute; left: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); }
.play::after { content: ""; position: absolute; left: 13px; top: 10px; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.work-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.work-meta strong { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.work-meta > span { color: var(--muted); font-size: 14px; }
.work-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--fg) !important; }
.work:first-child .work-meta strong { font-size: 24px; }
@media (max-width: 640px) {
  .work { grid-template-columns: 1fr; gap: 10px; }
  .mini-stats b { font-size: 20px; }
  .mini-stats div { padding: 12px; }
  .ev-shots { grid-template-columns: 1fr; }
}

/* Contact */
.contact-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contact-list dd { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.copy-btn { font: inherit; font-size: 12px; font-family: var(--mono); background: var(--bg); color: var(--fg); border: 1px solid var(--hair); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.copy-btn:hover { border-color: var(--muted); }
@media (max-width: 960px) { .contact-list { grid-template-columns: 1fr 1fr; } .contact-wide { grid-column: 1 / -1; } }
@media (max-width: 640px) { .contact-list { grid-template-columns: 1fr; } }

.devices:has(.device:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; margin-left: auto; }

/* ---------- Records (X-style source cards) ---------- */
.records { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.record { border: 1px solid var(--hair); border-radius: 22px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); min-width: 0; }
.rec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rec-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.rec-link { font-size: 13px; text-decoration: none; padding: 5px 12px; border-radius: 999px; background: var(--panel); white-space: nowrap; }
.rec-link:hover { background: var(--hair); }
.rec-id { display: flex; flex-direction: column; gap: 2px; }
.rec-id strong { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.rec-id span { color: var(--muted); font-size: 14px; font-family: var(--mono); }
.rec-quote .rec-id span { font-family: var(--font); }
.rec-stats { display: flex; gap: 32px; }
.rec-stats div { display: flex; flex-direction: column; }
.rec-stats b { font-size: 34px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rec-stats span { color: var(--muted); font-size: 13px; }
.rec-quote { margin: 0; padding-left: 14px; border-left: 2px solid var(--fg); font-size: 15px; line-height: 1.6; color: var(--fg); }
.rec-note { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.rec-proof { border-top: 1px solid var(--hair); padding-top: 10px; }
.rec-proof summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.rec-proof summary::-webkit-details-marker { display: none; }
.rec-proof[open] .chev { transform: rotate(180deg); }
.rec-proof img { display: block; width: 100%; height: auto; margin-top: 12px; border-radius: 12px; }

/* ---------- Reel (video stills) ---------- */
.reel { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 14px; margin-top: 40px; }
.reel-item { position: relative; display: block; border-radius: 24px; overflow: hidden; background: #0b0b0b; color: #fff; text-decoration: none; aspect-ratio: 900 / 608; min-width: 0; isolation: isolate; }
.reel-main { grid-row: span 2; aspect-ratio: auto; min-height: 100%; }
.reel-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.55) contrast(1.08) brightness(.9); transition: filter .5s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reel-item:hover img, .reel-item:focus-visible img { filter: none; transform: scale(1.035); }
.reel-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.05) 55%, rgba(0,0,0,.25)); z-index: 1; }
.reel-top, .reel-bottom { position: absolute; left: 18px; right: 18px; z-index: 2; display: flex; }
.reel-top { top: 16px; justify-content: space-between; align-items: center; }
.reel-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.reel-item .play { position: relative; left: auto; bottom: auto; background: rgba(255,255,255,.16); backdrop-filter: blur(10px); }
.reel-bottom { bottom: 16px; flex-direction: column; gap: 6px; }
.reel-bottom strong { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.reel-main .reel-bottom strong { font-size: clamp(32px, 4vw, 48px); }
.reel-stats { display: flex; gap: 14px; font-family: var(--mono); font-size: 12px; opacity: .85; }
.reel-stats span + span::before { content: "·"; margin-right: 14px; opacity: .6; }
.reel-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.reel-foot .note { max-width: 62ch; }
@media (max-width: 760px) {
  .reel { grid-template-columns: 1fr; }
  .reel-main { grid-row: auto; aspect-ratio: 900 / 608; }
  .reel-item { border-radius: 20px; }
  .rec-stats { gap: 24px; }
  .rec-stats b { font-size: 28px; }
}
