/* CSS Design System for Premium Portfolio Website */

:root {
    --bg-dark: #070a13;
    --bg-card: rgba(17, 24, 39, 0.55);
    --bg-navbar: rgba(7, 10, 19, 0.75);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(6, 182, 212, 0.5);
    /* Text Colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-inverse: #070a13;
    /* Theme Accents */
    --color-primary: #a855f7; /* Purple */
    --color-secondary: #06b6d4; /* Cyan */
    --color-accent: #34d399; /* Emerald */
    --gradient-accent: linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    /* Shadows & Transitions */
    --shadow-glow: 0 0 25px rgba(168, 85, 247, 0.25);
    --shadow-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* ==========================================================================
   Global & Layout Styles
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Blobs */
.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.25;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--color-secondary);
    top: 50%;
    left: -200px;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--color-accent);
    bottom: -100px;
    right: 10%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

/* Scroll Revel animations class */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

    .scroll-reveal.active {
        opacity: 1;
        transform: translateY(0);
    }

/* Helper Elements */
.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Navigation Bar (Header)
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-navbar);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
}

    .navbar.scrolled {
        padding: 0.5rem 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

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

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

    .nav-logo span {
        color: var(--color-secondary);
    }

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 0.3rem 0;
    transition: var(--transition-fast);
}

    .nav-link:hover, .nav-link.active {
        color: var(--text-main);
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--gradient-accent);
        transition: var(--transition-fast);
    }

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

.nav-cta {
    background: var(--gradient-accent);
    color: var(--text-inverse);
    padding: 0.6rem 1.4rem;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-glow);
    transition: var(--transition-smooth);
}

    .nav-cta:hover {
        transform: translateY(-2px);
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.45);
    }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.4rem;
    cursor: pointer;
}

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

.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

    .theme-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        color: var(--color-secondary);
        transform: scale(1.05);
    }

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 100px;
    padding-bottom: 50px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(168, 85, 247, 0.1);
    color: var(--color-primary);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

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

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

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--text-inverse);
    border: none;
    box-shadow: var(--shadow-glow);
}

    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 0 35px rgba(168, 85, 247, 0.45);
    }

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-3px);
    }

.hero-socials {
    display: flex;
    gap: 1.2rem;
}

.social-link {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

    .social-link:hover {
        color: var(--color-secondary);
        background: rgba(6, 182, 212, 0.05);
        border-color: rgba(6, 182, 212, 0.3);
        transform: translateY(-2px);
        box-shadow: var(--shadow-glow-cyan);
    }

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);
    border: 1px solid var(--border-color);
}

.avatar-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--gradient-accent);
    filter: blur(20px);
    opacity: 0.3;
    z-index: -1;
    animation: pulseGlow 6s infinite alternate;
}

.hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-dark);
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
    animation: bounceDown 2s infinite;
}

/* ==========================================================================
   Section Header Utility
   ========================================================================== */

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

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-tagline {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 99px;
}

/* ==========================================================================
   About & Skills Section
   ========================================================================== */

.about-section {
    overflow: visible;
}

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

.about-bio,
.about-skills {
    padding-left: 0;
}

.skills-side-img {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 240px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.3));
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.4s ease;
}

    .skills-side-img.visible {
        opacity: 1;
    }

.about-bio {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bio-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.bio-text {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

.about-skills {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skills-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.8rem;
    transition: var(--transition-smooth);
}

    .skills-category:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow: var(--shadow-card);
    }

.category-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

    .category-title i {
        font-size: 1.2rem;
    }

.text-primary {
    color: #c084fc;
}

.text-secondary {
    color: #38bdf8;
}

.text-accent {
    color: #34d399;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

    .skill-tag:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }

/* ==========================================================================
   Projects Section
   ========================================================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    position: relative;
    border-radius: 20px;
    height: 380px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}

.project-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Overlay gradient and typography centered inside the project image */
.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 10, 19, 0.95) 0%, rgba(7, 10, 19, 0.4) 60%, rgba(7, 10, 19, 0.1) 100%);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    opacity: 0.9;
    transition: var(--transition-smooth);
}

