/* ════════════════════════════════════════════════════════════════
   PEIJUN ZHU — PERSONAL SITE
   warm minimal · fluid dynamics · kinetic type
   ════════════════════════════════════════════════════════════════ */

:root {
  --bg: #fffcf8;
  --bg-soft: #f7f3ee;
  --ink: #0f0f0f;
  --ink-dim: rgba(15, 15, 15, 0.7);
  --ink-faint: rgba(15, 15, 15, 0.45);
  --line: rgba(15, 15, 15, 0.12);
  --accent1: #166534;
  --accent2: #92400e;
  --accent3: #3f6212;
  --grad: linear-gradient(92deg, var(--accent1) 0%, var(--accent2) 50%, var(--accent3) 100%);
  --glass: rgba(255, 252, 248, 0.75);
  --glass-strong: rgba(255, 252, 248, 0.9);

  --font-sans: "Inter", "Noto Sans SC", "HarmonyOS Sans SC", "MiSans", "PingFang SC",
               "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Georgia", "Times New Roman", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --pad-x: clamp(20px, 5vw, 96px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
html, body { height: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-weight: 400;
  letter-spacing: 0.005em;
}
body[data-loading] { overflow: hidden; }

::selection { background: var(--accent1); color: #fff; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent1), var(--accent3)); border-radius: 99px; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
em { font-style: normal; }

.mono { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.02em; }
.dim { color: var(--ink-dim); }
.serif-it { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.outline {
  color: transparent;
  -webkit-text-stroke: clamp(1.2px, 0.18vw, 2.5px) rgba(15, 15, 15, 0.5);
}
.outline-num {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(15, 15, 15, 0.22);
}

:focus-visible { outline: 2px dashed var(--accent1); outline-offset: 4px; }

/* ── Fixed canvas layers ─────────────────────────────── */
#fluid {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0; opacity: 0.45;
}
#blob {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  cursor: pointer;
}

.veil {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% 0%, transparent 50%, rgba(255, 252, 248, 0.4) 100%),
    linear-gradient(rgba(255, 252, 248, 0.15), rgba(255, 252, 248, 0.15));
}

.grain {
  position: fixed; inset: -100px; z-index: 60; pointer-events: none;
  opacity: 0.03;
  mix-blend-mode: multiply;
  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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-26px, 14px); }
  50% { transform: translate(18px, -22px); }
  75% { transform: translate(-12px, -8px); }
  100% { transform: translate(0, 0); }
}

main { position: relative; z-index: 3; }

/* ── Custom cursor ───────────────────────────────────── */
.cursor, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 10000;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}
.cursor {
  width: 8px; height: 8px;
  background: var(--ink);
  mix-blend-mode: difference;
}
.cursor-ring {
  width: 42px; height: 42px;
  border: 1.5px solid rgba(26, 26, 46, 0.3);
  display: flex; align-items: center; justify-content: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              border-color 0.35s, background-color 0.35s;
}
.cursor-ring .cursor-label {
  font-size: 10px; letter-spacing: 0.1em; opacity: 0;
  transition: opacity 0.25s;
}
.cursor-ring.is-hover { width: 64px; height: 64px; border-color: var(--accent1); }
.cursor-ring.is-view {
  width: 88px; height: 88px;
  border-color: transparent;
  background: rgba(22, 163, 74, 0.1);
  backdrop-filter: blur(2px);
}
.cursor-ring.is-view .cursor-label { opacity: 1; }
.cursor-ring.is-down { transform-origin: center; }
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-ring { display: none; }
}

/* ── Scroll progress ─────────────────────────────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 200; pointer-events: none;
}
#progress-fill {
  display: block; height: 100%; width: 100%;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
}

/* ── Preloader ───────────────────────────────────────── */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.pre-inner {
  width: min(560px, 86vw);
  display: flex; flex-direction: column; gap: 18px;
}
.pre-name { font-size: 13px; color: var(--ink-dim); letter-spacing: 0.15em; }
.pre-count {
  font-size: clamp(90px, 20vw, 190px);
  font-weight: 800; line-height: 0.9; letter-spacing: -0.04em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.pre-bar {
  height: 2px; background: var(--line); overflow: hidden; border-radius: 2px;
}
#pre-bar-fill {
  display: block; height: 100%; width: 100%;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
}
.pre-hint { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.12em; }

