/* =================================================================
// CHAOTIC BOTS PORTFOLIO - MAIN STYLESHEET
// 
// This file contains all the custom styles for the portfolio website.
// The styles are organized into sections for easy maintenance.
//
// ================================================================= */

/* =================================================================
// SUB-SECTION: DESIGN SYSTEM & CSS VARIABLES
// Establishes the core visual identity of the site. This centralized
// system makes it easy to maintain a consistent look and feel.
// ================================================================= */
:root {
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --border-color: #333333;
    --text-light: #F7FAFC;
    --text-med: #A0AEC0;
    --text-dark: #718096;
    --accent-primary: #2B6CB0;
    --accent-secondary: #2C5282;
    --accent-tertiary: #3182CE;
}

/* =================================================================
// SUB-SECTION: BASE & HTML STYLES
// ================================================================= */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: #000000;
    color: var(--text-light);
    position: relative;
    cursor: auto;
    /* Use default cursor for better compatibility */
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* =================================================================
// SUB-SECTION: SPACE BACKGROUND WITH MOVING STARS
// Creates an animated starfield background with multiple layers
// ================================================================= */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle 2s infinite ease-in-out, float 15s infinite linear;
}

.star:nth-child(odd) {
    animation-delay: -1s;
}

.star:nth-child(3n) {
    animation-delay: -2s;
}

.star:nth-child(4n) {
    animation-delay: -0.5s;
}

.star:nth-child(5n) {
    animation-delay: -1.5s;
}

/* Different star sizes for depth */
.star.small {
    width: 1px;
    height: 1px;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

.star.medium {
    width: 2px;
    height: 2px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
}

.star.large {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 1);
}

/* Colored stars for variety */
.star.blue {
    background: #4a9eff;
    box-shadow: 0 0 4px rgba(74, 158, 255, 0.8);
}

.star.purple {
    background: #8a2be2;
    box-shadow: 0 0 4px rgba(138, 43, 226, 0.8);
}

