/* ============================================================
   何昕睿 — Portfolio 2024—2026
   ============================================================ */

:root {
  --gutter: clamp(20px, 4.4vw, 72px);
  --ink: #08090a;
  --ink-2: #0c0e10;
  --paper: #ece7db;
  --paper-2: #e3ddcf;
  --ivory: #f3efe6;
  --muted: #8d897f;
  --line: rgba(243, 239, 230, 0.14);
  --line-strong: rgba(243, 239, 230, 0.3);
  --red: #b8362b;
  --red-soft: #c9503f;
  --celadon: #9db6a8;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-display: "Bodoni MT", "Didot", "Times New Roman", serif;
  --font-mono: "Consolas", "SFMono-Regular", "Menlo", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-2: cubic-bezier(0.77, 0, 0.18, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked { overflow: hidden; }

::selection { background: var(--red); color: var(--ivory); }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #0a0b0c; }
::-webkit-scrollbar-thumb { background: #2b2c2d; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: #3d3e3f; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
em { font-style: normal; }

:focus-visible {
  outline: 1px solid var(--red);
  outline-offset: 4px;
}

.wrap {
  width: calc(100% - var(--gutter) * 2);
  max-width: 1560px;
  margin-inline: auto;
}

.mail-link {
  color: inherit;
  border-bottom: 1px solid rgba(243, 239, 230, 0.28);
  padding-bottom: 1px;
  text-transform: none;
  letter-spacing: 0.04em;
  transition: color 0.35s, border-color 0.35s;
}
.mail-link:hover {
  color: var(--red-soft);
  border-color: var(--red);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--red);
  flex: none;
}

.label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 6px;
  transition: color 0.4s, border-color 0.4s;
}
.text-link span { transition: transform 0.4s var(--ease); }
.text-link:hover { color: var(--red); border-color: var(--red); }
.text-link:hover span { transform: translate(2px, -2px); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 44px;
  min-width: 230px;
  padding: 17px 22px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  transition: background 0.45s, color 0.45s, border-color 0.45s;
}
.btn b { font-family: var(--font-sans); font-size: 13px; font-weight: 300; }
.btn:hover { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: transparent; color: var(--ivory); border-color: var(--ivory); }

/* ---------------- grain / progress / cursor ---------------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.042;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='280' height='280' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1002;
  background: transparent;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

.cursor {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1200;
  pointer-events: none;
  mix-blend-mode: difference;
}
.cursor__dot,
.cursor__ring {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor__dot {
  width: 5px;
  height: 5px;
  background: #fff;
}
.cursor__ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.45s var(--ease), height 0.45s var(--ease), background 0.45s, border-color 0.45s;
}
.cursor__ring b {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.18em;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor.is-active .cursor__ring {
  width: 82px;
  height: 82px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(2px);
}
.cursor.is-active .cursor__ring b { opacity: 1; }

@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
}

/* ---------------- loader ---------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1.1s var(--ease-2);
  will-change: transform;
}
.loader.is-done { transform: translateY(-101%); }
html:not(.js) .loader { display: none; }

.loader__inner {
  width: min(420px, 72vw);
  text-align: center;
}
.loader__name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.08em;
}
.loader__name span {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--muted);
}
.loader__bar {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 34px 0 14px;
  overflow: hidden;
}
.loader__bar i {
  display: block;
  height: 100%;
  background: var(--ivory);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.loader__count {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ivory);
}
.loader__count em { color: var(--muted); }

/* ---------------- header ---------------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  border-bottom: 1px solid transparent;
  transition: transform 0.5s var(--ease), background 0.5s, border-color 0.5s;
}
.header.is-scrolled {
  background: rgba(8, 9, 10, 0.76);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.header.is-hidden { transform: translateY(-102%); }

.header__inner {
  height: 76px;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand__mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 19px;
  position: relative;
  transition: background 0.4s, color 0.4s;
}
.brand__mark::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}
.brand:hover .brand__mark { background: var(--ivory); color: var(--ink); }
.brand__name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.12em;
  line-height: 1.2;
}
.brand__name em {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.26em;
  color: var(--muted);
  margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 38px); }
.nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  letter-spacing: 0.12em;
  position: relative;
  padding-bottom: 4px;
}
.nav a em {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  transition: color 0.4s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.5s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
.nav a:hover em { color: var(--red); }

.header__side { display: flex; align-items: center; gap: 22px; }
.clock {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--muted);
  white-space: nowrap;
}

.menu-btn { display: none; align-items: center; gap: 9px; }
.menu-btn__lines { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.menu-btn__lines i {
  display: block;
  height: 1px;
  background: var(--ivory);
  transition: transform 0.4s var(--ease), width 0.4s;
}
.menu-btn__lines i:last-child { width: 70%; margin-left: auto; }
.menu-btn b {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  font-weight: 400;
}
.menu-btn[aria-expanded="true"] .menu-btn__lines i:first-child { transform: translateY(2.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__lines i:last-child { width: 100%; transform: translateY(-2.5px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 850;
  background: var(--ink);
  padding: 110px var(--gutter) 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s var(--ease-2), visibility 0s 0.8s;
  visibility: hidden;
}
.mobile-menu.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.8s var(--ease-2);
}
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 300;
  line-height: 1.1;
}
.mobile-menu nav a span {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--red);
  align-self: start;
  padding-top: 8px;
}
.mobile-menu nav a em {
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: -12px;
}
.mobile-menu__foot {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* rail */
.rail {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  mix-blend-mode: difference;
}
.rail__text {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.32em;
}
.rail__line {
  position: relative;
  width: 1px;
  height: 92px;
  background: rgba(255, 255, 255, 0.22);
}
.rail__line i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.rail__pct { font-family: var(--font-mono); font-size: 7px; letter-spacing: 0.12em; }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  min-height: 100svh;
  padding-top: 96px;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.hero__glow--a {
  width: 64vw;
  height: 64vw;
  left: -22vw;
  bottom: -34vw;
  background: radial-gradient(circle, rgba(157, 182, 168, 0.22), rgba(157, 182, 168, 0) 68%);
}
.hero__glow--b {
  width: 48vw;
  height: 48vw;
  right: -6vw;
  top: -24vw;
  background: radial-gradient(circle, rgba(184, 54, 43, 0.18), rgba(184, 54, 43, 0) 68%);
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 25% 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.7;
}
.hero__index {
  position: absolute;
  right: calc(var(--gutter) + 40px);
  top: 20%;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.34em;
  color: var(--muted);
  opacity: 0.65;
}

.hero__inner {
  position: relative;
  z-index: 2;
  min-height: calc(100svh - 96px);
  display: flex;
  flex-direction: column;
  padding-bottom: 26px;
}
.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero__main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
  align-items: center;
  gap: 2vw;
  padding: 3vh 0 2vh;
}
.hero__copy { position: relative; z-index: 2; }
.hero__kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--muted);
}
.hero__kicker i { width: 6px; height: 6px; background: var(--red); border-radius: 50%; }

