/* ==========================================================================
   鱼心快跑 · yuxin.run
   Hand-written styles. No frameworks, no build step.
   01 Tokens / 02 Reset / 03 Base / 04 Utilities / 05 Header / 06 Hero / 07 Ticker
   ========================================================================== */

/* ---------- 01. Tokens ---------- */
:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --paper-2: #efece3;
  --surface: #fffcf6;
  --ink: #141817;
  --ink-soft: #4c544f;
  --ink-mute: #5f6a64;
  --line: rgba(20, 24, 23, 0.12);
  --line-strong: rgba(20, 24, 23, 0.22);
  --teal: #17b3a6;
  --teal-ink: #0a736b;
  --teal-soft: rgba(23, 179, 166, 0.12);
  --logo-bg: #fbf9f3;
  --sun: #e2a52f;
  --sun-soft: rgba(226, 165, 47, 0.16);
  --dark: #121716;
  --on-dark: #f4f6f1;
  --on-dark-soft: #a9b4ae;
  --header-bg: rgba(246, 243, 236, 0.82);
  --shadow-sm: 0 1px 2px rgba(20, 24, 23, 0.05), 0 10px 28px -20px rgba(20, 24, 23, 0.4);
  --shadow-md: 0 30px 70px -40px rgba(20, 24, 23, 0.5);
  --radius: 22px;
  --header-h: 76px;
  --font-sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Songti SC", serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1413;
  --paper-2: #121a18;
  --surface: #161e1c;
  --ink: #edf1ec;
  --ink-soft: #aeb8b2;
  --ink-mute: #8b968f;
  --line: rgba(237, 241, 236, 0.13);
  --line-strong: rgba(237, 241, 236, 0.26);
  --teal: #43cfc6;
  --teal-ink: #6fe3da;
  --teal-soft: rgba(67, 207, 198, 0.15);
  --logo-bg: #f7f4ea;
  --sun: #f0c05a;
  --sun-soft: rgba(240, 192, 90, 0.16);
  --dark: #090d0c;
  --on-dark: #f4f6f1;
  --on-dark-soft: #a9b4ae;
  --header-bg: rgba(15, 20, 19, 0.8);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -20px rgba(0, 0, 0, 0.8);
  --shadow-md: 0 30px 70px -40px rgba(0, 0, 0, 0.95);
}

