/* Base & Reset */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
body {
    background-color: #F5F5F5;
    color: #111111;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
::selection { background-color: #eb8714; color: white; }

/* Custom Cursor */
@media (pointer: fine) {
    body { cursor: none; }
    .cursor-dot, .cursor-circle {
        display: block;
        position: fixed;
        top: 0; left: 0;
        transform: translate(-50%, -50%);
        pointer-events: none;
        z-index: 9999;
        mix-blend-mode: exclusion;
    }
    .cursor-dot { width: 6px; height: 6px; background: white; border-radius: 50%; }
    .cursor-circle {
        width: 32px; height: 32px;
        border: 1px solid white; border-radius: 50%;
        transition: width 0.2s, height 0.2s, background-color 0.2s;
    }
    body:hover .cursor-circle { opacity: 1; }
    .hover-active .cursor-circle {
        width: 64px; height: 64px;
        background-color: rgba(255, 255, 255, 0.1);
        border-color: transparent;
    }
}
@media (pointer: coarse) {
    .cursor-dot, .cursor-circle { display: none !important; }
    body { cursor: auto; }
}

/* Typography & Utils */
.text-balance { text-wrap: balance; }

/* Loader */
.loader {
    position: fixed; inset: 0; z-index: 10000;
    background: #111111; display: flex; justify-content: center; align-items: center; color: #F5F5F5;
}

.magnetic-btn { display: inline-block; will-change: transform; }

/* Reveal Animations - CSS-based for better LCP */
.hero-char {
    display: inline-block;
    opacity: 1;
    will-change: transform, opacity, filter;
}

/* Only apply initial hidden state when JS is ready */
.js-ready .hero-char {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(20px);
}

/* Wispr-style Glow */
.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(235, 58, 20, 0.08) 0%, rgba(255,255,255,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0; /* Animated in */
}

/* Marquee */
.marquee-track {
    display: flex; white-space: nowrap; width: max-content;
    will-change: transform; animation: marquee 40s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Project Cards */
.project-card .project-img { transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.5s ease; }
.project-card:hover .project-img { transform: scale(1.03); }

/* Mobile: Disable hover grayscale effects - JS handles scroll-based reveal */
@media (pointer: coarse), (max-width: 1023px) {
    .project-card .project-img.grayscale {
        /* CSS grayscale will be overridden by JS inline styles */
    }
    .project-card .project-img.mobile-color-active {
        filter: grayscale(0%) !important;
    }
}

/* Image Slider */
.image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.slider-slide {
    width: 100%;
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden;
}
.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
}
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}
.slider-dot.active {
    background: white;
    transform: scale(1.2);
}
.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.slider-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}
.slider-btn svg {
    width: 20px;
    height: 20px;
    stroke: #111;
    stroke-width: 2;
}
.slider-btn-prev {
    left: 12px;
}
.slider-btn-next {
    right: 12px;
}
.image-slider:hover .slider-btn {
    opacity: 1;
}

/* Text Flip Animation */
.text-flip-container {
    perspective: 1000px;
    display: inline-block;
    min-width: 280px;
}
.text-flip {
    position: relative;
    display: inline-block;
    transform-style: preserve-3d;
}
.text-flip-inner {
    display: inline-block;
    backface-visibility: hidden;
}

/* Modals */
.modal-backdrop {
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.modal-content {
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s;
}
.modal-scroll-area {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom;
    overflow-y: scroll !important;
}
/* Lock body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    height: 100vh;
}

/* Utility to hide native scrollbar but allow scrolling */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.2); border-radius: 20px; }

/* Aura Background */
.aura-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    mix-blend-mode: multiply;
    animation: aura-float 20s ease-in-out infinite;
}
.aura-blob-1 {
    width: 60vw;
    height: 60vw;
    max-width: 800px;
    max-height: 800px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.4) 0%, rgba(74, 222, 128, 0.2) 40%, transparent 70%);
    top: -20%;
    right: -10%;
    animation-delay: 0s;
}
.aura-blob-2 {
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(134, 239, 172, 0.35) 0%, rgba(187, 247, 208, 0.15) 50%, transparent 70%);
    bottom: -10%;
    left: -15%;
    animation-delay: -7s;
    animation-duration: 25s;
}
.aura-blob-3 {
    width: 40vw;
    height: 40vw;
    max-width: 500px;
    max-height: 500px;
    background: radial-gradient(circle, rgba(22, 163, 74, 0.25) 0%, rgba(74, 222, 128, 0.1) 50%, transparent 70%);
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: -14s;
    animation-duration: 22s;
    animation-name: aura-float-center;
}
.aura-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}
@keyframes aura-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(5%, 10%) scale(1.05); }
    50% { transform: translate(-5%, 5%) scale(0.95); }
    75% { transform: translate(8%, -5%) scale(1.02); }
}
@keyframes aura-float-center {
    0%, 100% { transform: translateX(-50%) translate(0, 0) scale(1); }
    25% { transform: translateX(-50%) translate(5%, 10%) scale(1.05); }
    50% { transform: translateX(-50%) translate(-5%, 5%) scale(0.95); }
    75% { transform: translateX(-50%) translate(8%, -5%) scale(1.02); }
}


