/* ================================
   Global scrollbar fix
   保证所有页面 viewport 宽度一致
================================ */
html {
    overflow-y: scroll;
}

/* ================================
   CSS Variables
================================ */
:root {
    --primary-color: #003366;
    --accent-color: #c49b66;
    --text-dark: #2c3e50;
    --text-medium: #546e7a;
    --text-light: #90a4ae;
    --bg-light: #f8f9fa;
    --sidebar-width: 280px;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Source Sans Pro', sans-serif;
    --section-spacing: 50px;
}

/* ================================
   Reset
================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ================================
   Body
   不参与居中，避免 flex 抖动
================================ */
body {
    font-family: var(--font-body);
    background-color: #f0f2f5;
    color: var(--text-dark);
    line-height: 1.8;
    min-height: 100vh;
    padding: 20px 0;
}


/* ================================
   Base Elements
================================ */
a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

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

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
}

strong {
    color: var(--text-dark);
    font-weight: 600;
}

.highlight-gold {
    color: var(--accent-color);
    font-weight: 600;
}

/* ================================
   Main Container
   使用 margin 居中，稳定不跳
================================ */
.container {
    display: flex;
    width: 95%;
    max-width: 1150px;
    margin: 0 auto;                 /* ⭐ 核心 */
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

/* ================================
   Sidebar (Left)
   宽度绝对稳定
================================ */
.sidebar {
    font-family: var(--font-body);   /* Source Sans Pro */
    width: var(--sidebar-width);
    flex-shrink: 0;
    box-sizing: border-box;
    background: #fafbfc;
    padding: 40px 30px;   /* ⭐ 顶部 40px */
    border-right: 1px solid #eaeaea;
    text-align: center;
}


/* 左侧栏中的标题 / 名字 */
.sidebar h1,
.sidebar h2,
.sidebar h3,
.sidebar .author-name {
    font-family: var(--font-body);   /* 去掉 Playfair */
    font-weight: 600;
    letter-spacing: 0;
}

/* 职称 */
.sidebar .author-title {
    font-family: var(--font-body);
    font-weight: 400;
}

/* 单位信息 */
.sidebar .author-aff {
    font-family: var(--font-body);
    font-weight: 400;
}

/* 联系方式 */
.sidebar .contact-list,
.sidebar .contact-list li,
.sidebar .contact-list a {
    font-family: var(--font-body);
    font-weight: 400;
}

/* Avatar */
.avatar-container {
    width: 160px;
    height: 160px;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.15);
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.avatar-container:hover img {
    transform: scale(1.05);
}

/* Sidebar text */
.author-name {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.author-title {
    font-size: 0.95rem;
    color: var(--text-medium);
    margin-bottom: 15px;
}

.author-aff {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Contact */
.contact-list {
    list-style: none;
    text-align: left;
    margin-top: 40px;
    font-size: 0.9rem;
    color: var(--text-medium);
}

.contact-list li {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
}

.contact-list i {
    width: 30px;
    color: var(--accent-color);
    margin-right: 5px;
    text-align: center;
}

/* ================================
   Main Content (Right)
================================ */
.main-content {
    flex: 1;
    padding: 50px 60px;
}

/* ================================
   Navigation
================================ */
.nav-menu {
    display: flex;
    border-bottom: 2px solid #eeeeee;
    margin-bottom: 40px;
}

.nav-menu a {
    margin-right: 35px;
    padding-bottom: 10px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-menu a.active,
.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a.active::after,
.nav-menu a:hover::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -12px;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
}

/* ================================
   Sections
================================ */
section {
    margin-bottom: var(--section-spacing);
}

.section-title {
    font-size: 1.75rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

/* ================================
   Footer
================================ */
footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eeeeee;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ================================
   Responsive
================================ */
@media (max-width: 850px) {
    .container {
        flex-direction: column;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eaeaea;
        padding: 40px 20px;
    }

    .main-content {
        padding: 40px 25px;
    }

    .nav-menu {
        overflow-x: auto;
        white-space: nowrap;
    }
}
