:root {
  /* 亮色主题（默认） */
  --bg-color: #ffffff;
  --text-color: #333333;
  --heading-color: #000000;
  --link-color: #0066cc;
  --link-hover-color: #004499;
  --border-color: #dddddd;
  --card-bg: #f8f8f8;
  --nav-bg: #f0f0f0;
  --footer-bg: #f0f0f0;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  /* 暗色主题 */
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --heading-color: #ffffff;
  --link-color: #4da6ff;
  --link-hover-color: #80bdff;
  --border-color: #444444;
  --card-bg: #1e1e1e;
  --nav-bg: #1a1a1a;
  --footer-bg: #1a1a1a;
  --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 主题切换按钮 */
.theme-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px var(--shadow-color);
}

.theme-switch i {
  font-size: 20px;
  color: var(--text-color);
}

/* 头部样式 */
header {
  padding: 30px 0; /* 从原来的50px减小到30px */
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.profile {
  display: flex;
  align-items: center;
  gap: 20px; /* 从原来的30px减小到20px */
}

.profile-content h1 {
  font-size: 1.5rem; /* 从原来的2.5rem减小 */
  margin-bottom: 5px;
  color: var(--heading-color);
}

.profile-content h2 {
  font-size: 1rem; /* 从原来的1.2rem减小 */
  font-weight: 400;
  margin-bottom: 10px; /* 从原来的15px减小 */
  color: var(--text-color);
}

.profile-image {
  flex: 0 0 180px; /* 减小尺寸，从原来的200px改为150px */
}

.profile-image img {
  width: 100%;
  border-radius: 0%; /* 确保图片是圆形的 */
  box-shadow: 0 4px 10px var(--shadow-color);
  object-fit: contain; /* 确保图片填充整个圆形区域 */
  aspect-ratio: 1/1; /* 确保图片是正方形的 */
}

.profile-content {
  flex: 1;
}

.contact-info {
  margin-bottom: 15px;
}

.contact-info p {
  margin-bottom: 5px;
}

.contact-info i {
  width: 20px;
  margin-right: 10px;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  color: var(--link-color);
  text-decoration: none;
  font-size: 1.1rem;
}

.social-links a:hover {
  color: var(--link-hover-color);
}

/* 导航样式 */
nav {
  background-color: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px var(--shadow-color);
}

nav ul {
  display: flex;
  list-style: none;
}

nav li {
  flex: 1;
  text-align: center;
}

nav a {
  display: block;
  padding: 15px 0;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  transition: background-color 0.2s;
}

nav a:hover {
  background-color: var(--card-bg);
  color: var(--link-hover-color);
}

/* 主要内容样式 */
main {
  padding: 20px 0;
}

section {
  margin-bottom: 20px;
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--heading-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

section h3 {
  font-size: 1.0rem;
  margin-bottom: 10px;
  color: var(--heading-color);
}

section p {
  margin-bottom: 5px;
}

.section-links {
  text-align: right;
  margin-bottom: 20px;
}

.section-links a {
  color: var(--link-color);
  text-decoration: none;
}

.section-links a:hover {
  text-decoration: underline;
}

/* 研究领域样式 */
.research-areas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.research-area {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-area:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px var(--shadow-color);
}

/* 出版物样式 */
.publication-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.publication {
  display: flex;
  align-items: center; /* 确保内容垂直居中 */
  background-color: var(--card-bg);
  padding: 20px;
  margin: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-image {
  width: 150px;
  margin-right: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center; /* 确保图片垂直居中 */
  justify-content: center; /* 确保图片水平居中 */
}

.publication-image img {
  width: 100%;
  border-radius: 4px;
  object-fit: contain;
}

.publication-content {
  flex: 1;
}

.publication:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px var(--shadow-color);
}

.publication-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--heading-color);
}

.publication-authors {
  font-style: italic;
  margin-bottom: 10px;
}

.publication-venue {
  margin-bottom: 10px;
}

.publication-links {
  display: flex;
  gap: 15px;
}

.publication-links a {
  color: var(--link-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.publication-links a i {
  margin-right: 5px;
}

.publication-links a:hover {
  text-decoration: underline;
}

/* 项目样式 */
.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.project {
  background-color: var(--card-bg);
  border-radius: 5px;
  margin: 20px;
  overflow: hidden;
  box-shadow: 0 2px 5px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px var(--shadow-color);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 20px;
}

.project-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--heading-color);
}

.project-description {
  margin-bottom: 15px;
}

.project-links {
  display: flex;
  gap: 15px;
}

.project-links a {
  color: var(--link-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.project-links a i {
  margin-right: 5px;
}

.project-links a:hover {
  text-decoration: underline;
}

/* 教学样式 */
.course-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.course {
  background-color: var(--card-bg);
  padding: 20px;
  margin: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px var(--shadow-color);
}

.course-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--heading-color);
}

.course-semester {
  font-style: italic;
  margin-bottom: 10px;
}

.course-description {
  margin-bottom: 15px;
}

.course-links a {
  color: var(--link-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.course-links a i {
  margin-right: 5px;
}

.course-links a:hover {
  text-decoration: underline;
}

/* 页脚样式 */
footer {
  background-color: var(--footer-bg);
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .profile {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-image {
    flex: 0 0 120px; /* 从150px减小到120px */
  }
  
  .profile-image img {
    width: 120px; /* 确保图片大小与容器一致 */
    height: 120px;
  }
  
  .social-links {
    justify-content: center;
  }
  
  nav ul {
    flex-wrap: wrap;
  }
  
  nav li {
    flex: 0 0 50%;
  }
  
  .research-areas,
  .project-list,
  .course-list {
    grid-template-columns: 1fr;
  }
}

/* News Styles */
.news-item {
    background-color: var(--card-bg);
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.news-date {
    color: var(--text-color-muted);
    margin-bottom: 10px;
}

.news-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--heading-color);
}

.news-content {
    margin-bottom: 15px;
}

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

.news-link:hover {
    text-decoration: underline;
}



