/* ========== 学术蓝 + 白 配色与变量 ========== */
:root {
  --academic-blue: #1a365d;
  --academic-blue-light: #2c5282;
  --academic-blue-dark: #0f2744;
  --accent-blue: #3182ce;
  --bg-white: #ffffff;
  --bg-off-white: #f7fafc;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(26, 54, 93, 0.08), 0 2px 4px -1px rgba(26, 54, 93, 0.04);
  --shadow-hover: 0 10px 15px -3px rgba(26, 54, 93, 0.12), 0 4px 6px -2px rgba(26, 54, 93, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
  /* 顶部导航深蓝主题 */
  --header-bg: #020617;
  --header-bg-soft: #020617f2;
  --header-text: #e5e7eb;
  --header-text-muted: #9ca3af;
}

/* ========== 基础重置与排版 ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-white);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== 顶部导航 ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg-soft);
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform 0.4s ease;
}

/* 仅首页初始隐藏导航栏 */
.page-home .site-header {
  transform: translateY(-100%);
}

.page-home .site-header.visible,
.site-header.visible {
  transform: translateY(0);
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 62px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent-blue);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

.nav-links a {
  padding: 0.5rem 0.75rem;
  color: var(--header-text-muted);
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover {
  background: rgba(15, 23, 42, 0.6);
  color: var(--header-text);
  text-decoration: none;
}

.nav-links a.nav-current {
  background: var(--header-text);
  color: #020617;
  text-decoration: none;
}

.lang-toggle {
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.7);
  color: var(--header-text);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}

.lang-toggle:hover {
  background: var(--academic-blue);
  color: var(--bg-white);
}

.lang-en { display: inline; }
.lang-zh { display: none; }
[data-lang="en"] .lang-en { display: none; }
[data-lang="en"] .lang-zh { display: inline; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--academic-blue);
}

/* ========== 通用容器与区块 ========== */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

/* 内页顶部留白（固定导航高度） */
.page-inner .inner-main {
  padding-top: 4.5rem;
}

.page-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.page-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  color: var(--academic-blue);
}

.page-lead {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

.section-title {
  margin: 0 0 2rem;
  font-size: 1.75rem;
  color: var(--academic-blue);
  text-align: center;
}

/* ========== 1. 首页 Hero ========== */
.section-hero {
  padding-top: 0;
  padding-bottom: 0;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image: url('../images/background-image.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 39, 68, 0.7);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--bg-white);
  padding: 1rem;
}

.hero-title {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-slogan {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  opacity: 0.95;
}

/* 向下滚动指示箭头 */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  cursor: pointer;
  animation: bounce 2s infinite;
}

.scroll-indicator span {
  display: block;
  font-size: 3rem;
  color: var(--bg-white);
  opacity: 0.8;
  transition: opacity 0.3s;
}

.scroll-indicator:hover span {
  opacity: 1;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ========== 首页 实验室概况 ========== */
.section-overview {
  background: var(--bg-off-white);
}

.overview-content {
  max-width: 920px;
  margin: 0 auto;
}

.overview-photo {
  margin: 0 0 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.overview-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.overview-welcome {
  margin: 0 0 2rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--academic-blue);
  text-align: center;
  letter-spacing: 0.02em;
}

.overview-text {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.9;
  text-align: justify;
  text-indent: 2em;
}

.overview-text + .overview-text {
  margin-top: 1.25rem;
}

/* ========== PI 简介 左右分割 ========== */
.section-pi .pi-section {
  margin-top: 0;
}

.pi-section {
  margin-top: -2rem;
  position: relative;
  z-index: 2;
}

.page-pi .pi-section {
  margin-top: 0;
}

.pi-intro {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.pi-photo-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--bg-off-white);
}

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

.pi-name {
  margin: 0 0 1rem;
  font-size: 1.75rem;
  color: var(--academic-blue);
}

.research-content h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.pi-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pi-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.98rem;
}

.pi-timeline-item + .pi-timeline-item {
  margin-top: 0.25rem;
}

/* ========== 最新动态 水平卡片 ========== */
.news-section {
  background: var(--bg-off-white);
}

.news-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.news-card {
  position: relative;
  display: block;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  color: inherit;
}

.news-card-shadow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(26, 54, 93, 0.12);
  opacity: 0;
  transition: opacity var(--transition);
}

