:root {
    --cursor-size: 20px;
    --cursor-outline-size: 50px;
    --primary: #ffffff;
    --secondary: #a855f7;
    --tertiary: #f1f5f9;
    --accent: #00f0ff;
    --bg-color: #0a0a0c;
    --text-main: #ffffff;
    --text-muted: #f1f5f9;
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --font-syne: 'Syne', sans-serif;
    --font-inter: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: var(--bg-color);
    color: #ffffff;
    font-family: var(--font-inter);
    overflow-x: hidden;
    cursor: none;
    /* Custom cursor */
    max-width: 100vw;
    width: 100%;
    position: relative;
}

/* Typography */
h1,
h2,
h3,
h4,
.font-syne {
    font-family: var(--font-syne);
}

/* Dynamic Spotlight */
#global-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 1600px;
    height: 1600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    will-change: transform;
}

/* Noise Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
    opacity: 0.4;
}


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

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

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

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

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

/* Revert cursor on mobile */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    #cursor-dot,
    #cursor-outline {
        display: none !important;
    }

    /* Prevent horizontal scroll on mobile */
    nav, .glass-nav {
        width: 100%;
        max-width: 100vw;
    }

    nav > div {
        max-width: 100%;
    }

    /* Ensure mobile menu button doesn't overflow */
    #menu-btn {
        padding: 0.5rem;
    }

    /* Constrain all sections on mobile */
    main, section {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Fix hero heading overflow on mobile */
    h1 {
        margin-left: 0 !important;
        padding-left: 0;
    }

    /* Prevent fixed elements from causing overflow */
    .fixed {
        max-width: 100vw;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Terminal Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* Firefox scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.3) rgba(255, 255, 255, 0.02);
}

/* Custom Cursor */
#cursor-dot,
#cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: difference;
}

#cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

#cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Canvas Background */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-panel:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Plasma/Glow Effect */
.plasma-card {
    position: relative;
    overflow: hidden;
    --x: 50%;
    --y: 50%;
}

.plasma-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        800px circle at var(--x) var(--y),
        rgba(168, 85, 247, 0.15),
        transparent 40%
    );
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.plasma-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        600px circle at var(--x) var(--y),
        rgba(59, 130, 246, 0.1),
        transparent 40%
    );
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.plasma-card:hover::before,
.plasma-card:hover::after {
    opacity: 1;
}

/* Animated Border Gradient */
.plasma-border {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
        400px circle at var(--x) var(--y),
        rgba(255, 255, 255, 0.4),
        transparent 40%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

.plasma-card:hover .plasma-border {
    opacity: 1;
}

.glass-nav {
    background: rgba(2, 2, 3, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    max-width: 100vw;
    overflow-x: hidden;
}

/* Mobile Menu */
#mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 7, 0.98);
    backdrop-filter: blur(20px);
    z-index: 40;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-width: 100vw;
}

#mobile-menu.active {
    transform: translateX(0);
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-syne);
    color: white;
}

/* Text Effects */
.text-outline {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    color: transparent;
    transition: all 0.4s ease;
}

.text-outline:hover {
    -webkit-text-stroke: 1px var(--primary);
    color: rgba(59, 130, 246, 0.2);
    text-shadow: 0 0 20px var(--primary);
}

.magnetic-wrap {
    display: inline-block;
}

/* Marquee Animation */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

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

.marquee-content.reverse {
    animation: marquee-reverse 20s linear infinite;
}

@keyframes marquee-reverse {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes gradient-x {

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

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

.animate-gradient-x {
    animation: gradient-x 3s ease infinite;
}

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.animate-float-slow {
    animation: float 8s ease-in-out infinite;
}

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

.animate-float-fast {
    animation: float 4s ease-in-out infinite;
}

/* Curtain Reveal for Images */
.reveal-curtain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    z-index: 20;
    transform-origin: left;
}

/* Image Hover Zoom */
.img-container {
    overflow: hidden;
    border-radius: 0.75rem;
    position: relative;
    transform: translateZ(0);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #050505; /* Dark background for letterboxed images */
}

.img-container img {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease; /* Faster transition */
    filter: grayscale(100%) contrast(1.2);
    width: 100%;
    height: 100%;
    object-fit: contain; /* Fit image without cropping */
    will-change: transform;
    transform: scale(0.92); /* Start slightly smaller */
}

.group:hover .img-container {
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.3), 0 8px 32px rgba(0, 0, 0, 0.5);
}