.hero__title { margin-top: clamp(18px, 2.4vh, 30px); }
.hero__cn {
  display: flex;
  font-family: var(--font-serif);
  font-weight: 250;
  font-size: clamp(76px, 13vw, 204px);
  line-height: 0.82;
  letter-spacing: -0.045em;
}
.hero__cn .char { display: block; overflow: hidden; padding-right: 0.02em; }
.hero__cn .char > span {
  display: block;
  transform: translateY(112%);
  animation: charUp 1.35s var(--ease) forwards;
}
.hero__cn .char:nth-child(1) > span { animation-delay: 0.18s; }
.hero__cn .char:nth-child(2) > span { animation-delay: 0.27s; }
.hero__cn .char:nth-child(3) > span { animation-delay: 0.36s; }
@keyframes charUp { to { transform: translateY(0); } }

.hero__en {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: clamp(10px, 1.6vh, 20px);
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 54px);
  letter-spacing: 0.22em;
  line-height: 1;
  font-weight: 400;
}
.hero__en-dot { color: var(--red); }

.hero__statement {
  margin-top: clamp(30px, 4vh, 54px);
  font-family: var(--font-serif);
  font-size: clamp(19px, 1.85vw, 28px);
  font-weight: 300;
  line-height: 1.55;
  color: #dad4c8;
  letter-spacing: 0.02em;
}
.hero__sub {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.hero__sub i { color: var(--red); margin: 0 7px; font-style: normal; }

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(420px, 61vh, 700px);
}
.hero__poster {
  position: absolute;
  margin: 0;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) rotate(var(--rot, 0deg));
  transition: transform 0.9s var(--ease), box-shadow 0.9s;
  will-change: transform;
}
.hero__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 45px 80px rgba(0, 0, 0, 0.55);
}
.hero__poster--main {
  --rot: 2.4deg;
  width: 57%;
  right: 7%;
  top: 0;
  z-index: 2;
  animation: posterIn 1.5s var(--ease) 0.5s backwards;
}
.hero__poster--main img { outline: 1px solid rgba(255, 255, 255, 0.16); outline-offset: -1px; }
.hero__poster--sub {
  --rot: -4deg;
  width: 42%;
  left: 0;
  bottom: 4%;
  z-index: 3;
  animation: posterIn 1.6s var(--ease) 0.72s backwards;
}
.hero__poster--sub img { outline: 1px solid rgba(255, 255, 255, 0.2); outline-offset: -1px; }
.hero__poster:hover { transform: translate3d(var(--px, 0px), calc(var(--py, 0px) - 10px), 0) rotate(0deg); }
@keyframes posterIn {
  from { opacity: 0; transform: translate3d(0, 50px, 0) rotate(var(--rot)); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(var(--rot)); }
}
.hero__poster figcaption {
  position: absolute;
  left: 0;
  bottom: -30px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}
.hero__poster figcaption b {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 10px;
  color: var(--ivory);
  letter-spacing: 0.1em;
}
.hero__poster--main figcaption { left: auto; right: 0; }
.hero__poster--sub figcaption { bottom: -26px; }
.hero__cross {
  position: absolute;
  right: 1%;
  top: 44%;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--red);
}

/* ---------------- orbit portrait ---------------- */

.orbit-field {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.orbit-field__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform: translate3d(var(--ox, 0px), var(--oy, 0px), 0);
  transition: transform 0.9s var(--ease);
}
.orbit-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 104%;
  height: 104%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 48%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.orbit-disc {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #171819, #070708 60%, #030303 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 26px 70px rgba(255, 255, 255, 0.12),
    0 0 38px rgba(255, 255, 255, 0.16),
    0 0 100px rgba(255, 255, 255, 0.06),
    inset 0 0 90px rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.orbit-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.orbit-line {
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1;
}
.orbit-portrait {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: block;
  width: 27%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.orbit-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 56px rgba(0, 0, 0, 0.72),
    0 0 42px rgba(255, 255, 255, 0.14);
  filter: none;
  transition: transform 0.8s var(--ease);
}
.orbit-portrait::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  animation: orbitRing 60s linear infinite reverse;
  pointer-events: none;
}
@keyframes orbitRing { to { transform: rotate(360deg); } }
.orbit-portrait:hover img,
.orbit-portrait:focus-visible img {
  filter: none;
  transform: scale(1.035);
}
.orbit-portrait__label {
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.orbit-portrait:hover .orbit-portrait__label,
.orbit-portrait:focus-visible .orbit-portrait__label { opacity: 1; }

.orbit-item {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: clamp(64px, 8.7vw, 125px);
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: none;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.7s var(--ease);
  cursor: pointer;
}
.orbit-field.is-ready .orbit-item { opacity: 1; }
.orbit-item:nth-of-type(3n + 1) { --tilt: -6deg; }
.orbit-item:nth-of-type(3n + 2) { --tilt: 4.5deg; }
.orbit-item:nth-of-type(3n) { --tilt: -2.5deg; }
.orbit-item__img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  overflow: hidden;
  background: #0b0c0d;
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.68),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.55s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.orbit-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.94);
  transition: filter 0.45s, transform 0.9s var(--ease);
}
.orbit-item:hover .orbit-item__img,
.orbit-item:focus-visible .orbit-item__img {
  transform: rotate(var(--tilt, 0deg)) scale(1.1);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.72),
    0 0 26px rgba(255, 255, 255, 0.16);
}
.orbit-item:hover img,
.orbit-item:focus-visible img {
  filter: saturate(1.04) brightness(1.02);
  transform: scale(1.03);
}
.orbit-item:focus-visible { outline: 1px solid var(--red); outline-offset: 4px; }
.orbit-item__label {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%) translateY(3px);
  max-width: 92%;
  padding: 2px 5px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.76);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.05em;
  color: var(--ivory);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s var(--ease);
  pointer-events: none;
}
.orbit-item:hover .orbit-item__label,
.orbit-item:focus-visible .orbit-item__label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.orbit-hint {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 5;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0.62;
  pointer-events: none;
}
.orbit-mark {
  position: absolute;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--red);
  opacity: 0.7;
  pointer-events: none;
}
.orbit-mark--a { left: 7%; top: 17%; }
.orbit-mark--b { right: 5%; bottom: 22%; }