.star.yellow {
    background: #ffeb3b;
    box-shadow: 0 0 4px rgba(255, 235, 59, 0.8);
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    25% {
        opacity: 0.8;
        transform: scale(1.1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
    75% {
        opacity: 0.6;
        transform: scale(1.0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }
    20% {
        transform: translateY(-25px) translateX(15px) rotate(72deg);
    }
    40% {
        transform: translateY(-10px) translateX(-20px) rotate(144deg);
    }
    60% {
        transform: translateY(-35px) translateX(25px) rotate(216deg);
    }
    80% {
        transform: translateY(-5px) translateX(-15px) rotate(288deg);
    }
    100% {
        transform: translateY(0px) translateX(0px) rotate(360deg);
    }
}

/* =================================================================
// SUB-SECTION: FLUSH SEPARATOR LINES - NO GAPS
// Completely flush separator lines that work on all devices
// ================================================================= */
.flush-separator {
    position: relative;
    width: 100vw;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(96, 249, 252, 0.3) 25%,
        rgba(96, 249, 252, 1) 50%,
        rgba(96, 249, 252, 0.3) 75%,
        transparent 100%
    );
    box-shadow: 0 0 6px rgba(96, 249, 252, 0.5);
    margin: 0 !important;
    padding: 0 !important;
    display: block;
    overflow: hidden;
}

.flush-separator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: sweep-light 3s ease-in-out infinite;
}

.navbar-flush {
    position: fixed;
    top: 88px; /* Standard navbar height: py-4 (32px) + content (~56px) = ~88px */
    left: 0;
    z-index: 40;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: 100vw;
}

/* Ensure navbar separator is visible and positioned correctly on all devices */
@media (max-width: 768px) {
    .navbar-flush {
        top: 80px; /* Slightly smaller on tablets */
        height: 2px; /* More visible on mobile */
        box-shadow: 0 0 6px rgba(96, 249, 252, 0.8);
    }
}

@media (max-width: 480px) {
    .navbar-flush {
        top: 76px; /* Adjust for mobile navbar */
        height: 2px; /* More visible on small screens */
        box-shadow: 0 0 8px rgba(96, 249, 252, 1);
        background: linear-gradient(90deg, 
            transparent 0%,
            rgba(96, 249, 252, 0.5) 20%,
            rgba(96, 249, 252, 1) 50%,
            rgba(96, 249, 252, 0.5) 80%,
            transparent 100%
        );
    }
}

.footer-flush {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Remove any potential spacing from containers */
.main-content-flush {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.footer-content-flush {
    margin-top: 0 !important;
    padding-top: 20px !important;
}

@keyframes sweep-light {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
}

}

/* Hide starfield on navbar and footer for clarity */
.main-header,
footer {
    position: relative;
    z-index: 10;
    background: linear-gradient(135deg, 
        rgba(10, 10, 10, 0.95) 0%, 
        rgba(26, 26, 26, 0.9) 25%,
        rgba(51, 51, 51, 0.9) 50%,
        rgba(26, 26, 26, 0.9) 75%,
        rgba(10, 10, 10, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.05);
    animation: headerGlow 4s ease-in-out infinite;
    overflow: hidden;
}

/* Footer specific styling */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        rgba(200, 200, 200, 0.1),
        rgba(255, 255, 255, 0.1),
        transparent);
    animation: shimmer 3s ease-in-out infinite;
}

/* =================================================================
// SUB-SECTION: CUSTOM CURSOR (DISABLED)
// Custom cursor disabled for better mobile compatibility
// ================================================================= */
.cursor-dot,
.cursor-outline {
    display: none;
    /* Custom cursor disabled for better compatibility across all devices */
}

/* =================================================================
// SUB-SECTION: HEADER & NAVIGATION
// ================================================================= */
.main-header {
    background: linear-gradient(135deg, 
        rgba(10, 10, 10, 0.95) 0%, 
        rgba(26, 26, 26, 0.9) 25%,
        rgba(51, 51, 51, 0.9) 50%,
        rgba(26, 26, 26, 0.9) 75%,
        rgba(10, 10, 10, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(43, 108, 176, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(43, 108, 176, 0.05);
    animation: slideDown 0.8s ease-out, headerGlow 4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        rgba(200, 200, 200, 0.1),
        rgba(255, 255, 255, 0.1),
        transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { 
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(255, 255, 255, 0.05);
    }
    50% { 
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.4),
            0 0 30px rgba(255, 255, 255, 0.08);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-link {
    position: relative;
    color: var(--text-med);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 10px 16px;
    border-radius: 12px;
    overflow: hidden;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    backdrop-filter: none;
    min-width: 80px;
    text-align: center;
    transform: translateZ(0); /* Enable hardware acceleration */
    will-change: transform, color, text-shadow;
}

@keyframes navItemFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

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

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--text-light);
    background: transparent;
    transform: translateY(-3px) scale(1.05);
    border-color: transparent;
    box-shadow: none;
    animation: none;
    text-shadow: 0 0 20px currentColor;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link.active,
.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--text-light);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    animation: activeGlow 2s ease-in-out infinite;
    text-shadow: 0 0 15px var(--accent-primary);
}

@keyframes activeGlow {
    0%, 100% { 
        text-shadow: 0 0 15px var(--accent-primary);
    }
    50% { 
        text-shadow: 0 0 20px var(--accent-tertiary);
    }
}

/* Responsive navigation adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    #desktop-nav {
        gap: 0.75rem;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
        min-width: 85px;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    #desktop-nav {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 10px 16px;
        font-size: 0.95rem;
        min-width: 90px;
    }
}

@media (min-width: 1280px) {
    #desktop-nav {
        gap: 1.25rem;
    }
    
    .nav-link {
        padding: 12px 20px;
        font-size: 1rem;
        min-width: 95px;
    }
}

/* Ensure navigation container doesn't overflow */
@media (min-width: 768px) {
    #desktop-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        max-width: 100%;
    }
}

/* Ensure mobile menu stays hidden on desktop */
@media (min-width: 768px) {
    .md\:hidden {
        display: none !important;
    }
}

/* Mobile navigation styles */
@media (max-width: 767px) {
    .main-header nav {
        padding: 1rem 1.5rem;
    }
    
    #mobile-menu {
        background: linear-gradient(135deg, 
            rgba(10, 10, 10, 0.95) 0%, 
            rgba(26, 26, 26, 0.9) 25%,
            rgba(51, 51, 51, 0.9) 50%,
            rgba(26, 26, 26, 0.9) 75%,
            rgba(10, 10, 10, 0.95) 100%);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 2px solid rgba(255, 255, 255, 0.15);
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(255, 255, 255, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
        animation: mobileMenuSlide 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 9999 !important;
        position: relative !important;
    }
    
    #mobile-menu.hidden {
        display: none !important;
    }
    
    #mobile-menu:not(.hidden) {
        display: block !important;
    }
    
    @keyframes mobileMenuSlide {
        from {
            opacity: 0;
            transform: translateY(-30px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    /* Enhanced mobile menu navigation links */
    .mobile-nav-item {
        padding: 16px 20px !important;
        margin: 6px 0 !important;
        border-radius: 16px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        background: linear-gradient(135deg, 
            rgba(26, 26, 26, 0.15),
            rgba(51, 51, 51, 0.1)) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
        min-height: 56px !important;
        touch-action: manipulation !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 10 !important;
        overflow: hidden !important;
    }
    
    .mobile-nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, 
            transparent, 
            rgba(255, 255, 255, 0.4), 
            transparent);
        transition: left 0.5s ease;
    }
    
    .mobile-nav-item:hover::before,
    .mobile-nav-item:active::before {
        left: 100%;
    }
    
    .mobile-nav-text {
        position: relative;
        z-index: 2;
        color: white !important;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    
    @keyframes mobileNavFloat {
        0%, 100% { transform: translateX(0px); }
        50% { transform: translateX(3px); }
    }
    
    .mobile-nav-item:hover,
    .mobile-nav-item:active,
    .mobile-nav-item:focus {
        transform: translateY(-3px) scale(1.03) !important;
        background: linear-gradient(135deg, 
            rgba(51, 51, 51, 0.4),
            rgba(77, 77, 77, 0.3)) !important;
        border-color: rgba(255, 255, 255, 0.6) !important;
        box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3) !important;
        outline: none !important;
    }
    
    .mobile-nav-item:active {
        transform: translateY(-1px) scale(1.01) !important;
    }
    
    /* Enhanced mobile menu button */
    #mobile-menu-button {
        padding: 16px !important;
        border-radius: 16px !important;
        background: linear-gradient(135deg, 
            rgba(10, 10, 10, 0.9), 
            rgba(26, 26, 26, 0.8)) !important;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
        animation: buttonPulse 4s ease-in-out infinite !important;
        min-height: 56px !important;
        min-width: 56px !important;
        touch-action: manipulation !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 1000 !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3) !important;
    }
    
    @keyframes buttonPulse {
        0%, 100% { 
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3),
                        0 0 15px rgba(255, 255, 255, 0.1);
        }
        50% { 
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3),
                        0 0 25px rgba(255, 255, 255, 0.15);
        }
    }
    
    #mobile-menu-button:hover,
    #mobile-menu-button:active,
    #mobile-menu-button:focus {
        background: linear-gradient(135deg, 
            rgba(26, 26, 26, 0.9), 
            rgba(51, 51, 51, 0.8)) !important;
        transform: scale(1.08) !important;
        animation: none !important;
        outline: none !important;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4) !important;
    }
    
    #mobile-menu-button svg {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    }
}

