/* --- Global Styles & Variables --- */
:root {
    /* Dark Theme (Default) - True Black & Glowing Indigo */
    --bg-color: #000000;
    --card-bg-color: #0a0a0a;
    --header-bg-color: rgba(0, 0, 0, 0.8);
    --text-color: #e5e5e5;
    --heading-color: #ffffff;
    --accent-color: #6366f1;
    /* Indigo 500 - brighter pop */
    --border-color: #1f1f1f;
    --shadow-color: rgba(99, 102, 241, 0.15);
    /* Subtle colored glow */
    --button-hover-color: rgba(99, 102, 241, 0.2);
    --secondary-text-color: #94a3b8;

    /* Light Theme Variables */
    --light-bg-color: #ffffff;
    --light-card-bg-color: #f3f4f6;
    --light-header-bg-color: rgba(255, 255, 255, 0.9);
    --light-text-color: #1f2937;
    --light-heading-color: #000000;
    --light-accent-color: #4f46e5;
    --light-border-color: #e5e7eb;
    --light-shadow-color: rgba(0, 0, 0, 0.1);
    --light-button-hover-color: rgba(79, 70, 229, 0.1);
    --light-secondary-text-color: #4b5563;

    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.7;
    transition: background-color 0.5s ease, color 0.5s ease;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a,
button {
    cursor: pointer;
}

/* --- Global Section Styles --- */
.section-container {
    padding: 120px 20px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    background-color: var(--bg-color);
    transition: background-color 0.5s ease;
}

/* Keep hero section transparent for background */
#hero.section-container {
    background-color: transparent;
}


.section-title {
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    transition: color 0.5s ease;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 15px auto 0;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.5s ease;
    box-shadow: 0 0 10px var(--accent-color);
    /* Glow effect */
}

.section-title:hover::after {
    width: 100%;
}

/* --- Header & Navigation --- */
#header {
    position: fixed;
    width: 100%;
    z-index: 100;
    background: var(--header-bg-color);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: top 0.3s, background-color 0.5s ease, border-color 0.5s ease;
}

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

.logo {
    color: var(--heading-color);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.5s ease;
}

.logo span {
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    margin-left: auto;
}

.nav-links li {
    margin-left: 2.5rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.contact-btn {
    border: 1px solid var(--accent-color);
    color: var(--accent-color) !important;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.contact-btn:hover {
    background-color: var(--accent-color);
    color: #fff !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* --- Theme Switch Toggle --- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: var(--accent-color);
    bottom: 4px;
    content: "";
    height: 24px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 24px;
    z-index: 2;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.slider i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.slider .fa-sun {
    left: 8px;
    color: #fcd34d;
    /* Yellow for sun */
    opacity: 0;
}

.slider .fa-moon {
    right: 8px;
    color: #cbd5e1;
    /* Light gray for moon */
    opacity: 1;
}

input:checked+.slider {
    background-color: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-color);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

input:checked+.slider .fa-sun {
    opacity: 1;
}

input:checked+.slider .fa-moon {
    opacity: 0;
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .theme-switch-wrapper {
        margin-left: auto;
        margin-right: 10px;
    }
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 6px;
    transition: all 0.3s ease;
}

/* --- Hero Section (True Black & Aurora Glow) --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 2rem;
    background-color: #000000;
    overflow: hidden;
}

/* Animated Aurora Effect - Subtle & Corner-based */
#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.08), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(79, 70, 229, 0.08), transparent 40%);
    animation: auroraMove 25s linear infinite;
    z-index: 0;
    filter: blur(120px);
    /* Increased blur for seamless blending */
    opacity: 0.8;
}

@keyframes auroraMove {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#hero .hero-content {
    position: relative;
    z-index: 1;
}

#hero .intro-text {
    color: var(--accent-color);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

#hero .hero-title {
    font-size: clamp(48px, 8vw, 90px);
    color: var(--heading-color);
    line-height: 1.1;
    margin-bottom: 10px;
}

#hero .hero-subtitle {
    font-size: clamp(32px, 5vw, 60px);
    color: var(--secondary-text-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

#hero .hero-description {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    max-width: 600px;
    line-height: 1.8;
}

/* --- Status Badge (Thesis) --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 50px;
    margin-top: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-color);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.status-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10B981;
    /* Emerald Green */
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

#hero .social-links {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

#hero .social-link-item {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#hero .social-link-item:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

#hero .social-link-item i {
    font-size: 1.4rem;
}

