/* 
   Theme: Modern Dark Tech 
   Author: Antigravity
*/

:root {
    --primary-color: #2980b9;
    --secondary-color: #3498db;
    --accent-color: #8e44ad;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --primary-color: #2980b9;
    --secondary-color: #3498db;
    --accent-color: #9b59b6;
    --dark-bg: #f8fafc;
    /* actually light bg */
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --border-color: #ccc;
}

[data-theme="light"] .section-title {
    -webkit-text-stroke: 1px var(--primary-color);
    /* Help visibility if needed */
}

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

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 1.125rem;
    cursor: none;
}

/* Custom Cursor Styles */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }
    .cursor-dot, .cursor-outline, #smoke-canvas {
        display: none;
    }
}

#smoke-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

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

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

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: block;
    width: fit-content;
    margin: 0 auto 3rem auto;
    max-width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

section {
    padding: 5rem 0;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-container:hover .logo-img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(52, 152, 219, 0.5));
}

.theme-toggle {
    margin-left: 2rem;
    cursor: pointer;
    font-size: 1.2rem;
    color: #ffffff;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 50%;
}

.theme-toggle:hover {
    background: rgba(128, 128, 128, 0.1);
    color: var(--secondary-color);
}

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

.nav-links a {
    font-weight: 500;
    color: #e2e8f0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    /* overflow: hidden; Removed to allow content to expand if needed */
}

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

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-text h1 span {
    color: var(--secondary-color);
}

.hero-text h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-info div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    color: var(--primary-color);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    /* Ensure buttons wrap if they don't fit */
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.4);
}

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

.btn-outline {
    border: 2px solid var(--border-color);
    /* Undefined var fixed below defined implicitly by usage context, replaced with hex or var */
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

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

.img-wrapper {
    width: 350px;
    height: 350px;
    /* Square base */
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    /* Blob shape initial */
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(41, 128, 185, 0.5);
    animation: blob-bounce 8s infinite ease-in-out;
    background: var(--card-bg);
}

.slideshow-container {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: inherit;
    /* Inherit blob shape */
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    border-radius: inherit;
    /* Inherit blob shape to ensure clipping */
}

.slide.active {
    opacity: 1;
}

@keyframes blob-bounce {
    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%;
    }
}

/* About Section */
.about-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.about-card p {
    font-size: 1.25rem;
    /* Larger text for Objective */
    line-height: 1.8;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.about-card h3 {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Education Section */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px var(--primary-color);
}

.edu-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.edu-card:hover {
    transform: translateX(10px);
    border-color: var(--secondary-color);
}

.edu-year {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

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

.skill-category {
    background: var(--glass);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.1);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.4rem;
}

.skill-category h3 i {
    font-size: 1.2rem;
    padding: 0.8rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 12px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

.skill-tag-alt {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.skill-tag-alt:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(142, 68, 173, 0.4);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    /* Reduced min-width for better mobile fit */
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--secondary-color);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

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

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.project-links {
    display: flex;
    align-items: center;
}

.project-links i {
    transition: var(--transition);
}

.project-links i:hover {
    color: var(--primary-color) !important;
    transform: scale(1.2);
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-secondary);
}

.project-desc ul {
    list-style: disc;
    padding-left: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.project-desc li {
    margin-bottom: 0.3rem;
}

/* Section Subheaders */
/* Research Section Specifics */
#research .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

#research .project-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid var(--accent-color);
    box-shadow: 0 4px 20px rgba(142, 68, 173, 0.1);
}

#research .project-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-align: left;
    border-bottom: 1px solid rgba(142, 68, 173, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

#research .project-desc ul {
    list-style: none;
    padding-left: 0;
}

#research .project-desc li {
    position: relative;
    padding-left: 1.5rem;
}

#research .project-desc li::before {
    content: '◈';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Section Subheaders */
.subsection-title {
    font-size: 2.5rem;
    margin: 4rem auto 2rem auto;
    text-align: center;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    width: fit-content;
}

.subsection-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Footer */
footer {
    background: #0b1120;
    padding: 3rem 0;
    margin-top: 5rem;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-icon {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-icon:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

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

    .menu-btn {
        display: block;
        z-index: 1001;
        /* Ensure above active nav */
    }

    nav {
        height: 70px;
        /* Slightly smaller header on mobile */
    }

    .nav-links {
        position: fixed;
        top: 0;
        /* Cover full screen including header area */
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        /* Less transparent for readability */
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 999;
        gap: 2.5rem;
    }

    .nav-links a {
        font-size: 1.25rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        justify-items: center;
        /* Ensure centered items */
        text-align: center;
        gap: 2rem;
        /* Reduced gap since image has margin */
        padding-top: 6rem;
        padding-bottom: 2rem;
    }

    .hero-image {
        order: -1;
        /* Move image to top: Verified for Mobile */
        margin-bottom: 1.5rem;
    }

    /* Better card padding on mobile */
    .about-card,
    .project-content,
    .edu-card {
        padding: 1.5rem;
    }

    /* Adjust Grid for very small screens */
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        /* Stack single column on mobile */
    }

    .hero-text h1 {
        font-size: 2.25rem;
        /* Slightly smaller than desktop but readable */
        margin-bottom: 0.5rem;
    }

    .hero-text h2 {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .contact-info {
        justify-content: center;
        font-size: 0.85rem;
        gap: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .img-wrapper {
        width: 200px;
        /* Smaller image on mobile */
        height: 200px;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-dot {
        left: -1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

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

    .subsection-title {
        font-size: 1.3rem;
    }

    .project-title {
        font-size: 1.1rem;
    }
}