:root {
  --bg: #0b0e14;
  --surface: #131820;
  --border: #1e2530;
  --fg: #e8ecf0;
  --fg-muted: #6b7a8d;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.12);
  --accent-glow: rgba(0, 212, 170, 0.06);
  --code-bg: #0f1420;
  --code-key: #79b8ff;
  --code-str: #9ecbff;
  --code-kw: #f78c6c;
  --code-num: #c9c9c9;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAV */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--fg);
  letter-spacing: 0.05em;
}
.nav-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.03em;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0 48px;
  align-items: center;
  padding: 120px 40px 80px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 80% 50%, rgba(0,212,170,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 20% 60%, rgba(0,100,200,0.03) 0%, transparent 70%);
  pointer-events: none;
}
.hero-atom {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.atom-svg {
  width: 220px;
  height: 220px;
  animation: spin 24s linear infinite;
  filter: drop-shadow(0 0 20px rgba(0,212,170,0.15));
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hero-content {
  grid-column: 1;
  grid-row: 1;
}
.hero-headline {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 440px;
  line-height: 1.7;
}
.hero-meta {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 12px;
  padding-top: 40px;
}
.hero-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid rgba(0,212,170,0.3);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 2px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* SECTION LABEL */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

/* INVERSIONS */
.inversions {
  padding: 100px 40px;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.inversions-header {
  margin-bottom: 64px;
}
.inversions-title {
  font-family: var(--font-mono);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  color: var(--fg);
  max-width: 480px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.inversions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.inv-card {
  background: var(--surface);
  padding: 40px 36px;
}
.inv-symbol {
  display: block;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  line-height: 1;
}
.inv-heading {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.inv-body {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
}
.inv-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--code-key);
  background: var(--code-bg);
  padding: 1px 5px;
  border-radius: 2px;
}

/* ATOM FORMAT */
.atom-section {
  padding: 0 40px 100px;
  max-width: 1100px;
  margin: 0 auto;
}
.atom-section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 56px;
}
.atom-section-title {
  font-family: var(--font-mono);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.atom-section-desc {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-top: 16px;
}
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-muted);
  white-space: pre;
}
.code-kw { color: var(--code-kw); }
.code-key { color: var(--code-key); }
.code-str { color: var(--code-str); }
.code-num { color: var(--code-num); }

/* STATS */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 64px 40px;
}
.stats-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 12px;
  color: var(--fg-muted);
  text-align: center;
  letter-spacing: 0.03em;
}

/* CLOSING */
.closing {
  background: var(--bg);
  padding: 100px 40px;
}
.closing-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.closing-quote {
  font-family: var(--font-mono);
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 500;
  color: var(--fg);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.closing-sub {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
}
.footer-name {
  color: var(--fg);
  font-weight: 700;
}
.footer-sep { color: var(--border); }
.footer-link {
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-link:hover { color: var(--fg); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    padding: 100px 24px 60px;
  }
  .hero-atom { grid-column: 1; grid-row: 1; padding-bottom: 20px; }
  .hero-content { grid-row: 2; }
  .hero-meta { grid-row: 3; }
  .inversions { padding: 64px 24px; }
  .inversions-grid { grid-template-columns: 1fr; }
  .atom-section { padding: 0 24px 64px; }
  .atom-section-inner { grid-template-columns: 1fr; gap: 40px; padding: 36px; }
  .stats { padding: 48px 24px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
  .stat-item:last-child { border-bottom: none; }
  .closing { padding: 64px 24px; }
  .footer { padding: 24px; }
  .footer-inner { flex-wrap: wrap; gap: 12px; }
  .nav { padding: 0 24px; }
}