/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  color: #1e3a5f;
  background-color: #fefdf8;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ===== NAVBAR ===== */
#navbar {
  height: 72px;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #facc15;
  border-radius: 1px;
  transition: width 0.3s ease;
}

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

.nav-link:hover {
  color: #facc15;
}

/* Mobile menu hamburger animation */
#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-link {
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.mobile-link:hover {
  background-color: rgba(250, 204, 21, 0.1);
}

/* ===== HERO ===== */
#hero {
  position: relative;
}

#hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, #fefdf8, transparent);
  pointer-events: none;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Default state: hidden for below-fold reveals (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #9fb3c8;
}

/* ===== FORM FOCUS ===== */
input:focus,
textarea:focus {
  outline: none;
}

/* ===== SELECTION ===== */
::selection {
  background-color: #facc15;
  color: #102a43;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
  #hero h1 {
    font-size: 2.25rem;
  }

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

@media (max-width: 767px) {
  #about .absolute {
    display: none;
  }
}
