/* static/css/main.css */

/* ============================================================================
   全局字体与间距缩小示例
   ============================================================================ */

/* -------- 1. 全局基础字号与行高 -------- */
html, body {
  font-size: 14px;      /* 原来可能是 16px，改为 14px */
  line-height: 1.4;     /* 原来是 1.6 左右，这里压缩到 1.4 */
}

/* -------- 2. 容器间距 -------- */
.container {
  max-width: 900px;     /* 也可适当缩小，比如从 960px 改为 900px */
  margin: 0 auto;
  padding: 0.8rem;      /* 原来可能是 1rem，改为 0.8rem */
}

/* -------- 3. Masthead（顶部导航） -------- */
.masthead {
  width: 100%;
  background: rgba(255, 255, 255, 0.85); /* 半透明白色背景 */
  backdrop-filter: blur(5px);           /* 模糊背景内容，增加玻璃感 */
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.masthead__menu-item a {
  font-size: 0.85rem;   /* 原来 0.95rem，改为 0.85rem */
  padding: 0.3rem 0;    /* 原来 0.4rem 0 */
}
.nav-flex .navicon {
  width: 20px;          /* 原来 24px，略微变小 */
  height: 1.8px;        /* 原来 2px */
}
.navicon::before,
.navicon::after {
  width: 20px;
  height: 1.8px;
}

/* -------- 4. 侧边栏（Sidebar） -------- */
.sidebar {
  width: 230px;         /* 原来 250px，改为 230px */
  top: 3.8rem;          /* 根据 masthead 高度稍调 */
  /* left 保持 container 计算方式不变，浏览器会居中 */
}
.profile_box {
  padding: 0.8rem;      /* 原来 1rem，改为 0.8rem */
}
.author__avatar-img {
  width: 150px;
  height: 240px; /* 调整高度以拉伸为椭圆形 */
  border-radius: 50%; /* 椭圆比例：水平50%，垂直40% */
  object-fit: cover;
  border: 2px solid #ccc;
}  
.author__name {
  font-size: 1.1rem;    /* 原来 1.2rem */
  margin-bottom: 0.2rem;/* 原来 0.3rem */
}
.author__motto-text {
  font-size: 0.85rem;   /* 原来 0.9rem */
  line-height: 1.3;     /* 原来 1.4 */
}
.author__location,
.author__email {
  font-size: 0.85rem;   /* 原来 0.95rem */
}
.vertical-icon-list li a {
  font-size: 0.9rem;    /* 原来 1rem */
}
.vertical-icon-list li a i.icon-uniform {
  font-size: 1.1rem;    /* 原来 1.2rem */
}

/* -------- 5. 文章主体（Main Content） -------- */
.page {
  margin-left: 250px;   /* 适当留出侧边栏空间，230px + 20px padding */
}
.page__section {
  margin-bottom: 1.8rem; /* 原来 2.5rem，改小 */
}
.section-title {
  font-size: 1.4rem;     /* 原来 1.6rem */
  margin-bottom: 0.6rem; /* 原来 0.8rem */
  border-bottom-width: 1px; /* 原来 2px，细一点 */
  padding-bottom: 0.2rem;   /* 原来 0.3rem */
}
.subheading {
  font-size: 1rem;      /* 原来 1.1rem */
  margin-top: 0.8rem;   /* 原来 1rem */
  margin-bottom: 0.4rem;/* 原来 0.5rem */
}

/* Markdown 渲染内容整体也跟随 html,body 设置的小字号 */
/* 若需要单独针对 .markdown-content 调整，可参照下面示例 */
.markdown-content {
  font-size: 0.95rem;   /* 比基础字体略小 */
  line-height: 1.4;     /* 与全局一致 */
  margin-top: 0.4rem;   /* 原来 0.5rem */
}
.markdown-content h2 {
  font-size: 1.2rem;    /* 原来 1.4rem */
  margin-top: 0.8rem;   /* 原来 1rem */
  margin-bottom: 0.4rem;/* 原来 0.5rem */
  padding-bottom: 0.2rem; /* 原来 0.3rem */
}
.markdown-content h3 {
  font-size: 1.05rem;   /* 原来 1.2rem */
  margin-top: 0.6rem;   /* 原来 0.8rem */
  margin-bottom: 0.3rem;/* 原来 0.4rem */
}
.markdown-content p {
  margin-bottom: 0.6rem;/* 原来 0.8rem */
}
.markdown-content ul {
  list-style: disc inside;
  margin-left: 1rem;
  margin-bottom: 0.6rem;/* 原来 0.8rem */
}
.markdown-content a {
  font-size: 0.95rem;   /* 与段落文本保持一致 */
}

/* -------- 6. 简单列表（News / Honors / Educations / Talks / Internships） -------- */
.simple-list {
  list-style: disc inside;
  margin-top: 0.4rem;   /* 原来 0.5rem */
}
.simple-list li {
  margin-bottom: 0.4rem;/* 原来 0.5rem */
  font-size: 0.95rem;   /* 原来 1rem */
}
.simple-list li em {
  font-size: 0.9rem;    /* 原来 0.95rem */
}

/* -------- 7. Publications “paper-box” -------- */
.paper-box {
  margin-bottom: 1.2rem;  /* 原来 1.5rem */
  padding: 0.8rem;        /* 原来 1rem */
}
.paper-title {
  font-size: 0.95rem;     /* 原来 1rem */
}
.paper-box-text p {
  margin-top: 0.2rem;     /* 原来 0.3rem */
  font-size: 0.9rem;      /* 原来 0.95rem */
}
.badge {
  font-size: 0.8rem;      /* 原来 0.85rem */
  padding: 0.15rem 0.4rem;/* 原来 0.2rem 0.5rem */
}

/* -------- 8. 排序控制 -------- */
.sort-controls {
  margin-bottom: 0.8rem;  /* 原来 1rem */
  font-size: 0.9rem;      /* 原来 0.95rem */
}

/* -------- 9. Footer -------- */
.footer {
  font-size: 0.85rem;     /* 原来 0.9rem */
  padding: 0.8rem 0;      /* 原来 1rem 0 */
  margin-top: 1.5rem;     /* 原来 2rem */
}

/* -------- 10. 响应式（可选轻微调整） -------- */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    margin-bottom: 1.5rem; /* 原来 2rem */
    left: auto;
    top: auto;
  }
  .page {
    margin-left: 0;
  }
  .masthead__menu-item a {
    font-size: 0.8rem;     /* 手机上再小一些 */
  }
}


