/* JC Yang 风格学术个人主页 - 配色与字体 */

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 56px;
}

body {
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  color: #000;
  background-color: #f6f8fa;
  margin: 0;
  padding: 0;
}

a {
  color: #3d6fc4;
  text-decoration: none;
}

a:hover {
  color: #3d6fc4;
  text-decoration: underline;
}

.container {
  max-width: 1105px;
  margin: 0 auto;
  padding: 56px 80px 72px;
  background-color: #fff;
  min-height: 100vh;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
}

/* 置顶导航栏 */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 80px;
  background-color: #e8e8e8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: #555;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #3d6fc4;
}

/* 头部 */
.header {
  display: flex;
  gap: 32px;
  margin-bottom: 14px;
  padding-bottom: 16px;
  align-items: flex-start;
}

.header-left {
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 190px;
  height: 190px;
  border-radius: 8px;
  overflow: hidden;
  background: #f6f8fa;
  position: relative;
}

.avatar-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder-inner {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #6a737d;
  font-size: 17px;
}

.header-right {
  flex: 1;
  min-width: 0;
  padding-left: 24px;
}

.name {
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: bold;
  margin: 12px 0 0.1px 0;
  color: #3d6fc4;
}

.header-divider {
  border: none;
  border-top: 1px solid #8b9199;
  margin: 0 0 10px 0;
}

.affiliation {
  font-size: 18px;
  font-weight: bold;
  color: #3d6fc4;
  margin: 0 0 0.001em 0;
}

.email {
  font-size: 14px;
  color: #3d6fc4;
  margin: 0 0 2px 0;
}

.email a {
  color: #3d6fc4;
}

.cv-link {
  font-size: 14px;
  color: #3d6fc4;
  margin: 0 0 8px 0;
}

.cv-link a {
  color: #3d6fc4;
}

.social-icons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s;
}

.social-icon:hover {
  opacity: 0.8;
}

