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

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

body {
    margin: 0;
    background-color: #030806;
    color: #f5f0e8;
}

/* Floating card animations */
.floating-card-1 {
    animation: float1 6s ease-in-out infinite;
}
.floating-card-2 {
    animation: float2 7s ease-in-out infinite;
}
.floating-card-3 {
    animation: float3 5.5s ease-in-out infinite;
}
.floating-card-4 {
    animation: float4 6.5s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(-1deg); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(1deg); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-0.5deg); }
}
@keyframes float4 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(0.5deg); }
}

/* Scroll reveal — progressive enhancement, only applies when JS runs */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal without JS — content stays visible by default */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar glass effect */
#navbar.scrolled {
    background: rgba(3, 8, 6, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(245, 240, 232, 0.06);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(245, 240, 232, 0.06);
}
.mobile-link:last-child {
    border-bottom: none;
}

/* Selection color */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #f5f0e8;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #030806;
}
::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.5);
}

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

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #0c1a14 0%, #070f0b 100%);
}
