/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

/* Base resets for 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;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, #6366f1, #a855f7);
    z-index: 100;
    transition: width 0.1s ease;
}

/* Custom Cursor */
@media (min-width: 768px) {
    * {
        cursor: none !important;
        /* Hides default cursor everywhere on desktop only */
    }
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: white;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Marquee Animation */
.marquee-track {
    animation: marquee 30s linear infinite;
    display: flex;
    width: max-content;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Scrolls exactly half its duplicated width */
}

/* Tech Stack Items */
.tech-item {
    display: inline-block;
    cursor: default;
}

.tech-item-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 2rem;
    font-weight: bold;
}

/* Hover effects for link/button tags on custom cursor */
.cursor-outline.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

/* Swiper specific overrides */
.swiper-pagination-bullet {
    background: #4b5563 !important;
    opacity: 1 !important;
}

.swiper-pagination-bullet-active {
    background: #6366f1 !important;
    width: 24px !important;
    border-radius: 4px !important;
    transition: width 0.3s ease;
}

/* Blur backdrop for sticky navbar */
.nav-scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* Mobile Menu */
/* Mobile Menu */
#mobileMenu {
    transform: translateY(-20px);
}

#mobileMenu.menu-open {
    transform: translateY(0);
}

.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu-open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered entry */
.menu-open .mobile-menu-link:nth-child(1) {
    transition-delay: 0.10s;
}

.menu-open .mobile-menu-link:nth-child(2) {
    transition-delay: 0.15s;
}

.menu-open .mobile-menu-link:nth-child(3) {
    transition-delay: 0.20s;
}

.menu-open .mobile-menu-link:nth-child(4) {
    transition-delay: 0.25s;
}

.menu-open .mobile-menu-link:nth-child(5) {
    transition-delay: 0.30s;
}

.menu-open .mobile-menu-link:nth-child(6) {
    transition-delay: 0.35s;
}

.menu-open .mobile-menu-link:nth-child(7) {
    transition-delay: 0.40s;
}

.menu-open .mobile-menu-link:nth-child(8) {
    transition-delay: 0.45s;
}

.menu-open .mobile-menu-link:nth-child(9) {
    transition-delay: 0.50s;
}

.menu-open .mobile-menu-link:nth-child(10) {
    transition-delay: 0.55s;
}

/* ==========================================
   HERO SECTION – 3D Rotating Earth
   ========================================== */

/* Deep space background for the hero */
.hero-section {
    background: radial-gradient(ellipse at 50% 60%, #041228 0%, #020c1a 55%, #010810 100%);
}

/* Make the Three.js canvas sit flush */
#earth-canvas {
    display: block;
}

/* Brand logos hover pulse */
.brand-logo {
    cursor: default;
    transition: opacity 0.3s ease, color 0.3s ease;
}

/* APEX nav link underline effect */
.apex-nav a:not(.rounded-full):hover {
    position: relative;
}

/* Hero reveal animation reuse */
.hero-reveal {
    animation: heroRevealFade 0.8s ease forwards;
    opacity: 0;
}

.hero-reveal:nth-child(1) {
    animation-delay: 0.1s;
}

.hero-reveal:nth-child(2) {
    animation-delay: 0.25s;
}

.hero-reveal:nth-child(3) {
    animation-delay: 0.4s;
}

.hero-reveal:nth-child(4) {
    animation-delay: 0.55s;
}

@keyframes heroRevealFade {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animated Background Orbs (legacy — used in other sections) */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
    top: -15%;
    left: -10%;
    animation: heroOrbFloat 12s ease-in-out infinite;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12), transparent 70%);
    bottom: -10%;
    right: -5%;
    animation: heroOrbFloat 15s ease-in-out infinite reverse;
}

.hero-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
    top: 40%;
    left: 50%;
    animation: heroOrbFloat 18s ease-in-out infinite 3s;
}

@keyframes heroOrbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(15px, 30px) scale(1.02);
    }
}

/* Grid Pattern */
.hero-grid-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Particles Container */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.hero-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: heroParticleFloat linear infinite;
}

@keyframes heroParticleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* Rotating Rings */
.hero-ring {
    animation: heroRingRotate 30s linear infinite;
}

.hero-ring-inner {
    animation: heroRingRotate 20s linear infinite reverse;
}

@keyframes heroRingRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Glow Core (Profile area) */
.hero-glow-core {
    box-shadow:
        0 0 60px rgba(99, 102, 241, 0.15),
        0 0 120px rgba(168, 85, 247, 0.1),
        inset 0 0 40px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.08);
}

/* Floating Stat Cards */
.hero-float-card {
    animation: heroFloatCard 4s ease-in-out infinite;
}

@keyframes heroFloatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Override for centered bottom card */
.hero-float-card:nth-child(5) {
    animation: heroFloatCardCenter 4s ease-in-out infinite;
}

@keyframes heroFloatCardCenter {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-12px);
    }
}

/* Orbit Dots */
.hero-orbit-dot {
    animation: heroOrbitPulse 3s ease-in-out infinite;
}

@keyframes heroOrbitPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
}

/* Typed Text Cursor Effect */
.hero-typed-text {
    border-right: 3px solid rgba(99, 102, 241, 0.8);
    padding-right: 4px;
    animation: heroCursorBlink 0.8s step-end infinite;
}

.hero-typed-text.done-typing {
    border-right-color: transparent;
    animation: none;
}

@keyframes heroCursorBlink {

    0%,
    100% {
        border-right-color: rgba(99, 102, 241, 0.8);
    }

    50% {
        border-right-color: transparent;
    }
}

/* Scroll Indicator */
.hero-scroll-indicator {
    animation: heroScrollPulse 2s ease-in-out infinite;
}

@keyframes heroScrollPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

/* Visual Container Hover */
.hero-visual-container:hover .hero-ring {
    border-color: rgba(99, 102, 241, 0.15);
    transition: border-color 0.5s ease;
}

.hero-visual-container:hover .hero-ring-inner {
    border-color: rgba(168, 85, 247, 0.15);
    transition: border-color 0.5s ease;
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .hero-visual-container {
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-float-card {
        transform: scale(0.85);
    }

    .hero-orbit-dot {
        width: 24px !important;
        height: 24px !important;
    }

    .hero-orbit-dot i {
        font-size: 8px !important;
    }
}

@media (max-width: 640px) {
    .hero-visual-container {
        max-width: 260px;
    }

    .hero-float-card {
        transform: scale(0.75);
        padding: 10px !important;
    }

    .hero-float-card p.text-lg {
        font-size: 14px !important;
    }
}

/* =========================================
   TESTIMONIAL MARQUEE
   ========================================= */
.marquee-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    /* Create the fade effect on the left and right edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    padding: 1rem 0;
}

.marquee-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
}



.animate-marquee-left {
    animation: marqueeLeft 40s linear infinite;
}

.animate-marquee-right {
    animation: marqueeRight 40s linear infinite;
}

@keyframes marqueeLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes marqueeRight {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

/* Speed variations for different rows */
.marquee-fast {
    animation-duration: 35s;
}

.marquee-slow {
    animation-duration: 45s;
}

/* Styling for testimonial cards to ensure they don't shrink */
.testimonial-card-marquee {
    flex-shrink: 0;
    width: 320px;
    height: 100%;
}

@media (min-width: 768px) {
    .testimonial-card-marquee {
        width: 380px;
    }
}