/* ==========================================================================
   1. 设计变量与基础重置 (Design Tokens & Reset)
   ========================================================================== */
:root {
    /* 核心色彩 */
    --primary-blue: #0f172a;
    /* 侧边栏背景 */
    --secondary-blue: #334155;
    /* 文本主色 */
    --accent-color: #2563eb;
    /* 链接与高亮色 */
    --accent-hover: #1d4ed8;

    /* 页面背景与边框 */
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;

    /* 状态与辅助色 */
    --text-muted: #64748b;
    --danger-color: #dc2626;
    /* PDF与警示红 */
    --sidebar-width: 280px;
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Merriweather', serif;
    background:
        radial-gradient(circle at 10% 0%, #e0ecff 0, rgba(224, 236, 255, 0) 30%),
        radial-gradient(circle at 95% 15%, #f0f9ff 0, rgba(240, 249, 255, 0) 28%),
        var(--bg-color);
    color: var(--secondary-blue);
    line-height: 1.7;
}

/* 标题与特殊标签使用无衬线字体 */
h1,
h2,
h3,
.nav-menu,
.pub-title,
.venue-chip,
.role,
.uni {
    font-family: 'Inter', sans-serif;
}

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

a:hover {
    color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* ==========================================================================
   2. 侧边栏 (Sidebar)
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--primary-blue);
    color: white;
    z-index: 1000;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 2vh 20px;
}

/* 个人头像区域 */
.sidebar-header {
    text-align: center;
}

.avatar-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    overflow: hidden;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-header h1 {
    font-size: 1.25rem;
    margin: 5px 0;
}

.role {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

.uni {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

/* 社交链接图标 */
.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 15px 0;
}

.social-links a {
    color: #94a3b8;
    font-size: 1.1rem;
}

.social-links a:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* 导航菜单 */
.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #cbd5e1;
    font-size: 0.85rem;
    border-radius: 6px;
}

.nav-menu a i {
    width: 25px;
    margin-right: 10px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-footer {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.7rem;
    color: #64748b;
    text-align: center;
}

/* ==========================================================================
   3. 主体内容 (Main Content)
   ========================================================================== */
.main-content {
    flex: 1;
    max-width: 1400px;
    margin-left: var(--sidebar-width);
    padding: 60px 80px 20px 80px;
    /* 将底部的 60px 改为 20px */
}

.section {
    margin-bottom: 70px;
    animation: fadeIn 0.8s ease-out;
    padding: 28px 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.section:last-of-type {
    margin-bottom: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 章节标题样式 */
.section-header h2 {
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin: 0;
}

.header-line {
    width: 60px;
    height: 4px;
    margin: 8px 0 25px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* 简介部分 */
.lead-text {
    font-size: 1.1rem;
    color: var(--primary-blue);
}

.bio-content p {
    margin-top: 0;
    margin-bottom: 14px;
}

/* ==========================================================================
   4. 组件样式 (Components)
   ========================================================================== */

/* 4.1 新闻与提示 (News & Alerts) */
.alert-box {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #fff1f2;
    border-left: 4px solid var(--danger-color);
    border-radius: 6px;
}

.alert-icon {
    color: var(--danger-color);
    font-size: 1.2rem;
}

.scroll-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.news-window {
    max-height: 360px;
}

.students-window {
    max-height: 920px;
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.year-divider {
    margin: 20px 0 10px;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
    color: var(--accent-color);
}

.timeline li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.timeline .date {
    min-width: 80px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline .text {
    flex: 1;
    line-height: 1.72;
}

.news-paper-title {
    font-weight: 700;
    color: var(--primary-blue);
}

.news-venue-inline {
    color: var(--accent-color);
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* 4.2 履历时间轴 (Experience) */
.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.exp-item {
    display: flex;
    align-items: flex-start;
    /* 顶部对齐 */
    margin-bottom: 30px;
    position: relative;
}

.exp-year {
    min-width: 120px;
    /* 根据你最长的时间长度调整这个像素值 */
    width: 120px;
    /* 强制固定宽度 */
    flex-shrink: 0;
    /* 防止年份被挤压 */
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-color);
    /* 建议改为蓝色，呼应你的主题 */
    font-weight: 600;
}

.exp-detail {
    flex: 1;
    padding-left: 10px;
    /* 与左侧年份保持一点间距 */
}

.exp-detail strong {
    display: block;
    color: var(--primary-blue);
}

.exp-detail span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 4.3 出版物列表 (Publications) */


.pub-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.pub-index {
    min-width: 25px;
    font-weight: 600;
    color: #94a3b8;
}

.pub-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.pub-title a {
    color: var(--accent-color);
    font-weight: 600;
}

.pub-title-text {
    color: var(--accent-color);
    font-weight: 600;
}

.my-name {
    color: #000;
    font-weight: 700;
}

.venue-chip {
    display: inline-block;
    margin-right: 10px;
    padding: 2px 10px 2px 8px;
    border-radius: 3px;
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
    border-left: 4px solid #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.14);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.ccf-tag {
    background: #fef9c3;
    color: #854d0e;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.75rem;
    border: 1px solid #e2e8f0;
    margin-left: 5px;
    font-weight: 600;
}


.pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 2px 8px;
    color: var(--danger-color);
    font-size: 0.75rem;
    border: 1px solid #fecaca;
    border-radius: 4px;
}

.pub-section-block {
    margin-top: 20px;
}

.pub-section-block h3 {
    margin-bottom: 12px;
}

.pub-list-container {
    padding: 2px 0 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.pub-details {
    flex: 1;
}

.pub-authors {
    color: var(--secondary-blue);
    font-size: 0.9rem;
}

.pub-venue {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.pub-links {
    margin-top: 4px;
}

.no-data {
    margin: 0;
    color: var(--text-muted);
    font-style: italic;
}

/* 4.4 奖项与荣誉 (Awards) */
.award-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.award-list li {
    margin-bottom: 10px;
}

.award-list i {
    color: #f59e0b;
    margin-right: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.gallery-item {
    margin: 0;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background: #f8fafc;
}

.gallery-item figcaption {
    margin-top: 5px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.styled-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.styled-list li {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fcfdff;
}

.grant-no {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #ecfeff;
    color: #0f766e;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
}

/* 4.5 服务与学术团体 (Services) */
.services-grid-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
}

.card ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.full-width {
    width: 100%;
}

.service-sub-section+.service-sub-section {
    margin-top: 15px;
}

.text-muted {
    color: var(--text-muted);
}

/* 4.6 学生与校友 (Students & Alumni) */
.people-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.student-group+.student-group {
    margin-top: 26px;
}

.student-group h3 {
    margin: 0;
    font-size: 1.08rem;
    color: var(--primary-blue);
}

.person-tag {
    display: inline-flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    transition: 0.2s;
    margin-bottom: 5px;
}

.student-name {
    font-weight: 600;
    color: var(--primary-blue);
}

.tag-year,
.tag-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.supervisor-info {
    color: var(--accent-color);
    font-size: 0.78rem;
    margin-left: 4px;
    margin-right: 4px;
}

.person-tag:hover {
    border-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* 专门为校友去向设置的颜色 */
.alumni-destination {
    color: var(--accent-color);
    font-weight: 500;
    margin-left: 5px;
}

/* 统一的分隔符颜色 */
.tag-divider {
    color: var(--border-color);
    margin: 0 8px;
}

.uni-logo-inline {
    height: 16px;
    margin: 0 6px;
    vertical-align: -3px;
    filter: grayscale(100%);
    opacity: 0.7;
}

.person-tag:hover .uni-logo-inline {
    filter: grayscale(0%);
    opacity: 1;
}

.footer {
    margin-top: 12px;
    padding: 18px 6px 4px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* ==========================================================================
   5. 响应式布局 (Mobile Responsive)
   ========================================================================== */
@media (max-width: 900px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .nav-menu ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .main-content {
        margin-left: 0;
        padding: 30px 20px;
    }

    .section {
        padding: 22px 18px;
        margin-bottom: 32px;
    }

    .services-grid-top {
        grid-template-columns: 1fr;
    }
}
