/* Base & Utilities */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scroll-reveal base state — content is VISIBLE by default */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Progressive enhancement: animate only when JS adds the class */
.reveal.animated {
  opacity: 0;
  transform: translateY(24px);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal.animated {
    opacity: 0;
    transform: translateY(24px);
  }
  .reveal.animated.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(254, 253, 248, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #059669;
  transition: width 0.2s ease;
}

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

/* Mobile link styles */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #d1fae5;
}

.mobile-link:last-child {
  border-bottom: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #6ee7b7;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #34d399;
}

/* Selection color */
::selection {
  background: #a7f3d0;
  color: #064e3b;
}
