/* === Base & Utilities === */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Scroll Reveal (progressive enhancement) === */
.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);
}

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

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

/* === Navbar active state === */
.nav-link.active {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

/* === Custom scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5ff;
}
::-webkit-scrollbar-thumb {
    background: #d8b4fe;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

/* === Selection === */
::selection {
    background: #c084fc;
    color: #1e0a4a;
}

/* === Mobile menu animation === */
#mobileMenu {
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Smooth image loading === */
img {
    loading: lazy;
    decoding: async;
}

/* === Focus visible for accessibility === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
    border-radius: 0.5rem;
}
