:root {
  --bg: #07111f;
  --bg-deep: #040b15;
  --card: rgba(10, 24, 46, 0.76);
  --card-strong: rgba(8, 20, 38, 0.9);
  --line: rgba(126, 231, 255, 0.18);
  --line-strong: rgba(126, 231, 255, 0.32);
  --text: #eef7ff;
  --muted: #a9bfd4;
  --c1: #7ee7ff;
  --c2: #24ffd2;
  --c3: #ffd27d;
  --c4: #ff9fd4;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font: 16px/1.75 "Noto Serif SC", "Songti SC", serif;
  background:
    radial-gradient(circle at 14% 16%, rgba(36, 255, 210, 0.15), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(126, 231, 255, 0.16), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(255, 210, 125, 0.08), transparent 32%),
    linear-gradient(180deg, var(--bg-deep) 0%, #081221 40%, #0a1a31 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(126, 231, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 231, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 86%);
}

body::after {
  background:
    radial-gradient(circle at 50% 0%, rgba(126, 231, 255, 0.08), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255, 210, 125, 0.06), transparent 36%);
}

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

figure {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(38px, 5.3vw, 68px);
  line-height: 1.08;
  margin-top: 18px;
}

h2 {
  font-size: clamp(30px, 4vw, 42px);
}

h3 {
  font-size: 24px;
}

p {
  margin: 0;
}

small,
.k,
.nav,
.btn,
.tag,
.chip,
.meta span,
.viewer-caption,
.viewer-hint {
  font-family: "Segoe UI", "PingFang SC", sans-serif;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 14, 26, 0.62);
  border-bottom: 1px solid rgba(126, 231, 255, 0.12);
  backdrop-filter: blur(18px);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  position: relative;
}

.brand::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 2px;
  height: 34px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, transparent, var(--c2), transparent);
}

.brand small,
.k {
  display: inline-block;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c1);
  font-size: 12px;
  line-height: 1.4;
}

.brand b {
  display: block;
  font-size: 20px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  position: relative;
  transition: color 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--c2), var(--c1));
  transition: transform 0.25s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  transform: scaleX(1);
}

section {
  padding: 28px 0;
}

.hero {
  padding: 72px 0 36px;
}

.grid2,
.two {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(13, 28, 52, 0.88), rgba(8, 19, 36, 0.72));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 40%, transparent 60%, rgba(126, 231, 255, 0.04));
  pointer-events: none;
}

.hero-copy {
  padding: 34px;
}

.hero-copy::after,
.glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-copy::after {
  width: 270px;
  height: 270px;
  right: -90px;
  top: -90px;
  background: radial-gradient(circle, rgba(36, 255, 210, 0.2), transparent 70%);
}

.glow::after {
  width: 150px;
  height: 150px;
  right: -40px;
  top: -40px;
  background: radial-gradient(circle, rgba(255, 210, 125, 0.14), transparent 72%);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(126, 231, 255, 0.28);
  background: rgba(126, 231, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.lead {
  margin-top: 18px;
  max-width: 34em;
  color: #d9ebfb;
  font-size: 18px;
}

.actions,
.tags,
.chips,
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions {
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.p {
  color: #00131d;
  background: linear-gradient(135deg, var(--c2), var(--c1));
  box-shadow: 0 12px 28px rgba(36, 255, 210, 0.18);
}

.btn.s {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.tags {
  margin-top: 24px;
}

.tag,
.chip,
.meta span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #d7eaff;
  font-size: 13px;
}

.hero-pic {
  padding: 16px;
  cursor: zoom-in;
}

.hero-pic::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero-pic img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
  border-radius: 22px;
}

.title {
  margin-bottom: 22px;
}

.title p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 48em;
  font-family: "Segoe UI", "PingFang SC", sans-serif;
}

.metrics,
.research,
.gallery,
.res2,
.timeline {
  display: grid;
  gap: 16px;
}

.metrics {
  grid-template-columns: repeat(4, 1fr);
}

.metric,
.glass,
.contact,
.item {
  padding: 24px;
}

.metric {
  min-height: 176px;
}

.metric strong {
  display: block;
  margin-bottom: 10px;
  color: var(--c1);
  font-size: clamp(42px, 4vw, 54px);
  line-height: 1;
}

.metric span {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 15px;
}

.metric p,
.glass p {
  color: #d8e7f5;
}

.metrics .metric:nth-child(1) strong { color: var(--c1); }
.metrics .metric:nth-child(2) strong { color: var(--c2); }
.metrics .metric:nth-child(3) strong { color: var(--c3); }
.metrics .metric:nth-child(4) strong { color: var(--c4); }

.research {
  grid-template-columns: repeat(2, 1fr);
}

.glass h3 {
  margin: 8px 0 10px;
}

.two {
  align-items: start;
}

.item b {
  display: block;
  margin-bottom: 6px;
  color: var(--c1);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.res2 {
  grid-template-columns: repeat(2, 1fr);
}

.gallery {
  grid-template-columns: repeat(4, 1fr);
}

.g {
  min-height: 235px;
  cursor: zoom-in;
}

.g img,
.hero-pic img {
  transition: transform 0.45s ease, filter 0.45s ease;
}

.g:hover img,
.hero-pic:hover img {
  transform: scale(1.04);
  filter: brightness(1.05) saturate(1.04);
}

figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 15px;
  font-size: 14px;
  background: linear-gradient(180deg, transparent, rgba(3, 10, 20, 0.9));
}

.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(14, 30, 56, 0.94), rgba(8, 19, 34, 0.9));
}