/* ── Nav ─────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad-x);
  transition: background-color 0.5s, backdrop-filter 0.5s, border-color 0.5s, padding 0.5s;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  padding: 12px var(--pad-x);
  background: rgba(250, 251, 253, 0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: 0.01em; }
.logo-mark {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.4);
  animation: orbPulse 3.2s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); border-radius: 50%; }
  35% { transform: scale(1.18) skewX(6deg); border-radius: 42% 58% 60% 40% / 55% 45% 55% 45%; }
  70% { transform: scale(0.92); border-radius: 58% 42% 40% 60% / 45% 55% 45% 55%; }
}
.logo-text em { font-style: normal; color: var(--ink-dim); font-weight: 400; }

.nav-links { display: flex; gap: clamp(16px, 2.6vw, 40px); }
.nav-links a {
  position: relative;
  font-size: 15px; font-weight: 500; letter-spacing: 0.01em;
  padding: 6px 2px;
  color: var(--ink-dim);
  transition: color 0.3s;
}
.nav-links a .ni { font-size: 11px; vertical-align: super; margin-right: 4px; color: var(--ink-faint); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }

.nav-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.06em;
  padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 99px;
  transition: border-color 0.3s, background-color 0.3s;
}
.nav-status:hover { border-color: rgba(22, 163, 74, 0.4); background: rgba(22, 163, 74, 0.05); }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: ping 2s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  80%, 100% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
}

#nav-burger { display: none; width: 40px; height: 40px; position: relative; z-index: 102; }
#nav-burger span {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--ink);
  transition: transform 0.4s var(--ease-back), top 0.4s;
}
#nav-burger span:nth-child(1) { top: 15px; }
#nav-burger span:nth-child(2) { top: 23px; }
#nav-burger.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
#nav-burger.open span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

#mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(250, 251, 253, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 9vw;
  clip-path: circle(0% at calc(100% - 38px) 38px);
  transition: clip-path 0.7s var(--ease-out);
  visibility: hidden;
}
#mobile-menu.open { clip-path: circle(150% at calc(100% - 38px) 38px); visibility: visible; }
#mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
#mobile-menu a {
  font-size: clamp(34px, 9vw, 64px); font-weight: 800; letter-spacing: -0.02em;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 16px;
}
#mobile-menu a .mono { font-size: 13px; color: var(--accent1); }
.mm-foot { position: absolute; bottom: 32px; left: 9vw; font-size: 13px; color: var(--ink-dim); }

/* ── Hero ────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: stretch;
  padding: 120px var(--pad-x) 36px;
}
.hero-inner { width: 100%; display: flex; flex-direction: column; justify-content: center; }

.hero-eyebrow {
  font-size: clamp(12px, 1.2vw, 15px);
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-bottom: clamp(18px, 3vh, 36px);
}

.hero-name { display: block; line-height: 0.92; letter-spacing: -0.02em; }
.hero-name-en {
  display: block;
  font-size: clamp(64px, 15vw, 220px);
  font-weight: 800;
  text-transform: uppercase;
}
.hero-name-row {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: clamp(20px, 4vw, 56px);
}
.hero-name-cn {
  font-size: clamp(36px, 6.5vw, 96px);
  font-weight: 700;
  letter-spacing: 0.06em;
  transform: translateY(-0.04em);
}

.hero-sub {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-top: clamp(28px, 5vh, 56px);
  max-width: 1280px;
}
.hero-desc { font-size: clamp(16px, 1.7vw, 20px); line-height: 1.9; max-width: 560px; font-weight: 400; }
.hero-desc em {
  font-family: var(--font-serif); font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 0 2px;
}
.hero-meta { display: flex; flex-direction: column; gap: 10px; text-align: right; }
.hero-meta li { font-size: 13px; letter-spacing: 0.06em; color: var(--ink-dim); }
.hero-meta li::before { content: "▰ "; color: var(--accent1); }

.hero-bottom {
  margin-top: auto;
  padding-top: 48px;
  display: flex; justify-content: space-between; align-items: center;
}
.scroll-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 22px;
  border: 1px solid var(--ink-faint);
  border-radius: 28px;
  font-size: 13px; letter-spacing: 0.1em;
  color: var(--ink-dim);
  text-decoration: none;
  transition: all 0.35s var(--ease-out);
}
.scroll-btn:hover {
  background: var(--accent1);
  border-color: var(--accent1);
  color: #fff;
}
.scroll-btn-arrow {
  font-size: 18px;
  animation: bounceDown 1.6s ease-in-out infinite;
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.hero-coords { font-size: 12px; line-height: 1.7; letter-spacing: 0.1em; color: var(--ink-faint); text-align: right; }

/* split chars */
[data-split] { overflow: hidden; }
[data-split] .char {
  display: inline-block;
  will-change: transform;
  white-space: pre;
}

