/* ============================================================
   Snoowiz Portfolio - Global Custom CSS
   ============================================================ */

/* Hide Scrollbar */
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Base Body Styles */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Custom Utilities & Animations
   ============================================================ */

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.dark .glass {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Blob Morphing Animation */
@keyframes blob-morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}
.animate-blob-morph {
    animation: blob-morph 8s ease-in-out infinite;
}

/* Continuous Rotation */
@keyframes spin-slow {
    100% { transform: rotate(360deg); }
}
.animate-spin-slow {
    animation: spin-slow 8s linear infinite;
}

/* Infinite Carousel Marquee */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 1rem)); } /* -50% because we duplicate the track content */
}
.animate-marquee {
    animation: marquee 30s linear infinite;
}
.animate-marquee:hover {
    animation-play-state: paused;
}

/* Skills Carousel Marquee */
@keyframes skills-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 12px)); }
}
.animate-skills-marquee {
    animation: skills-marquee 35s linear infinite;
}
.animate-skills-marquee:hover {
    animation-play-state: paused;
}

/* Gradient Text */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Scan Lines */
.scan-line {
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.5) 50%, rgba(255,255,255,0));
    background-size: 100% 8px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
}
.dark .scan-line {
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.5) 50%, rgba(0,0,0,0));
}

/* Typewriter Cursor */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    background-color: currentColor;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

/* CodeMirror Overrides for Bare Layout */
.CodeMirror {
    height: 100% !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 14px;
    border-radius: 0.5rem;
}

/* Preloader Exit Animation */
.preloader-exit {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-out;
}

/* Utility to ensure svgs scale correctly */
svg {
    display: inline-block;
}

/* Conic Gradient Glowing Edge */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.animate-spin-fast {
    animation: spin 4s linear infinite;
}

/* Droplet Bounding Box Morphing */
@keyframes droplet-morph {
    0%, 100% {
        border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    }
    25% {
        border-radius: 70% 30% 52% 48% / 60% 40% 60% 40%;
    }
    50% {
        border-radius: 30% 70% 61% 39% / 40% 60% 40% 60%;
    }
    75% {
        border-radius: 58% 42% 40% 60% / 55% 45% 55% 45%;
    }
}
.animate-droplet {
    animation: droplet-morph 10s ease-in-out infinite;
}

/* Holographic Laser Sweep Line */
@keyframes laser-sweep {
    0% {
        top: -10%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 110%;
        opacity: 0;
    }
}
.laser-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.8), rgba(6, 182, 212, 0.8), transparent);
    box-shadow: 0 0 12px 3px rgba(6, 182, 212, 0.5);
    z-index: 20;
    pointer-events: none;
    opacity: 0;
}
.group:hover .laser-line {
    animation: laser-sweep 2.5s ease-in-out infinite;
}

/* Saturated Horizontal Scan-line Wipe */
.contact-scan-line {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.9), rgba(168, 85, 247, 0.9), transparent);
    box-shadow: 0 0 10px 2px rgba(59, 130, 246, 0.5);
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
    pointer-events: none;
}
.group:hover .contact-scan-line {
    transform: scaleX(1);
}

/* Spring-based concentric ripple rings */
@keyframes ripple-expand {
    0% {
        transform: scale(0.85);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}
.avatar-ripple {
    position: absolute;
    inset: -6px;
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    animation: ripple-expand 1.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    pointer-events: none;
}
.avatar-ripple-2 {
    animation-delay: 0.6s;
    border-color: rgba(168, 85, 247, 0.4);
}

/* Edge-masks for marquee */
.mask-horizontal-frosted {
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

/* Custom transitions */
.transition-spring {
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.transition-blur {
    transition: filter 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
}

/* Scroll Snapping for Homepage */
.snap-y section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.snap-y footer {
    scroll-snap-align: end;
    scroll-snap-stop: always;
}