.contact h2 {
  margin-bottom: 10px;
}

.contact p {
  color: #dcecf9;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.v {
  opacity: 1;
  transform: none;
}

.zoomable {
  cursor: zoom-in;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(2, 9, 18, 0.82);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.viewer.open {
  opacity: 1;
  pointer-events: auto;
}

.viewer-panel {
  position: relative;
  width: min(1100px, 100%);
  max-height: 100%;
  padding: 18px;
  border: 1px solid rgba(126, 231, 255, 0.24);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(8, 20, 38, 0.96), rgba(5, 13, 24, 0.94));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.viewer-close,
.viewer-nav {
  position: absolute;
  border: none;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.viewer-close {
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  font-size: 24px;
  line-height: 1;
}

.viewer-nav {
  top: 50%;
  width: 48px;
  height: 48px;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-50%);
}

.viewer-nav.prev {
  left: 14px;
}

.viewer-nav.next {
  right: 14px;
}

.viewer-close:hover,
.viewer-nav:hover {
  background: rgba(126, 231, 255, 0.18);
}

.viewer-media {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.viewer img {
  width: 100%;
  max-height: min(78vh, 900px);
  object-fit: contain;
  transform: scale(var(--zoom, 1));
  transform-origin: center;
  transition: transform 0.16s ease;
}

.viewer-caption {
  margin-top: 12px;
  color: #d6eafb;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.viewer-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 1024px) {
  .metrics,
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid2,
  .two,
  .contact,
  .res2,
  .research {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(1180px, calc(100% - 22px));
  }

  .nav {
    display: none;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-copy,
  .metric,
  .glass,
  .item,
  .contact {
    padding: 20px;
  }

  .metrics,
  .gallery,
  .res2,
  .research {
    grid-template-columns: 1fr;
  }

  .hero-pic img {
    min-height: 320px;
  }

  .lead {
    font-size: 16px;
  }

  .viewer {
    padding: 16px;
  }

  .viewer-panel {
    padding: 14px;
    border-radius: 22px;
  }

  .viewer img {
    max-height: 70vh;
  }

  .viewer-nav {
    width: 42px;
    height: 42px;
    font-size: 24px;
  }

  .viewer-nav.prev {
    left: 10px;
  }

  .viewer-nav.next {
    right: 10px;
  }
}


/* ============================================================
   @light-theme 白底主题覆盖层
   只覆盖颜色，不动任何布局、尺寸、间距。
   想恢复原来的深色主题：把本段（从这行注释到文件末尾）整段删掉即可。
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-deep: #ffffff;
  --card: #ffffff;
  --card-strong: #ffffff;
  --line: rgba(16, 42, 80, 0.12);
  --line-strong: rgba(16, 42, 80, 0.22);
  --text: #0e1b2c;
  --muted: #596c83;
  --c1: #0d7fa8;
  --c2: #0f9d76;
  --c3: #a86f12;
  --c4: #c23f8e;
  --shadow: 0 18px 50px rgba(16, 42, 80, 0.10);
  --shadow-soft: 0 10px 28px rgba(16, 42, 80, 0.07);
}

/* 页面底色：白 → 极浅冷灰，保留原来的光晕层次 */
body {
  color: var(--text);
  background:
    radial-gradient(circle at 14% 16%, rgba(15, 157, 118, 0.07), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(13, 127, 168, 0.08), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(168, 111, 18, 0.05), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 45%, #f5f9fd 100%);
}

body::before {
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(16, 42, 80, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 42, 80, 0.05) 1px, transparent 1px);
}

body::after {
  background:
    radial-gradient(circle at 50% 0%, rgba(13, 127, 168, 0.05), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(168, 111, 18, 0.04), transparent 38%);
}

/* 顶栏 */
.top {
  background: rgba(255, 255, 255, 0.80);
  border-bottom: 1px solid rgba(16, 42, 80, 0.10);
}

/* 卡片 */
.card {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.card::before {
  background: linear-gradient(135deg,
    rgba(13, 127, 168, 0.05), transparent 40%,
    transparent 60%, rgba(15, 157, 118, 0.04));
}

.hero-copy::after {
  background: radial-gradient(circle, rgba(15, 157, 118, 0.10), transparent 70%);
}

.glow::after {
  background: radial-gradient(circle, rgba(168, 111, 18, 0.09), transparent 72%);
}

/* 小圆标 / 标签 */
.pill {
  border: 1px solid rgba(13, 127, 168, 0.24);
  background: rgba(13, 127, 168, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.60);
}

.lead {
  color: #38495f;
}

/* 按钮 */
.btn.p {
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 157, 118, 0.22);
}

.btn.s {
  color: var(--text);
  background: #ffffff;
  border: 1px solid rgba(16, 42, 80, 0.14);
}

.btn.s:hover {
  background: #f4f8fd;
}

.tag,
.chip,
.meta span {
  border: 1px solid rgba(16, 42, 80, 0.12);
  background: #f4f8fd;
  color: #33465c;
}

.hero-pic::after {
  border: 1px solid rgba(16, 42, 80, 0.10);
}

/* 数字卡与正文 */
.metric span {
  color: #0e1b2c;
}

.metric p,
.glass p {
  color: #4a5c72;
}

/* 图片说明压在照片上，必须保持白字 */
figcaption {
  color: #ffffff;
}

/* 联系区块 */
.contact {
  background: linear-gradient(135deg, #ffffff, #f2f8fd);
}

.contact p {
  color: #3b4d63;
}

/* 图片大图预览（灯箱） */
.viewer {
  background: rgba(14, 27, 44, 0.55);
}

.viewer-panel {
  border: 1px solid rgba(16, 42, 80, 0.12);
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(16, 42, 80, 0.28);
}

.viewer-close,
.viewer-nav {
  color: #0e1b2c;
  background: rgba(16, 42, 80, 0.07);
}

.viewer-close:hover,
.viewer-nav:hover {
  background: rgba(13, 127, 168, 0.14);
}

.viewer-media {
  background: #f2f6fb;
}

.viewer-caption {
  color: #33465c;
}


/* ============================================================
   研究方向配图：缩略图 + 点击放大（放大逻辑走 script.js 的灯箱）
   ============================================================ */
.dir-pic {
  position: relative;
  margin: 18px 0 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f2f6fb;
  cursor: zoom-in;
}

.dir-pic img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  transition: transform 0.45s ease;
}

.dir-pic:hover img {
  transform: scale(1.03);
}

.dir-pic figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #ffffff;
  text-align: left;
  background: linear-gradient(180deg, transparent, rgba(3, 10, 20, 0.80));
}


/* ============================================================
   研究方向配图：并排两张小图（光电晶体管 2.1 / 2.2）
   ============================================================ */
.dir-pics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.dir-pics .dir-pic {
  margin: 0;
}

.dir-pics .dir-pic img {
  aspect-ratio: 4 / 3;
}

@media (max-width: 720px) {
  .dir-pics {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   课题组成果：分段展示（1.1 / 1.2 / 1.3）
   ============================================================ */
.result-block + .result-block {
  margin-top: 36px;
}

.result-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 16px;
}

.result-head .rk {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c1);
  border: 1px solid rgba(13, 127, 168, 0.28);
  background: rgba(13, 127, 168, 0.07);
}

.result-head h3 {
  margin: 0;
  font-size: 22px;
}

.result-head p {
  flex: 1 1 100%;
  margin: 0;
  max-width: 62em;
  color: var(--muted);
  font-size: 14.5px;
}

.result-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

.result-pic {
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f2f6fb;
  cursor: zoom-in;
}

.result-pic img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.45s ease;
}

.result-pic:hover img {
  transform: scale(1.03);
}

.result-pic figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #ffffff;
  background: linear-gradient(180deg, transparent, rgba(3, 10, 20, 0.80));
}


/* 只有一张卡片时铺满整行 */
.res2.single {
  grid-template-columns: 1fr;
}

.res2.single p {
  max-width: 52em;
}

/* 设备照片统一尺寸：5:4 裁切填充，四张完全一致 */
.result-grid.uniform .result-pic img {
  aspect-ratio: 5 / 4;
  object-fit: cover;
}


/* 同一组图片统一画幅：截图类不裁切，按画幅居中留白 */
.result-grid.block-wide .result-pic img {
  aspect-ratio: 2.3 / 1;
  object-fit: contain;
}

.result-grid.block-square .result-pic img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
