/* ==========================================================================
   WildPointer · 野指针 — style.css
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --navy: #030D42;
  --orange: #F74D00;
  --deep: #031F64;
  --blue: #1C1382;
  --violet: #5F0689;
  --magenta: #C30D84;

  --paper: #F2EFE7;
  --paper-2: #E8E4D8;
  --paper-3: #DDD8C9;
  --ink: #030D42;
  --ink-2: #2B3263;
  --muted: #5A5F82;
  --line: rgba(3, 13, 66, .14);
  --line-2: rgba(3, 13, 66, .28);
  --accent: #F74D00;
  --accent-text: #B83600;
  --on-accent: #030D42;
  --plane-wing: #FFFFFF;
  --plane-stroke: #030D42;
  --wm-a: var(--ink);
  --wm-b: var(--accent);
  --grain-op: .055;
  --grain-blend: multiply;

  --f-display: "Fraunces", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --f-sans: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --gutter: clamp(20px, 4vw, 64px);
  --sec-pad: clamp(96px, 13vw, 200px);
  --radius: clamp(14px, 1.4vw, 22px);
  --header-h: 76px;

  --ease: cubic-bezier(.19, 1, .22, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
}

[data-theme="dark"] {
  --paper: #040A2B;
  --paper-2: #0B1440;
  --paper-3: #131D52;
  --ink: #ECEAF4;
  --ink-2: #C5C7DC;
  --muted: #8C91B4;
  --line: rgba(236, 234, 244, .13);
  --line-2: rgba(236, 234, 244, .28);
  --accent: #FF5A1A;
  --accent-text: #FF7A45;
  --plane-wing: #0B1440;
  --plane-stroke: #ECEAF4;
  --grain-op: .07;
  --grain-blend: screen;
}

/* Inverted blocks: dark in light mode, light in dark mode */
.invert {
  --paper: #030D42;
  --paper-2: #0B1650;
  --paper-3: #15205E;
  --ink: #F2EFE7;
  --ink-2: #C9CBDD;
  --muted: #9095B8;
  --line: rgba(242, 239, 231, .14);
  --line-2: rgba(242, 239, 231, .3);
  --accent: #FF5A1A;
  --accent-text: #FF7A45;
  --plane-wing: #0B1650;
  --plane-stroke: #F2EFE7;
  background: var(--paper);
  color: var(--ink);
}
[data-theme="dark"] .invert {
  --paper: #F2EFE7;
  --paper-2: #E8E4D8;
  --paper-3: #DDD8C9;
  --ink: #030D42;
  --ink-2: #2B3263;
  --muted: #5A5F82;
  --line: rgba(3, 13, 66, .14);
  --line-2: rgba(3, 13, 66, .28);
  --accent: #F74D00;
  --accent-text: #B83600;
  --plane-wing: #fff;
  --plane-stroke: #030D42;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 90px; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--on-accent); }

html.has-smooth { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.75 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
body::after {
  content: "";
  position: fixed; inset: -50%;
  z-index: 8000;
  pointer-events: none;
  opacity: var(--grain-op);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(0, 0); }
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wm-a { fill: var(--wm-a); }
.wm-b { fill: var(--wm-b); }
.mono { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .02em; line-height: 1.5; font-feature-settings: "zero" 1; }
.wrap { width: 100%; max-width: 1720px; margin-inline: auto; padding-inline: var(--gutter); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 9999; padding: 10px 16px; border-radius: 99px; background: var(--ink); color: var(--paper); transition: top .3s var(--ease); }
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.dot-live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2FCB71; margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 0 0 rgba(47, 203, 113, .6); animation: live 2.4s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(47, 203, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 203, 113, 0); } }

/* ---------- Split text ---------- */
.sx { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em .1em .14em .02em; margin: -.08em -.1em -.14em -.02em; }
.sx > .sxi { display: inline-block; font-style: inherit; transform: translate3d(0, 110%, 0) rotate(4deg); transform-origin: 0 100%; transition: transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); will-change: transform; }
.is-in .sx > .sxi, .is-in.sx > .sxi { transform: none; }
html:not(.js) .sx > .sxi { transform: none; }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 36px, 0); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Loader ---------- */
.loader { display: none; }
.is-loading .loader {
  position: fixed; inset: 0; z-index: 9500;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background: var(--paper);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.1s var(--ease-io);
}
.loader__mark { width: 92px; animation: loader-bob 1.2s var(--ease-io) infinite alternate; }
.loader__addr { font-size: clamp(2.6rem, 7vw, 5.5rem); font-weight: 500; letter-spacing: -.02em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.loader__cap { color: var(--muted); }
.loader__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 40px; height: 1px; background: var(--line); }
.loader__bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader.is-done .loader__mark { animation: loader-fly .9s var(--ease-io) forwards; }
@keyframes loader-bob { to { transform: translate(6px, -8px) rotate(-3deg); } }
@keyframes loader-fly { to { transform: translate(60vw, -60vh) scale(.6) rotate(8deg); } }