.social-icon svg {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.social-icon-cv { color: #4A5568; }
.social-icon-scholar { color: #4285F4; }
.social-icon-linkedin { color: #0A66C2; }
.social-icon-github { color: #181717; }
.social-icon-orcid { color: #A6CE39; }
.social-icon-researchgate img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* 区块 */
.section {
  margin-bottom: 32px;
}

.section h2 {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 8px 0;
  color: #3d6fc4;
  padding-bottom: 0;
  line-height: 1.2;
  border-bottom: 1px solid #8b9199;
}

.section h3 {
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: bold;
  margin: 10px 0 1px 0;
  color: #3d6fc4;
}

.section h3 + p {
  margin-top: 2px;
}

.section h3 ~ p {
  font-size: 15px;
  line-height: 1.2;
  margin-bottom: 0;
}

.more {
  display: inline-block;
  font-weight: 400;
  font-size: 13px;
  color: #3d6fc4;
  background-color: #f1f3f5;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
}

.more:hover {
  color: #3d6fc4;
  cursor: pointer;
}

.hover-note {
  font-weight: 400;
  font-size: 19px;
  color: #6a737d;
}

/* 简介 */
.bio {
  margin: 0;
  color: #000;
  line-height: 1.35;
  font-size: 17px;
}

/* 新闻列表 */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-list li {
  margin-bottom: 10px;
  padding-left: 0;
  font-size: 17px;
  line-height: 1.35;
}

/* Recent News：默认只显示前 5 条，点击 More 展开 */
#news-list:not(.news-expanded) li:nth-child(n + 6) {
  display: none;
}

.date {
  font-weight: 600;
  color: #3d6fc4;
  margin-right: 8px;
}

/* 论文列表 */
.note {
  font-size: 16px;
  color: #000;
  margin-bottom: 16px;
}

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

.pub-item {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  padding: 16px;
  background-color: #f1f8ff;
  border-radius: 6px;
}

.pub-image-wrapper {
  flex-shrink: 0;
  width: 205px;
}

.pub-image {
  width: 100%;
  height: 138px;
  border-radius: 4px;
  overflow: hidden;
  background: #f1f8ff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pub-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pub-image-placeholder {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #6a737d;
  font-size: 16px;
}

.pub-description {
  margin: 6px 0 0 0;
  font-size: 13px;
  font-style: italic;
  line-height: 1.45;
  color: #5a6578;
}

.pub-content {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.pub-title {
  font-weight: bold;
  color: #1a4d8c;
  margin-bottom: 2px;
}

.pub-authors {
  margin-bottom: 2px;
  font-size: 17px;
}

.pub-venue {
  margin-bottom: 2px;
  font-size: 17px;
}

.pub-links {
  font-size: 14px;
  margin-top: 2px;
  display: block;
  color: #5b9bd5;
}

.pub-links a {
  color: #5b9bd5;
  text-transform: uppercase;
}

.pub-abs-trigger,
.pub-bib-trigger {
  cursor: pointer;
}

/* ABS/BIB 弹框 */
.pub-popup {
  margin-top: 10px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.pub-popup.hidden {
  display: none !important;
}

.pub-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f6f8fa;
  border-bottom: 1px solid #d0d7de;
  font-weight: 600;
  font-size: 14px;
  color: #1a4d8c;
}

.pub-popup-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #6a737d;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 4px;
}

.pub-popup-close:hover {
  color: #1a4d8c;
  background: #eaeef2;
}

.pub-popup-body {
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #24292f;
  max-height: 320px;
  overflow-y: auto;
}

.pub-popup-body.pub-popup-abstract {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.pub-popup-body.pub-popup-bibtex pre {
  margin: 0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
  color: #0d1117;
}

.pub-aux.hidden {
  display: none !important;
}

/* Other Publications - 无图紧凑列表，与 Selected Publications 标题同规格 */
.section h3.other-pub-title {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: bold;
  margin: 28px 0 8px 0;
  padding-bottom: 0;
  line-height: 1.2;
  color: #3d6fc4;
  border-bottom: 1px solid #8b9199;
}

.other-pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.other-pub-item {
  margin-bottom: 14px;
  padding: 10px 14px;
  background-color: #f8fafc;
  border-radius: 4px;
  border-left: 3px solid #e1e8ed;
}

.other-pub-item .pub-title {
  font-size: 15px;
  margin-bottom: 2px;
}

.other-pub-item .pub-authors {
  font-size: 15px;
  margin-bottom: 2px;
  color: #333;
}

.other-pub-item .pub-venue {
  font-size: 14px;
  color: #5a6578;
}

.other-pub-item .pub-venue em {
  font-style: italic;
}

/* 荣誉列表 */
.honors-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.honors-list li {
  margin-bottom: 10px;
  font-size: 17px;
}

.honors-list .date {
  font-weight: 600;
  color: #3d6fc4;
}

/* 通用列表 */
.section ul:not(.news-list):not(.pub-list):not(.honors-list) {
  padding-left: 20px;
  margin: 0 0 12px 0;
}

.section ul:not(.news-list):not(.pub-list):not(.honors-list) li {
  margin-bottom: 4px;
  color: #000;
}

/* 访客地球 - ClustrMaps 3D 旋转地球 */
.visitor-globe-section {
  margin-top: 0;
  margin-bottom: 12px;
  text-align: center;
}

.visitor-globe-section .globe-container {
  width: 100%;
  height: 95px;
  margin-top: 4px;
  border-radius: 8px;
  overflow: hidden; /* prevent the globe from overlapping other sections */
  position: relative;
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.visitor-globe-section .visitor-count {
  margin: 0;
  font-size: 17px;
  color: #3d6fc4;
}

/* 缩小 ClustrMaps 地球尺寸以完整显示 */
.visitor-globe-section .globe-container .clstrm_outer {
  transform: scale(0.31);
  transform-origin: center center;
}

/* 页脚 */
.footer {
  margin-top: 4px;
  padding-top: 6px;
  font-size: 16px;
  color: #000;
}

/* 响应式 */
@media (max-width: 640px) {
  .top-nav {
    padding: 12px 16px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a,
  .nav-cv {
    font-size: 14px;
  }

  .container {
    padding: 24px 16px 40px;
  }
  
  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .header-right {
    text-align: center;
  }
  
  .social-icons {
    justify-content: center;
  }
  
  .name {
    font-size: 22px;
  }
  
  .section h2 {
    font-size: 20px;
  }
  
  .pub-item {
    flex-direction: column;
  }
  
  .pub-image-wrapper {
    width: 100%;
  }
  
  .pub-image {
    width: 100%;
    height: 200px;
  }

  .visitor-globe-section .globe-container {
    height: 85px;
  }
}
