/* ─── Base & Reset ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    min-height: 100vh;
}

::selection {
    background: rgba(0, 201, 138, 0.3);
    color: #fff;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050D1A;
}
::-webkit-scrollbar-thumb {
    background: #142D58;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00C98A;
}

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

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html { scroll-behavior: auto; }
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── Navbar glass effect ─── */
#navbar.scrolled {
    background: rgba(5, 13, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

/* ─── Mobile menu transitions ─── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* ─── Geometric accent decorations ─── */
.geometric-accent {
    position: absolute;
    pointer-events: none;
    opacity: 0.6;
}

/* ─── Button ripple effect ─── */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-ripple:hover::after {
    opacity: 1;
}

/* ─── Gradient text utility ─── */
.gradient-text {
    background: linear-gradient(135deg, #00C98A 0%, #7CE8C8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Card hover glow ─── */
.card-glow {
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0,201,138,0.3), transparent, rgba(0,201,138,0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
}

.card-glow:hover::before {
    opacity: 1;
}
</style>
