/* ===========================
   Google Fonts Import
   =========================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ===========================
   Global Styles & Reset
   =========================== */

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

:root {
  /* Core palette */
  --bg-base: #09090b;
  --bg-surface: #111113;
  --bg-elevated: #1c1c1f;
  --bg-muted: #27272a;

  /* Accent */
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;
  --accent-muted: rgba(59, 130, 246, 0.15);
  --accent-glow: rgba(59, 130, 246, 0.25);

  /* Semantic */
  --success: #10b981;
  --success-muted: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Text */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-accent: rgba(59, 130, 246, 0.3);
  --border-hover: rgba(59, 130, 246, 0.5);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 0 20px rgba(59, 130, 246, 0.2);
  --shadow-accent-lg: 0 0 40px rgba(59, 130, 246, 0.15);

  /* Legacy compat aliases — kept so any inline references don't break */
  --primary-color: var(--accent);
  --secondary-color: var(--accent-dark);
  --success-color: var(--success);
  --warning-color: var(--warning);
  --danger-color: var(--danger);
  --dark-bg: var(--bg-surface);
  --darker-bg: var(--bg-base);
  --white: var(--text-primary);
  --card-shadow: var(--shadow-sm);
  --card-shadow-hover: var(--shadow-md);

  /* Typography */
  --font-primary:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono:
    "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New",
    monospace;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
  --reveal-distance: 12px;
  --reveal-duration: 400ms;
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ===========================
   Navigation
   =========================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: var(--spacing-sm) 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.4);
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: clamp(0.45rem, 1.1vw, 1.15rem);
  align-items: center;
  flex-wrap: nowrap;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: color var(--transition-fast);
  position: relative;
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 10px;
  min-width: 170px;
  list-style: none;
  z-index: 1001;
}

.nav-dropdown-menu-inner {
  background: rgba(9, 9, 11, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-xs) 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.nav-dropdown-menu li {
  padding: 0;
}

.nav-dropdown-menu .nav-link {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
  white-space: nowrap;
}

.nav-dropdown-menu .nav-link::after {
  display: none;
}

.nav-dropdown-menu .nav-link:hover {
  color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  width: 30px;
  height: 24px;
  position: relative;
}

.hamburger span {
  position: absolute;
  left: 4px;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
}

.hamburger span:nth-child(1) {
  top: 4px;
}

.hamburger span:nth-child(2) {
  top: 11px;
}

.hamburger span:nth-child(3) {
  top: 18px;
}

/* Hamburger to X animation */
.hamburger.active span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

/* Scroll Progress Bar */
.progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--border);
}

.progress-bar {
  height: 1px;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s ease;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

/* ===========================
   Hero Section
   =========================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% -10%,
      rgba(59, 130, 246, 0.18) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 50% 40% at 80% 80%,
      rgba(59, 130, 246, 0.08) 0%,
      transparent 60%
    ),
    var(--bg-base);
  color: var(--text-primary);
  text-align: center;
  padding: var(--spacing-xxl) var(--spacing-md);
  margin-top: 70px;
  position: relative;
  overflow: hidden;
}

/* Subtle grid texture */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(
    ellipse 70% 70% at 50% 50%,
    black 30%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-muted);
  border: 1px solid var(--border-accent);
  color: var(--accent-light);
  padding: 0.35rem var(--spacing-sm);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
  animation: fadeInDown 0.6s ease;
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: var(--spacing-md);
  line-height: 1.15;
  letter-spacing: -0.03em;
  word-break: break-word;
  animation: fadeInUp 0.6s ease 0.2s both;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.25rem);
  margin-bottom: var(--spacing-lg);
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 0 var(--spacing-xs);
  animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
  animation: fadeInUp 0.6s ease 0.6s both;
}

/* Legacy .tech-badges kept for compatibility */
.tech-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.8s both;
}

/* Hero marquee — infinite scrolling tech badges */
.hero-marquee-container {
  overflow: hidden;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  animation: fadeInUp 0.6s ease 0.8s both;
}

