/* ================================================================
   孙警醒 · 作品集
   ================================================================ */

@font-face {
  font-family: "SerifSC";
  src: url("../assets/fonts/serif-sc.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument";
  src: url("../assets/fonts/instrument-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument";
  src: url("../assets/fonts/instrument-regular.woff2") format("woff2");
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Mono";
  src: url("../assets/fonts/mono.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
}

:root {
  --ink: #0c0d0b;
  --ink-2: #141511;
  --paper: #ece5d6;
  --paper-2: #e2d9c6;
  --amber: #d6a25e;
  --seal: #b23a26;
  --open: #7fae8a;
  --code: #d6a25e;
  --private: #8b8a84;

  --bg: var(--ink);
  --fg: var(--paper);
  --muted: rgba(236, 229, 214, .58);
  --line: rgba(236, 229, 214, .14);

  --serif: "SerifSC", "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --it: "Instrument", "Times New Roman", serif;
  --mono: "Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.77, 0, .175, 1);
}

body.theme-paper {
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: rgba(12, 13, 11, .58);
  --line: rgba(12, 13, 11, .16);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .9s var(--ease), color .9s var(--ease);
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--amber); color: var(--ink); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--paper); color: var(--ink); padding: 8px 14px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 1px solid var(--amber); outline-offset: 4px; }

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.it { font-family: var(--it); font-style: italic; letter-spacing: 0; }
.dim { color: var(--muted); }

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

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 150; background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  transition: transform 1.1s var(--ease-io);
}
.loader.is-done { transform: translateY(-100%); }
.loader__seal {
  display: grid; grid-template-columns: 1fr; gap: 0;
  width: 64px; padding: 6px 0; border: 2px solid var(--seal); color: var(--seal);
  font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1.15; text-align: center;
  animation: stamp .9s var(--ease) both;
}
@keyframes stamp { from { opacity: 0; transform: scale(1.6) rotate(-8deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.loader__count { position: absolute; right: var(--pad); bottom: var(--pad); font-family: var(--it); font-style: italic; font-size: clamp(64px, 12vw, 160px); line-height: 1; }

/* ---------- cursor ---------- */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 120; display: none; }
body.has-cursor .cursor { display: block; }
body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
.cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--amber); }
.cursor__ring {
  width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid rgba(214, 162, 94, .55);
  display: grid; place-items: center;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background-color .45s var(--ease), border-color .45s;
}
.cursor__label { font-family: var(--sans); font-size: 12px; letter-spacing: .1em; color: var(--ink); opacity: 0; transition: opacity .3s; white-space: nowrap; }
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: transparent; background: rgba(214, 162, 94, .18); }
.cursor.is-label .cursor__ring { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--amber); border-color: var(--amber); }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-label .cursor__dot { opacity: 0; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad); mix-blend-mode: difference; color: #ece5d6;
}
.nav__brand { display: flex; align-items: center; gap: 12px; }
.seal-mini {
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 1.5px solid currentColor; font-family: var(--serif); font-weight: 700; font-size: 15px; line-height: 1;
}
.nav__name { font-family: var(--serif); font-size: 15px; letter-spacing: .3em; }
.nav__links { display: flex; gap: clamp(16px, 3vw, 40px); font-size: 14px; letter-spacing: .1em; }
.nav__links a { display: inline-flex; align-items: baseline; gap: 8px; position: relative; padding: 4px 0; }
.nav__links a .mono { font-size: 10px; opacity: .55; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; }
.nav__progress span { display: block; height: 100%; background: currentColor; transform-origin: left; transform: scaleX(0); opacity: .5; }

/* ---------- reveal primitives ---------- */
.reveal-up { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal-up.is-in { opacity: 1; transform: none; }
.reveal-lines .line { display: block; overflow: hidden; padding-bottom: .08em; }
.reveal-lines .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.3s var(--ease); }
.reveal-lines .line:nth-child(2) > span { transition-delay: .1s; }
.reveal-lines .line:nth-child(3) > span { transition-delay: .2s; }
.reveal-lines.is-in .line > span { transform: none; }

