/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Scroll-reveal animations — progressive enhancement, only active with JS & reduced motion off */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        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);
    }
}

/* Floating card animations */
@media (prefers-reduced-motion: no-preference) {
    .floating-card-1 {
        animation: float-1 4s ease-in-out infinite;
    }
    .floating-card-2 {
        animation: float-2 5s ease-in-out infinite;
    }
    .floating-about {
        animation: float-3 4.5s ease-in-out infinite;
    }
}

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

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

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(4px, -6px); }
}

/* Card hover */
.card-hover {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px -20px rgba(126, 34, 206, 0.2);
}

/* Nav */
.nav-scrolled {
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f59e0b;
    border-radius: 1px;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-link {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3e8ff;
}
.mobile-link:last-child {
    border-bottom: none;
}

/* Selection color */
::selection {
    background: #fcd34d;
    color: #581c87;
}
