/* ===== 基于 Bei Yu 设计风格的样式 ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #4169E1;
    --link-blue: #4169E1;
    --text-dark: #333333;
    --text-gray: #666666;
    --sidebar-bg: #f5f5f5;
    --main-bg: #ffffff;
    --border-color: #e0e0e0;
    --hover-bg: #f5f5f5;
    --active-bg: #8B0000;
}

html {
    scroll-behavior: auto;
}

body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8f8f8;
}

/* ===== 左侧导航栏 ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 150px;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 1000;
    padding: 20px 0;
}

.sidebar-header {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.sidebar-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-family: Georgia, serif;
}

.sidebar-name-cn {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 5px;
}

/* 导航菜单 */
.nav-menu {
    padding: 0;
}

.nav-menu a {
    display: block;
    padding: 8px 18px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.nav-menu a:hover {
    background-color: var(--hover-bg);
}

.nav-menu a.active {
    background-color: var(--active-bg);
    color: white;
}

.nav-section-title {
    padding: 15px 18px 8px;
    font-weight: bold;
    font-size: 16px;
    color: var(--text-dark);
}

.nav-section {
    margin-bottom: 10px;
}

/* 侧边栏底部logo */
.sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sidebar-footer img {
    width: 60px;
    height: auto;
}

/* ===== 主内容区域 ===== */
.main-content {
    margin-left: 150px;
    padding: 0;
    background: var(--main-bg);
    min-height: 100vh;
}

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

/* ===== 个人信息头部 ===== */
.profile-header {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-start;
}

.profile-photo-section {
    flex-shrink: 0;
}

.profile-photo {
    width: 220px;
    height: auto;
    display: block;
}

.profile-info-section {
    flex: 1;
}

.profile-map {
    flex-shrink: 0;
    min-width: 220px;
    text-align: right;
}

.profile-map #clustrmaps-div {
    display: inline-block;
}

.profile-main-name {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-family: Georgia, serif;
}

.profile-position {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.profile-position a {
    color: var(--link-blue);
    text-decoration: none;
}

.profile-position a:hover {
    text-decoration: underline;
}

.profile-education {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    text-decoration: none;
}

.social-icons img {
    width: 28px;
    height: 28px;
}

.profile-cv {
    font-size: 16px;
}

.profile-cv a {
    color: var(--link-blue);
    text-decoration: none;
    font-weight: 600;
}

.profile-cv a:hover {
    text-decoration: underline;
}

.profile-quote {
    position: absolute;
    right: 60px;
    top: 300px;
    max-width: 400px;
    font-style: italic;
    color: var(--text-gray);
    font-size: 14px;
    text-align: right;
}

/* ===== 章节样式 ===== */
.section {
    margin-bottom: 50px;
}

.section h2 {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-family: Georgia, serif;
}

.section h3 {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-blue);
    margin: 30px 0 15px;
    font-family: Georgia, serif;
}

.section h4 {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin: 20px 0 10px;
}

.section p {
    margin-bottom: 15px;
    text-align: justify;
    line-height: 1.8;
}

