/* ===== 全局样式 ===== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  line-height: 1.28;
}

.container {
  display: flex;
  min-height: 100vh;
}

/* ===== 侧边栏样式 ===== */
.sidebar {
  font-family: 'Lora', 'Source Serif Pro', serif;
  padding: 2rem 1.5rem;
  width: 260px;
  flex-shrink: 0;
  background: #f8f9fa;
  border-right: 1px solid #eaeaea;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar h1 {
  font-size: 1.5rem;
  margin: 1rem 0 0.5rem;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 2px solid #e0e0e0;
}

.main-nav {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
}

.nav-item {
  display: block;
  padding: 0.5rem 0;
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-item:hover {
  color: #0056b3;
}

.nav-item.active {
  font-weight: 600;
  color: #003366;
}

.ext-icon {
  margin-left: 4px;
  vertical-align: middle;
}

.sidebar-footer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666;
}

.contact {
  margin-top: 0.5rem;
  word-break: break-all;
}

/* ===== 主内容区域样式 ===== */
.main {
  flex-grow: 1;
  padding: 2rem;
  background-color: #ffffff;
}

.main h2 {
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.4em;
  margin: 0 0 1em 0;
  font-size: 1.7em;
}

/* ===== Biography段落样式 ===== */
.main p {
  line-height: 1.4;
  margin-bottom: 1em;
}

/* ===== 出版物列表样式 ===== */
.publications {
  list-style: none;
  padding: 0;
  margin: 0;
}

.publications li {
  margin-bottom: 2px;
  line-height: 1.5;
  padding: 0.3em 0;
}

.publications li strong {
  font-style: italic;
  font-weight: 700;
  color: #0366d6;
}

.publications em {
  font-style: italic;
  color: #24292e;
}

.publications em b {
  font-weight: bold;
  color: inherit;
}

/* ===== 编号出版物列表样式 ===== */
.main ol[reversed] {
  list-style-type: none;
  padding-left: 0;
  counter-reset: publication-counter 72;
  margin-top: 0;
}

.main ol[reversed] li {
  position: relative;
  padding: 0.5em 0 0.5em 2.6em;
  margin-bottom: 0.7em;
  line-height: 1.5;
  border-left: 2px solid #eaeaea;
  transition: all 0.25s ease;
}

.main ol[reversed] li:hover {
  background-color: #f5faff;
  border-left-color: #3498db;
  transform: translateX(3px);
}

.main ol[reversed] li::before {
  content: counter(publication-counter) ".";
  position: absolute;
  left: 0.8em;
  top: 0.5em;
  font-weight: bold;
  font-size: 0.95em;
  color: #2c3e50;
  transition: inherit;
}

.main ol[reversed] li:hover::before {
  color: #3498db;
}

.main ol[reversed] li:first-child::before {
  counter-increment: publication-counter 0;
}

.main ol[reversed] li ~ li::before {
  counter-increment: publication-counter -1;
}

/* 期刊会议样式 */
.main ol[reversed] li i {
  color: #00a0e9;
  font-style: italic;
}

.main ol[reversed] li i b {
  color: #0077cc;
  font-style: italic;
}

/* ===== 源代码链接样式 ===== */
.source-code-link {
  display: inline-block;
  background-color: #e8f4fd;
  border: 1.5px solid #3498db;
  border-radius: 6px;
  padding: 3px 10px;
  margin-left: 8px;
  font-size: 0.82em;
  font-weight: 700;
  color: #2c5aa0;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
  font-family: Arial, sans-serif;
}

.source-code-link:hover {
  background-color: #3498db;
  color: white;
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
  transform: translateY(-2px);
  text-decoration: none;
}

.source-code-link::before {
  content: "🔗 ";
  font-size: 0.9em;
}

/* 保持原有链接样式作为备选 */
.main ol[reversed] li a {
  color: #2980b9;
  font-size: 0.85em;
  padding: 0.1em 0.4em;
  margin-left: 0.3em;
  background: #f0f7ff;
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.2s;
}

.main ol[reversed] li a:hover {
  background: #3498db;
  color: white;
}

/* ===== News栏目样式 ===== */
.news-section {
  margin: 30px 0 20px;
}

