:root {
  --primary-color: #2c3e50;
  --accent-color: #1a237e;
  --light-color: #ecf0f1;
  /* 统一底色，方便和 notes 页对齐 */
  --background-color: #f3f4f6;
  --text-color: #333;
  --card-bg: #ffffff;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

/* ===== 全局基础字体 ===== */
body {
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  font-family: 'Open Sans', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  font-size: 0.85rem;   /* 全站基准字号（约 13.6px） */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Merriweather', serif;
  margin: 0;
}

/* ===== 顶部导航 ===== */

.navbar {
  width: 100%;
  background-color: var(--card-bg);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 0;
  z-index: 999;
}

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.navbar li {
  padding: 16px 20px;
  transition: background-color 0.3s;
}

.navbar li:hover {
  background-color: var(--light-color);
}

.navbar a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  position: relative;
  font-size: 1rem;   /* 导航略大一点 */
}

.navbar a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  left: 0;
  bottom: -4px;
  background-color: var(--accent-color);
  transition: width 0.3s;
}

.navbar a:hover::after {
  width: 100%;
}

/* ===== 布局 ===== */

.container {
  display: flex;
  max-width: 1480px;
  margin: 28px auto;
  gap: 28px;
  padding: 0 24px;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ===== 左侧个人卡片（Sidebar）===== */

.sidebar {
  flex: 0 0 340px;
  background: linear-gradient(160deg, #ffffff, #f5f7fb);
  border-radius: 18px;
  padding: 26px 24px 22px;
  text-align: center;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  font-size: 0.9rem;     /* 左侧整体略大一点，方便阅读联系方式 */
}

/* 头像 */
.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 14px;
  border: 3px solid #086fd5;
  box-shadow: 0 8px 18px rgba(47, 79, 79, 0.25);
}

/* 名字块：中英文名 */

.name-block {
  margin-top: 4px;
  margin-bottom: 7px;
  line-height: 1.9;
}

.name-en {
  font-size: 1.7rem;   /* 主视觉 */
  font-weight: 550;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: #111827;
  font-family: 'Playfair Display', 'Times New Roman', serif;
}

.name-zh {
  margin-top: 2px;
  font-size: 1.05rem;  /* 比正文略大一点 */
  font-weight: 600;
  line-height: 1.6;
  color: #4b5563;
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
}

/* 职位 / Title */

.sidebar .title {
  font-size: 0.85rem;  /* 和正文接近一点，不要太跳 */
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: 4px;
  margin-bottom: 14px;
  color: #6b7280;
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
}

/* Sidebar 文本 */

.sidebar p {
  margin: 0;
  /* 字号继承 sidebar 的 0.9rem 即可 */
  color: #374151;
}

/* 联系方式区域 */

.contact-info {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid #e5e7eb;
  text-align: left;
}

.contact-info p {
  margin: 4px 0;
}

/* 图标 + 文本 横向排列 */

.contact-info a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;

  /* 不再单独设 font-size，继承 sidebar 的 0.9rem */
  text-decoration: none;
  color: #374151;

  transition: background-color 0.2s ease, color 0.2s ease,
    transform 0.15s ease;
}

.contact-info a i {
  width: 18px;
  text-align: center;
  font-size: 1rem;
  color: #4b5563;
}

.contact-info a:hover {
  background-color: #e5effa;
  color: #0f172a;
  transform: translateX(1px);
}

.contact-info a:hover i {
  color: #1f2937;
}

/* ===== 右侧内容卡片 ===== */

.section {
  padding: 26px 28px;
  background-color: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.section p {
  text-align: justify;
  text-align-last: left;
  /* 直接继承 body 的 0.85rem */
}

.section h2 {
  font-size: 1.15rem;   /* 一级标题字号 */
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary-color);
  border-left: 5px solid var(--accent-color);
  padding-left: 12px;
}

.section ul {
  list-style: disc;
  margin: 0;
  margin-left: 25px;
  padding: 0;
}

.section ul li {
  margin-bottom: 10px;
  line-height: 1.6;
  text-align: justify;
  text-align-last: left;
}

