:root {
  --bg: #0c0c0d;
  --bg-soft: #121213;
  --panel: #161618;
  --line: rgba(255,255,255,.09);
  --ink: #f4f2ec;
  --body: #b8b4aa;
  --muted: #7a7670;
  --accent: #e8c547;
  --accent-soft: rgba(232,197,71,.1);
  --accent-dim: rgba(232,197,71,.55);
  --blue: #9fd0ff;
  --serif: 'Noto Serif SC', 'Songti SC', ui-serif, Georgia, serif;
  --sans: 'Noto Sans SC', -apple-system, 'PingFang SC', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --max: 680px;
  --max-wide: 920px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 17px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-soft); color: var(--ink); }

a { color: inherit; }

/* ── Nav ── */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 48px);
  background: rgba(12,12,13,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
nav.scrolled { border-bottom-color: var(--line); }

.nav-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .02em;
}

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.nav-present {
  font-size: .75rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--sans);
}
.nav-present:hover { color: var(--accent); border-color: var(--accent-dim); }

@media (max-width: 640px) {
  .nav-links a:not(.nav-present) { display: none; }
}

/* ── Layout ── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.wrap-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

section { padding: clamp(72px, 12vh, 120px) 0; }
section + section { border-top: 1px solid var(--line); }

.eyebrow {
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 500;
}

h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 16px; }
h3 { font-size: 1.1rem; margin-bottom: 8px; }

.lead { font-size: 1.05rem; color: var(--body); max-width: 36em; }
.lead strong { color: var(--ink); font-weight: 500; }

.muted { color: var(--muted); font-size: .9rem; }

/* ── Hero ── */
.hero { padding-top: clamp(48px, 10vh, 96px); padding-bottom: clamp(64px, 10vh, 100px); border-top: none; }

.hero-intro { margin-top: 24px; max-width: 32em; }