/* ---------- Page transition ---------- */
.pt { position: fixed; inset: 0; z-index: 9400; pointer-events: none; background: var(--navy); transform: translateY(101%); visibility: hidden; display: grid; place-items: center; }
.pt__plane { width: 120px; --plane-wing: #0B1650; --plane-stroke: #F2EFE7; transform: translate(-60vw, 40vh) rotate(-8deg); }
.pt.is-leaving, .pt.is-entering { visibility: visible; }
.pt.is-leaving { transform: translateY(0); transition: transform .7s var(--ease-io); }
.pt.is-leaving .pt__plane { transform: translate(0, 0); transition: transform .9s var(--ease) .15s; }
.pt.is-entering { transform: translateY(0); }
.pt.is-entering .pt__plane { transform: translate(0, 0); }
.pt.is-entering.go { transform: translateY(-101%); transition: transform .9s var(--ease-io) .1s; }
.pt.is-entering.go .pt__plane { transform: translate(60vw, -50vh) rotate(6deg); transition: transform .9s var(--ease-io); }

/* ---------- Cursor ---------- */
.cursor { display: none; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [data-cursor] { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }
.has-cursor .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 9900; pointer-events: none; }
.cursor__plane { position: absolute; left: 0; top: 0; width: 26px; transform-origin: 0 0; will-change: transform; transition: opacity .25s; }
.cursor__plane svg { transform: scaleX(-1) translate(-2px, -3px); transform-origin: 50% 50%; filter: drop-shadow(0 2px 3px rgba(3, 13, 66, .18)); }
.cursor__ring { position: absolute; left: 0; top: 0; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transform: scale(0); transition: transform .5s var(--ease); will-change: transform; }
.cursor__label { font: 600 13px/1 var(--f-sans); letter-spacing: .04em; opacity: 0; transition: opacity .2s; }
.cursor.is-label .cursor__ring { transform: scale(1); }
.cursor.is-label .cursor__label { opacity: 1; transition-delay: .1s; }
.cursor.is-label .cursor__plane { opacity: 0; }
.cursor.is-link .cursor__plane svg { transform: scaleX(-1) translate(-2px, -3px) scale(1.35); transition: transform .3s var(--ease-back); }
.cursor.is-hidden { opacity: 0; }
.cursor.is-down .cursor__plane svg { transform: scaleX(-1) scale(.8); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 900;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: var(--gutter);
  transition: transform .6s var(--ease), background-color .4s, box-shadow .4s;
}
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--paper) 78%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); opacity: 0; transition: opacity .4s; border-bottom: 1px solid var(--line); }
.header.is-scrolled::before { opacity: 1; }
.header.is-hidden { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 12px; justify-self: start; }
.brand__mark { width: 34px; transition: transform .6s var(--ease-back); }
.brand__word { width: 116px; }
.brand:hover .brand__mark { transform: translate(4px, -4px) rotate(-8deg); }
.nav { display: flex; gap: clamp(20px, 2.6vw, 44px); }
.nav__link { position: relative; display: inline-flex; align-items: flex-start; gap: 3px; font-size: .95rem; font-weight: 500; }
.nav__link sup { font: 500 .6rem/1 var(--f-mono); color: var(--muted); margin-top: 2px; }
.nav__link::after { content: ""; position: absolute; left: 0; right: 14px; bottom: -4px; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .5s var(--ease); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: 0 50%; }
.roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; }
.roll::after { content: attr(data-text); position: absolute; left: 0; top: 100%; color: var(--accent-text); }
.roll, .roll::after { transition: transform .55s var(--ease); }
a:hover > .roll { transform: translateY(-100%); }
a:hover > .roll::after { transform: translateY(0); }
.header__end { justify-self: end; display: flex; align-items: center; gap: 18px; }
.header__clock { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.header__tz { color: var(--muted); }

.theme-toggle { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: border-color .3s, transform .5s var(--ease-back); }
.theme-toggle:hover { border-color: var(--ink); transform: rotate(-20deg); }
.theme-toggle svg { width: 20px; overflow: visible; }
.theme-toggle__sun { fill: var(--ink); transition: r .6s var(--ease); }
.theme-toggle__moon { transition: cx .6s var(--ease), cy .6s var(--ease); }
.theme-toggle__rays { stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; transform-origin: 12px 12px; transition: transform .6s var(--ease), opacity .4s; }
[data-theme="dark"] .theme-toggle__sun { r: 8.5; }
[data-theme="dark"] .theme-toggle__moon { cx: 17; cy: 7; }
[data-theme="dark"] .theme-toggle__rays { transform: rotate(60deg) scale(.4); opacity: 0; }

.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); position: relative; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.6px; background: var(--paper); transition: transform .5s var(--ease); }
.menu-btn span:first-child { top: 17px; } .menu-btn span:last-child { top: 23px; }
.menu-open .menu-btn span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-3px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 800; background: var(--paper); display: flex; flex-direction: column; justify-content: center; padding: var(--header-h) var(--gutter) 40px; clip-path: circle(0 at calc(100% - var(--gutter) - 21px) 38px); transition: clip-path .8s var(--ease-io); visibility: hidden; }
.menu-open .menu { clip-path: circle(150% at calc(100% - var(--gutter) - 21px) 38px); visibility: visible; }
.menu__nav { display: grid; gap: 4px; }
.menu__nav a { font: 500 clamp(2.6rem, 12vw, 4.5rem)/1.2 var(--f-display); display: flex; gap: 10px; align-items: flex-start; transform: translateY(30px); opacity: 0; transition: transform .8s var(--ease), opacity .6s; }
.menu__nav sup { font: 500 .75rem/1 var(--f-mono); color: var(--accent-text); margin-top: 14px; }
.menu-open .menu__nav a { transform: none; opacity: 1; }
.menu-open .menu__nav a:nth-child(2) { transition-delay: .06s; } .menu-open .menu__nav a:nth-child(3) { transition-delay: .12s; } .menu-open .menu__nav a:nth-child(4) { transition-delay: .18s; }
.menu__foot { margin-top: auto; color: var(--muted); }

