/* ── Base ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ── Nav scroll state ── */
#nav.scrolled {
  background: rgba(5, 19, 33, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#nav {
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

/* ── Hover scale helper ── */
a:hover {
  opacity: 1;
}

/* ── Scroll-reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
}

/* ── Focus styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2EC4B6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0A2540;
}
::-webkit-scrollbar-thumb {
  background: #354962;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #485A75;
}

/* ── Image transitions ── */
img {
  display: block;
  max-width: 100%;
}