.section-tag { display: flex; align-items: baseline; gap: 14px; font-size: 13px; letter-spacing: .2em; color: var(--muted); }
.section-tag .it { font-size: 18px; letter-spacing: 0; }
.section-tag::before { content: ""; width: 40px; height: 1px; background: currentColor; align-self: center; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__meta { position: absolute; top: 96px; display: flex; flex-direction: column; gap: 4px; }
.hero__meta--tl { left: var(--pad); }
.hero__meta--tr { right: var(--pad); text-align: right; }
.hero__meta--tr .it { font-size: clamp(20px, 2vw, 28px); color: var(--amber); }
.hero__bottom { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(28px, 6vh, 56px); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.hero__tagline { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.6vw, 40px); line-height: 1.35; letter-spacing: .06em; }
.hero__scroll { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.hero__scroll-line { position: relative; width: 72px; height: 1px; background: var(--line); overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--amber); animation: scan 2.4s var(--ease-io) infinite; }
@keyframes scan { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* ---------- about ---------- */
.about { position: relative; height: 260vh; }
.about__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 48px; padding: 0 var(--pad); max-width: 1440px; margin: 0 auto; }
.about__text { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.6vw, 58px); line-height: 1.5; letter-spacing: .02em; max-width: 22em; text-wrap: pretty; }
.about__text .ch { opacity: .14; transition: opacity .25s linear, color .4s; }
.about__text .ch.on { opacity: 1; }
.about__text .ch.hl.on { color: var(--amber); }

/* ---------- facets ---------- */
.facets { padding: 12vh var(--pad) 16vh; max-width: 1440px; margin: 0 auto; }
.facets__stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 28px 0 40px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); padding-left: 0; }
.stat + .stat { padding-left: clamp(16px, 3vw, 40px); }
.stat:last-child { border-right: 0; }
.stat__num { font-family: var(--it); font-style: italic; font-size: clamp(72px, 11vw, 168px); line-height: .9; }
.stat__label { color: var(--muted); font-size: 14px; letter-spacing: .12em; }
.facets__list { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.facet { padding: 28px 20px 0 0; display: flex; flex-direction: column; gap: 14px; }
.facet + .facet { padding-left: 20px; border-left: 1px solid var(--line); }
.facet:nth-child(2) { transition-delay: .08s; } .facet:nth-child(3) { transition-delay: .16s; } .facet:nth-child(4) { transition-delay: .24s; } .facet:nth-child(5) { transition-delay: .32s; }
.facet .mono { color: var(--amber); }
.facet h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: .08em; }
.facet p { color: var(--muted); font-size: 14px; line-height: 1.8; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; padding: 4vh 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee__track { display: flex; width: max-content; align-items: center; gap: 4vw; will-change: transform; }
.marquee__track span { font-family: var(--serif); font-weight: 700; font-size: clamp(64px, 12vw, 180px); line-height: 1.1; color: transparent; -webkit-text-stroke: 1px var(--muted); letter-spacing: .05em; transition: color .5s, -webkit-text-stroke-color .5s; }
.marquee__track span:hover { color: var(--amber); -webkit-text-stroke-color: var(--amber); }
.marquee__track i { font-style: normal; color: var(--amber); font-size: clamp(20px, 3vw, 40px); }

/* ---------- featured ---------- */
.featured__head { padding: 18vh var(--pad) 6vh; max-width: 1440px; margin: 0 auto; }
.feat { position: relative; min-height: 100vh; padding: 10vh var(--pad); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 110px); align-items: center; max-width: 1600px; margin: 0 auto; }
.feat:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feat:nth-child(even) .feat__media { order: -1; }
.feat__num { font-family: var(--it); font-style: italic; font-size: clamp(90px, 12vw, 200px); line-height: .8; color: var(--amber); display: block; margin-bottom: 24px; }
.feat__kind { display: flex; gap: 12px; align-items: center; color: var(--muted); margin-bottom: 18px; }
.feat__title { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 5.6vw, 92px); line-height: 1.08; letter-spacing: .02em; }
.feat__title .ch { display: inline-block; transform: translateY(105%); opacity: 0; transition: transform 1.2s var(--ease), opacity 1.2s var(--ease); }
.feat__title-wrap { overflow: hidden; padding-bottom: .1em; }
.feat.is-in .feat__title .ch { transform: none; opacity: 1; }
.feat__en { font-family: var(--it); font-style: italic; font-size: clamp(20px, 2vw, 28px); color: var(--muted); margin-top: 8px; }
.feat__lead { margin-top: 32px; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.95; max-width: 30em; color: var(--muted); }
.feat__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip { font-size: 12px; letter-spacing: .08em; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }
.feat__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; align-items: center; }
.feat__copy > *:not(.feat__title-wrap):not(.feat__num) { opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease) .35s, transform 1s var(--ease) .35s; }
.feat.is-in .feat__copy > * { opacity: 1 !important; transform: none !important; }

