:root {
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent: #2563eb;
    /* A professional blue */
    --accent-hover: #1d4ed8;
    --card-bg: #ffffff;
    --nav-height: 80px;
    --transition: all 0.3s ease;
    --border-color: #e2e8f0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #0f172a;
}

h2.section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.05rem;
    /* Slightly larger for better readability */
    line-height: 1.75;
    /* Improved line height */
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding-bottom: 0.25rem;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

/* Buttons */
.btn-primary {
    background-color: var(--accent);
    color: #ffffff !important;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 500 !important;
    display: inline-block;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1), 0 2px 4px -1px rgba(37, 99, 235, 0.06);
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.15), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    display: inline-block;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
    background-color: #f8fafc;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    min-height: 75vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    padding-bottom: 2rem;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
}

.tagline {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 1rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Hero Visual (Profile Photo) */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    position: relative;
    width: 280px;
    height: 280px;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 20px 20px 60px #d1d5db, -20px -20px 60px #ffffff;
    /* Neumorphic-ish soft shadow or just clean shadow */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Sections */
.section {
    padding: 3rem 0;
}

.bg-secondary {
    background-color: var(--bg-secondary);
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 2.5rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1rem;
    color: #334155;
    line-height: 1.7;
}

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

.stat-card {
    background: var(--card-bg);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-color: var(--accent);
}

.stat-card i {
    font-size: 1.3rem;
    color: var(--accent);
    background: rgba(37, 99, 235, 0.1);
    padding: 8px;
    border-radius: 6px;
}

.stat-info h3 {
    font-size: 1rem;
    margin-bottom: 0.15rem;
    color: var(--text-primary);
    font-weight: 600;
}

.stat-info p {
    margin-bottom: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Project Card */
.project-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.05);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.project-role {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tags span {
    background: #f1f5f9;
    color: #475569;
    padding: 0.35rem 0.7rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Publications */
.publication-list {
    max-width: 800px;
    margin: 0 auto;
}

.pub-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pub-item:last-child {
    border-bottom: none;
}

.pub-year {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 55px;
}

.pub-details h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    font-weight: 600;
}

.journal {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    display: block;
    margin-bottom: 0.5rem;
}

.citations {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    display: inline-block;
}

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

.demo-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.demo-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.demo-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.demo-card p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.demo-card .btn-secondary {
    margin-top: 1rem;
}

/* Teaching Experience */
.teaching-list {
    max-width: 800px;
    margin: 0 auto;
}

.teaching-item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.teaching-item:last-child {
    border-bottom: none;
}

.teaching-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.teaching-role {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.teaching-item p:last-child {
    margin-bottom: 0;
}

/* Project Card spacing for multiple cards */
.project-card+.project-card {
    margin-top: 1.5rem;
}

/* Contact / Footer */
.footer-section {
    text-align: center;
    background-color: var(--bg-secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.social-btn {
    background: var(--card-bg);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.social-btn:hover {
    background: var(--accent);
    color: #ffffff !important;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.main-column {
    min-width: 0;
    /* Prevents grid blowout */
}

.side-column {
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 3rem;
}

.sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Collaborators Cloud */
.collaborators-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.collaborators-cloud span {
    background: var(--bg-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.collaborators-cloud span:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: #fff;
}

/* Compact Teaching */
.teaching-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.teaching-item-compact {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.teaching-item-compact h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.teaching-item-compact .role {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.teaching-item-compact .desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.4;
}

/* Responsive Split */
@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .side-column {
        position: static;
    }
}

/* Responsive General */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .image-container {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }

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

    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
        cursor: pointer;
    }

    .hamburger .bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-primary);
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    /* Mobile Menu Active State */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
        gap: 1.5rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}