/* Base Reset & Fonts */
html,
body {
    margin: 0;
    padding: 0;
}

/* Lenis Smooth Scroll */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Hide cursor on desktop */
@media (pointer: fine) {

    body,
    a,
    button,
    input,
    textarea {
        cursor: none;
    }
}

.custom-cursor {
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
}

.height-line {
    height: 1px;
}

/* ── GRADIENT & NOISE ── */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 300%;
    animation: gradient 6s ease infinite;
}

.bg-300\% {
    background-size: 300%;
}

.noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.bento-card {
    transform-style: preserve-3d;
    will-change: transform;
}

/* ── PRELOADER ── */
#preloader {
    overflow: hidden;
}

#pre-bar {
    transition: width 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

/* ── PARALLAX LAYERS ── */
.parallax-slow {
    will-change: transform;
}

.parallax-med {
    will-change: transform;
}

.parallax-fast {
    will-change: transform;
}

/* ── TEXT CLIP REVEAL ── */
.clip-reveal {
    clip-path: inset(0 100% 0 0);
}

.clip-reveal.revealed {
    clip-path: inset(0 0% 0 0);
    transition: clip-path 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}

/* ── FLOATING CODE DECORATIONS ── */
.code-float {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(124, 58, 237, 0.18);
    pointer-events: none;
    white-space: nowrap;
    animation: floatCode 12s ease-in-out infinite;
    user-select: none;
}

@keyframes floatCode {

    0%,
    100% {
        transform: translateY(0px) rotate(-2deg);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
        opacity: 0.6;
    }
}

/* ── GLOW PULSE ── */
@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.3), 0 0 60px rgba(124, 58, 237, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(124, 58, 237, 0.5), 0 0 100px rgba(124, 58, 237, 0.2);
    }
}

.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

/* ── MARQUEE ── */
@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 18s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

/* ── COUNTER UP ── */
.count-up {
    font-variant-numeric: tabular-nums;
}

/* ── SCROLL SHIMMER ── */
@keyframes shimmer {
    from {
        background-position: -400px 0;
    }

    to {
        background-position: 400px 0;
    }
}

.shimmer-text {
    background: linear-gradient(90deg, #7c3aed 0%, #38bdf8 40%, #7c3aed 80%);
    background-size: 400px 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

/* ── GRID LINES (background detail) ── */
.grid-lines {
    background-image:
        linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ── MOBILE MODAL ── */
@media (max-width: 767px) {
    #chat-modal {
        padding: 0 !important;
        align-items: stretch !important;
    }

    #contacts-sidebar {
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
}