/* ---------- Buttons & links ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: 14px; height: 58px; padding: 0 30px; border-radius: 99px; font-weight: 600; font-size: .98rem; overflow: hidden; isolation: isolate; transition: color .5s var(--ease); }
.btn__fill { position: absolute; left: var(--x, 50%); top: var(--y, 50%); z-index: -1; width: 260%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%) scale(0); transition: transform .7s var(--ease); }
.btn:hover .btn__fill { transform: translate(-50%, -50%) scale(1); }
.btn__txt, .btn__ico { position: relative; }
.btn__ico { display: grid; place-items: center; width: 30px; height: 30px; margin-right: -14px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 1rem; transition: transform .6s var(--ease), background-color .4s; }
.btn:hover .btn__ico { transform: rotate(-45deg); background: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { color: var(--on-accent); }
.btn--ghost { box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { color: var(--on-accent); box-shadow: inset 0 0 0 1px transparent; }

.link-arrow { display: inline-flex; align-items: center; gap: 12px; font: 500 .95rem/1 var(--f-mono); padding-bottom: 8px; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1.5px no-repeat; transition: background-size .6s var(--ease), gap .5s var(--ease); }
.link-arrow svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .5s var(--ease); }
.link-arrow:hover { gap: 20px; background-size: 30% 1.5px; }
.link-arrow:hover svg { transform: translateX(4px); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: .78rem; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); }

/* ---------- Section heads ---------- */
.section { padding-block: var(--sec-pad); }
.sec-head { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: clamp(16px, 2vw, 32px); padding-bottom: clamp(20px, 2.4vw, 32px); margin-bottom: clamp(40px, 6vw, 88px); border-bottom: 1px solid var(--line); }
.sec-idx { color: var(--accent-text); }
.sec-title { font: 500 clamp(2.4rem, 5.6vw, 5.4rem)/1.05 var(--f-display); letter-spacing: -.03em; font-variation-settings: "opsz" 144, "SOFT" 50; }
.sec-en { font: italic 300 clamp(1rem, 1.4vw, 1.25rem)/1.2 var(--f-display); color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto auto; padding-top: calc(var(--header-h) + 8px); overflow: hidden; }
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero > *:not(canvas) { position: relative; z-index: 1; }
.hero__meta { display: flex; justify-content: space-between; gap: 20px; padding-block: 14px; color: var(--muted); border-bottom: 1px solid var(--line); background-clip: content-box; }
.hero__addr b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.hero__main { display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; gap: 20px; padding-block: clamp(32px, 5vh, 72px); }
.hero__title { grid-column: 1 / span 8; font: 500 clamp(2.5rem, 5.7vw, 6.4rem)/1.14 var(--f-display); letter-spacing: -.035em; font-variation-settings: "opsz" 144; }
.hero__kicker { display: block; font-size: clamp(.75rem, .9vw, .85rem); letter-spacing: .02em; color: var(--accent-text); margin-bottom: clamp(14px, 2vw, 28px); }
.hero__title em { font-style: normal; color: var(--accent); }
.squiggle { position: relative; white-space: nowrap; }
.squiggle::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -.08em; height: .22em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 7c10-6 18 4 28 0s18-6 28 0 18 4 28 0 18-6 30 1' fill='none' stroke='%23F74D00' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; clip-path: inset(0 100% 0 0); transition: clip-path 1.2s var(--ease) .9s; }
.is-in .squiggle::after, html:not(.js) .squiggle::after { clip-path: inset(0 0 0 0); }

