:root {
  color-scheme: light;
  --bg-primary: #f9fafc;
  --bg-secondary: rgba(255, 255, 255, 0.96);
  --bg-tertiary: rgba(244, 246, 250, 0.85);
  --text-primary: #202127;
  --text-secondary: #5c616d;
  --border-color: rgba(32, 33, 39, 0.08);
  --accent: #ed1f27;
  --accent-alt: #ff6b52;
  --shadow: 0 10px 24px rgba(32, 33, 39, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  --font-heading: "Montserrat", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Montserrat", "Microsoft YaHei", sans-serif;
  --header-height: 72px;
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    linear-gradient(90deg, rgba(176, 198, 255, 0.24) 0%, rgba(255, 255, 255, 0) 16.67%),
    linear-gradient(90deg, rgba(255, 255, 255, 0) 83.33%, rgba(253, 190, 195, 0.24) 100%),
    linear-gradient(90deg, #f7f9ff 0%, #ffffff 52%, #fff4f5 100%);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(24px, 5vw, 52px);
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.hero-light {
  color: #ffffff;
}

.site-header.hero-light .logo-mark,
.site-header.hero-light .logo-text strong,
.site-header.hero-light .logo-text span,
.site-header.hero-light .main-nav a,
.site-header.hero-light .lang-btn {
  color: #ffffff;
}

.site-header.hero-light .lang-switch {
  border-color: rgba(255, 255, 255, 0.4);
}

.site-header.hero-light .lang-btn {
  color: rgba(255, 255, 255, 0.9);
}

.site-header.hero-light .lang-btn.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.site-header.hero-light .lang-indicator {
  background: rgba(255, 255, 255, 0.28);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 20px rgba(32, 33, 39, 0.1);
}
.page-solid-header .site-header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 16px rgba(32, 33, 39, 0.08);
}

.hero-slider {
  position: relative;
  margin: 0;
  padding: 0;
  left: 0;
  transform: none;
  width: 100vw;
  max-width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-height));
  padding-top: var(--header-height);
}

.hero-slider.is-empty .slider-nav,
.hero-slider.is-empty .slider-dots {
  display: none;
}


.hero-slider.is-empty .slider-track {
  min-height: clamp(220px, 30vw, 320px);
}

.slider-track {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 100vh;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.slide {
  flex: 0 0 100%;
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 0.35;
  transform: scale(0.96);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  min-height: 100vh;
}

.slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.slide-media {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: var(--bg-tertiary);
  aspect-ratio: 21 / 7;
  width: 100%;
  height: 100%;
}

.slide-media img,
.slide-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.05);
  transform-origin: center;
}

.slide-substrip {
  width: 92%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  gap: 12px;
  padding: 18px 22px;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
}
.slide-substrip::-webkit-scrollbar {
  display: none;
}

.slide-substrip-item {
  flex: 0 0 30%;
  min-width: 180px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.02em;
  scroll-snap-align: start;
}

.slide-substrip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.slide-substrip-item span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 1024px) {
  .hero-slider,
  .slider-track,
  .slide {
    min-height: 70vh;
  }

  .hero-slider {
    width: 100%;
    max-width: 100%;
  }

  .slide-media {
    border-radius: var(--radius-lg);
  }
}

.slide.is-active .slide-media img,
.slide.is-active .slide-media video {
  animation: heroZoom 3s ease forwards;
}

.slide:not(.is-active) .slide-media img,
.slide:not(.is-active) .slide-media video {
  animation: none;
}

.hero-slider a,
.hero-slider button {
  font-family: inherit;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 14px rgba(32, 33, 39, 0.12);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text-primary);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.slider-nav:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 8px 18px rgba(32, 33, 39, 0.14);
  background: rgba(255, 255, 255, 1);
}

.slider-nav.prev {
  left: clamp(18px, 3vw, 28px);
}

.slider-nav.next {
  right: clamp(18px, 3vw, 28px);
}