/* ================= Reset & Base ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: #333;
    background: #f9f9f9;
  }
  a {
    color: #0066cc;
    text-decoration: none;
  }
  a:hover {
    text-decoration: underline;
  }
  .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem;
  }
  
  /* ================ Masthead (Top Navbar) ================ */
  .masthead {
    width: 100%;
    background: rgba(255, 255, 255, 0.85); /* 半透明白色背景 */
    backdrop-filter: blur(5px);           /* 模糊背景内容，增加玻璃感 */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  
  .masthead__inner-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav-flex {
    display: flex;
    align-items: center;
  }
  .navicon {
    width: 24px;
    height: 2px;
    background: #333;
    position: relative;
  }
  .navicon::before,
  .navicon::after {
    content: "";
    width: 24px;
    height: 2px;
    background: #333;
    position: absolute;
    left: 0;
  }
  .navicon::before {
    top: -6px;
  }
  .navicon::after {
    top: 6px;
  }
  .visible-links {
    list-style: none;
    display: flex;
  }
  .masthead__menu-item {
    margin-left: 1.2rem;
  }
  .masthead__menu-item a {
    font-size: 0.95rem;
    color: #333;
    padding: 0.4rem 0;
  }
  .masthead__menu-item a:hover {
    color: #0066cc;
  }
  .hidden-links {
    display: none;
  }
  
  /* 推内容区向下，否则会被固定导航遮挡 */
  #main {
    padding-top: 3.5rem;
    display: flex;
  }
  
  /* ================= Sidebar ================= */
  .sidebar {
    width: 250px;
    position: fixed;
    top: 4rem; /* 留出 masthead 高度 */
    left: calc(50% - 480px); /* container 左侧：50% - (960/2) */
  }
  .profile_box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 1rem;
    text-align: left; /* 整个侧边栏左对齐 */
  }
  .author__avatar {
    margin-bottom: 1rem;
    text-align: center; /* 头像居中 */
  }
  .author__avatar-img {
    width: 150px;
    height: 240px; /* 调整高度以拉伸为椭圆形 */
    border-radius: 50%; /* 椭圆比例：水平50%，垂直40% */
    object-fit: cover;
    border: 2px solid #ccc;
  }  
  .author__content--center {
    text-align: center; /* 姓名居中 */
  }
  .author__name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #222;
  }
  
  /* 人生格言 左对齐 */
  .author__motto {
    margin-bottom: 1rem;
    text-align: center;
  }
  .author__motto-text {
    font-style: italic;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* 定位 左对齐 */
  .author__location {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #555;
    display: flex;
    align-items: center;
    text-align: left;
  }
  .author__location i {
    margin-right: 0.4rem;
  }
  
  /* =========== 侧边栏竖排外部链接（左对齐，图标大小一致） =========== */
  .author__external-links-vertical {
    margin-top: 1rem;
  }
  .vertical-icon-list {
    list-style: none;
    padding-left: 0;
    text-align: left;
  }
  .vertical-icon-list li {
    margin: 0.8rem 0;
  }
  .vertical-icon-list li a {
    font-size: 1rem;
    color: #444;
    display: inline-flex;
    align-items: left;
  }
  .vertical-icon-list li a i.icon-uniform {
    font-size: 1.2rem;  /* 统一所有图标大小 */
    margin-right: 0.5rem;
  }
  .vertical-icon-list li a:hover {
    color: #0066cc;
  }
  
  /* ================ Main Article / Sections ================ */
  .page {
    flex: 1;
    /* 给 sidebar 留出空间：250px + 20px（padding） = 270px */
    margin-left: 270px;
  }
  .page__section {
    margin-bottom: 2.5rem;
  }
  .section-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.3rem;
    color: #333;
  }
  .subheading {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
  }
  
  /* Markdown 渲染内容的样式 */
  .markdown-content {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
  }
  .markdown-content h2 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.3rem;
  }
  .markdown-content h3 {
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
    font-size: 1.2rem;
    color: #333;
  }
  .markdown-content p {
    margin-bottom: 0.8rem;
  }
  .markdown-content ul {
    list-style: disc inside;
    margin-left: 1rem;
    margin-bottom: 0.8rem;
  }
  .markdown-content a {
    color: #0066cc;
  }
  .markdown-content a:hover {
    text-decoration: underline;
  }
  
  /* 简单列表（News / Honors / Educations / Talks / Internships） */
  .simple-list {
    list-style: disc inside;
    margin-top: 0.5rem;
  }
  .simple-list li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #444;
  }
  
  /* ================ Publications “paper-box” ================ */
  .paper-box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    padding: 1rem;
    cursor: pointer; /* 整块可点击切换摘要 */
  }
  .paper-box-text {
    /* 内部无需额外样式 */
  }
  .paper-title {
    font-weight: bold;
    font-size: 1rem;
    color: #0066cc;
    cursor: pointer; /* 标题本身可点击跳转 */
  }
  .paper-box-text p {
    margin-top: 0.3rem;
    font-size: 0.95rem;
    color: #444;
  }
  .badge {
    display: inline-block;
    background: #f2f2f2;
    color: #666;
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    margin-top: 0.3rem;
  }
  /* 默认隐藏的摘要 */
  .pub-abstract {
    margin-top: 0.5rem;
    font-size: 0.93rem;
    color: #555;
    line-height: 1.5;
    /* display: none; 在模板中直接用 style="display:none;" */
  }
  
  /* ================ 排序控制 ================ */
  .sort-controls {
    margin-bottom: 1rem;
    font-size: 0.95rem;
  }
  .sort-controls a {
    margin-left: 0.4rem;
  }
  .sort-controls strong {
    margin-left: 0.4rem;
  }
  
  /* ================ Footer ================ */
  .footer {
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
    color: #666;
    border-top: 1px solid #ddd;
    font-size: 0.9rem;
    background: #fafafa;
  }
  
  /* ================ Responsive ================ */
  @media (max-width: 768px) {
    #main {
      flex-direction: column;
    }
    .sidebar {
      position: static;
      width: 100%;
      margin-bottom: 2rem;
      left: auto;
      top: auto;
    }
    .page {
      margin-left: 0;
    }
  }
  
/* -----------------------------------------------------------------------------
   保证 News、Educations、Invited Talks、Internships 等列表项在一行尽量显示
   ----------------------------------------------------------------------------- */
   .simple-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
  }
  
  .simple-list li em {
    white-space: nowrap;
    margin-right: 0.2rem;
    font-style: normal;
  }
  
  .simple-list li .dash {
    white-space: nowrap;
  }
  
  /* 如果其它模块（Educations / Invited Talks / Internships）也类似，把他们的内容也设为 flex 子元素即可 */
  .education-detail,
  .talk-text,
  .intern-company,
  .news-text {
    flex: 1 1 auto;
    white-space: normal;
    line-height: 1.4;
  }
  
  
