  /* Base & Utilities */
  *, *::before, *::after {
    box-sizing: border-box;
  }

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

  body {
    overflow-x: hidden;
  }

  /* Scroll indicator animation */
  @keyframes scrollIndicator {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
  }

  .animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
  }

  /* Mobile menu transitions */
  #mobileMenu.open {
    opacity: 1;
    pointer-events: all;
  }

  #mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
  }

  /* Hamburger animation */
  #menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  #menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
  }

  #menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 5rem;
  }

  /* Navbar background on scroll */
  #nav.scrolled {
    background: rgba(10, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  }

  /* Scroll reveal (progressive enhancement — only active with JS) */
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }

  /* Mobile link transitions */
  .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
  }

  #mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
  }

  #mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
  #mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
  #mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
  #mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
  #mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .animate-scroll-indicator { animation: none; opacity: 1; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  }

  /* Selection color */
  ::selection {
    background: rgba(74, 222, 128, 0.3);
    color: #f0fdf4;
  }

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

  ::-webkit-scrollbar-track {
    background: #0a1a2e;
  }

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

  ::-webkit-scrollbar-thumb:hover {
    background: #486581;
  }
