:root {
  --color-base: #070b14;
  --color-base-alt: #0c1220;
  --color-surface: #101828;
  --color-accent: #2f5fff;
  --color-accent-2: #35e0c6;
  --color-ink: #e7ecf7;
  --color-muted: #93a1bd;
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-base);
  color: var(--color-ink);
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

.font-display {
  font-family: 'Syne', sans-serif;
  letter-spacing: -0.04em;
}

/* Nav owns its own fixed + z-50 stacking. Do not add position/z-index rules for #site-header elsewhere. */
#site-header {
  position: relative;
  z-index: 50;
}

/* Background orbs — scoped to .bg-orb only, never bare header/main/footer */
.bg-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.orb-blue {
  background: radial-gradient(circle, rgba(47, 95, 255, 0.35), transparent 70%);
}

.orb-teal {
  background: radial-gradient(circle, rgba(53, 224, 198, 0.25), transparent 70%);
}

.section-shell {
  position: relative;
  isolation: isolate;
}

/* Glass surface */
.glass {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-light {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(10, 15, 30, 0.06);
}

/* Layered, color-tinted shadows */
.shadow-layered {
  box-shadow:
    0 1px 2px rgba(3, 7, 18, 0.4),
    0 12px 24px -8px rgba(47, 95, 255, 0.25),
    0 32px 64px -16px rgba(47, 95, 255, 0.18);
}

.shadow-layered-teal {
  box-shadow:
    0 1px 2px rgba(3, 7, 18, 0.4),
    0 12px 24px -8px rgba(53, 224, 198, 0.2),
    0 32px 64px -16px rgba(53, 224, 198, 0.14);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-spring), transform 0.7s var(--ease-spring);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Nav link underline */
.nav-link {
  position: relative;
  transition: color 0.3s var(--ease-spring);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  transition: width 0.3s var(--ease-spring);
}

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

/* Mobile menu */
#mobile-menu {
  transition: max-height 0.4s var(--ease-spring), opacity 0.3s var(--ease-spring);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu.open {
  max-height: 640px;
  opacity: 1;
}

/* Dropdown */
.dropdown-panel {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease-spring), transform 0.25s var(--ease-spring);
}

.group:hover .dropdown-panel,
.group:focus-within .dropdown-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

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

.scrollbar-thin::-webkit-scrollbar {
  height: 6px;
}