/* ---------- 02. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img { height: auto; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--teal-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--teal);
  color: #06211e;
}

/* ---------- 03. Base ---------- */
body {
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  font-weight: 780;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.i {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i.fill {
  fill: currentColor;
  stroke: none;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform 0.25s ease;
}

.skip-link:focus-visible { transform: none; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.32;
  mix-blend-mode: multiply;
  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='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.11'/%3E%3C/svg%3E");
}

[data-theme="dark"] .grain {
  mix-blend-mode: screen;
  opacity: 0.18;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 70;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- 04. Utilities ---------- */
.shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.section {
  position: relative;
  padding-block: clamp(72px, 9vw, 132px);
  scroll-margin-top: var(--header-h);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.section-head h2 {
  margin-top: 18px;
  font-size: clamp(30px, 4.1vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.section-sub {
  justify-self: end;
  max-width: 38ch;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.15vw, 16.5px);
  line-height: 1.75;
  text-wrap: pretty;
}

.section-head > .link-arrow {
  justify-self: end;
  align-self: end;
  margin-bottom: 6px;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.kicker span {
  color: var(--teal-ink);
  letter-spacing: 0.08em;
}

.kicker::after {
  content: "";
  width: 44px;
  height: 1px;
  background: var(--line-strong);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
  animation: pulse 2.6s ease-in-out infinite;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn .i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.btn:hover .i { transform: translate(2px, -2px); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--teal);
  color: #06211e;
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--teal-ink);
  color: var(--teal-ink);
  background: var(--teal-soft);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 17px;
  transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.icon-btn:hover {
  color: var(--teal-ink);
  border-color: var(--teal-ink);
  background: var(--teal-soft);
  transform: translateY(-1px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.link-arrow .i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.link-arrow:hover {
  color: var(--teal-ink);
  border-color: var(--teal-ink);
}

.link-arrow:hover .i { transform: translate(2px, -2px); }

.text-link {
  color: var(--teal-ink);
  font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--teal-ink) 45%, transparent);
  transition: border-color 0.3s ease;
}

.text-link:hover { border-color: var(--teal-ink); }

.text-link .i {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  vertical-align: 0;
  margin-left: 1px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.22, 0.68, 0.16, 1), transform 0.8s cubic-bezier(0.22, 0.68, 0.16, 1);
}

html.js .reveal.is-inview {
  opacity: 1;
  transform: none;
}

/* ---------- 05. Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--logo-bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.04); }

.brand-mark img { width: 100%; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.brand-text small {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  margin-inline: auto;
}

.nav a {
  position: relative;
  padding-block: 6px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 560;
  transition: color 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--teal-ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s ease;
}

.nav a:hover,
.nav a.is-active { color: var(--ink); }

.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

body.is-locked .site-header {
  background: var(--header-bg);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
}

.theme-toggle .moon { display: none; }

[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.header-cta {
  padding: 11px 18px;
  font-size: 13.5px;
}

.menu-toggle { display: none; }

.menu-toggle .close-icon { display: none; }

.menu-toggle[aria-expanded="true"] .menu-icon { display: none; }
.menu-toggle[aria-expanded="true"] .close-icon { display: block; }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  padding: clamp(24px, 6vw, 48px) clamp(20px, 6vw, 48px) calc(32px + env(safe-area-inset-bottom));
  background: var(--paper);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.mobile-menu-mark {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 0;
  width: min(330px, 80%);
  opacity: 0.05;
  transform: translate(-50%, -50%) rotate(-6deg);
  pointer-events: none;
}

[data-theme="dark"] .mobile-menu-mark { opacity: 0.08; }

.mobile-nav,
.mobile-menu-foot {
  position: relative;
  z-index: 1;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
}

.mobile-nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.mobile-nav a span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--teal-ink);
}

.mobile-menu-foot {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.menu-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.menu-socials a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.menu-socials a:hover {
  color: var(--teal-ink);
  border-color: var(--teal-ink);
}

.mobile-menu-foot .btn { padding: 15px 22px; }

.mobile-menu-foot p {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}

/* ---------- 06. Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(40px, 6.5vw, 88px));
  padding-bottom: clamp(48px, 7vw, 96px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -22%;
  right: -12%;
  width: min(760px, 85vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--teal-soft), transparent 62%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 10%, #000 0%, transparent 62%);
  mask-image: radial-gradient(ellipse at 70% 10%, #000 0%, transparent 62%);
  opacity: 0.5;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}

.hero-copy { max-width: 660px; }

.hero-title {
  margin-top: 26px;
  font-size: clamp(44px, 7.6vw, 92px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-line {
  display: block;
}

.hero-title .serif {
  color: var(--teal-ink);
  font-size: 1.02em;
}

.mark {
  position: relative;
  display: inline-block;
}

.mark-line {
  position: absolute;
  left: -1%;
  bottom: -0.16em;
  width: 102%;
  height: 0.18em;
  color: var(--teal);
  overflow: visible;
}

.mark-line path {
  fill: none;
  stroke: currentColor;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 560;
  stroke-dashoffset: 560;
  animation: draw 1.4s 0.35s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.hero-lede {
  max-width: 46ch;
  margin-top: 30px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.8;
}

.hero-lede strong {
  color: var(--ink);
  font-weight: 650;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 26px;
  margin-top: 34px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  max-width: 460px;
}

.hero-tags li {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.hero-tags li:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: var(--line-strong);
}

.hero-visual {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 470px;
  padding: 14px 0 26px;
}

.logo-card {
  position: relative;
  margin: 0;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: rotate(-2.2deg) translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s ease;
  will-change: transform;
}

.logo-card:hover { box-shadow: 0 40px 90px -50px rgba(20, 24, 23, 0.55); }

.logo-card::after {
  content: "";
  position: absolute;
  top: -13px;
  right: 12%;
  width: 68px;
  height: 26px;
  background: color-mix(in srgb, var(--teal) 38%, transparent);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(20, 24, 23, 0.08);
  transform: rotate(4deg);
}

.logo-frame {
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 22px);
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 45%, var(--teal-soft), transparent 68%),
    var(--logo-bg);
}

.logo-frame img {
  width: 100%;
  filter: drop-shadow(0 12px 22px rgba(20, 24, 23, 0.1));
}

.handnote {
  position: absolute;
  right: 4%;
  bottom: -30px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--sun) 82%, var(--ink));
  transform: rotate(-2deg);
}

.handnote span {
  display: inline-block;
  margin-left: 2px;
  font-size: 13px;
}

.float-chip {
  position: absolute;
  z-index: 2;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.chip-a {
  top: 4%;
  left: -7%;
  transform: rotate(-5deg);
  background: var(--sun);
  color: #2a1c00;
}

.chip-b {
  top: 46%;
  right: -8%;
  transform: rotate(4deg);
}

.chip-c {
  bottom: 2%;
  left: -5%;
  transform: rotate(3deg);
  background: var(--teal);
  color: #06211e;
}

.scroll-cue {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin: clamp(32px, 5vw, 56px) auto 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--ink-mute);
}

.scroll-cue i {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--line-strong), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 12px;
  background: var(--teal);
  animation: cue 2.2s ease-in-out infinite;
}

/* ---------- 07. Ticker ---------- */
.ticker {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding-block: 15px;
  background: var(--dark);
  color: var(--on-dark);
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 42s linear infinite;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-group {
  display: flex;
  flex: none;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 36px);
  padding-right: clamp(18px, 2.6vw, 36px);
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.2vw, 14px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--on-dark-soft);
}

.ticker-item b {
  font-weight: 400;
  color: var(--teal);
}

/* ---------- 08. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}

.about-copy p {
  max-width: 52ch;
  margin-bottom: 1.1em;
  color: var(--ink-soft);
  font-size: clamp(15.5px, 1.15vw, 17px);
  line-height: 1.85;
  text-wrap: pretty;
}

.about-copy strong {
  color: var(--ink);
  font-weight: 650;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.facts dt {
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.facts dd {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.signature {
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

.terminal {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: var(--dark);
  color: var(--on-dark);
  box-shadow: var(--shadow-md);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.terminal-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.terminal-bar i:nth-child(1) { background: #f0705f; }
.terminal-bar i:nth-child(2) { background: var(--sun); }
.terminal-bar i:nth-child(3) { background: var(--teal); }

.terminal-bar p {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--on-dark-soft);
}

.terminal-body {
  padding: 22px 20px 24px;
  font-family: var(--font-mono);
  font-size: 12.6px;
  line-height: 2.05;
}

.terminal-body p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal-body .prompt { color: var(--teal); }
.terminal-body .cmd { color: var(--on-dark); }
.terminal-body .out { color: var(--on-dark-soft); padding-left: 1.35em; }
.terminal-body .ok { color: var(--teal); }

.cursor {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  background: var(--teal);
  vertical-align: -0.18em;
  animation: blink 1.1s steps(1) infinite;
}

html.js .term-line { opacity: 0; }

.terminal.is-inview .term-line {
  animation: lineIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--i) * 0.17s);
}

/* ---------- 09. Works ---------- */
.works {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.98fr);
  gap: 18px;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: clamp(22px, 2.5vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.45s ease, box-shadow 0.45s ease;
}

.work-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--teal) 50%, var(--line));
  box-shadow: var(--shadow-md);
}

.work-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.work-index { color: var(--teal-ink); }

.work-card h3 {
  font-size: clamp(23px, 2.5vw, 32px);
  line-height: 1.2;
}

.work-card > p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.8;
}

