:root {
  --transition-fast: 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  position: relative;
  background: var(--gradient-hero);
  color: var(--fg);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(circle at 14% 16%, rgba(31, 180, 231, 0.12), transparent 24%),
    radial-gradient(circle at 82% 10%, rgba(76, 135, 255, 0.12), transparent 26%),
    radial-gradient(circle at 50% 72%, rgba(41, 197, 155, 0.05), transparent 22%);
  filter: blur(8px);
}

body::after {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 28%, transparent 92%);
  -webkit-mask-image: radial-gradient(circle at center, black 28%, transparent 92%);
  opacity: 0.55;
}

::selection {
  background: color-mix(in srgb, var(--accent-cyan) 26%, transparent);
  color: var(--fg);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-cyan) 72%, white);
  outline-offset: 3px;
}

.section {
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
}

[data-theme='dark'] body {
  background: var(--gradient-hero);
}

[data-theme='dark'] body::after {
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
