/* ============================================================
   Ming Mu — full-page snap site, game-flavored animations
   ============================================================ */

:root {
  --bg: #faf9f5;
  --bg-2: #f3f0e6;
  --surface: #ffffff;
  --surface-2: #f5f3ec;
  --ink: #1f1e1d;
  --ink-2: #3d3c3a;
  --ink-3: #73726c;
  --ink-4: #a5a49d;
  --line: rgba(31,30,29,0.14);
  --line-strong: rgba(31,30,29,0.26);
  --accent: #5f8f56;
  --accent-2: #4a7541;
  --accent-soft: #eaf1e6;
  --accent-ink: #2c4e26;
  --pixel: #5f8f56;
  --gold: #d4a73a;
  --magenta: #c44a6e;
  --sky: #4a7ba8;

  --font-sans: "Inter", "Noto Sans SC", -apple-system, sans-serif;
  --font-serif: "Noto Serif SC", ui-serif, Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --font-pixel: "Press Start 2P", ui-monospace, monospace;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; padding: 0; }
code { font-family: var(--font-mono); font-size: 0.88em; }

/* ---------- Snap scroll container ---------- */
.snap-root {
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.snap-root::-webkit-scrollbar { display: none; }
.page {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}
.page--scrollable {
  scroll-snap-stop: normal;
  min-height: 100vh;
  height: auto;
}
.page-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 40px 80px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- Top nav ---------- */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(250,249,245,0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.topnav--scrolled { border-bottom-color: var(--line); background: rgba(250,249,245,0.92); }
.topnav-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-pixel {
  width: 18px; height: 18px; background: var(--accent);
  box-shadow:
    inset 0 0 0 2px var(--bg),
    inset 0 0 0 4px var(--accent),
    inset 0 0 0 6px var(--bg);
  animation: pixel-pulse 2.4s var(--ease) infinite;
}
@keyframes pixel-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(45deg); }
}
.brand-name-en { color: var(--ink); font-size: 15px; }
.brand-name-zh { color: var(--ink-3); font-family: var(--font-serif); font-size: 15px; font-weight: 500; }
.topnav-links { display: inline-flex; gap: 4px; align-items: center; }
.topnav-link {
  padding: 8px 14px; border-radius: var(--radius-pill);
  color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  transition: background 150ms, color 150ms;
  position: relative;
}
.topnav-link:hover { background: var(--surface-2); color: var(--ink); }
.topnav-link--active { color: var(--accent); }
.topnav-link--active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: var(--accent); border-radius: 2px;
  animation: underline-in 220ms var(--ease-out);
}
@keyframes underline-in {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); }
}
.topnav-lang {
  padding: 6px 12px; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  color: var(--ink-3); border: 1px solid var(--line);
  margin-left: 8px;
}
.topnav-lang:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---------- Right-side dot nav ---------- */
.dotnav {
  position: fixed; right: 24px; top: 50%; transform: translateY(-50%);
  z-index: 50;
  display: flex; flex-direction: column; gap: 14px;
}
.dotnav-item {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer;
  padding: 4px 0;
}
.dotnav-dot {
  width: 10px; height: 10px;
  background: var(--ink-4);
  transition: all 220ms var(--ease-bounce);
  position: relative;
}
.dotnav-item:hover .dotnav-dot { background: var(--accent); transform: scale(1.4) rotate(45deg); }
.dotnav-item--active .dotnav-dot {
  background: var(--accent);
  transform: rotate(45deg) scale(1.3);
  box-shadow: 0 0 0 3px rgba(95,143,86,0.18);
}
.dotnav-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0; transform: translateX(8px);
  transition: opacity 180ms, transform 180ms;
  pointer-events: none;
}
.dotnav-item:hover .dotnav-label,
.dotnav-item--active .dotnav-label {
  opacity: 1; transform: translateX(0);
  color: var(--accent);
}

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.reveal.is-shown { opacity: 1; transform: translateY(0); }

