:root {
    /* Light Theme (Default) */
    --bg-color: #fafafa;
    --sidebar-bg: #f5f4f0; /* Off-white for sidebar like the screenshot */
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-light: #9ca3af;
    --accent-color: #1d4ed8;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --hover-bg: #f3f4f6;
    --nav-hover: #e5e7eb;
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-color: #121212;
    --sidebar-bg: #181818;
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --accent-color: #60a5fa;
    --border-color: #374151;
    --card-bg: #1e1e1e;
    --hover-bg: #27272a;
    --nav-hover: #27272a;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.2s ease, color 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

/* Layout Split */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 320px;
    min-width: 320px;
    background-color: var(--sidebar-bg);
    height: 100vh;
    position: sticky;
    top: 0;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 2rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.sidebar-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.sidebar-title {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.sidebar-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.social-icon:hover {
    background-color: var(--hover-bg);
    border-color: var(--text-primary);
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e3a8a; /* Deep blue from screenshot */
    color: white;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
    transition: background-color 0.2s ease;
}

[data-theme="dark"] .btn-download {
    background-color: #3b82f6;
    color: #111;
}

.btn-download:hover {
    background-color: #1e40af;
    opacity: 1;
}

/* Nav Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: auto; /* Pushes footer to bottom */
}

.nav-link {
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    background-color: var(--nav-hover);
    color: var(--text-primary);
    opacity: 1;
}

.nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--hover-bg);
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Main Content */
.content {
    flex-grow: 1;
    padding: 4rem;
    max-width: 900px;
}

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.mobile-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.profile-img-mobile {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Sections */
.section {
    padding-bottom: 5rem;
    margin-bottom: 5rem;
    border-bottom: 1px solid var(--border-color);
}

.section:last-child {
    border-bottom: none;
}

.section-label {
    color: var(--accent-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

/* Hero Elements */
.hero {
    padding-top: 2rem;
}
.subtitle {
    color: var(--accent-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}
.title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}
.bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 2.5rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.stat-box h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.stat-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Badges */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.badge {
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}
.badge:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Research Card */
.research-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    background: var(--card-bg);
    transition: box-shadow 0.3s ease;
}
.research-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}
.research-meta {
    color: var(--accent-color);
    font-size: 0.85rem;
    font-family: 'Inter', monospace;
    margin-bottom: 1rem;
}
.research-heading {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.research-authors {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}
.research-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.metric-box {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    background: var(--bg-color);
}
.metric-box h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.metric-box p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.toggle-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}
.abstract-content {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    display: block;
}
.abstract-content.hidden {
    display: none;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.project-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    transition: all 0.3s ease;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: var(--accent-color);
}
.project-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid var(--border-color);
}
.timeline-item {
    margin-bottom: 2.5rem;
    position: relative;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.8rem;
    top: 0.3rem;
    width: 10px;
    height: 10px;
    background-color: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
}
.timeline-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.timeline-meta {
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
    margin-left: 0.5rem;
}
.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Skills Category */
.skills-category {
    margin-bottom: 2rem;
}
.skills-heading {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Contact */
.contact-box {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    background: var(--card-bg);
}
.contact-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.contact-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
    background: var(--bg-color);
}
.contact-btn:hover {
    background-color: var(--hover-bg);
    border-color: var(--text-primary);
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .layout-wrapper {
        flex-direction: column;
    }
    .mobile-header {
        display: flex;
    }
    .sidebar {
        display: none; /* Hide sidebar by default on mobile */
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 2rem 1.5rem;
    }
    .sidebar.open {
        display: flex; /* Show when menu button clicked */
    }
    .content {
        padding: 2rem 1.5rem;
    }
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .title {
        font-size: 2rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}