.hero__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.scroll-cue__line {
  position: relative;
  width: 48px;
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ivory);
  transform: translateX(-100%);
  animation: scrollLine 2.6s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}
.hero__note {
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 1.9;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: right;
}

/* ---------------- marquee ---------------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  overflow: hidden;
  background: #0a0b0c;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(26px, 3vw, 52px);
  padding-right: clamp(26px, 3vw, 52px);
}
.marquee__group span {
  font-family: var(--font-serif);
  font-size: clamp(21px, 2.6vw, 40px);
  font-weight: 300;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.marquee__group i {
  font-style: normal;
  font-size: 13px;
  color: var(--red);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- contents ---------------- */

.contents {
  position: relative;
  height: 100svh;
  background: var(--ink);
}
.contents__sticky {
  position: relative;
  top: auto;
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 96px 0 30px;
}
.contents__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.contents__head span { color: var(--ivory); }
.contents__head em { font-style: normal; font-size: 7px; }
.contents__viewport {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.contents__track {
  display: flex;
  gap: 18px;
  width: max-content;
  padding-left: var(--gutter);
  will-change: transform;
  transform: translateX(55vw);
}
.contents__item {
  position: relative;
  flex: 0 0 auto;
  width: clamp(230px, 22vw, 320px);
  min-height: clamp(280px, 34vh, 360px);
  padding: 24px 22px 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  display: flex;
  flex-direction: column;
  transition: background 0.4s, border-color 0.4s;
}
.contents__item:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.32);
}
.contents__num {
  font-family: var(--font-display);
  font-size: clamp(36px, 3.6vw, 52px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--red);
}
.contents__title {
  margin-top: auto;
  font-family: var(--font-serif);
  font-size: clamp(23px, 2vw, 30px);
  font-weight: 300;
  line-height: 1.2;
  color: var(--ivory);
  transition: color 0.35s;
}
.contents__item:hover .contents__title { color: var(--red-soft); }
.contents__en {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.contents__meta {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.contents__arrow {
  position: absolute;
  top: 24px;
  right: 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--muted);
  transition: color 0.35s, transform 0.35s var(--ease);
}
.contents__item:hover .contents__arrow {
  color: var(--red-soft);
  transform: translate(2px, -2px);
}
.contents__item--index {
  background: rgba(184, 54, 43, 0.08);
  border-color: rgba(184, 54, 43, 0.3);
}
.contents__foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.contents__list {
  width: min(1200px, calc(100% - var(--gutter) * 2));
  margin: 0 auto;
  opacity: 0;
  transform: translateX(30vw);
  transition: transform 2.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.12s, opacity 1.4s ease 0.12s;
  will-change: transform, opacity;
}
.contents.is-in .contents__list {
  opacity: 1;
  transform: translateX(0);
}
.contents__row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 220px 24px;
  align-items: center;
  gap: 24px;
  min-height: 58px;
  padding: 10px 4px;
  border-top: 1px solid var(--line);
  transition: background 0.35s, padding 0.4s var(--ease);
}
.contents__row:last-child { border-bottom: 1px solid var(--line); }
.contents__row:hover {
  background: rgba(255, 255, 255, 0.035);
  padding-left: 14px;
}
.contents__row--index { background: rgba(184, 54, 43, 0.06); }
.contents__num {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--red);
}
.contents__title {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-top: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 300;
  line-height: 1.2;
  color: var(--ivory);
  transition: color 0.35s;
}
.contents__title em {
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-style: normal;
  letter-spacing: 0.16em;
  color: var(--muted);
  transform: translateY(-2px);
}
.contents__meta {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: right;
}
.contents__row .contents__arrow {
  position: static;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--muted);
  transition: color 0.35s, transform 0.35s var(--ease);
}
.contents__row:hover .contents__title { color: var(--red-soft); }
.contents__row:hover .contents__arrow {
  color: var(--red-soft);
  transform: translate(2px, -2px);
}

/* ---------------- intro (legacy) ---------------- */