.reveal-pop { opacity: 0; transform: translateY(30px) scale(0.9); transition: opacity 600ms var(--ease-bounce), transform 600ms var(--ease-bounce); }
.reveal-pop.is-shown { opacity: 1; transform: translateY(0) scale(1); }

.reveal-pixel { opacity: 0; clip-path: inset(0 100% 0 0); transition: opacity 200ms, clip-path 700ms steps(8); }
.reveal-pixel.is-shown { opacity: 1; clip-path: inset(0 0 0 0); }

.reveal-glitch { opacity: 0; }
.reveal-glitch.is-shown { animation: glitch-in 600ms var(--ease-out) forwards; }
@keyframes glitch-in {
  0%   { opacity: 0; transform: translate(0,0); }
  20%  { opacity: 1; transform: translate(-3px, 1px); filter: hue-rotate(40deg); }
  40%  { transform: translate(3px, -1px); filter: hue-rotate(-30deg); }
  60%  { transform: translate(-1px, 0); filter: none; }
  100% { opacity: 1; transform: translate(0,0); filter: none; }
}

.stagger > * { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }
.stagger.is-shown > * { opacity: 1; transform: translateY(0); }
.stagger.is-shown > *:nth-child(1) { transition-delay: 0ms; }
.stagger.is-shown > *:nth-child(2) { transition-delay: 80ms; }
.stagger.is-shown > *:nth-child(3) { transition-delay: 160ms; }
.stagger.is-shown > *:nth-child(4) { transition-delay: 240ms; }
.stagger.is-shown > *:nth-child(5) { transition-delay: 320ms; }
.stagger.is-shown > *:nth-child(6) { transition-delay: 400ms; }
.stagger.is-shown > *:nth-child(7) { transition-delay: 480ms; }
.stagger.is-shown > *:nth-child(8) { transition-delay: 560ms; }
.stagger.is-shown > *:nth-child(n+9) { transition-delay: 600ms; }

/* ---------- HOME page ---------- */
.home {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(95,143,86,0.10), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(212,167,58,0.07), transparent 55%),
    var(--bg);
  position: relative;
  overflow: hidden;
}
.home-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(31,30,29,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31,30,29,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.home-sprite {
  position: absolute;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--accent);
  opacity: 0.5;
  pointer-events: none;
}
.home-sprite.s1 { top: 14%; left: 8%; animation: float 4.4s var(--ease) infinite; }
.home-sprite.s2 { top: 22%; right: 12%; animation: float 5.6s var(--ease) infinite reverse; color: var(--gold); }
.home-sprite.s3 { bottom: 18%; left: 11%; animation: float 5s var(--ease) infinite; color: var(--magenta); }
.home-sprite.s4 { bottom: 12%; right: 9%; animation: float 4s var(--ease) infinite reverse; color: var(--sky); }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}
.home-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  padding: 80px 32px 80px;
  text-align: left;
}
.home-pretitle {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.18em;
  padding: 6px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}
.home-pretitle .blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.home-tagline {
  font-family: var(--font-serif);
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 22px;
  max-width: 18ch;
}
.home-tagline .accent { color: var(--accent); position: relative; display: inline-block; }
.home-tagline .accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 8px;
  background: var(--accent);
  opacity: 0.18;
  transform: scaleX(0); transform-origin: left;
  animation: highlight-in 700ms var(--ease-out) 800ms forwards;
}
@keyframes highlight-in { to { transform: scaleX(1); } }

.home-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 40px;
}

