/* Custom Styles for Extraordinary Portfolio */

/* Professional Loader Animations */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-medium {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes spin-fast {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.animate-spin-slow {
    animation: spin-slow 3s linear infinite;
}

.animate-spin-medium {
    animation: spin-medium 2s linear infinite;
}

.animate-spin-fast {
    animation: spin-fast 1s linear infinite;
}

.animate-progress {
    animation: progress 2s ease-out forwards;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

/* Blob Animation */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Gradient Text Animation */
@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Hide default scrollbar — all browsers */
html,
body {
    scrollbar-width: none !important;       /* Firefox */
    -ms-overflow-style: none !important;   /* IE / Edge */
}
::-webkit-scrollbar {
    width: 0px !important;
    height: 0px !important;
    display: none !important;
    background: transparent !important;
}
*::-webkit-scrollbar {
    width: 0px !important;
    height: 0px !important;
    display: none !important;
    background: transparent !important;
}

/* Scroll Progress Bar */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    z-index: 9999;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
    transition: width 0.05s linear;
}

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

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

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Animation */
#loader {
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Navigation Active State */
.nav-link.active {
    color: #6366f1 !important;
    font-weight: 600;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Remove borders from portfolio items */
.portfolio-item {
    border: none;
}

/* Skill Progress Animation */
@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: var(--progress);
    }
}

.progress-fill {
    animation: progressFill 2s ease-out forwards;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Pulse Glow Effect */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.8);
    }
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Particle Background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    .text-responsive {
        font-size: clamp(1rem, 4vw, 2rem);
    }
}

/* Dark Mode Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Custom Selection - Accessible high-contrast solid colors */
::selection {
    background-color: #4f46e5; /* Deep Indigo 600 - rich visible contrast in light mode */
    color: #ffffff !important;
}

::-moz-selection {
    background-color: #4f46e5;
    color: #ffffff !important;
}

/* Dark Mode Selection */
.dark ::selection,
body.dark ::selection {
    background-color: #818cf8; /* Light Indigo 400 */
    color: #0f172a !important; /* Slate 900 dark text for razor-sharp legibility */
}

.dark ::-moz-selection,
body.dark ::-moz-selection {
    background-color: #818cf8;
    color: #0f172a !important;
}

/* Professional Loader Animations */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-medium {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes spin-fast {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.animate-spin-slow {
    animation: spin-slow 3s linear infinite;
}

.animate-spin-medium {
    animation: spin-medium 2s linear infinite;
}

.animate-spin-fast {
    animation: spin-fast 1s linear infinite;
}

.animate-progress {
    animation: progress 2s ease-out forwards;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

/* Focus Styles */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Hover Card Effect */
.hover-card {
    position: relative;
    overflow: hidden;
}

.hover-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hover-card:hover::before {
    left: 100%;
}

/* Magnetic Button Effect */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Text Reveal Animation */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-reveal {
    animation: textReveal 1s ease-out forwards;
}

/* Staggered Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.stagger-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }

/* ─── 3D Object Tilt & Card Specular Glare ─────────────────────────────────── */
.tilt-card {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.3s ease;
    will-change: transform;
}

.tilt-card:hover {
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
}

.tilt-inner {
    transform: translateZ(28px);
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
}

.tilt-inner-deep {
    transform: translateZ(42px);
    transition: transform 0.15s ease-out;
}

.card-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0;
    z-index: 25;
    transition: opacity 0.3s ease;
    background: radial-gradient(circle 280px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.22), transparent 75%);
}

.dark .card-glare {
    background: radial-gradient(circle 320px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(129, 140, 248, 0.2), transparent 75%);
}

.tilt-card:hover .card-glare {
    opacity: 1;
}

/* ─── Holographic Avatar Aura & Halo ────────────────────────────────────────── */
@keyframes spin-halo {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 0.75; }
    50% { transform: scale(1.08); opacity: 0.3; }
}

.hologram-ring {
    position: absolute;
    inset: -6px;
    border-radius: 9999px;
    background: conic-gradient(from 0deg, #6366f1, #a855f7, #ec4899, #06b6d4, #6366f1);
    animation: spin-halo 8s linear infinite;
    filter: blur(8px);
    opacity: 0.8;
    z-index: 0;
}

.hologram-ring-outer {
    position: absolute;
    inset: -14px;
    border-radius: 9999px;
    border: 2px dashed rgba(99, 102, 241, 0.4);
    animation: spin-halo 24s linear infinite reverse;
    pointer-events: none;
}

/* ─── Floating 3D Tech Objects ─────────────────────────────────────────────── */
@keyframes float-hero-1 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-16px) rotate(4deg) scale(1.04);
    }
}

@keyframes float-hero-2 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-22px) rotate(-5deg) scale(1.05);
    }
}

@keyframes float-hero-3 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(-14px) rotate(3deg) scale(1.03);
    }
}

.animate-float-badge-1 {
    animation: float-hero-1 5s ease-in-out infinite;
}

.animate-float-badge-2 {
    animation: float-hero-2 6.5s ease-in-out infinite 0.8s;
}

.animate-float-badge-3 {
    animation: float-hero-3 5.5s ease-in-out infinite 1.6s;
}

.tech-badge-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08), 0 0 15px rgba(99, 102, 241, 0.12);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dark .tech-badge-glass {
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4), 0 0 18px rgba(99, 102, 241, 0.25);
}

.tech-badge-glass:hover {
    transform: scale(1.15) translateY(-6px) !important;
    box-shadow: 0 20px 40px -5px rgba(99, 102, 241, 0.35);
}

/* ─── Shimmer Light Sweep on Buttons & Badges ─────────────────────────────── */
@keyframes shimmer-sweep {
    0% { transform: translateX(-150%); }
    100% { transform: translateX(250%); }
}

.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: shimmer-sweep 4s infinite;
}

/* ─── Modern Bento Glass Card ─────────────────────────────────────────────── */
.bento-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .bento-card {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.3);
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 45px -5px rgba(99, 102, 241, 0.15);
}

/* ─── Direct WhatsApp Floating Button (FAB) ───────────────────────────────── */
@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        opacity: 0.75;
    }
    60% {
        transform: scale(1.45);
        opacity: 0;
    }
    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

.whatsapp-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 10px 25px -3px rgba(37, 211, 102, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.whatsapp-fab:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 16px 32px -4px rgba(37, 211, 102, 0.55);
}

.whatsapp-fab-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 9999px;
    background: #25d366;
    animation: pulse-ring 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    z-index: -1;
    pointer-events: none;
}

/* ─── Interactive Terminal Widget ─────────────────────────────────────────── */
.terminal-window {
    background: #0d1117;
    border: 1px solid #30363d;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5);
    border-radius: 1rem;
    font-family: 'Space Grotesk', monospace;
}

.terminal-header {
    background: #161b22;
    border-bottom: 1px solid #30363d;
}

/* ─── Minimalist Custom Scrollbar ─────────────────────────────────────────── */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.4);
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.4) transparent;
}

