/* === DESIGN SYSTEM TOKENS === */
:root {
    /* Primary Colors & Glows */
    --primary-color: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.6);
    --secondary-color: #3b82f6;
    --secondary-glow: rgba(59, 130, 246, 0.6);
    
    /* Background Surface Colors */
    --bg-color: #030712;
    --bg-alt-color: #0f172a;
    --card-bg: rgba(17, 24, 39, 0.7); 
    --nav-bg: rgba(3, 7, 18, 0.75);
    
    /* Typography Colors */
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    
    /* Decoration & Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.08);
    --highlight-bg: rgba(139, 92, 246, 0.15);
    
    /* Transitions & Sizing */
    --transition-speed: 0.3s;
    --container-width: 1100px;
    
    /* Neon & Glass Visual Hooks */
    --neon-glow: 0 0 15px var(--primary-glow);
    --neon-border: 1px solid rgba(139, 92, 246, 0.4);
    --glass-filter: blur(12px) saturate(180%);
    
    /* Background Overlay */
    --bg-overlay: rgba(3, 7, 18, 0.85);
}

/* === THEME OVERRIDES === */
.light-theme {
    --bg-color: #f8fafc;
    --bg-alt-color: #f1f5f9;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --border-color: #e2e8f0;
    --highlight-bg: #ececfd;
    --bg-overlay: rgba(248, 250, 252, 0.9);
}

/* === BASE RESET & TYPOGRAPHY === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: linear-gradient(var(--bg-overlay), var(--bg-overlay)), url('https://images.unsplash.com/photo-1542831371-29b0f74f9713?auto=format&fit=crop&w=1920&q=80');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden; /* Prevent scrolling when mobile menu is open */
}

h1, h2, h3, h4, h5, .logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.title-underline {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto;
    border-radius: 2px;
}

/* === Premium Floating Top Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    background-color: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.sticky {
    padding: 0.8rem 0;
    background-color: var(--nav-bg);
    backdrop-filter: var(--glass-filter);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.1);
}

.scroll-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 10px var(--primary-glow);
    z-index: 1001;
    transition: width 0.1s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -1px;
}

.logo-text span {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    position: relative;
    padding: 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
    transition: var(--transition-speed);
}

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-glow);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-btn, .mobile-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-speed);
}

.theme-btn:hover {
    color: var(--primary-color);
}

.mobile-toggle {
    display: none;
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 5rem;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-subtitle {
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

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

.hero-typing {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
}

#typing-text {
    color: var(--primary-color);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-speed);
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px var(--primary-glow);
    background-color: #7c3aed;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-3px) scale(1.05);
}

.hero-icons {
    display: flex;
    gap: 1.5rem;
}

.icon-box {
    width: 60px;
    height: 60px;
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-filter);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    border: var(--glass-border);
    box-shadow: var(--neon-glow);
    transition: var(--transition-speed);
}

.icon-box:hover {
    transform: translateY(-8px) scale(1.15) rotate(5deg);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 0 20px var(--secondary-glow);
}

/* Profile Image & Blob */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.blob-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-stack-display {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 1rem;
    font-size: 5rem;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
    animation: float 4s ease-in-out infinite;
}

.tech-main-icon {
    transition: var(--transition-speed);
}

.tech-main-icon:hover {
    transform: scale(1.2) translateY(-10px);
}

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

.blob {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.4;
    filter: blur(50px);
    box-shadow: 0 0 60px var(--primary-glow);
    z-index: 1;
    border-radius: 50%;
    animation: blobMorph 10s infinite;
}

@keyframes blobMorph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 2px;
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% { opacity: 0; transform: translate(-50%, 0); }
    50% { opacity: 1; transform: translate(-50%, 15px); }
    100% { opacity: 0; transform: translate(-50%, 25px); }
}

/* === About Section === */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.about-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-info p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.personal-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.detail-item .label {
    font-weight: 700;
    display: block;
    color: var(--text-color);
}

