/* ============================================================
   doqtor — website styles
   Color palette derived from the logo:
     Navy:       #1B2D4F
     Steel Blue: #4A6FA5
     Sky Blue:   #7BA3D4
     Periwinkle: #B8CEE8
     White:      #FFFFFF
   Fonts:
     Headings:   Space Grotesk
     Body:       Inter
     Code:       JetBrains Mono
   ============================================================ */

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

:root {
  --navy: #1B2D4F;
  --navy-deep: #0F1A2E;
  --navy-darker: #0A1220;
  --steel: #4A6FA5;
  --sky: #7BA3D4;
  --peri: #B8CEE8;
  --white: #FFFFFF;

  --font-heading: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', monospace;

  --bg-primary: #080E1A;
  --bg-secondary: #0D1526;
  --bg-card: #111D32;
  --bg-card-hover: #162540;
  --bg-terminal: #060C16;
  --text-primary: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-dim: #64748B;
  --border: #1E2D45;
  --border-glow: rgba(74, 111, 165, 0.3);
  --accent: #7BA3D4;
  --accent-bright: #9DBDE8;
  --accent-dim: #4A6FA5;
  --glow: rgba(123, 163, 212, 0.15);
  --glow-strong: rgba(123, 163, 212, 0.3);
  --del-color: #F87171;
  --add-color: #6EE7B7;
  --scanline-opacity: 0.02;
  --nav-bg: rgba(8, 14, 26, 0.85);
  --nav-border: rgba(30, 45, 69, 0.6);
  --sidebar-bg: var(--bg-secondary);
  --sidebar-width: 260px;
}

[data-theme="light"] {
  --bg-primary: #F4F7FB;
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F0F4FA;
  --bg-terminal: #1B2D4F;
  --text-primary: #1B2D4F;
  --text-secondary: #4A6FA5;
  --text-dim: #7BA3D4;
  --border: #D4DEF0;
  --border-glow: rgba(74, 111, 165, 0.15);
  --accent: #4A6FA5;
  --accent-bright: #1B2D4F;
  --accent-dim: #7BA3D4;
  --glow: rgba(74, 111, 165, 0.06);
  --glow-strong: rgba(74, 111, 165, 0.12);
  --del-color: #DC2626;
  --add-color: #16A34A;
  --scanline-opacity: 0;
  --nav-bg: rgba(244, 247, 251, 0.9);
  --nav-border: rgba(212, 222, 240, 0.8);
  --sidebar-bg: #F8FAFD;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* --- Scanlines --- */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(123, 163, 212, var(--scanline-opacity)) 2px,
    rgba(123, 163, 212, var(--scanline-opacity)) 4px
  );
}

/* --- Container --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  transition: background 0.3s, border-color 0.3s;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
}

.nav-logo { width: 34px; height: 34px; }

.nav-name {
  font-family: var(--font-heading);
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent-bright); }

.nav-github { display: flex; align-items: center; }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  color: var(--accent-bright);
  border-color: var(--accent-dim);
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  background: radial-gradient(circle, var(--glow-strong) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 760px;
}

.hero-logo {
  width: 180px;
  height: 180px;
  margin-bottom: 36px;
  filter: drop-shadow(0 0 40px var(--glow-strong));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.04em;
}

.highlight {
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 24px var(--glow-strong);
  font-weight: 700;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* --- Install Box (hero) --- */
.hero-install {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
}

.install-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.install-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.install-command {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s;
}

[data-theme="light"] .install-command { color: #E2E8F0; }
[data-theme="dark"] .install-command { color: var(--text-primary); }

.install-command:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 24px var(--glow), inset 0 0 24px var(--glow);
}

.install-prompt {
  color: var(--sky);
  user-select: none;
}

.install-text {
  user-select: all;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px;
  cursor: pointer;
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.copy-btn .check-icon { display: none; }
.copy-btn.copied .copy-icon { display: none; }
.copy-btn.copied .check-icon { display: block; }
.copy-btn.copied {
  color: var(--add-color);
  border-color: var(--add-color);
}

/* --- Buttons --- */
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--steel);
  color: var(--white);
  border: 1px solid var(--steel);
  box-shadow: 0 0 20px rgba(74, 111, 165, 0.3);
}