.group:hover .img-container img {
    transform: scale(1); /* Zoom to full fit (no crop) */
    filter: grayscale(0%) contrast(1.1);
}

/* Chat Widget Styles */
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 90vw;
    max-width: 350px;
    height: 500px;
    max-height: 60vh;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(168, 85, 247, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chat-window.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.user {
    align-self: flex-end;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: white;
    border-bottom-right-radius: 2px;
}

.message.ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d1d5db;
    border-bottom-left-radius: 2px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    align-self: flex-start;
    width: fit-content;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

/* ===================================
   SVG ANIMATIONS STYLING
   =================================== */

/* Code Brackets SVG */
#code-brackets {
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
    transition: filter 0.3s ease;
}

#code-brackets:hover {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.6));
}

#code-brackets .bracket-left,
#code-brackets .bracket-right {
    stroke-dasharray: 200;
    stroke-dashoffset: 0;
}

#code-brackets .code-dot {
    filter: drop-shadow(0 0 4px currentColor);
}

/* Network Graph SVG */
#network-graph {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.2));
}

#network-graph .node {
    filter: drop-shadow(0 0 6px currentColor);
    transition: r 0.3s ease;
}

#network-graph .connection {
    stroke-dasharray: 300;
    stroke-dashoffset: 0;
}

/* Circular Progress SVG */
#circular-progress {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.3));
}

#circular-progress circle {
    transition: stroke-width 0.3s ease;
}

#circular-progress:hover circle {
    stroke-width: 3;
}

/* Data Bars SVG */
#data-bars {
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.2));
}

#data-bars .bar {
    transition: opacity 0.3s ease;
}

#data-bars:hover .bar {
    opacity: 1;
}

/* Rocket SVG */
#rocket-svg {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
    transition: all 0.3s ease;
}

#rocket-svg:hover {
    filter: drop-shadow(0 0 25px rgba(59, 130, 246, 0.7));
    transform: scale(1.05);
}

#rocket-svg .rocket-flame {
    filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.8));
}

/* General SVG hover effects */
svg {
    transition: transform 0.3s ease;
}

svg path,
svg circle,
svg rect,
svg line {
    transition: all 0.3s ease;
}

/* Responsive SVG visibility */
@media (max-width: 1280px) {
    #code-brackets,
    #network-graph,
    #circular-progress,
    #data-bars,
    #rocket-svg {
        display: none;
    }
}

/* Hero Heading Responsive Sizing */
.hero-heading {
    font-size: clamp(3rem, 12vw, 8rem);
}

@media (min-width: 1024px) {
    .hero-heading {
        font-size: clamp(5rem, 10vw, 10rem);
    }
}

@media (min-width: 1536px) {
    .hero-heading {
        font-size: clamp(6rem, 8vw, 11rem);
    }
}

