:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #f72585;
    --dark: #0f172a;
    --light: #f8fafc;
}

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    color: var(--light);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    overflow-x: hidden;
}

/* 3D Background */
#threejs-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
#threejs-container canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* Particles background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* Keep content above background */
nav, section, footer {
    position: relative;
    z-index: 10;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

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

.scroll-indicator {
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}

.skill-bar {
    transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.hover-scale {
    transition: transform 0.3s ease;
}
.hover-scale:hover {
    transform: scale(1.05);
}

.code-line {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.code-line.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Memory Card Animation */
.memory-card {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}
.memory-card .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.memory-card.flipped .card-inner {
    transform: rotateY(180deg);
}
.memory-card .front,
.memory-card .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.memory-card .back {
    transform: rotateY(180deg);
}

/* Mobile Menu Styles */
#mobile-menu {
    transition: all 0.3s ease;
    justify-content: center; 
    align-items: center;
    text-align: center;
}

#mobile-menu.show {
    display: flex !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    nav {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 0;
        margin: 0;
    }

    nav .max-w-7xl {
        width: 100%;
        max-width: none;
        padding: 0; 
    }

    .hero-content {
        padding: 2rem 1rem;
    }

    .glass-card {
        margin: 1rem;
        padding: 1.5rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.mobile-nav-item {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-nav-item.show {
    transform: translateY(0);
    opacity: 1;
}


      
        /*   Hex  hero sec */
         .hexagon-button {
        position: relative;
        width: 160px;
        height: 92px;
        clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        border-width: 1px;
    }
    .hexagon-button:hover {
        transform: translateY(-3px);
    }
    .hexagon-content {
        transform: translateY(2px);
        text-align: center;
        padding: 0 20px;
    }
    
    /* Marquee animation */
    @keyframes marquee {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }
    .animate-marquee {
        animation: marquee 20s linear infinite;
    }
    
    /* Glitch effect on hover */
    @keyframes glitch {
        0% { transform: translate(0); }
        20% { transform: translate(-2px, 2px); }
        40% { transform: translate(-2px, -2px); }
        60% { transform: translate(2px, 2px); }
        80% { transform: translate(2px, -2px); }
        100% { transform: translate(0); }
    }
    .relative:hover img {
        animation: glitch 0.5s linear infinite;
    }

      @keyframes fade-up {
        0% { opacity: 0; transform: translateY(20px); }
        100% { opacity: 1; transform: translateY(0); }
    }
    .animate-fade-up {
        animation: fade-up 1.2s ease-out forwards;
        animation-delay: 0.6s;
    }

    /* end hero sec*/