.hero-marquee-track {
  display: flex;
  gap: 0.6rem;
  width: max-content;
  animation: hero-marquee-scroll 35s linear infinite;
}

.hero-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes hero-marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.hero-highlights {
  margin-top: var(--spacing-lg);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--spacing-sm);
  animation: fadeInUp 0.6s ease 1s both;
}

.hero-highlight {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition:
    border-color var(--transition-base),
    background var(--transition-base);
}

.hero-highlight:hover {
  border-color: var(--border-accent);
  background: var(--accent-muted);
}

.hero-highlight i {
  color: var(--accent-light);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.tech-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.3rem var(--spacing-sm);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ===========================
   Buttons
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem var(--spacing-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  font-size: 0.9375rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  font-family: var(--font-primary);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.4),
    var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow:
    0 0 0 1px rgba(96, 165, 250, 0.5),
    var(--shadow-accent);
}

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

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

.btn-large {
  padding: 0.8rem var(--spacing-xl);
  font-size: 1rem;
}

/* ===========================
   Sections
   =========================== */

.section {
  padding: var(--spacing-xxl) var(--spacing-md);
  background: var(--bg-surface);
}

/* Alternate sections get a fractionally lighter bg for rhythm */
.section:nth-of-type(odd) {
  background: var(--bg-base);
}

.section-dark {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.section-title {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-xl);
  position: relative;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: var(--spacing-sm) auto 0;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

/* ===========================
   Overview Section
   =========================== */

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xxl);
}

.showcase-lead {
  text-align: center;
  max-width: 820px;
  margin: -0.25rem auto var(--spacing-xl);
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.showcase-grid {
  margin-bottom: 0;
}

.showcase-card {
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.showcase-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--border);
  transition:
    transform var(--transition-base),
    filter var(--transition-base);
}

.showcase-card:hover img {
  transform: scale(1.02);
  filter: saturate(1.05);
}

.showcase-card h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
}

.showcase-card h3 i {
  color: var(--accent);
  font-size: 1rem;
}

@media (max-width: 1024px) {
  .hero-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-card img {
    height: 190px;
  }
}

.overview-card {
  background: var(--bg-elevated);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid var(--border);
}

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

.card-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  border-radius: var(--radius-md);
  background: var(--accent);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
  margin-bottom: var(--spacing-md);
}

.overview-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.overview-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* Diagram Container — stays light so Mermaid renders correctly */
.diagram-container {
  background: var(--bg-elevated);
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin: var(--spacing-xxl) 0;
  border: 1px solid var(--border);
  outline: 1px solid var(--border-accent);
  outline-offset: 2px;
}

.diagram-title {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.mermaid {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.mermaid svg {
  max-width: 100%;
  height: auto;
}

.mermaid svg .flowchart-link,
.mermaid svg .edgePath path {
  stroke: #a1a1aa;
  stroke-width: 2px;
}

.mermaid svg marker path {
  fill: #a1a1aa;
}

.mermaid svg text {
  fill: #fafafa !important;
}

.mermaid svg .nodeLabel {
  color: #fafafa;
}

.mermaid svg .label {
  color: #fafafa;
}

/* Mermaid pre should not inherit code-block dark styles */
pre.mermaid {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-xxl);
}

.stat-item {
  text-align: center;
  padding: var(--spacing-lg);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.stat-item:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
}

.stat-number {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ===========================
   Features Section
   =========================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.feature-card {
  background: var(--bg-surface);
  backdrop-filter: blur(8px);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

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

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
  background: var(--accent-muted);
  border: 1px solid var(--border-accent);
  color: var(--accent-light);
  margin-bottom: var(--spacing-md);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.feature-list {
  list-style: none;
  padding-left: 0;
}

.feature-list li {
  padding: 0.35rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 0.8rem;
  top: 0.38rem;
}

.feature-list a,
.feature-card a,
.overview-card a {
  color: var(--accent-light);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-muted);
  transition:
    color 0.2s,
    border-color 0.2s;
}

.feature-list a:hover,
.feature-card a:hover,
.overview-card a:hover {
  color: #fff;
  border-bottom-color: var(--accent-light);
}

/* ===========================
   Architecture Section
   =========================== */

.architecture-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-xxl);
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.architecture-description p + p {
  margin-top: var(--spacing-sm);
}

.section-dark .architecture-description {
  color: var(--text-secondary);
}

.section-dark .architecture-description code {
  color: var(--accent-light);
  background: var(--accent-muted);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

.local-model-note {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: inset 3px 0 0 var(--accent-primary);
  text-align: left;
  overflow: hidden;
}

.local-model-note i {
  color: var(--accent-light);
  margin-top: 0.2rem;
}

.local-model-note p {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 0.98rem;
}

.section-dark .local-model-note {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow: inset 3px 0 0 #60a5fa;
}

.architecture-layers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xl);
}

