/* ==========================================================================
   ACCESSIBILITY & BASE STYLES
   ========================================================================== */
/* Skip to Main Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--neon-blue);
    color: #000;
    padding: 0.75rem 1.5rem;
    z-index: 1001;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--neon-blue);
    outline-offset: 2px;
}

/* Screen Reader Only Utility Class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Management */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 3px solid var(--neon-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */
:root {
    --neon-blue: #00f3ff;
    --dark-bg: #0a0a0a;
    --accent: #ff2957;
    --glass-bg: rgba(10, 10, 10, 0.8);
    --text: #ffffff;
    --transition: all 0.3s ease;
}

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

/* Typography & Base Elements */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--dark-bg);
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Theme Variations */
.theme-purple {
    --neon-blue: #a742f5;
    --accent: #ff42e6;
}

.theme-green {
    --neon-blue: #42f5a7;
    --accent: #42ff8d;
}

.theme-orange {
    --neon-blue: #f5a742;
    --accent: #ff8d42;
}

/* Top Navigation */
.top-nav {
    background: var(--dark-bg);
    padding: 0.5rem 2rem;
    border-bottom: 1px solid var(--neon-blue);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
}

.theme-switcher {
    display: flex;
    gap: 0.5rem;
}

.theme-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.2);
}

.theme-btn.blue { background: #00f3ff; }
.theme-btn.purple { background: #a742f5; }
.theme-btn.green { background: #42f5a7; }
.theme-btn.orange { background: #f5a742; }

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--neon-blue);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
    overflow: hidden; /* Prevent any content from overflowing */
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-line {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text);
    margin: 6px 0;
    transition: var(--transition);
}

.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.logo:hover,
.logo:focus {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    transition: var(--transition);
    position: relative;
    z-index: 1001;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    html, body {
        width: 100%;
        overflow-x: hidden; /* Prevent horizontal scroll */
        position: relative;
    }
    
    body {
        padding-top: 60px; /* Add padding to prevent content from being hidden under fixed navbar */
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: var(--dark-bg);
        padding: 0.5rem 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 24px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1002;
        margin-left: auto;
    }
    
    .mobile-menu-btn .menu-line {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--neon-blue);
        transition: var(--transition);
    }
    
    .mobile-menu-btn[aria-expanded="true"] .menu-line:first-child {
        transform: translateY(10px) rotate(45deg);
    }
    
    .mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn[aria-expanded="true"] .menu-line:last-child {
        transform: translateY(-10px) rotate(-45deg);
    }
    
    .nav-links {
        position: fixed;
        top: 60px; /* Position below the navbar */
        right: -100%;
        width: 100%; /* Full width */
        height: 0;
        background: var(--dark-bg);
        flex-direction: column;
        padding: 0;
        z-index: 1001;
        transition: all 0.3s ease;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
    }
    
    .nav-links.active {
        right: 0;
        height: auto;
        min-height: 100vh;
        padding: 2rem 1rem;
        opacity: 1;
        visibility: visible;
    }
    
    /* Removed redundant .nav-links.active rule as it's now handled above */
    
    .nav-links a {
        display: block;
        padding: 1rem;
        margin: 0.5rem 0;
        border-radius: 4px;
        transition: all 0.3s ease;
        text-align: left;
        width: 100%;
    }
    
    .nav-links a:hover,
    .nav-links a:focus {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .nav-links a[aria-current="page"] {
        background: var(--neon-blue);
        color: #000;
    }

    /* Adjust hero section padding */
    .hero {
        padding-top: 2rem;
    }

    /* Overlay styles */
    .overlay {
        display: none; /* Hide overlay by default */
    }
    
    .overlay.active {
        display: block;
        background: rgba(0, 0, 0, 0.9);
        top: 60px;
        height: calc(100vh - 60px);
    }
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

/* Project Cards */
.project-card {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.project-links a {
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.project-links a:hover {
    background: var(--neon-blue);
    color: #fff;
}

/* Animations */
.floating {
    animation: float 3s ease-in-out infinite;
}

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

/* Particle Background */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--neon-blue);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skills Section */
.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: transform 0.3s ease;
}
        
                .skill-item:hover {
                    transform: translateY(-10px);
                }
        
                .skill-level {
                    width: 100px;
                    height: 100px;
                    margin: 0 auto 1rem;
                    position: relative;
                }
        
                .skill-level svg {
                    transform: rotate(-90deg);
                }
        
                .skill-level circle {
                    fill: none;
                    stroke-width: 8;
                    stroke-linecap: round;
                    stroke: var(--neon-blue);
                }
        
                /* Modal */
                .modal {
                    position: fixed;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background: rgba(0, 0, 0, 0.8);
                    display: none;
                    justify-content: center;
                    align-items: center;
                    z-index: 1000;
                }
        
                .modal-content {
                    background: var(--dark-bg);
                    padding: 2rem;
                    border-radius: 15px;
                    max-width: 500px;
                    position: relative;
                    border: 1px solid var(--neon-blue);
                }
        
                .close-modal {
                    position: absolute;
                    top: 1rem;
                    right: 1rem;
                    cursor: pointer;
                    color: var(--neon-blue);
                }

        .top-nav {
            background: var(--dark-bg);
            padding: 0.5rem 2rem;
            border-bottom: 1px solid var(--neon-blue);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .nav {
            position: sticky;
            top: 0;
            width: 100%;
            padding: 1rem 2rem;
            background: var(--glass-bg);

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: var(--neon-blue);
    color: var(--dark-bg);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    background: var(--dark-bg);
    color: var(--text);
    padding: 8rem 2rem 4rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
    justify-content: space-between;
}

.hero-text {
    flex: 1;
    position: relative;
    z-index: 2;
}
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .hero h1 {
            font-size: 3.5rem;
            margin-bottom: 1.5rem;
            line-height: 1.2;
            color: var(--text);
        }
        
        .hero .highlight {
            color: var(--neon-blue);
        }

        .hero p {
            font-size: 1.3rem;
            color: var(--text-secondary, rgba(255, 255, 255, 0.8));
            margin-bottom: 2.5rem;
            max-width: 600px;
            line-height: 1.6;
        }
        
        .hero .greeting {
            color: var(--neon-blue);
            font-size: 1.2rem;
            margin-bottom: 1rem;
            display: block;
        }
        
        .typing-text {
            min-height: 2rem;
            margin-bottom: 2rem;
            color: var(--neon-blue);
            font-size: 1.5rem;
        }

        .cta-button {
            display: inline-block;
            padding: 1rem 2rem;
            background: var(--accent);
            color: white;
            text-decoration: none;
            border-radius: 25px;
            font-weight: bold;
            transition: all 0.3s ease;
        }

        .cta-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(255, 41, 87, 0.4);
        }

        .section {
            padding: 5rem 2rem;
            max-width: 1200px;
            margin: 0 auto;
        }

        .section-title {
            text-align: center;
            font-size: 2.5rem;
            color: var(--neon-blue);
            margin-bottom: 3rem;
            position: relative;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 3px;
            background: var(--accent);
        }

        .about {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 4rem;
            align-items: center;
        }

        .about-image {
            position: relative;
            border-radius: 20px;
            overflow: hidden;
        }

        .about-image img {
            width: 100%;
            height: auto;
            border-radius: 20px;
        }

        .projects {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }

        .project-card {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            padding: 1.5rem;
            transition: all 0.3s ease;
            cursor: pointer;
            text-decoration: none;
            color: white;
            display: block;
            height: 100%;
            border: 1px solid rgba(255, 255, 255, 0.1);
            position: relative;
            overflow: hidden;
        }

        .project-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--neon-blue);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.3s ease;
        }

        .project-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 10px 30px rgba(0, 243, 255, 0.1);
            border-color: var(--neon-blue);
        }

        .project-card:hover::before {
            transform: scaleX(1);
        }

        .project-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
            border-radius: 8px;
            margin-bottom: 1rem;
            transition: transform 0.3s ease;
        }

        .project-card:hover img {
            transform: scale(1.03);
        }

        .project-card h3 {
            color: var(--neon-blue);
            margin-bottom: 0.5rem;
            font-size: 1.3rem;
        }

        .project-card p {
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 1rem;
            line-height: 1.5;
        }

        .github-link {
            color: var(--neon-blue);
            display: inline-flex;
            align-items: center;
            font-size: 0.9rem;
            margin-top: auto;
            opacity: 0.8;
            transition: all 0.3s ease;
        }

        .project-card:hover .github-link {
            opacity: 1;
            transform: translateX(5px);
        }

        .github-link::after {
            content: '→';
            margin-left: 5px;
            transition: transform 0.3s ease;
        }

        .project-card:hover .github-link::after {
            transform: translateX(5px);
        }

        .project-actions {
            display: flex;
            gap: 10px;
            margin-top: 15px;
            justify-content: space-between;
        }

        .project-btn {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid var(--neon-blue);
            color: var(--neon-blue);
            background: transparent;
            border-radius: 5px;
            text-align: center;
            text-decoration: none;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }

        .project-btn:hover {
            background: var(--neon-blue);
            color: #000;
            transform: translateY(-2px);
        }

        .project-btn i {
            font-size: 1rem;
        }

        .btn-code {
            border-color: #6e40c9;
            color: #6e40c9;
        }

        .btn-code:hover {
            background: #6e40c9;
            color: #fff;
        }

        .btn-demo {
            border-color: #39d353;
            color: #39d353;
        }

        .btn-demo:hover {
            background: #39d353;
    color: #000;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--neon-blue);
}

