  /* Base */
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
  body { margin: 0; }
  img { max-width: 100%; height: auto; display: block; }

  /* Scroll reveal base — content always visible by default */
  .reveal { opacity: 1; transform: none; }
  .reveal-sm { opacity: 1; transform: none; }

  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      opacity: 0;
      transform: translateY(32px);
      transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal-sm {
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.visible, .reveal-sm.visible {
      opacity: 1;
      transform: translateY(0);
    }
    /* Stagger children */
    .grid > :nth-child(1) .reveal-sm { transition-delay: 0.05s; }
    .grid > :nth-child(2) .reveal-sm { transition-delay: 0.1s; }
    .grid > :nth-child(3) .reveal-sm { transition-delay: 0.15s; }
    .grid > :nth-child(4) .reveal-sm { transition-delay: 0.2s; }
    .grid > :nth-child(5) .reveal-sm { transition-delay: 0.25s; }
    .grid > :nth-child(6) .reveal-sm { transition-delay: 0.3s; }
  }

  /* Navbar glass when scrolled */
  #navbar.scrolled {
    background: rgba(254, 253, 248, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 79, 70, 0.08);
  }

  /* Focus styles */
  a:focus-visible, button:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
  }

  /* Mobile nav transitions */
  #mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    opacity: 0;
  }
  #mobile-menu.open {
    max-height: 500px;
    opacity: 1;
  }

  /* Selection color */
  ::selection { background: #a7f3d0; color: #064e3b; }
</style>