/* ===== 链接样式 ===== */
a {
    color: var(--link-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== 列表样式 ===== */
ul {
    margin: 15px 0;
    padding-left: 40px;
}

ol {
    margin: 15px 0;
    padding-left: 40px;
}

li {
    margin-bottom: 12px;
    line-height: 1.7;
}

/* ===== 表格样式 ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table td {
    padding: 8px 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

table td:first-child {
    font-weight: bold;
    width: 120px;
    color: var(--text-dark);
}

/* ===== 时间轴样式 ===== */
.timeline-list {
    list-style: none;
    padding: 0;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

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

.timeline-content {
    flex: 1;
    padding-right: 10px;
}

.timeline-date {
    flex-shrink: 0;
    width: 180px;
    text-align: right;
    color: var(--text-gray);
    font-size: 15px;
}

.timeline-content h3 {
    font-size: 18px;
    margin: 0 0 8px 0;
    color: var(--text-dark);
}

.timeline-content p {
    margin-bottom: 5px;
    text-align: left;
}

.timeline-list.compact .timeline-item {
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.timeline-list.compact .timeline-content p {
    margin-bottom: 1px;
    line-height: 1.2;
}

.timeline-list.compact .timeline-date {
    font-size: 12px;
    line-height: 1.4;
}

/* ===== 出版物样式 ===== */
.publication-list {
    list-style: none;
    padding: 0;
}

.publication-list > li {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.publication-list > li:last-child {
    border-bottom: none;
}

.pub-authors {
    color: var(--text-dark);
    margin-bottom: 5px;
}

.pub-title {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.pub-venue {
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 8px;
}

.pub-links {
    font-size: 14px;
}

.pub-links a {
    margin-right: 15px;
    color: var(--link-blue);
}

/* ===== 项目卡片 ===== */
.project-list {
    list-style: none;
    padding: 0;
}

.project-item {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--hover-bg);
    border-left: 4px solid var(--primary-blue);
}

.project-item h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.project-item p {
    margin-bottom: 10px;
    text-align: left;
}

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    background: #dc3545;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--link-blue);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn:hover {
    background: #315fb8;
    text-decoration: none;
}

/* ===== 页脚 ===== */
.footer {
    margin-left: 150px;
    padding: 30px 60px;
    text-align: center;
    color: var(--text-gray);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    background: var(--main-bg);
}

.footer p {
    margin: 5px 0;
    text-align: center;
}

.footer a {
    color: var(--link-blue);
}

.footer img {
    vertical-align: middle;
    margin-right: 5px;
}

/* ===== 移动端响应式 ===== */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        width: 200px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .container {
        padding: 20px;
    }

    .footer {
        margin-left: 0;
        padding: 20px;
    }

    .profile-header {
        flex-direction: column;
        gap: 20px;
    }

    .profile-photo {
        width: 180px;
    }

    .profile-quote {
        position: static;
        max-width: 100%;
        text-align: left;
        margin-top: 20px;
    }

    .timeline-item {
        flex-direction: column;
    }

    .timeline-date {
        width: auto;
        text-align: left;
        margin-top: 5px;
    }

    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
        background: var(--primary-blue);
        color: white;
        border: none;
        border-radius: 5px;
        font-size: 20px;
        cursor: pointer;
        z-index: 999;
    }
}

/* ===== 页面标题 ===== */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 34px;
    font-weight: bold;
    color: var(--primary-blue);
    font-family: Georgia, serif;
}

.page-subtitle {
    margin-top: 8px;
    color: var(--text-gray);
    font-size: 16px;
}

.section-index {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.section-index a {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--hover-bg);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
}

.section-index a:hover {
    background: #eaeaea;
}

.external-links {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.external-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-blue);
    margin: 0 0 15px 0;
    font-family: Georgia, serif;
}

.news-box {
    border: 1px solid #e1cc7a;
    background: #fff6b8;
    padding: 12px 16px;
    box-shadow: inset 0 0 0 1px #f4de8b;
    border-radius: 4px;
}

.news-list {
    margin: 0;
    padding-left: 24px;
}

.news-list li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.news-list li:last-child {
    margin-bottom: 0;
}

.news-date {
    font-weight: bold;
    color: var(--primary-blue);
    margin-right: 6px;
}

.subsection-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin: 15px 0 10px 0;
}

/* ===== publications 列表 ===== */
.publications-list {
    list-style: square;
    padding-left: 26px;
    margin-top: 15px;
}

.publications-list li {
    margin-bottom: 14px;
}

/* ===== students 页面 ===== */
.people-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 28px;
    margin-top: 10px;
}

.person-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.person-photo {
    width: 86px;
    height: 86px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    flex-shrink: 0;
    overflow: hidden;
}

.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.person-photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-weight: bold;
    font-size: 14px;
    background: #ffffff;
}

.person-name {
    color: var(--primary-dark);
    font-weight: bold;
    margin-bottom: 4px;
}

.person-meta {
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
}

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

.bio-hero {
    width: 100%;
    height: 320px;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, #e9eefc 0%, #f8f8f8 40%, #ffffff 100%);
}

@media (max-width: 1024px) {
    .people-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .people-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* ===== 特殊样式 ===== */
strong {
    font-weight: bold;
    color: var(--text-dark);
}

code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

pre code {
    background: none;
    padding: 0;
}

/* 图标字体支持 */
.fa, .fas, .fab {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands';
}
