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

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

body {
    overflow-x: hidden;
}

/* Hero animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Scroll reveal base — content is visible by default for accessibility */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Animated state applied by JS only */
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(15, 15, 15, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-default {
    background: transparent !important;
}

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

/* Mobile toggle animation */
.mobile-toggle-active #bar1 {
    transform: rotate(45deg) translate(3px, 3px);
}

.mobile-toggle-active #bar2 {
    opacity: 0;
}

.mobile-toggle-active #bar3 {
    width: 1.5rem;
    transform: rotate(-45deg) translate(3px, -3px);
    margin-left: 0;
}

/* Vertical text */
.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Selection color */
::selection {
    background: rgba(255, 127, 110, 0.3);
    color: #fff;
}

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

::-webkit-scrollbar-track {
    background: #1A1A1A;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 127, 110, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 127, 110, 0.5);
}
