/* MeshMoE — Dark Hacker Aesthetic */
/* Design: black bg, phosphor green accent, mono fonts, terminal feel */

:root {
  --bg: #0a0e0a;
  --bg-soft: #111711;
  --bg-card: #0d130d;
  --fg: #d4e8d4;
  --fg-dim: #6b8a6b;
  --accent: #00ff9c;          /* phosphor green */
  --accent-dim: #00b870;
  --warn: #ffb000;            /* amber for warnings/highlights */
  --border: #1f2a1f;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --sans: 'Inter', -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle scanline / grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,156,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,156,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ===== Nav ===== */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
nav .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.logo::before { content: '> '; color: var(--fg-dim); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 14px;
  font-family: var(--mono);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); }
.lang-switch {
  font-family: var(--mono); font-size: 13px;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s;
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Hero ===== */
.hero {
  padding: 120px 0 100px;
  text-align: center;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(0,255,156,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0.9;
}
.hero-eyebrow::before { content: '// '; }
.hero h1 {
  font-family: var(--mono);
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 28px;
  color: var(--fg);
}
.hero h1 .accent { color: var(--accent); }
.hero-subtitle {
  font-size: clamp(17px, 2.2vw, 22px);
  color: var(--fg-dim);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.5;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  font-family: var(--mono);
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 0 24px rgba(0,255,156,0.3);
}
.btn-primary:hover { background: #00e88c; box-shadow: 0 0 32px rgba(0,255,156,0.5); }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Section base ===== */
section { padding: 100px 0; border-top: 1px solid var(--border); }
.section-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-eyebrow::before { content: '// '; }
.section-title {
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 24px;
  line-height: 1.2;
}
.section-lead {
  font-size: 18px;
  color: var(--fg-dim);
  max-width: 720px;
  margin-bottom: 48px;
  line-height: 1.6;
}

/* ===== Name explanation (the thesis) ===== */
.name-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 48px 0;
}
.name-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.name-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--accent);
}
.name-card .part {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}
.name-card .part-meaning {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg-dim);
  margin-bottom: 16px;
}
.name-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--fg);
}
.name-card p {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.55;
}

/* ===== Isomorphism table (model MoE vs network MoE) ===== */
.iso-table {
  width: 100%;
  border-collapse: collapse;
  margin: 40px 0;
  font-family: var(--mono);
  font-size: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.iso-table th, .iso-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.iso-table th {
  background: var(--bg-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.iso-table td:first-child { color: var(--fg-dim); }
.iso-table tr:last-child td { border-bottom: none; }
.iso-table .arrow { color: var(--accent); font-weight: 700; }

/* ===== Terminal code block ===== */
.terminal {
  background: #050805;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  margin: 32px 0;
  font-family: var(--mono);
  font-size: 14px;
  overflow: hidden;
}
.terminal-header {
  background: var(--bg-soft);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-dim);
  font-size: 12px;
}
.terminal-header::before {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.terminal-body { padding: 20px; color: var(--fg); }
.terminal-body .comment { color: var(--fg-dim); }
.terminal-body .cmd { color: var(--accent); }
.terminal-body .out { color: var(--fg); }
.terminal-body .key { color: var(--warn); }

/* ===== Pillars grid ===== */
.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.pillar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  transition: border-color 0.2s;
}
.pillar:hover { border-color: var(--accent-dim); }
.pillar .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
}
.pillar h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.pillar p {
  color: var(--fg-dim);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== Status bar ===== */
.status-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin: 40px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  font-family: var(--mono);
}
.status-bar .stat .label {
  font-size: 11px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.status-bar .stat .value {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
}
.status-bar .stat .value .small { font-size: 14px; color: var(--fg-dim); }

/* ===== Vision / future (the federation dream) ===== */
.vision {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-soft) 100%);
  border-left: 3px solid var(--warn);
}
.vision-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--warn);
  border: 1px solid var(--warn);
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== Comparison (MeshMoE vs relay stations) ===== */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 40px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.compare > div { padding: 28px; }
.compare .relay { background: var(--bg-card); border-right: 1px solid var(--border); }
.compare .meshmoe { background: var(--bg-soft); }
.compare h4 {
  font-family: var(--mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.compare .relay h4 { color: var(--fg-dim); }
.compare .meshmoe h4 { color: var(--accent); }
.compare ul { list-style: none; }
.compare li {
  font-size: 14px;
  color: var(--fg-dim);
  padding: 6px 0;
  padding-left: 22px;
  position: relative;
}
.compare .relay li::before { content: '×'; position: absolute; left: 0; color: #ff5050; font-weight: 700; }
.compare .meshmoe li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-dim);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}
.footer-grid h5 {
  color: var(--fg);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.footer-grid a { color: var(--fg-dim); text-decoration: none; display: block; padding: 4px 0; }
.footer-grid a:hover { color: var(--accent); }
.footer-tag {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 12px;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===== Code inline ===== */
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-soft);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .name-breakdown, .pillars, .compare { grid-template-columns: 1fr; }
  .status-bar { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 80px 0 60px; }
  section { padding: 64px 0; }
  .nav-links a:not(.lang-switch) { display: none; }
}
