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

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

body {
    overflow-x: hidden;
}

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

/* Navbar transition */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(16, 42, 67, 0.08);
}

.nav-text {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
    color: #102a43;
}

/* Mobile menu */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(16, 42, 67, 0.06);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

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

::-webkit-scrollbar-track {
    background: #f4fcf9;
}

::-webkit-scrollbar-thumb {
    background: #99ebcf;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #66e1b9;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #33d7a3;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image loading */
img {
    max-width: 100%;
    height: auto;
}

/* Selection color */
::selection {
    background: #ccf5e5;
    color: #102a43;
}