.intro { padding: clamp(90px, 11vw, 160px) 0 clamp(70px, 9vw, 120px); }
.intro__head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}
.intro__aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 3vw, 40px);
  min-width: 0;
}
.intro__toc {
  position: absolute;
  top: 52px;
  left: 0;
  width: 100%;
  max-width: 310px;
}
.intro__toc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.intro__toc-head span { color: var(--ivory); }
.intro__toc-head em { font-style: normal; font-size: 6.5px; letter-spacing: 0.12em; }
.intro__toc li { border-bottom: 1px solid var(--line); }
.intro__toc a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 7px 0 8px;
}
.intro__toc b {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  font-weight: 400;
  color: var(--red);
  padding-top: 4px;
}
.intro__toc a > span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.35;
  color: #d8d2c6;
  transition: color 0.35s;
}
.intro__toc em {
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.12em;
  line-height: 1.45;
  color: var(--muted);
  font-style: normal;
}
.intro__toc a:hover span { color: var(--red-soft); }
.intro__toc a:hover b { color: var(--ivory); }
.intro__head h2 {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.9vw, 76px);
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: 0.01em;
}
.intro__head h2 em { color: var(--celadon); }
.intro__body { margin-left: 33.333%; margin-top: clamp(50px, 6vw, 86px); }
.intro__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 60px);
}
.intro__cols p {
  font-size: 15px;
  line-height: 2;
  color: #b0aa9f;
  max-width: 42ch;
}
.stats {
  display: flex;
  gap: clamp(34px, 6vw, 90px);
  margin-top: clamp(44px, 6vw, 76px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stats li { display: flex; align-items: baseline; gap: 10px; }
.stats b {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400;
  line-height: 1;
}
.stats span {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* ---------------- section head ---------------- */

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  padding: clamp(70px, 8vw, 120px) 0 46px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(50px, 6vw, 86px);
}
.section-head h2 {
  margin-top: 26px;
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 62px);
  font-weight: 300;
  line-height: 1.2;
}
.section-head__note {
  max-width: 46ch;
  padding-left: 12%;
  font-size: 14px;
  line-height: 1.95;
  color: var(--muted);
}

/* ---------------- works ---------------- */

.works { position: relative; padding-top: clamp(60px, 8vw, 110px); }
.works--epilogue { padding-top: 10px; }
.works--epilogue .work { padding-top: 24px; }
.work { padding: 26px 0 clamp(60px, 7vw, 100px); }
.work__head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 16px;
}
.work__num {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--red);
}
.work__meta {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.work__meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

.work__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: #101113;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 1.5s var(--ease), filter 1s;
  filter: saturate(0.94);
}
.work__media:hover img { transform: scale(1.035); filter: saturate(1.04); }
.work--full .work__media { aspect-ratio: 16 / 9; }

/* judge cover: scroll fade + independent title layer */
.judge-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  will-change: opacity;
}
.js .judge-stage { opacity: 0; }
.judge-stage .work__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}
.judge-stage .work__media img { transition: none; }
.judge-stage .work__media:hover img { transform: none; }
.judge-cover-img {
  will-change: opacity;
}
.judge-title-link {
  position: absolute;
  left: 34.3907%;
  top: 73.8576%;
  width: 29.9043%;
  height: 19.1286%;
  z-index: 3;
  display: block;
}
.judge-title-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.judge-title-link__hint {
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translate(-50%, 5px);
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.16em;
  color: var(--ivory);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s var(--ease);
  pointer-events: none;
}
.judge-title-link__hint b { color: var(--red); font-weight: 400; }
.judge-title-link:hover .judge-title-link__hint,
.judge-title-link:focus-visible .judge-title-link__hint {
  opacity: 1;
  transform: translate(-50%, 0);
}
.judge-title-link:focus-visible { outline: 1px solid var(--red); outline-offset: 4px; }
.work__badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s, transform 0.5s var(--ease), background 0.4s;
}
.work__badge b { font-size: 10px; font-weight: 400; }
.work__media:hover .work__badge,
.work--paper__media:hover .work__badge,
.encounter__media:hover .work__badge { opacity: 1; transform: none; }
.work__corner {
  position: absolute;
  right: 22px;
  top: 20px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.55);
}

.work__info {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr 0.55fr;
  gap: 40px;
  padding-top: 24px;
  align-items: start;
}
.work__title h3 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.1vw, 46px);
  font-weight: 300;
  line-height: 1.1;
  cursor: pointer;
  transition: color 0.4s;
}
.work--yuanming .work__title h3 { font-size: clamp(25px, 2.8vw, 42px); white-space: nowrap; }
.work__title h3:hover { color: var(--red-soft); }
.work__en {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.work__desc {
  font-size: 14px;
  line-height: 1.95;
  color: #a9a398;
  max-width: 48ch;
}
.work__side { justify-self: end; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 20px; }
.work__tags { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.work__tags li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}

/* triptych */
.work--triptych { padding-top: 60px; }
.triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.triptych__item { display: block; }
.triptych__frame {
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.triptych__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease), filter 1s;
  filter: saturate(0.96);
}
.triptych__item:hover img { transform: scale(1.035); filter: saturate(1.05); }
.triptych__cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.triptych__cap b { font-family: var(--font-serif); font-size: 14px; font-weight: 400; }
.triptych__cap em {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-style: normal;
}