.btn-primary:hover {
  background: var(--sky);
  border-color: var(--sky);
  box-shadow: 0 0 30px rgba(123, 163, 212, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent-dim);
  color: var(--accent-bright);
  background: var(--glow);
}

/* ============================================================
   Terminal Box
   ============================================================ */
.terminal-box {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  position: relative;
  text-align: left;
}

[data-theme="light"] .terminal-box { color: #E2E8F0; }
[data-theme="dark"] .terminal-box { color: var(--text-primary); }

.terminal-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #EF4444; }
.terminal-dots span:nth-child(2) { background: #EAB308; }
.terminal-dots span:nth-child(3) { background: #22C55E; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
  margin-right: 30px;
}

.terminal-box pre {
  margin: 0;
  padding: 14px 18px;
  white-space: pre;
}

.terminal-box code {
  font-family: inherit;
  font-size: inherit;
}

.prompt { color: var(--sky); }
.comment { color: #64748B; }
.kw { color: #C084FC; }
.str { color: #6EE7B7; }
.type { color: var(--sky); }

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: 100px 0;
}

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

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.section-sub {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 56px;
  font-size: 1.05rem;
}

/* --- Feature Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.feature-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 30px var(--glow);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--glow);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 18px;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.feature-example {
  background: var(--bg-terminal);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

[data-theme="light"] .feature-example { color: #E2E8F0; }

.del { color: var(--del-color); text-decoration: line-through; }
.add { color: var(--add-color); }
.dim { color: var(--text-dim); }

/* --- Pipeline --- */
.pipeline {
  max-width: 640px;
  margin: 0 auto;
}

.pipeline-step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-dim);
  opacity: 0.5;
  min-width: 48px;
  text-align: right;
  line-height: 1;
  padding-top: 4px;
}

.step-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.pipeline-connector {
  width: 2px;
  height: 32px;
  background: linear-gradient(to bottom, var(--accent-dim), transparent);
  margin-left: 59px;
  opacity: 0.3;
}

/* --- Quick Start --- */
.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.quickstart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}

.quickstart-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--glow);
  color: var(--accent);
  border: 1px solid var(--border-glow);
  padding: 3px 10px;
  border-radius: 6px;
}

.quickstart-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.quickstart-note code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--glow);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

/* --- CTA --- */
.cta-container {
  text-align: center;
}

.cta-logo {
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 20px var(--glow-strong));
}

/* ============================================================
   Docs Page Layout
   ============================================================ */
.docs-page .nav-inner {
  max-width: 100%;
  padding: 0 24px;
}

.docs-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 64px;
}

/* --- Sidebar --- */
.docs-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
}

.sidebar-inner {
  padding: 24px 16px 40px;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-heading {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0 12px;
  margin-bottom: 6px;
}

.sidebar-link {
  display: block;
  padding: 5px 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--glow);
}

.sidebar-link.active {
  color: var(--accent);
  background: var(--glow);
}

.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--steel);
  color: var(--white);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0,0,0,0.5);
}

.sidebar-backdrop.open {
  display: block;
}

/* --- Main docs content --- */
.docs-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
}

.docs-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

.docs-content section {
  scroll-margin-top: 90px;
}

.docs-content h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.docs-content h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  margin-top: 8px;
}

.docs-content h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  margin-top: 32px;
}

.docs-content h3 code {
  font-family: var(--font-mono);
  color: var(--accent);
}

.docs-content > section > p,
.docs-content > section > ul,
.docs-content > section > ol {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.docs-content ul, .docs-content ol {
  padding-left: 24px;
}

.docs-content li {
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.docs-content li code,
.docs-content p code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--glow);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent);
}

.docs-content a {
  color: var(--accent);
  text-decoration: none;
}

.docs-content a:hover {
  text-decoration: underline;
}

.docs-content .terminal-box {
  margin-bottom: 20px;
}

.docs-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* --- Docs Table --- */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.85rem;
}

.docs-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docs-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.docs-table code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

/* Architecture diagram */
.arch {
  color: var(--sky) !important;
  font-size: 0.73rem;
}