.work-points {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.work-points li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

.work-art {
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--paper);
  background-size: 26px 26px, 26px 26px, auto;
}

.pipeline {
  width: 100%;
  height: auto;
  color: var(--ink-mute);
}

.pipeline .node rect {
  fill: var(--surface);
  stroke: var(--line-strong);
}

.pipeline .num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  fill: var(--ink-mute);
}

.pipeline .label {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: var(--ink);
}

.pipeline .sub {
  font-family: var(--font-sans);
  font-size: 10.5px;
  fill: var(--ink-mute);
}

.pipeline .link {
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.6;
  stroke-dasharray: 4 5;
  marker-end: url(#arrowTeal);
}

.pipeline .loop {
  fill: none;
  stroke: var(--sun);
  stroke-width: 1.4;
  stroke-dasharray: 3 6;
  marker-end: url(#arrowSun);
}

.pipeline .loop-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  fill: var(--ink-mute);
}

.work-card:hover .pipeline .link,
.work-card:hover .pipeline .loop {
  animation: dash 1.4s linear infinite;
}

.art-logo {
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 30px);
  background:
    radial-gradient(circle at 50% 45%, var(--teal-soft), transparent 70%),
    var(--logo-bg);
}

.art-logo img {
  width: min(300px, 82%);
  filter: drop-shadow(0 14px 24px rgba(20, 24, 23, 0.12));
}

.work-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--teal-ink);
  word-break: break-word;
}

.work-link .i {
  font-size: 15px;
  flex: none;
  transition: transform 0.3s ease;
}

.work-link:hover .i { transform: translate(3px, -3px); }

.work-link.static { color: var(--ink-mute); }

.wip {
  margin-top: clamp(30px, 4vw, 44px);
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.wip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.wip-head h3 {
  font-size: 15px;
  letter-spacing: 0;
  font-weight: 700;
}

.wip-head span {
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--sun);
}