.slider-nav span {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.slider-dots {
  position: absolute;
  bottom: clamp(16px, 3vw, 24px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 10px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(32, 33, 39, 0.2);
  transition: transform 0.25s ease, background 0.25s ease;
  cursor: pointer;
}

.slider-dot.is-active {
  background: var(--accent);
  transform: scale(1.4);
}

@media (max-width: 960px) {
  .slider-nav.prev {
    left: clamp(12px, 5vw, 18px);
  }

  .slider-nav.next {
    right: clamp(12px, 5vw, 18px);
  }
}

@media (max-width: 640px) {
  .hero-slider {
    margin: clamp(68px, 14vw, 110px) 0;
    padding: 0;
  }

  .slider-nav {
    width: 38px;
    height: 38px;
  }

  .slider-dots {
    bottom: clamp(12px, 4vw, 20px);
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: visible;
}

.logo-mark {
  width: 46px;
  height: 46px;
  display: block;
  visibility: hidden; /* hide image but keep spacing */
  border-radius: 14px;
  object-fit: contain;
  transform: scale(1.6);
  transform-origin: left center;
  margin-right: 15px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: var(--text-secondary);
}

.logo-text strong {
  font-size: 16px;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
}

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(237, 31, 39, 0.08);
  border: 1px solid rgba(237, 31, 39, 0.18);
  isolation: isolate;
}

.lang-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 6px);
  border-radius: 999px;
  background: linear-gradient(140deg, rgba(237, 31, 39, 0.96), rgba(255, 107, 82, 0.9));
  box-shadow: 0 6px 12px rgba(237, 31, 39, 0.18);
  transition: transform 0.28s cubic-bezier(0.4, 0.14, 0.3, 1.15);
  z-index: -1;
}

.lang-btn {
  position: relative;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease;
  min-width: 56px;
  text-align: center;
}

.lang-btn:hover {
  color: var(--accent);
}

.lang-switch[data-active-lang="en"] .lang-indicator {
  transform: translateX(100%);
}

.lang-switch[data-active-lang="zh"] .lang-indicator {
  transform: translateX(0%);
}

.lang-switch[data-active-lang="en"] .lang-btn[data-lang="en"],
.lang-switch[data-active-lang="zh"] .lang-btn[data-lang="zh"] {
  color: #ffffff;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-secondary);
  transition: color 0.2s ease, border-color 0.2s ease;
  border-bottom: 2px solid transparent;
  padding-bottom: 6px;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--accent);
  border-color: var(--accent);
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hero {
  margin: 0 auto;
  padding: clamp(110px, 18vw, 150px) clamp(24px, 5vw, 72px) clamp(90px, 14vw, 120px);
  min-height: 80vh;
  max-width: var(--max-width);
  position: relative;
  display: grid;
  gap: 48px;
  transition: transform 0.9s ease, opacity 0.9s ease;
}

.hero.hero-floating {
  opacity: 0;
  transform: translateY(120px);
}

.hero.hero-revealed {
  opacity: 1;
  transform: translateY(0);
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 22% 40%, rgba(110, 155, 245, 0.12), transparent 62%),
    radial-gradient(circle at 78% 35%, rgba(245, 138, 130, 0.12), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(244, 246, 249, 0.75));
}

.pulse-layer {
  position: absolute;
  width: 140%;
  height: 140%;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: pulse 12s infinite ease-in-out;
}

.layer-1 {
  background: rgba(110, 155, 245, 0.16);
  top: -40%;
  left: -35%;
}

.layer-2 {
  background: rgba(245, 138, 130, 0.14);
  bottom: -50%;
  right: -35%;
  animation-delay: 4s;
}

.layer-3 {
  background: rgba(255, 194, 186, 0.18);
  top: 55%;
  left: 30%;
  animation-delay: 8s;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.55;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 14px;
  color: var(--accent);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  margin: 20px 0;
  white-space: normal;
  word-break: break-word;
}

