/* ========== BASE ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
    animation-name: fadeUp;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-iteration-count: 1;
}

/* Scroll reveal — progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .scroll-reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== NAV SCROLL ========== */
nav.scrolled {
    background: rgba(9, 14, 24, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

nav.scrolled .nav-link { color: rgba(255,255,255,0.85); }
nav.scrolled .nav-link:hover { color: #5bb89c; }

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f1626; }
::-webkit-scrollbar-thumb { background: #2d4578; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3d5a98; }

/* ========== SELECTION ========== */
::selection { background: rgba(91, 184, 156, 0.3); color: #0f1626; }

/* ========== INPUT FOCUS ========== */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(91, 184, 156, 0.15);
}

/* ========== IMAGE LOADING ========== */
img { background-color: #dce3f0; }

/* ========== MOBILE MENU ========== */
#mobileMenu {
    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); }
}

/* ========== CARD HOVER GLOW ========== */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* ========== SMOOTH SECTION TRANSITIONS ========== */
section { position: relative; }
</style>