.news-section h2 {
  color: #000;
  border-bottom-color: #0366d6;
}

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

.news-item {
  margin-bottom: 2px;
  line-height: 1.4;
  padding: 0.3em 0;
  color: #000;
}

.news-date {
  font-weight: 600;
  color: #0366d6;
  margin-right: 8px;
  font-style: normal;
}

.news-content {
  color: #000;
}

.news-highlight {
  font-weight: 600;
  color: #d35400;
}

/* ===== News链接样式 ===== */
.news-link {
  color: #0366d6;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.news-link:hover {
  color: #0056b3;
  border-bottom-color: #0366d6;
  text-decoration: none;
}

/* More链接样式 */
.news-more {
  margin-top: 12px;
  text-align: right;
}

.news-more-link {
  color: #0366d6;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 0.3em 0.8em;
  border: 1px solid #0366d6;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.news-more-link:hover {
  background: #0366d6;
  color: white;
  text-decoration: none;
}

/* ===== News页面特定样式 ===== */
.news-year-group {
  margin-bottom: 2rem;
}

.news-year-group h2 {
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.3em;
  margin: 0 0 1em 0;
  font-size: 1.5em;
}

.main h1 {
  color: #2c3e50;
  border-bottom: 3px solid #3498db;
  padding-bottom: 0.4em;
  margin: 0 0 1.5em 0;
  font-size: 2em;
}

/* ===== 通用链接样式 ===== */
a {
  color: #0366d6;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* ===== 外部链接图标样式 ===== */
.external {
  display: inline-flex;
  align-items: center;
}

/* ===== 位置信息样式 ===== */
.position {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    box-shadow: none;
    border-bottom: 1px solid #ddd;
    border-right: none;
  }
  
  .profile-img {
    width: 150px;
    height: 150px;
  }
  
  .main {
    padding: 1rem;
  }
  
  .main h2 {
    font-size: 1.4em;
  }
  
  /* 移动端进一步减少间距 */
  .publications li,
  .news-item {
    margin-bottom: 6px;
    padding: 0.2em 0;
  }
  
  /* News页面响应式调整 */
  .news-year-group {
    margin-bottom: 1.5rem;
  }
  
  .main h1 {
    font-size: 1.6em;
  }
  
  .news-year-group h2 {
    font-size: 1.3em;
  }
  
  /* 出版物列表移动端调整 */
  .main ol[reversed] li {
    padding-left: 2.2em;
    margin-bottom: 0.6em;
  }
  
  .main ol[reversed] li::before {
    left: 0.6em;
    font-size: 0.9em;
  }
  
  /* 源代码链接移动端调整 */
  .source-code-link {
    padding: 2px 8px;
    font-size: 0.78em;
    margin-left: 6px;
  }
}

/* ===== 研究页面专用样式 ===== */
.research-publication-list {
  list-style-type: none;
  padding-left: 0;
  counter-reset: research-counter;
  margin-top: 0;
}

.research-publication-list li {
  position: relative;
  padding: 0.5em 0 0.5em 2.6em;
  margin-bottom: 0.7em;
  line-height: 1.5;
  border-left: 2px solid #eaeaea;
  transition: all 0.25s ease;
}

.research-publication-list li:hover {
  background-color: #f5faff;
  border-left-color: #3498db;
  transform: translateX(3px);
}

.research-publication-list li::before {
  content: counter(research-counter) ".";
  position: absolute;
  left: 0.8em;
  top: 0.5em;
  font-weight: bold;
  font-size: 0.95em;
  color: #2c3e50;
  counter-increment: research-counter;
  transition: inherit;
}

.research-publication-list li:hover::before {
  color: #3498db;
}

/* 研究页面期刊会议样式 */
.research-publication-list li i {
  color: #00a0e9;
  font-style: italic;
}

.research-publication-list li i b {
  color: #0077cc;
  font-style: italic;
}

.member-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #f8f9fa;
  margin: 0 auto 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bdc3c7;
  font-size: 0.8em;
  border: 2px solid #e9ecef;
  overflow: hidden; /* 确保图片不会溢出圆形边框 */
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 确保图片填充整个圆形区域 */
  border-radius: 50%;
}