.hero .intro {
  font-size: 22px;
  color: var(--text-secondary);
  max-width: 100%;
}

@media (min-width: 1024px) {
  .hero .intro {
    white-space: nowrap;
  }
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: var(--font-heading);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), rgba(255, 86, 68, 0.95));
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(237, 31, 39, 0.22);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 38px rgba(237, 31, 39, 0.32);
}

.btn.ghost {
  background: rgba(237, 31, 39, 0.08);
  color: var(--accent);
  border: 1px solid rgba(237, 31, 39, 0.2);
}

.btn.ghost:hover {
  background: rgba(237, 31, 39, 0.16);
  transform: translateY(-2px);
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.hero-stats article {
  padding: 20px;
  background:
    radial-gradient(circle at 30% 20%, rgba(110, 155, 245, 0.12), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(245, 138, 130, 0.12), transparent 55%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(244, 246, 249, 0.75));
  border: 1px solid rgba(32, 33, 39, 0.06);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.hero-stats strong {
  font-size: 32px;
  font-family: var(--font-heading);
  display: block;
  color: var(--accent);
  font-weight: 700;
}

.page-hero {
  margin: 0 auto;
  padding: clamp(140px, 24vw, 200px) clamp(24px, 5vw, 72px) clamp(80px, 12vw, 120px);
  max-width: var(--max-width);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: transparent;
  box-shadow: none;
}

.page-hero .hero-content {
  position: relative;
  max-width: 640px;
}

.page-hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 16px;
  color: var(--accent);
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1.1;
  margin: 24px 0 16px 0;
}

.page-hero .intro {
  font-size: 20px;
  color: var(--text-secondary);
  margin: 0;
}

section {
  padding: clamp(80px, 12vw, 120px) clamp(24px, 5vw, 72px);
  margin-inline: auto;
  max-width: var(--max-width);
  position: relative;
}

main > section + section {
  margin-top: clamp(60px, 10vw, 140px);
}

/* Ensure the landing hero slider sits flush to the top */
.hero-slider {
  padding: 0;
  margin-top: 0;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
  position: relative;
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 40px);
  margin: 0;
}

.section-heading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 19px;
  max-width: 680px;
}

.section-heading .link {
  margin-left: auto;
}
.research {
  background:
    radial-gradient(circle at 22% 40%, rgba(110, 155, 245, 0.12), transparent 62%),
    radial-gradient(circle at 78% 35%, rgba(245, 138, 130, 0.12), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(244, 246, 249, 0.75));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(32, 33, 39, 0.06);
  box-shadow: var(--shadow);
  padding-block: clamp(60px, 8vw, 90px);
  margin-top: clamp(16px, 3vw, 28px);
}

/* Make research section subheading larger */
.research .section-heading p {
  font-size: 19px;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.research-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius-md);
  /* 为四个研究方向卡片加入与首屏一致的柔和底色与描边 */
  background:
    radial-gradient(circle at 22% 40%, rgba(110, 155, 245, 0.12), transparent 62%),
    radial-gradient(circle at 78% 35%, rgba(245, 138, 130, 0.12), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(244, 246, 249, 0.75));
  border: 1px solid rgba(32, 33, 39, 0.06);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  min-height: 240px;
  box-shadow: var(--shadow);
}

.research-card:hover {
  transform: translateY(-8px);
}

.research-card .icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  margin-bottom: 20px;
  background: rgba(237, 31, 39, 0.08);
  font-size: 26px;
}

.research-card h3 {
  margin: 0 0 12px 0;
  font-family: var(--font-heading);
  font-size: 20px;
}

.research-card p {
  color: var(--text-secondary);
  font-size: 17px;
  margin: 0 0 20px 0;
}

.research-card .link {
  margin-top: auto;
}

.link {
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  gap: 6px;
  align-items: center;
  position: relative;
  font-size: 15px;
}

.link::after {
  content: "→";
  font-size: 14px;
  transition: transform 0.2s ease;
}

.link:hover::after {
  transform: translateX(4px);
}

