    /* Base & utilities */
    *, *::before, *::after { box-sizing: border-box; }
    html { scroll-behavior: smooth; scroll-padding-top: 80px; }
    body { margin: 0; overflow-x: hidden; }

    /* Selection color */
    ::selection { background: rgba(94, 234, 212, 0.3); color: #f0f4f8; }

    /* Scroll reveal base — content is visible by default, JS adds the animated class */
    .reveal {
        opacity: 1;
        transform: translateY(0);
        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) {
        .reveal.reveal-hidden {
            opacity: 0;
            transform: translateY(32px);
        }
    }

    /* Navbar scroll state */
    nav.scrolled {
        background: rgba(3, 9, 20, 0.92);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(94, 234, 212, 0.08);
        box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
    }

    /* Mobile menu transitions */
    #mobile-menu.open {
        opacity: 1;
        pointer-events: all;
    }

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

    /* Custom scrollbar */
    ::-webkit-scrollbar { width: 8px; }
    ::-webkit-scrollbar-track { background: #061224; }
    ::-webkit-scrollbar-thumb { background: #1a3f5c; border-radius: 4px; }
    ::-webkit-scrollbar-thumb:hover { background: #2a5a7e; }

    /* Focus visible */
    :focus-visible {
        outline: 2px solid #5eead4;
        outline-offset: 2px;
    }

    /* Button ripple-like hover glow */
    a, button {
        -webkit-tap-highlight-color: transparent;
    }

    /* Reduce motion */
    @media (prefers-reduced-motion: reduce) {
        html { scroll-behavior: auto; }
        .reveal { transition: none; }
        * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    }
