*, *::before, *::after {
  box-sizing: border-box;
}

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Select arrow */
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='%2394a3b8' 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 1rem center;
  padding-right: 2.5rem !important;
}

/* Date input styling */
input[type="date"] {
  color-scheme: dark;
}

/* Scroll reveal base — progressive enhancement, hidden by default */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.reveal-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-grid .reveal:nth-child(2) { transition-delay: 100ms; }
.reveal-grid .reveal:nth-child(3) { transition-delay: 200ms; }
.reveal-grid .reveal:nth-child(4) { transition-delay: 300ms; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .animate-pulse {
    animation: none;
  }
}

/* Mobile menu animation */
#mobileMenu {
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar solid background when scrolled */
nav.scrolled {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Geometric accent shapes */
.geo-shape {
  position: absolute;
  pointer-events: none;
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* Smooth image loading */
img {
  loading: lazy;
  decoding: async;
}