.minute-card {
  margin-top: 40px;
  padding: 24px 28px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.minute-card .label {
  font-size: .75rem;
  color: var(--accent);
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.minute-card ul { list-style: none; }
.minute-card li {
  font-size: .95rem;
  padding: 6px 0;
  padding-left: 1em;
  position: relative;
  color: var(--body);
}
.minute-card li::before {
  content: '·';
  position: absolute; left: 0;
  color: var(--accent);
  font-weight: 700;
}
.minute-card li strong { color: var(--ink); font-weight: 500; }

.hero-cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: .85rem;
  text-decoration: none;
  transition: all .2s var(--ease);
  cursor: pointer;
  border: none;
  font-family: var(--sans);
}
.btn-primary { background: var(--accent); color: #1a1a1a; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--body); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--muted); color: var(--ink); }

/* ── Takeaways (3 pillars) ── */
.takeaways { display: grid; gap: 20px; margin-top: 40px; }
@media (min-width: 700px) { .takeaways { grid-template-columns: repeat(3, 1fr); } }

.takeaway {
  padding: 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.takeaway .num {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
  opacity: .7;
}
.takeaway p { font-size: .9rem; line-height: 1.65; }

/* ── Details / progressive disclosure ── */
details {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
}
details + details { margin-top: 12px; }

summary {
  padding: 16px 20px;
  cursor: pointer;
  font-size: .92rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.1rem;
  color: var(--muted);
  transition: transform .25s;
}
details[open] summary::after { transform: rotate(45deg); }
summary:hover { background: rgba(255,255,255,.02); }

.details-body { padding: 0 20px 20px; font-size: .9rem; }
.details-body p { margin-bottom: 12px; }

/* ── Timeline (compact) ── */
.timeline-compact { margin-top: 8px; }
.tl-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.tl-row:last-child { border-bottom: none; }
.tl-row .yr { color: var(--muted); font-size: .8rem; }
.tl-row .co { color: var(--ink); font-weight: 500; margin-bottom: 2px; }

/* ── Meituan funnel ── */
.story-lead {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 32px;
  max-width: 28em;
}

.funnel-hint { font-size: .82rem; color: var(--muted); margin-bottom: 16px; }

.funnel-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
@media (max-width: 600px) { .funnel-steps { grid-template-columns: repeat(2, 1fr); } }

.funnel-step {
  padding: 16px 12px;
  text-align: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .25s var(--ease);
}
.funnel-step:hover, .funnel-step.active {
  border-color: var(--accent-dim);
  background: var(--accent-soft);
}
.funnel-step .step-name { font-size: .85rem; color: var(--ink); font-weight: 500; }
.funnel-step .step-sub { font-size: .72rem; color: var(--muted); margin-top: 4px; }

.funnel-panel {
  padding: 24px;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  min-height: 120px;
}
.funnel-panel h4 { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 10px; }
.funnel-panel p { font-size: .9rem; margin-bottom: 12px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: .75rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* Evolution summary rows */
.evo-rows { margin-top: 8px; }
.evo-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
@media (max-width: 500px) { .evo-row { grid-template-columns: 1fr; gap: 4px; } }
.evo-row .tag { font-size: .72rem; color: var(--blue); letter-spacing: .04em; }
.evo-row .result { font-family: var(--serif); color: var(--accent); font-weight: 600; }

/* ── Work / Lab ── */
.work-intro { margin-bottom: 28px; }

.lab-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}
.lab-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.lab-card-header h3 { margin: 0; font-size: 1rem; }
.lab-card-header p { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.lab-card-body { padding: 20px; }

.lab-more { margin-top: 16px; }
.lab-tabs-minimal {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 16px;
}
.lab-tab-min {
  font-size: .78rem;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  font-family: var(--sans);
}
.lab-tab-min.active, .lab-tab-min:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: var(--accent-soft);
}
.lab-panel { display: none; }
.lab-panel.active { display: block; }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow-y: auto; }
.chat-msg { max-width: 88%; padding: 12px 14px; border-radius: 10px; font-size: .88rem; line-height: 1.55; }
.chat-msg.agent { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); }
.chat-msg.user { align-self: flex-end; background: var(--accent-soft); color: var(--ink); }
.chat-msg .who { font-size: .7rem; color: var(--muted); margin-bottom: 4px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chat-btn {
  font-size: .78rem; padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--line); background: transparent; color: var(--body);
  cursor: pointer; transition: all .2s; font-family: var(--sans);
}
.chat-btn:hover { border-color: var(--muted); color: var(--ink); }
.chat-btn.good:hover { border-color: var(--accent-dim); color: var(--accent); }
.chat-status { margin-top: 14px; padding: 12px; border-radius: 6px; font-size: .82rem; display: none; }

/* Bench */
.bench-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bench-label { width: 88px; font-size: .75rem; color: var(--muted); flex-shrink: 0; }
.bench-bar-wrap { flex: 1; height: 28px; background: var(--panel); border-radius: 4px; overflow: hidden; position: relative; }
.bench-bar { height: 100%; width: 0; border-radius: 4px; transition: width 1s var(--ease); }
.bench-bar.low { background: #6b6560; }
.bench-bar.high { background: var(--accent); }
.bench-val { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: .75rem; color: var(--ink); }

/* IM */
.im-mock { display: grid; grid-template-columns: 180px 1fr; min-height: 240px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
@media (max-width: 500px) { .im-mock { grid-template-columns: 1fr; } }
.im-side { background: var(--panel); padding: 10px; border-right: 1px solid var(--line); font-size: .8rem; }
.im-side .chat-name { padding: 8px; border-radius: 6px; color: var(--ink); }
.im-side .chat-name.active { background: var(--accent-soft); }
.im-main { display: flex; flex-direction: column; }
.im-msgs { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 180px; }
.im-bubble { max-width: 80%; padding: 9px 12px; border-radius: 10px; font-size: .85rem; }
.im-bubble.bot { align-self: flex-start; background: var(--panel); }
.im-bubble.human { align-self: flex-end; background: var(--accent-soft); color: var(--ink); }
.im-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.im-input-row input {
  flex: 1; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); font-size: .85rem; outline: none; font-family: var(--sans);
}
.im-input-row button {
  padding: 8px 14px; background: var(--accent); border: none;
  border-radius: 6px; font-size: .78rem; font-weight: 600; cursor: pointer;
}

/* Steer */
.steer-phases { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.steer-ph { font-size: .7rem; padding: 8px; border-radius: 4px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.steer-ph.active { border-color: var(--accent-dim); color: var(--accent); }
.steer-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.steer-btns button { font-size: .75rem; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--body); cursor: pointer; }
.steer-log { font-size: .72rem; color: var(--muted); background: var(--panel); padding: 12px; border-radius: 6px; max-height: 120px; overflow-y: auto; font-family: var(--mono); line-height: 1.7; }
.steer-log .evt { color: var(--accent); }

/* Eval */
.eval-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .eval-grid { grid-template-columns: 1fr; } }
.eval-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: .85rem; cursor: pointer; transition: all .2s; }
.eval-item:hover, .eval-item.selected { border-color: var(--accent-dim); background: var(--accent-soft); }
.eval-run-btn { width: 100%; margin-top: 12px; padding: 10px; background: var(--accent); border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: .85rem; }
.eval-results { margin-top: 12px; font-size: .82rem; }
.eval-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.eval-bar-row .lbl { width: 80px; font-size: .75rem; color: var(--muted); }
.eval-bar { flex: 1; height: 16px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.eval-bar .fill { height: 100%; background: var(--accent); transition: width .8s var(--ease); }

/* ── Quote ── */
.pullquote {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: var(--ink);
  line-height: 1.55;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
  margin: 32px 0;
  max-width: 28em;
}

/* ── Contact ── */
.contact-section { text-align: left; }
.contact-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; }
.contact-links a {
  font-size: .9rem;
  color: var(--body);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: all .2s;
}
.contact-links a:hover { color: var(--accent); border-color: var(--accent-dim); }

.footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
}

/* ── Presentation ── */
body.present-mode { overflow: hidden; }
#present-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: none; align-items: center; justify-content: center;
  padding: clamp(32px, 8vw, 80px);
}
#present-overlay.active { display: flex; }
.present-slide { display: none; max-width: 720px; width: 100%; }
.present-slide.active { display: block; animation: fadeIn .4s var(--ease); }
.present-slide .p-tag { font-size: .75rem; color: var(--accent); letter-spacing: .1em; margin-bottom: 16px; }
.present-slide h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 20px; }
.present-slide p { font-size: 1.05rem; }
.present-metrics { display: flex; gap: 32px; margin-top: 32px; flex-wrap: wrap; }
.present-metrics .n { font-family: var(--serif); font-size: 2.5rem; color: var(--accent); line-height: 1; }
.present-metrics .l { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.present-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: none; align-items: center; gap: 16px;
  font-size: .8rem; color: var(--muted);
}
.present-bar.visible { display: flex; }
.present-bar button {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); color: var(--ink); cursor: pointer; font-size: .8rem;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* Builder list */
.build-list { list-style: none; }
.build-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.build-list li:last-child { border-bottom: none; }
.build-list strong { color: var(--ink); font-weight: 500; }
