/* --- CSS VARIABLES & GLOBAL SETUP --- */
:root {
    --font-serif: 'Source Serif Pro', serif;
    --font-sans: 'Open Sans', sans-serif;
    --color-primary: #2c3e50; /* Deep Charcoal Blue */
    --color-accent: #3498db;  /* Bright Blue */
    --color-text-primary: #212529; /* Dark Gray for text */
    --color-text-secondary: #6c757d; /* Lighter gray for metadata */
    --color-border: #dee2e6;
    --color-bg-sidebar: #f8f9fa;
    --color-bg-main: #ffffff;
    --shadow-soft: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-hover: 0 6px 16px rgba(0,0,0,0.08);
    --transition-speed: 0.3s;
    --header-height: 60px; /* Height of the top navigation bar */
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 2rem);
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-primary);
    background-color: var(--color-bg-main);
    margin: 0;
}

/* --- [NEW] TOP NAVIGATION HEADER --- */
.top-nav-header {
    height: var(--header-height);
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto; /* Allow horizontal scrolling on small screens */
    padding: 0 1rem;
}

.main-nav .nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
    white-space: nowrap; /* Prevent links from breaking into two lines */
}

.main-nav .nav-link:hover {
    background-color: #e9ecef;
    color: var(--color-primary);
}

.main-nav .nav-link.active {
    background-color: var(--color-primary);
    color: #fff;
}

/* --- [RESTORED] LAYOUT: PAGE WRAPPER & COLUMNS --- */
.page-wrapper {
    display: flex;
    width: 100%;
    max-width: 100%;
}

/* --- [MODIFIED] SIDEBAR STYLING --- */
.sidebar {
    width: 25%;
    max-width: 340px;
    min-width: 280px;
    flex-shrink: 0;
    background-color: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border);
    position: sticky;
    top: var(--header-height); /* Stick below the top nav bar */
    height: calc(100vh - var(--header-height)); /* Fill remaining viewport height */
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2.5rem;
    /* REMOVED: overflow-y: auto; - 不再需要滚动 */
}

.profile-block {
    text-align: center;
    margin-bottom: 2.5rem;
}

.profile-block img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
}

.profile-block h1 {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    margin: 0 0 0.5rem 0;
    color: var(--color-primary);
}

.profile-block .title,
.profile-block .affiliation {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* --- CONTACT & FOOTER (in sidebar) --- */
.contact-block {
    margin-top: auto;
}

.contact-block h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.contact-block p {
    margin: 0.5rem 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.contact-block .icon { margin-right: 0.75rem; }

footer {
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: #adb5bd;
    text-align: center;
}

/* --- [MODIFIED] MAIN CONTENT AREA --- */
.main-content {
    flex-grow: 1;
    padding: 4rem 5vw;
    width: 75%; /* Flexible width */
}

.main-content section {
    margin-bottom: 4.5rem;
}

.main-content h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin: 0 0 2rem 0;
    position: relative;
    padding-bottom: 1rem;
}

.main-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

.main-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: #495057;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* --- LIST STYLES (Unchanged) --- */
ul { padding-left: 0; list-style-type: none; }
.icon-list li { display: flex; align-items: center; font-size: 1.1rem; margin-bottom: 1rem; }
.icon-list .icon { font-size: 1.5rem; margin-right: 1rem; color: var(--color-accent); }
.card-list li { background-color: #fff; border: 1px solid var(--color-border); border-radius: 8px; padding: 1.5rem; margin-bottom: 1rem; transition: all var(--transition-speed) ease; }
.card-list li:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--color-accent); }
.card-list strong { display: block; font-size: 1.1rem; font-weight: 600; color: var(--color-primary); margin-bottom: 0.25rem; }
.card-list span { display: block; color: var(--color-text-secondary); font-size: 0.9rem; margin-bottom: 0.5rem; }
.publication-list li { padding: 1.5rem 0; border-bottom: 1px solid var(--color-border); }
.publication-list li:last-child { border-bottom: none; }
.pub-title { display: block; font-size: 1.2rem; font-weight: 600; color: var(--color-primary); margin-bottom: 0.5rem; }
.pub-authors { display: block; font-size: 1rem; color: var(--color-text-primary); margin-bottom: 0.5rem; }
.pub-venue { display: block; font-size: 0.9rem; font-style: italic; color: var(--color-text-secondary); }
.award-tag { font-size: 0.8rem; font-weight: 600; color: #c0392b; background-color: #f9e3e1; padding: 3px 8px; border-radius: 4px; margin-left: 8px; white-space: nowrap; }

/* --- SCROLL TO TOP BUTTON (Unchanged) --- */
#scrollTopBtn { display: none; position: fixed; bottom: 30px; right: 30px; z-index: 99; border: none; outline: none; background-color: var(--color-primary); color: white; cursor: pointer; padding: 0; width: 50px; height: 50px; border-radius: 50%; font-size: 24px; line-height: 50px; text-align: center; box-shadow: var(--shadow-hover); transition: all var(--transition-speed) ease; }
#scrollTopBtn:hover { background-color: var(--color-accent); }

/* --- [MODIFIED] RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .page-wrapper {
        flex-direction: column;
    }
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
    .contact-block { margin-top: 1rem; }
    .main-content {
        width: 100%;
        padding: 2rem;
    }
    .main-content h2 { font-size: 2rem; }
}