.hero__plane { grid-column: 9 / -1; position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; justify-self: end; display: grid; place-items: center; }
.hero__orbit { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 7; animation: spin 60s linear infinite; }
.hero__orbit ellipse:last-child { stroke-dasharray: 1 5; }
.hero__plane-rot { width: 58%; transform: rotate(var(--a, 0deg)); transition: transform .1s linear; will-change: transform; }
.hero__plane-rot svg { animation: float 5s var(--ease-io) infinite alternate; filter: drop-shadow(0 30px 30px rgba(3, 13, 66, .16)); }
.hero__plane-tag { position: absolute; right: -4%; bottom: 8%; color: var(--muted); transform: rotate(-6deg); opacity: 0; transition: opacity .6s .2s; }
.hero__plane:hover .hero__plane-tag, .hero__plane.is-tagged .hero__plane-tag { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { from { transform: translate(-1%, 2%); } to { transform: translate(1.5%, -3%); } }

.hero__foot { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: end; padding-bottom: clamp(24px, 4vh, 48px); }
.hero__intro { grid-column: 1 / span 5; font-size: clamp(1rem, 1.2vw, 1.15rem); color: var(--ink-2); max-width: 34em; text-wrap: pretty; }
.hero__ctas { grid-column: 7 / span 4; display: flex; flex-wrap: wrap; gap: 12px; --i: 2; }
.hero__scroll { grid-column: 12; justify-self: end; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); }
.hero__scroll i { width: 1px; height: 56px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: drip 2.2s var(--ease-io) infinite; }
@keyframes drip { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

.hero__word { padding-inline: calc(var(--gutter) * .5); margin-bottom: -.6vw; }
.hero__word svg { width: 100%; height: auto; overflow: visible; }
.hero__word use { transform-box: fill-box; }
.js .hero__word svg { clip-path: inset(0 0 100% 0); transform: translateY(18%); transition: clip-path 1.6s var(--ease) .25s, transform 1.6s var(--ease) .25s; }
.is-ready .hero__word svg { clip-path: inset(-10% 0 -10% 0); transform: none; }

/* hero intro choreography */
.js .hero__meta, .js .hero__plane, .js .header { opacity: 0; transition: opacity 1s var(--ease) .6s, transform .6s var(--ease); }
.js .hero__plane { transform: translate(-30%, 30%) scale(.7); transition: opacity 1.2s var(--ease) .5s, transform 1.8s var(--ease) .5s; }
.is-ready .hero__meta, .is-ready .hero__plane, .is-ready .header { opacity: 1; }
.is-ready .hero__plane { transform: none; }
.js .page-article .header, .js .page-404 .header { opacity: 1; }

/* ---------- Tapes / marquee ---------- */
.tapes { position: relative; height: clamp(150px, 16vw, 230px); margin-block: clamp(16px, 3vw, 40px); overflow: hidden; display: grid; place-items: center; }
.tape { position: absolute; left: -5%; right: -5%; overflow: hidden; white-space: nowrap; padding-block: clamp(10px, 1.2vw, 16px); }
.tape__track { display: inline-flex; align-items: center; gap: clamp(20px, 2.4vw, 40px); will-change: transform; }
.tape span { font: italic 400 clamp(1.6rem, 3.6vw, 3.2rem)/1.1 var(--f-display); letter-spacing: -.02em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.tape--a { background: var(--accent); color: var(--on-accent); transform: rotate(-2.2deg); z-index: 2; --plane-wing: #FFF4EC; --plane-stroke: #030D42; }
.tape--a svg { width: clamp(30px, 3vw, 46px); flex: none; }
.tape--b { background: var(--ink); color: var(--paper); transform: rotate(2.6deg); }
.tape--b span { font-style: normal; font-family: var(--f-mono); font-size: clamp(.9rem, 1.4vw, 1.2rem); text-transform: uppercase; letter-spacing: .08em; }
.tape--b i { font-style: normal; color: var(--accent); }

/* ---------- Generative covers ---------- */
.cover { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--navy); }
.cover > svg { position: absolute; inset: -6%; width: 112%; height: 112%; transform: translate3d(0, var(--py, 0px), 0) scale(var(--cs, 1)); transition: transform 1.2s var(--ease); }

/* ---------- Featured ---------- */
.featured { padding-top: clamp(56px, 7vw, 112px); }
.now { padding-top: clamp(64px, 7vw, 120px); }
.feature { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(20px, 3vw, 48px); align-items: end; }
.feature__media { grid-column: 1 / span 7; position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; display: block; transform: translateZ(0); }
.feature__media .cover { transition: transform 1.4s var(--ease); }
.feature__media:hover .cover { transform: scale(1.04); }
.js .feature__media { clip-path: inset(12% 8% 12% 8% round var(--radius)); transition: clip-path 1.6s var(--ease); }
.js .feature__media.is-in { clip-path: inset(0 0 0 0 round var(--radius)); }
.feature__badge { position: absolute; left: 20px; top: 20px; padding: 6px 12px; border-radius: 99px; background: var(--paper); color: var(--ink); }
.feature__body { grid-column: 8 / -1; display: grid; gap: clamp(18px, 2vw, 28px); padding-bottom: 6px; }
.feature__title { font: 500 clamp(2.2rem, 4.4vw, 4.4rem)/1.08 var(--f-display); letter-spacing: -.03em; font-variation-settings: "opsz" 144; text-wrap: balance; }
.feature__title i { margin-right: .06em; font-weight: 300; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; color: var(--accent); }
.feature__title a { background: linear-gradient(currentColor, currentColor) 0 96% / 0 2px no-repeat; transition: background-size .8s var(--ease); }
.feature__title a:hover { background-size: 100% 2px; }
.feature__excerpt { color: var(--ink-2); font-size: 1.05rem; max-width: 32em; text-wrap: pretty; }
.meta { display: flex; gap: clamp(20px, 3vw, 44px); padding-block: 18px; border-block: 1px solid var(--line); }
.meta dt { color: var(--muted); margin-bottom: 2px; }
.meta dd { color: var(--ink); font-size: .85rem; }

/* ---------- Filters & posts ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: clamp(28px, 3vw, 44px); }
.chip { position: relative; padding: 9px 18px 9px 20px; border-radius: 99px; border: 1px solid var(--line-2); font-weight: 500; font-size: .92rem; display: inline-flex; align-items: flex-start; gap: 4px; transition: background-color .4s var(--ease), color .4s, border-color .4s, transform .4s var(--ease-back); }
.chip sup { font: 500 .62rem/1 var(--f-mono); opacity: .6; margin-top: 3px; }
.chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip:active { transform: scale(.96); }
.filters__hint { margin-left: auto; color: var(--muted); }

.posts { border-bottom: 1px solid var(--line); }
.post { border-top: 1px solid var(--line); }
.post.is-hidden { display: none; }
.post a { position: relative; display: grid; grid-template-columns: 9% 1fr 10% 12% 8% 48px; align-items: center; gap: 16px; padding: clamp(22px, 2.4vw, 34px) clamp(8px, 1vw, 16px); isolation: isolate; transition: color .5s var(--ease); }
.post a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .6s var(--ease); }
.post a:hover { color: var(--paper); }
.post a:hover::before { transform: scaleY(1); transform-origin: 50% 0; }
.post__addr { color: var(--accent-text); transition: color .4s; }
.post a:hover .post__addr { color: var(--accent); }
.post__title { font: 500 clamp(1.3rem, 2.4vw, 2.3rem)/1.25 var(--f-display); letter-spacing: -.02em; transition: transform .7s var(--ease); }
.post a:hover .post__title { transform: translateX(14px); }
.post__cat { font-size: .9rem; color: var(--muted); transition: color .4s; }
.post__date, .post__time { color: var(--muted); transition: color .4s; }
.post a:hover .post__cat, .post a:hover .post__date, .post a:hover .post__time { color: inherit; opacity: .75; }
.post__go { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background-color .4s, border-color .4s, transform .6s var(--ease); }
.post__go svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; transform: rotate(-45deg); transition: transform .6s var(--ease); }
.post a:hover .post__go { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.post a:hover .post__go svg { transform: none; }
.post.is-enter a { animation: post-in .7s var(--ease) both; animation-delay: calc(var(--k, 0) * 45ms); }
@keyframes post-in { from { opacity: 0; transform: translateY(18px); } }

.post-preview { position: fixed; left: 0; top: 0; z-index: 700; width: clamp(240px, 22vw, 340px); aspect-ratio: 4 / 3; pointer-events: none; display: none; }
.has-cursor .post-preview { display: block; }
.post-preview__in { width: 100%; height: 100%; border-radius: 14px; overflow: hidden; transform: scale(0) rotate(var(--r, 0deg)); transition: transform .5s var(--ease); box-shadow: 0 30px 60px -20px rgba(3, 13, 66, .45); }
.post-preview.is-on .post-preview__in { transform: scale(1) rotate(var(--r, 0deg)); }
.post-preview .cover { position: absolute; inset: 0; }
.post-preview .cover:not(.is-cur) { opacity: 0; }
.post-preview .cover.is-cur { opacity: 1; transition: opacity .3s; }

/* ---------- About ---------- */
.about { position: relative; border-radius: clamp(24px, 3vw, 48px) clamp(24px, 3vw, 48px) 0 0; }
.about__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(20px, 3vw, 48px); }
.about__portrait { grid-column: 1 / span 4; align-self: start; position: relative; }
.about__portrait .cover { aspect-ratio: 4 / 5; border-radius: var(--radius); }
.about__portrait figcaption { margin-top: 14px; color: var(--muted); }
.about__body { grid-column: 6 / -1; }
.statement { font: 400 clamp(1.7rem, 3.3vw, 3.3rem)/1.38 var(--f-display); letter-spacing: -.02em; text-wrap: pretty; }
.statement .w { opacity: .16; transition: opacity .3s, color .3s; }
.statement .w.on { opacity: 1; }
.statement [data-hl] .w.on { color: var(--accent); }
html:not(.js) .statement .w { opacity: 1; }
.about__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 40px); margin-top: clamp(56px, 7vw, 110px); }
.about__cols > div { border-top: 1px solid var(--line-2); padding-top: 20px; }
.about__cols > div:nth-child(2) { --i: 1; } .about__cols > div:nth-child(3) { --i: 2; }
.about__cols h3 { color: var(--accent-text); margin-bottom: 12px; font-weight: 500; }
.about__cols p { color: var(--ink-2); font-size: .98rem; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: clamp(80px, 10vw, 160px); border-top: 1px solid var(--line); }
.stats li { padding: clamp(24px, 3vw, 40px) clamp(12px, 1.6vw, 24px) 0; border-left: 1px solid var(--line); display: grid; gap: 8px; }
.stats li:first-child { border-left: 0; padding-left: 0; }
.stats li:nth-child(2) { --i: 1; } .stats li:nth-child(3) { --i: 2; } .stats li:nth-child(4) { --i: 3; } .stats li:nth-child(5) { --i: 4; }
.stats b { font: italic 300 clamp(3rem, 7vw, 7rem)/1 var(--f-display); letter-spacing: -.04em; font-variation-settings: "opsz" 144, "SOFT" 100; font-variant-numeric: tabular-nums; }
.stats li:last-child b { color: var(--accent); }
.stats span { color: var(--muted); font-size: .92rem; }