/* --- About Section --- */
.about-content {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.about-text {
    flex: 3;
}

.about-text p {
    margin-bottom: 15px;
}

.tech-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 10px;
    list-style: none;
    padding-left: 0;
}

.tech-list li {
    position: relative;
    padding-left: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.tech-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    transition: color 0.5s ease;
}

.about-image {
    flex: 2;
    max-width: 300px;
}

.image-wrapper {
    position: relative;
    border-radius: 4px;
}

.image-wrapper::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    z-index: -1;
    transition: all 0.3s ease, border-color 0.5s ease;
}

.image-wrapper:hover::after {
    top: 10px;
    left: 10px;
}

.image-wrapper img {
    width: 100%;
    border-radius: 4px;
    transition: filter 0.3s ease;
}

/* --- Experience (Timeline) --- */
.timeline {
    position: relative;
    padding-left: 50px;
    /* Increased padding for icons */
}

/* Glowing Timeline Line */
.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-item {
    margin-bottom: 60px;
    position: relative;
}

/* Timeline Icon Circle */
.timeline-icon {
    position: absolute;
    left: -51px;
    top: 0;
    width: 32px;
    height: 32px;
    background-color: #fff;
    /* White bg for logos */
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, box-shadow;
    overflow: hidden;
    /* Clip image to circle */
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.2);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.8);
}

.timeline-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-icon i {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Glassmorphism Card for Content */
.timeline-content {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

.timeline-item:hover .timeline-content {
    transform: translateX(10px);
    border-color: var(--accent-color);
}

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.timeline-item h3 {
    color: var(--heading-color);
    font-size: 1.2rem;
    margin: 0;
}

.company-name {
    color: var(--accent-color);
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--secondary-text-color);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.role-description {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Key Achievement Box */
.key-achievement {
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid var(--accent-color);
    padding: 10px 15px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.key-achievement i {
    color: #fbbf24;
    /* Gold color for trophy */
    margin-top: 3px;
}

.key-achievement span {
    font-size: 0.9rem;
    color: var(--heading-color);
}

/* Tech Badges */
.role-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-color);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.05);
    transition: all 0.3s ease;
}

.timeline-item:hover .tech-badge {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-color);
}

/* --- Projects --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg-color);
    border-radius: 12px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    will-change: transform;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    cursor: pointer;
    /* Make whole card clickable */
    position: relative;
    overflow: hidden;
}

.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px -15px var(--shadow-color);
    border-color: var(--accent-color);
}

/* Subtle glow on hover */
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(99, 102, 241, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

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

.project-title {
    color: var(--heading-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: var(--accent-color);
}

.project-problem {
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

.project-problem strong {
    color: var(--accent-color);
    font-family: var(--font-mono);
    font-weight: 600;
}

.project-tech {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    color: var(--text-color);
    font-size: 0.8rem;
}

.project-tech li {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.project-card:hover .project-tech li {
    background: rgba(99, 102, 241, 0.1);
    color: var(--heading-color);
}

.case-study-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-top: auto;
    width: 100%;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
    text-align: center;
    font-weight: 600;
}

.project-card:hover .case-study-btn {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* --- Skills Section --- */
.skills-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    margin-top: 2rem;
}

.skills-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.skills-chart-container {
    flex: 1;
    max-width: 500px;
    height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-category {
    background: var(--card-bg-color);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.skill-category h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--heading-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--accent-color);
}

.skill-list {
    list-style: none;
    padding: 0;
}

.skill-list li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-list li i {
    width: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.skill-list li:hover i {
    transform: scale(1.2);
}

/* --- Code Impact Section --- */
#activity {
    text-align: center;
}

.github-stats {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 800px;
    margin: 2rem auto 0;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.github-stats:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin-top: 0.25rem;
}

.stat-languages {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-tag {
    font-size: 0.85rem;
    color: var(--accent-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* --- Contact & Footer --- */
#contact {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-message {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Force 3 columns side-by-side */
    gap: 20px;
    margin-top: 2rem;
}

/* Responsive: Stack on smaller screens */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
    }
}

.contact-card {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
}

.contact-card i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.contact-card:hover i {
    transform: scale(1.1);
}

.contact-card h3 {
    color: var(--heading-color);
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

.contact-card p {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0;
    font-family: var(--font-mono);
    opacity: 0.8;
}

footer {
    padding: 3rem 1.5rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
    margin-top: 6rem;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* --- Case Study Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 20px;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg-color);
    padding: 0;
    /* Remove padding from container */
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    /* Clip children (scrollbar) */
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Inner content container handles scrolling */
#case-study-content {
    padding: 3rem;
    overflow-y: auto;
    height: 100%;

    /* Custom scrollbar for inner content */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--card-bg-color);
}

#case-study-content::-webkit-scrollbar {
    width: 8px;
}

#case-study-content::-webkit-scrollbar-track {
    background: var(--card-bg-color);
}

