*, *::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;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e2127;
}
::-webkit-scrollbar-thumb {
    background: #4a4f58;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff6b3f;
}

/* Floating Animation for Hero Cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.3s;
}

.floating-card:nth-child(3) {
    animation-delay: -2.6s;
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .floating-card {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(15, 17, 21, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

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

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #ff6b3f;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #2d3138 0%, #1e2127 100%);
}
