/* KYA-OS Site Styles - Minimal, Dark, Geometric */

:root {
  --bg: #0a0a0a;
  --fg: #e0e0e0;
  --muted: #666666;
  --accent: #ffffff;
  --grid: #1a1a1a;
}

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

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=JetBrains+Mono:wght@400;600;700&display=swap");

body {
  font-family:
    "Space Grotesk",
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle grid background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

h2 {
  margin-top: 48px;
  margin-bottom: 24px;
}

h2:first-of-type {
  margin-top: 0;
}

section {
  margin-bottom: 48px;
}

section p {
  margin-bottom: 16px;
  line-height: 1.8;
}
/* Version number */
.version {
  position: fixed;
  top: 20px;
  right: 20px;
  font-family: "JetBrains Mono", "SF Mono", "Monaco", monospace;
  font-size: 12px;
  color: var(--muted);
  z-index: 100;
}

/* Home page layout */
.home {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: pointer;
}

#fluid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: none; /* Hide 3D scene, show only fluid */
}

/* Shape labels */
.shape-label {
  position: absolute;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  z-index: 3;
  transform: translateY(10px);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.shape-label.active {
  opacity: 1;
  transform: translateY(0);
}

.shape-label::before {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 5px var(--accent);
}

.content {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

/* h1, .tagline, .main-nav, .nav-link styles are in the animations section below */

/* Spec pages */
.spec-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 40px 120px;
  position: relative;
  z-index: 1;
}

.spec-header {
  margin-bottom: 80px;
}

.spec-header h1 {
  font-family: "JetBrains Mono", monospace;
  font-size: 48px;
  margin-bottom: 16px;
  /* Start with invisible text - JS will animate in */
  visibility: hidden;
}

.spec-header h1.animate-ready {
  visibility: visible;
}

.spec-version {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

.spec-intro {
  font-size: 18px;
  color: var(--fg);
  margin-bottom: 60px;
  line-height: 1.9;
  /* Start hidden - JS animates in */
  opacity: 0;
  transform: translateY(10px);
}

.spec-intro.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
}

.spec-links {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.spec-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.spec-link:hover {
  color: var(--accent);
}

.spec-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.spec-nav-item {
  display: block;
  padding: 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--grid);
  color: var(--fg);
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.4s ease-out,
    transform 0.4s ease-out;
  /* Start hidden - JS animates in */
  opacity: 0;
  transform: translateY(15px);
}

.spec-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--muted);
}


.spec-nav-item h3 {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--accent);
}

.spec-nav-item p {
  line-height: 1.6;
  margin-bottom: 0;
}

/* Code blocks */
pre {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--grid);
  padding: 24px;
  overflow-x: auto;
  margin: 24px 0 32px;
  line-height: 1.7;
}

code {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--fg);
}

/* Links */
a {
  color: var(--fg);
}

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

/* Back link */
.back-link {
  position: fixed;
  top: 20px;
  left: 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  z-index: 100;
}

.back-link:hover {
  color: var(--accent);
}

/* ============================================
   ANIMATIONS & UI ENHANCEMENTS
   Inspired by alien.js / space.js
   ============================================ */

/* Base content animation - starts hidden, animated by UIController */
.content {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.content.animated-in {
  opacity: 1;
  transform: translateY(0);
}

/* Spec page starts hidden, animated by PageInit.js */
.spec-page {
  opacity: 0;
}

.spec-page.visible {
  opacity: 1;
  transition: opacity 0.4s ease-out;
}

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

/* ============================================
   TITLE - Shuffle Reveal Effect
   ============================================ */
h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 72px;
  font-weight: 100;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  visibility: visible;
}

.title-letter {
  display: inline-block;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.title-letter.glitching {
  color: var(--muted);
  text-shadow:
    2px 0 var(--accent),
    -2px 0 #ff0040,
    0 0 10px rgba(255, 255, 255, 0.3);
}

.title-letter.revealed {
  animation: letterReveal 0.3s ease-out;
}

/* Homepage title - no vertical movement, just glow */
.home .title-letter.revealed {
  animation: letterRevealHome 0.3s ease-out;
}

@keyframes letterRevealHome {
  0% {
    opacity: 0.7;
    text-shadow: 0 0 20px var(--accent);
  }
  100% {
    opacity: 1;
    text-shadow: none;
  }
}

@keyframes letterReveal {
  0% {
    opacity: 0.7;
    transform: translateY(-5px);
    text-shadow: 0 0 20px var(--accent);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    text-shadow: none;
  }
}

/* ============================================
   NAV LINK - Letter Animation
   ============================================ */
.main-nav {
  display: flex;
  gap: 40px;
  justify-content: center;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s ease-out 0.3s,
    transform 0.6s ease-out 0.3s;
}

.main-nav.visible {
  opacity: 1;
  transform: translateY(0);
}

.nav-link {
  font-family: "JetBrains Mono", "SF Mono", "Monaco", monospace;
  font-size: 16px;
  color: var(--fg);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: none;
  transition: color 0.2s ease;
  position: relative;
  overflow: visible;
}

.nav-link-enhanced {
  display: inline-block;
}

.nav-letter {
  display: inline-block;
  transition:
    transform 0.3s ease-out,
    opacity 0.3s ease-out;
}

.nav-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left center;
}

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