.project-card:hover .project-card-image {
    transform: scale(1.08);
}

.project-card:hover .project-card-overlay {
    background: linear-gradient(to top, rgba(7, 10, 19, 0.98) 0%, rgba(7, 10, 19, 0.65) 50%, rgba(7, 10, 19, 0.3) 100%);
}

.project-card-category {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
    transform: translateY(10px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.project-card-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 0.8rem;
    transition: var(--transition-smooth);
}

.project-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.4;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-smooth);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 2px;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-smooth);
}

/* Animations on project card hover */
.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.15);
}

    .project-card:hover .project-card-category,
    .project-card:hover .project-card-excerpt,
    .project-card:hover .project-card-action {
        transform: translateY(0);
        opacity: 1;
    }

/* Project Skeleton Loader */
.projects-loader {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.skeleton-card {
    height: 380px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 37%, rgba(255,255,255,0.03) 63%);
    background-size: 400% 100%;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    animation: skeletonShimmer 1.4s ease infinite;
}

.projects-error {
    text-align: center;
    padding: 3rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 16px;
    color: #ef4444;
}

    .projects-error i {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

/* ==========================================================================
   Companies Section
   ========================================================================== */

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2.5rem;
    justify-content: center;
    align-items: center;
}

.company-logo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: var(--transition-smooth);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

    .company-logo-card:hover {
        border-color: rgba(255, 255, 255, 0.15);
        background: rgba(255, 255, 255, 0.04);
        transform: translateY(-4px);
        box-shadow: var(--shadow-card);
    }

.company-logo {
    max-height: 48px;
    max-width: 100%;
    object-fit: contain;
}

/* Standardized styled text logo when client image is missing */
.company-text-logo {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: -0.5px;
    transition: var(--transition-fast);
}

.company-logo-card:hover .company-text-logo {
    color: #fff;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Contact Section & Glassmorphic Form
   ========================================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.info-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

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

.info-details {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.info-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition-fast);
}

a.info-value:hover {
    color: var(--color-secondary);
}

.contact-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    box-shadow: var(--shadow-card);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    transition: opacity 0.3s ease;
}

.form-group {
    position: relative;
    width: 100%;
}

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 1rem 1.2rem;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        color: #fff;
        font-family: var(--font-body);
        font-size: 0.95rem;
        outline: none;
        transition: var(--transition-smooth);
    }

    .form-group textarea {
        resize: none;
    }

    .form-group label {
        position: absolute;
        left: 1.2rem;
        top: 1rem;
        color: var(--text-muted);
        font-size: 0.95rem;
        pointer-events: none;
        transition: var(--transition-smooth);
    }

    .form-group textarea ~ label {
        top: 1rem;
    }

    /* Floating Label Animation */
    .form-group input:focus,
    .form-group textarea:focus {
        background: rgba(255, 255, 255, 0.04);
        border-color: var(--color-secondary);
        box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
    }

        .form-group input:focus ~ label,
        .form-group input:not(:placeholder-shown) ~ label,
        .form-group textarea:focus ~ label,
        .form-group textarea:not(:placeholder-shown) ~ label {
            top: -0.65rem;
            left: 0.8rem;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--color-secondary);
            background-color: #0b0f19;
            padding: 0 0.5rem;
            border-radius: 4px;
        }

.btn-submit {
    border: none;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-loader {
    position: absolute;
}

/* Success Card Inside Form Overlay */
.form-success-message {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    background: var(--bg-card);
    border-radius: 24px;
    z-index: 5;
    animation: fadeIn 0.4s ease forwards;
}

.success-icon {
    font-size: 4rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.form-success-message h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

.form-success-message p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 300px;
}

/* ==========================================================================
   Project Detail Modal
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-card {
    background: #0d1222;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition-fast);
}

    .modal-close-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--color-secondary);
        transform: rotate(90deg);
    }

.modal-body {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    min-height: 600px;
}

/* Modal Gallery Slider */
.modal-gallery-container {
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-color);
    height: 100%;
    min-height: 600px;
}

