/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header 样式 */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

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

.nav-menu li {
    padding: 0;
    margin: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    display: inline-block;
}

.nav-menu a:hover {
    color: #667eea;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

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

.nav-toggle {
    display: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: #333;
        margin: 5px 0;
        transition: 0.3s ease;
    }
}

/* Hero Section */
.hero {
    position: relative;
    padding: 10rem 0 6rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    margin-bottom: 6rem; /* 增加与下方内容的间距 */
    min-height: 800px;
    overflow: hidden;
}

.hero > .container {
    max-width: 900px;
    margin: 0 auto;
    background: none;
    border-radius: 12px;
    box-shadow: none;
    padding: 3.5rem 2rem 2.5rem 2rem;
    z-index: 10;
    position: relative;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 635px;
    margin: 0 auto;
    text-align: left;
}

.affiliations {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.affiliation {
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
    box-shadow: 0 2px 8px 0 rgba(31, 38, 135, 0.08);
    backdrop-filter: blur(2px) saturate(110%);
    -webkit-backdrop-filter: blur(2px) saturate(110%);
    border: 1px solid rgba(255,255,255,0.10);
    padding-left: 0.8em;
    padding-right: 0.8em;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
    margin: 0 0.7rem 0.5rem 0.7rem;
    display: inline-block;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    width: auto;
    min-width: 0;
    white-space: normal; /* 允许换行 */
    text-align: center;
    word-break: break-word;
}

/* Hero Carousel */
.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    z-index: 3;
}

.carousel-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    border: 2px solid #667eea;
}

.carousel-dot.active {
    background: #667eea;
}

.hero > .container {
    position: relative;
    z-index: 10;
}

/* Main Content */
main {
    background: white;
    border-radius: 20px;
    margin: 2rem 0;
    padding: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding-top: 100px; /* 修复：避免被header遮挡 */
}

/* 
关键修复：使用高优先级选择器设置sections间距 
*/
main section {
    padding: 4rem 0;           /* 保持内边距 */
    margin-bottom: 8rem;       /* 新增：sections之间的外边距 */
}

/* 最后一个section减少底部间距，避免与footer距离过大 */
main section:last-child {
    margin-bottom: 4rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 3px;
    background: #667eea;
}

/* Research Section */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.research-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.research-card:hover {
    transform: translateY(-5px);
}

.research-card h3 {
    color: #333;
    margin-bottom: 1rem;
}

.research-subtitle {
    font-size: 1.08rem;
    color: #667eea;
    font-weight: 500;
    margin-bottom: 0.7rem;
    margin-top: -0.5rem;
    letter-spacing: 0.01em;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-photo {
    width: 150px;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 1rem;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #f5f5f5;
}

.member-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}

.member-role {
    color: #666;
}

.team-leader-flex {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    margin-left: 2.5rem;
    background: rgba(255,255,255,0.85);
    border-radius: 16px;
    box-shadow: 0 4px 24px 0 rgba(31,38,135,0.10);
    padding: 2rem 2.5rem;
    max-width: 700px;
}

/* Publications Section */
.publication {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.publication:hover {
    background-color: #f8f9fa;
}

.publication-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.publication-authors {
    color: #444;
    margin-bottom: 0.5rem;
}

.publication-authors strong {
    color: #444;
    font-weight: bold;
}

.publication-journal {
    color: #444;
    font-weight: bold;
    font-style: italic;
    font-size: 1.05rem;
    margin-top: 0.2rem;
}

.publication-journal .pub-year {
    font-weight: normal;
    font-style: normal;
    color: #444;
}

/* News Section */
.news-item {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-card {
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.contact-icon {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 0;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem 0;
    margin-top: 2rem;
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.95);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        transition: 0.3s ease;
    }

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

    .nav-menu li {
        margin: 1rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .affiliations {
        flex-direction: column;
        align-items: center;
    }
    
    /* 移动端减少sections间距 */
    main section {
        padding: 2rem 0;
        margin-bottom: 4rem;
    }
    
    main section:last-child {
        margin-bottom: 2rem;
    }
    
    .hero {
        margin-bottom: 3rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }

/* 为所有section添加scroll-margin-top，避免锚点被header遮挡 */
section {
    scroll-margin-top: 50px;
}