.detail-item .value {
    color: var(--text-muted);
}

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

.stat-card {
    background-color: var(--card-bg);
    backdrop-filter: var(--glass-filter);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    border: var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition-speed);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-card h4 {
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.stat-card p {
    color: var(--text-muted);
    font-weight: 500;
}

/* === Skills Section === */
.bg-alt {
    background-color: var(--bg-alt-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 4rem;
    margin-bottom: 4rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.skill-name {
    font-weight: 600;
}

.skill-name i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.skill-bar {
    width: 100%;
    height: 10px;
    background-color: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    width: 0; /* Animated with JS */
    transition: width 1.5s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.tech-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 3rem;
}

.tech-icon {
    font-size: 3rem;
    color: var(--text-muted);
    transition: var(--transition-speed);
}

.tech-icon:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* === Projects Section === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    backdrop-filter: var(--glass-filter);
    border-radius: 20px;
    overflow: hidden;
    border: var(--glass-border);
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.3);
    transition: var(--transition-speed);
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 10px 40px -10px var(--primary-glow), 0 20px 30px -10px rgba(0,0,0,0.5);
    border-color: var(--primary-color);
}

.project-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-speed);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 1.5rem;
}

.btn-icon {
    width: 50px;
    height: 50px;
    background-color: #fff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: var(--transition-speed);
}

.btn-icon:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.project-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    background-color: var(--highlight-bg);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* === Contact Section === */
.contact-wrapper {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.contact-links {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.contact-item i {
    width: 60px;
    height: 60px;
    background-color: var(--card-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    border: 1px solid var(--border-color);
}

.contact-item h4 {
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.contact-item p {
    margin-bottom: 0;
    font-size: 1rem;
}

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

.social-btn {
    width: 45px;
    height: 45px;
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-filter);
    color: var(--text-color);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    border: var(--glass-border);
    transition: var(--transition-speed);
}

.social-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-8px) scale(1.2) rotate(-5deg);
    box-shadow: 0 0 20px var(--primary-glow);
    border-color: transparent;
}

.contact-form {
    background-color: var(--card-bg);
    backdrop-filter: var(--glass-filter);
    padding: 3rem;
    border-radius: 24px;
    border: var(--glass-border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

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

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background-color: var(--bg-alt-color);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-speed);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-block {
    width: 100%;
    border: none;
    font-size: 1.1rem;
}

/* === Footer === */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
}

.footer-bottom i {
    color: #ef4444;
}

/* === Scroll To Top === */
.scroll-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px var(--primary-glow);
    z-index: 999;
    transition: var(--transition-speed);
}

.scroll-btn:hover {
    transform: translateY(-5px);
    background-color: var(--secondary-color);
}

/* === Animations === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.active-reveal {
    opacity: 1 !important;
    transform: translate(0) scale(1) !important;
}

/* New Animation Variants */
.reveal-zoom {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal-stagger {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

/* === Mobile Menu & Responsive Layout === */
@media (max-width: 992px) {
    .navbar {
        padding: 1rem 0;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 75%;
        height: 100vh;
        background-color: var(--bg-color);
        backdrop-filter: var(--glass-filter);
        background-image: linear-gradient(to right, var(--bg-color), var(--bg-alt-color));
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 7rem 2.5rem 3rem 2.5rem;
        text-align: left;
        visibility: hidden;
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        margin: 0;
        overflow-y: auto;
        border-right: 1px solid var(--primary-glow);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    .nav-menu.show {
        left: 0;
        visibility: visible;
        opacity: 1;
    }
    
    .nav-actions {
        z-index: 1001;
    }
    
    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-link {
        padding: 0.8rem 0;
        width: auto;
        display: inline-block;
        font-size: 1.1rem;
    }

    .nav-link::after {
        left: 0;
        transform: none;
        width: 0;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 2rem;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .hero-description {
        margin: 0 auto 2.5rem auto;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .hero-icons {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .personal-details {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 2rem;
    }
}
