/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* background-color: #2c3e50; */
}

body {
    font-family: 'Noto Serif', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Hero Section */
.hero {
    position: relative;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 65%;
    margin: 0 auto;
}


/* ===== Refined Sticky Header Layout ===== */

/* 顶部横幅图片：稍微变窄并固定在顶部 */
.hero-image {
  width: 100%;
  height: 100px;
  background: url('images/head2.jpg') no-repeat center center;
  background-size: cover;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* 顶部标题+导航栏，宽度与正文一致 */
.header-row {
  position: sticky;
  top: 100px; /* 紧贴上方图片 */
  z-index: 9;

  display: flex;
  justify-content: space-between;
  align-items: flex-end;

  width: 100%;         /* 与 .hero 宽度一致 */
  margin: 0 auto;     /* 居中对齐 */
  padding: 0px 0 6px 0;

  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid #eee;
}

/* 标题左对齐 */
.header-row h2 {
  margin: 0;
  font-family: 'Noto Serif', serif;
  font-size: 1.6em;
  color: #34495e;
  text-align: left;
}

/* 导航栏靠右 */
.inline-navbar {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 2px; /* 缩小与底线距离 */
}

.inline-navbar a {
  font-size: 1rem;
  color: #666;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.inline-navbar a:hover {
  color: #057777;
  background-color: rgba(5, 119, 119, 0.1);
}

.inline-navbar a.active {
  color: #057777;
  font-weight: 500;
  background-color: rgba(5, 119, 119, 0.08);
}

/* 响应式布局调整 */
@media (max-width: 768px) {
  .header-row {
    flex-direction: column;
    align-items: center;
    top: 90px;
    padding: 6px 20px;
  }

  .inline-navbar {
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }

  .inline-navbar a {
    font-size: 0.95rem;
  }
}



.container {
    width: 100%;
    margin: 0 auto;
    padding: 40px;
    /* padding-top: 90px; */
    background: #fff;
    border-radius: 0 0 15px 15px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); */
}

/* Profile Section */
.profile-section {
    padding-top: 20px;
    display: flex;
    gap: 60px;
    margin-top: 0;
}

.profile-left {
    flex: 0 0 200px;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-photo-container {
    width: 200px;
    height: 250px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-links {
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    gap: 12px;
    margin-top: 20px;
    width: 200px;
}

.social-links a {
    color: #34495e;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    width: 180px;
    justify-content: flex-start;
}

.social-links a i {
    font-size: 1.1em;
    width: 20px;
    text-align: center;
    /* color: #2c3e50; */
}

.social-links a:hover {
    color: #2c3e50;
    transform: translateX(3px);
    background-color: rgba(0, 0, 0, 0.03);
}

.profile-right {
    flex: 1;
}


.container h2 {
    font-family: 'Noto Serif', serif;
    font-size: 1.8em;
    color: #34495e;
    margin: 0 0 0 0;
}
/* Typography */
h1 {
    font-family: 'Noto Serif', serif;
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 30px;
}

h2 {
    font-family: 'Noto Serif', serif;
    font-size: 1.8em;
    color: #34495e;
    margin: 30px 0 15px;
}


h3 {
    font-family: 'Noto Serif', serif;
    font-size: 1.2em;
    color: #34495e;
    margin: 30px 0 15px;
}


p {
    font-family: 'Noto Serif', serif;
    font-size: 0.95em;
    color: #34495e;
    text-justify: inter-word;
}


.intro-text {
    margin-bottom: 40px;
    font-family: 'Noto Serif', Arial, sans-serif;
}

.chinese-intro {
    font-family: 'Noto Serif', Arial, sans-serif;
    font-size: 1.2em;
    color: #666;
    margin-bottom: 15px;
}

.english-intro {
    font-family: 'Noto Serif', Arial, sans-serif;
    font-size: 1.1em;
    color: #666;
    margin-bottom: 30px;
}

.content-section {
    padding-top: 20px;
}
.content-section h2 {
    font-family: 'Noto Serif', serif;
    font-size: 1.8em;
    color: #34495e;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.content-section h2:first-child {
    margin-top: 0;
}

.content-section h3 {
    font-family: 'Noto Serif', serif;
    font-size: 1.2em;
    color: #34495e;
    margin: 40px 0 20px;
    /* padding-top: 20px; */
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.content-section h3:first-child {
    margin-top: 0;
}


.content-section p {
    font-family: 'Noto Serif', sans-serif;
    margin-bottom: 20px;
    color: #555;
    font-size: 0.95em;
    line-height: 1.6;
    text-justify: inter-word;
}

.research-item {
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 3px solid #eee;
}

.research-item h3 {
    font-family: 'Noto Serif', Arial, sans-serif;
    font-size: 1.3em;
    color: #2c3e50;
    margin: 0 0 10px;
}

.news-item {
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 3px solid #eee;
}

/* ===== News Section Formatting ===== */
.news-list p {
    margin-bottom: 8px;
    font-family: 'Noto Serif', sans-serif;
    color: #34495e;
    font-size: 0.95em;
    line-height: 1.6;
  }
  
  .news-list strong {
    color: #057777; /* 和链接绿色协调 */
    /* font-weight: 400; */
  }

.date {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.content-section p {
    font-family: 'Noto Serif', sans-serif;
    margin-bottom: 20px;
    color: #555;
    font-size: 0.95em; /* Reduced font size */
    line-height: 1.6;
}


.photo-credit {
    font-size: 0.8em;
    color: #939090;
    margin-bottom: 20px;
    /* font-style: italic; */
    text-align: left;
    align-self: flex-start;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 20px;
    }
    
    .profile-section {
        gap: 40px;
    }
    
    .profile-left {
        flex: 0 0 250px;
    }
    
    .profile-photo-container {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-right {
        width: 100%;
    }
    
    h1 {
        text-align: center;
    }
    
    .social-links {
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .profile-left {
        flex: 0 0 200px;
    }
    
    .profile-photo-container {
        width: 200px;
        height: 200px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1em;
    }
}


/* 设置默认链接颜色 */
a {
    color: #057777; /* 这里可以使用你喜欢的颜色 */
    text-decoration: none; /* 去除下划线 */
    transition: color 0.3s ease; /* 添加颜色过渡效果 */
}

/* 设置鼠标悬停时链接的颜色 */
a:hover {
    color: #2c3e50; /* 悬停时的颜色 */
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
}

.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    color: #666;
    font-size: 0.85em;
    font-family: 'Noto Serif', sans-serif;
}

@media (max-width: 480px) {
    .footer {
        margin-top: 30px;
        padding: 15px 0;
        font-size: 0.8em;
    }
}

/* ===== FORCE full-width mobile layout + safe-area handling =====
   Paste this at the very end of styles.css so it overrides earlier rules.
*/
@media (max-width: 768px) {
    /* ensure html/body occupy full height and remove any default margins */
    html, body {
      height: 100%;
      margin: 0;
      padding: 0;
      -webkit-text-size-adjust: 100%;
      background-color: #f5f5f5; /* keep your page bg */
      overflow-x: hidden; /* avoid horizontal scroll */
    }
  
    /* Make hero and container full width (override desktop 65% width) */
    .hero {
      width: 100% !important;
      max-width: 100% !important;
      margin: 0 !important;
      padding: 0 !important;
      background: transparent;
      border-radius: 0 !important;
    }
  
    /* hero image should fill full width and keep height reasonable */
    .hero-image {
      width: 100% !important;
      max-width: 100% !important;
      height: 140px !important;
      margin: 0;
      background-size: cover !important;
      background-position: center !important;
      border-radius: 0 !important;
    }
  
    /* container becomes edge-to-edge, but keep small inner padding for readability */
    .container {
      width: 100% !important;
      max-width: 100% !important;
      margin: 0 auto !important;
      padding: 16px !important; /* adjust as desired */
      background: #fff;
      border-radius: 0 !important;
      box-shadow: none !important;
    }
  
    /* header / navbar stacked and centered */
    .header-row {
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 0.5rem;
      margin: 5px 0 10px 0 !important;
      padding: 0;
    }
  
    .header-row h2 {
      width: 100%;
      text-align: left;          /* left or center as you prefer */
      padding-left: 4px;
      font-size: 2rem;
      margin: 0;
    }
  
    /* Put navbar below hero/title and center it */
    .inline-navbar {
      width: 100%;
      display: flex !important;
      justify-content: center !important;
      gap: 12px;
      flex-wrap: wrap;
      padding: 6px 0;
      margin: 0 auto 8px auto !important;
    }
  
    .inline-navbar a {
      font-size: 0.98rem;
      padding: 6px 8px;
    }
  
    /* Profile area stacks vertically */
    .profile-section {
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      gap: 15px !important;
      padding-top: 5px !important;
    }
  
    .profile-left, .profile-right {
      width: 100% !important;
    }
  
    /* avatar smaller and centered */
    .profile-photo-container {
      width: 180px !important;
      height: 180px !important;
      margin: 0 auto 8px auto !important;
    }
    .profile-photo {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
  
    /* make social links full width center-aligned */
    .social-links {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      margin-top: 6px;
    }
    .social-links a {
      width: auto;
      justify-content: center;
      padding-left: 0;
    }
  
    /* content paragraphs: readable padding and justify */
    .content-section, .content-section p {
      padding: 0 4px !important;
      text-align: justify;
      text-justify: inter-word;
      line-height: 1.7;
    }
  
    /* footer full-width and compact */
    .footer {
      width: 100% !important;
      padding: 12px 8px !important;
      margin-top: 18px !important;
    }
  
    /* handle iPhone safe-area insets (optional, makes content not touch rounded corners) */
    .container, .hero-image, .footer {
      padding-left: max(16px, env(safe-area-inset-left)) !important;
      padding-right: max(16px, env(safe-area-inset-right)) !important;
    }
  }
  

/* ===== Papers Section ===== */
.papers-section {
    margin-top: 2rem;
  }
  
  .papers-section h3 {
    font-family: 'Noto Serif', serif;
    font-weight: 700;
    color: #2d3e50;
    /* margin-bottom: 1rem; */
    border-bottom: 1px solid #eee
    /* padding-bottom: 0.4rem; */
  }
  
  .paper {
    margin-bottom: 1.5rem;
  }
  
  .paper-title {
    font-size: 1rem;
    /* margin-bottom: 0.3rem; */
    color: #222;
  }
  
  .paper-authors {
    font-size: 0.95rem;
    color: #444;
    margin: 0;
  }
  
  .paper-venue {
    font-size: 0.9rem;
    color: #666;
    margin: 0.2rem 0;
  }
  
  .paper-links a {
    font-size: 0.9rem;
    color: #057777;
    text-decoration: none;
    margin-right: 0.6rem;
  }
  
  .paper-links a:hover {
    text-decoration: underline;
  }
  