/* =================================================================
// SUB-SECTION: BUTTONS, TAGS, & INPUTS
// ================================================================= */

/* Clean link styling for seamless navigation */
.clean-link {
    position: relative;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.clean-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.clean-link:hover::before {
    width: 100%;
}

.clean-link:hover {
    transform: translateY(-2px);
    text-shadow: 0 0 20px currentColor;
}

.gradient-button {
    background: linear-gradient(135deg, #6B46D4, #5A37B8, #4C2A9C);
    background-size: 200% 200%;
    transition: all 0.4s ease;
    -webkit-transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(107, 70, 212, 0.15);
    transform: translateZ(0); /* Hardware acceleration */
    -webkit-transform: translateZ(0);
    touch-action: manipulation; /* Better touch response */
    -webkit-tap-highlight-color: transparent;
}

.gradient-button::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;
    -webkit-transition: left 0.5s;
}

.gradient-button:hover::before,
.gradient-button:active::before,
.gradient-button:focus::before {
    left: 100%;
}

.gradient-button:hover,
.gradient-button:active,
.gradient-button:focus {
    transform: translateY(-3px) scale(1.05) translateZ(0);
    -webkit-transform: translateY(-3px) scale(1.05) translateZ(0);
    background: linear-gradient(135deg, #60F9FC, #4FD1C7, #38B2AC);
    background-position: 100% 0;
    box-shadow: 0 15px 35px rgba(96, 249, 252, 0.3);
    animation: buttonGlow 2s ease-in-out infinite;
    outline: none;
}

/* Project Learn More buttons - specific styling */
.project-button {
    background: linear-gradient(135deg, #003FFF, #0035E5, #002ACC);
    background-size: 200% 200%;
    transition: all 0.4s ease;
    -webkit-transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 63, 255, 0.15);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.project-button::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;
    -webkit-transition: left 0.5s;
}

.project-button:hover::before,
.project-button:active::before,
.project-button:focus::before {
    left: 100%;
}

.project-button:hover,
.project-button:active,
.project-button:focus {
    transform: translateY(-3px) scale(1.05) translateZ(0);
    -webkit-transform: translateY(-3px) scale(1.05) translateZ(0);
    background: linear-gradient(135deg, #60F9FC, #4FD1C7, #38B2AC);
    background-position: 100% 0;
    box-shadow: 0 15px 35px rgba(96, 249, 252, 0.3);
    animation: buttonGlow 2s ease-in-out infinite;
    outline: none;
}

/* Mobile-specific button behavior */
@media (max-width: 767px) {
    .gradient-button:active {
        transform: translateY(-2px) scale(1.02) translateZ(0) !important;
        -webkit-transform: translateY(-2px) scale(1.02) translateZ(0) !important;
    }
}

@keyframes buttonGlow {
    0%, 100% { box-shadow: 0 15px 35px rgba(107, 70, 212, 0.2); }
    50% { box-shadow: 0 15px 35px rgba(90, 55, 184, 0.2); }
}

.tech-tag {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 240, 0.95)) !important;
    color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.tech-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(43, 108, 176, 0.3), transparent);
    transition: left 0.3s;
    -webkit-transition: left 0.3s;
}

