/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;  /* 禁止水平滚动 */
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --secondary-gradient: linear-gradient(135deg, #3498db, #e74c3c);/*#5faee3 */
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Noto Sans SC', 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
   /* background-color: #fafcff;
    background-image: 
    radial-gradient(circle at 20% 30%, rgba(52, 152, 219, 0.03) 2px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(52, 152, 219, 0.03) 2px, transparent 2px);
    background-size: 50px 50px, 80px 80px;
    background-attachment: fixed;*/
    background: url('photo/background2.jpg') no-repeat center center fixed;
    background-size: cover;
    background-color: rgba(255,255,255,0.9); /* 白色半透明层，避免图片过亮影响文字 */
    background-blend-mode: overlay;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
} 

/* 导航栏 */
.navbar {
    background-color: rgba(255,255,255,0.85);;
    backdrop-filter: blur(8px); /* 毛玻璃效果 */
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* 导航栏占位元素，高度与导航栏一致 */
.navbar-placeholder {
    height: 60px;   /* 默认与导航栏高度相同 */
    background: transparent;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;          /* 确保容器宽度不超出 */
    max-width: 100%;
    padding: 1rem 20px;
    flex-wrap: nowrap;    /* 关键：禁止换行，防止菜单项换行导致宽度变化 */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}
/*自我介绍区域*/
.about-context{
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-size: 1.1rem;
    line-height: 1.8;
}

.supervisor-link a:link{
     color: #4169E1;
     text-decoration: underline;
}

.supervisor-link a:visited{
     color: #4169E1;
     text-decoration: underline;
}

.supervisor-link a:hover{
     color: #FF0000;
}

.supervisor-link a:active{
     color: #0000EE;
}

/* 英雄区域 */
/* 修复：移动端背景图完整显示 + 桌面端正常 */
.hero {
    padding: 80px 0 60px; /* 适配导航栏占位，无空白 */
    /* 核心：背景图等比完整显示，不裁剪 */
    background: url('photo/background1.png') no-repeat center center;
    background-size: contain; /* ✅ 等比缩放，完整显示整张图（不裁剪） */
    /* background-size: 100% 100%; */ /* 可选：拉伸铺满（会变形，不推荐） */
    background-attachment: scroll; /* ✅ 移动端禁用fixed，避免背景错位裁剪 */
    background-color: rgba(255,255,255,0.6);
    background-blend-mode: overlay;
    text-align: center;
    position: relative;
    overflow: hidden; /* 禁止背景溢出 */
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(52,152,219,0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.hero h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.affiliation {
    margin: 1rem 0;
    color: #c97e3a;        /* 暖琥珀色 */
    font-size: 1.2rem;
    line-height: 1.8;
    font-weight: 500;      /* 半加粗，增强可读性 */
}

.address {
    margin: 1rem 0;
    color: #a86f3a;        /* 稍深琥珀 */
    line-height: 1.8;
    font-weight: 500;      /* 半加粗，增强可读性 */
}

.call-for-students {
    max-width: 850px;
    margin: 2rem auto 0;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-style: italic;
    border-left: 4px solid var(--accent-color);
    color:#0066cc;
    font-weight: bold;
}

.highlight-text{
    color: #e63946;
    font-weight: bold;
}

/* 通用区块样式 */
.section {
    padding: 80px 0;
}

.section:nth-child(even) {
     background-color: /*#f9f9f9;*/rgba(255,255,255,0.8)
}

.section-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 4px;
    background: var(--secondary-gradient);
    border-radius: 2px;
}

.subsection-title {
    font-size: 1.5rem;
    margin: 2.5rem 0 1.5rem;
    color: var(--primary-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

/* 时间线样式 */
.timeline {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.5rem;
}

/* 日期容器：固定宽度，flex 布局 */
.timeline-date {
    flex: 0 0 130px;           /* 固定宽度，所有日期列等宽 */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 子元素从左开始排列 */
}

/* 火焰符号：固定宽度，保证所有火焰左边缘对齐 */
.flame {
    width: 28px;               /* 固定宽度，可根据喜好调整 */
    text-align: center;
    flex-shrink: 0;            /* 防止压缩 */
}

/* 日期文字：占据剩余空间，并在内部居中 */
.date-text {
    flex: 1;
    text-align: center;        /* 日期文字在剩余空间内居中 */
    font-weight: 600;
    color: var(--secondary-color);
}

.timeline-content {
    flex: 1;
    color: #FF0000;
}

/* 项目列表 */
.project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center; /* 文字本身水平居中 */
    display: flex;      /* 开启flex布局 */
    flex-direction: column; /* 子元素垂直排列 */
    justify-content: center; /* 垂直方向居中 */
    align-items: center; /* 水平方向再次兜底（可选） */
    height: 120px; /* 需设置固定高度，否则垂直居中无效果 */
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-grants {
    list-style: none;
    max-width: 1200px;
}

.project-grants em {
    display: block;
    /* font-style: normal; */
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.project-grants li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.project-grants li:last-child {
    border-bottom: none;
}

/* 出版物样式 */
.year-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.year-btn {
    padding: 0.5rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.year-btn:hover,
.year-btn.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.publications-list {
    max-width: 1500px;
    margin: 0 auto;
}

.publication-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 2.5rem;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}
.publication-item img {
    flex: left;
    max-width: 360px;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.publication-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.publication-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px; /* 控制标题、作者、期刊、链接之间的间距 */
}

.publication-title {
    font-size: 1.2rem;
    margin:0;
    color: var(--primary-color);
    line-height: 1.4;
}

.publication-authors {
    color: var(--text-light);
    margin: 0;
    font-style: italic;
}

.publication-venue {
    color: var(--text-light);
    margin: 0;
}

.publication-link {
    position: relative;
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    align-self: flex-start; /* 让链接靠左，不会拉伸 */
    margin-top: 4px; /* 可以额外增加一点上边距，或者用gap控制 */
}
.publication-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-gradient);
    transition: width 0.3s ease;
}

.publication-link:hover {
    text-decoration: underline;
}

/* 联系信息 */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    margin: 1.5rem 0;
    font-size: 1.1rem;
}

.contact-info i {
    margin-right: 10px;
    color: var(--secondary-color);
    width: 20px;
}

/* 页脚 */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer p {
    margin: 0.5rem 0;
}

.footer-links a {
    color: var(--light-color);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
}
.students-inform {
    list-style: none;
    max-width: 800px;
}

.students-inform li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.students-inform li:last-child {
    border-bottom: none;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        box-shadow: var(--shadow);
        padding: 1rem 0;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 0;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem;
    }

    /* 移动端适配：导航栏高度可能变化（例如汉堡菜单换行） */
    .navbar-placeholder {
        height: 80px;   /* 根据实际移动端导航栏高度调整 */
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero h2 {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-date {
        margin-bottom: 0.5rem;
    }
    
    .project-list {
        grid-template-columns: 1fr;
    }
     .publication-item {
        flex-direction: column;
        gap: 15px;
        padding: 1.5rem;
    }
    
    .publication-item img {
        flex:none;
        max-width: 100%;
        width: 100%;
        height: auto;
        max-height: 200px;
        object-fit:scale-down;
    }

    .publication-content {
        width: 100%;
        gap: 6px; /* 移动端可以调整内部间距 */
    }
    .publication-title {
        font-size: 1.1rem;
    }
    /* 让 hero 区域的内边距更小 */
   .hero {
        padding: 80px 0 60px;
    }

/* 调整 affiliation 和 address 字体大小 */
   .affiliation, .address {
       font-size: 1rem;
    }

/* 项目卡片高度自适应 */
   .project-item {
       height: auto;
       padding: 1.5rem;
    }

/* 学生列表字体稍小 */
   .students-inform li {
       font-size: 0.95rem;
    }

/* 访客地图容器宽度限制 */
   #visitor-map .container {
       overflow-x: auto;   /* 防止地图溢出 */
    }
    /* 针对更小屏幕（手机竖屏）的进一步调整 
}
    
@media (max-width: 480px) {
    .publication-item {
        padding: 1rem;
    }
    
    .publication-item img {
        max-height: 200px;       /* 进一步限制图片高度 */
    }
}

/* 桌面端保持原有视觉效果（可选，保留更美观） */
@media (min-width: 769px) {
    .hero {
        background-attachment: fixed;
        background-size: cover;
    }
}
