/* ==================== RESET & VARIABLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0e27;
  --bg-secondary: #111428;
  --bg-tertiary: #1a1f3a;
  --text-primary: #ffffff;
  --text-secondary: #a8adc5;
  --accent: #00d9ff;
  --accent-dark: #00a8cc;
  --border: #2a2f4e;
  --green: #00ff88;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --navbar-bg: rgba(10, 14, 39, 0.95);
}

html {
  scroll-behavior: smooth;
}

html, body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ==================== GLOBAL ANIMATED BACKGROUND ==================== */
/* Full-document layer (spans the whole page height, not just the
   viewport) that sits behind every section and scrolls naturally with
   the content, so the animated grid / orbs / scan-lines feel part of
   the page rather than glued to the viewport. */
.page-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-primary);
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image:
    linear-gradient(0deg, transparent 24%, rgba(0, 217, 255, 0.05) 25%, rgba(0, 217, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 217, 255, 0.05) 75%, rgba(0, 217, 255, 0.05) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(0, 217, 255, 0.05) 25%, rgba(0, 217, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 217, 255, 0.05) 75%, rgba(0, 217, 255, 0.05) 76%, transparent 77%, transparent);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
  opacity: 0.3;
}

.bg-gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  animation: orbFloat 12s ease-in-out infinite;
}

.bg-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.4) 0%, transparent 70%);
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.bg-orb-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.3) 0%, transparent 70%);
  top: 40%;
  left: -15%;
  animation-delay: 4s;
}

.bg-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.25) 0%, transparent 70%);
  bottom: -10%;
  right: 10%;
  animation-delay: 8s;
}

.bg-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
}

.bg-lines::before,
.bg-lines::after {
  content: '';
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.2), transparent);
  animation: slideLine 6s ease-in-out infinite;
}

.bg-lines::before {
  width: 100%;
  height: 2px;
  top: 25%;
  left: -100%;
  animation-delay: 0s;
}

.bg-lines::after {
  width: 100%;
  height: 2px;
  top: 75%;
  left: 100%;
  animation-delay: 3s;
}

/* ==================== SHARED KEYFRAMES ==================== */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

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

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(60px, 60px);
  }
}

@keyframes orbFloat {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(-30px) translateX(15px);
  }
}

@keyframes slideLine {
  0% {
    left: -100%;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

@keyframes backgroundShift {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes titleGradient {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

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

/* ==================== SHARED LAYOUT ==================== */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}
