/* CSS Custom Property for animating gradient angle */
@property --light-angle {
  syntax: '<angle>';
  initial-value: 90deg;
  inherits: false;
}

@font-face {
  font-family: 'Quaker';
  src: url('assets/fonts/Quaker FREE.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg-primary: #0d0d0d;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --bg-card: #1e1e1e;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --accent-lime: #c8ff00;
  --accent-coral: #ff6b4a;
  --accent-purple: #a78bfa;
  --accent-teal: #2dd4bf;
  --gradient-rainbow: linear-gradient(135deg, #c8ff00, #2dd4bf, #a78bfa, #ff6b4a);
  --font-display: 'Quaker', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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.03;
  pointer-events: none;
  z-index: 1000;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  mask: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  -webkit-mask: linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
  z-index: -1;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  transform: translateY(2px);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(
    145deg,
    #0d1f2d 0%,
    #1a3a4a 20%,
    #2d5a5a 40%,
    #3d7a6a 55%,
    #4a9a7a 70%,
    #6bc4a0 85%,
    #8ae4b0 100%
  );
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

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

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

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.nav-dropdown-trigger svg {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Search trigger button */
.nav-search-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.nav-search-trigger:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.nav-search-trigger svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-search-placeholder {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.nav-search-kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Animated background trails */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

/* ========================================
    ATMOSPHERE SYSTEM
    ======================================== */

.atmosphere {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* --- LAYER 1: Static star field (dimmable) --- */
.stars-static {
  position: absolute;
  width: 100%;
  height: 200%;
  top: 0;
  left: 0;
  transition: opacity 0.8s ease;
}

.star-static {
  position: absolute;
  width: 1px;
  height: 1px;
  background: white;
  border-radius: 50%;
  opacity: 0.4;
}

.star-static.bright {
  width: 2px;
  height: 2px;
  opacity: 0.6;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
}

/* --- LAYER 2: Twinkling stars (sparse) --- */
.stars-twinkle {
  position: absolute;
  width: 100%;
  height: 200%;
  top: 0;
  left: 0;
}

.star-twinkle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle var(--twinkle-duration, 4s) ease-in-out infinite;
  animation-delay: var(--twinkle-delay, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.8; transform: scale(1.2); }
}

/* --- LAYER 3: Floating color blurs --- */
.blurs-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.color-blur {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.2;
  transition: background-color 0.8s ease;
  will-change: transform, background-color;
}

.blur-1 {
  width: 500px;
  height: 500px;
  top: 5%;
  left: 10%;
  background-color: var(--accent-lime);
}

.blur-2 {
  width: 450px;
  height: 450px;
  top: 30%;
  right: 5%;
  background-color: var(--accent-purple);
}

.blur-3 {
  width: 400px;
  height: 400px;
  bottom: 20%;
  left: 25%;
  background-color: var(--accent-teal);
}

.blur-4 {
  width: 350px;
  height: 350px;
  top: 50%;
  left: 50%;
  background-color: var(--accent-coral);
  opacity: 0.15;
}

/* --- LAYER 4: Spark stars (content punctuation) --- */
.star-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  box-shadow:
    0 0 6px 2px rgba(255, 255, 255, 0.8),
    0 0 12px 4px rgba(200, 255, 0, 0.4);
  transform: scale(0);
}

.star-spark.sparked {
  animation: spark-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.star-spark.sparked.fade {
  animation: spark-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
              spark-settle 0.4s ease 0.5s forwards;
}

@keyframes spark-in {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.5) rotate(180deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(360deg);
  }
}

@keyframes spark-settle {
  to {
    opacity: 0.6;
    box-shadow:
      0 0 3px 1px rgba(255, 255, 255, 0.5),
      0 0 6px 2px rgba(200, 255, 0, 0.2);
  }
}

/* Spark variations for visual interest */
.star-spark.accent-purple {
  box-shadow:
    0 0 6px 2px rgba(255, 255, 255, 0.8),
    0 0 12px 4px rgba(167, 139, 250, 0.5);
}

.star-spark.accent-teal {
  box-shadow:
    0 0 6px 2px rgba(255, 255, 255, 0.8),
    0 0 12px 4px rgba(45, 212, 191, 0.5);
}

.star-spark.accent-coral {
  box-shadow:
    0 0 6px 2px rgba(255, 255, 255, 0.8),
    0 0 12px 4px rgba(255, 107, 74, 0.5);
}

/* Sparkable elements marker */
[data-spark] {
  position: relative;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge span {
  color: var(--accent-lime);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero h1 .highlight {
  background: var(--gradient-rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.35rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-weight: 300;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-lime);
  color: var(--bg-primary);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(200, 255, 0, 0.3);
}

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

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Install command */
.install-cmd {
  margin-top: 3rem;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.install-cmd code {
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.install-cmd code span {
  color: var(--accent-coral);
}

.install-cmd .copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

.install-cmd .copy-btn:hover {
  color: var(--text-primary);
}

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

/* Features Section */
.features {
  padding: 8rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-lime);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 4rem;
  max-width: 600px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-rainbow);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card:nth-child(1) .feature-icon {
  background: rgba(200, 255, 0, 0.15);
}

.feature-card:nth-child(2) .feature-icon {
  background: rgba(167, 139, 250, 0.15);
}

.feature-card:nth-child(3) .feature-icon {
  background: rgba(45, 212, 191, 0.15);
}

.feature-card:nth-child(4) .feature-icon {
  background: rgba(255, 107, 74, 0.15);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

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

/* Code Demo Section */
.demo {
  padding: 8rem 2rem;
  background: var(--bg-secondary);
  position: relative;
}

.demo-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 900px) {
  .demo-container {
    grid-template-columns: 1fr;
  }
}

.demo-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}

.demo-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.demo-features {
  list-style: none;
}

.demo-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  position: relative;
  padding-left: 1.5rem;
}

.demo-features li .list-star {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, white 0%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 1s ease-out, box-shadow 1.5s ease-out;
}

.demo-features li .list-star.visible {
  opacity: 1;
  box-shadow:
    0 0 6px 1px var(--glow-color, rgba(200, 255, 0, 0.5)),
    0 0 12px 2px var(--glow-color, rgba(200, 255, 0, 0.2));
}

/* Subtle pulse after appearing */
.demo-features li .list-star.visible {
  animation: star-breathe 4s ease-in-out 1s infinite;
}

@keyframes star-breathe {
  0%, 100% {
    box-shadow:
      0 0 6px 1px var(--glow-color, rgba(200, 255, 0, 0.5)),
      0 0 12px 2px var(--glow-color, rgba(200, 255, 0, 0.2));
  }
  50% {
    box-shadow:
      0 0 8px 2px var(--glow-color, rgba(200, 255, 0, 0.6)),
      0 0 16px 4px var(--glow-color, rgba(200, 255, 0, 0.3));
  }
}

/* Spark period styling */
.spark-period {
  display: inline-block;
  opacity: 0;
  position: relative;
  transition: opacity 0.8s ease-out, text-shadow 1.2s ease-out;
}

.spark-period.sparked {
  opacity: 1;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(200, 255, 0, 0.2);
  animation: period-settle 2s ease-out 0.8s forwards;
}

@keyframes period-settle {
  to {
    text-shadow: none;
  }
}

/* Terminal mockup */
.terminal {
  background: var(--bg-primary);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-header {
  background: var(--bg-tertiary);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.terminal-line {
  margin-bottom: 0.5rem;
}

.terminal-prompt {
  color: var(--accent-lime);
}

.terminal-cmd {
  color: var(--text-primary);
}

.terminal-comment {
  color: var(--text-muted);
}

.terminal-output {
  color: var(--text-secondary);
}

.terminal-success {
  color: var(--accent-teal);
}

.terminal-accent {
  color: var(--accent-coral);
}

/* Languages Section */
.languages {
  padding: 8rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.languages h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.languages > p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 4rem;
}

.lang-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.lang-pill {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.lang-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  padding: 1px;
  background: conic-gradient(
    from var(--light-angle, 200deg),
    transparent 120deg,
    rgba(255, 255, 255, 0.5) 175deg,
    rgba(255, 255, 255, 0.6) 180deg,
    rgba(255, 255, 255, 0.5) 185deg,
    transparent 240deg
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  opacity: 0;
  pointer-events: none;
}

.lang-pill.shining::before {
  animation: light-catch 0.8s ease-out forwards;
}

@keyframes light-catch {
  0% {
    --light-angle: 180deg;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    --light-angle: 300deg;
    opacity: 0;
  }
}

/* Fallback for browsers that don't support @property */
.lang-pill:hover {
  border-color: var(--accent-lime);
  color: var(--text-primary);
}

/* CTA Section */
.cta {
  padding: 8rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: var(--gradient-rainbow);
  filter: blur(150px);
  opacity: 0.1;
  border-radius: 50%;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

.cta p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

/* Footer */
footer {
  padding: 3rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

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

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

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

/* Responsive */
@media (max-width: 768px) {
  nav {
    padding: 1rem;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 6rem 1.5rem 3rem;
  }

  .install-cmd code {
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
  }

  .features, .languages, .cta {
    padding: 5rem 1.5rem;
  }

  .demo {
    padding: 5rem 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    order: -1;
  }

  .nav-search-trigger {
    padding: 0.4rem 0.6rem;
  }

  .nav-search-placeholder,
  .nav-search-kbd {
    display: none;
  }
}

/* ========================================
   SEARCH MODAL
   ======================================== */

.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.search-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.search-modal {
  width: 100%;
  max-width: 600px;
  max-height: 70vh;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.2s ease;
}

.search-modal-overlay.open .search-modal {
  transform: translateY(0) scale(1);
}

.search-modal-input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-modal-input-wrapper svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-modal-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.1rem;
}

.search-modal-input::placeholder {
  color: var(--text-muted);
}

.search-modal-esc {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.search-modal-results {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-results-group {
  margin-bottom: 0.5rem;
}

.search-results-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 0.75rem;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.search-result:hover,
.search-result.selected {
  background: rgba(255, 255, 255, 0.05);
}

.search-result.selected {
  background: rgba(200, 255, 0, 0.1);
  outline: 1px solid rgba(200, 255, 0, 0.3);
}

.search-result-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  flex-shrink: 0;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.search-result-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-no-results {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-result-description mark {
  background: rgba(200, 255, 0, 0.25);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}

.search-modal-footer {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-modal-footer kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  margin-right: 0.35rem;
}

/* Scrollbar styling for results */
.search-modal-results::-webkit-scrollbar {
  width: 6px;
}

.search-modal-results::-webkit-scrollbar-track {
  background: transparent;
}

.search-modal-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.search-modal-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
  .search-modal-overlay {
    padding: 1rem;
    padding-top: 10vh;
  }

  .search-modal {
    max-height: 80vh;
    border-radius: 12px;
  }

  .search-modal-footer {
    display: none;
  }
}