.section h3 {
  font-size: 1.05rem;  /* 二级标题略大于正文 */
  color: var(--accent-color);
  margin-top: 20px;
  margin-bottom: 10px;
  border-left: 4px solid var(--accent-color);
  padding-left: 10px;
}

/* ===== Publications ===== */

.pub-list {
  margin: 0 0 12px 1.4rem;
  padding-left: 0.2rem;
}

.publication {
  margin-bottom: 10px;
  line-height: 1.6;
  text-align: justify;
  text-align-last: left;
}

.pub-index {
  font-weight: 600;
  color: #1a237e;
  margin-right: 6px;
}

.publication .paper-title {
  text-decoration: underline;
  color: var(--accent-color);
  font-weight: 500;
}

.paper-title {
  color: var(--accent-color);
  text-decoration: underline;
  font-weight: normal;
}

.section .paper-title a,
.publication .paper-title a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s, text-decoration 0.3s;
}

.section .paper-title a:hover,
.publication .paper-title a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.publication .first-author,
.publication span.first-author {
  font-weight: bold;
}

/* ===== Awards / Education / Projects 通用布局 ===== */

.award-list,
.edu-list,
.project-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.award-item,
.edu-item,
.project-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  padding-bottom: 5px;
  border-bottom: 1px dashed #eee;
}

.award-icon,
.edu-icon,
.project-icon {
  font-size: 1.2rem;
  margin-top: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.award-info,
.edu-info,
.project-info {
  flex: 1;
  min-width: 250px;
}

/* 校徽 Logo 统一大小 */

.edu-logo {
  width: 35px;
  height: 35px;
  object-fit: contain;
  display: block;
}

/* Awards 文字 */

.award-title {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.award-desc {
  /* 改用继承字号，不单独设 0.95 */
  color: #555;
  margin-top: 2px;
}

.award-year {
  font-size: 0.8rem;
  font-style: italic;
  color: gray;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Education 文字 */

.edu-degree {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.edu-school {
  /* 让补充说明继承，颜色单独设 */
  color: #666;
  margin-top: 2px;
}

.edu-time {
  font-size: 0.8rem;
  font-style: italic;
  color: gray;
  white-space: nowrap;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Projects 文字 */

.project-title {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.project-role {
  /* 继承 base 字号 */
  color: #555;
  margin-top: 2px;
}

.project-time {
  font-size: 0.8rem;
  font-style: italic;
  color: gray;
  white-space: nowrap;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ===== 联系 / 技能 ===== */

.contact-main {
  text-align: center;
  margin-top: 10px;
}

.contact-main p {
  /* 不再额外设 1rem，直接用 0.85rem + 行距 */
  margin-bottom: 15px;
  line-height: 1.6;
}

.contact-main a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-main a:hover {
  color: var(--primary-color);
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.contact-icons a {
  font-size: 1.3rem;
  color: var(--primary-color);
  transition: color 0.3s;
}

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

/* 技能块 */

.skill-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.skill-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.skill-content {
  display: flex;
  flex-direction: column;
}

.skill-title {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.95rem;
}

.skill-list {
  /* 继承字号 */
  color: #555;
}

/* Postdoc 搜索标记 */

.postdoc-search {
  color: black;
}

.postdoc-search i {
  color: red;
}

/* ===== 响应式 ===== */

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    padding: 0 10px;
  }

  .sidebar {
    width: 100%;
    margin-bottom: 20px;
    flex: 0 0 auto;
    font-size: 0.95rem;  /* 手机上稍微放大一点 */
  }
}

/* 平滑滚动（配合回到顶部按钮体验更好） */
html {
  scroll-behavior: smooth;
}

/* Back to Top 按钮基础样式 */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: none;
  outline: none;
  cursor: pointer;

  /* 渐变背景，偏你主页的蓝紫色 */
  background: linear-gradient(135deg, #4783d2, #514add);
  color: #ffffff;
  font-size: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.35);
  z-index: 999;

  /* 默认隐藏 */
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

/* 显示状态 */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* 悬停微动效 */
#back-to-top:hover {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.45);
  transform: translateY(-2px);
}

/* 键盘焦点可见性（无障碍） */
#back-to-top:focus-visible {
  outline: 2px solid #bfdbfe;
  outline-offset: 3px;
}