.news-card:hover .news-card-shadow {
  opacity: 1;
}

.news-card-inner h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--academic-blue);
}

.news-card-inner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ========== 新闻时间轴 ========== */
.news-timeline {
  max-width: 860px;
  margin: 0 auto;
}

.tl-group {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0 2rem;
  margin-bottom: 3rem;
}

.tl-year {
  font-size: 2rem;
  font-weight: 700;
  color: var(--academic-blue);
  line-height: 1;
  padding-top: 0.25rem;
  text-align: right;
}

.tl-entries {
  position: relative;
  padding-left: 1.75rem;
  border-left: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tl-entry {
  position: relative;
}

.tl-dot {
  position: absolute;
  left: calc(-1.75rem - 5px);
  top: 1.1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--academic-blue);
  border: 2px solid var(--bg-white);
  box-shadow: 0 0 0 2px var(--academic-blue);
}

.tl-card {
  display: block;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}

.tl-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  color: inherit;
}

.tl-card-body {
  display: flex;
  gap: 0;
}

.tl-card-img {
  flex-shrink: 0;
  width: 140px;
  height: 100%;
  min-height: 100px;
  object-fit: contain;
  cursor: zoom-in;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.tl-card-info {
  padding: 1rem 1.25rem;
  flex: 1;
}

.tl-card-info h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--academic-blue);
  line-height: 1.4;
}

.tl-card-date {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.tl-card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .tl-group {
    grid-template-columns: 1fr;
  }
  .tl-year {
    text-align: left;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  .tl-card-img {
    width: 100px;
  }
}

/* News 页面卡片细节 */
.news-cards-page .news-card-image {
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.news-cards-page .news-card-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-cards-page .news-card-meta {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.news-cards-page .news-card-excerpt {
  margin: 0;
}

/* ========== 首页 已发表成果轮播（4 篇） ========== */
.section-pub-carousel {
  background: var(--bg-off-white);
}

.pub-carousel-wrap {
  position: relative;
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

.pub-carousel {
  position: relative;
  display: flex;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--bg-white);
  /* 移除固定高度，让内容自适应 */
}

.pub-slide {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

.pub-slide:not(.active) {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0;
}

.pub-slide-cover {
  width: 100%;
  aspect-ratio: 16/11;
  background: var(--bg-off-white);
  overflow: hidden;
  position: relative;
}

.pub-slide-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pub-slide-info {
  padding: 1.25rem;
  flex: 0 0 120px; /* 固定文字区域高度，标题长短不同也不会影响整体高度 */
  overflow: hidden;
}

@media (max-width: 768px) {
  .pub-carousel {
    height: auto; /* 移动端允许自适应高度，避免过高留白 */
  }
  .pub-slide {
    height: auto;
  }
}

.pub-slide-info h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--academic-blue);
}

.pub-slide-journal {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(26, 54, 93, 0.85);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  transition: background var(--transition);
}

.carousel-btn:hover {
  background: var(--academic-blue);
}

.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border-color);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}

.carousel-dot.active {
  background: var(--academic-blue);
}

.carousel-more {
  text-align: center;
  margin: 0;
}

.carousel-more a {
  font-weight: 500;
}

/* ========== 首页 联系我们简版 ========== */
.section-contact-home {
  background: var(--bg-white);
}

.contact-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.contact-home-block {
  padding: 1.25rem;
  background: var(--bg-off-white);
  border-radius: var(--radius);
}

.contact-home-block p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contact-home-block strong {
  color: var(--text-primary);
}

.contact-home-more {
  text-align: center;
  margin: 0;
}

/* ========== 2. 研究方向 Z 字型 ========== */
.section-research {
  background: var(--bg-white);
}

.research-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.research-item:last-child {
  margin-bottom: 0;
}

.research-right {
  direction: rtl;
}

.research-right > * {
  direction: ltr;
}

.research-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-off-white);
}

