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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

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

/* Mobile menu animation */
#mobile-menu.open {
    animation: slideDown 0.3s ease-out;
}

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

/* Hamburger animation */
#menu-btn[aria-expanded="true"] #bar1 {
    transform: translateY(6px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] #bar2 {
    opacity: 0;
}

#menu-btn[aria-expanded="true"] #bar3 {
    transform: translateY(-6px) rotate(-45deg);
}

/* Scroll reveal animations - progressive enhancement, only with JS */
.reveal {
    /* Default: fully visible when JS is disabled */
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        /* Only hide elements when JS will handle them and motion is preferred */
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }

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

/* Navbar scroll state */
#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Selection color */
::selection {
    background-color: #ff5533;
    color: white;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid #ff5533;
    outline-offset: 2px;
}