#case-study-content::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

#case-study-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color);
}

.modal-overlay.visible .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    /* Absolute relative to .modal-content */
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, 0.2);
    /* Slight background for visibility */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding-bottom: 4px;
    /* Center the X visually */
}

.modal-close-btn:hover {
    background: var(--accent-color);
    color: #fff;
}

#case-study-content h3 {
    color: var(--heading-color);
    font-size: 2rem;
    margin-bottom: 2rem;
}

#case-study-content h4 {
    color: var(--accent-color);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#case-study-content p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

#case-study-content ul {
    list-style: none;
    padding-left: 0;
}

#case-study-content ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 1rem;
}

#case-study-content ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

#case-study-content .outcome {
    background: rgba(99, 102, 241, 0.05);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    margin-top: 3rem;
}

#case-study-content .outcome p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--heading-color);
    font-weight: 500;
}

/*
==============================================
LIGHT THEME OVERRIDES
==============================================
*/
body.light-theme {
    --bg-color: var(--light-bg-color);
    --card-bg-color: var(--light-card-bg-color);
    --header-bg-color: var(--light-header-bg-color);
    --text-color: var(--light-text-color);
    --heading-color: var(--light-heading-color);
    --accent-color: var(--light-accent-color);
    --border-color: var(--light-border-color);
    --shadow-color: var(--light-shadow-color);
    --button-hover-color: var(--light-button-hover-color);
    --secondary-text-color: var(--light-secondary-text-color);

    /* Subtle Dot Grid Background */
    background-color: var(--light-bg-color);
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 24px 24px;
}



body.light-theme .project-card {
    border: 1px solid var(--border-color);
}

body.light-theme .nav-links a {
    color: var(--text-color);
}

body.light-theme .nav-links a:hover {
    color: var(--accent-color);
}

body.light-theme footer {
    background-color: var(--light-bg-color);
    border-top: 1px solid var(--border-color);
}

body.light-theme .skill-list li {
    color: var(--text-color);
}

/* --- Responsive Design & Mobile Nav --- */
@media (max-width: 768px) {
    .section-container {
        padding: 80px 20px;
    }

    /* Full Screen Mobile Nav */
    .theme-btn {
        margin-left: auto;
        margin-right: 10px;
    }

    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.95);
        /* Deep dark overlay */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateY(-100%);
        /* Slide down from top */
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 99;
        gap: 2rem;
    }

    .nav-links.nav-active {
        transform: translateY(0%);
    }

    .nav-links li {
        margin: 0;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .nav-links.nav-active li {
        opacity: 1;
        transform: translateY(0);
        /* Staggered animation handled in JS or via nth-child delays here */
    }

    /* Add delays for stagger effect */
    .nav-links.nav-active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.nav-active li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links.nav-active li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-links.nav-active li:nth-child(4) {
        transition-delay: 0.4s;
    }

    .nav-links.nav-active li:nth-child(5) {
        transition-delay: 0.5s;
    }

    .nav-links.nav-active li:nth-child(6) {
        transition-delay: 0.6s;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-family: var(--font-heading);
        font-weight: 700;
    }

    .burger {
        display: block;
        z-index: 100;
    }

    .about-content {
        flex-direction: column;
    }

    .about-image {
        margin: 50px auto 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
    background-color: var(--accent-color);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
    background-color: var(--accent-color);
}

/* Expandable Details */
.toggle-details-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.toggle-details-btn:hover {
    color: #fff;
}

.toggle-details-btn i {
    transition: transform 0.3s ease;
}

.toggle-details-btn.open i {
    transform: rotate(180deg);
}

.role-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease;
    opacity: 0;
}

.role-details.open {
    max-height: 500px;
    /* Arbitrary large height */
    opacity: 1;
    margin-top: 15px;
}

.role-details ul {
    list-style-type: none;
    padding-left: 10px;
}

.role-details li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

.role-details li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--primary);
}