/* ============================================================
   SDGFT.org — Six-Dimensional Geometric Field Theory
   MVP Static Website Stylesheet
   ============================================================ */

/* --- Self-hosted Fonts (no external requests) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- CSS Custom Properties --- */
:root {
  /* Palette: deep space / physics aesthetic */
  --bg-primary:    #0a0e1a;
  --bg-secondary:  #111827;
  --bg-card:       #1a2035;
  --bg-card-hover: #222b45;
  --accent:        #6366f1;     /* indigo-500 */
  --accent-light:  #818cf8;     /* indigo-400 */
  --accent-glow:   rgba(99, 102, 241, 0.25);
  --gold:          #f59e0b;     /* amber-500 */
  --gold-light:    #fbbf24;
  --text-primary:  #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #3b82f6;
  --border:        rgba(255,255,255,0.06);
  --border-accent: rgba(99,102,241,0.3);
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --shadow:        0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.5);
  --transition:    0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width:     1200px;
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); margin-bottom: 0.75rem; }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--gold-light); }

strong { color: var(--text-primary); font-weight: 600; }
code {
  font-family: var(--font-mono);
  background: rgba(99,102,241,0.1);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  transition: background var(--transition);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand span {
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(99,102,241,0.1);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(245,158,11,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.1) 0%, transparent 50%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(99,102,241,0.15);
  border: 1px solid var(--border-accent);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 0%, var(--accent-light) 50%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1;
}

.hero-stat-value.gold { color: var(--gold-light); }

.hero-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99,102,241,0.4);
  color: #fff;
}

.btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: rgba(99,102,241,0.1);
  color: var(--accent-light);
}

.card-icon.gold {
  background: rgba(245,158,11,0.1);
  color: var(--gold-light);
}

.card-icon.green {
  background: rgba(16,185,129,0.1);
  color: var(--success);
}

.card h3 a {
  color: var(--text-primary);
}

.card h3 a:hover {
  color: var(--accent-light);
}

/* --- Equation Blocks --- */
.equation-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  text-align: center;
}

.equation-block .katex { font-size: 1.15em; }

.equation-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  text-align: left;
}

/* --- Table --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--bg-card);
}

th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }

tr:hover td {
  background: rgba(99,102,241,0.03);
}

/* Sigma tension badges */
.sigma-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.sigma-exact { background: rgba(16,185,129,0.15); color: var(--success); }
.sigma-excellent { background: rgba(59,130,246,0.15); color: var(--info); }
.sigma-good { background: rgba(245,158,11,0.15); color: var(--warning); }
.sigma-fair { background: rgba(245,158,11,0.2); color: var(--gold); }
.sigma-tension { background: rgba(239,68,68,0.15); color: var(--danger); }
.sigma-bound { background: rgba(148,163,184,0.15); color: var(--text-muted); }
.sigma-pending { background: rgba(148,163,184,0.1); color: var(--text-muted); font-style: italic; }

/* --- Scorecard Summary Bars --- */
.scorecard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.score-pill {
  text-align: center;
  padding: 1.25rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.score-pill-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.score-pill-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.score-pill.exact .score-pill-value { color: var(--success); }
.score-pill.excellent .score-pill-value { color: var(--info); }
.score-pill.good .score-pill-value { color: var(--gold-light); }
.score-pill.tension .score-pill-value { color: var(--danger); }
.score-pill.bound .score-pill-value { color: var(--text-muted); }

/* --- Sigma bar visualization --- */
.sigma-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sigma-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  max-width: 100px;
}

.sigma-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease-out;
}

.sigma-bar-fill.exact { width: 2%; background: var(--success); }
.sigma-bar-fill.excellent { background: var(--info); }
.sigma-bar-fill.good { background: var(--gold); }
.sigma-bar-fill.tension { background: var(--danger); }

/* --- 24-Cell SVG Graphic --- */
.polytope-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.polytope-container svg {
  width: 100%;
  height: 100%;
}

.polytope-edge {
  stroke: var(--accent);
  stroke-width: 0.5;
  opacity: 0.4;
  animation: edgePulse 4s ease-in-out infinite;
}

.polytope-vertex {
  fill: var(--accent-light);
  filter: drop-shadow(0 0 4px var(--accent));
  animation: vertexGlow 3s ease-in-out infinite;
}

.polytope-vertex.highlight {
  fill: var(--gold-light);
  filter: drop-shadow(0 0 6px var(--gold));
  r: 4;
}

@keyframes edgePulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

@keyframes vertexGlow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* --- Six-Cone CSS Graphic --- */
.cone-graphic {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 2rem auto;
}