.home-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-size: 14.5px; font-weight: 600;
  font-family: var(--font-sans);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: transform 180ms var(--ease-bounce), box-shadow 180ms, border-color 180ms;
  position: relative;
}
.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 26px -10px rgba(31,30,29,0.25);
  border-color: var(--ink);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 4px 0 0 var(--accent-2);
}
.btn--primary:hover {
  background: var(--accent-2); border-color: var(--accent-2);
  box-shadow: 0 6px 0 0 #355c2e, 0 12px 28px -10px rgba(95,143,86,0.4);
}
.btn--primary:active { box-shadow: 0 2px 0 0 var(--accent-2); }
.btn-arrow { transition: transform 200ms var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ---------- Home doors (human / agent) ---------- */
.home-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
  max-width: 760px;
}
.door {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr 24px;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: transform 220ms var(--ease-bounce), border-color 220ms, box-shadow 220ms;
}
.door:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: 0 14px 36px -16px rgba(31,30,29,0.28);
}
.door-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--surface-2);
  display: grid; place-items: center;
  font-size: 22px;
}
.door-title { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.door-sub { color: var(--ink-3); font-size: 13px; margin-top: 3px; line-height: 1.4; }
.door-arrow { font-family: var(--font-mono); color: var(--ink-4); font-size: 18px; transition: color 200ms, transform 200ms; }
.door:hover .door-arrow { color: var(--accent); transform: translateX(4px); }
.door--agent {
  background: var(--accent-soft);
  border-color: transparent;
}
.door--agent .door-icon { background: var(--accent); color: #fff; }
.door--agent .door-title, .door--agent .door-sub { color: var(--accent-ink); }
.door--agent .door-arrow { color: var(--accent); }
.door--agent::before {
  content: "FOR AI";
  position: absolute; top: 10px; right: 14px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.16em;
  opacity: 0.7;
}

.home-mini-cta {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.mini-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  transition: color 180ms, background 180ms;
}
.mini-link:hover { color: var(--accent); background: var(--accent-soft); }

/* ---------- Agent view (HTTP fetch demo) ---------- */
.agent-view {
  position: fixed; inset: 0;
  background: rgba(20,18,15,0.78);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  z-index: 250;
  padding: 28px;
  animation: agent-fade 220ms var(--ease-out);
}
@keyframes agent-fade { from { opacity: 0; } to { opacity: 1; } }
.agent-view-card {
  width: 100%; max-width: 1180px;
  height: min(86vh, 820px);
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.6);
  animation: agent-rise 340ms var(--ease-bounce);
}
@keyframes agent-rise {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.agent-view-bar {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.agent-view-bar-l { display: flex; gap: 7px; }
.agent-view-bar-c { display: flex; align-items: center; gap: 10px; min-width: 0; }
.agent-view-mark { font-size: 18px; }
.agent-view-title {
  font-family: var(--font-serif); font-size: 15px; font-weight: 700;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agent-view-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-mono); font-size: 13px;
  cursor: pointer;
  transition: background 180ms, color 180ms, border-color 180ms;
}
.agent-view-close:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.agent-view-body {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}
.agent-view-pane {
  display: flex; flex-direction: column;
  min-height: 0; min-width: 0;
  overflow: hidden;
}
.agent-view-pane--list { border-right: 1px solid var(--line); overflow-y: auto; }
.agent-view-pane--preview { background: #faf7f2; overflow-y: auto; }
.agent-view-pane-h {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px 10px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.agent-view-pane-h-num {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0;
}

.agent-seq { list-style: none; margin: 0; padding: 0 16px; }
.agent-seq-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 200ms, background 200ms, transform 200ms;
}
.agent-seq-item:hover { border-color: var(--ink-4); }
.agent-seq-item.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(4px);
}
.agent-seq-line {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12.5px;
}
.agent-seq-method {
  background: var(--ink); color: #fff;
  padding: 2px 7px; border-radius: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
}
.agent-seq-url { color: var(--ink); font-weight: 600; }
.agent-seq-status {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-4);
}
.agent-seq-status.is-ok { color: var(--accent); }
.agent-seq-purpose {
  margin-top: 6px;
  font-family: var(--font-serif); font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.45;
}
.agent-seq-accept {
  margin-top: 6px;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-4);
}
.agent-seq-tag { color: var(--accent); font-weight: 700; }