/* ---------- Lab ---------- */
.lab { position: relative; padding-top: var(--sec-pad); }
.lab__pin { position: sticky; top: 0; height: 100vh; height: 100svh; padding-top: var(--header-h); display: flex; flex-direction: column; justify-content: center; overflow: hidden; gap: clamp(24px, 3vw, 40px); }
.lab__head .sec-head { margin-bottom: 18px; }
.lab__note { color: var(--ink-2); max-width: 36em; }
.lab__track { display: flex; gap: clamp(16px, 2vw, 28px); padding-inline: var(--gutter); will-change: transform; }
.exp { flex: 0 0 clamp(270px, 26vw, 400px); display: grid; gap: 16px; }
.exp__stage { position: relative; aspect-ratio: 4 / 4.4; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); transition: transform .8s var(--ease), border-radius .8s var(--ease); }
.exp:hover .exp__stage { transform: translateY(-6px); }
.exp__stage::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.exp__stage canvas { width: 100%; height: 100%; }
.exp__info span { color: var(--accent-text); }
.exp__info h3 { font: 500 clamp(1.4rem, 1.9vw, 1.9rem)/1.2 var(--f-display); letter-spacing: -.02em; margin: 6px 0 4px; }
.exp__info p { color: var(--muted); font-size: .92rem; }
.exp__stage--type { display: grid; place-items: center; background: var(--ink); color: var(--paper); }
.exp-type { font: 400 clamp(5rem, 9vw, 9rem)/1 var(--f-display); font-variation-settings: "wght" var(--w, 300), "SOFT" var(--s, 0), "WONK" 1, "opsz" 144; transition: font-variation-settings .4s var(--ease); letter-spacing: -.03em; user-select: none; }
.exp__stage--grad { background: var(--navy); }
.exp-blobs { position: absolute; inset: 0; filter: blur(34px) saturate(1.2); }
.exp-blobs i { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; mix-blend-mode: screen; animation: blob 9s var(--ease-io) infinite alternate; }
.exp-blobs i:nth-child(1) { background: var(--magenta); left: -10%; top: 40%; }
.exp-blobs i:nth-child(2) { background: var(--orange); right: -15%; top: -5%; animation-duration: 11s; animation-delay: -3s; }
.exp-blobs i:nth-child(3) { background: var(--blue); left: 20%; top: 10%; animation-duration: 7s; animation-delay: -5s; }
@keyframes blob { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(18%, -12%) scale(1.15); } 100% { transform: translate(-12%, 14%) scale(.9); } }
.lab__progress { display: flex; align-items: center; gap: 20px; color: var(--muted); }
.lab__progress i { flex: 1; height: 1px; background: var(--line); position: relative; }
.lab__progress b { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- Now ---------- */
.now__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 32px); }
.now__list li { padding: clamp(22px, 2vw, 30px); border-radius: var(--radius); background: var(--paper-2); display: grid; gap: 40px; align-content: space-between; min-height: 230px; transition: transform .6s var(--ease), background-color .4s; }
.now__list li:hover { transform: translateY(-6px) rotate(-.6deg); background: var(--paper-3); }
.now__list li:nth-child(2) { --i: 1; } .now__list li:nth-child(3) { --i: 2; } .now__list li:nth-child(4) { --i: 3; }
.now__list span { color: var(--accent-text); }
.now__list p { font: 500 clamp(1.2rem, 1.6vw, 1.5rem)/1.35 var(--f-display); letter-spacing: -.01em; }
.now__list small { display: block; margin-top: 8px; font: 400 .88rem/1.5 var(--f-sans); color: var(--muted); }

