/* Base & Reset */
*, *::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: #0a0610;
}
::-webkit-scrollbar-thumb {
    background: #6b21a8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7e22ce;
}

/* Selection */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: #f3e8ff;
}

/* Floating Card Animations */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    animation-delay: 0s;
}
.floating-card:nth-child(2) {
    animation-delay: -1.5s;
}
.floating-card:nth-child(3) {
    animation-delay: -3s;
}
.floating-card:nth-child(4) {
    animation-delay: -4.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* 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);
}

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

/* Navbar active state */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: #fbbf24;
    transition: width 0.3s ease;
    margin-top: 2px;
}
.nav-link:hover::after {
    width: 100%;
}

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

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(107, 33, 168, 0.2);
}
.mobile-link:last-child {
    border-bottom: none;
}

/* Input focus glow */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Image aspect ratio fallback */
.aspect-\[4\/5\] {
    aspect-ratio: 4 / 5;
}