.agent-view-curl {
  border-top: 1px dashed var(--line);
  margin-top: 14px;
  padding-bottom: 18px;
}
.agent-view-curl-block {
  margin: 6px 22px 10px;
  padding: 12px 14px;
  background: #1f1e1d;
  color: #f2efe9;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}
.agent-view-curl-block code { color: inherit; background: transparent; padding: 0; }
.agent-view-copy {
  margin: 0 22px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: var(--accent); color: #fff;
  border: 0; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: background 200ms, transform 200ms;
}
.agent-view-copy:hover { background: var(--accent-ink); transform: translateY(-1px); }

.agent-view-resp-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 4px 22px 12px;
  border-bottom: 1px solid var(--line);
}
.agent-view-resp-meta code {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-3);
  background: var(--surface);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.agent-view-resp-body {
  margin: 0; padding: 14px 22px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.agent-view-resp-line { display: flex; gap: 14px; }
.agent-view-resp-ln {
  flex: none;
  width: 24px;
  text-align: right;
  color: var(--ink-4);
  user-select: none;
}
.agent-view-resp-tx { flex: 1; min-width: 0; }
.agent-view-resp-line--more .agent-view-resp-tx a {
  color: var(--accent);
  font-weight: 600;
}

.agent-view-foot {
  padding: 10px 18px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.agent-view-foot-l { color: var(--ink-2); }
.agent-view-foot-r { color: var(--ink-4); letter-spacing: 0.1em; }

@media (max-width: 820px) {
  .agent-view { padding: 12px; }
  .agent-view-card { height: 92vh; }
  .agent-view-body { grid-template-columns: 1fr; }
  .agent-view-pane--list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 50%; }
}

@media (max-width: 700px) {
  .home-doors { grid-template-columns: 1fr; }
}

.home-stats {
  display: flex;
  align-items: baseline;
  gap: 22px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.home-stat { padding: 0; }
.home-stat-num {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-serif); font-size: 38px; font-weight: 700;
  color: var(--ink); line-height: 1; letter-spacing: -0.02em;
}
.home-stat-approx { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); font-weight: 500; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.08em; }
.home-stat-label {
  color: var(--ink-3); font-size: 13px; line-height: 1.4;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.home-scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.12em;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0.7;
}
.home-scroll-hint .arrow {
  width: 1px; height: 28px; background: var(--ink-3);
  position: relative;
  animation: scroll-line 1.6s var(--ease) infinite;
}
.home-scroll-hint .arrow::after {
  content: ""; position: absolute; bottom: 0; left: -3px;
  width: 7px; height: 7px;
  border-right: 1px solid var(--ink-3);
  border-bottom: 1px solid var(--ink-3);
  transform: rotate(45deg);
}
@keyframes scroll-line {
  0% { transform: scaleY(0.4); transform-origin: top; }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(0.4); transform-origin: bottom; }
}

/* ---------- Section header ---------- */
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.16em;
  margin-bottom: 12px;
}
.section-eyebrow::before {
  content: ""; width: 8px; height: 8px; background: var(--accent);
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.05;
}
.section-sub {
  color: var(--ink-3);
  font-size: 16px;
  max-width: 64ch;
  margin: 0 0 36px;
  line-height: 1.5;
}

/* ---------- Cases page (forum-ish) ---------- */
.cases-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 8px;
}
.case-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 100px;
  gap: 24px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 220ms var(--ease-out), border-color 220ms, box-shadow 220ms;
  align-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.case-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 260ms var(--ease-out);
}
.case-row:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 16px 40px -22px rgba(31,30,29,0.25); }
.case-row:hover::before { transform: scaleY(1); transform-origin: top; }
.case-row--pinned { background: linear-gradient(0deg, var(--accent-soft) 0%, var(--surface) 80%); }