.wip-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 17px 6px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s ease, padding-inline 0.3s ease;
}

.wip-row:hover {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  padding-inline: 12px;
}

.wip-year {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}

.wip-main h4 {
  margin-bottom: 3px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wip-main p {
  color: var(--ink-soft);
  font-size: 13.5px;
}

.wip-status {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  white-space: nowrap;
}

/* ---------- 10. Stack ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stack-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.stack-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 0;
  background: var(--teal);
  transition: height 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.stack-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--teal) 40%, var(--line));
  box-shadow: var(--shadow-sm);
}

.stack-card:hover::after { height: 100%; }

.stack-index {
  position: absolute;
  top: 14px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--line-strong);
  opacity: 0.55;
  pointer-events: none;
}

.stack-card h3 {
  margin-bottom: 18px;
  font-size: clamp(18px, 1.7vw, 21px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stack-card:hover .chips li {
  border-color: color-mix(in srgb, var(--teal) 35%, var(--line));
  color: var(--ink);
}

/* ---------- 11. Notes ---------- */
.notes-list {
  border-bottom: 1px solid var(--line);
}

.note-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 22px;
  gap: clamp(14px, 2.4vw, 32px);
  align-items: center;
  padding: clamp(19px, 2.4vw, 26px) 6px;
  border-top: 1px solid var(--line);
  transition: background-color 0.3s ease, padding-inline 0.35s ease;
}

.note-row:hover {
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  padding-inline: 12px;
}

.note-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}

.note-main h3 {
  margin-bottom: 5px;
  font-size: clamp(18px, 1.9vw, 23px);
  font-weight: 700;
  letter-spacing: -0.025em;
  transition: color 0.3s ease;
}

.note-main p {
  color: var(--ink-soft);
  font-size: 13.5px;
}

.note-row:hover .note-main h3 { color: var(--teal-ink); }

.note-tag {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  white-space: nowrap;
}

.note-arrow {
  font-size: 17px;
  color: var(--ink-mute);
  transition: transform 0.3s ease, color 0.3s ease;
}

.note-row:hover .note-arrow {
  color: var(--teal-ink);
  transform: translate(3px, -3px);
}

/* ---------- 12. Contact ---------- */
.contact {
  overflow: hidden;
  background: var(--dark);
  color: var(--on-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.contact::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -45%;
  width: min(820px, 100vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal-soft), transparent 65%);
  pointer-events: none;
}

.contact .kicker {
  position: relative;
  z-index: 1;
  color: var(--on-dark-soft);
}

.contact .kicker span { color: var(--teal); }

.contact .kicker::after { background: rgba(255, 255, 255, 0.18); }

.contact-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: end;
  margin-top: 26px;
}

.contact h2 {
  font-size: clamp(36px, 5.8vw, 70px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.contact h2 .serif {
  color: var(--teal);
  font-size: 1.05em;
}

.contact-copy p,
.contact-grid > div > p {
  max-width: 44ch;
  margin-top: 22px;
  color: var(--on-dark-soft);
  font-size: 15px;
  line-height: 1.85;
}

.contact-actions {
  display: grid;
  gap: 22px;
  justify-items: start;
}

.mail-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-mail {
  padding: 16px 24px;
  background: var(--teal);
  color: #06211e;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-mail:hover {
  background: var(--on-dark);
  color: var(--dark);
  transform: translateY(-2px);
}

.copy-btn {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: var(--on-dark-soft);
  font-size: 17px;
  transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.copy-btn:hover {
  color: var(--teal);
  border-color: var(--teal);
  background: rgba(255, 255, 255, 0.05);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--on-dark-soft);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.socials a:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.socials .i { font-size: 14px; }

.contact-watermark {
  position: absolute;
  right: -5%;
  bottom: -14%;
  width: min(440px, 55vw);
  opacity: 0.05;
  transform: rotate(-8deg);
  pointer-events: none;
  filter: grayscale(1) brightness(1.8);
}

[data-theme="dark"] .contact-watermark { opacity: 0.07; }

/* ---------- 13. Footer ---------- */
.site-footer {
  background: var(--dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--on-dark-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 26px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand .brand-mark {
  width: 38px;
  height: 38px;
  padding: 5px;
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--logo-bg);
  box-shadow: none;
}

.footer-brand p {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--on-dark-soft);
}

.copyright {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: rgba(244, 246, 241, 0.42);
}

.to-top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--on-dark-soft);
  transition: color 0.3s ease;
}

.to-top-link:hover { color: var(--teal); }

/* ---------- 14. Floating UI ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, border-color 0.3s ease, color 0.3s ease;
}

.to-top .i { transform: rotate(-45deg); }

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  color: var(--teal-ink);
  border-color: var(--teal-ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 80;
  max-width: min(90vw, 420px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  text-align: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- 15. Animations ---------- */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes cue {
  0% { transform: translateY(-120%); }
  100% { transform: translateY(320%); }
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes lineIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes dash {
  to { stroke-dashoffset: -18; }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-6deg); }
  55% { transform: rotate(5deg); }
  80% { transform: rotate(-2deg); }
}

