:root {
  --font-sans: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --site-bg-base: #001a30;
  --site-bg-fallback:
    radial-gradient(circle at 82% 14%, rgba(106, 155, 209, 0.12), transparent 14%),
    radial-gradient(circle at 20% 30%, rgba(106, 155, 209, 0.05), transparent 28%),
    radial-gradient(circle at 80% 52%, rgba(0, 53, 102, 0.08), transparent 24%),
    radial-gradient(circle at 50% 82%, rgba(106, 155, 209, 0.04), transparent 22%),
    linear-gradient(180deg, #001a30 0%, #001228 62%, #001020 100%);
}

html {
  color-scheme: dark;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  background-color: var(--site-bg-base);
  background-image: var(--site-bg-fallback);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100000;
  padding: 10px 14px;
  border: 1px solid rgba(106, 155, 209, 0.34);
  background: rgba(0, 18, 40, 0.96);
  color: var(--text, #f4f8fe);
  text-decoration: none;
  letter-spacing: 0.04em;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

#bg-canvas {
  background:
    radial-gradient(circle at 82% 14%, rgba(106, 155, 209, 0.08), transparent 18%),
    linear-gradient(180deg, #001a30 0%, #001228 100%);
}

img {
  max-width: 100%;
  height: auto;
}

a,
button,
input,
select,
textarea {
  touch-action: manipulation;
}

a,
button {
  -webkit-tap-highlight-color: rgba(106, 155, 209, 0.18);
}

:focus-visible {
  outline: 2px solid var(--moonlight, #6a9bd1);
  outline-offset: 3px;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal.visible {
    opacity: 1 !important;
    transform: none !important;
  }

  #bg-canvas {
    display: none;
  }
}

#home-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(106, 155, 209, 0.2);
  border-radius: 50%;
  background: rgba(106, 155, 209, 0.1);
  color: var(--moonlight, #6a9bd1);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

#home-btn svg {
  width: 24px;
  height: 24px;
}

#home-btn:hover,
#home-btn:focus-visible {
  transform: scale(1.08);
  background: rgba(106, 155, 209, 0.18);
  border-color: rgba(106, 155, 209, 0.38);
  box-shadow: 0 0 30px rgba(106, 155, 209, 0.2), 0 4px 25px rgba(0, 0, 0, 0.4);
}

@media (max-width: 600px) {
  #home-btn {
    right: 20px;
    bottom: 20px;
    width: 48px;
    height: 48px;
  }

  #home-btn svg {
    width: 20px;
    height: 20px;
  }
}