.cta-button:hover {
    background: transparent;
    color: var(--neon-blue);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Ongoing Projects Section */
.ongoing-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.ongoing-project {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--accent);
    animation: progress 3s ease-in-out infinite;
}

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

/* Reviews Section */
.reviews-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
}

.reviews-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll 30s linear infinite;
    padding: 1rem 0;
}

.review-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    position: relative;
    min-width: 300px;
    flex-shrink: 0;
}

.review-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 4rem;
    color: var(--neon-blue);
    opacity: 0.2;
    z-index: 0;
}

.review-card p {
    position: relative;
    z-index: 1;
}

.stars {
    color: var(--accent);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.reviews-container:hover .reviews-track {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-300px * 3 - 4rem)); /* Width of 3 cards + gap */
    }
}

@media (max-width: 768px) {
    .review-card {
        min-width: 250px;
    }
    
    @keyframes scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-250px * 3 - 4rem));
        }
    }
}

        .contact-form {
            max-width: 600px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.05);
            padding: 2rem;
            border-radius: 15px;
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            color: var(--neon-blue);
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 0.8rem;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid var(--neon-blue);
            border-radius: 5px;
            color: white;
            transition: all 0.3s ease;
        }

        .submit-btn {
            background: var(--neon-blue);
            color: var(--dark-bg);
            padding: 1rem 2rem;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .submit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 243, 255, 0.4);
        }

        @media (max-width: 992px) {
            .hero-content {
                flex-direction: column;
                text-align: center;
                gap: 2rem;
            }
            
            .hero-text {
                margin-top: 4rem;
            }
            
            .hero p {
                margin-left: auto;
                margin-right: auto;
            }
        }
        
        @media (max-width: 768px) {
            .nav-links {
                display: none;
            }
            
            .about {
                grid-template-columns: 1fr;
            }

            .hero h1 {
                font-size: 2.5rem;
            }
            
            .hero {
                padding-top: 6rem;
                padding-bottom: 3rem;
            }
            
            .hero p {
                font-size: 1.1rem;
            }
            
            .typing-text {
                font-size: 1.2rem;
            }
        }

/* Footer Styles */
.footer {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--neon-blue);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer p {
    color: var(--text);
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer:hover p {
    opacity: 1;
}

.footer .social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.footer .social-links a {
    color: var(--text);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.footer .social-links a:hover {
    color: var(--neon-blue);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.3);
    border-color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.1);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer .social-links {
        margin-top: 1rem;
    }
}