/* Root Variables */
:root {
    --primary-color: #7b68aa;
    --secondary-color: #9b8bc4;
    --accent-color: #b8a4d9;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --hover-color: #2980b9;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navigation Bar */
.navbar {
    background-color: var(--primary-color);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    /* justify-content: space-between; */
    justify-content: start;
    align-items: center;
    gap: 3rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: solid transparent;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.nav-logo:hover {
    color: var(--accent-color);
    border-bottom: solid var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin-left: 20%;
    margin-right: 20%;
}

.nav-link {
    color: white;
    border-bottom: solid transparent;
    text-decoration: none;
    font-size: 1.15rem;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}


/* .nav-link.active, */
.nav-link:hover {
    color: var(--accent-color);
    border-bottom: solid var(--accent-color);
}

.nav-item {
    height: 100%;
    display: flex;
    align-items: center;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    flex: 1;
}

/* About Section */
.about-section {
    margin-bottom: 4rem;
    margin-left: 20%;
    margin-right: 20%;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.top-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.affiliation {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

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

.social-link {
    color: var(--primary-color);
    /* transition: color 0.3s ease, transform 0.3s ease; */
    transition: color 0.3s ease, visibility 0.9s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.social-link:hover {
    color: var(--accent-color);
    /* Moves the link up slightly when hovered */
    /* transform: translateY(-2px); */
}

.social-link:focus .tooltip,
.social-link:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    /* Show below the link */
    top: 125%;
    /* Center the tooltip horizontally */
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--bg-color);
    padding: 0.3rem 0.6rem;
    border-radius: 0.3rem;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.bio h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.bio p {
    margin-bottom: 1rem;
    color: var(--text-color);
    text-align: left;
}

.about-image {
    display: flex;
    justify-content: center;
}

.profile-photo {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* News Section */
.news-section {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    margin-left: 17%;
    margin-right: 17%;
}

.news-section h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.news-list {
    list-style: none;
}

.news-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-date {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: left;
}

.news-content {
    color: var(--text-color);
    text-align: left;
}

/* Research Page */
.research-overview {
    margin-bottom: 3rem;
    margin-left: 20%;
    margin-right: 20%;
}

/* .research-overview h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
} */

.research-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: justify;
}

.research-interests {
    margin-bottom: 3rem;
    margin-left: 20%;
    margin-right: 20%;
}

.research-interests h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.interests-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.8rem;
    list-style: none;
}

.interests-list li {
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
}

/* Publications Section */
.publications-section h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.publications-section {
    margin-bottom: 3rem;
    margin-left: 20%;
    margin-right: 20%;
}

.publications-section h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.publications-year h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.publication {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

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

.paper-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.paper-authors {
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.paper-venue {
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.paper-abstract {
    color: var(--text-color);
    margin-bottom: 0.8rem;
    text-align: justify;
}

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

.paper-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.paper-link:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Projects Section */
.projects-section {
    margin-bottom: 3rem;
    margin-left: 20%;
    margin-right: 20%;
}

.projects-section h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.project {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

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

.project-description {
    color: var(--text-color);
    margin-bottom: 0.8rem;
    text-align: justify;
}

.project-collaborators {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* CV Page */
.cv-section {
    margin-left: 20%;
    margin-right: 20%;
}

.cv-section h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    /* text-align: center; */
}

.cv-download {
    margin-bottom: 2rem;
    text-align: center;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.download-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cv-note {
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.cv-viewer {
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.cv-viewer embed {
    display: block;
}

.cv-fallback {
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
}

/* .cv-fallback a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
} */

/* CV Summary Section */
.cv-summary {
    margin-left: 20%;
    margin-right: 20%;
    margin-top: 3rem;
}

.cv-summary h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.cv-summary-section {
    margin-bottom: 2.5rem;
}

.cv-summary-section h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.cv-entry {
    margin-bottom: 1.5rem;
}

.cv-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.cv-date {
    color: var(--text-light);
    font-size: 0.95rem;
}

.cv-entry p {
    color: var(--text-color);
    margin-bottom: 0.2rem;
}

.cv-list,
.cv-pub-list {
    list-style: none;
    padding-left: 0;
}

.cv-list li,
.cv-pub-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.cv-list li::before,
.cv-pub-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
}

.footer p {
    margin: 0;
}

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

    .nav-menu {
        gap: 1rem;
    }

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

    .about-image {
        order: -1;
    }

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

    .news-list li {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

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

    .container {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .about-text h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}