.key-tech .tech-showcase {
  display: grid;
  gap: 28px;
}

/* Key-tech section frame to match hero style */
.key-tech {
  background:
    radial-gradient(circle at 22% 40%, rgba(110, 155, 245, 0.12), transparent 62%),
    radial-gradient(circle at 78% 35%, rgba(245, 138, 130, 0.12), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(244, 246, 249, 0.75));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(32, 33, 39, 0.06);
  box-shadow: var(--shadow);
  margin-top: clamp(16px, 3vw, 28px);
}

.tech-item {
  display: grid;
  /* 左右媒体区域略微缩小，避免遮挡文案 */
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: none;
  background: transparent;
  box-shadow: none;
  width: 100%;
}

.tech-item.secondary {
  /* 与非 secondary 一致，保证两条目的媒体尺寸一致 */
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
}

.tech-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.tech-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.tech-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.gradient-1 {
  background: linear-gradient(135deg, rgba(237, 31, 39, 0.92), rgba(255, 107, 82, 0.78)),
              radial-gradient(circle at 20% 20%, rgba(255, 217, 210, 0.35), transparent 65%);
}

.gradient-2 {
  background: linear-gradient(135deg, rgba(255, 107, 82, 0.82), rgba(237, 31, 39, 0.88));
}

.tech-content {
  padding: clamp(32px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  min-width: 0;
  align-items: flex-start;
}

.tag {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  height: 36px;
  line-height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  /* 统一为旗舰成果的底色 */
  background: rgba(255, 107, 82, 0.22);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  min-width: 150px;
  white-space: nowrap;
  box-sizing: border-box;
}

.tag.alt {
  background: rgba(255, 107, 82, 0.22);
  color: var(--accent);
}

.tech-content h3 {
  margin: 0;
  font-size: 26px;
  font-family: var(--font-heading);
}

.tech-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 17px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.publications {
  background:
    radial-gradient(circle at 22% 40%, rgba(110, 155, 245, 0.12), transparent 62%),
    radial-gradient(circle at 78% 35%, rgba(245, 138, 130, 0.12), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(244, 246, 249, 0.75));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(32, 33, 39, 0.06);
  box-shadow: var(--shadow);
  padding-block: clamp(60px, 8vw, 90px);
  margin-top: clamp(16px, 3vw, 28px);
}

.publications.archive {
  max-width: calc(var(--max-width) + 200px);
  width: 100%;
}

.publications.archive .pub-list {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 6vw, 56px);
}

.pub-year-group {
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}

.pub-year-heading {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  color: var(--accent);
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
}

.pub-year-items {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1200px) {
  .pub-year-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .pub-year-items {
    grid-template-columns: 1fr;
  }
}

.publications:not(.archive) .pub-list {
  display: flex;
  gap: clamp(20px, 3vw, 32px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 0 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(32, 33, 39, 0.3) transparent;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}

.publications:not(.archive) .pub-list:hover {
  cursor: grab;
}

.publications:not(.archive) .pub-list:active {
  cursor: grabbing;
}

.publications:not(.archive) .pub-list::-webkit-scrollbar {
  height: 6px;
}

.publications:not(.archive) .pub-list::-webkit-scrollbar-track {
  background: transparent;
}

.publications:not(.archive) .pub-list::-webkit-scrollbar-thumb {
  background: rgba(32, 33, 39, 0.3);
  border-radius: 999px;
}

.publications:not(.archive) .pub-card {
  flex: 0 0 min(360px, 78vw);
  scroll-snap-align: start;
}

.pub-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: none;
}

.pub-card:hover {
  transform: translateY(-6px);
}

.pub-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(237, 31, 39, 0.08);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
}

.pub-card h3 {
  margin: 0;
  font-size: 20px;
  font-family: var(--font-heading);
}

.pub-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
}

.pub-card .pub-authors {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 16px;
}

.pub-card p + p {
  margin-top: 8px;
}