.modal-carousel {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

    .carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #000;
    }

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(7, 10, 19, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

    .carousel-control:hover {
        background: var(--gradient-accent);
        color: var(--text-inverse);
        border-color: transparent;
    }

    .carousel-control.prev {
        left: 1rem;
    }

    .carousel-control.next {
        right: 1rem;
    }

.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition-fast);
}

    .dot.active {
        background: var(--color-secondary);
        width: 20px;
        border-radius: 10px;
    }

/* Modal Content Details */
.modal-content-details {
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-category {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.modal-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.modal-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.modal-actions {
    display: flex;
    gap: 1.2rem;
}

    .modal-actions .btn {
        padding: 0.7rem 1.6rem;
        font-size: 0.9rem;
        border-radius: 10px;
        flex: 1;
    }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    background: #05070e;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
}

    .footer-logo span {
        color: var(--color-secondary);
    }

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

    .footer-copy i {
        font-size: 0.8rem;
    }

/* ==========================================================================
   Animations & Keyframes
   ========================================================================== */

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        opacity: 0.25;
    }

    100% {
        transform: scale(1.15);
        opacity: 0.35;
    }
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -8px);
    }

    60% {
        transform: translate(-50%, -4px);
    }
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero-visual {
        order: -1;
    }

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

    .skills-side-img {
        display: none;
    }

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

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-gallery-container {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        min-height: 350px;
    }

    .modal-content-details {
        padding: 2.2rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: #070a13;
        flex-direction: column;
        align-items: center;
        padding-top: 3rem;
        gap: 2rem;
        transition: var(--transition-smooth);
        border-top: 1px solid var(--border-color);
        z-index: 999;
    }

        .nav-menu.active {
            left: 0;
        }

    .nav-link {
        font-size: 1.2rem;
    }

    .nav-cta {
        display: none; /* Hide on mobile navbar, let them use contact section */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-image-wrapper {
        width: 250px;
        height: 250px;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-form-card {
        padding: 2rem 1.5rem;
    }

    .modal-card {
        max-height: 95vh;
        border-radius: 16px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* ==========================================================================
   Light Theme Overrides
   ========================================================================== */

body.light-theme {
    --bg-dark: #f8fafc; /* slate-50 */
    --bg-card: rgba(255, 255, 255, 0.75); /* white glassmorphism */
    --bg-navbar: rgba(248, 250, 252, 0.85); /* navbar slate-50 glass */
    --border-color: rgba(15, 23, 42, 0.08); /* slate-900 transparent border */
    --border-focus: rgba(6, 182, 212, 0.6);
    --text-main: #0f172a; /* slate-900 */
    --text-muted: #475569; /* slate-600 */
    --text-inverse: #ffffff;
    --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.05);
    --shadow-glow: 0 4px 15px rgba(168, 85, 247, 0.2);
    --shadow-glow-cyan: 0 4px 15px rgba(6, 182, 212, 0.2);
}

    /* Lower opacity glowing blobs on light theme so text remains legible */
    body.light-theme .glow-blob {
        opacity: 0.12;
    }

    /* Theme Toggle Button hover states in light theme */
    body.light-theme .theme-toggle-btn {
        background: rgba(0, 0, 0, 0.03);
    }

        body.light-theme .theme-toggle-btn:hover {
            background: rgba(0, 0, 0, 0.08);
        }

    /* Light Theme Navigation Overrides */
    body.light-theme .navbar {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    }

    /* Hero Section */
    body.light-theme .hero-avatar {
        border-color: #f8fafc;
    }

    body.light-theme .hero-subtitle {
        background: rgba(168, 85, 247, 0.06);
        border-color: rgba(168, 85, 247, 0.15);
    }

    body.light-theme .btn-secondary {
        background: rgba(255, 255, 255, 0.6);
        color: #0f172a;
        border-color: rgba(15, 23, 42, 0.1);
    }

        body.light-theme .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.9);
            border-color: rgba(15, 23, 42, 0.2);
        }

    body.light-theme .social-link {
        background: rgba(0, 0, 0, 0.02);
    }

        body.light-theme .social-link:hover {
            background: rgba(6, 182, 212, 0.05);
        }

    /* Skills Category Cards */
    body.light-theme .skills-category {
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
    }

    body.light-theme .skill-tag {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.05);
        color: #334155;
    }

        body.light-theme .skill-tag:hover {
            background: rgba(0, 0, 0, 0.06);
            border-color: rgba(0, 0, 0, 0.12);
        }

    /* Project Cards */
    body.light-theme .project-card {
        border-color: rgba(15, 23, 42, 0.08);
    }

    body.light-theme .skeleton-card {
        background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.06) 37%, rgba(0,0,0,0.03) 63%);
        background-size: 400% 100%;
    }

    /* Companies Grid */
    body.light-theme .company-logo-card {
        box-shadow: 0 4px 15px rgba(15, 23, 42, 0.02);
    }

        body.light-theme .company-logo-card:hover {
            background: rgba(255, 255, 255, 0.8);
            border-color: rgba(15, 23, 42, 0.12);
        }

    body.light-theme .company-text-logo {
        color: #475569;
    }

    body.light-theme .company-logo-card:hover .company-text-logo {
        color: #0f172a;
        background: var(--gradient-accent);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    /* Contact Section */
    body.light-theme .info-icon {
        background: rgba(168, 85, 247, 0.06);
        border-color: rgba(168, 85, 247, 0.15);
    }

    body.light-theme .contact-form-card {
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.04);
    }

    body.light-theme .form-group input,
    body.light-theme .form-group textarea {
        background: rgba(0, 0, 0, 0.01);
        border-color: rgba(0, 0, 0, 0.08);
        color: #0f172a;
    }

        body.light-theme .form-group input:focus,
        body.light-theme .form-group textarea:focus {
            background: rgba(255, 255, 255, 0.8);
            border-color: var(--color-secondary);
        }

    body.light-theme .form-group label {
        color: #64748b;
    }

    body.light-theme .form-group input:focus ~ label,
    body.light-theme .form-group input:not(:placeholder-shown) ~ label,
    body.light-theme .form-group textarea:focus ~ label,
    body.light-theme .form-group textarea:not(:placeholder-shown) ~ label {
        background-color: #f8fafc;
    }

    /* Footer */
    body.light-theme .footer {
        background: #f1f5f9;
        border-top-color: rgba(15, 23, 42, 0.08);
    }

    /* Modal Details */
    body.light-theme .modal-card {
        background: #ffffff;
        border-color: rgba(15, 23, 42, 0.08);
        box-shadow: 0 30px 60px rgba(15, 23, 42, 0.15);
    }

    body.light-theme .modal-close-btn {
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.06);
        color: #0f172a;
    }

        body.light-theme .modal-close-btn:hover {
            background: rgba(0, 0, 0, 0.08);
        }

    body.light-theme .modal-gallery-container {
        background: #f8fafc;
        border-right-color: rgba(15, 23, 42, 0.08);
    }

    body.light-theme .modal-title {
        color: #0f172a;
    }

    body.light-theme .carousel-control {
        background: rgba(255, 255, 255, 0.7);
        border-color: rgba(15, 23, 42, 0.08);
        color: #0f172a;
    }

        body.light-theme .carousel-control:hover {
            background: var(--gradient-accent);
            color: #ffffff;
        }

    body.light-theme .dot {
        background: rgba(0, 0, 0, 0.15);
    }

        body.light-theme .dot.active {
            background: var(--color-secondary);
        }

@media (max-width: 768px) {
    body.light-theme .nav-menu {
        background: #f8fafc;
    }
}
