/* Design tokens — change these to re-theme the whole site. */
:root {
  --bg: #07090f;
  --bg-2: #0d1220;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e8ecf4;
  --muted: #8b94a8;
  --accent: #3ee6b5;   /* bio green */
  --accent-2: #7c8cff; /* AI violet */
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 600; }
code { font-family: var(--mono); font-size: 0.9em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* Soft bio background — DNA helices + molecules, fixed behind everything */
.bio-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
body > *:not(.bio-bg) { position: relative; z-index: 1; }

.bio {
  position: absolute;
  filter: blur(0.5px);
  will-change: transform;
}
.bio-helix { opacity: 0.09; }
.bio-mol { opacity: 0.11; }

.h1 { width: 120px; top: 6%;  left: 4%;  animation: drift1 26s ease-in-out infinite; }
.h2 { width: 150px; top: 44%; right: 5%; animation: drift2 32s ease-in-out infinite; }
.m1 { width: 150px; top: 18%; right: 14%; animation: drift2 30s ease-in-out infinite; }
.m2 { width: 170px; top: 68%; left: 8%;   animation: drift1 34s ease-in-out infinite; }
.m3 { width: 110px; top: 86%; right: 22%; animation: drift2 24s ease-in-out infinite; }

@keyframes drift1 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-26px) rotate(7deg); }
}
@keyframes drift2 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(24px) rotate(-6deg); }
}

@media (max-width: 640px) {
  .m1, .m3 { display: none; }
  .bio-helix { opacity: 0.07; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); background: var(--accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); }
.btn-small { padding: 0.45rem 0.95rem; font-size: 0.85rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(7, 9, 15, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 1.1rem; }
.logo { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; font-size: 0.92rem; }
.nav-links a:not(.btn) { color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; }
#network { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 20% 30%, rgba(62, 230, 181, 0.12), transparent 55%),
              radial-gradient(ellipse at 85% 70%, rgba(124, 140, 255, 0.14), transparent 55%);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 36rem; }

.terminal {
  background: rgba(13, 18, 32, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.term-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2a3145; }
.term-bar em { margin-left: 8px; font-style: normal; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
#agent-log {
  margin: 0; padding: 16px 18px; height: 300px; overflow: hidden;
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.75;
  color: #b6bfd3; white-space: pre-wrap;
}
#agent-log .agent { color: var(--accent-2); }
#agent-log .ok { color: var(--accent); }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.stats div { background: var(--bg-2); padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.stats strong { font-size: 1.6rem; }
.stats span { color: var(--muted); font-size: 0.88rem; }

/* Sections */
.section { padding: 110px 20px 0; }
.section-lede { color: var(--muted); max-width: 44rem; font-size: 1.05rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}

.steps {
  list-style: none; padding: 0; margin: 48px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.steps li {
  position: relative; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.steps li:hover { border-color: var(--accent); }
.steps p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.step-num { font-family: var(--mono); color: var(--accent); font-size: 0.8rem; display: block; margin-bottom: 18px; }

/* Pipeline */
.pipeline { margin-top: 40px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pipe-head, .pipe-row {
  display: grid; grid-template-columns: 1.3fr 1fr 2.6fr; gap: 16px; align-items: center; padding: 16px 22px;
}
.pipe-head {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); background: var(--bg-2);
}
.stages-head { display: grid; grid-template-columns: repeat(4, 1fr); }
.pipe-row { border-top: 1px solid var(--border); }
.pipe-row strong { display: block; }
.pipe-row small { color: var(--muted); }
.track { position: relative; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); }
.track-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0; transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}
.fineprint { color: var(--muted); font-size: 0.8rem; margin-top: 12px; }

/* Model */
.model-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.metrics { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 32px; }
.metrics strong { display: block; font-size: 1.5rem; }
.metrics span { color: var(--muted); font-size: 0.85rem; }
.demo { display: flex; flex-direction: column; gap: 10px; }
.demo label { font-size: 0.8rem; color: var(--muted); }
.demo input {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.7rem 0.9rem; font-family: var(--mono); font-size: 0.85rem;
}
.demo input:focus { outline: none; border-color: var(--accent); }
.demo-out {
  margin: 6px 0 0; min-height: 90px; padding: 12px; border-radius: 10px;
  background: var(--bg); font-family: var(--mono); font-size: 0.8rem; color: var(--muted); white-space: pre-wrap;
}

/* Writing */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.post { display: flex; flex-direction: column; gap: 10px; transition: border-color 0.2s, transform 0.2s; }
.post:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.post time { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.post p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.subscribe { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.subscribe p { color: var(--muted); margin: 0; }

/* Contact & footer */
.contact { text-align: center; padding-bottom: 110px; }
.contact .section-lede { margin: 0 auto 28px; }
.footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 0.85rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .model-grid { grid-template-columns: 1fr; }
  .steps, .stats { grid-template-columns: repeat(2, 1fr); }
  .posts { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 640px) {
  .hero { padding-top: 56px; }
  .steps, .stats { grid-template-columns: 1fr; }
  .pipe-head { display: none; }
  .pipe-row { grid-template-columns: 1fr; gap: 8px; }
  .metrics { flex-wrap: wrap; gap: 20px; }
  .section { padding-top: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