.pub-links {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.publications-cta {
  text-align: center;
  margin-top: 40px;
}

.partners-showcase {
  background:
    radial-gradient(circle at 22% 40%, rgba(110, 155, 245, 0.12), transparent 62%),
    radial-gradient(circle at 78% 35%, rgba(245, 138, 130, 0.12), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(244, 246, 249, 0.75));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(32, 33, 39, 0.06);
  box-shadow: var(--shadow);
  padding-block: clamp(50px, 7vw, 80px);
  margin-top: clamp(16px, 3vw, 28px);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 32px);
  align-items: center;
  justify-items: center;
}

.partner-card {
  background: transparent;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: none;
  width: clamp(140px, 20vw, 200px);
  aspect-ratio: 1 / 1;
  padding: clamp(10px, 2vw, 18px);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-card:hover {
  transform: translateY(-6px);
}

.partner-card img {
  width: min(120px, 70%);
  height: min(120px, 70%);
  object-fit: contain;
  display: block;
}

@media (max-width: 1200px) {
  .partners-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .partners-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .partner-card {
    width: clamp(120px, 48vw, 150px);
    padding: clamp(8px, 3vw, 12px);
  }

  .partner-card img {
    width: min(100px, 80%);
    height: min(100px, 80%);
  }
}


/* Prevent subheadings from wrapping too early on wide screens */
@media (min-width: 1024px) {
  .team .section-heading p,
  .publications .section-heading p {
    max-width: 960px;
  }
}

.team {
  background:
    radial-gradient(circle at 22% 40%, rgba(110, 155, 245, 0.12), transparent 62%),
    radial-gradient(circle at 78% 35%, rgba(245, 138, 130, 0.12), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(244, 246, 249, 0.75));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(32, 33, 39, 0.06);
  box-shadow: var(--shadow);
  padding-block: clamp(60px, 8vw, 90px);
  margin-top: clamp(16px, 3vw, 28px);
}

.team-highlight {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.team-card.mini {
  padding: 14px;
  gap: 14px;
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: stretch;
}

.team-card.mini .avatar {
  width: 110px;
  height: 100%;
  min-height: 65px;
  border-radius: 18px;
  flex: initial;
  overflow: hidden;
}

.team-card.mini .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.team-card.mini .text h3 {
  font-size: 16px;
}

.team-card.mini .text p {
  font-size: 15px;
}

.team-card.mini .member-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(32, 33, 39, 0.65);
  margin-top: 2px;
  word-break: break-all;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .team-card.mini {
    grid-template-columns: 1fr;
  }
  .team-card.mini .avatar {
    width: clamp(100px, 55vw, 160px);
    min-height: 55px;
    margin: 0 auto;
  }
}

.team.archive {
  margin-top: clamp(40px, 6vw, 72px);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.team-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  box-shadow: none;
  align-items: center;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(237, 31, 39, 0.88), rgba(255, 107, 82, 0.82));
  display: grid;
  position: relative;
  overflow: hidden;
  flex: 0 0 64px; /* 阻止在窄列里被压扁 */
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 避免纵横比导致头像“拉长”或留白 */
}

.avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 55%);
}

.text h3 {
  margin: 0;
  font-size: 18px;
  font-family: var(--font-heading);
}

.text p {
  margin: 4px 0 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.team-cta {
  margin-top: 32px;
  text-align: center;
}

.section-empty {
  padding: 32px;
  text-align: center;
  color: var(--text-secondary);
  background: rgba(244, 246, 250, 0.75);
  border: 1px dashed rgba(32, 33, 39, 0.12);
  border-radius: var(--radius-md);
}

.team-profiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 32px);
}

.team-groups {
  display: grid;
  gap: clamp(32px, 6vw, 56px);
}

.team-group {
  padding: 0;
  margin: 0;
}

.team-group + .team-group {
  margin-top: clamp(40px, 6vw, 64px);
}

