:root {
  --bg-primary: #0a0b0f;
  --bg-secondary: #12131a;
  --bg-card: #181923;
  --bg-accent: #1e2030;
  --text-primary: #e8e9ed;
  --text-secondary: #8b8d98;
  --text-muted: #5c5e6a;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-bright: #818cf8;
  --green: #22c55e;
  --green-muted: rgba(34, 197, 94, 0.12);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --radius: 12px;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Space Grotesk', sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 80px 64px;
  gap: 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent-bright);
  background: var(--accent-glow);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 32px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
}

/* Tensor network visualization */
.hero-viz {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tensor-grid {
  position: relative;
  width: 300px;
  height: 300px;
}

.node {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(99, 102, 241, 0.08);
  z-index: 2;
}

.n1 { top: 10%; left: 10%; }
.n2 { top: 10%; left: 45%; }
.n3 { top: 10%; right: 10%; }
.n4 { top: 45%; left: 10%; }
.n5 { top: 45%; left: 45%; }
.n6 { top: 45%; right: 10%; }
.n7 { bottom: 10%; left: 10%; }
.n8 { bottom: 10%; left: 45%; }
.n9 { bottom: 10%; right: 10%; }

.edge {
  position: absolute;
  background: linear-gradient(90deg, var(--accent), rgba(99, 102, 241, 0.3));
  z-index: 1;
  border-radius: 2px;
}

/* horizontal edges */
.e-h1 { top: calc(10% + 7px); left: calc(10% + 16px); width: calc(35% - 16px); height: 2px; }
.e-h2 { top: calc(10% + 7px); left: calc(45% + 16px); width: calc(35% - 16px); height: 2px; }
.e-h3 { top: calc(45% + 7px); left: calc(10% + 16px); width: calc(35% - 16px); height: 2px; }
.e-h4 { top: calc(45% + 7px); left: calc(45% + 16px); width: calc(35% - 16px); height: 2px; }
.e-h5 { bottom: calc(10% + 7px); left: calc(10% + 16px); width: calc(35% - 16px); height: 2px; }
.e-h6 { bottom: calc(10% + 7px); left: calc(45% + 16px); width: calc(35% - 16px); height: 2px; }

/* vertical edges */
.e-v1 { top: calc(10% + 16px); left: calc(10% + 7px); width: 2px; height: calc(35% - 16px); }
.e-v2 { top: calc(10% + 16px); left: calc(45% + 7px); width: 2px; height: calc(35% - 16px); }
.e-v3 { top: calc(10% + 16px); right: calc(10% + 7px); width: 2px; height: calc(35% - 16px); }
.e-v4 { top: calc(45% + 16px); left: calc(10% + 7px); width: 2px; height: calc(35% - 16px); }
.e-v5 { top: calc(45% + 16px); left: calc(45% + 7px); width: 2px; height: calc(35% - 16px); }
.e-v6 { top: calc(45% + 16px); right: calc(10% + 7px); width: 2px; height: calc(35% - 16px); }

/* Pulse animation for nodes */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.n1 { animation: pulse 3s ease-in-out infinite; }
.n2 { animation: pulse 3s ease-in-out 0.3s infinite; }
.n3 { animation: pulse 3s ease-in-out 0.6s infinite; }
.n4 { animation: pulse 3s ease-in-out 0.9s infinite; }
.n5 { animation: pulse 3s ease-in-out 1.2s infinite; background: var(--accent-bright); width: 22px; height: 22px; margin: -3px; }
.n6 { animation: pulse 3s ease-in-out 1.5s infinite; }
.n7 { animation: pulse 3s ease-in-out 1.8s infinite; }
.n8 { animation: pulse 3s ease-in-out 2.1s infinite; }
.n9 { animation: pulse 3s ease-in-out 2.4s infinite; }

/* ========== PROBLEM ========== */
.problem {
  padding: 120px 64px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.problem-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.problem-label, .cap-label, .arch-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 40px;
}

.problem-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.metric-block {
  margin-bottom: 24px;
  padding: 20px 24px;
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.metric-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.metric-num sup {
  font-size: 0.6em;
  vertical-align: super;
}

.metric-desc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.problem-col p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ========== CAPABILITIES ========== */
.capabilities {
  padding: 120px 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.cap-header {
  margin-bottom: 64px;
}

.cap-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.cap-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.cap-icon {
  font-size: 1.6rem;
  color: var(--accent-bright);
  margin-bottom: 16px;
}

.cap-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.cap-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.cap-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-muted);
  padding: 4px 10px;
  border-radius: 100px;
}

/* ========== ARCHITECTURE ========== */
.architecture {
  padding: 120px 64px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.arch-inner {
  max-width: 900px;
  margin: 0 auto;
}

.architecture h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}

.arch-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.arch-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.arch-marker {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
}

.arch-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.arch-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ========== CLOSING ========== */
.closing {
  padding: 140px 64px;
  text-align: center;
}

.closing-inner {
  max-width: 800px;
  margin: 0 auto;
}

.closing h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.closing-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 64px;
}

.closing-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.closing-stat {
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--accent-bright);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========== FOOTER ========== */
.site-footer {
  padding: 48px 64px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.footer-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 60px 24px;
    min-height: auto;
    gap: 48px;
  }

  .hero-viz {
    order: -1;
  }

  .tensor-grid {
    width: 220px;
    height: 220px;
  }

  .problem {
    padding: 80px 24px;
  }

  .problem-columns {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .capabilities {
    padding: 80px 24px;
  }

  .cap-grid {
    grid-template-columns: 1fr;
  }

  .architecture {
    padding: 80px 24px;
  }

  .closing {
    padding: 80px 24px;
  }

  .closing-metrics {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 32px 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .metric-num {
    font-size: 1.4rem;
  }

  .closing h2 {
    font-size: 1.6rem;
  }
}