/* 全局样式 */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-size: 1rem;
  line-height: 1.6;
  background-color: #fafafa;
  color: #2d3748;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* 全局过渡效果 */
body * {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.animated {
  transition-property: transform, opacity, background-color, color, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 链接交互 */
a {
  text-decoration: none;
  color: #3182ce;
  position: relative;
  transition: all 0.2s ease;
}

/* 普通链接的下划线效果 */
a:not(.photo a):not(.award-link)::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

a:not(.photo a):not(.award-link):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* 移除奖项链接的悬浮效果 */
.award-link {
  color: #2b6cb0;
  font-weight: bold;
  cursor: default;
  pointer-events: none;
  text-decoration: none;
  padding: 0.2em 0.5em;
  border-radius: 4px;
  background: linear-gradient(120deg, rgba(49, 130, 206, 0.1), rgba(49, 130, 206, 0.05));
}

/* 图片链接样式 */
.photo a {
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
}

.photo a::after {
  display: none;
}

/* 图片样式 */
.photo {
  text-align: center;
}

.photo img {
  border-radius: 12px;
  width: 160px;
  max-width: 100%;
  height: auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo img:hover {
  transform: scale(1.05) translateY(-5px);
}

a:hover {
  color: #003d82;
}

a:active {
  transform: scale(0.98);
}

/* h2 a {
  color: #1F2937;
} */

h2 a:hover {
  color: #c08000;
}

h1, h2, h3, .name {
  color: #1a202c;
  font-family: "Georgia", "Times New Roman", Times, serif;
  margin-bottom: 0.8em;
  line-height: 1.3;
  position: relative;
}

h1 { 
  font-size: 2.2rem; 
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 { 
  font-size: 1.6rem; 
  font-weight: 600;
  color: #2d3748;
  padding-bottom: 0.3em;
}

h3 { font-size: 1.25rem; font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 500; }

/* 布局样式 */
.header {
  background: white;
  border-radius: 0 0 12px 12px;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* 导航和侧边栏 */
.navigation-left, .sidebar {
  background-color: white;
  /* color: #2d3748; */
  padding: 1.5em;
  vertical-align: top;
  text-align: center;
  width: 300px;
  min-width: 150px;
  box-sizing: border-box;
  overflow: hidden;
  max-width: 300px;
  /* border-radius: 12px; */
  margin-top: 0;
}

.navigation-left:hover, .sidebar:hover {
  background-color: #f5f5f5;
}

.navigation-left:hover ~ .navigation-right {
  border-left: 0;
}

.navigation-right {
  background-color: white;
  color: #2d3748;
  padding: 1.5em 2em;
  vertical-align: top;
  width: auto;
  margin-top: 0;
}

.navigation-right:hover {
  background-color: #f5f5f5;
  border-left: 0;
}

.content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 2em;
  margin: 0.5em;
  width: auto;
  box-sizing: border-box;
  vertical-align: top; 
}

/* Bio部分特殊样式 - 消除宽屏幕下的空隙 */

#bio.section {
  padding-top: 5em;
  

}

#bio h3 {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 1em;
}
/* 让 Bio 部分的段落文字两端对齐 */
#bio p {
  text-align: justify;
  text-justify: inter-ideograph;
  /* 兼容中文排版 */
}

/* 确保在所有屏幕尺寸下Bio都没有空隙 */
@media (min-width: 1025px) {
 
  
  
  #bio h3 {
    margin-top: 0 !important;
  }
}

.content:hover {
  background-color: #f5f5f5;
}

/* 响应式布局 */
.narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5em;
}

.narrow:hover {
  padding: 0 1.7em;
}

/* 表格样式 */
table {
  width: 100%;
  border-spacing: 0;
  margin-top: 0.5em;
}

td {
  width: auto;
}

.contact-info {
  padding-left: 3em;
}

.contact-info:hover {
  padding-left: 3.2em;
}

/* 列表样式 */
ul {
  list-style-position: outside;
  margin: 0 0 1.2em 1.2em;
  padding-left: 0;
}

li {
  margin-bottom: 0.4em;
  transition: background-color 0.2s ease;
  padding: 0.2em 0.5em;
  border-radius: 4px;
}