/* 4K and Ultra-Wide Screen Responsive (2560px and above) */
@media (min-width: 2560px) {
    /* Increase max container width for 4K */
    .max-w-7xl {
        max-width: 100rem !important;
    }

    /* Scale up hero heading appropriately */
    .hero-heading {
        font-size: clamp(8rem, 9vw, 14rem) !important;
    }

    h1 {
        font-size: clamp(6rem, 8vw, 12rem) !important;
    }

    /* Scale up section headings */
    h2 {
        font-size: clamp(3rem, 4vw, 6rem) !important;
    }

    /* Increase base font sizes for better readability */
    body {
        font-size: 1.25rem;
    }

    /* Scale up padding and spacing */
    section {
        padding-top: 8rem !important;
        padding-bottom: 8rem !important;
    }

    /* Increase navbar padding */
    nav .max-w-7xl {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    /* Scale up buttons */
    a.group, a[href="#contact"], a[href="#projects"] {
        padding: 1.5rem 3rem !important;
        font-size: 1.125rem !important;
    }

    /* Increase terminal size */
    .custom-scrollbar {
        height: 500px !important;
        font-size: 1rem !important;
    }

    /* Scale up project cards */
    .glass-panel {
        padding: 2.5rem !important;
    }

    /* Increase grid gaps */
    .grid {
        gap: 3rem !important;
    }

    /* Scale up stat numbers */
    .text-3xl {
        font-size: 3rem !important;
    }

    /* Increase spacing in flex containers */
    .gap-4 {
        gap: 1.5rem !important;
    }

    .gap-6 {
        gap: 2rem !important;
    }

    .gap-8 {
        gap: 2.5rem !important;
    }

    .gap-12 {
        gap: 4rem !important;
    }

    /* Scale up icons and decorative elements */
    .text-4xl {
        font-size: 3rem !important;
    }

    .text-5xl {
        font-size: 4rem !important;
    }

    .text-6xl {
        font-size: 5rem !important;
    }

    /* Increase border radius for better aesthetics */
    .rounded-xl {
        border-radius: 1.5rem !important;
    }

    .rounded-2xl {
        border-radius: 2rem !important;
    }

    /* Scale up floating shapes */
    .floating-shape {
        transform: scale(1.5);
    }

    /* Increase cursor size */
    #cursor-dot {
        width: 12px;
        height: 12px;
    }

    #cursor-outline {
        width: 60px;
        height: 60px;
    }

    /* Scale up background blur effects */
    .blur-sm {
        filter: blur(6px) !important;
    }

    .blur-md {
        filter: blur(16px) !important;
    }

    .blur-xl {
        filter: blur(32px) !important;
    }

    .blur-2xl {
        filter: blur(64px) !important;
    }

    /* Adjust spotlight gradient for larger screens */
    body::after {
        background: radial-gradient(1200px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(59, 130, 246, 0.08), transparent 40%);
    }
}

/* Extra Large 4K Screens (3440px and above) */
@media (min-width: 3440px) {
    .max-w-7xl {
        max-width: 120rem !important;
    }

    h1 {
        font-size: clamp(8rem, 10vw, 16rem) !important;
    }

    body {
        font-size: 1.5rem;
    }

    section {
        padding-top: 10rem !important;
        padding-bottom: 10rem !important;
    }
}

/* ===================================
   ADVANCED ANIMATION STYLES
   =================================== */

/* Performance optimizations for animated elements - only use will-change sparingly */
.char, .word, .word-wrap, .line-inner {
    /* Remove will-change - only use during actual animation */
}

/* Use transform instead of top/left for animations */
.animate-scan {
    animation: scan 3s linear infinite;
    will-change: transform;
}

/* Gradient text effect */
.highlight-text {
    background-image: linear-gradient(90deg, #ffffff, #a855f7, #3b82f6, #ffffff);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Card highlight overlay */
.card-highlight {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Button liquid fill effect */
.liquid-fill {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}

/* Enhanced cursor follower */
.cursor-follower {
    position: fixed;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: screen;
    transform: translate(-50%, -50%);
}

/* Remove expensive animations on mobile */
@media (max-width: 768px) {
    .char, .word, .word-wrap {
        will-change: auto;
    }
    
    /* Disable cursor follower on mobile */
    .cursor-follower {
        display: none !important;
    }
    
    /* Simplify card effects on mobile */
    .card-highlight {
        display: none !important;
    }
    
    /* Disable 3D transforms on mobile */
    .glass-panel {
        transform: none !important;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .char, .word, .word-wrap, .line-inner {
        will-change: auto;
    }
    
    .cursor-follower,
    .animate-spin-slow,
    .animate-scan,
    .animate-pulse,
    .animate-ping,
    .animate-float-rocket,
    .glitch-text::before,
    .glitch-text::after {
        display: none !important;
        animation: none !important;
    }
}

/* Accessibility: Improve contrast for text on dark backgrounds */
.text-slate-100 {
    color: #e2e8f0 !important; /* Brighter slate for better contrast */
}

.text-slate-300 {
    color: #cbd5e1 !important; /* Ensure readable contrast */
}

.text-slate-400 {
    color: #94a3b8 !important; /* Minimum 4.5:1 contrast ratio */
}

.text-gray-500 {
    color: #9ca3af !important; /* Improved contrast */
}

/* Ensure sufficient contrast for links */
a:not([class]) {
    color: #93c5fd; /* Light blue with better contrast */
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}
/* Journey Section Specifics */
#experience-section:hover .path-draw {
    animation: dash 1.5s ease-out forwards;
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

/* Ensure the custom spotlight is smooth */
#exp-spotlight {
    transition: opacity 0.3s ease, top 0.1s ease-out, left 0.1s ease-out;
    will-change: top, left, opacity;
}

.path-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}


@keyframes spin-slow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
.animate-spin-slow {
    animation: spin-slow 8s linear infinite;
}


@keyframes scan {
    0% { transform: translateY(-100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(1000%); opacity: 0; }
}
.animate-scan {
    animation: scan 3s linear infinite;
}


.skill-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.skill-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.2);
}

.skill-pill i {
    font-size: 1.1rem;
}


.hover\:pause-animation:hover {
    animation-play-state: paused;
}


/* Skill Tags for Bento Grid */
.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    transition: all 0.3s ease;
}
.skill-tag:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

