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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(110, 220, 184, 0.3);
    color: #0A2342;
}

/* Scroll reveal — progressive enhancement, only applies when JS is active */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.is-hidden {
        opacity: 0;
        transform: translateY(32px);
    }
    
    .scroll-reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Image aspect ratio utilities */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}

.aspect-\[3\/4\] {
    aspect-ratio: 3 / 4;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #3FC9A0;
}

/* Focus visible for accessibility */
a:focus-visible, button:focus-visible {
    outline: 2px solid #6EDCB8;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