.research-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.research-image-wrap:hover img {
  transform: scale(1.03);
}

.research-content h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  color: var(--academic-blue);
}

.research-list .research-item {
  margin-bottom: 4rem;
}

.research-list .research-item:last-child {
  margin-bottom: 0;
}

.research-content p {
  margin: 0;
  color: var(--text-secondary);
}

/* ========== 3. 已发表成果 瀑布流 ========== */
.section-publications,
.section-publications-page {
  background: var(--bg-off-white);
}

.masonry {
  column-count: 3;
  column-gap: 1.5rem;
}

.pub-card {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  display: block;
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}

.pub-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.pub-cover {
  aspect-ratio: 3/4;
  background: var(--bg-off-white);
  overflow: hidden;
}

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

.pub-info {
  padding: 1rem;
}

.pub-info h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.pub-journal {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 代表性成果：卡片布局（每行一篇） */
.pub-featured-section {
  margin-bottom: 2.5rem;
}

.pub-featured-heading {
  margin: 0 0 1.5rem;
  font-size: 1.2rem;
  color: var(--academic-blue);
}

.pub-featured-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-featured-card {
  display: flex;
  width: 100%;
  min-height: 140px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition);
}

.pub-featured-card:hover {
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  color: inherit;
}

.pub-featured-cover {
  flex: 0 0 200px;
  min-height: 140px;
  background: var(--bg-off-white);
  border-right: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.pub-featured-info {
  flex: 1;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pub-featured-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--academic-blue);
  line-height: 1.4;
}

.pub-featured-meta {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* 更多发表成果：按完整成果列表从 1 开始编号 */
.pub-more-section {
  margin-top: 2.5rem;
}

.pub-text-list-heading {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--academic-blue);
}

.pub-more-list {
  margin: 0 0 2.5rem;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.pub-more-list li {
  margin-bottom: 0.7rem;
  line-height: 1.6;
}

.pub-more-list a {
  color: var(--accent-blue);
}

.pub-more-list a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .pub-featured-card {
    flex-direction: column;
    min-height: 0;
  }
  .pub-featured-cover {
    flex: 0 0 auto;
    width: 100%;
    min-height: 150px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

/* ========== 4. 氘代化合物库 列表+搜索 ========== */
.section-libraries,
.section-libraries-page {
  background: var(--bg-white);
}

.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
}

.library-search {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
}

.library-search:focus {
  outline: none;
  border-color: var(--academic-blue);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.library-filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--academic-blue);
  color: var(--bg-white);
  border-color: var(--academic-blue);
}

.compound-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.compound-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem;
  background: var(--bg-off-white);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.compound-structure {
  width: 120px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 0.5rem;
}