.case-num {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.case-pin { display: inline-block; margin-right: 6px; }

.case-mid { min-width: 0; }
.case-cat {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 4px;
}
.case-title {
  font-family: var(--font-serif); font-size: 19px; font-weight: 600;
  color: var(--ink); line-height: 1.3; letter-spacing: -0.012em;
  margin-bottom: 6px;
  text-wrap: pretty;
}
.case-row:hover .case-title { color: var(--accent-ink); }
.case-oneliner { color: var(--ink-3); font-size: 13.5px; line-height: 1.45; margin-bottom: 8px; }
.case-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.case-tag {
  display: inline-block; font-size: 11px; color: var(--ink-3);
  background: var(--surface-2); padding: 3px 9px; border-radius: var(--radius-pill);
  font-family: var(--font-mono);
}
.case-meta {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
  text-align: right;
}
.case-meta-date { color: var(--ink-2); }
.case-meta-read { margin-top: 4px; }
.case-arrow {
  font-family: var(--font-mono); font-size: 22px; color: var(--ink-4);
  text-align: right;
  transition: transform 200ms var(--ease-out), color 200ms;
}
.case-row:hover .case-arrow { color: var(--accent); transform: translateX(6px); }

/* ---------- Projects page — playable demo gallery ---------- */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.demo-card {
  --accent: var(--accent);
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 320ms var(--ease-bounce), border-color 280ms, box-shadow 320ms;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.demo-card.is-hovered {
  transform: translateY(-6px);
  border-color: var(--ink);
  box-shadow:
    0 24px 50px -22px rgba(31,30,29,0.32),
    0 0 0 1px var(--accent) inset;
}

/* fake browser chrome */
.demo-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.demo-chrome .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.demo-chrome .dot--r { background: #ed6a5e; }
.demo-chrome .dot--y { background: #f4be4f; }
.demo-chrome .dot--g { background: #61c454; }
.demo-chrome-url {
  flex: 1; padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0.02em;
}
.demo-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  padding: 3px 8px;
  border-radius: 4px;
}
.demo-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.demo-status.is-live { background: rgba(95,143,86,0.15); color: var(--accent-ink); }
.demo-status.is-live .demo-status-dot { background: var(--accent); animation: pulse-dot 1.6s ease-in-out infinite; }
.demo-status.is-soon { background: var(--ink-5); color: var(--ink-3); }
.demo-status.is-soon .demo-status-dot { background: var(--ink-4); }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* iframe preview area */
.demo-frame-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-2);
  overflow: hidden;
}
.demo-frame {
  position: absolute; inset: 0;
  width: 200%; height: 200%;
  border: 0;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
  background: #fff;
  transition: transform 480ms var(--ease-out);
}
.demo-card.is-hovered .demo-frame {
  transform: scale(0.55) translate(-2%, -2%);
}
.demo-loading {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  gap: 10px;
  z-index: 1;
}
.demo-loading--lg { font-size: 14px; flex-direction: column; }
.loading-spark {
  display: inline-block;
  width: 28px; height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* hover overlay CTA */
.demo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(31,30,29,0) 0%, rgba(31,30,29,0.55) 70%, rgba(31,30,29,0.78) 100%);
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
  pointer-events: none;
}
.demo-card.is-hovered .demo-overlay { opacity: 1; }
.demo-overlay-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.4);
  transform: translateY(8px);
  transition: transform 280ms var(--ease-bounce);
}
.demo-card.is-hovered .demo-overlay-cta { transform: translateY(0); }
.demo-overlay-icon {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  background: rgba(255,255,255,0.22);
  border-radius: 50%;
  font-size: 10px;
}

/* blueprint (placeholder) */
.demo-blueprint {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, var(--bg-2) 0 12px, var(--surface) 12px 13px);
  color: var(--accent);
  display: flex; flex-direction: column;
}
.demo-blueprint-svg {
  flex: 1; width: 100%;
  color: var(--ink-3);
}
.demo-blueprint-stamp {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border-top: 1px dashed var(--line);
}
.demo-blueprint-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  font-family: var(--font-pixel); font-size: 11px;
  color: #fff;
}
.bp-label { font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.18em; color: var(--accent); }
.bp-id { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* meta block */
.demo-meta {
  padding: 18px 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.demo-meta-top {
  display: flex; align-items: baseline; gap: 12px;
}
.demo-num {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-4);
  letter-spacing: 0.06em;
}
.demo-title {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.demo-desc {
  color: var(--ink-2); font-size: 14px; line-height: 1.55;
}
.demo-foot {
  margin-top: 4px;
  display: flex; align-items: center; gap: 14px;
}
.demo-go {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--ink); color: #fff;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 200ms, gap 200ms;
}
.demo-card.is-hovered .demo-go { background: var(--accent); gap: 12px; }
.demo-go-arrow { font-size: 14px; transition: transform 200ms; }
.demo-card.is-hovered .demo-go-arrow { transform: translate(2px, -2px); }
.demo-wip {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-4);
  font-style: italic;
}