/* paper interlude */
.work--paper {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(70px, 8vw, 120px) 0;
  margin: clamp(40px, 5vw, 70px) 0;
  --line: rgba(10, 10, 10, 0.16);
  --line-strong: rgba(10, 10, 10, 0.34);
  --muted: #6f6a60;
}
.work--paper__inner {
  display: grid;
  grid-template-columns: 0.76fr 1.24fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: center;
}
.work--paper__copy h3 {
  margin-top: 24px;
  font-family: var(--font-serif);
  font-size: clamp(46px, 5.6vw, 92px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.work--paper__copy .work__en { color: rgba(0, 0, 0, 0.45); }
.work--paper__copy .work__desc { margin-top: 24px; color: rgba(0, 0, 0, 0.66); max-width: 40ch; }
.work--paper__copy blockquote {
  margin: 30px 0;
  padding-left: 18px;
  border-left: 1px solid var(--red);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.75;
  color: rgba(0, 0, 0, 0.72);
}
.work--paper__copy .work__tags { justify-content: flex-start; margin-bottom: 26px; }
.work--paper__copy .work__tags li { color: rgba(0, 0, 0, 0.55); }
.work--paper__copy .text-link { color: var(--ink); border-color: rgba(0, 0, 0, 0.3); }
.work--paper__copy .text-link:hover { color: var(--red); border-color: var(--red); }
.work--paper__media {
  position: relative;
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 40px 70px rgba(30, 25, 18, 0.14);
  overflow: hidden;
}
.work--paper__media img { width: 100%; height: auto; transition: transform 1.4s var(--ease); }
.work--paper__media:hover img { transform: scale(1.018); }
.work--paper__media .work__badge {
  border-color: rgba(10, 10, 10, 0.45);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

/* split */
.work--split { padding-top: 50px; }
.work__split {
  display: grid;
  grid-template-columns: 1.24fr 0.76fr;
  gap: clamp(30px, 4.5vw, 74px);
  align-items: center;
}
.work--reverse .work__media { order: 2; }
.work--reverse .work__panel { order: 1; }
.work--reverse .work__split { grid-template-columns: 0.76fr 1.24fr; }
.work__media--split { aspect-ratio: 16 / 10; }
.work__panel h3 {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.8vw, 56px);
  font-weight: 300;
  line-height: 1.08;
  cursor: pointer;
  transition: color 0.4s;
}
.work__panel h3:hover { color: var(--red-soft); }
.work__panel .work__desc { margin-top: 22px; }
.work__panel blockquote {
  margin: 26px 0;
  padding-left: 16px;
  border-left: 1px solid var(--red);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.8;
  color: #cbc5b9;
}
.work__panel .work__tags { justify-content: flex-start; margin-top: 24px; }

.code-card {
  margin: 26px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.code-card__label {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.22em;
  color: var(--red);
}
.code-card ul { margin-top: 10px; }
.code-card li {
  display: grid;
  grid-template-columns: 26px 72px 1fr;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.code-card li b { color: var(--red); font-weight: 400; }
.code-card li em { font-family: var(--font-sans); font-size: 11px; font-style: normal; color: #b9b3a7; }

/* ---------------- encounters ---------------- */

.encounters { padding-bottom: clamp(60px, 7vw, 100px); }
.encounters__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(22px, 3vw, 40px);
}
.encounter__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d0f10;
}
.encounter--tea .encounter__media {
  background:
    radial-gradient(circle at 50% 42%, rgba(157, 182, 168, 0.24), rgba(157, 182, 168, 0) 62%),
    linear-gradient(150deg, #111512, #0a0c0b 70%);
}
.encounter--tea .encounter__media::after {
  content: "CHA+ / APP DESIGN";
  position: absolute;
  left: 22px;
  top: 20px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.42);
}
.phone-stack {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone {
  width: 35%;
  margin: 0;
  padding: 5px;
  background: #050505;
  border: 1px solid #2b2d2c;
  border-radius: 24px;
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.55);
  transition: transform 0.8s var(--ease);
}
.phone img { width: 100%; height: auto; border-radius: 20px; }
.phone--center { width: 42%; z-index: 3; }
.phone--left { z-index: 2; transform: translate(16%, 7%) rotate(-9deg); opacity: 0.94; }
.phone--right { z-index: 2; transform: translate(-16%, 9%) rotate(9deg); opacity: 0.94; }
.encounter--tea .encounter__media:hover .phone--left { transform: translate(21%, 5%) rotate(-11deg); }
.encounter--tea .encounter__media:hover .phone--right { transform: translate(-21%, 7%) rotate(11deg); }
.encounter--tea .encounter__media:hover .phone--center { transform: translateY(-10px); }

.encounter__media--type {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  background:
    radial-gradient(circle at 50% 46%, rgba(184, 54, 43, 0.3), rgba(184, 54, 43, 0) 58%),
    #0a0909;
}
.encounter__media--type::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 4px);
  opacity: 0.6;
  pointer-events: none;
}
.type-no {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--red);
}
.type-cn {
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.4vw, 68px);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.type-en {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.type-play {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 12px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}
.type-play i {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
}
.encounter__media--type:hover .type-play { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.type-line {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.encounter__info { padding-top: 22px; }
.encounter__info h3 {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 300;
  line-height: 1.1;
  cursor: pointer;
  transition: color 0.4s;
}
.encounter__info h3 span { color: var(--celadon); }
.encounter__info h3:hover { color: var(--red-soft); }
.encounter__info .work__desc { margin-top: 18px; max-width: 44ch; }
.encounter__info .work__tags { justify-content: flex-start; margin-top: 20px; }

/* ---------------- archive ---------------- */

.archive {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(80px, 9vw, 130px) 0 clamp(70px, 9vw, 130px);
  --line: rgba(10, 10, 10, 0.16);
  --line-strong: rgba(10, 10, 10, 0.34);
  --muted: #6f6a60;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.archive .eyebrow { color: rgba(0, 0, 0, 0.5); }
.archive__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 5vw, 64px);
}
.archive__head h2 {
  margin-top: 26px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.6vw, 70px);
  font-weight: 300;
  line-height: 1.2;
}
.filters { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.filters button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: rgba(0, 0, 0, 0.55);
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}
.filters button span { opacity: 0.45; font-size: 7px; }
.filters button:hover { border-color: rgba(0, 0, 0, 0.4); }
.filters button.is-active { background: var(--ink); border-color: var(--ink); color: var(--ivory); }

.archive__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(30px, 4vw, 52px) clamp(16px, 2vw, 28px);
  grid-auto-flow: dense;
}
.tile {
  display: block;
  transition: opacity 0.4s, transform 0.5s var(--ease);
}
.tile.is-hidden { display: none; }
.tile__media {
  display: block;
  overflow: hidden;
  background: #d8d2c5;
  aspect-ratio: 4 / 5;
}
.tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.3s var(--ease), filter 0.8s;
  filter: saturate(0.96);
}
.tile--wide .tile__media { aspect-ratio: 16 / 10; }
.tile:hover .tile__media img { transform: scale(1.045); filter: saturate(1.04); }
.tile__body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(10, 10, 10, 0.14);
  margin-top: 12px;
}
.tile__meta {
  display: flex;
  gap: 9px;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.45);
}
.tile__meta b { color: var(--red); font-weight: 400; }
.tile__title { text-align: right; }
.tile__title h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  transition: color 0.35s;
}
.tile__title p {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.16em;
  color: rgba(0, 0, 0, 0.4);
}
.tile:hover .tile__title h3 { color: var(--red); }
.tile--wide .tile__title h3 { font-size: 26px; }

