  /* Custom styles beyond Tailwind */

  html {
    scroll-behavior: smooth;
  }

  /* Smooth scroll offset for fixed navbar */
  section[id] {
    scroll-margin-top: 80px;
  }

  /* Scroll reveal base state — visible by default (progressive enhancement) */
  .scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  /* Animated state applied via JS for below-fold only */
  @media (prefers-reduced-motion: no-preference) {
    .scroll-reveal[data-revealed="false"] {
      opacity: 0;
      transform: translateY(30px);
    }
  }

  /* Fallback: if JS doesn't run, content is fully visible */
  .scroll-reveal {
    opacity: 1;
    transform: translateY(0);
  }

  /* Navbar transparent → solid transition */
  #navbar.scrolled {
    background: rgba(38, 12, 44, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  }

  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }
  ::-webkit-scrollbar-track {
    background: #faf5fb;
  }
  ::-webkit-scrollbar-thumb {
    background: #d4b5e0;
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #b88ccf;
  }

  /* Selection color */
  ::selection {
    background: #d4b5e0;
    color: #260c2c;
  }

  /* Mobile menu animation */
  #mobileMenu {
    animation: slideDown 0.3s ease;
  }
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Image lazy loading fade */
  img {
    transition: opacity 0.3s ease;
  }

  /* Focus visible for accessibility */
  *:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
  }