.team-group h3 {
  margin: 0 0 20px 0;
  font-family: var(--font-heading);
  font-size: 24px;
  padding-left: 8px;
  border-left: 3px solid rgba(237, 31, 39, 0.35);
}

.team-profile {
  display: flex;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  box-shadow: none;
}

.team-profile .team-photo {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(237, 31, 39, 0.88), rgba(255, 107, 82, 0.78));
  color: #ffffff;
  font-weight: 700;
  font-size: 24px;
}

.team-profile .team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.team-profile .team-photo .team-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.team-profile .team-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-profile .role {
  margin: 0;
  font-weight: 600;
  color: #fca5a5;
}

.team-profile .bio {
  margin: 0;
  color: rgba(32, 33, 39, 0.65);
  line-height: 1.7;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (min-width: 768px) {
  .team.archive .team-profiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 48px);
  }
}

.team.archive .team-profile {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: flex-start;
  padding: clamp(16px, 2.5vw, 26px);
  column-gap: clamp(12px, 2vw, 20px);
  row-gap: 16px;
  height: 100%;
  min-width: 0;
}

.team.archive .team-profile .team-photo {
  width: 120px;
  height: 168px;
  border-radius: 18px;
  box-shadow: 0 10px 18px rgba(237, 31, 39, 0.15);
  font-size: 30px;
  flex-shrink: 0;
  justify-self: flex-start;
}

.team.archive .team-profile .team-info {
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.team.archive .team-profile .team-info h4 {
  margin: 0;
  font-size: 22px;
}

.team.archive .team-profile .role {
  color: rgba(237, 31, 39, 0.85);
  letter-spacing: 0.04em;
}

.team.archive .team-profile .bio {
  font-size: 14px;
  line-height: 1.7;
  min-height: calc(1.7em * 3);
  overflow: visible;
  width: 100%;
  max-width: 100%;
  word-break: break-word;
}

@media (max-width: 640px) {
  .team.archive .team-profile {
    grid-template-columns: 1fr;
    align-items: flex-start;
    text-align: left;
  }

  .team.archive .team-profile .team-photo {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-bottom: 12px;
  }
}

.team.archive .team-links {
  margin-top: auto;
}

.team-callout {
  margin: clamp(60px, 10vw, 120px) auto 0;
  max-width: var(--max-width);
  background: linear-gradient(135deg, rgba(237, 31, 39, 0.08), rgba(255, 107, 82, 0.12));
  border-radius: var(--radius-lg);
  padding: clamp(60px, 9vw, 100px);
  box-shadow: none;
  text-align: center;
}

.team-callout .callout-content {
  display: grid;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}

.team-callout h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 36px);
}

.team-callout p {
  margin: 0 0 8px 0;
  color: var(--text-secondary);
  font-size: 16px;
}

.join {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(80px, 12vw, 140px) clamp(32px, 8vw, 96px);
  /* Match hero-style soft gradient */
  background:
    radial-gradient(circle at 22% 40%, rgba(110, 155, 245, 0.12), transparent 62%),
    radial-gradient(circle at 78% 35%, rgba(245, 138, 130, 0.12), transparent 58%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(244, 246, 249, 0.75));
  border: 1px solid rgba(32, 33, 39, 0.06);
  box-shadow: var(--shadow);
  margin-top: clamp(16px, 3vw, 28px);
}

.join::before,
.join::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.join::before {
  background: rgba(237, 31, 39, 0.16);
  top: -150px;
  right: -180px;
}

.join::after {
  background: rgba(255, 107, 82, 0.18);
  bottom: -140px;
  left: -150px;
}

.join-content {
  position: relative;
  max-width: 620px;
  z-index: 1;
}

.join h2 {
  margin: 0 0 20px 0;
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 40px);
}

.join p {
  margin: 0 0 36px 0;
  color: var(--text-secondary);
  font-size: 19px;
}


.site-footer {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  padding: 32px clamp(24px, 5vw, 64px);
  margin-top: 80px;
  color: rgba(255, 255, 255, 0.78);
  width: 100%;
  border-radius: 0;
}

