:root {
  --bg-canvas: #09090b;
  --bg-surface: #121215;
  --bg-surface-elevated: #18181b;
  --bg-surface-glass: rgba(18, 18, 21, 0.85);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.18);
  --border-highlight: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

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

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

/* Background Ambient Glow */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 400px;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99, 102, 241, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
  position: relative;
  z-index: 1;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-indigo);
  box-shadow: 0 0 12px var(--accent-indigo);
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  border: 1px solid var(--border-subtle);
  background: rgba(99, 102, 241, 0.1);
  color: #c7d2fe;
}

/* Mobile Nav Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }
  .nav-links.open { display: flex; }
}

/* Header / Hero */
.hero {
  padding-block: 4rem 3rem;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  max-width: 900px;
  margin-inline: auto;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

/* Grids & Cards */
.grid-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}

.card-specular {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-highlight);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.925rem;
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

/* Benchmark Tables */
.table-container {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

th {
  background: rgba(255, 255, 255, 0.02);
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

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

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  min-height: 44px;
}

.btn-primary {
  background: #4f46e5;
  color: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-active);
}

/* Code Preview Box */
.code-box {
  background: #0d0e11;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  margin-block: 1.25rem;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.code-copy-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

pre code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* Archetype Interactive Cards */
.archetype-card {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.archetype-preview-pane {
  padding: 2.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.archetype-details {
  padding: 1.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
}

/* Style Demo Variations */
/* 1. Linear Dark */
.demo-linear-surface {
  background: #121215;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 20px 40px -15px rgba(0, 0, 0, 0.7);
  border-radius: 14px;
  padding: 1.5rem;
  max-width: 380px;
  width: 100%;
  position: relative;
}
.demo-linear-specular {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

/* 2. Swiss */
.demo-swiss-surface {
  background: #ffffff;
  color: #0a0a0a;
  padding: 2rem;
  border: 1px solid #e5e5e5;
  max-width: 380px;
  width: 100%;
}

/* 3. Neo-Brutalism */
.demo-neobrutal-surface {
  background: #fde047;
  color: #000000;
  border: 2px solid #000000;
  box-shadow: 5px 5px 0px 0px #000000;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 380px;
  width: 100%;
}

/* 4. Terminal */
.demo-terminal-surface {
  background: #000000;
  color: #00ff66;
  border: 1px solid #00ff66;
  font-family: var(--font-mono);
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.2);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: 3rem;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
