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

:root {
    /* Light theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #dee2e6;
    --link-color: #0066cc;
    --link-hover: #0052a3;
    --accent-color: #495057;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark theme colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --border-color: #404040;
    --link-color: #4dabf7;
    --link-hover: #74c0fc;
    --accent-color: #ced4da;
    --shadow: rgba(0, 0, 0, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

.nav-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    position: relative;
}

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

.nav-link.active {
    color: var(--text-primary);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Main Content */
.main-content {
    padding-top: 2rem;
}

.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.section-heading {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Home Section */
.home-section {
    padding-top: 3rem;
}

.home-header {
    text-align: center;
    margin-bottom: 3rem;
}

.profile-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px var(--shadow);
}

.home-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.home-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.home-organization {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.contact-info-header {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.contact-info-header p {
    margin-bottom: 0.5rem;
}

.contact-info-header a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-info-header a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Biography */
.biography {
    margin-top: 3rem;
}

/* Research Pillars */
.research-pillars {
    margin-top: 4rem;
}

.pillar-item {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.pillar-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.pillar-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.pillar-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.pillar-content p {
    margin-bottom: 1.5rem;
}

.pillar-content a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pillar-content a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.pillar-content em {
    font-style: italic;
    color: var(--text-primary);
}

.bio-content p {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.8;
}

.bio-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.bio-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.interests-list,
.education-list {
    list-style: none;
}

.interests-list li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.education-list li {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.education-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* News Section */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-date {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
    flex-shrink: 0;
}

.news-content {
    color: var(--text-secondary);
    flex: 1;
}

/* Publications */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.publication-item {
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.publication-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    background: var(--bg-primary);
}

.publication-item::before {
    content: '📄';
    position: absolute;
    left: -15px;
    top: 1.5rem;
    font-size: 1.5rem;
    background: var(--bg-primary);
    padding: 0.25rem;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.publication-item[data-type="article"]::before {
    content: '📰';
}

.publication-item[data-type="inproceedings"]::before {
    content: '🎯';
}

.publication-item[data-type="proceedings"]::before {
    content: '📚';
}

.publication-item[data-type="book"]::before {
    content: '📖';
}

.publication-item[data-type="phdthesis"]::before {
    content: '🎓';
}

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

.publication-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
    padding-left: 2rem;
}

.publication-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.publication-title a:hover {
    color: var(--primary-color);
}

.publication-authors {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 2rem;
    font-size: 0.95rem;
}

.publication-venue {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-style: italic;
    padding-left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.publication-venue::before {
    content: '🏛️';
    font-style: normal;
}

.publication-badge {
    display: inline-block;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 500;
    font-style: normal;
    margin-left: 0.5rem;
}

.publication-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.publication-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-left: 2rem;
    margin-top: 0.75rem;
}

.pub-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.pub-link::before {
    content: '🔗';
    font-size: 0.75rem;
}

.pub-link[href*="doi.org"]::before {
    content: '📎';
}

.pub-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Talks */
.talks-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.talk-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.talk-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.talk-meta {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.talk-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.talk-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.talk-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.talk-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Posts */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.post-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Experience */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.experience-item {
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.experience-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.experience-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.experience-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.experience-org {
    color: var(--text-secondary);
    font-weight: 500;
}

.experience-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: auto;
}

.experience-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Teaching */
.teaching-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

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

.teaching-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.teaching-meta {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.teaching-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

.students-tabs {
    display: inline-flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.students-tab {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
}

.students-tab.active {
    color: var(--text-primary);
}

.students-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.students-content {
    position: relative;
}

.students-panel {
    display: none;
}

.students-panel.active {
    display: block;
}

.students-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.students-list li {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.students-list li span {
    display: block;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.scrollable-section {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-right: -0.5rem;
}

.scrollable-section::-webkit-scrollbar {
    width: 8px;
}

.scrollable-section::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.scrollable-section::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

.scrollable-section::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* CV Section */
.cv-download {
    text-align: center;
    padding: 2rem 0;
}

.cv-download p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.btn-download {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.btn-download:hover {
    opacity: 0.8;
}

/* Section Footer */
.section-footer {
    margin-top: 2rem;
    text-align: center;
}

.see-all-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.see-all-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        padding: 2rem;
        box-shadow: 0 4px 6px var(--shadow);
        transition: left 0.3s ease;
        border-top: 1px solid var(--border-color);
    }

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

    .hamburger {
        display: flex;
    }

    .container {
        padding: 0 1.5rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .home-name {
        font-size: 2rem;
    }

    .home-title {
        font-size: 1.25rem;
    }

    .home-organization {
        font-size: 1.1rem;
    }

    .bio-details {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .news-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .news-date {
        min-width: auto;
    }

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .experience-date {
        margin-left: 0;
    }

    .section {
        padding: 3rem 0;
    }
}

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

    .profile-image {
        width: 120px;
        height: 120px;
    }

    .home-name {
        font-size: 1.75rem;
    }

    .section-heading {
        font-size: 1.5rem;
    }
}