.footer-top {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: var(--max-width);
  margin: 0 auto 24px;
  align-items: flex-start;
}

.site-footer h3 {
  font-family: var(--font-heading);
  margin: 0 0 16px 0;
  color: #ffffff;
}

.contact-list,
.quick-links,
.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: rgba(255, 255, 255, 0.75);
}

.footer-follow {
  display: block;
}

.footer-follow-title {
  margin: 0 0 10px 0;
}

.footer-visitor {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.footer-visitstats {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  display: grid;
  gap: 2px;
  text-align: right;
  justify-self: end;
  white-space: nowrap;
  line-height: 1.4;
}

.footer-follow-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: flex-start;
}

.social-links a {
  display: inline-block;
}

.contact-list a,
.quick-links a,
.social-links a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease;
}

.contact-list a:hover,
.quick-links a:hover,
.social-links a:hover {
  color: #fca5a5;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 20px;
  color: var(--text-secondary);
}

.partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  letter-spacing: 0.05em;
}

@media (max-width: 900px) {
  .header-actions {
    gap: 12px;
  }

  .lang-switch {
    padding: 3px;
  }

  .lang-btn {
    padding: 6px 10px;
    font-size: 13px;
  }

  .lang-indicator {
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc(50% - 4px);
  }

  .main-nav ul {
    position: absolute;
    top: 72px;
    right: clamp(24px, 5vw, 48px);
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: var(--radius-sm);
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 8px 18px rgba(22, 32, 51, 0.12);
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .main-nav ul.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 900px) {
  .slide-media {
    aspect-ratio: 16 / 9;
    min-height: 240px;
  }
  .tech-media {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 640px) {
  .hero-slider {
    min-height: 70vh;
  }
  .slide-media {
    aspect-ratio: 4 / 3;
    min-height: 220px;
  }
  .tech-media {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    aspect-ratio: auto;
    border-radius: var(--radius-lg);
  }
  .tech-media img,
  .tech-media video {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: inherit;
  }
}

@media (min-width: 1024px) {
  .tech-media {
    min-height: 320px;
  }
}

@media (max-width: 740px) {
  .tech-item,
  .tech-item.secondary {
    grid-template-columns: 1fr;
  }

  .tech-content {
    padding: clamp(20px, 7vw, 32px);
  }

  .tech-item .tech-content {
    order: -1;
  }

  .tech-item .tech-media {
    order: 2;
  }

  .hero {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .site-footer {
    margin-top: 80px;
    border-radius: 0;
    padding-inline: clamp(20px, 8vw, 60px);
    width: 100%;
  }
}

@media (max-width: 520px) {
  .logo-text {
    display: none;
  }

  .hero h1 {
    font-size: clamp(32px, 8vw, 40px);
  }

  section {
    padding-inline: clamp(20px, 7vw, 32px);
  }
}

/* Image Wall Section */
.image-wall-section {
  padding: 40px 0;
  overflow: hidden;
  background: var(--bg-secondary);
}

.image-wall-container {
  width: 100%;
  overflow: hidden;
}

.image-wall-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scrollWall 40s linear infinite;
}

.image-wall-track:hover {
  animation-play-state: paused;
}

.image-wall-item {
  flex: 0 0 auto;
  width: auto;
  min-width: 220px;
  max-width: 420px;
  height: clamp(200px, 22vw, 260px);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  background: var(--bg-tertiary);
}

.image-wall-item:hover {
  transform: scale(1.05);
  z-index: 10;
}

.image-wall-item img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.image-wall-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.image-wall-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 8px 12px;
  font-size: 14px;
  text-align: center;
  transform: none;
  transition: opacity 0.3s ease;
}

.image-wall-item .image-wall-caption {
  opacity: 1;
}

.image-wall-item:hover .image-wall-caption {
  opacity: 1;
}

@keyframes scrollWall {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes heroZoom {
  0% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(0.99);
  }
}
