/* Global Styles */
:root {
    /* 学术风核心配色：深蓝与深灰 */
    --primary-color: #003366;   /* 经典学术蓝 */
    --primary-light: #336699;
    --text-main: #2c3e50;
    --text-muted: #546e7a;
    --bg-light: #f8f9fa;
    --border-color: #e9ecef;
    /* 字体定义 */
    --font-heading: 'Merriweather', serif; /* 衬线体 */
    --font-body: 'Lato', sans-serif;       /* 无衬线体 */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-main);
    background-color: #ffffff;
    font-size: 16px;
}

.container {
    max-width: 900px; /* 稍微收窄宽度，增加阅读聚焦感 */
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #1a1a1a;
    font-weight: 700;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; position: relative; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; font-weight: 600; }

p {
    margin-bottom: 1.2rem;
    color: var(--text-main);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    height: 64px; /* 稍微减小高度 */
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

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

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

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

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    min-height: auto; /* 移除强制 80vh，根据内容自适应 */
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 4rem;
    align-items: center;
}

.hero-name {
    margin-bottom: 0.2rem;
    font-size: 2.5rem;
    color: var(--text-main);
}

.hero-title {
    color: var(--text-muted);
    font-size: 1.3rem;
    font-weight: 400;
    font-family: var(--font-body);
    margin-bottom: 1rem;
}

.hero-affiliation {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.hero-photo {
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* Section Styles */
section {
    padding: 60px 0;
}

.section-title {
    text-align: left; /* 标题左对齐更严谨 */
    margin-bottom: 2.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--primary-color);
    display: inline-block;
    width: 100%;
}

/* News Section */
.news-item {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    align-items: baseline;
}

.news-date {
    font-family: monospace; /* 等宽字体显示日期更有极客感 */
    color: var(--text-muted);
    font-weight: 600;
    min-width: 100px;
    font-size: 0.9rem;
}

.news-content {
    flex: 1;
    font-size: 1rem;
}

/* Research Tags */
.research-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.3rem 1rem;
    border-radius: 4px; /* 改为小圆角，比完全圆角更正式 */
    font-size: 0.9rem;
    font-weight: 500;
}

/* Publications */
.publication-category {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-body);
}

.publication-item {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid transparent; /* 悬停时的指示条 */
    transition: all 0.2s;
}

.publication-item:hover {
    border-left-color: var(--primary-color);
}

.pub-title {
    margin-bottom: 0.3rem;
    color: var(--text-main);
    font-size: 1.1rem;
}

.pub-authors {
    margin-bottom: 0.3rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.pub-venue {
    color: var(--primary-color);
    font-style: italic;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.pub-links {
    display: flex;
    gap: 0.8rem;
}

.pub-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid transparent;
}

.pub-link:hover {
    text-decoration: none;
    border-bottom-color: var(--primary-color);
}

/* Projects Section (Card Design Update) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 1.8rem;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
    border-color: var(--primary-light);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.project-title {
    margin-bottom: 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.github-icon {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.github-icon:hover {
    color: #333;
}

.project-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tag {
    background: var(--bg-light);
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
}

.project-link {
    font-weight: 600;
    font-size: 0.9rem;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .profile-img {
        margin: 0 auto;
        width: 200px;
        height: 200px;
    }

    .section-title {
        text-align: center;
        border-bottom: none; /* 移动端去掉下划线显得更干净 */
    }

    .section-title::after {
        content: '';
        display: block;
        width: 50px;
        height: 3px;
        background: var(--primary-color);
        margin: 10px auto 0;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 5px;
    }
    
    .hamburger span {
        width: 25px;
        height: 2px;
        background-color: var(--text-main);
    }

    /* 移动端菜单样式覆盖 */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 64px;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        padding: 20px 0;
    }

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