.layer-card {
  background: var(--bg-elevated);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

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

.layer-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--accent-light);
  letter-spacing: -0.01em;
}

.layer-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.design-patterns {
  margin-top: var(--spacing-xxl);
  padding: var(--spacing-xl);
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.design-patterns h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.patterns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--spacing-sm);
}

.pattern-item {
  padding: var(--spacing-md);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border-left: 2px solid var(--accent);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pattern-item strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.pattern-item p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ===========================
   Quick Start Section
   =========================== */

.quick-start-steps {
  max-width: 900px;
  margin: 0 auto var(--spacing-xxl);
}

.step {
  display: flex;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.35);
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.prerequisites,
.example-usage {
  background: var(--bg-elevated);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  margin-top: var(--spacing-xl);
  border: 1px solid var(--border);
}

.prerequisites h3,
.example-usage h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.prerequisites ul {
  list-style: none;
  padding-left: 0;
}

.prerequisites li {
  padding: 0.4rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: var(--spacing-md);
  font-size: 0.9375rem;
}

.prerequisites li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ===========================
   Code Blocks — macOS Window Style
   =========================== */

code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #7dd3fc;
}

/* The outer wrapper acts as the macOS window frame */
.code-block-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-top: var(--spacing-sm);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* macOS title bar with traffic lights */
.code-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #1e1e2e 0%, #181825 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
}

.code-window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.code-window-dot--close {
  background: #ff5f57;
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.15);
}

.code-window-dot--minimize {
  background: #febc2e;
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.15);
}

.code-window-dot--maximize {
  background: #28c840;
  box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.15);
}

.code-window-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-right: 44px; /* offset for traffic lights so title appears centered */
}

/* The <pre> inside the wrapper */
.code-block-wrapper pre {
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-md);
  box-shadow: none;
}

/* Standalone <pre> not yet wrapped (fallback / mermaid) */
pre {
  background: #0d1117;
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 100%;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

pre code {
  display: block;
  width: max-content;
  min-width: 100%;
  color: #c9d1d9;
  line-height: 1.6;
  font-size: 0.85rem;
}

/* Copy button — positioned in the title bar area */
.copy-code-btn {
  position: absolute;
  top: 7px;
  right: 12px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-primary);
  transition: all var(--transition-base);
  backdrop-filter: blur(8px);
  z-index: 2;
}

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

.copy-code-btn.copied {
  background: var(--success-muted);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
}

.copy-code-btn.failed {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

/* ===========================
   Inline Code — Elegant Pill Style
   =========================== */

:not(pre) > code {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(139, 92, 246, 0.08) 100%
  );
  color: #93c5fd;
  padding: 0.15em 0.55em;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  border: 1px solid rgba(59, 130, 246, 0.18);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

:not(pre) > code:hover {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.16) 0%,
    rgba(139, 92, 246, 0.12) 100%
  );
  border-color: rgba(59, 130, 246, 0.3);
}

/* ===========================
   Workflows Section
   =========================== */