/* fullscreen modal */
.demo-modal {
  position: fixed; inset: 0;
  background: rgba(20,18,15,0.78);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  z-index: 200;
  padding: 32px;
  animation: modal-fade 220ms var(--ease-out);
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.demo-modal-card {
  width: 100%; max-width: 1280px;
  height: min(82vh, 880px);
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.6);
  animation: modal-rise 320ms var(--ease-bounce);
}
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.demo-modal-bar {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 16px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.demo-modal-bar-l { display: flex; gap: 7px; }
.demo-modal-bar-c {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.demo-modal-mark { width: 18px; height: 18px; border-radius: 5px; flex: none; }
.demo-modal-title {
  font-family: var(--font-serif); font-size: 15px; font-weight: 700;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.demo-modal-url {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink-3);
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.demo-modal-bar-r { display: flex; gap: 8px; }
.demo-modal-ext, .demo-modal-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: background 180ms, color 180ms, border-color 180ms;
}
.demo-modal-ext:hover, .demo-modal-close:hover {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.demo-modal-frame-wrap {
  position: relative; flex: 1;
  background: #fff;
}
.demo-modal-frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.demo-modal-foot {
  padding: 8px 16px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-4);
  text-align: center;
  letter-spacing: 0.08em;
}

/* ---------- Resume page ---------- */
.page-resume { background: var(--bg-2); }
.page-resume .page-inner { max-width: 880px; }
.resume-card {
  background: #fff;
  border-radius: 8px;
  padding: 56px 64px;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.05),
    0 6px 20px -8px rgba(0,0,0,0.15),
    0 24px 60px -28px rgba(0,0,0,0.25);
  border: 1px solid var(--line);
}
.resume-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 20px;
  margin-bottom: 28px;
}
.resume-name {
  font-family: var(--font-serif);
  font-size: 38px; font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.resume-name-zh { font-size: 22px; color: var(--ink-3); margin-left: 12px; font-weight: 500; }
.resume-role { font-size: 14px; color: var(--accent); font-weight: 600; margin-top: 8px; letter-spacing: 0.04em; text-transform: uppercase; }
.resume-contact { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); text-align: right; line-height: 1.7; }
.resume-contact a { color: var(--ink-2); }
.resume-contact a:hover { color: var(--accent); }

.resume-section { margin-bottom: 22px; }
.resume-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding-bottom: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.resume-summary { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }

.resume-exp { margin-bottom: 16px; }
.resume-exp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; gap: 16px; }
.resume-exp-role { font-weight: 700; font-size: 14px; color: var(--ink); }
.resume-exp-co { color: var(--ink-2); font-size: 13px; }
.resume-exp-period { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.resume-exp-list { padding-left: 18px; margin: 6px 0 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.55; }
.resume-exp-list li { margin-bottom: 4px; }

.resume-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.resume-edu { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.resume-edu strong { color: var(--ink); display: block; font-size: 13.5px; margin-bottom: 2px; }
.resume-edu .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }

.resume-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; font-size: 12.5px; }
.resume-skill-cat { color: var(--accent); font-weight: 700; font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.resume-skill-items { color: var(--ink-2); line-height: 1.55; }

.resume-actions {
  display: flex; gap: 14px; justify-content: center;
  margin-top: 32px;
  padding-top: 8px;
}
.resume-actions .btn { padding: 12px 22px; }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .topnav, .dotnav, .home-scroll-hint, .resume-actions, .chat-fab { display: none !important; }
  .snap-root { height: auto; overflow: visible; }
  .page { min-height: 0; height: auto; scroll-snap-align: none; page-break-after: always; }
  .page:not(.page-resume) { display: none; }
  .page-resume { background: #fff; }
  .page-resume .page-inner { padding: 0; max-width: 100%; }
  .resume-card { box-shadow: none; border: 0; padding: 0; }
}

/* ---------- Chat page ---------- */
.page-chat { background: linear-gradient(180deg, var(--bg) 0%, #ede8d6 100%); }
.chat-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  margin-top: 16px;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 220px);
  max-height: 720px;
}
.chat-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
}
.chat-personas { display: grid; gap: 10px; }
.persona {
  display: grid; grid-template-columns: 44px 1fr; gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: transform 200ms var(--ease-bounce), border-color 200ms, background 200ms;
  text-align: left;
}
.persona:hover { transform: translateX(2px); border-color: var(--line-strong); }
.persona--active { background: var(--accent-soft); border-color: var(--accent); }
.persona-avatar {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: #fff;
}
.persona-name { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.persona-desc { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }

.chat-suggest { display: grid; gap: 8px; }
.chat-suggest-title { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; }
.chat-suggest button {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--ink-2);
  transition: background 180ms, transform 180ms;
}
.chat-suggest button:hover { background: var(--accent-soft); color: var(--accent-ink); transform: translateX(2px); }

