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

    html {
        scroll-behavior: smooth;
        scroll-padding-top: 80px;
    }

    body {
        min-height: 100vh;
    }

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

    /* Navbar transition */
    #navbar.scrolled {
        background: rgba(2, 6, 23, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: 0 1px 0 rgba(255,255,255,0.05);
    }

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

    /* Custom scrollbar */
    ::-webkit-scrollbar {
        width: 8px;
    }
    ::-webkit-scrollbar-track {
        background: #0f172a;
    }
    ::-webkit-scrollbar-thumb {
        background: #14b8a6;
        border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: #0d9488;
    }

    /* Selection color */
    ::selection {
        background: rgba(20, 184, 166, 0.3);
        color: #0f172a;
    }

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

    /* Input autofill styling */
    input:-webkit-autofill,
    textarea:-webkit-autofill {
        -webkit-box-shadow: 0 0 0 30px white inset !important;
    }
