:root {
            --primary-color: #2c3e50;
            --secondary-color: #7f8c8d;
            --background-color: #f5f7fa;
            --accent-color: #3498db;
        }

body {
    background-color: var(--background-color);
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #333;
    line-height: 1.6;
}

.container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    margin: 2rem auto;
    padding: 2rem;
    max-width: 1000px;
}

/* 优化后的语言切换按钮样式 */
.lang-switch {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    background: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.lang-switch button {
    margin: 0 0.2rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.lang-switch button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.lang-switch button:not(.active):hover {
    background-color: rgba(44, 62, 80, 0.1);
    border-color: rgba(44, 62, 80, 0.2);
}

.mathjax-container {
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin: 0.8rem 0;
    border-left: 3px solid var(--accent-color);
}

.section-title {
    margin: 1.8rem 0 1.2rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.note-card {
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.8rem;
}

.note-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.pdf-icon {
    transition: all 0.2s ease;
    font-size: 1.1em;
    color: #e74c3c;
    margin-left: 0.5rem;
}

.pdf-icon:hover {
    color: #c0392b;
    transform: scale(1.15);
}

.profile-photo {
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    max-width: 90%;
    height: auto;
    margin: 0 auto;
}

.academic-link {
    color: var(--accent-color);
    text-decoration: none;
}

.academic-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.email {
    font-family: 'Courier New', monospace;
}


.pub-list {
  list-style-type: none;
  padding-left: 0;
}

.pub-list li {
  margin-bottom: 1em;
  line-height: 1.5em;
}

.pub-title {
  font-weight: 500; /* 从600降到500 */
  font-size: 1.05rem;
  font-family: inherit; /* 使用正文字体 */
}


.pub-authors {
  color: #555;
}

.pub-info {
  color: #777;
  font-style: italic;
}

.pdf-icon {
  margin-left: 8px;
  color: #d9534f;
}

.pdf-icon:hover {
  color: #b52b27;
}


@media (max-width: 768px) {
    .container {
        padding: 1.2rem;
        margin: 1rem 0.5rem;
    }

    .profile-col {
        margin-top: 1.5rem;
    }

    .section-title {
        font-size: 1.3rem;
        margin: 1.5rem 0 1rem;
    }
}

/* ----------------------------------------------------------- */
/* 新增：同行学者网格布局 (Colleague Grid) - 风格适配版 */
/* ----------------------------------------------------------- */
/* ----------------------------------------------------------- */
/* 修改后的同行学者网格布局 */
/* ----------------------------------------------------------- */
/* ============================================================
   通用 Grid Item 样式 (基础外观 - 方案三卡片风)
   ============================================================ */
.grid-item {
    /* 布局核心：Flexbox 保证垂直居中 */
    display: flex;
    align-items: center;      /* 垂直居中 */
    justify-content: center;  /* 水平居中 */
    
    /* 文字排版：解决多行文字不居中的问题 */
    text-align: center;       /* <--- 关键！让多行文字内部也居中 */
    line-height: 1.3;         /* 行高紧凑一点 */
    
    /* 外观：方案三 (纯白 + 阴影) */
    background-color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    color: var(--accent-color);
    border-radius: 6px;
    
    /* 字体与交互 */
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 8px;
    transition: all 0.3s ease;
}

/* 鼠标悬停效果 */
.grid-item:hover {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.25);
    transform: translateY(-2px);
}

/* ============================================================
   场景 A：机构链接 (需要宽一点、高一点，容纳长名字)
   类名：.institute-grid
   ============================================================ */
.institute-grid {
    display: grid;
    /* 最小宽度设大一点(150px)，防止长名字换行太频繁 */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.institute-grid .grid-item {
    /* 设定较高的最小高度，保证两行字时不拥挤 */
    min-height: 64px; 
}

/* ============================================================
   场景 B：传送门/同事 (人名很短，需要紧凑小巧)
   类名：.colleague-grid
   ============================================================ */
.colleague-grid {
    display: grid;
    /* 最小宽度设小一点(110px)，人名不需要那么宽 */
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px; /* 间距也可以稍微小一点 */
    margin-top: 10px;
}

.colleague-grid .grid-item {
    /* 人名通常只有一行，高度改小，看起来更精致 */
    min-height: 40px; 
    font-size: 0.9rem; /* 字体也可以微微调小 */
}

/* ============================================================
   移动端通用适配
   ============================================================ */
@media (max-width: 576px) {
    .institute-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .colleague-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}
.grid-item i {
    /* 图标颜色使用你的 secondary-color */
    color: var(--secondary-color);
    margin-right: 4px;
    transition: color 0.3s ease;
}


.grid-item:hover i {
    /* 悬停时图标也变色 */
    color: var(--accent-color);
}

/* 移动端适配 */
@media (max-width: 576px) {
    .colleague-grid {
        /* 手机端每行大概显示 2-3 个 */
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
    .grid-item {
        font-size: 0.9rem;
        padding: 6px 2px;
    }
}

/* 分隔符样式：浅灰色，左右留空 */
.separator {
    color: #ccc; /* 浅灰色，比文字淡，起到分隔作用即可 */
    margin: 0 6px; /* 左右间距 */
}

/* 链接组里的文字大小 */
.link-group .academic-link {
    text-decoration: none; /* 平时不显示下划线 */
}

.link-group .academic-link:hover {
    text-decoration: underline; /* 鼠标放上去才显示下划线 */
}
/* =========================================
   学术徽章通用样式 (PDF & DOI)
   ========================================= */

/* 1. 基础结构：定义大小、字体、边框形状 */
.badge-link {
    display: inline-block;
    font-family: sans-serif; /* 无衬线字体，清晰 */
    font-size: 0.75rem;      /* 字号小巧 */
    font-weight: 700;        /* 加粗 */
    line-height: 1;          /* 行高紧凑 */
    padding: 2px 4px;        /* 内边距：上下2px，左右4px */
    border-radius: 3px;      /* 小圆角 */
    border: 1px solid;       /* 1px 实线边框 */
    
    margin-left: 8px;        /* 左侧间距 */
    text-decoration: none;   /* 去掉下划线 */
    vertical-align: text-bottom; /* 对齐文本底线 */
    transition: all 0.2s ease;
}

/* 2. PDF 专用样式 (浅红色版) */
.badge-pdf {
    /* 原来是 #e74c3c，现在改为 #ff6b6b */
    color: #f1948a;          
    border-color: #f1948a;   
}

.badge-pdf:hover {
    background-color: #f1948a; /* 悬停背景色也要保持一致 */
    color: white;              
    text-decoration: none;
}

/* 3. DOI 专用样式 (蓝色) */
.badge-doi {
    color: #3498db;          /* 蓝色文字 */
    border-color: #3498db;   /* 蓝色边框 */
}

.badge-doi:hover {
    background-color: #3498db; /* 悬停变蓝底 */
    color: white;              /* 文字变白 */
    text-decoration: none;
}

.site-footer {
    margin-top: 3rem;           /* 距离正文的间距 */
    padding-top: 1.5rem;        /* 内部留白 */
    padding-bottom: 1rem;
    border-top: 1px solid #eee; /* 顶部分隔线 */
    text-align: center;         /* 内容居中 */
    font-size: 0.85rem;         /* 字体调小 */
    font-family: sans-serif;    /* 使用无衬线字体，更清晰 */
}

/* 计数器图片样式优化 */
.visit-counter-img {
    vertical-align: middle;     /* 让图片和文字垂直对齐 */
    opacity: 0.8;               /* 稍微降低一点透明度，不那么刺眼 */
    transition: opacity 0.2s;
}

.visit-counter-img:hover {
    opacity: 1;                 /* 鼠标悬停时变亮 */
}