/* Remove old ::after pseudo-element */
.nav-link::after {
  display: none;
}

/* ============================================
   GLITCH TEXT Effect
   ============================================ */
.glitching {
  animation: textGlitch 0.1s infinite;
}

@keyframes textGlitch {
  0%,
  100% {
    text-shadow:
      1px 0 #ff0040,
      -1px 0 #00ff88;
  }
  25% {
    text-shadow:
      -1px 0 #ff0040,
      1px 0 #00ff88;
  }
  50% {
    text-shadow:
      1px 0 #00ff88,
      -1px 0 #ff0040;
  }
  75% {
    text-shadow:
      0 1px #ff0040,
      0 -1px #00ff88;
  }
}

/* Tagline with subtle styling */
.tagline {
  font-size: 16px;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.tagline.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Philosophy line - subtle mission statement */
.philosophy {
  font-size: 13px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-weight: 400;
  margin-bottom: 60px;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.philosophy.visible {
  opacity: 0.6;
  transform: translateY(0);
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(100%);
}

.page-transition-overlay.active {
  pointer-events: all;
}

.transition-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
  pointer-events: none;
}

.transition-glitch {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 0, 64, 0.1) 25%,
    rgba(0, 255, 136, 0.1) 50%,
    rgba(0, 128, 255, 0.1) 75%,
    transparent 100%
  );
  animation: none;
}

.transition-glitch.active {
  opacity: 1;
  animation: glitchFlash 0.15s ease-out;
}

@keyframes glitchFlash {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0;
  }
  25% {
    transform: translateX(-5px);
    opacity: 1;
  }
  50% {
    transform: translateX(5px);
    opacity: 0.5;
  }
  75% {
    transform: translateX(-2px);
    opacity: 1;
  }
}

/* Fade transition (simpler) */
.fade-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.fade-transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================
   SCROLL SKEW Effect
   ============================================ */
[data-scroll-skew] {
  will-change: transform;
  transform-origin: center center;
}

/* ============================================
   VERSION NUMBER - Enhanced
   ============================================ */
.version {
  position: fixed;
  top: 20px;
  right: 20px;
  font-family: "JetBrains Mono", "SF Mono", "Monaco", monospace;
  font-size: 11px;
  color: var(--muted);
  z-index: 100;
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeInVersion 0.6s ease-out 2s forwards;
  cursor: default;
}

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

.version:hover {
  color: var(--accent);
}

/* ============================================
   ENHANCED SPEC NAV ITEMS
   ============================================ */
.spec-nav-item {
  position: relative;
  overflow: hidden;
}

/* Shimmer effect on hover - doesn't reverse on leave */
.spec-nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transform: translateX(-100%);
  pointer-events: none;
}

.spec-nav-item:hover::before {
  animation: shimmer 0.6s ease-out forwards;
}

/* Coming soon items - reduced opacity after animation completes */
.spec-nav-item.coming-soon {
  pointer-events: none;
}

.spec-nav-item.coming-soon h3,
.spec-nav-item.coming-soon p {
  opacity: 0.5;
}

/* Section labels - animated in with sequence */
.section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 28px;
  margin-top: 64px;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease-out,
    transform 0.4s ease-out;
}

.section-label:first-of-type {
  margin-top: 0;
}

.section-label.muted {
  color: var(--muted);
}

.section-label.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease-out,
    transform 0.4s ease-out;
}

.section-desc.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   DIAGRAM - Enforcement Surfaces
   ============================================ */
.diagram {
  margin: 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.diagram-top {
  display: flex;
  justify-content: center;
}

.diagram-box {
  border: 1px solid var(--muted);
  padding: 20px 32px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}

.diagram-box:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.diagram-box:hover .diagram-title,
.diagram-box:hover .diagram-subtitle,
.diagram-box:hover .diagram-label,
.diagram-box:hover .diagram-meta {
  color: var(--accent);
}

.diagram-primitives {
  min-width: 520px;
}

.diagram-title {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.diagram-subtitle {
  display: block;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.diagram-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 60px;
  position: relative;
}

.diagram-line-vertical {
  width: 1px;
  height: 20px;
  background: var(--muted);
}

.diagram-branches {
  display: flex;
  align-items: flex-start;
  position: relative;
}

.diagram-branch {
  width: 160px;
  height: 40px;
  position: relative;
}

/* Horizontal line across top */
.diagram-branches::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 160px);
  height: 1px;
  background: var(--muted);
}

/* Vertical lines down to boxes */
.diagram-branch::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: var(--muted);
}

.diagram-bottom {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.diagram-surface {
  min-width: 130px;
  padding: 20px 32px;
}

.diagram-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

.diagram-meta {
  display: block;
  font-size: 12px;
  color: var(--muted);
  transition: color 0.3s ease;
}

.diagram-link {
  text-decoration: none;
  cursor: pointer;
}

.diagram-disabled {
  cursor: default;
}

.diagram-disabled .diagram-meta {
  opacity: 0.5;
}

.diagram-disabled:hover {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.diagram-disabled:hover .diagram-label,
.diagram-disabled:hover .diagram-meta {
  color: inherit;
}

/* ============================================
   FLOW DIAGRAMS (MCP-I page)
   ============================================ */
.section-explainer {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 48px 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--grid);
  border-radius: 8px;
  margin-bottom: 32px;
}

.flow-actor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 100px;
}