.feat__media { position: relative; }
.frame {
  display: block; width: 100%; padding: 0; text-align: left;
  position: relative; overflow: hidden; border-radius: 4px; aspect-ratio: 3 / 2; background: var(--ink-2);
  clip-path: inset(14% 10% 14% 10%); transition: clip-path 1.6s var(--ease);
}
.feat.is-in .frame { clip-path: inset(0 0 0 0); }
.frame img, .frame .illus { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; object-position: top center; will-change: transform; transform: scale(1.18); transition: transform 1.8s var(--ease); }
.feat.is-in .frame img, .feat.is-in .frame .illus { transform: scale(1); }
.frame__cap { position: absolute; left: 0; right: 0; bottom: -34px; display: flex; justify-content: space-between; color: var(--muted); }

.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 15px 26px; border-radius: 99px;
  font-size: 14px; letter-spacing: .14em; overflow: hidden; isolation: isolate; border: 1px solid var(--fg);
  transition: color .5s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg); transform: translateY(101%); border-radius: inherit; transition: transform .6s var(--ease); }
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: none; }
.btn .arr { transition: transform .5s var(--ease); }
.btn:hover .arr { transform: translate(3px, -3px); }
.btn--ghost { border-color: var(--line); color: var(--muted); }
.btn--ghost::before { background: var(--line); }
.btn--ghost:hover { color: var(--fg); }
.access { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: middle; flex: none; }
.dot--open { background: var(--open); box-shadow: 0 0 0 4px rgba(127, 174, 138, .16); }
.dot--code { background: var(--code); box-shadow: 0 0 0 4px rgba(214, 162, 94, .16); }
.dot--private { background: var(--private); box-shadow: 0 0 0 4px rgba(139, 138, 132, .16); }