.chat-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2);
}
.chat-head-avatar {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: #fff;
}
.chat-head-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.chat-head-role { font-size: 11.5px; color: var(--ink-3); font-family: var(--font-mono); }
.chat-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  margin-left: auto;
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 1.6s var(--ease-out) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(95,143,86,0.6); }
  100% { box-shadow: 0 0 0 12px rgba(95,143,86,0); }
}

.chat-stream {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  animation: bubble-in 320ms var(--ease-bounce);
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.bubble--bot {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.bubble--user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble--typing { background: var(--surface-2); }
.bubble--typing .dots span {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--ink-3);
  border-radius: 50%;
  margin: 0 2px;
  animation: typing 1.2s var(--ease) infinite;
}
.bubble--typing .dots span:nth-child(2) { animation-delay: 0.16s; }
.bubble--typing .dots span:nth-child(3) { animation-delay: 0.32s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-input-row {
  display: flex; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.chat-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-family: inherit; font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 180ms, background 180ms;
}
.chat-input:focus { border-color: var(--accent); background: #fff; }
.chat-send {
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 0 0 var(--accent-2);
  transition: transform 150ms var(--ease-bounce), box-shadow 150ms;
}
.chat-send:hover { transform: translateY(-1px); box-shadow: 0 5px 0 0 var(--accent-2); }
.chat-send:active { transform: translateY(2px); box-shadow: 0 2px 0 0 var(--accent-2); }
.chat-send:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: 0 2px 0 0 var(--accent-2); }

/* ---------- Floating chat FAB ---------- */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 55;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12.5px; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.35);
  animation: fab-in 600ms var(--ease-bounce) 800ms both;
}
@keyframes fab-in {
  from { opacity: 0; transform: translateY(20px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab .pixel-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  animation: pulse-dot 1.6s var(--ease) infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

/* ---------- Footer (small) ---------- */
.page-footer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  margin-top: auto;
  padding-top: 32px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .page-inner { padding: 80px 20px 60px; }
  .topnav { padding: 12px 16px; }
  .topnav-link { padding: 6px 10px; font-size: 12.5px; }
  .dotnav { display: none; }
  .home-stats { flex-wrap: wrap; gap: 12px; }
  .case-row { grid-template-columns: 60px 1fr; }
  .case-meta, .case-arrow { display: none; }
  .demo-grid { grid-template-columns: 1fr; gap: 18px; }
  .demo-modal { padding: 12px; }
  .demo-modal-card { height: 88vh; }
  .demo-modal-url { display: none; }
  .resume-card { padding: 32px 24px; }
  .resume-head { flex-direction: column; align-items: flex-start; }
  .resume-2col, .resume-skills { grid-template-columns: 1fr; }
  .chat-shell { grid-template-columns: 1fr; height: auto; }
  .chat-side { order: 2; }
  .home-tagline { font-size: clamp(40px, 11vw, 64px); }
  .chat-fab { bottom: 16px; right: 16px; padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
