/* style.css (最终整合版 - 已调整图片高度) */

/* 1. 全局变量和基础样式 */
:root {
    --primary-100: #3F51B5;
    --primary-200: #757de8;
    --primary-300: #dedeff;
    --accent-100:  #2196F3;
    --accent-200:  #003f8f;
    --text-100:    #333333;
    --text-200:    #5c5c5c;
    --bg-100:      #FFFFFF;
    --bg-200:      #f5f5f5;
    --bg-300:      #cccccc;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-100);
    color: var(--text-100);
    padding-top: 80px; /* 为固定的导航栏留出空间 */
}

a {
    color: var(--accent-100);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-100);
}

/* 2. 导航栏 */
header {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bg-200);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-100);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
}

nav ul a {
    color: var(--text-100);
    font-weight: 500;
    padding-bottom: 5px;
}

nav ul a.active {
    color: var(--primary-100);
    border-bottom: 2px solid var(--primary-100);
}

.language-selector {
    border: 1px solid var(--bg-300);
    border-radius: 4px;
    padding: 5px;
    font-family: inherit;
    color: var(--text-200);
    background-color: var(--bg-100);
}

/* 3. 通用页面布局 */
.page-container {
    padding: 2rem;
    max-width: 1100px;
    margin: 2rem auto;
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    color: var(--primary-100);
}
.page-container > .page-title:first-child {
    margin-top: 0;
}

/* 4. 主页 Hero 区域 */
#hero {
    height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--bg-200);
}

.hero-content h1 { font-size: 3rem; color: var(--text-100); }
.hero-content h2 { font-size: 4.5rem; color: var(--primary-100); }
.hero-content p { color: var(--text-200); max-width: 60ch; margin: 1rem auto 0; line-height: 1.6; }

/* 5. 团队成员页面 */
.team-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.team-card {
    background-color: var(--bg-100);
    padding: 2rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--bg-200);
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.team-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--bg-200);
}

.team-name {
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
    color: var(--primary-100);
}

.team-title {
    color: var(--text-200);
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
    min-height: 2.5em;
}

.team-links {
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.team-links a {
    font-size: 1.5rem;
    color: var(--primary-100);
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.team-links a:hover {
    transform: scale(1.25);
    color: var(--accent-100);
}

.team-links a.disabled {
    color: #cccccc;
    cursor: not-allowed;
}

.team-links a.disabled:hover {
    transform: none;
    color: #cccccc;
}

.team-research {
    font-size: 0.9rem;
    color: var(--text-200);
    line-height: 1.6;
    margin-top: 0;
}


/* 6. 研究动态页面 (Publications) */
.publications-container { 
    max-width: 900px; 
    margin: 0 auto; 
}

.filter-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 1rem;
    background-color: var(--bg-200);
    border-radius: 8px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.control-group label {
    font-weight: 500;
    color: var(--text-200);
}

.control-group select {
    padding: 0.5rem;
    border: 1px solid var(--bg-300);
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--bg-100);
}

/* 通用条目容器样式 */
.publication-entry-visual, 
.publication-entry-text {
    padding: 2rem 0;
    border-bottom: 1px solid var(--bg-300);
}

/* 图文模式独有样式 */
.publication-entry-visual {
    display: flex;
    flex-direction: column; /* 移动端：图片在上 */
    gap: 1.5rem;
}

.publication-image {
    flex-shrink: 0;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.publication-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--bg-300);
    height: 14rem;
}

/* 纯文本模式独有样式 */
.publication-entry-text {
    display: block;
}

/* 详情内容的通用样式 */
.publication-details {
    display: flex;
    flex-direction: column;
}

.publication-details p {
    margin: 0;
}

.publication-details .title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--accent-100);
    margin-bottom: 0.75rem;
}

.publication-details .authors {
    font-size: 1.1rem;
    color: var(--text-100);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.publication-details .venue {
    font-size: 1rem;
    color: var(--text-200);
    margin-bottom: 1.25rem;
}

.publication-details .links a {
    display: inline-block;
    font-size: 1rem;
    padding: 0.5rem 1.2rem;
    margin-right: 0.75rem;
    background-color: var(--bg-100);
    color: var(--primary-100);
    border: 1px solid var(--primary-100);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.publication-details .links a:hover {
    background-color: var(--primary-300);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(63, 81, 181, 0.2);
}

.publication-details .links a:last-child {
    margin-right: 0;
}

/* 7. 转化项目页面 */
.projects-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-100);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--bg-200);
    transition: box-shadow 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    color: var(--primary-100);
}

.project-description {
    color: var(--text-200);
    line-height: 1.7;
    flex-grow: 1;
}

.project-link {
    margin-top: 1.5rem;
}

.project-link a {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: var(--primary-100);
    color: var(--bg-100);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.project-link a:hover {
    background-color: var(--primary-200);
    color: var(--bg-100);
}

/* 8. 联系我们页面 */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.contact-info p { 
    line-height: 1.8; 
    font-size: 1.1rem; 
    color: var(--text-200); 
}
.contact-info a { 
    font-weight: bold; 
}
.map-container { 
    border-radius: 8px; 
    overflow: hidden; 
    border: 1px solid var(--bg-300); 
}
.copyright { 
    text-align: center; 
    margin-top: 4rem; 
    color: var(--text-200); 
}

/* 9. 响应式设计 */
@media (min-width: 768px) {
    /* 转化项目卡片变为左右布局 */
    .project-card {
        flex-direction: row;
    }
    .project-card img {
        width: 300px;
        height: auto;
    }

    /* 研究动态图文模式变为左右布局并垂直居中 */
    .publication-entry-visual {
        flex-direction: row;
        align-items: center;
        gap: 2.5rem;
    }
    
    /* --- 这是本次的核心修改 --- */
    .publication-image {
        width: 40%;         /* 使用比例宽度 */
        max-width: 320px;   /* 设置最大宽度 */
        margin: 0;
    }
}

@media (max-width: 768px) {
    .contact-grid { 
        grid-template-columns: 1fr; 
    }
    nav ul { 
        display: none; /* 在小屏幕上隐藏导航，可以进一步做成汉堡菜单 */
    }
}

/* 年级标题 (研三, 研二...) 的样式 */
.grade-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-100);
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-300);
}

/* 调整 .team-container 用于更小的学生卡片 */
.student-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* 学生卡片的简洁样式 */
.student-card {
    background-color: var(--bg-100);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--bg-200);
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.student-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-100);
    margin: 0 0 0.5rem 0;
}

.student-research {
    font-size: 0.9rem;
    color: var(--text-200);
    margin: 0;
}
#hero .hero-content h1 {
    display: block; 
}

/* 当 body 标签有 .lang-en 这个 class 时，
   并且目标是 #hero 区域内的 h1 标签，
   则将其隐藏 */
body.lang-en #hero .hero-content h1 {
    display: none;
}