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

/* Color Variables */
html {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #333;
    --text-secondary: #7f8c8d;
    --accent-color: #286983;
    --accent-dark: #1f5362;
    --link-color: #907aa9;
    --nav-text: #bdc3c7;
    --nav-text-light: #ecf0f1;
    --section-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] {
    --bg-primary: #232136;
    --bg-secondary: #232136;
    --text-primary: #e0def4;
    --text-secondary: #6e6a86;
    --accent-color: #908caa;
    --accent-dark: #797593;
    --link-color: #c4a7e7;
    --nav-text: #e0def4;
    --nav-text-light: #e0def4;
    --section-bg: #2a273f;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Navigation */
.sidebar {
    position: static;
    width: 100%;
    height: auto;
    background-color: var(--accent-color);
    padding: 1rem 0;
    box-shadow: 0 2px 5px var(--border-color);
    transition: background-color 0.3s ease;
}

.nav-content {
    padding: 0 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-title {
    color: #ecf0f1;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 0;
}

/* Navigation Right Section */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    margin-bottom: 0;
    border-radius: 0;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-size: 1.1em;
    font-weight: bold;
}

.nav-link:hover {
    background-color: transparent;
    color: #ffffff;
    padding-left: 1.5rem;
    border-bottom-color: #ffffff;
    text-decoration: none;
}

/* Main Content */
.content {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Social Media Icons */
.social-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    justify-content: center;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(33, 32, 46, 0.15);
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.social-link:hover {
    transform: scale(1.1);
    background-color: rgba(33, 32, 46, 0.25);
    text-decoration: none;
}

.social-link img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    width: 60px;
    height: 32px;
    border-radius: 16px;
    background-color: #191724;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease;
    position: relative;
}

.toggle-circle {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #ffffff;
    left: 2px;
    transition: left 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-icon {
    width: 16px;
    height: 16px;
    transition: opacity 0.3s ease;
    position: absolute;
}

.theme-icon-sun {
    opacity: 1;
    filter: brightness(0);
}

.theme-icon-moon {
    opacity: 0;
    filter: brightness(0) invert(1);
}

html[data-theme="dark"] .theme-icon-sun {
    opacity: 0;
}

html[data-theme="dark"] .theme-icon-moon {
    opacity: 1;
}

html[data-theme="dark"] .theme-toggle {
    background-color: #ffffff;
}

html[data-theme="dark"] .toggle-circle {
    background-color: #232136;
    left: calc(100% - 30px);
}

.section {
    background-color: var(--section-bg);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 4px var(--border-color);
    width: 100%;
    max-width: 900px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.section h2 {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    transition: color 0.3s ease, border-color 0.3s ease;
}

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

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.about-text {
    flex: 1;
}

.section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Publications Section */
.publication-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.publication {
    padding: 0;
    padding-left: 1.5rem;
    position: relative;
}

.publication::before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2em;
    position: absolute;
    left: 0;
    transition: color 0.3s ease;
}

.publication h3 {
    color: var(--accent-color);
    margin-bottom: 0.25rem;
    margin-top: 0;
    transition: color 0.3s ease;
}

.publication-meta {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0;
    margin-top: 0;
    transition: color 0.3s ease;
}

/* Publication buttons */
.pub-buttons {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--accent-dark);
}

.bibtex {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.85rem;
}

/* Contact Section */
.contact-info {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        border-bottom: none;
        border-left: 3px solid transparent;
        padding-left: 1rem;
    }

    .nav-link:hover {
        border-bottom-color: transparent;
        border-left-color: #ecf0f1;
    }

    .content {
        padding: 1.5rem;
    }

    .section {
        padding: 1.5rem;
    }

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

    .about-content {
        flex-direction: column;
        align-items: center;
    }

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

/* News list helpers */
.news-list .news-item.hidden {
    display: none;
}

.news-more-btn {
    margin-top: 0.75rem;
}
