/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #e1e4e8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--secondary-color);
}

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

.nav-name {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-social {
    display: flex;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
}

.nav-social a {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.nav-social a:hover {
    color: var(--secondary-color);
}

/* Sections */
.section {
    padding: 4rem 0;
    scroll-margin-top: 80px; /* Offset for sticky header */
}

.alt-bg {
    background: var(--light-bg);
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

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

h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
}

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

.profile-image {
    flex-shrink: 0;
}

.profile-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    object-position: center 30%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.about-content {
    flex: 1;
}

.about-content p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Research Section */
.research-list {
    list-style: none;
    padding: 0;
}

.research-list li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.research-list li::before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
}

.subsection-title {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.projects {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.project h4 {
    margin-bottom: 0.5rem;
}

.coauthors {
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
}

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

.pub-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.pub-type {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

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

.pub-authors {
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 0.25rem;
}

.pub-info {
    font-size: 0.9rem;
    color: #666;
}

.pub-info a {
    color: var(--secondary-color);
    text-decoration: none;
}

.pub-info a:hover {
    text-decoration: underline;
}

.abstract-toggle {
    margin-top: 0.75rem;
}

.abstract-toggle summary {
    cursor: pointer;
    color: #666;
    font-size: 0.9rem;
    user-select: none;
    display: inline-block;
    transition: color 0.3s;
}

.abstract-toggle summary:hover {
    color: var(--secondary-color);
}

.abstract-toggle[open] summary {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.abstract-text {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

/* CV Section */
.cv-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    margin: 1rem 0 2rem 0;
}

.cv-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.cv-highlights {
    margin-top: 2rem;
}

.education-list {
    list-style: none;
    padding: 0;
}

.education-list li {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
    position: relative;
}

.education-list li::before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
}

.education-list .institution {
    color: #666;
    font-size: 0.95rem;
}

/* Contact Section */
.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-info i {
    color: var(--secondary-color);
    width: 20px;
}

.contact-info a {
    color: var(--secondary-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #2980b9;
}

.social-links i {
    font-size: 1.3rem;
}

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

footer p {
    color: #bbb;
}

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

    .nav-right {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-social {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 0.5rem;
    }

    .section {
        padding: 2rem 0;
    }

    h2 {
        font-size: 1.6rem;
    }

    .about-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .profile-image img {
        width: 200px;
        height: 200px;
    }

    .social-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .social-links a {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-links {
        font-size: 0.9rem;
    }

    .about-content p {
        font-size: 1rem;
    }
}