.brand-mark.is-wiggle { animation: wiggle 0.6s ease; }

.logo-frame.is-wiggle img { animation: wiggle 0.6s ease; }

/* ---------- 16. Responsive ---------- */
@media (min-width: 901px) {
  .terminal {
    position: sticky;
    top: calc(var(--header-h) + 28px);
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 36px;
  }

  .hero-visual { max-width: 420px; }

  .chip-a { left: -2%; }
  .chip-b { right: -2%; }
  .chip-c { left: -1%; }

  .work-grid { grid-template-columns: 1fr; }
  .work-card { gap: 14px; }

  .about-grid { gap: 40px; }

  .contact-grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 34px;
  }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .header-cta { display: none; }

  .grain { display: none; }

  .hero-grid { grid-template-columns: 1fr; }

  .hero-visual {
    justify-self: center;
    max-width: 430px;
    margin-top: 22px;
  }

  .logo-card { transform: rotate(-1.6deg); }

  .scroll-cue { display: none; }

  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 20px;
  }

  .section-sub { justify-self: start; }

  .section-head > .link-arrow {
    justify-self: start;
    align-self: start;
    margin-bottom: 0;
  }

  .about-grid { grid-template-columns: 1fr; }

  .terminal { max-width: 640px; }

  .stack-grid { grid-template-columns: 1fr; }

  .wip-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; }

  .footer-inner {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px 26px;
  }
}

@media (max-width: 640px) {
  :root { --header-h: 68px; }

  .brand-text small { display: none; }
  .header-inner { gap: 12px; }

  .hero-title { font-size: clamp(40px, 11.5vw, 58px); }

  .hero-lede { margin-top: 24px; font-size: 15.5px; }

  .hero-tags { gap: 4px 0; }
  .hero-tags li { font-size: 9.5px; white-space: nowrap; }
  .hero-tags li:not(:last-child)::after { margin-left: 6px; }

  .hero-actions { gap: 16px; }

  .float-chip { display: none; }

  .handnote { right: 2%; font-size: 10px; }

  .hero-visual { max-width: 360px; padding-bottom: 22px; }

  .kicker::after { width: 26px; }

  .facts { gap: 18px 16px; }
  .facts dd { font-size: 13.5px; }

  .terminal-body { font-size: 11.4px; padding: 18px 16px 20px; }

  .wip-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px 14px;
    padding-block: 16px;
  }

  .wip-year { display: none; }
  .wip-status { grid-row: 1; grid-column: 2; }
  .wip-main { grid-column: 1; grid-row: 1; }

  .pipeline .label { font-size: 19px; }
  .pipeline .num { font-size: 12px; }
  .pipeline .sub,
  .pipeline .loop-label { display: none; }

  .note-row {
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 12px 14px;
  }

  .note-num, .note-tag { display: none; }
  .note-main h3 { font-size: 17px; }
  .note-main p { font-size: 12.5px; }

  .mail-row { width: 100%; }
  .btn-mail { flex: 1; justify-content: center; padding-inline: 16px; font-size: 14px; }

  .contact h2 { font-size: clamp(34px, 10vw, 48px); }

  .contact-watermark { width: 300px; opacity: 0.05; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }

  .to-top { right: 14px; bottom: 14px; }

  .toast { bottom: 76px; font-size: 12px; }
}

@media (max-width: 400px) {
  .eyebrow { font-size: 9.5px; letter-spacing: 0.06em; }
  .hero-title { letter-spacing: -0.04em; }
  .btn { font-size: 14px; padding: 13px 18px; }
  .note-main h3 { font-size: 16px; }
}

/* ---------- 17. Motion & print ---------- */
@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;
  }

  .mark-line path { stroke-dashoffset: 0; }
  .ticker-track { animation: none; }

  html.js .reveal { opacity: 1; transform: none; }
  html.js .term-line { opacity: 1; }
}

@media print {
  .site-header,
  .mobile-menu,
  .to-top,
  .toast,
  .grain,
  .scroll-progress,
  .ticker { display: none !important; }

  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
}