/* ---------- Subscribe ---------- */
.subscribe { text-align: center; display: grid; justify-items: center; gap: clamp(20px, 2.4vw, 32px); padding-top: calc(var(--sec-pad) * .6); }
.subscribe .sec-idx { display: block; }
.subscribe__title { font: 500 clamp(2.6rem, 7.6vw, 8rem)/1.08 var(--f-display); letter-spacing: -.04em; font-variation-settings: "opsz" 144; }
.subscribe__title em { font-style: normal; color: var(--accent); }
.subscribe__lead { color: var(--ink-2); max-width: 30em; font-size: 1.05rem; }
.subscribe__lead code, .prose code { font-family: var(--f-mono); font-size: .88em; padding: 2px 7px; border-radius: 6px; background: var(--paper-2); }
.sub-form { width: min(100%, 640px); margin-top: 12px; --i: 2; }
.sub-form__field { display: flex; align-items: center; gap: 4px; height: 72px; padding: 6px 6px 6px 26px; border-radius: 99px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--paper-2) 50%, transparent); transition: border-color .3s, box-shadow .4s; }
.sub-form__field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
.sub-form__pre, .sub-form__post { color: var(--muted); font-size: .9rem; }
.sub-form input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 500 1.05rem/1 var(--f-mono); color: var(--ink); padding: 0 4px; }
.sub-form input::placeholder { color: var(--muted); opacity: .6; }
.sub-form__btn { position: relative; height: 100%; display: inline-flex; align-items: center; gap: 10px; padding: 0 24px 0 28px; margin-left: 10px; border-radius: 99px; background: var(--ink); color: var(--paper); font-weight: 600; overflow: hidden; transition: background-color .4s, color .4s; --plane-wing: var(--paper); --plane-stroke: var(--paper); }
.sub-form__btn svg { width: 26px; transition: transform .6s var(--ease); }
.sub-form__btn:hover { background: var(--accent); color: var(--on-accent); --plane-stroke: var(--navy); }
.sub-form__btn:hover svg { transform: translate(3px, -3px) rotate(-6deg); }
.sub-form.is-sent .sub-form__btn svg { animation: fly-away 1.1s var(--ease-io) forwards; }
@keyframes fly-away { 40% { transform: translate(-8px, 6px) rotate(6deg); } 100% { transform: translate(420px, -320px) rotate(-10deg) scale(.6); opacity: 0; } }
.sub-form.is-error .sub-form__field { animation: shake .5s var(--ease); border-color: #E5484D; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.sub-form__msg { min-height: 1.5em; margin-top: 14px; color: var(--muted); }
.sub-form.is-sent .sub-form__msg { color: var(--accent-text); }

/* ---------- Footer ---------- */
.footer { --footer-gap: clamp(32px, 3vw, 48px); position: relative; padding-top: var(--footer-gap); overflow: hidden; border-radius: clamp(24px, 3vw, 48px) clamp(24px, 3vw, 48px) 0 0; }
.footer__top { display: grid; gap: 18px; padding-bottom: var(--footer-gap); border-bottom: 1px solid var(--line); }
.footer__cta { color: var(--muted); font-size: 1.05rem; }
.footer__mail { display: inline-flex; flex-wrap: nowrap; white-space: nowrap; align-items: center; gap: clamp(12px, 2vw, 28px); font: 400 clamp(2rem, 6.4vw, 6.6rem)/1.05 var(--f-display); letter-spacing: -.035em; width: fit-content; min-width: 0; max-width: 100%; }
.footer__mail span { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat; transition: background-size .9s var(--ease); }
.footer__mail:hover span { background-size: 100% 3px; }
.footer__mail svg { flex: none; width: clamp(36px, 5vw, 80px); fill: none; stroke: var(--accent); stroke-width: 1.4; transition: transform .7s var(--ease); }
.footer__mail:hover svg { transform: rotate(45deg); }
.footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: clamp(40px, 5vw, 72px); }
.footer__cols h3 { color: var(--muted); font-weight: 400; margin-bottom: 16px; }
.footer__cols li { margin-bottom: 6px; }
.footer__cols a { position: relative; display: inline-block; transition: transform .5s var(--ease), color .3s; }
.footer__cols a:hover { color: var(--accent); transform: translateX(6px); }
.footer__status { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.footer__top-btn { justify-self: end; align-self: start; }
.totop { display: inline-flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; border-radius: 99px; border: 1px solid var(--line-2); font-size: .85rem; transition: background-color .4s, color .4s, border-color .4s; }
.totop svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .5s var(--ease); }
.totop:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.totop:hover svg { transform: translateY(-3px); }
.footer__word { padding-inline: calc(var(--gutter) * .5); margin-bottom: -1.2vw; }
.footer__word svg { width: 100%; height: auto; }
.footer .wm-a { fill: var(--ink); }
.footer__legal { display: flex; justify-content: space-between; gap: 16px; padding-block: 22px 26px; color: var(--muted); border-top: 1px solid var(--line); position: relative; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 9600; padding: 12px 20px; border-radius: 99px; background: var(--ink); color: var(--paper); transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform .6s var(--ease), visibility 0s .6s; pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .6s var(--ease); }

/* ==========================================================================
   Article page
   ========================================================================== */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 950; pointer-events: none; }
.progress i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--blue), var(--magenta) 60%, var(--accent)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.progress svg { position: absolute; top: -7px; left: calc(var(--p, 0) * 100%); width: 20px; transform: translateX(-90%) rotate(18deg); }

.ph { padding-top: calc(var(--header-h) + clamp(40px, 7vw, 110px)); display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.crumbs { grid-column: 1 / -1; display: flex; gap: 10px; color: var(--muted); margin-bottom: clamp(16px, 3vw, 40px); }
.crumbs a { color: var(--ink); transition: color .3s; }
.crumbs a:hover { color: var(--accent-text); }
.ph__title { grid-column: 1 / span 10; font: 500 clamp(2.8rem, 8vw, 8.4rem)/1.04 var(--f-display); letter-spacing: -.045em; font-variation-settings: "opsz" 144; }
.ph__title i { margin-right: .08em; font-weight: 300; color: var(--accent); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.ph__dek { grid-column: 1 / span 6; margin-top: clamp(20px, 3vw, 40px); font: 400 clamp(1.15rem, 1.6vw, 1.45rem)/1.6 var(--f-display); color: var(--ink-2); text-wrap: pretty; }
.ph__meta { grid-column: 8 / -1; align-self: end; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.ph__meta dt { color: var(--muted); }
.ph__meta dd { font-size: .85rem; }
.ph__cover { margin-top: clamp(40px, 6vw, 96px); }
.ph__cover .cover { aspect-ratio: 21 / 9; border-radius: var(--radius); }
.ph__cover figcaption { display: flex; justify-content: space-between; margin-top: 12px; color: var(--muted); }
.js .ph__cover .cover { clip-path: inset(0 0 100% 0 round var(--radius)); transition: clip-path 1.6s var(--ease) .4s; }
.is-ready .ph__cover .cover { clip-path: inset(0 0 0 0 round var(--radius)); }

.reader { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 700px) minmax(180px, 1fr); gap: clamp(24px, 4vw, 72px); padding-block: clamp(64px, 8vw, 128px); }
.toc { position: sticky; top: 110px; align-self: start; }
.toc > p { color: var(--muted); margin-bottom: 18px; }
.toc ol { position: relative; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 18px; font-size: .9rem; color: var(--muted); transition: color .3s, transform .5s var(--ease); line-height: 1.45; }
.toc a:hover { color: var(--ink); transform: translateX(3px); }
.toc a.is-on { color: var(--ink); font-weight: 500; }
.toc__ptr { position: absolute; left: -9px; top: 0; width: 18px; transform: translateY(var(--y, 0)) rotate(110deg); transition: transform .6s var(--ease); }
.reader__side { position: sticky; top: 110px; align-self: start; justify-self: end; display: grid; gap: 10px; }
.reader__side > p { color: var(--muted); margin-bottom: 4px; }
.share-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background-color .4s, color .4s, border-color .4s, transform .5s var(--ease-back); }
.share-btn svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.share-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: scale(1.08); }