.workflow-table {
  overflow-x: auto;
  margin-bottom: var(--spacing-xxl);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

thead {
  background: var(--bg-muted);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

th {
  padding: var(--spacing-md);
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

td {
  padding: var(--spacing-md);
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

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

tbody td strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Agentic team table — text is already readable on dark bg */
#agentic-team .workflow-table tbody td,
#agentic-team .workflow-table tbody td strong {
  color: var(--text-secondary);
}

#agentic-team .workflow-table tbody td strong {
  color: var(--text-primary);
}

.custom-workflow {
  background: var(--bg-elevated);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  margin-top: var(--spacing-xl);
  border: 1px solid var(--border);
}

.custom-workflow h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.custom-workflow p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.workflow-diagram {
  margin-top: var(--spacing-xl);
}

.workflow-diagram h3 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

/* ===========================
   Documentation Section
   =========================== */

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xxl);
}

.doc-card {
  background: var(--bg-surface);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--border);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
  display: block;
}

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

.doc-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
  background: var(--accent-muted);
  border: 1px solid var(--border-accent);
  color: var(--accent-light);
  margin-bottom: var(--spacing-md);
}

.doc-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.doc-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.tech-stack {
  margin-top: var(--spacing-xxl);
}

.tech-stack h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.tech-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--spacing-md);
}

.tech-category {
  background: var(--bg-surface);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.tech-category:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
}

.tech-category h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--accent-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tech-category ul {
  list-style: none;
  padding-left: 0;
}

.tech-category li {
  padding: 0.3rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-fast);
}

.tech-category li:last-child {
  border-bottom: none;
}

.tech-category li:hover {
  color: var(--text-primary);
}

@media (max-width: 1100px) {
  .tech-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===========================
   Community Section
   =========================== */

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xxl);
}

.community-card {
  background: var(--bg-elevated);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
  text-align: center;
  border: 1px solid var(--border);
}

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

.community-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: var(--radius-md);
  color: var(--accent-light);
  background: var(--accent-muted);
  border: 1px solid var(--border-accent);
  margin-bottom: var(--spacing-md);
}

.community-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.community-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.55;
}

.community-link {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.community-link:hover {
  color: var(--text-primary);
}

.contribution-steps {
  background: var(--bg-elevated);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-xl);
  border: 1px solid var(--border);
}

.contribution-steps h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.contribution-steps ol {
  padding-left: var(--spacing-lg);
}

.contribution-steps li {
  padding: 0.375rem 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.acknowledgments {
  text-align: center;
}

.acknowledgments h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

/* Marquee — infinite scrolling built-with pills */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.marquee-track {
  display: flex;
  gap: 0.6rem;
  width: max-content;
  animation: marquee-scroll 45s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-track span {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast),
    background var(--transition-fast);
  cursor: default;
}

.marquee-track span:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  background: var(--accent-muted);
}

/* Legacy .tools-list kept for any other usage */
.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.tools-list span {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.3rem var(--spacing-sm);
  border-radius: 50px;
  font-size: 0.8125rem;
  font-weight: 500;
  transition:
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.tools-list span:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ===========================
   Demo Section
   =========================== */

.demo-container {
  max-width: 1000px;
  margin: 0 auto;
}

.demo-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.demo-tab {
  padding: 0.5rem var(--spacing-md);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-primary);
}

.demo-tab:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.demo-tab.active {
  background: var(--accent-muted);
  border-color: var(--border-accent);
  color: var(--accent-light);
  font-weight: 600;
}

.demo-content {
  background: var(--bg-surface);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.demo-panel {
  display: none;
}

.demo-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.demo-panel h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.demo-panel ul {
  list-style: none;
  padding-left: 0;
  margin: var(--spacing-md) 0;
}

.demo-panel li {
  padding: 0.35rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: var(--spacing-md);
  font-size: 0.9375rem;
}

.demo-panel li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1.1;
}