.tile--full { grid-column: 1 / -1; }
.tile--type {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 40px;
  align-items: center;
  padding: 34px 42px;
  background: #0b0c0d;
  color: var(--ivory);
  border: 1px solid #1d1e1f;
  --line: rgba(243, 239, 230, 0.16);
  --muted: #8d897f;
}
.tile--type:hover { background: #111314; }
.tile__type { display: flex; flex-wrap: wrap; align-items: baseline; gap: 18px 26px; }
.tile__type-no {
  font-family: var(--font-display);
  font-size: clamp(48px, 5vw, 80px);
  line-height: 0.8;
  color: var(--red);
}
.tile__type-cn {
  font-family: var(--font-serif);
  font-size: clamp(34px, 3.8vw, 58px);
  font-weight: 300;
  transition: color 0.4s;
}
.tile--type:hover .tile__type-cn { color: var(--celadon); }
.tile__type-en {
  flex-basis: 100%;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-top: -8px;
}
.tile__type-play {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--ivory);
}
.tile__type-play i {
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--red);
}
.tile--type .tile__body {
  border-top-color: rgba(255, 255, 255, 0.16);
  margin-top: 0;
  padding-top: 0;
}
.tile--type .tile__meta { color: rgba(255, 255, 255, 0.5); }
.tile--type .tile__meta b { color: var(--red); }
.tile--type .tile__title h3 { color: var(--ivory); }
.tile--type .tile__title p { color: rgba(255, 255, 255, 0.45); }

/* ---------------- about ---------------- */

.about { padding: clamp(90px, 11vw, 160px) 0 clamp(70px, 9vw, 120px); }
.about__head h2 {
  margin-top: 30px;
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.2vw, 86px);
  font-weight: 300;
  line-height: 1.18;
}
.about__head h2 em { color: var(--celadon); }
.about__grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(40px, 6vw, 100px);
  padding-top: clamp(50px, 6vw, 80px);
}
.about__bio .lead {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 300;
  line-height: 1.65;
  color: #e3ddd1;
}
.about__bio p {
  margin-top: 24px;
  font-size: 15px;
  line-height: 2.05;
  color: #a9a398;
  max-width: 56ch;
}
.about__sign {
  margin-top: 44px;
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.06em;
}
.about__sign span {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-left: 10px;
}
.about__aside figure { margin: 0; }
.about__aside figure img {
  width: 100%;
  border: 1px solid var(--line);
  filter: saturate(0.92);
}
.about__aside figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.capabilities { margin-top: 38px; }
.capabilities ol { margin-top: 12px; }
.capabilities li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: #b4aea2;
}
.capabilities li span {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--red);
}
.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: clamp(60px, 8vw, 110px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.timeline__year {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.2vw, 46px);
  letter-spacing: 0.04em;
}
.timeline__col p {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 2.1;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------------- footer ---------------- */

.footer {
  position: relative;
  overflow: hidden;
  background: #060707;
  border-top: 1px solid var(--line);
  padding-top: clamp(80px, 10vw, 140px);
}
.footer__top h2 {
  margin-top: 28px;
  font-family: var(--font-serif);
  font-size: clamp(52px, 8.4vw, 140px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.footer__top h2 em { color: var(--celadon); }
.footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
}
.footer__note {
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 2;
  letter-spacing: 0.1em;
  color: var(--muted);
  max-width: 52ch;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: clamp(70px, 9vw, 120px);
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.footer__credit { margin-left: auto; }
.footer__mark {
  font-family: var(--font-display);
  font-size: clamp(160px, 31vw, 500px);
  line-height: 0.68;
  text-align: center;
  letter-spacing: 0.01em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.08);
  margin-bottom: -0.16em;
  user-select: none;
}

/* ---------------- modal ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s 0.8s;
}
.modal.is-open { visibility: visible; pointer-events: auto; transition: visibility 0s; }
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 5, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.55s;
}
.modal.is-open .modal__scrim { opacity: 1; }
.modal__panel {
  position: absolute;
  inset: 0;
  background: var(--ink);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s, transform 0.75s var(--ease);
  overflow: hidden;
}
.modal.is-open .modal__panel { opacity: 1; transform: none; }
.modal__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  height: 64px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(8, 9, 10, 0.94), rgba(8, 9, 10, 0));
}
.modal__brand {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.modal__close {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--muted);
  transition: color 0.3s;
}
.modal__close b { font-family: var(--font-sans); font-size: 22px; font-weight: 200; line-height: 1; }
.modal__close:hover { color: var(--ivory); }
.modal__scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(90px, 9vw, 130px) 0 clamp(80px, 8vw, 120px);
}
.modal__inner {
  width: min(1100px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.modal__head { border-bottom: 1px solid var(--line); padding-bottom: 30px; }
.modal__kicker {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.modal__kicker span:first-child { color: var(--red); }
.modal__head h2 {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: clamp(42px, 6.4vw, 96px);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.modal__en {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: 0.2em;
  color: var(--muted);
}
.modal__cover { margin: 30px 0 0; }
.modal__cover.is-empty { display: none; }
.modal__cover-fig {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: #0b0c0d;
}
.modal__cover-fig img {
  width: auto;
  max-width: 100%;
  max-height: 62vh;
  object-fit: contain;
  margin: 0 auto;
  cursor: zoom-in;
}
.modal__cover-fig figcaption {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.45);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
  pointer-events: none;
}
.modal__meta {
  display: grid;
  grid-template-columns: 0.7fr 1.4fr 1.4fr 1.4fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.modal__meta dt {
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.modal__meta dd { margin: 7px 0 0; font-size: 12.5px; color: #c8c2b6; line-height: 1.7; }
.modal__body { padding: 34px 0 8px; }
.modal__body p {
  font-size: 15.5px;
  line-height: 2.05;
  color: #b6b0a5;
  max-width: 66ch;
  margin-bottom: 18px;
}
.modal__body p:first-child { color: #ded8cc; font-size: 17px; }
.modal__video {
  margin: 34px 0 10px;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
}
.modal__video.is-empty { display: none; }
.modal__video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}
.modal__video-note {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ---------------- film strips ---------------- */

.modal__film { margin-top: 46px; }
.modal__film.is-empty,
.modal__film:empty { display: none; }
.film { margin-bottom: 42px; }
.film:last-child { margin-bottom: 0; }
.film__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.film__head span { color: var(--ivory); }
.film__head em { font-style: normal; font-size: 7px; color: var(--muted); }
.film__row {
  position: relative;
  overflow: hidden;
  padding: 22px 0;
  background: #050506;
  border-top: 1px solid #232326;
  border-bottom: 1px solid #232326;
}
.film__row::before,
.film__row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 5px;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.24) 0 8px,
    transparent 8px 22px
  );
  pointer-events: none;
}
.film__row::before { top: 7px; }
.film__row::after { bottom: 7px; }
.film__track {
  display: flex;
  width: max-content;
  animation: filmMove 55s linear infinite;
  will-change: transform;
}
.film__row--reverse .film__track { animation-direction: reverse; }
.film__row:hover .film__track { animation-play-state: paused; }
.film__group {
  display: flex;
  gap: 10px;
  padding-right: 10px;
}
.film__frame {
  position: relative;
  flex: 0 0 auto;
  width: 320px;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid #2a2a2d;
  background: #000;
  overflow: hidden;
  cursor: zoom-in;
}
.film__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.92);
  transition: transform 0.9s var(--ease), filter 0.5s;
}
.film__frame:hover img { transform: scale(1.025); filter: saturate(1.04) brightness(1.02); }
.film__cap {
  position: absolute;
  left: 8px;
  bottom: 7px;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.48);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  pointer-events: none;
}
@keyframes filmMove { to { transform: translateX(-50%); } }