/* ── Marquee ─────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  padding: 24px 0;
  user-select: none;
}
.marquee.edge-top { border-top: 1px solid var(--line); }
.marquee.edge-bottom { border-bottom: 1px solid var(--line); }
.marquee-track {
  display: flex; width: max-content;
  animation: marqueeMove 38s linear infinite;
  will-change: transform;
}
.marquee.reverse .marquee-track { animation-direction: reverse; }
.marquee-track span {
  display: flex; align-items: center;
  white-space: nowrap;
  font-size: clamp(15px, 1.8vw, 22px);
  font-weight: 600; letter-spacing: 0.08em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.marquee-track i {
  font-style: normal;
  margin: 0 1.4em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes marqueeMove { to { transform: translateX(-50%); } }

/* ── Section shell ───────────────────────────────────── */
.section { padding: clamp(100px, 15vh, 180px) var(--pad-x); position: relative; }
.section-slim { padding: clamp(70px, 10vh, 120px) 0; }
.section-slim .section-head { padding: 0 var(--pad-x); margin-bottom: 42px; }
.section-full { padding-left: 0; padding-right: 0; }
.section-full .section-head { padding: 0 var(--pad-x); }

.section-head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: clamp(42px, 7vh, 80px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.sec-num {
  font-size: 13px; color: var(--accent1); letter-spacing: 0.1em;
}
.sec-title {
  font-size: clamp(28px, 4.6vw, 56px);
  font-weight: 700; letter-spacing: -0.015em;
  line-height: 1.15;
}
.sec-title .reveal-line { display: inline-block; }
.sec-en { margin-left: auto; font-size: 12px; letter-spacing: 0.1em; color: var(--ink-faint); }

.reveal-line { display: block; }

/* ── Manifesto ───────────────────────────────────────── */
.manifesto {
  font-size: clamp(24px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.005em;
  max-width: 1180px;
}
.manifesto .word { opacity: 0.12; display: inline-block; transition: none; }
.manifesto-en {
  margin-top: 34px;
  font-size: clamp(16px, 1.8vw, 21px);
  color: var(--ink-dim);
  line-height: 1.7;
}

.stats-grid {
  margin-top: clamp(60px, 9vh, 110px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass);
}
.stat {
  padding: clamp(28px, 3.5vw, 48px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: background-color 0.45s;
}
.stat:nth-child(3n) { border-right: none; }
.stat:nth-child(n+4) { border-bottom: none; }
.stat:hover { background: rgba(22, 163, 74, 0.03); }
.stat::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease-out);
}
.stat:hover::after { transform: scaleX(1); }
.stat-num {
  display: block;
  font-size: clamp(40px, 5.5vw, 76px);
  font-weight: 800; line-height: 1; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-num sup { font-size: 0.45em; }
.stat-label { display: block; margin-top: 16px; font-size: 15px; line-height: 1.7; color: var(--ink); }
.stat-label .mono { font-size: 12px; letter-spacing: 0.05em; color: var(--ink-dim); }

/* ── Experience（横向） ──────────────────────────────── */
#exp-viewport { overflow: hidden; }
#exp-track {
  display: flex; align-items: stretch;
  gap: clamp(20px, 3vw, 48px);
  padding: 10px var(--pad-x) 30px;
  width: max-content;
  will-change: transform;
}
.exp-card {
  flex: 0 0 auto;
  width: min(620px, 80vw);
  min-height: clamp(420px, 58vh, 560px);
  display: flex; flex-direction: column;
  padding: clamp(28px, 3.5vw, 48px);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.exp-card:hover { border-color: rgba(22, 163, 74, 0.3); box-shadow: 0 8px 40px rgba(22, 163, 74, 0.08); }
.exp-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 80% 0%, rgba(22, 163, 74, 0.06), transparent 70%);
}
.exp-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.exp-index { font-size: clamp(48px, 6vw, 84px); font-weight: 800; line-height: 1; }
.exp-period { font-size: 13px; letter-spacing: 0.06em; color: var(--ink-dim); display: flex; align-items: center; gap: 8px; }
.now-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #10b981; display: inline-block;
  animation: ping 2s infinite;
}
.exp-company { font-size: clamp(24px, 2.8vw, 36px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.exp-co-sub { display: block; font-size: 0.52em; font-weight: 400; color: var(--ink-dim); margin-top: 8px; letter-spacing: 0.02em; }
.exp-role { margin: 16px 0 24px; font-size: 14px; letter-spacing: 0.08em; }
.exp-points { display: flex; flex-direction: column; gap: 16px; }
.exp-points li {
  font-size: 15px; line-height: 1.8; color: var(--ink-dim);
  padding-left: 20px; position: relative;
}
.exp-points li::before {
  content: "◆"; position: absolute; left: 0; top: 2px;
  font-size: 8px; color: var(--accent1);
}
.exp-points b { color: var(--ink); font-weight: 600; }
.exp-points em {
  font-style: normal; font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.badge-win {
  display: inline-block; margin-left: 8px;
  font-size: 11px; letter-spacing: 0.06em;
  padding: 3px 10px; border-radius: 99px;
  border: 1px solid rgba(202, 138, 4, 0.4);
  color: var(--accent2);
  vertical-align: 2px;
}
.exp-tags { margin-top: auto; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.exp-tags span {
  font-size: 12px; letter-spacing: 0.04em;
  padding: 6px 14px; border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
}
.exp-card-now { border-color: rgba(16, 185, 129, 0.3); }

.exp-card-cta { justify-content: center; background: transparent; border-style: dashed; }
.exp-cta-link { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.exp-cta-big { font-size: clamp(56px, 7vw, 110px); font-weight: 800; line-height: 0.95; text-transform: uppercase; }
.exp-cta-sub { font-size: 13px; letter-spacing: 0.12em; color: var(--ink-dim); }

.exp-progress {
  margin: 26px var(--pad-x) 0;
  height: 2px; background: var(--line); border-radius: 2px;
}
#exp-progress-fill {
  display: block; height: 100%; width: 100%;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
}

/* ── Projects ────────────────────────────────────────── */
.project-list { border-top: 1px solid var(--line); }
.project-row { border-bottom: 1px solid var(--line); position: relative; }
.project-row > a, .project-row .pr-static {
  display: grid;
  grid-template-columns: clamp(48px, 6vw, 90px) 1fr auto clamp(36px, 4vw, 64px);
  align-items: center;
  gap: clamp(14px, 2.5vw, 36px);
  padding: clamp(24px, 3.6vh, 42px) 6px;
  position: relative;
  z-index: 1;
}
.project-row::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(92deg, rgba(101, 163, 13, 0.05), rgba(202, 138, 4, 0.05), rgba(22, 163, 74, 0.05));
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.5s var(--ease-out);
}
.project-row:hover::before { transform: scaleY(1); }
.pr-idx { font-size: 13px; color: var(--ink-faint); letter-spacing: 0.08em; }
.pr-title {
  display: block;
  font-size: clamp(20px, 3vw, 40px);
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.2;
  transition: transform 0.5s var(--ease-out), color 0.3s;
}
.project-row:hover .pr-title {
  transform: translateX(14px);
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pr-desc {
  display: block; margin-top: 10px;
  font-size: 15px; color: var(--ink-dim); line-height: 1.7;
  max-width: 640px;
  transition: transform 0.5s var(--ease-out) 0.04s;
}
.project-row:hover .pr-desc { transform: translateX(14px); }
.pr-tag {
  font-size: 11px; letter-spacing: 0.06em; color: var(--ink-dim);
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px;
  white-space: nowrap;
  transition: border-color 0.3s, color 0.3s;
}
.project-row:hover .pr-tag { border-color: rgba(22, 163, 74, 0.4); color: var(--ink); }
.pr-arrow {
  font-size: clamp(20px, 2.4vw, 32px);
  justify-self: end;
  transition: transform 0.45s var(--ease-back);
}
.project-row:hover .pr-arrow { transform: rotate(45deg) scale(1.15); color: var(--accent1); }
.projects-foot { margin-top: 30px; text-align: right; font-size: 13px; letter-spacing: 0.1em; }
.projects-foot a { color: var(--ink-dim); transition: color 0.3s; }
.projects-foot a:hover { color: var(--accent1); }

/* ── Research ────────────────────────────────────────── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.r-card {
  position: relative;
  min-height: 280px;
  padding: clamp(28px, 3.5vw, 44px);
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: border-color 0.4s, transform 0.5s var(--ease-out), box-shadow 0.4s;
}
.r-card:hover { border-color: rgba(22, 163, 74, 0.3); transform: translateY(-6px); box-shadow: 0 12px 40px rgba(22, 163, 74, 0.08); }
.r-kicker { font-size: 11px; letter-spacing: 0.12em; color: var(--accent1); }
.r-card h3 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; margin: 12px 0 22px; }
.r-list { display: flex; flex-direction: column; gap: 12px; max-width: 78%; }
.r-list li { font-size: 15px; line-height: 1.7; padding-left: 18px; position: relative; }
.r-list li::before { content: "—"; position: absolute; left: 0; color: var(--accent1); }
.r-list .dim { display: block; font-size: 13px; margin-top: 2px; }
.r-big {
  position: absolute; right: 18px; bottom: 0;
  font-size: clamp(90px, 11vw, 170px);
  font-weight: 800; line-height: 0.8;
  pointer-events: none;
  opacity: 0.08;
}

/* ── Contact ─────────────────────────────────────────── */
#contact { padding-bottom: clamp(60px, 8vh, 100px); }
.contact-big { line-height: 0.92; letter-spacing: -0.03em; margin-bottom: 40px; }
.cb-line { display: block; font-weight: 800; text-transform: uppercase; font-size: clamp(52px, 11.5vw, 180px); }
.contact-note { font-size: clamp(16px, 1.7vw, 19px); line-height: 1.9; max-width: 560px; margin-bottom: 48px; }

.contact-actions { display: flex; flex-wrap: wrap; gap: 18px; }
.btn-magnet {
  display: inline-block;
  border: 1px solid rgba(26, 26, 46, 0.2);
  border-radius: 99px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s;
  will-change: transform;
}
.btn-magnet::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease-out);
}
.btn-magnet:hover::before { transform: translateY(0); }
.btn-magnet:hover { border-color: transparent; }
.btn-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
  padding: clamp(16px, 2vw, 22px) clamp(24px, 3vw, 40px);
  font-size: clamp(15px, 1.6vw, 19px); font-weight: 600;
  transition: color 0.35s;
}
.btn-magnet:hover .btn-inner { color: #fff; }
.btn-inner em { font-size: 11px; letter-spacing: 0.1em; opacity: 0.6; }
.btn-orb {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--grad);
  animation: orbPulse 2.6s ease-in-out infinite;
}
.btn-magnet:hover .btn-orb { background: #fff; }
.btn-ghost { border-style: dashed; }

/* ── Footer ──────────────────────────────────────────── */
#footer {
  border-top: 1px solid var(--line);
  padding: 28px var(--pad-x);
}
.foot-row {
  display: flex; flex-wrap: wrap; gap: 14px 34px;
  justify-content: space-between; align-items: center;
  font-size: 12px; letter-spacing: 0.06em; color: var(--ink-dim);
}
.foot-clock { color: var(--accent1); font-variant-numeric: tabular-nums; }
#back-top { transition: color 0.3s; }
#back-top:hover { color: var(--accent2); }

/* ── Toast ───────────────────────────────────────────── */
#toast {
  position: fixed; left: 50%; bottom: 36px; z-index: 10001;
  transform: translate(-50%, 180%);
  padding: 14px 26px;
  font-size: 13px; letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(22, 163, 74, 0.4);
  border-radius: 99px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.55s var(--ease-back);
  pointer-events: none;
}
#toast.show { transform: translate(-50%, 0); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links, .nav-status { display: none; }
  #nav-burger { display: block; }

  #exp-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #exp-viewport::-webkit-scrollbar { display: none; }
  #exp-track { width: max-content; }
  .exp-card { scroll-snap-align: center; width: 82vw; min-height: 0; }
  .exp-progress { display: none; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3n) { border-right: 1px solid var(--line); }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(n+4) { border-bottom: 1px solid var(--line); }
  .stat:nth-child(n+5) { border-bottom: none; }

  .research-grid { grid-template-columns: 1fr; }
  .r-list { max-width: 100%; }

  .project-row > a, .project-row .pr-static {
    grid-template-columns: 1fr auto;
    grid-template-areas: "idx tag" "body body" "arrow arrow";
    row-gap: 10px;
  }
  .pr-idx { grid-area: idx; }
  .pr-tag { grid-area: tag; justify-self: end; }
  .pr-body { grid-area: body; }
  .pr-arrow { display: none; }

  .hero-meta { text-align: left; }
  .hero-meta li::before { content: "▰ "; }
  .hero-bottom { position: static; margin-top: 48px; flex-direction: column; align-items: flex-start; gap: 18px; }
  .scroll-btn { align-self: flex-start; }
  #hero { padding-top: 110px; padding-bottom: 40px; min-height: 0; }
  .hero-coords { text-align: left; }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; border-radius: 12px; }
  .stat, .stat:nth-child(n) { border-right: none !important; border-bottom: 1px solid var(--line) !important; }
  .stat:last-child { border-bottom: none !important; }
  .contact-actions { flex-direction: column; align-items: stretch; }
  .btn-inner { justify-content: center; }
}

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .marquee-track { animation: none !important; }
  .cursor, .cursor-ring, .grain { display: none !important; }
  .manifesto .word { opacity: 1 !important; }
}