/* 3D Cube Animation */
.cube-wrapper {
    perspective: 1000px;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}
.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: spin-cube 12s infinite linear;
    will-change: transform;
    /* Use GPU-accelerated transform only */
}
.cube-face {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1) inset;
}
.cube-face.front  { transform: rotateY(0deg) translateZ(40px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(40px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(40px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(40px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(40px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(40px); }

@keyframes spin-cube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}


/* Rocket Floating Animation */
@keyframes float-rocket {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}
.animate-float-rocket {
    animation: float-rocket 4s ease-in-out infinite;
}

/* Glitch Effect (restored to previous style) */
.glitch-text {
    position: relative;
    display: inline-block;
}
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0c; /* Match background color */
}
.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}
@keyframes glitch-anim-1 {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    20% { clip: rect(80px, 9999px, 90px, 0); }
    40% { clip: rect(10px, 9999px, 50px, 0); }
    60% { clip: rect(40px, 9999px, 20px, 0); }
    80% { clip: rect(70px, 9999px, 60px, 0); }
    100% { clip: rect(20px, 9999px, 80px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(10px, 9999px, 80px, 0); }
    20% { clip: rect(60px, 9999px, 10px, 0); }
    40% { clip: rect(30px, 9999px, 60px, 0); }
    60% { clip: rect(90px, 9999px, 20px, 0); }
    80% { clip: rect(20px, 9999px, 40px, 0); }
    100% { clip: rect(50px, 9999px, 30px, 0); }
}

/* Disable glitch effect on small mobile devices */
@media (max-width: 768px) {
    .glitch-text::before,
    .glitch-text::after {
        display: none !important;
        animation: none !important;
    }
}

/* Phone Link Hover */
.phone-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #94a3b8;
    transition: color 0.3s ease;
}
.phone-link:hover {
    color: #ffffff;
}
.phone-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}
.phone-link:hover::after {
    width: 100%;
}

/* Project Modals */
.project-modal {
    perspective: 1000px;
}

.project-modal .modal-content {
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.project-modal .modal-scrollable {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.project-modal .modal-scrollable::-webkit-scrollbar {
    width: 8px;
}

.project-modal .modal-scrollable::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.project-modal .modal-scrollable::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.project-modal .modal-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Larger media in modals */
.project-modal .modal-scrollable > div:first-child {
    height: 280px !important;
}

@media (min-width: 768px) {
    .project-modal .modal-scrollable > div:first-child {
        height: 380px !important;
    }
}

.project-modal-trigger {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-modal-trigger:hover {
    transform: translateY(-5px);
}

.project-modal-trigger:active {
    transform: scale(0.98);
}



/* New Animations for Backgrounds */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}
.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}

@keyframes spin-slower {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}
.animate-spin-slower {
    animation: spin-slower 15s linear infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.animate-float-slow {
    animation: float-slow 6s ease-in-out infinite;
}


/* Animated Tech Grid & Particles */
.bg-tech-grid {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    animation: pan-grid 20s linear infinite;
}

@keyframes pan-grid {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

.shooting-star {
    position: absolute;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    opacity: 0;
    animation: shoot 5s linear infinite;
    transform: rotate(-45deg);
}

@keyframes shoot {
    0% { transform: translate(0, 0) rotate(-45deg); opacity: 0; }
    10% { opacity: 1; }
    20% { transform: translate(-200px, 200px) rotate(-45deg); opacity: 0; }
    100% { opacity: 0; }
}