/* ---------------- live p5 sketch ---------------- */

.modal__live { margin-top: 46px; }
.modal__live.is-empty,
.modal__live:empty { display: none; }
.live__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.live__head span { color: var(--ivory); }
.live__head em { font-style: normal; font-size: 7px; }
.live__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #080b12;
  border: 1px solid var(--line);
}
.live__stage canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}
.live-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
  background: #080b12;
}
.live-loading span { color: var(--red); }
.live-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
}
.live__note {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.modal__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}
.modal__gallery.is-empty { display: none; }
.modal__gallery.is-phones {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.modal__gallery.is-phones img { background: #111; }
.modal__gallery figure { margin: 0; cursor: zoom-in; }
.modal__gallery img {
  width: 100%;
  border: 1px solid var(--line);
  transition: opacity 0.4s;
}
.modal__gallery figure:hover img { opacity: 0.82; }
.modal__gallery figcaption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.modal__gallery .is-wide { grid-column: 1 / -1; }
.modal__link {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  margin-top: 34px;
  padding: 16px 22px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  transition: background 0.4s, color 0.4s;
}
.modal__link:hover { background: var(--ivory); color: var(--ink); }
.modal__link.is-hidden { display: none; }

/* ---------------- lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(3, 4, 5, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox__figure { max-width: 92vw; text-align: center; }
.lightbox__figure img {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.lightbox__figure figcaption {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.lightbox__close {
  position: absolute;
  top: 22px;
  right: 28px;
  font-size: 30px;
  font-weight: 200;
  color: var(--ivory);
  line-height: 1;
}

/* ---------------- reveal ---------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

.js .work__media.reveal img { transform: scale(1.055); transition: transform 1.7s var(--ease), filter 1s; }
.js .work__media.reveal.is-in img { transform: scale(1.001); }
.js .work__media.reveal.is-in:hover img { transform: scale(1.035); }

/* ---------------- responsive ---------------- */

@media (max-width: 1220px) {
  .rail { display: none; }
  .hero__index { display: none; }
  .work__info { grid-template-columns: 1fr 1.2fr; }
  .work__side { grid-column: 2; justify-self: start; align-items: flex-start; text-align: left; }
  .work__tags { justify-content: flex-start; }
}

@media (max-width: 1080px) {
  .intro__toc { display: none; }
  .hero__main { grid-template-columns: 1fr; gap: 4vh; align-items: end; }
  .hero__visual { height: 46vh; min-height: 360px; }
  .hero__poster--main { width: 48%; right: 12%; }
  .hero__poster--sub { width: 34%; left: 10%; }
  .hero__statement { margin-top: 26px; }
  .section-head__note { padding-left: 0; }
  .encounters__grid { grid-template-columns: 1fr; }
  .encounter__media { aspect-ratio: 1 / 1; }
  .archive__grid { grid-template-columns: 1fr 1fr; }
  .tile--wide { grid-column: 1 / -1; }
  .tile--type { grid-column: 1 / -1; }
  .about__grid { grid-template-columns: 1fr; }
  .about__aside { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
  .timeline { gap: 24px; }
  .modal__meta { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: flex; }
  .header__inner { height: 68px; }
  .clock { display: none; }
  .hero { padding-top: 84px; }
  .hero__inner { min-height: calc(100svh - 84px); }
  .hero__meta span:nth-child(2) { display: none; }
  .contents { height: 100svh; }
  .contents__sticky { padding: 84px 0 24px; }
  .contents__list { transform: translateX(42vw); }
  .contents__head { font-size: 7px; }
  .contents__list { width: calc(100% - var(--gutter) * 2); }
  .contents__row {
    grid-template-columns: 54px minmax(0, 1fr) 16px;
    gap: 12px;
    min-height: 48px;
    padding: 8px 0;
  }
  .contents__num { font-size: 17px; }
  .contents__title {
    flex-wrap: wrap;
    gap: 2px 10px;
    font-size: 20px;
  }
  .contents__title em { font-size: 5.5px; letter-spacing: 0.1em; }
  .contents__meta { display: none; }
  .contents__row .contents__arrow { font-size: 12px; }
  .contents__foot { font-size: 6.5px; }
  .work__split,
  .work--reverse .work__split { grid-template-columns: 1fr; gap: 30px; }
  .work--reverse .work__media { order: 1; }
  .work--reverse .work__panel { order: 2; }
  .work__media--split { aspect-ratio: 4 / 3; }
  .work--paper__inner { grid-template-columns: 1fr; gap: 40px; }
  .work--paper__copy { max-width: 620px; }
  .work--paper__media { order: 2; }
  .intro__head { grid-template-columns: 1fr; gap: 24px; }
  .intro__toc { display: none; }
  .intro__aside { gap: 0; }
  .intro__body { margin-left: 0; }
  .section-head { grid-template-columns: 1fr; gap: 24px; }
  .about__aside { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline__col { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .archive__head { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .hero__cn { font-size: clamp(64px, 18vw, 120px); }
  .hero__en { font-size: clamp(22px, 6vw, 34px); letter-spacing: 0.16em; }
  .hero__visual { height: 40vh; min-height: 300px; }
  .hero__poster--main { width: 56%; right: 6%; }
  .hero__poster--sub { width: 40%; left: 4%; bottom: 0; }
  .hero__poster figcaption { display: none; }
  .orbit-portrait { width: 32%; }
  .hero__foot { align-items: center; }
  .hero__note { display: none; }

  .marquee { padding: 14px 0; }
  .intro__cols { grid-template-columns: 1fr; gap: 18px; }
  .stats { flex-wrap: wrap; gap: 22px 34px; }

  .work__info { grid-template-columns: 1fr; gap: 20px; }
  .work__side { grid-column: auto; }
  .work__tags { justify-content: flex-start; }
  .work--full .work__media { aspect-ratio: 4 / 3; }
  .work--yuanming .work__media { aspect-ratio: 16 / 9; }

  .triptych {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .triptych::-webkit-scrollbar { display: none; }
  .triptych__item { flex: 0 0 72%; scroll-snap-align: start; }

  .work--paper__copy h3 { font-size: clamp(42px, 12vw, 64px); }
  .work--paper__copy blockquote { font-size: 16px; }

  .archive__grid { grid-template-columns: 1fr; gap: 34px; }
  .tile--wide, .tile--type { grid-column: auto; }
  .tile__media { aspect-ratio: 4 / 3; }
  .tile--wide .tile__media { aspect-ratio: 16 / 10; }
  .tile__body { display: block; }
  .tile__title { text-align: left; margin-top: 8px; }
  .tile__title h3, .tile--wide .tile__title h3 { font-size: 22px; }
  .tile--type { grid-template-columns: 1fr; padding: 26px 22px; gap: 24px; }
  .tile--type .tile__body { border-top: 1px solid rgba(255, 255, 255, 0.16); padding-top: 16px; }

  .about__head h2 { font-size: clamp(34px, 9vw, 54px); }
  .footer__actions .btn { flex: 1 1 100%; }

  .modal__gallery { grid-template-columns: 1fr; }
  .modal__gallery .is-wide { grid-column: auto; }
  .modal__gallery.is-phones { grid-template-columns: 1fr 1fr; }
  .modal__cover-fig img { max-height: 58vh; }
  .film__frame { width: 220px; }
  .film__track { animation-duration: 38s; }
  .film__head { font-size: 7px; letter-spacing: 0.12em; }
  .modal__meta { grid-template-columns: 1fr 1fr; gap: 18px; }
  .modal__body p { font-size: 14.5px; }
  .lightbox { padding: 20px; }
}

@media (max-width: 520px) {
  .hero__cn { font-size: 17vw; }
  .hero__kicker { font-size: 8px; letter-spacing: 0.18em; }
  .hero__statement { font-size: 18px; }
  .hero__sub { font-size: 7.5px; letter-spacing: 0.12em; }
  .hero__visual { height: 34vh; min-height: 250px; }
  .hero__cross { display: none; }
  .stats b { font-size: 34px; }
  .work__title h3 { font-size: 28px; }
  .work--paper__copy h3 { font-size: 40px; }
  .encounter__media { aspect-ratio: 1 / 1.1; }
  .footer__mark { font-size: 46vw; }
  .modal__head h2 { font-size: 36px; }
}

@media (hover: none) {
  .work__badge { opacity: 1; transform: none; background: rgba(0, 0, 0, 0.3); }
  .work--paper__media .work__badge { background: rgba(255, 255, 255, 0.65); }
}

/* ---------------- screenshot / debug mode ---------------- */

.is-shot .loader,
.is-shot .cursor,
.is-shot .progress,
.is-shot .rail { display: none !important; }
.is-shot .hero__cn .char > span { animation: none !important; transform: none !important; }
.is-shot .hero__poster { animation: none !important; opacity: 1 !important; }
.is-shot .reveal { opacity: 1 !important; transform: none !important; }
.is-shot .marquee__track { animation: none !important; }

/* ---------------- dark gray bands ---------------- */

.work--paper {
  background: #17181a;
  color: var(--ivory);
  --line: rgba(255, 255, 255, 0.15);
  --line-strong: rgba(255, 255, 255, 0.34);
  --muted: #9a958b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.work--paper__copy h3 { color: var(--ivory); }
.work--paper__copy .work__en { color: rgba(255, 255, 255, 0.45); }
.work--paper__copy .work__desc { color: #b8b2a7; }
.work--paper__copy blockquote { color: #d8d2c6; }
.work--paper__copy .work__tags li {
  color: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.16);
}
.work--paper__copy .text-link {
  color: var(--ivory);
  border-color: rgba(255, 255, 255, 0.32);
}
.work--paper__copy .text-link:hover {
  color: var(--red-soft);
  border-color: var(--red);
}
.work--paper__media {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 70px rgba(0, 0, 0, 0.48);
}
.work--paper__media .work__badge {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(0, 0, 0, 0.34);
  color: var(--ivory);
}

.archive {
  background: #131415;
  color: var(--ivory);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.32);
  --muted: #9a958b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.archive .eyebrow { color: rgba(255, 255, 255, 0.55); }
.archive__head { border-bottom-color: rgba(255, 255, 255, 0.14); }
.filters button {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.6);
}
.filters button:hover { border-color: rgba(255, 255, 255, 0.4); }
.filters button.is-active {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--ink);
}
.tile__media { background: #222325; }
.tile__body { border-top-color: rgba(255, 255, 255, 0.14); }
.tile__meta { color: rgba(255, 255, 255, 0.48); }
.tile__title h3 { color: var(--ivory); }
.tile__title p { color: rgba(255, 255, 255, 0.38); }
.tile:hover .tile__title h3 { color: var(--red-soft); }
.tile--type {
  background: #0b0c0d;
  color: var(--ivory);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
  .hero__cn .char > span { transform: none; }
  .film__track { animation: none; }
  .film__row { overflow-x: auto; }
}