/* 英语学练机 示意插画 */
.illus { display: grid; place-items: center; background: radial-gradient(120% 90% at 30% 20%, #1d2a2b 0%, #10140f 55%, #0b0c0a 100%); }
.illus svg { width: 74%; height: auto; max-height: 82%; overflow: visible; }
.frame__inner, .preview__item { position: absolute; inset: 0; }
.feat__chips--flat { margin: 0; }
.illus .wave rect:nth-child(1) { animation-delay: 0.00s; }
.illus .wave rect:nth-child(2) { animation-delay: 0.11s; }
.illus .wave rect:nth-child(3) { animation-delay: 0.22s; }
.illus .wave rect:nth-child(4) { animation-delay: 0.33s; }
.illus .wave rect:nth-child(5) { animation-delay: 0.44s; }
.illus .wave rect:nth-child(6) { animation-delay: 0.55s; }
.illus .wave rect:nth-child(7) { animation-delay: 0.66s; }
.illus .wave rect:nth-child(8) { animation-delay: 0.77s; }
.illus .wave rect:nth-child(9) { animation-delay: 0.88s; }
.illus .wave rect { transform-box: fill-box; transform-origin: center; animation: wave 1.2s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.illus .bubble { animation: bubble 6s var(--ease) infinite; opacity: 0; }
.illus .bubble--b { animation-delay: 1.4s; }
@keyframes bubble { 0% { opacity: 0; transform: translateY(10px); } 10%, 75% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: translateY(-6px); } }
.illus .ring { transform-origin: 160px 210px; animation: ring 3s ease-out infinite; opacity: 0; }
.illus .ring--2 { animation-delay: 1s; } .illus .ring--3 { animation-delay: 2s; }
@keyframes ring { 0% { opacity: .6; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.8); } }
.illus__tag { position: absolute; left: 16px; top: 14px; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: rgba(236, 229, 214, .45); }

/* ---------- works index ---------- */
.works { padding: 18vh var(--pad) 14vh; max-width: 1600px; margin: 0 auto; }
.works__head { display: grid; gap: 28px; margin-bottom: 6vh; }
.works__title { font-family: var(--serif); font-weight: 600; font-size: clamp(56px, 9vw, 150px); line-height: 1; letter-spacing: .02em; }
.works__title .it { font-weight: 400; color: var(--amber); }
.works__title sup { font-size: 14px; vertical-align: top; position: relative; top: .6em; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  position: relative; padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; font-size: 13px; letter-spacing: .1em; color: var(--muted);
  transition: color .4s, border-color .4s, background-color .4s;
}
.filter sup { font-family: var(--mono); font-size: 9px; margin-left: 4px; }
.filter:hover { color: var(--fg); border-color: var(--fg); }
.filter.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.index { border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); overflow: hidden; transition: opacity .6s var(--ease), max-height .8s var(--ease), border-color .6s; max-height: 260px; }
.row.is-hidden { opacity: 0; max-height: 0; border-color: transparent; }
.row__btn {
  width: 100%; text-align: left; display: grid; align-items: center; gap: 24px;
  grid-template-columns: 56px minmax(0, 1fr) 160px 260px 40px; padding: 30px 0; position: relative;
}
.row__btn::before { content: ""; position: absolute; inset: 0; background: var(--fg); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); z-index: -1; opacity: .04; }
.row__btn:hover::before, .row__btn:focus-visible::before { transform: none; }
.row__num { color: var(--muted); }
.row__title { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 3.2vw, 52px); line-height: 1.15; letter-spacing: .02em; transition: transform .7s var(--ease), color .5s; display: block; }
.row__line { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; transition: transform .7s var(--ease) .04s; }
.row__btn:hover .row__title, .row__btn:hover .row__line { transform: translateX(18px); }
.row__btn:hover .row__title { color: var(--amber); }
.row__kind { color: var(--muted); font-size: 13px; letter-spacing: .12em; }
.row__access { color: var(--muted); font-size: 13px; display: flex; align-items: center; }
.row__arrow { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; transition: transform .6s var(--ease), background-color .5s, color .5s, border-color .5s; }
.row__btn:hover .row__arrow { transform: rotate(-45deg); background: var(--amber); border-color: var(--amber); color: var(--ink); }
.row__thumb { display: none; }
.works__foot { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 32px; align-items: center; text-transform: none; letter-spacing: .06em; }
.works__foot > span { display: inline-flex; align-items: center; }