.prose { font-size: clamp(1.05rem, 1.15vw, 1.15rem); line-height: 1.95; color: var(--ink-2); position: relative; }
.prose > * + * { margin-top: 1.4em; }
.prose p { text-wrap: pretty; }
.prose .lead { font: 400 clamp(1.3rem, 1.8vw, 1.6rem)/1.7 var(--f-display); color: var(--ink); }
.prose .lead::first-letter { float: left; font: 600 3.4em/.9 var(--f-display); margin: .08em .12em 0 0; color: var(--accent); font-variation-settings: "SOFT" 100, "WONK" 1; }
.prose h2 { font: 500 clamp(1.7rem, 2.6vw, 2.4rem)/1.25 var(--f-display); letter-spacing: -.02em; color: var(--ink); margin-top: 2.6em; scroll-margin-top: 100px; }
.prose h2 .mono { display: block; color: var(--accent-text); margin-bottom: 10px; font-size: .78rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: background-size .4s var(--ease), color .3s; }
.prose a:hover { background-size: 100% 100%; color: var(--on-accent); }
.prose mark { background: linear-gradient(transparent 58%, color-mix(in srgb, var(--accent) 35%, transparent) 58%); color: inherit; padding: 0 2px; }
.prose ul { display: grid; gap: .5em; }
.prose ul li { position: relative; padding-left: 1.6em; }
.prose ul li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--f-mono); }
.prose blockquote { margin: 2.4em 0; padding: 0; font: 400 clamp(1.6rem, 2.8vw, 2.5rem)/1.4 var(--f-display); letter-spacing: -.02em; color: var(--ink); position: relative; font-variation-settings: "SOFT" 60; }
.prose blockquote::before { content: "“"; display: block; font-size: 3em; line-height: .6; color: var(--accent); height: .4em; }
.prose blockquote cite { display: block; margin-top: 18px; font: 400 .78rem/1.5 var(--f-mono); font-style: normal; color: var(--muted); }
.prose kbd { font: 500 .8em var(--f-mono); padding: 2px 8px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; }
.prose figure { margin-block: 2.6em; }
.prose figure .cover { aspect-ratio: 16 / 10; border-radius: var(--radius); }
.prose figcaption { margin-top: 12px; color: var(--muted); }
.prose hr { border: 0; height: 30px; margin-block: 3em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 12'%3E%3Ccircle cx='9' cy='6' r='3' fill='%23F74D00'/%3E%3Ccircle cx='45' cy='6' r='3' fill='%23F74D00'/%3E%3Ccircle cx='81' cy='6' r='3' fill='%23F74D00'/%3E%3C/svg%3E") 50% 50% / 90px 12px no-repeat; }

.code { margin-block: 2.2em; border-radius: var(--radius); overflow: hidden; background: #050B30; color: #D9DBEC; font-size: .86rem; line-height: 1.8; box-shadow: 0 30px 60px -30px rgba(3, 13, 66, .5); }
[data-theme="dark"] .code { background: #01041A; box-shadow: inset 0 0 0 1px var(--line); }
.code__bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); font: 400 .75rem/1 var(--f-mono); color: #8C91B4; }
.code__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.code__bar i:first-child { background: var(--orange); }
.code__bar span { margin-left: 10px; }
.code__copy { margin-left: auto; padding: 6px 12px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .16); color: #D9DBEC; font: 500 .72rem/1 var(--f-mono); transition: background-color .3s, color .3s, border-color .3s; }
.code__copy:hover { background: #fff; color: #030D42; }
.code__copy.is-done { background: var(--orange); border-color: var(--orange); color: #030D42; }
.code { max-width: 100%; }
.code pre { margin: 0; padding: 20px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; font-family: var(--f-mono); counter-reset: ln; }
.code code { display: block; background: none; padding: 0; font-size: inherit; border-radius: 0; }
.code code { width: max-content; min-width: 100%; }
.code .ln { display: block; padding: 0 22px 0 0; white-space: pre; }
.code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 3.2em; padding-right: 1.2em; text-align: right; color: #4A5080; user-select: none; }
.code .ln.hl { background: rgba(247, 77, 0, .12); box-shadow: inset 2px 0 0 var(--orange); }
.tk-k { color: #FF8A5B; } .tk-t { color: #9EA8FF; } .tk-s { color: #8FE3B0; } .tk-c { color: #8A90BC; font-style: italic; } .tk-n { color: #F2C14E; } .tk-f { color: #E7A6FF; }

.note { display: block; font: 400 .82rem/1.6 var(--f-sans); color: var(--muted); }
.note sup, .fn { font: 600 .7em var(--f-mono); color: var(--accent-text); }
@media (min-width: 1101px) {
  .note { float: right; clear: right; width: min(220px, 18vw); margin-right: calc(-1 * min(220px, 18vw) - clamp(24px, 4vw, 72px)); margin-top: .3em; padding-top: 10px; border-top: 1px solid var(--line); }
}
@media (max-width: 1100px) { .note { margin: 1em 0; padding: 12px 16px; border-left: 2px solid var(--accent); background: var(--paper-2); border-radius: 0 10px 10px 0; } }

.post-end { padding-bottom: clamp(64px, 8vw, 120px); display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 700px) minmax(180px, 1fr); gap: clamp(24px, 4vw, 72px); }
.post-end__in { grid-column: 2; display: grid; gap: 40px; }
.react { display: flex; align-items: center; gap: 22px; padding: 28px; border-radius: var(--radius); background: var(--paper-2); }
.react__btn { position: relative; width: 74px; height: 74px; flex: none; border-radius: 50%; background: var(--ink); display: grid; place-items: center; transition: transform .5s var(--ease-back), background-color .4s; --plane-wing: var(--paper); --plane-stroke: var(--paper); }
.react__btn svg { width: 34px; transition: transform .6s var(--ease-back); }
.react__btn:hover { transform: scale(1.06); }
.react__btn:hover svg { transform: translate(2px, -3px) rotate(-8deg); }
.react__btn:active { transform: scale(.92); }
.react__btn.is-on { background: var(--accent); --plane-stroke: var(--navy); --plane-wing: #FFF4EC; }
.react__btn .spark { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; pointer-events: none; }
.react b { font: italic 400 2.2rem/1 var(--f-display); font-variant-numeric: tabular-nums; display: block; color: var(--ink); }
.react span { color: var(--muted); font-size: .92rem; }
.author { display: flex; gap: 20px; align-items: center; padding-top: 32px; border-top: 1px solid var(--line); }
.author__mark { width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; }
.author__mark svg { width: 34px; }
.author b { display: block; font: 500 1.2rem/1.3 var(--f-display); color: var(--ink); }
.author p { color: var(--muted); font-size: .92rem; }

.next { display: block; position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.next__in { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: center; padding-block: clamp(56px, 8vw, 120px); }
.next__label { grid-column: 1 / -1; color: var(--muted); }
.next__title { grid-column: 1 / span 8; font: 500 clamp(2.4rem, 6vw, 6rem)/1.05 var(--f-display); letter-spacing: -.04em; transition: transform .9s var(--ease); }
.next__media { grid-column: 9 / -1; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; transform: rotate(3deg) scale(.92); transition: transform 1s var(--ease); }
.next:hover .next__title { transform: translateX(20px); }
.next:hover .next__media { transform: rotate(0) scale(1); }

/* ---------- 404 ---------- */
.e404 { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--header-h) var(--gutter) 40px; position: relative; overflow: hidden; }
.e404__code { font: 300 clamp(6rem, 24vw, 22rem)/.9 var(--f-display); letter-spacing: -.06em; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.e404__code em { font-style: italic; color: var(--accent); }
.e404 h1 { font: 500 clamp(1.4rem, 2.4vw, 2rem)/1.3 var(--f-display); margin: 12px 0 10px; }
.e404 p { color: var(--muted); margin-bottom: 32px; }
.e404__term { display: inline-block; text-align: left; margin-bottom: 36px; padding: 16px 22px; border-radius: 14px; background: var(--paper-2); color: var(--ink-2); }
.e404__term b { color: var(--accent-text); font-weight: 500; }
.e404__plane { position: absolute; width: clamp(80px, 10vw, 140px); left: 0; top: 0; animation: crash 7s var(--ease-io) infinite; opacity: .9; }
@keyframes crash {
  0% { transform: translate(-20vw, 20vh) rotate(0); }
  45% { transform: translate(55vw, 8vh) rotate(-8deg); }
  60% { transform: translate(70vw, 30vh) rotate(60deg); }
  75% { transform: translate(62vw, 70vh) rotate(160deg); }
  100% { transform: translate(120vw, 110vh) rotate(320deg); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .reader, .post-end { grid-template-columns: minmax(0, 1fr); }
  .toc, .reader__side { display: none; }
  .post-end__in { grid-column: 1; }
  .reader { max-width: 760px; margin-inline: auto; }
  .post-end { max-width: 760px; margin-inline: auto; }
  .now__list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav, .header__clock { display: none; }
  .header { grid-template-columns: 1fr auto; }
  .menu-btn { display: block; }
  .brand__word { width: 100px; }

  .hero__main { grid-template-columns: 1fr; padding-block: 24px 16px; }
  .hero__title { grid-column: 1; font-size: clamp(1.9rem, 8.5vw, 4.6rem); }
  .hero__plane { grid-row: 1; grid-column: 1; width: 44vw; max-width: 260px; justify-self: end; margin-bottom: -6vw; }
  .hero__plane-tag { display: none; }
  .hero__foot { grid-template-columns: 1fr; gap: 24px; }
  .hero__intro, .hero__ctas { grid-column: 1; }
  .hero__scroll { display: none; }

  .sec-head { grid-template-columns: auto 1fr; }
  .sec-en { grid-column: 1 / -1; margin-top: 8px; }

  .feature { grid-template-columns: 1fr; }
  .feature__media, .feature__body { grid-column: 1; }

  .post a { grid-template-columns: 52px 1fr 40px; grid-template-areas: "addr title go" "addr meta go"; row-gap: 6px; column-gap: 14px; }
  .post__addr { grid-area: addr; align-self: start; padding-top: .5em; }
  .post__title { grid-area: title; }
  .post__cat, .post__date, .post__time { grid-area: meta; font-size: .78rem; }
  .post__cat { justify-self: start; }
  .post__date { justify-self: start; margin-left: 3.4em; }
  .post__time { justify-self: start; margin-left: 11.5em; }
  .post__go { grid-area: go; width: 40px; height: 40px; }

  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { grid-column: 1; width: min(100%, 360px); }
  .about__body { grid-column: 1; }
  .about__cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 24px; }

  .lab { padding-bottom: 0; height: auto !important; }
  .lab__pin { position: relative; height: auto; padding-bottom: var(--sec-pad); }
  .lab__track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; transform: none !important; padding-bottom: 6px; }
  .lab__track::-webkit-scrollbar { display: none; }
  .exp { flex-basis: 78vw; scroll-snap-align: center; }

  .footer__cols { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .footer__top-btn { justify-self: start; }

  .ph__title, .ph__dek, .ph__meta { grid-column: 1 / -1; }
  .ph__cover .cover { aspect-ratio: 4 / 3; }
  .next__title, .next__media { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .footer__mail { font-size: calc((100vw - 2 * var(--gutter) - 42px) / 12); gap: 10px; }
  .footer__mail svg { width: 28px; }
  .hide-sm { display: none !important; }
  .hero__meta { font-size: .68rem; }
  .btn { height: 52px; padding: 0 24px; }
  .now__list { grid-template-columns: 1fr; }
  .now__list li { min-height: 170px; }
  .meta { gap: 18px; }
  .sub-form__field { height: 62px; padding-left: 18px; }
  .sub-form__pre, .sub-form__post { display: none; }
  .sub-form__btn { padding: 0 18px; margin-left: 0; }
  .sub-form__btn span { display: none; }
  .footer__legal { flex-direction: column; gap: 4px; }
  .ph__meta { grid-template-columns: repeat(2, 1fr); }
  .react { padding: 20px; }
  .post__time { display: none; }
}

@media (hover: none) {
  .post a:hover::before { transform: scaleY(0); }
  .post a:hover { color: inherit; }
  .post a:hover .post__title { transform: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  body::after { animation: none; }
  .sx > .sxi { transform: none !important; }
}

/* ---------- Theme view transition ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