.flow-icon {
  font-size: 48px;
  line-height: 1;
}

.flow-icon-svg {
  width: 48px;
  height: 48px;
  color: var(--muted);
}

.flow-icon-svg svg {
  width: 100%;
  height: 100%;
}

.flow-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}

.flow-sublabel {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.flow-arrows {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 200px;
}

.flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.flow-arrow-label {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.flow-arrow-line {
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
  color: var(--accent);
  letter-spacing: 4px;
}

.flow-arrow-right .flow-arrow-line {
  animation: arrowPulseRight 2s ease-in-out infinite;
}

.flow-arrow-left .flow-arrow-line {
  animation: arrowPulseLeft 2s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes arrowPulseRight {
  0%, 100% { opacity: 0.5; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(4px); }
}

@keyframes arrowPulseLeft {
  0%, 100% { opacity: 0.5; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(-4px); }
}

.flow-diagram-vertical {
  flex-direction: column;
  gap: 16px;
  padding: 32px 24px;
}

.flow-actor-small {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--fg);
}

.flow-icon-small {
  font-size: 20px;
}

.flow-actor-small code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent);
}

.flow-arrow-down {
  font-size: 20px;
  color: var(--grid);
  font-family: "JetBrains Mono", monospace;
}

/* Auth Flow - Compact vertical steps */
.auth-flow {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--grid);
  border-radius: 8px;
  margin-bottom: 24px;
}

.auth-step {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--muted);
}

.auth-icon svg {
  width: 100%;
  height: 100%;
}

.auth-icon-success {
  color: var(--accent);
}

.auth-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-desc {
  font-size: 14px;
  color: var(--muted);
}

.auth-desc code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: var(--accent);
}

.auth-connector {
  width: 1px;
  height: 20px;
  background: var(--grid);
  margin-left: 16px;
}

.auth-step-final .auth-label {
  color: var(--accent);
}

.code-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
  align-items: stretch;
}

.code-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.code-step pre {
  flex: 1;
  margin: 0;
  font-size: 13px;
}

.code-step-label {
  font-size: 13px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


@media (max-width: 768px) {
  .flow-diagram {
    flex-direction: column;
    gap: 16px;
    padding: 24px 16px;
  }
  
  .flow-arrows {
    min-width: auto;
    transform: rotate(90deg);
  }
  
  .code-comparison {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .diagram-bottom {
    flex-direction: column;
    gap: 16px;
  }

  .diagram-connector {
    height: 40px;
  }

  .diagram-branches {
    display: none;
  }

  .diagram-line-vertical {
    height: 40px;
  }

  .diagram-surface {
    min-width: 200px;
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ============================================
   CURSOR ENHANCEMENT
   ============================================ */
.canvas-container {
  cursor: crosshair;
}

/* Interactive elements get pointer */
a,
button,
[role="button"] {
  cursor: pointer;
}

/* ============================================
   SELECTION - Branded
   ============================================ */
::selection {
  background: var(--accent);
  color: var(--bg);
}

::-moz-selection {
  background: var(--accent);
  color: var(--bg);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 48px;
  }

  .main-nav {
    flex-direction: column;
    gap: 20px;
  }

  .spec-page {
    padding: 80px 24px 100px;
  }

  .spec-header {
    margin-bottom: 60px;
  }

  .spec-header h1 {
    font-size: 32px;
  }

  section {
    margin-bottom: 40px;
  }

  h2 {
    margin-top: 40px;
    margin-bottom: 20px;
  }

  pre {
    padding: 20px;
    font-size: 13px;
  }
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Info Panel - alien.js inspired bottom panel */
.info-panel {
  position: fixed;
  bottom: 40px;
  left: 40px;
  width: 400px;
  padding: 30px;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  z-index: 100;
}

.info-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Corner brackets */
.info-panel-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: opacity 0.4s ease 0.2s;
}

.info-panel.visible .info-panel-corner {
  opacity: 1;
}

.info-panel-corner-tl {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

.info-panel-corner-tr {
  top: -1px;
  right: -1px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

.info-panel-corner-bl {
  bottom: -1px;
  left: -1px;
  border-bottom: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

.info-panel-corner-br {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

/* Panel content */
.info-panel-content {
  opacity: 0;
  transition: opacity 0.4s ease 0.4s;
}

.info-panel.visible .info-panel-content {
  opacity: 1;
}

.info-panel-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.info-panel-description {
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  color: var(--fg);
  line-height: 1.6;
  margin-bottom: 20px;
}

.info-panel-button {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  padding: 10px 20px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.info-panel-button:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Responsive */
@media (max-width: 768px) {
  .info-panel {
    left: 20px;
    right: 20px;
    bottom: 20px;
    width: auto;
    padding: 20px;
  }
}