.cone {
  position: absolute;
  width: 0;
  height: 0;
  left: 50%;
  top: 50%;
  transform-origin: 0 0;
}

.cone::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 120px solid;
  transform: translate(-50%, -100%);
  opacity: 0.5;
}

.cone:nth-child(1)::after { border-bottom-color: rgba(99,102,241,0.3); }
.cone:nth-child(2)::after { border-bottom-color: rgba(129,140,248,0.3); }
.cone:nth-child(3)::after { border-bottom-color: rgba(245,158,11,0.25); }
.cone:nth-child(4)::after { border-bottom-color: rgba(99,102,241,0.25); }
.cone:nth-child(5)::after { border-bottom-color: rgba(251,191,36,0.2); }
.cone:nth-child(6)::after { border-bottom-color: rgba(129,140,248,0.25); }

.cone:nth-child(1) { transform: rotate(0deg); }
.cone:nth-child(2) { transform: rotate(60deg); }
.cone:nth-child(3) { transform: rotate(120deg); }
.cone:nth-child(4) { transform: rotate(180deg); }
.cone:nth-child(5) { transform: rotate(240deg); }
.cone:nth-child(6) { transform: rotate(300deg); }

.cone-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(245,158,11,0.5);
  z-index: 2;
}

.cone-label {
  position: absolute;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* --- Derivation Hierarchy --- */
.hierarchy {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
  margin: 2rem auto;
  position: relative;
}

.hierarchy::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--gold), var(--success));
  opacity: 0.3;
  transform: translateX(-50%);
}

.hierarchy-level {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  position: relative;
  z-index: 1;
}

.hierarchy-level:nth-child(odd) { justify-content: flex-start; }
.hierarchy-level:nth-child(even) { justify-content: flex-end; }

.hierarchy-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  max-width: 300px;
  text-align: center;
  transition: all var(--transition);
}

.hierarchy-node:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.hierarchy-node small {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  margin-bottom: 0.25rem;
}

/* --- Falsification Timeline --- */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 40px 1fr;
  gap: 0;
  align-items: start;
  margin-bottom: 1.5rem;
}

.timeline-date {
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  padding-top: 0.25rem;
}

.timeline-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-glow);
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.timeline-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  min-height: 30px;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.timeline-content h4 {
  margin-bottom: 0.25rem;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Section headers --- */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header p {
  max-width: 600px;
  margin: 0.5rem auto 0;
  color: var(--text-secondary);
}

.section-header .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* --- KaTeX overrides --- */
.katex { color: var(--text-primary); }
.katex-display { margin: 1em 0; overflow-x: auto; overflow-y: hidden; }

/* --- Utility --- */
.text-center { text-align: center; }
.text-accent { color: var(--accent-light); }
.text-gold { color: var(--gold-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

/* tag / chip */
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}
.tag-indigo { background: rgba(99,102,241,0.1); color: var(--accent-light); border-color: rgba(99,102,241,0.2); }
.tag-gold { background: rgba(245,158,11,0.1); color: var(--gold-light); border-color: rgba(245,158,11,0.2); }
.tag-green { background: rgba(16,185,129,0.1); color: var(--success); border-color: rgba(16,185,129,0.2); }

/* --- Animated background grid --- */
.bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(var(--accent) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* --- Page header (non-hero pages) --- */
.page-header {
  padding: 7rem 1.5rem 3rem;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.1) 0%, transparent 60%);
}

.page-header h1, .page-header p {
  position: relative;
  z-index: 1;
}

.page-header p {
  max-width: 600px;
  margin: 0.75rem auto 0;
  color: var(--text-secondary);
}

/* --- Derivation detail (theory page) --- */
.derivation-step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-light);
  flex-shrink: 0;
}

.step-content h3 {
  margin-bottom: 0.5rem;
}

/* --- Impressum --- */
.legal-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.legal-content h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-content p, .legal-content li {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .timeline-item {
    grid-template-columns: 80px 30px 1fr;
  }

  .derivation-step {
    grid-template-columns: 1fr;
  }

  .step-number {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: auto;
    padding: 8rem 1rem 3rem;
  }

  .hero-stat-value {
    font-size: 1.8rem;
  }

  .section {
    padding: 3rem 0;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .scorecard-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .table-wrapper {
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.5rem 0.6rem;
  }
}

/* --- Print --- */
@media print {
  .nav, .hero::before, .bg-grid { display: none; }
  body { background: #fff; color: #000; }
  .card, .equation-block { border-color: #ccc; }
}
