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

:root {
  --bg: #0b0e14;
  --bg-alt: #111621;
  --surface: #1a1f2e;
  --border: #2a3040;
  --text: #e0e4ec;
  --text-muted: #8b95a8;
  --accent: #f59e0b;
  --accent-dim: #d97706;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --green: #4ade80;
  --orange: #f59e0b;
  --red: #f87171;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Skip Link === */
.skip-link { position: absolute; top: -100%; left: 16px; background: var(--accent); color: #fff; padding: 8px 16px; border-radius: 0 0 8px 8px; z-index: 1001; font-size: 0.85rem; }
.skip-link:focus { top: 0; text-decoration: none; }

/* === Nav === */
.nav { position: sticky; top: 0; z-index: 1000; background: rgba(11, 14, 20, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 12px 0; }
.nav-inner { display: flex; align-items: center; gap: 24px; }
.nav-brand { font-weight: 700; font-size: 0.95rem; color: var(--text); white-space: nowrap; flex-shrink: 0; }
.nav-brand:hover { color: var(--accent); text-decoration: none; }
.nav-links { display: flex; gap: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* === Hero === */
.hero { padding: 100px 0 80px; text-align: center; background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); }
.hero-badge { display: inline-block; font-family: var(--mono); font-size: 0.8rem; color: var(--accent); background: var(--accent-glow); border: 1px solid var(--accent-dim); border-radius: 20px; padding: 4px 16px; margin-bottom: 24px; }
.hero h1 { font-size: 3.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.hero-tagline { font-size: 1.25rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 36px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; transition: all 0.2s; }
.btn-primary { background: var(--accent); color: #0b0e14; }
.btn-primary:hover { background: var(--accent-dim); text-decoration: none; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent-dim); text-decoration: none; }

/* === Sections === */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 40px; }

/* === Phase 0 Callout === */
.phase0-callout { background: var(--accent-glow); border: 2px solid var(--accent-dim); border-radius: 16px; padding: 40px 32px; text-align: center; max-width: 700px; margin: 0 auto; }
.phase0-callout h3 { color: var(--accent); font-size: 1.3rem; margin-bottom: 16px; }
.phase0-callout p { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }
.phase0-callout .requirement { display: inline-block; font-family: var(--mono); font-size: 0.85rem; color: var(--accent); background: rgba(245, 158, 11, 0.1); border: 1px solid var(--accent-dim); border-radius: 6px; padding: 4px 12px; margin: 4px; }

/* === Pipeline === */
.phase-title { font-size: 0.95rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin: 32px 0 12px; }
.phase-title:first-of-type { margin-top: 0; }
.pipeline { display: flex; align-items: flex-start; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.pipeline-step { flex: 1; min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px 20px; }
.pipeline-step h3 { margin: 12px 0 8px; }
.pipeline-step p { font-size: 0.9rem; color: var(--text-muted); }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-glow); color: var(--accent); font-weight: 700; font-family: var(--mono); font-size: 0.85rem; border: 1px solid var(--accent-dim); }
.pipeline-arrow { display: flex; align-items: center; color: var(--text-muted); font-size: 1.4rem; padding-top: 40px; flex-shrink: 0; }

/* === Techniques Grid === */
.techniques-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.technique-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px 20px; }
.technique-card h3 { margin-bottom: 8px; color: var(--accent); }
.technique-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* === Challenges Grid === */
.challenges-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.challenge-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px 20px; }
.challenge-card h3 { margin-bottom: 8px; font-size: 1rem; }
.challenge-card p { font-size: 0.88rem; color: var(--text-muted); }

/* === Papers === */
.papers-list { display: flex; flex-direction: column; gap: 12px; }
.paper-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; transition: border-color 0.2s; color: var(--text); }
.paper-card:hover { border-color: var(--accent-dim); text-decoration: none; }
.paper-tag { display: inline-block; font-family: var(--mono); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); background: var(--accent-glow); border-radius: 4px; padding: 2px 8px; margin-bottom: 8px; }
.paper-card h3 { margin-bottom: 6px; font-size: 1.1rem; }
.paper-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.paper-link { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); }

/* === Install === */
.install-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 40px; }
.install-method { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.install-method h3 { margin-bottom: 16px; }
pre { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; overflow-x: auto; }
code { font-family: var(--mono); font-size: 0.88rem; color: var(--green); }
.compat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.compat h3 { margin-bottom: 16px; }
.compat-list { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.compat-badge { display: inline-block; font-family: var(--mono); font-size: 0.85rem; padding: 6px 16px; border-radius: 6px; background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent-dim); }
.compat-note { font-size: 0.88rem; color: var(--text-muted); }

/* === Usage === */
.usage-examples { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.usage-examples pre { margin: 0; }

/* === Footer === */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.footer-brand { font-size: 0.95rem; }
.footer-brand a { color: var(--accent); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.9rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }
.footer-license { font-size: 0.82rem; color: var(--text-muted); opacity: 0.7; }

/* === Responsive === */
@media (max-width: 768px) {
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-tagline { font-size: 1.05rem; }
  .section { padding: 50px 0; }
  h2 { font-size: 1.6rem; }
  .pipeline { flex-direction: column; align-items: stretch; }
  .pipeline-arrow { transform: rotate(90deg); padding: 0; justify-content: center; }
  .footer-content { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .techniques-grid, .challenges-grid, .install-methods, .usage-examples { grid-template-columns: 1fr; }
}
