/* ============================================
   OPEN VEHICLE SCHEMA - PREMIUM DESIGN SYSTEM
   A bold, automotive-inspired tech aesthetic
   ============================================ */

/* Font imports - Geist for that premium tech feel */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

@font-face {
  font-family: 'Geist';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-sans/Geist-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-sans/Geist-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-sans/Geist-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.2.0/dist/fonts/geist-sans/Geist-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   CSS CUSTOM PROPERTIES - DARK THEME (DEFAULT)
   ============================================ */
:root {
  /* Core palette - deep space black with warmth */
  --bg-base: #08080c;
  --bg-elevated: #0c0c12;
  --bg-surface: #12121a;
  --bg-card: rgba(18, 18, 26, 0.7);
  
  /* Text hierarchy */
  --text-primary: #f4f4f6;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  
  /* Accent - electric cyan with depth */
  --accent: #00d4ff;
  --accent-soft: rgba(0, 212, 255, 0.15);
  --accent-glow: rgba(0, 212, 255, 0.4);
  --accent-hover: #00e5ff;
  
  /* Secondary accent - warm amber */
  --accent-warm: #ff9f1c;
  --accent-warm-soft: rgba(255, 159, 28, 0.12);
  
  /* Borders & dividers */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(0, 212, 255, 0.3);
  
  /* Shadows & effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.15);
  --shadow-glow-strong: 0 0 60px rgba(0, 212, 255, 0.25);
  
  /* Glass effects */
  --glass-bg: rgba(18, 18, 26, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);
  
  /* Gradients */
  --gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 212, 255, 0.15), transparent),
                   radial-gradient(ellipse 60% 40% at 80% 0%, rgba(0, 180, 255, 0.1), transparent),
                   radial-gradient(ellipse 50% 30% at 20% 10%, rgba(0, 212, 255, 0.08), transparent);
  --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  --gradient-subtle: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
  
  /* Code block colors */
  --code-bg: #0a0a10;
  --code-text: #e4e4e8;
  --code-comment: #5c6370;
  --code-keyword: #c678dd;
  --code-string: #98c379;
  --code-number: #d19a66;
  --code-property: #61afef;
  
  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   LIGHT THEME
   ============================================ */
@media (prefers-color-scheme: light) {
  :root {
    --bg-base: #fafafa;
    --bg-elevated: #ffffff;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    
    --text-primary: #0a0a0f;
    --text-secondary: #4a4a5a;
    --text-muted: #8a8a9a;
    
    --accent: #0090cc;
    --accent-soft: rgba(0, 144, 204, 0.1);
    --accent-glow: rgba(0, 144, 204, 0.2);
    --accent-hover: #007ab8;
    
    --border-subtle: rgba(0, 0, 0, 0.04);
    --border-default: rgba(0, 0, 0, 0.08);
    --border-accent: rgba(0, 144, 204, 0.3);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(0, 144, 204, 0.1);
    --shadow-glow-strong: 0 0 60px rgba(0, 144, 204, 0.15);
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);
    
    --gradient-hero: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 144, 204, 0.08), transparent),
                     radial-gradient(ellipse 60% 40% at 80% 0%, rgba(0, 180, 255, 0.06), transparent),
                     radial-gradient(ellipse 50% 30% at 20% 10%, rgba(0, 144, 204, 0.04), transparent);
    
    --code-bg: #1a1a24;
    --code-text: #e4e4e8;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Subtle background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.015;
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

/* Selection styling */
::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
}

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

.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: opacity var(--transition-fast);
}

.brand:hover {
  opacity: 0.8;
  color: var(--text-primary);
}

/* Brand icon/logo accent */
.brand::before {
  content: '';
  width: 28px;
  height: 28px;
  background: var(--gradient-accent);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav a {
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav a:hover {
  color: var(--text-primary);
  background: var(--border-subtle);
}

/* GitHub link with icon */
.nav a[href*="github"]::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z'/%3E%3C/svg%3E");
  background-size: contain;
  opacity: 0.7;
}

@media (prefers-color-scheme: light) {
  .nav a[href*="github"]::before {
    opacity: 0.8;
  }
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.site-main {
  min-height: calc(100vh - 200px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: var(--space-4xl) 0 var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.hero-gradient {
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

/* Animated glow orbs */
.hero-gradient::before,
.hero-gradient::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.hero-gradient::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
  top: -300px;
  right: 10%;
}

.hero-gradient::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 180, 255, 0.1) 0%, transparent 70%);
  top: -100px;
  left: 20%;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-3xl);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    text-align: center;
  }
  
  .hero-copy {
    order: 1;
  }
  
  .hero-visual {
    order: 2;
  }
  
  .badge-row {
    justify-content: center;
  }
  
  .cta-row {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
  }
}

.hero-copy h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.subline {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.cta-row {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.btn-primary {
  background: var(--gradient-accent);
  border: none;
  color: #000;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-strong), var(--shadow-md);
  color: #000;
}

/* Button with arrow */
.btn-arrow::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* ============================================
   CODE PANEL (HERO)
   ============================================ */
.hero-visual {
  position: relative;
}

.code-panel {
  background: var(--code-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
}

/* Subtle gradient overlay */
.code-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.code-header {
  height: 44px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 var(--space-md);
  gap: var(--space-sm);
}

.code-header span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.code-header span:nth-child(1) { background: #ff5f57; opacity: 0.8; }
.code-header span:nth-child(2) { background: #febc2e; opacity: 0.8; }
.code-header span:nth-child(3) { background: #28c840; opacity: 0.8; }

.code-panel pre {
  margin: 0;
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--code-text);
  overflow-x: auto;
}

.code-panel code {
  font-family: inherit;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--space-4xl) 0;
  position: relative;
}

.section:nth-child(even) {
  background: var(--bg-surface);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Left-aligned section headers */
#standard .section-header {
  text-align: left;
  margin-left: 0;
  max-width: 800px;
}

/* ============================================
   FEATURE CARDS
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

/* Hover glow effect */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 15px;
}

/* ============================================
   SCHEMA DIAGRAM
   ============================================ */
.schema-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-xl);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--space-xl);
}