li:hover {
  background-color: rgba(0,0,0,0.05);
}

/* PhD Students 列表 */
.phd-students ul {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.phd-students li {
  margin-bottom: 0.6em;
  text-align: left;
  padding-left: 3%;
}

/* Publications 表格 */
.pubs-table {
  width: 100%;
  border-collapse: collapse;
}

.pubs-table td {
  padding: 1em 0;
  text-align: left;
  vertical-align: top;
}

.pubs-table .image-cell {
  width: 120px;
  padding-right: 2em;
}

.pubs-table img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  display: block;
  margin-right: 1em;
  border-radius: 4px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              box-shadow 0.3s ease;
}

.pubs-table img:hover {
  transform: scale(1.1) translateY(-5px);
  opacity: 0.95;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.pubs-table tr {
  display: flex;
  align-items: flex-start;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease,
              background-color 0.3s ease;
}

.pubs-table tr:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  background-color: rgba(0,0,0,0.03);
}

.pubs-table td:last-child {
  flex-grow: 1;
}

/* 动态内容切换 */
.section {
  display: none;
  opacity: 0;
  transform: translateY(20px);
}

.section.active {
  display: block;
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 滚动动画 */
.content h2, .content h3 {
  opacity: 0;
  transform: translateY(20px);
}

.content h2.visible, .content h3.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 特殊元素 */
.email {
  font-family: "Courier New", Courier, monospace;
}

cite {
  font-style: normal;
  font-weight: bold;
  color: #0056b3;
}

/* 媒体查询 */
/* 平板设备 (iPad) */
@media (max-width: 1024px) {
  .navigation-left, .sidebar {
    width: 200px;
    padding: 1em;
  }

  .content {
    padding: 1.8em;
  }

  .photo img {
    width: 140px;
  }

  li {
    margin-bottom: 0.8em;
  }

  .pubs-table img {
    width: 150px;
    height: 112px;
    object-fit: cover;
  }
}

/* 中等屏幕设备 */
@media (max-width: 800px) {
  .navigation-left, .sidebar {
    width: 150px;
    padding: 0.8em;
    max-width: 150px;
  }

  .navigation-right {
    padding: 0.8em;
  }

  .content {
    padding: 1.2em;
  }

  .contact-info {
    padding-left: 1.5em;
  }

  .photo img {
    width: 120px;
  }

  .pubs-table tr {
    flex-direction: column;
    align-items: center;
    margin-bottom: 2em;
  }

  .pubs-table .image-cell {
    width: 100%;
    padding-right: 0;
    text-align: center;
  }

  .pubs-table img {
    margin: 0 0 1em 0;
    width: 200px;
    height: 150px;
    object-fit: cover;
  }

  .pubs-table td:last-child {
    flex-grow: 0;
    padding-top: 0.5em;
    text-align: center;
  }
}

/* 手机设备 */
@media (max-width: 500px) {
  html {
    font-size: 15px;
  }

  table {
    display: block;
    width: 100%;
  }

  tbody {
    width: 100%;
    display: block;
  }

  tr {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 1em;
  }

  td {
    display: block;
    width: 100%;
    text-align: center;
  }

  .navigation-left, .sidebar {
    width: 100%;
    max-width: 100%;
    border-right: none;
    padding: 1em;
  }

  .navigation-right {
    padding: 1em;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }

  .navigation-right table {
    width: 100%;
    max-width: 100%;
  }

  .navigation-right td {
    display: block;
    width: 100%;
    text-align: center;
  }

  .content {
    width: 100%;
    border-left: none;
    margin-left: 0;
    padding: 1.2em;
  }

  table, tr, td {
    display: block;
  }

  .photo {
    margin: 1em 0;
  }

  .photo img {
    width: 140px;
  }

  /* 调整标题间距 */
  h1, h2, h3 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
  }

  h1:first-child,
  h2:first-child,
  h3:first-child {
    margin-top: 0;
  }

  /* 优化列表样式 */
  ul {
    margin: 0 0 1.5em 0;
    padding-left: 1.2em;
  }

  li {
    margin-bottom: 0.8em;
    padding: 0.4em 0.8em;
    text-align: left;
  }

  /* 优化联系信息显示 */
  .contact-info {
    padding: 1em;
    text-align: center;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
    margin: 1em 0;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
  }

  .contact-info p {
    margin: 0;
    padding: 0;
    word-break: break-word;
  }

  .contact-info br {
    display: block;
    content: "";
    margin-top: 0.5em;
  }

  .contact-info a {
    display: inline-block;
    word-break: break-all;
  }

  /* 优化出版物列表 */
  .pubs-table {
    width: 100%;
    display: block;
    margin: 0 auto;
  }

  .pubs-table tr {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto 2em auto;
    padding: 1em;
    border-radius: 8px;
    background: rgba(0,0,0,0.02);
    text-align: center;
    box-sizing: border-box;
  }

  .pubs-table td {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .pubs-table .image-cell {
    width: 100%;
    padding: 0;
    text-align: center;
    box-sizing: border-box;
  }

  .pubs-table img {
    width: 240px;
    height: 180px;
    object-fit: cover;
    margin: 0 auto 1em auto;
    border-radius: 4px;
    display: block;
  }

  .pubs-table td:last-child {
    padding: 0 0.5em;
    text-align: left;
    box-sizing: border-box;
  }

  /* 改善触摸交互 */
  a, button, .photo img, li {
    padding: 0.4em;
    margin: -0.4em;
  }

  /* 优化滚动体验 */
  .content {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y proximity;
  }

  .section {
    scroll-snap-align: start;
  }

  /* 增强内容层次感 */
  .section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 1.5em;
    padding: 1.2em;
  }

  /* 优化PhD学生列表 */
  .phd-students li {
    background: rgba(0,0,0,0.02);
    padding: 0.8em 1em;
    border-radius: 8px;
    margin-bottom: 0.8em;
  }

  /* 触摸反馈 */
  a:active, button:active, .photo img:active {
    transform: scale(0.95);
  }

  .pubs-table tr {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease;
  }

  .pubs-table tr:active {
    transform: scale(0.98);
  }

  /* 滑动手势支持 */
  .content {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: y proximity;
  }

  .section {
    scroll-snap-align: start;
  }

  /* 触摸反馈优化 */
  a, button, .photo img, li {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* 改进加载状态 */
  .loading {
    border-radius: 8px;
    min-height: 100px;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #e0e0e0;
  }

  .contact-info {
    color: #e0e0e0;
    border-radius: 8px;
    padding: 1em;
  }  

  a { 
    color: #66b3ff; 
  }

  a:hover { 
    color: #99ccff; 
  }

  h1, h2, h3, .name { 
    color: #ffffff; 
  }

  .navigation-left, .sidebar, .navigation-right, .content {
    background-color: #1e1e1e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  .navigation-left:hover, .sidebar:hover, .navigation-right:hover, .content:hover {
    background-color: #2a2a2a;
  }

  .section {
    background-color: #1e1e1e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }

  .section:hover {
    background-color: #2a2a2a;
  }

  .pubs-table tr {
    border-bottom: none;
    background-color: rgba(255, 255, 255, 0.02);
  }

  .pubs-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }

  .header {
    background-color: #1e1e1e;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }

  .header:hover {
    background-color: #2a2a2a;
  }

  li:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }

  .award-link {
    background: linear-gradient(120deg, rgba(102, 179, 255, 0.1), rgba(102, 179, 255, 0.05));
    color: #66b3ff;
  }

  .email {
    color: #66b3ff;
  }

  cite {
    color: #66b3ff;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  body {
    --text-color: #000;
    --bg-color: #fff;
  }

  body.dark-mode {
    --text-color: #fff;
    --bg-color: #000;
  }

  body {
    color: var(--text-color);
    background-color: var(--bg-color);
  }

  a {
    text-decoration: underline;
  }
}

/* 加载动画 */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.loading {
  background: linear-gradient(90deg, 
    rgba(0,0,0,0.03) 25%, 
    rgba(0,0,0,0.05) 37%, 
    rgba(0,0,0,0.03) 63%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

