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

body {
  overflow-x: hidden;
}

::selection {
  background: #5eead4;
  color: #0d1b2a;
}

/* ── Nav Links ── */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #5eead4;
  transition: all 0.2s ease;
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-link:hover::after {
  width: 60%;
}

/* ── Mobile Nav Links ── */
.mobile-nav-link {
  display: block;
}

/* ── Reveal Animations (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Default visible state for reduced-motion or no-JS */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* No-JS fallback: everything visible */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ── Back to Top ── */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#back-to-top {
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top:hover {
  transform: translateY(-2px) !important;
}

/* ── Form Styles ── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── Focus Visible ── */
:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Smooth Scroll Offset for Fixed Nav ── */
section[id] {
  scroll-margin-top: 80px;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f0fdf8;
}

::-webkit-scrollbar-thumb {
  background: #0d1b2a;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1e2d48;
}