.compound-structure img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.compound-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.compound-cas {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.compound-name {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
}

.compound-source {
  font-size: 0.9rem;
}

/* ========== 5. 课题组照片 网格+灯箱 ========== */
.section-gallery,
.section-gallery-page {
  background: var(--bg-off-white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox[aria-hidden="false"] {
  display: flex;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  text-align: center;
}

.lightbox-content img {
  max-height: 75vh;
  width: auto;
  margin: 0 auto;
  border-radius: var(--radius);
}

.lightbox-caption {
  margin: 1rem 0 0;
  color: #fff;
  font-size: 1rem;
}

/* ========== 6. 联系我们 ========== */
.section-contact,
.section-contact-page {
  background: var(--bg-white);
}

.contact-map-container {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-map-image {
  width: 100%;
  height: auto;
  display: block;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-map .map-placeholder {
  aspect-ratio: 16/10;
  background: var(--bg-off-white);
  border-radius: var(--radius);
  border: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  padding: 2rem;
  text-align: center;
}

.contact-photo {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  aspect-ratio: 16/10;
  background: var(--bg-off-white);
}

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

.contact-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.contact-list strong {
  color: var(--text-primary);
  margin-right: 0.5rem;
}

.join-us {
  padding: 1.25rem;
  background: var(--bg-off-white);
  border-radius: var(--radius);
  border-left: 4px solid var(--academic-blue);
}

.join-us h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--academic-blue);
}

.join-enquiry {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

.join-item {
  margin-top: 0.75rem;
}

.join-item h4 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.join-item p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== AnJie 双栏学术主页布局 ========== */
.profile-layout {
  display: grid;
  grid-template-columns: 25% 75%;
  min-height: calc(100vh - 4.5rem);
  align-items: start;
}

.profile-sidebar {
  position: sticky;
  top: 4.5rem;
  background: var(--bg-off-white);
  border-right: 1px solid var(--border-color);
  min-height: calc(100vh - 4.5rem);
  padding: 2.5rem 1.5rem;
}

.profile-sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-photo-wrap {
  width: 180px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

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

.profile-name {
  margin: 0 0 0.2rem;
  font-size: 1.4rem;
  color: var(--academic-blue);
}

.profile-name-en {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.profile-affil {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.profile-divider {
  width: 100%;
  height: 1px;
  background: var(--border-color);
  margin: 1.25rem 0;
}

.profile-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-contact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--academic-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.profile-contact-value {
  font-size: 0.88rem;
  color: var(--text-secondary);
  word-break: break-all;
}

/* 主内容区 */
.profile-main {
  padding: 3rem 3rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-section {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
}

.profile-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.profile-section-title {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  color: var(--academic-blue);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--academic-blue);
  display: inline-block;
}

/* 时间线 */
.profile-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-timeline-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.profile-timeline-year {
  flex-shrink: 0;
  width: 90px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-blue);
  padding-top: 0.1rem;
}

.profile-timeline-role {
  margin: 0 0 0.15rem;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.profile-timeline-org {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* 内联时间线样式（时间和内容在同一行） */
.profile-timeline-inline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-timeline-item-inline {
  display: block;
}

.profile-timeline-item-inline p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.profile-timeline-item-inline strong {
  color: var(--accent-blue);
  font-weight: 600;
}

/* 研究兴趣 */
.profile-interest-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.8;
}

/* 代表性成果 */
.profile-pub-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-pub-more {
  margin: 0;
  font-size: 0.95rem;
}

/* 响应式：小屏改为单列 */
@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-sidebar {
    position: static;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .profile-main {
    padding: 2rem 1.5rem 3rem;
  }
}

/* ========== 课题组照片：导航栏 ========== */
.gallery-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 2px solid var(--border-color);
}

.gallery-nav-item {
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 500;
  color: #4a5568;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: color var(--transition);
  position: relative;
}

.gallery-nav-item:hover {
  color: var(--accent-blue);
}

.gallery-nav-item.active {
  color: var(--accent-blue);
}

.gallery-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -1.1rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-blue);
}

/* ========== 课题组照片：大尺寸网格 ========== */
.gallery-grid-large {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.gallery-item-large {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-white);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.gallery-item-large:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.gallery-item-large img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.gallery-placeholder {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-off-white);
  border: 2px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
}

.gallery-item-large figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .gallery-grid-large {
    grid-template-columns: 1fr;
  }
}

/* ========== 实验室成员 ========== */
.section-members {
  background: var(--bg-off-white);
}

.members-group {
  margin-bottom: 2.5rem;
}

.members-group:last-child {
  margin-bottom: 0;
}

.members-group-title {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  color: var(--academic-blue);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.member-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.member-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-off-white);
  border: 2px dashed var(--border-color);
  margin: 0 auto 0.75rem;
}

.member-name {
  margin: 0 0 0.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.member-detail {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== 页脚 ========== */
.site-footer {
  padding: 1.5rem;
  background: var(--academic-blue-dark);
  color: rgba(255,255,255,0.85);
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .pi-intro {
    grid-template-columns: 1fr;
  }

  .research-item,
  .research-right {
    grid-template-columns: 1fr;
    direction: ltr;
    margin-bottom: 3rem;
  }

  .masonry {
    column-count: 2;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-container.nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
  }

  .compound-card {
    grid-template-columns: 1fr;
  }

  .compound-structure {
    width: 100%;
    height: 120px;
  }

  .masonry {
    column-count: 1;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .news-cards {
    grid-template-columns: 1fr;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .library-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
