/* ===== Base & Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background-color: rgba(153, 246, 228, 0.3);
    color: #0a1829;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* ===== Header Scroll State ===== */
#site-header.scrolled #header-inner {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(10, 24, 41, 0.06), 0 8px 32px rgba(10, 24, 41, 0.06);
    border: 1px solid rgba(212, 220, 230, 0.6);
    border-radius: 1rem;
    margin: 0.5rem;
}

/* ===== Nav Links ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #14b8a6;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    position: relative;
}

/* ===== Focus States ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7c94b2;
}

/* ===== Print Styles ===== */
@media print {
    #site-header,
    #menu-toggle,
    #mobile-menu {
        display: none !important;
    }

    body {
        color: #0a1829;
        background: white;
    }

    .fixed {
        position: static !important;
    }
}
