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

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    border-radius: 10px;
    border: 2px solid #050505;
}

::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

/* Custom Selection */
::selection {
    background: #6366f1;
    color: white;
}

/* Global Styles */
html {
    scroll-behavior: initial; /* Handled by Lenis */
}

body {
    background-color: #050505;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #9ca3af;
    overflow-x: hidden;
}

/* Bento Grid Utilities */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
}

/* Magnetic Button Helper */
.magnetic-btn {
    display: inline-block;
    will-change: transform;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    h1 {
        font-size: 2.75rem !important; /* Slightly larger for impact but still fitting */
        line-height: 1.1 !important;
        letter-spacing: -0.04em !important;
    }
    h3 {
        font-size: 2rem !important;
    }
    #navbar {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    .mobile-toggle-pill {
        @apply glass px-4 py-2.5 rounded-full flex items-center gap-2 border-white/20 active:scale-95 transition-transform cursor-pointer;
        z-index: 101;
    }
    .container {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
    .glass {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    h1 {
        font-size: 4.5rem !important;
    }
}

/* Navbar Transition Refinement */
#navbar.nav-glass {
    @apply bg-dark/80 backdrop-blur-2xl border-b border-white/5 py-3 md:py-4;
}

.project-card {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Glassmorphism Refinement */
.glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-glass {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.text-gradient {
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899, #6366f1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 8s linear infinite;
}

/* Aesthetic Glows */
.glow-primary {
    box-shadow: 0 0 40px -10px rgba(99, 102, 241, 0.3);
}

.glow-accent {
    box-shadow: 0 0 40px -10px rgba(236, 72, 153, 0.3);
}