[data-theme="light"] .arch { color: #B8CEE8 !important; }

/* --- Docs Footer --- */
.docs-footer {
  margin-left: var(--sidebar-width);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.footer-logo { width: 28px; height: 28px; }

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

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

.footer-copy {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ============================================================
   Responsive — Tables
   Wrap tables in a scrollable container on all sizes
   ============================================================ */
.docs-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.docs-table thead,
.docs-table tbody,
.docs-table tr,
.docs-table th,
.docs-table td {
  white-space: nowrap;
}

/* re-allow wrapping in description columns */
.docs-table td:last-child,
.docs-table th:last-child {
  white-space: normal;
  min-width: 180px;
}

/* ============================================================
   Responsive — Tablet (max-width: 900px)
   ============================================================ */
@media (max-width: 900px) {
  /* Docs sidebar: off-canvas */
  .docs-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s;
  }

  .docs-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .docs-main {
    margin-left: 0;
  }

  .docs-footer {
    margin-left: 0;
  }

  .docs-content {
    padding: 32px 24px 80px;
  }

  .docs-content h1 {
    font-size: 1.7rem;
  }

  .docs-content h2 {
    font-size: 1.35rem;
  }

  /* Section spacing */
  .section {
    padding: 72px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  /* Hero adjustments */
  .hero {
    padding: 100px 20px 64px;
  }

  .hero-logo {
    width: 150px;
    height: 150px;
  }

  .hero-glow {
    width: 400px;
    height: 400px;
  }

  /* Feature grid: still 2-col on tablets */
  .feature-card {
    padding: 24px;
  }

  /* Pipeline */
  .pipeline-step { gap: 18px; }
  .step-num { font-size: 1.5rem; min-width: 40px; }
  .pipeline-connector { margin-left: 51px; }

  /* Quick start */
  .quickstart-card {
    padding: 24px;
  }

  /* CTA */
  .cta-logo {
    width: 60px;
    height: 60px;
  }
}

/* ============================================================
   Responsive — Mobile landscape / small tablet (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Uniform horizontal padding across all sections */
  .container { padding: 0 20px; }

  /* Nav: hamburger menu */
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--nav-border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
  }

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

  .nav-hamburger { display: flex; }

  .nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  /* Grids stack to 1 column */
  .feature-grid { grid-template-columns: 1fr; }
  .quickstart-grid { grid-template-columns: 1fr; }

  /* Hero — match container padding */
  .hero {
    min-height: auto;
    padding: 100px 20px 60px;
  }

  .hero-logo { width: 130px; height: 130px; }

  .hero h1 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  .hero-sub {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .hero-glow {
    width: 320px;
    height: 320px;
  }

  /* Section titles: left-align on mobile for consistency */
  .section-title {
    text-align: left;
    font-size: 1.6rem;
  }

  .section-sub {
    text-align: left;
    font-size: 0.95rem;
    margin: 0 0 32px;
  }

  /* Install box */
  .install-command {
    font-size: 0.85rem;
    padding: 12px 16px;
  }

  .install-label {
    font-size: 0.7rem;
  }

  /* Buttons */
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* CTA — left-align to match other sections */
  .cta-container {
    text-align: left;
  }

  .cta-logo {
    margin-bottom: 20px;
  }

  .cta-container .hero-actions {
    align-items: flex-start;
  }

  /* Sections */
  .section { padding: 56px 0; }

  /* Pipeline */
  .pipeline-step { gap: 16px; }
  .step-num { font-size: 1.4rem; min-width: 36px; }
  .pipeline-connector { margin-left: 47px; height: 24px; }

  /* Feature cards */
  .feature-card { padding: 24px; }
  .feature-card h3 { font-size: 1rem; }
  .feature-card p { font-size: 0.85rem; }

  /* Footer — compact single row on mobile */
  .footer { padding: 24px 0; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-copy {
    font-size: 0.75rem;
  }

  /* Terminal boxes */
  .terminal-box { font-size: 0.8rem; }
  .terminal-box pre { padding: 12px 14px; }
  .terminal-title { font-size: 0.65rem; }

  /* Docs page content */
  .docs-content {
    padding: 24px 20px 80px;
  }

  .docs-content h1 { font-size: 1.5rem; }
  .docs-content h2 { font-size: 1.25rem; }
  .docs-content h3 { font-size: 1.05rem; margin-top: 24px; }

  .docs-divider { margin: 36px 0; }

  /* Architecture diagram: smaller font */
  .arch { font-size: 0.6rem; }
}

/* ============================================================
   Responsive — Mobile portrait (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  /* Hero — match container 16px */
  .hero { padding: 88px 16px 48px; }
  .hero-logo { width: 100px; height: 100px; margin-bottom: 24px; }
  .hero h1 { font-size: 1.5rem; margin-bottom: 14px; }
  .hero-sub { font-size: 0.9rem; margin-bottom: 24px; }

  .hero-glow {
    width: 250px;
    height: 250px;
  }

  /* Install box */
  .install-command {
    font-size: 0.75rem;
    padding: 10px 12px;
    gap: 8px;
  }

  .hero-install { margin-bottom: 24px; }
  .install-label { font-size: 0.65rem; }

  /* Sections */
  .section { padding: 44px 0; }
  .section-title { font-size: 1.35rem; }
  .section-sub { font-size: 0.88rem; margin-bottom: 28px; }

  /* Feature cards */
  .feature-card { padding: 20px; }
  .feature-icon { width: 38px; height: 38px; margin-bottom: 14px; }
  .feature-icon svg { width: 20px; height: 20px; }
  .feature-example { font-size: 0.72rem; padding: 8px 10px; }

  /* Pipeline */
  .step-num { font-size: 1.2rem; min-width: 30px; }
  .step-content h3 { font-size: 0.95rem; }
  .step-content p { font-size: 0.82rem; }
  .pipeline-connector { margin-left: 41px; height: 20px; }

  /* Quick start */
  .quickstart-card { padding: 20px; }
  .quickstart-card h3 { font-size: 1rem; margin-bottom: 14px; }
  .quickstart-note { font-size: 0.8rem; }
  .tag { font-size: 0.6rem; padding: 2px 8px; }

  /* Terminal boxes */
  .terminal-box { font-size: 0.72rem; border-radius: 8px; }
  .terminal-box pre { padding: 10px 12px; }
  .terminal-header { padding: 8px 12px; }
  .terminal-dots span { width: 8px; height: 8px; }
  .terminal-title { font-size: 0.6rem; margin-right: 24px; }

  /* CTA */
  .cta-logo { width: 52px; height: 52px; margin-bottom: 18px; }

  /* Footer */
  .footer { padding: 20px 0; }
  .footer-inner { gap: 10px; }
  .footer-brand { font-size: 0.9rem; }
  .footer-logo { width: 22px; height: 22px; }
  .footer-links a { font-size: 0.8rem; }
  .footer-links { gap: 14px; }
  .footer-copy { font-size: 0.72rem; }

  /* Nav */
  .nav-inner { height: 56px; }
  .nav-logo { width: 28px; height: 28px; }
  .nav-name { font-size: 1rem; }
  .nav-links { top: 56px; padding: 16px 16px; gap: 14px; }

  /* Docs page */
  .docs-layout { padding-top: 56px; }
  .docs-sidebar { top: 56px; }
  .docs-content { padding: 20px 16px 72px; }
  .docs-content h1 { font-size: 1.35rem; }
  .docs-content h2 { font-size: 1.15rem; }
  .docs-content h3 { font-size: 0.95rem; }
  .docs-content > section > p,
  .docs-content li { font-size: 0.85rem; }
  .docs-divider { margin: 28px 0; }

  /* Architecture diagram */
  .arch { font-size: 0.48rem; }

  /* Docs tables */
  .docs-table th,
  .docs-table td {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  /* Sidebar toggle */
  .sidebar-toggle {
    bottom: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}

/* ============================================================
   Responsive — Very small screens (max-width: 360px)
   ============================================================ */
@media (max-width: 360px) {
  .hero h1 { font-size: 1.3rem; }
  .hero-logo { width: 80px; height: 80px; }
  .install-command { font-size: 0.68rem; padding: 8px 10px; }
  .section-title { font-size: 1.2rem; }
  .feature-card { padding: 16px; }
  .arch { font-size: 0.42rem; }
}