.preview {
  position: fixed; left: 0; top: 0; z-index: 40; width: 340px; aspect-ratio: 4 / 3; pointer-events: none; border-radius: 4px; overflow: hidden;
  opacity: 0; transform: scale(.85); transition: opacity .4s var(--ease); will-change: transform; background: var(--ink-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.preview.is-on { opacity: 1; }
.preview img, .preview .illus { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity .35s, transform .7s var(--ease); transform: scale(1.12); }
.preview .is-current { opacity: 1; transform: scale(1); }

/* ---------- outro ---------- */
.outro { min-height: 100vh; padding: 20vh var(--pad) 10vh; display: flex; flex-direction: column; justify-content: center; gap: 6vh; max-width: 1600px; margin: 0 auto; }
.outro__kicker { color: var(--seal); }
.outro__title { font-family: var(--serif); font-weight: 600; font-size: clamp(52px, 10vw, 176px); line-height: 1.08; letter-spacing: .01em; }
.outro__title em { font-weight: 400; color: var(--seal); }
.outro__contact { display: flex; flex-wrap: wrap; gap: 16px 48px; font-size: 18px; }
.outro__contact a { display: inline-flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 6px; transition: border-color .4s; }
.outro__contact a:hover { border-color: var(--fg); }
.outro__contact .mono { color: var(--muted); }
.outro__top { align-self: flex-start; display: inline-flex; align-items: center; gap: 16px; font-size: 14px; letter-spacing: .2em; }
.arrow-up { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .6s var(--ease), background-color .4s, color .4s; }
.outro__top:hover .arrow-up { transform: translateY(-6px); background: var(--fg); color: var(--bg); }
.footer { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 28px var(--pad) 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; letter-spacing: .06em; max-width: 1600px; margin: 0 auto; }
.footer__note { max-width: 40em; }

/* ---------- detail drawer ---------- */
.detail { position: fixed; inset: 0; z-index: 100; }
.detail[hidden] { display: none; }
.detail__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 7, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .6s var(--ease); }
.detail__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(820px, 100%); background: var(--ink); color: var(--paper);
  overflow-y: auto; overscroll-behavior: contain; transform: translateX(100%); transition: transform .9s var(--ease); outline: none;
  --fg: var(--paper); --muted: rgba(236, 229, 214, .58); --line: rgba(236, 229, 214, .14); --bg: var(--ink);
}
.detail.is-open .detail__backdrop { opacity: 1; }
.detail.is-open .detail__panel { transform: none; }
.detail__close { position: sticky; top: 20px; margin: 20px 20px 0 auto; z-index: 3; width: 48px; height: 48px; border-radius: 50%; background: rgba(12, 13, 11, .7); border: 1px solid var(--line); display: grid; place-items: center; float: right; transition: transform .5s var(--ease); }
.detail__close span { position: absolute; width: 18px; height: 1px; background: var(--paper); transform: rotate(45deg); }
.detail__close span + span { transform: rotate(-45deg); }
.detail__close:hover { transform: rotate(90deg); }
.detail__body { padding: 0 clamp(24px, 5vw, 64px) 80px; clear: both; }
.d-hero { margin: 8px 0 0; aspect-ratio: 16 / 10; border-radius: 4px; overflow: hidden; position: relative; background: var(--ink-2); clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease) .25s; }
.d-hero img, .d-hero .illus { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transform: scale(1.15); transition: transform 1.6s var(--ease) .25s; }
.detail.is-open .d-hero { clip-path: inset(0 0 0 0); }
.detail.is-open .d-hero img, .detail.is-open .d-hero .illus { transform: none; }
.d-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.detail.is-open .d-stagger > * { opacity: 1; transform: none; }
.d-stagger > *:nth-child(1) { transition-delay: .35s; } .d-stagger > *:nth-child(2) { transition-delay: .42s; } .d-stagger > *:nth-child(3) { transition-delay: .49s; }
.d-stagger > *:nth-child(4) { transition-delay: .56s; } .d-stagger > *:nth-child(5) { transition-delay: .63s; } .d-stagger > *:nth-child(n+6) { transition-delay: .7s; }
.d-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; color: var(--muted); }
.d-title { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 6vw, 72px); line-height: 1.1; margin-top: 18px; }
.d-en { font-family: var(--it); font-style: italic; font-size: 24px; color: var(--amber); margin-top: 6px; }
.d-lead { font-family: var(--serif); font-size: clamp(18px, 2vw, 22px); line-height: 1.85; margin-top: 28px; }
.d-grid { display: grid; grid-template-columns: 140px 1fr; gap: 0 32px; margin-top: 44px; border-top: 1px solid var(--line); }
.d-grid > dt, .d-grid > dd { padding: 22px 0; border-bottom: 1px solid var(--line); margin: 0; }
.d-grid > dt { color: var(--muted); font-size: 13px; letter-spacing: .14em; }
.d-grid ul li { position: relative; padding-left: 20px; line-height: 1.9; }
.d-grid ul li::before { content: ""; position: absolute; left: 0; top: .9em; width: 8px; height: 1px; background: var(--amber); }
.d-notes li { color: var(--muted); font-size: 14px; }
.d-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; align-items: center; }
.d-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.d-nav button { display: flex; flex-direction: column; gap: 4px; text-align: left; color: var(--muted); transition: color .4s; }
.d-nav button:last-child { text-align: right; }
.d-nav button:hover { color: var(--paper); }
.d-nav .t { font-family: var(--serif); font-size: 20px; color: var(--paper); }
body.detail-open { overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .row__btn { grid-template-columns: 44px minmax(0, 1fr) 200px 40px; }
  .row__kind { display: none; }
  .facets__list { grid-template-columns: repeat(3, 1fr); }
  .facet:nth-child(4) { border-left: 0; padding-left: 0; }
  .facet { padding-bottom: 28px; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .nav { padding: 16px var(--pad); }
  .nav__name { display: none; }
  .nav__links { gap: 18px; font-size: 13px; }
  .nav__links a .mono { display: none; }
  .hero__meta { top: 76px; }
  .hero__bottom { flex-direction: column; align-items: flex-start; }
  .hero__scroll .mono:first-child { display: none; }
  .about { height: 220vh; }
  .facets__stats { grid-template-columns: 1fr 1fr 1fr; }
  .stat__label { font-size: 12px; letter-spacing: .04em; }
  .facets__list { grid-template-columns: 1fr; }
  .facet, .facet + .facet { border-left: 0; padding: 22px 0; border-bottom: 1px solid var(--line); }
  .feat, .feat:nth-child(even) { grid-template-columns: 1fr; min-height: auto; padding: 8vh var(--pad) 12vh; gap: 28px; }
  .feat:nth-child(even) .feat__media, .feat .feat__media { order: -1; }
  .feat__num { font-size: 72px; margin-bottom: 12px; }
  .frame__cap { position: static; margin-top: 10px; }
  .row__btn { grid-template-columns: 88px minmax(0, 1fr) 32px; gap: 16px; padding: 20px 0; }
  .row__num, .row__access { display: none; }
  .row__thumb { display: block; grid-column: 1; grid-row: 1; width: 88px; aspect-ratio: 4 / 3; border-radius: 3px; overflow: hidden; position: relative; background: var(--ink-2); }
  .row__thumb img, .row__thumb .illus { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
  .row__thumb .illus svg { width: 90%; }
  .row__thumb .illus__tag { display: none; }
  .row__arrow { width: 32px; height: 32px; }
  .row__btn:hover .row__title, .row__btn:hover .row__line { transform: none; }
  .row__line { font-size: 13px; line-height: 1.5; }
  .preview { display: none; }
  .d-grid { grid-template-columns: 1fr; }
  .d-grid > dt { border-bottom: 0; padding-bottom: 4px; }
  .d-grid > dd { padding-top: 4px; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .grain { display: none; }
  .about { height: auto; }
  .about__sticky { position: static; height: auto; padding: 20vh var(--pad); }
  .about__text .ch { opacity: 1; }
}