.tech-tag:hover::before,
.tech-tag:active::before,
.tech-tag:focus::before {
    left: 100%;
}

.tech-tag:hover,
.tech-tag:active,
.tech-tag:focus {
    background: linear-gradient(135deg, #ffffff, #f0f0f0) !important;
    color: #000000 !important;
    transform: translateY(-2px) scale(1.05);
    -webkit-transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Mobile-specific tech tag fixes */
@media (max-width: 767px) {
    .tech-tag {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 245, 0.98)) !important;
        color: #000000 !important;
        font-weight: 600 !important;
        border: 1px solid rgba(255, 255, 255, 0.5) !important;
    }
    
    .tech-tag:active {
        background: linear-gradient(135deg, #ffffff, #f8f8f8) !important;
        color: #000000 !important;
        transform: scale(0.98) !important;
        -webkit-transform: scale(0.98) !important;
    }
}

.form-input {
    background: linear-gradient(135deg, var(--bg-card), rgba(20, 20, 20, 0.8));
    border: 1px solid var(--border-color);
    color: var(--text-light);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1), 0 8px 25px rgba(43, 108, 176, 0.05);
    transform: translateY(-2px);
}

/* =================================================================
// SUB-SECTION: CARDS & LAYOUT COMPONENTS
// ================================================================= */
.enhanced-card {
    background: linear-gradient(135deg, var(--bg-card), rgba(20, 20, 20, 0.8));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

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

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

.enhanced-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #6B46D4, #5A37B8, #4C2A9C);
    border-radius: 20px;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.enhanced-card:hover::after {
    opacity: 1;
}

.enhanced-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: transparent;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(107, 70, 212, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.enhanced-card:hover .tech-tag {
    position: relative;
    z-index: 10;
    opacity: 1;
}

.enhanced-card:hover * {
    position: relative;
    z-index: 5;
}

.section-heading {
    text-align: center;
    position: relative;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-light), var(--accent-primary), var(--accent-tertiary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-med);
    max-width: 2xl;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

/* =================================================================
// SUB-SECTION: ANIMATION SYSTEM
// Defines the keyframes and classes for on-load animations.
// ================================================================= */
.anim-stagger {
    opacity: 0;
    visibility: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateZ(0); }
    50% { transform: translateY(-10px) translateZ(0); }
}

@-webkit-keyframes float {
    0%, 100% { transform: translateY(0px) translateZ(0); }
    50% { transform: translateY(-10px) translateZ(0); }
}

@keyframes rotateGlow {
    0% { 
        transform: rotate(0deg);
        filter: hue-rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
        filter: hue-rotate(360deg);
    }
}

/* Floating elements - ONLY for specific elements: main page icons and View My Work button */
.floating {
    animation: float 6s ease-in-out infinite;
    -webkit-animation: float 6s ease-in-out infinite;
    transform: translateZ(0); /* Hardware acceleration */
    -webkit-transform: translateZ(0);
    will-change: transform; /* Optimize for animations */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Only apply floating to main page icons and View My Work button */
.floating[style*="animation-delay"],
.floating.gradient-button {
    animation: float 6s ease-in-out infinite;
    -webkit-animation: float 6s ease-in-out infinite;
}

.floating:nth-child(2) {
    animation-delay: -2s;
    -webkit-animation-delay: -2s;
}

.floating:nth-child(3) {
    animation-delay: -4s;
    -webkit-animation-delay: -4s;
}

/* Mobile floating animation fix - ONLY for specific floating elements */
@media (max-width: 767px) {
    .floating[style*="animation-delay"],
    .floating.gradient-button {
        animation: float 4s ease-in-out infinite !important;
        -webkit-animation: float 4s ease-in-out infinite !important;
    }
}

/* Remove floating from all other elements that accidentally have the class */
.floating:not([style*="animation-delay"]):not(.gradient-button) {
    animation: none !important;
    -webkit-animation: none !important;
}

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

/* Neon glow effect */
.neon-glow {
    text-shadow: 
        0 0 5px currentColor,
        0 0 10px currentColor,
        0 0 15px currentColor,
        0 0 20px var(--accent-primary);
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 1; }
    to { opacity: 0.8; }
}

/* =================================================================
// UTILITY CLASSES
// Helper classes for common styling patterns
// ================================================================= */

/* Mobile-specific fixes for production environments */
@media (max-width: 767px) {
    /* BULLETPROOF MOBILE MENU VISIBILITY */
    #mobile-menu {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 1rem !important;
        background: rgba(26, 32, 44, 0.98) !important;
        border: 2px solid rgba(43, 108, 176, 0.5) !important;
        border-radius: 16px !important;
    }
    
    #mobile-menu .nav-link {
        background: rgba(43, 108, 176, 0.1) !important;
        border: 1px solid rgba(43, 108, 176, 0.3) !important;
        color: white !important;
        font-weight: bold !important;
        margin: 8px 0 !important;
        padding: 16px !important;
        border-radius: 12px !important;
    }
    
    /* Ensure all clickable elements work on mobile */
    a, button, [role="button"], .nav-link, .page-link {
        cursor: pointer !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(43, 108, 176, 0.2) !important;
    }
    
    /* Special handling for mobile menu */
    #mobile-menu-button, #mobile-menu .nav-link {
        pointer-events: auto !important;
        position: relative !important;
    }
    
    /* Force hardware acceleration for better performance */
    #mobile-menu, #mobile-menu-button, .nav-link {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

/* Page transition styles */
.page-section {
    transition: opacity 0.5s ease-in-out, transform 0.4s ease-in-out;
    transform: translateY(0);
    will-change: opacity, transform;
}

.page-section.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    visibility: hidden;
}

.page-section.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

/* Smooth body transition for better overall experience */
body.loaded {
    transition: all 0.3s ease;
}

/* Enhanced navigation feedback */
/* Note: Main nav-link styles are defined earlier in the file */

/* Text utility classes */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 10px 30px rgba(43, 108, 176, 0.15);
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    /* ONLY float specific elements: main page icons and View My Work button */
    .floating[style*="animation-delay"],
    .floating.gradient-button {
        animation: float 4s ease-in-out infinite !important;
        -webkit-animation: float 4s ease-in-out infinite !important;
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
        will-change: transform !important;
        animation-play-state: running !important;
        -webkit-animation-play-state: running !important;
    }
    
    .enhanced-card:hover {
        transform: translateY(-5px) scale(1.01); /* Reduce hover effects on mobile */
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }
}
