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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* ===== NAVBAR SCROLL EFFECT ===== */
#navbar.scrolled {
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(45, 90, 61, 0.08);
}

.nav-link {
  position: relative;
}

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

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

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

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

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

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal.revealed {
    opacity: 1;
    transform: none;
  }

  .group img {
    transition: none;
  }

  .group:hover img {
    transform: none;
  }
}

/* ===== SUBTLE PATTERN OVERLAY ===== */
#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(45, 90, 61, 0.03) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(143, 184, 146, 0.7);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(45, 90, 61, 0.15);
  color: #1c3826;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #8fb892;
}
