/* style.css - 简约黑白色调与转场动画 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 保持垂直滚动条稳定，避免页面切换时因滚动条出现/消失导致水平位移 */
html {
    overflow-y: scroll;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* 全站内容容器，保证各页面宽度与内边距一致 */
.container {
    max-width: 1200px;
    margin: 64px auto 0;
    padding: 2rem;
    box-sizing: border-box;
}


/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eaeaea;
    z-index: 1000;
    padding: 1rem 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 2.5rem;
}

.nav-link {
    color: #2c2c2c;
    text-decoration: none;
    font-weight: 500;
    display: inline-block; /* 固定内联块，避免文字粗细切换导致横向流动 */
    transition: color 0.2s, border-bottom 0.2s;
    padding: 0 0.25rem 4px; /* 左右留白固定宽度 */
    border-bottom: 2px solid transparent;
    width: 150px;
    text-align: center;
}

/* 保证激活态不改变字体重量，避免布局抖动，并统一颜色与下划线显示 */
.nav-active {
    font-weight: 500;
    color: #000000;
    border-bottom-color: #000000;
}

.nav-link:hover, .nav-link.active {
    color: #000000;
    border-bottom-color: #000000;
}

/* 主要内容容器 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #ececec;
    color: #6c6c6c;
    font-size: 0.85rem;
}

/* 转场动画 (fade-up) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1), transform 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 研究页卡片样式 */
.papers-section {
    margin-bottom: 4rem;
}
.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border-left: 4px solid #111;
    padding-left: 1rem;
}
.paper-list {
    list-style: none;
}
.paper-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}
.paper-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.paper-authors, .paper-venue {
    font-size: 0.9rem;
    color: #555;
}

/* 团队成员网格 */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}
.team-card {
    text-align: center;
}
.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #f5f5f5;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #333;
    border: 1px solid #e0e0e0;
}

/* EvoMass页样式 */
.download-card, .video-card {
    background: #fafafa;
    border: 1px solid #eaeaea;
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    transition: transform 0.2s;
}
.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.btn {
    display: inline-block;
    background: #111;
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    margin-top: 1rem;
    border: none;
    transition: background 0.2s;
}
.btn:hover {
    background: #333;
}
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    height: 0;
    margin-top: 1.5rem;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 添加到 style.css 中 */

/* 固定导航栏高度，保证各页面一致（覆盖各页内联样式） */
.navbar {
    height: 64px; /* 统一高度 */
    min-height: 64px;
    padding: 0 2rem; /* 水平内边距保持一致 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eaeaea;
}

.nav-container {
    max-width: 1200px;
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center; /* 垂直居中 */
    justify-content: flex-end;
    gap: 2.5rem;
    padding: 0 0.5rem; /* 控制内部间距，避免额外高度 */
}

/* 主内容顶部留出与导航栏相等的空间，避免内容被遮挡并避免跳动 */
main, .main-container, .container {
    margin-top: 64px; /* 与 .navbar height 保持同步 */
}

/* 页面转场动画 - 仅淡入淡出，无位移，时间与 transition.js 保持一致 */
.page-transition {
    animation: fadeIn 1.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 页面淡出时的临时类（导航栏不受影响） */
.fade-out {
    animation: fadeOut 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 默认取消对主内容的独立动画（由 body 控制转场） */
main, .container, .footer {
    animation: none; /* 默认无动画，由 body 统一控制 */
}

/* 统一主内容页面标题（research, projects, evomass） */
.container .page-title,
.container .section-title,
.container .tool-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.9rem 0 0.75rem;
    line-height: 1.12;
}

/* 统一页面头部间距，确保标题高度一致 */
.page-header, .tool-header, .section-title {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* 若需要进一步统一可调整 .container 的 padding-top，但不要影响首页（使用 .hero） */

/* 响应式：保持高度一致并适度收缩间距 */
@media (max-width: 768px) {
    .nav-container {
        justify-content: center;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    .main-container, .container {
        margin-top: 64px;
        padding: 6rem 1.5rem 3rem;
    }
}