.ui-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.ui-feature {
  background: var(--bg-elevated);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  border-left: 2px solid var(--accent);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ui-feature strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.ui-feature p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ===========================
   CTA Section
   =========================== */

.cta-section {
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 50%,
      rgba(59, 130, 246, 0.14) 0%,
      transparent 70%
    ),
    var(--bg-base);
  color: var(--text-primary);
  text-align: center;
  padding: var(--spacing-xxl) var(--spacing-md);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-section h2 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.025em;
}

.cta-section p {
  font-size: 1.0625rem;
  margin-bottom: var(--spacing-xl);
  color: var(--text-secondary);
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================
   Footer
   =========================== */

.footer {
  background: #07070a;
  color: var(--text-secondary);
  padding: var(--spacing-xxl) var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-section p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
  padding-left: 0;
}

.footer-section li {
  padding: 0.3rem 0;
}

.footer-section a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.footer-version {
  margin-top: var(--spacing-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  margin: 0.375rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

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

.footer-heart {
  color: #f87171;
  margin: 0 0.2rem;
}

/* ===========================
   Animations
   =========================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   Scroll Reveal
   =========================== */

.reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, var(--reveal-distance), 0);
  filter: blur(2px);
  transition:
    opacity var(--reveal-duration) var(--reveal-ease) var(--reveal-delay, 0ms),
    transform var(--reveal-duration) var(--reveal-ease) var(--reveal-delay, 0ms),
    filter var(--reveal-duration) var(--reveal-ease) var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 1240px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background: rgba(9, 9, 11, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    gap: 1.1rem;
    padding: var(--spacing-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border);
    transition: left var(--transition-base);
    align-items: flex-start;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-link::after {
    bottom: 0;
    left: -10px;
    width: 2px;
    height: 0;
  }

  .nav-link:hover::after,
  .nav-link.active::after {
    width: 2px;
    height: 100%;
  }

  .hamburger {
    display: flex;
  }

  /* Hide dropdown wrapper, show all links flat */
  .nav-dropdown,
  .nav-dropdown-menu,
  .nav-dropdown-menu-inner {
    display: contents;
  }

  .nav-dropdown-toggle {
    display: none;
  }

  .nav-dropdown-menu .nav-link {
    padding: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
  }

  .nav-dropdown-menu .nav-link:hover {
    background: transparent;
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    display: contents;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .section {
    padding: var(--spacing-xl) var(--spacing-sm);
  }

  .hero {
    min-height: 80vh;
    padding: var(--spacing-xl) var(--spacing-md);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-highlights {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-grid,
  .features-grid,
  .architecture-layers {
    grid-template-columns: 1fr;
  }

  .tech-categories {
    grid-template-columns: 1fr;
  }

  .step {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .step-content {
    width: 100%;
  }

  .quick-start-steps {
    max-width: 100%;
  }

  .step-content pre,
  .step-content .code-block-wrapper,
  .step-content .code-block-wrapper pre {
    width: 100%;
  }

  .demo-tabs {
    flex-direction: column;
  }

  .demo-tab {
    width: 100%;
  }

  table {
    font-size: 0.875rem;
  }

  th,
  td {
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .copy-code-btn {
    top: 8px;
    right: 8px;
  }

  .code-window-bar {
    padding: 10px 14px;
    gap: 6px;
  }

  .code-window-dot {
    width: 10px;
    height: 10px;
  }

  .code-window-title {
    margin-right: 36px;
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .step-number {
    width: 44px;
    height: 44px;
    font-size: 1.125rem;
  }

  pre {
    padding: var(--spacing-sm);
  }

  .copy-code-btn {
    padding: 3px 7px;
    font-size: 0.7rem;
  }

  .code-window-dot {
    width: 9px;
    height: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none !important;
  }

  .badge,
  .hero-title,
  .hero-subtitle,
  .hero-buttons,
  .tech-badges {
    animation: none;
  }

  .hero-marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-marquee-container {
    animation: none;
  }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
  .navbar,
  .hero-buttons,
  .cta-section,
  .footer {
    display: none;
  }

  body {
    font-size: 12pt;
    background: #fff;
    color: #000;
  }

  .section {
    page-break-inside: avoid;
  }
}
