:root {
  --bg: #0a0e0a;
  --bg-elevated: #0f140f;
  --fg: #d4dcd0;
  --fg-dim: #7a8478;
  --fg-muted: #4a544a;
  --accent: #7fff5c;
  --accent-dim: #4a8838;
  --rule: #1a221a;
  --warn: #ffb84d;
  --grid: rgba(127, 255, 92, 0.04);
  --noise: rgba(127, 255, 92, 0.18);
  --signal: #7fff5c;
}
[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-elevated: #ebe7dd;
  --fg: #1a1f1a;
  --fg-dim: #5a6258;
  --fg-muted: #8a8f84;
  --accent: #2d6a1f;
  --accent-dim: #4a8838;
  --rule: #d8d3c4;
  --warn: #b8741a;
  --grid: rgba(45, 106, 31, 0.05);
  --noise: rgba(45, 106, 31, 0.22);
  --signal: #2d6a1f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}

/* HEADER */
header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: "▮";
  color: var(--accent);
  animation: blink 1.2s steps(2) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

nav a {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
  position: relative;
}

nav a:hover, nav a.active { color: var(--accent); }
nav a.active::before { content: "› "; color: var(--accent); }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--fg-dim);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* HERO */
.hero {
  padding: 64px 0 80px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.signal-canvas-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  margin-bottom: 56px;
  border: 1px solid var(--rule);
  background: var(--bg-elevated);
  overflow: hidden;
}

#signalCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px;
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}

.canvas-overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}

.canvas-overlay .left::before,
.canvas-overlay-bottom .left::before { content: "// "; color: var(--accent-dim); }

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.live-tag .live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-meta {
  color: var(--fg-muted);
  font-size: 12px;
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-meta span::before { content: "// "; color: var(--accent-dim); }

.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  color: var(--fg);
  text-align: center;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.hero-sub {
  font-size: 15px;
  color: var(--fg-dim);
  margin: 0 0 48px;
  max-width: 860px;
  line-height: 1.7;
}

.hero-prompt {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  font-size: 13px;
  color: var(--fg-dim);
}
.hero-prompt .arrow { color: var(--accent); }
.hero-prompt strong { color: var(--fg); font-weight: 500; }

/* SECTIONS */
section {
  padding: 80px 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 24px;
}

.section-header {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  margin-bottom: 48px;
  align-items: baseline;
}

.section-num { color: var(--fg-muted); font-size: 12px; }

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.section-body {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
}

.section-body > .label {
  color: var(--fg-muted);
  font-size: 12px;
  padding-top: 4px;
}

.section-body > .content {
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.75;
}

.section-body > .content p + p { margin-top: 18px; }
.section-body > .content strong { color: var(--fg); font-weight: 500; }

.capabilities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 24px;
}

.cap {
  background: var(--bg);
  padding: 24px;
  transition: background 0.15s;
}
.cap:hover { background: var(--bg-elevated); }

.cap-tag {
  color: var(--accent);
  font-size: 11px;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.cap-title { color: var(--fg); font-size: 14px; margin-bottom: 8px; font-weight: 500; }
.cap-desc { color: var(--fg-muted); font-size: 13px; line-height: 1.6; }

.contact-block {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.contact-block:last-child { border-bottom: none; }
.contact-block .key { color: var(--fg-muted); font-size: 12px; }
.contact-block .val a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: all 0.15s;
}
.contact-block .val a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.contact-block .val .meta { color: var(--fg-muted); font-size: 12px; margin-top: 4px; }

/* STATUS BOARD */
.status-board {
  border: 1px solid var(--rule);
  background: var(--bg-elevated);
  margin-top: 8px;
}

.status-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 24px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.status-row:last-child { border-bottom: none; }

.status-row .key {
  color: var(--fg-muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.live { background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: pulse 2s ease-in-out infinite; }
.status-dot.research { background: var(--warn); box-shadow: 0 0 6px var(--warn); }
.status-dot.queued { background: var(--fg-muted); }

.status-row .val {
  color: var(--fg);
  font-size: 13px;
}

.status-row .tag {
  color: var(--fg-muted);
  font-size: 11px;
}

.telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 24px;
}

.telem {
  background: var(--bg);
  padding: 16px 18px;
}

.telem-label {
  color: var(--fg-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.telem-value {
  color: var(--fg);
  font-size: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

.telem-value.live { color: var(--accent); }

/* FOOTER */
footer {
  padding: 40px 0 60px;
  color: var(--fg-muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

footer .status { display: flex; align-items: center; gap: 8px; }
footer .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

/* MOBILE */
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  nav { gap: 16px; }
  nav a { font-size: 12px; }
  .section-header, .section-body, .contact-block {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .capabilities { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 56px; }
  section { padding: 56px 0; }
  .signal-canvas-wrap { height: 200px; }
  .status-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .telemetry { grid-template-columns: 1fr; }
}
