:root {
  --bg: #0a0a0c;
  --surface: #14141a;
  --surface-2: #1c1c24;
  --border: #2a2a35;
  --text: #e8e8ec;
  --muted: #8a8a96;
  --dim: #5a5a66;
  --primary: #5b8cff;
  --primary-dim: #3a5cbf;
  --mnemo: #f5a623;
  --success: #4ade80;
  --rec: #ef4444;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Monaco, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(91, 140, 255, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(245, 166, 35, 0.06), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: #cfd8ff;
}

em { font-style: italic; color: #d8d8e0; }

/* ─── Nav ─── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: var(--bg);
  border-radius: 7px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
}
.brand-mark.sm { width: 22px; height: 22px; font-size: 0.78rem; border-radius: 5px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }

/* ─── Main ─── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 5rem 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #b8b8c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  max-width: 36ch;
}

h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.4rem; }

p { margin: 0 0 1rem; color: #c8c8d2; }

/* ─── Hero ─── */
.hero { padding-top: 4rem; padding-bottom: 6rem; text-align: left; }
.hero h1 { margin-bottom: 1.5rem; }

.lede {
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: 52ch;
  color: #d0d0dc;
  margin-bottom: 2rem;
}

.mnemo {
  color: var(--mnemo);
  font-weight: 500;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: var(--bg);
}
.btn-primary:hover {
  background: #7ba1ff;
  color: var(--bg);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(91, 140, 255, 0.05);
}

.meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--dim);
  margin: 0;
}

/* ─── Thesis ─── */
.thesis p {
  font-size: 1.1rem;
  max-width: 65ch;
  line-height: 1.6;
}

/* ─── Agents ─── */
.agents {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.agent {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.agent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.agent-scriber::before { background: var(--primary); }
.agent-mnemo::before { background: var(--mnemo); }

.agent-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.agent-scriber h3 { color: var(--primary); }
.agent-mnemo h3 { color: var(--mnemo); }

.agent p {
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
}

.agent dl {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.agent dl > div { display: flex; gap: 1rem; }
.agent dt { color: var(--dim); width: 6rem; }
.agent dd { margin: 0; color: var(--text); }

/* ─── Steps ─── */
.steps {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  position: relative;
}

.step-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  display: block;
  margin-bottom: 0.75rem;
}

.steps p { font-size: 0.95rem; color: #b8b8c4; margin: 0; }

/* ─── Demo ─── */
.demo h2 { margin-bottom: 2rem; }

.video-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-placeholder {
  text-align: center;
  color: var(--muted);
}

.rec {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--rec);
  color: var(--bg);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  animation: rec-pulse 1.5s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.video-placeholder p { margin: 0; font-size: 0.95rem; }

/* ─── Architecture ─── */
.architecture h2 { margin-bottom: 2rem; }

.ascii {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #b8b8c8;
}
.ascii code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.arch-note {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 65ch;
}
.arch-note a { color: var(--primary); }

/* ─── Stack ─── */
.stack h2 { margin-bottom: 2rem; }

.stack-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.stack-grid li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
}

.stack-grid span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stack-grid code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 0.85rem;
  text-align: right;
}

/* ─── Final CTA ─── */
.cta-final {
  text-align: center;
  padding: 6rem 0;
}
.cta-final h2 {
  max-width: none;
  margin: 0 auto 1rem;
}
.cta-final p {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a { color: var(--muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }

.colophon {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
  margin: 0;
}

/* ─── Responsive ─── */
@media (max-width: 720px) {
  .nav { padding: 1.25rem 1.5rem; flex-direction: column; gap: 1rem; align-items: flex-start; }
  .nav-right { width: 100%; justify-content: space-between; }
  main { padding: 0 1.5rem; }
  section { padding: 3.5rem 0; }
  .agents, .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 2rem; padding-bottom: 4rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
