:root {
  --bg-primary: #030712;
  --bg-secondary: #0b1120;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-card: rgba(56, 189, 248, 0.2);
  --border-card-hover: rgba(56, 189, 248, 0.45);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #00f0ff;
  --accent-blue: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-violet: #a855f7;
  --accent-magenta: #ec4899;
  
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  line-height: 1.6;
}

/* Fixed WebGL Canvas */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

/* Ambient Cyber Glow Backgrounds */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  transition: opacity 1s ease;
}

.glow-1 {
  top: 15%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.35) 0%, rgba(99, 102, 241, 0.1) 70%, transparent 100%);
}

.glow-2 {
  bottom: 20%;
  right: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, rgba(236, 72, 153, 0.08) 70%, transparent 100%);
}

/* Back to Gallery Floating Button */
.back-to-gallery {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 9999px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}

.back-to-gallery:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  transform: translateX(-3px);
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.back-arrow {
  transition: transform 0.3s ease;
}

.back-to-gallery:hover .back-arrow {
  transform: translateX(-3px);
}

/* HUD Navigation & Rotation Controller */
.control-hud {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  backdrop-filter: blur(20px);
  border-radius: 9999px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.15);
  transition: var(--transition-smooth);
}

.hud-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hud-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.hud-progress-bar {
  width: 90px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.hud-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
  border-radius: 2px;
  transition: width 0.1s linear;
}

.hud-buttons {
  display: flex;
  gap: 6px;
}

.hud-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.hud-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.hud-btn-active {
  background: rgba(0, 240, 255, 0.25);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.hud-btn-accent {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(0, 240, 255, 0.3));
  border-color: rgba(168, 85, 247, 0.5);
  color: #f1f5f9;
}

.hud-btn-accent:hover {
  border-color: var(--accent-violet);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  z-index: 50;
  padding: 0 48px 0 220px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(3, 7, 18, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 10px var(--accent-cyan));
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: #fff;
}

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

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

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

.nav-cta {
  background: linear-gradient(135deg, #00f0ff 0%, #818cf8 100%);
  color: #030712;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 18px;
  border-radius: 9999px;
  text-decoration: none;
  transition: var(--transition-smooth);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
}

/* Focus Mode */
body.focus-mode .glass-card {
  opacity: 0.08;
  pointer-events: none;
  transform: scale(0.96);
}

body.focus-mode .hero-content {
  opacity: 0.08;
  pointer-events: none;
}

/* Scroll Sections */
main {
  position: relative;
  z-index: 10;
}

.scroll-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 48px;
  position: relative;
}

.container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.hero-content {
  max-width: 520px;
}

.right-aligned {
  display: flex;
  justify-content: flex-end;
}

.center-aligned {
  display: flex;
  justify-content: center;
}

/* Glassmorphism Feature Card */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-violet), transparent);
}

.feature-card {
  max-width: 540px;
}

.glass-card:hover {
  border-color: var(--border-card-hover);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 240, 255, 0.15);
}

/* Typography & Badges */
.badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.step-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  color: #fff;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  color: #fff;
}

.gradient-text {
  background: linear-gradient(135deg, #00f0ff 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-desc, .section-desc {
  font-size: 1.02rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Design Element Annotation Box */
.design-annotation {
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 16px 20px;
  margin-top: 20px;
}

.annotation-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.annotation-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 2px 8px;
  border-radius: 6px;
}

.annotation-target {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
}

.annotation-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.annotation-desc strong {
  color: var(--accent-cyan);
}

/* Spec List Grid */
.spec-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.spec-item {
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.spec-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.spec-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Buttons */
.btn-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #818cf8 100%);
  color: #030712;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

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

/* Scroll Hint */
.scroll-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.mouse-icon {
  width: 22px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  position: relative;
}

.mouse-icon .wheel {
  width: 3px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouse-wheel 1.6s infinite;
}

@keyframes mouse-wheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* Responsive */
@media (max-width: 992px) {
  .scroll-section {
    padding: 80px 24px;
  }
  
  .navbar {
    padding: 16px 24px;
  }
  
  .nav-links {
    display: none;
  }
  
  .control-hud {
    bottom: 16px;
    padding: 8px 16px;
    width: 92%;
    justify-content: space-between;
    overflow-x: auto;
  }
  
  .hud-progress-bar {
    display: none;
  }
}