.chip {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.chip:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.arrow {
  color: var(--accent);
  font-size: 18px;
  opacity: 0.6;
}

/* ============================================
   SCHEMA CARDS
   ============================================ */
.schema-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.schema-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.schema-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.schema-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.schema-card pre {
  background: var(--code-bg);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--code-text);
  border: 1px solid var(--border-subtle);
}

.schema-card pre code {
  font-family: inherit;
  color: inherit;
}

/* ============================================
   ID EXAMPLE SECTION
   ============================================ */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  align-items: start;
}

.id-example {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
}

/* Accent line */
.id-example::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-accent);
}

.id-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.id-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  padding: var(--space-md);
  background: var(--code-bg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow-x: auto;
  white-space: nowrap;
}

.id-hint {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================
   BULLETS / LISTS
   ============================================ */
.bullets {
  padding-left: var(--space-lg);
  color: var(--text-secondary);
}

.bullets li {
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.bullets li::marker {
  color: var(--accent);
}

/* Small variant for schema cards */
.bullets.small {
  font-size: 14px;
}

/* ============================================
   QUICKLINKS GRID
   ============================================ */
.quicklinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.ql {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.ql::after {
  content: '→';
  color: var(--accent);
  opacity: 0.5;
  transition: all var(--transition-fast);
}

.ql:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.ql:hover::after {
  opacity: 1;
  transform: translateX(4px);
}

/* ============================================
   SCHEMA EXPLORER
   ============================================ */
.schema-explorer {
  background: var(--code-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  overflow: auto;
  max-height: 600px;
}

.se-node {
  margin-left: var(--space-md);
}

.se-key {
  color: var(--code-property);
}

.se-toggle {
  cursor: pointer;
  color: var(--accent);
  user-select: none;
}

.se-toggle:hover {
  text-decoration: underline;
}

/* ============================================
   MARKDOWN CONTENT
   ============================================ */
.markdown {
  max-width: 800px;
  line-height: 1.8;
}

.markdown h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: var(--space-2xl) 0 var(--space-lg);
  color: var(--text-primary);
}

.markdown h1:first-child {
  margin-top: var(--space-2xl);
}

.markdown h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: var(--space-2xl) 0 var(--space-md);
  color: var(--text-primary);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.markdown h3 {
  font-size: 22px;
  font-weight: 600;
  margin: var(--space-xl) 0 var(--space-sm);
  color: var(--text-primary);
}

.markdown p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.markdown ul, .markdown ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
  color: var(--text-secondary);
}

.markdown li {
  margin-bottom: var(--space-sm);
}

.markdown li::marker {
  color: var(--accent);
}

.markdown pre {
  background: var(--code-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--code-text);
}

.markdown code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.markdown pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.markdown a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-soft);
  transition: all var(--transition-fast);
}

.markdown a:hover {
  text-decoration-color: var(--accent);
}

.markdown blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-style: italic;
}

.markdown table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-lg);
}

.markdown th, .markdown td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.markdown th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
}

.markdown td {
  color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.site-footer p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: var(--space-sm);
}

.site-footer p:last-child {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.site-footer a:hover {
  color: var(--accent);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.muted {
  color: var(--text-muted);
}

.small-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: var(--space-lg);
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays for children */
.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 75ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 150ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 225ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 300ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 375ms; }

/* ============================================
   PAGE-SPECIFIC STYLES
   ============================================ */

/* Docs Hub */
.docs-hub {
  padding: var(--space-3xl) 0;
}

.docs-hub h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.docs-hub > p {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: var(--space-xl);
}

.docs-hub h2 {
  font-size: 24px;
  font-weight: 600;
  margin: var(--space-2xl) 0 var(--space-md);
}

.docs-hub ul {
  padding-left: var(--space-lg);
}

.docs-hub li {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.docs-hub li::marker {
  color: var(--accent);
}

/* 404 Page */
.error-page {
  text-align: center;
  padding: var(--space-4xl) 0;
}

.error-page h1 {
  font-size: 120px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: var(--space-md);
}

.error-page p {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

/* About / Contributing pages */
.content-page {
  padding: var(--space-3xl) 0;
  max-width: 800px;
}

.content-page h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.content-page h2 {
  font-size: 24px;
  font-weight: 600;
  margin: var(--space-2xl) 0 var(--space-md);
}

.content-page p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.content-page ul {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.content-page li {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.content-page li::marker {
  color: var(--accent);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
  .nav-container {
    height: 64px;
  }
  
  .brand::before {
    width: 24px;
    height: 24px;
  }
  
  .nav a {
    padding: var(--space-sm);
    font-size: 13px;
  }
  
  .hero {
    padding: var(--space-2xl) 0;
  }
  
  .section {
    padding: var(--space-2xl) 0;
  }
  
  .section-header {
    margin-bottom: var(--space-xl);
  }
  
  .cta-row {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .cta-row .btn {
    width: 100%;
  }
  
  .badge-row {
    justify-content: center;
  }
  
  .schema-diagram {
    padding: var(--space-md);
  }
  
  .chip {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .arrow {
    font-size: 14px;
  }
  
  .quicklinks {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .nav a[href*="github"]::before {
    display: none;
  }
  
  .code-panel pre {
    font-size: 12px;
    padding: var(--space-md);
  }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) var(--bg-base);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .site-header,
  .site-footer,
  .cta-row,
  .badge-row {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}
