/* ==========================================================================
   高比能固态电池实验室 · 样式表
   配色沿用原站：主色 #9d2c2c，辅助蓝 #6592e6
   ========================================================================== */

:root {
  --brand: #9d2c2c;
  --brand-dark: #7d2222;
  --brand-tint: #faf5f5;
  --accent: #6592e6;
  --ink: #232323;
  --ink-soft: #5c5c5c;
  --ink-mute: #8a8a8a;
  --line: #e6e6e6;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .07);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, .12);
  --nav-h: 88px;
  --sans: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC",
          sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; font-weight: 600; }

p { margin: 0 0 1em; }

.wrap { width: min(1180px, 92vw); margin: 0 auto; }
.wrap-narrow { width: min(880px, 92vw); margin: 0 auto; }

/* 内容区避开吸顶导航 */
main { padding-top: var(--nav-h); display: block; }
main > section:first-child { padding-top: 52px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.topbar.scrolled {
  background: rgba(255, 255, 255, .95);
  border-bottom-color: var(--line);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 13px; }
.brand img { height: 72px; width: auto; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.18; }
.brand-cn { font-size: 1.16rem; font-weight: 700; color: var(--ink); letter-spacing: .04em; }
.brand-en { font-size: .76rem; letter-spacing: .16em; color: var(--brand); text-transform: uppercase; }

.nav { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; }
.nav a {
  padding: 10px 16px; border-radius: 6px;
  font-size: 1.03rem; color: var(--ink); font-weight: 500;
  transition: background .2s, color .2s;
}
.nav a:hover { background: var(--brand-tint); color: var(--brand); }
.nav a.active { color: var(--brand); font-weight: 600; }
.nav a.active::after {
  content: ""; display: block; height: 2px; margin-top: 3px;
  background: var(--brand); border-radius: 2px;
}

.burger {
  display: none; width: 44px; height: 44px; border: 0; background: none;
  cursor: pointer; padding: 10px; border-radius: 8px;
}
.burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s; }
.burger span + span { margin-top: 5px; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 导航右侧操作区 */
.topbar-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.nav-cta {
  display: inline-block; padding: 10px 22px; border-radius: 999px;
  background: var(--brand); font-size: .97rem; font-weight: 600;
  white-space: nowrap; transition: background .2s, color .2s;
}
.topbar .nav-cta { color: #fff; }
.topbar .nav-cta:hover { background: var(--brand-dark); color: #fff; }

.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-size: .95rem; font-weight: 600; letter-spacing: .02em;
  border: 1.5px solid transparent; cursor: pointer; transition: .25s;
}
.btn-solid { background: var(--brand); color: #fff; }
.btn-solid:hover { background: var(--brand-dark); color: #fff; }

/* ---------- 页内分组导航（长页面用） ---------- */
.subnav {
  position: sticky; top: var(--nav-h); z-index: 60;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}
.subnav-inner { display: flex; gap: 6px; flex-wrap: wrap; }
.subnav a {
  font-size: .88rem; padding: 6px 14px; border-radius: 999px;
  color: var(--ink-soft); white-space: nowrap; transition: background .2s, color .2s;
}
.subnav a:hover { background: var(--brand-tint); color: var(--brand); }

/* 锚点定位时避开吸顶导航 */
#pi, .pi-block[id] { scroll-margin-top: calc(var(--nav-h) + 70px); }

/* ---------- 通用区块 ---------- */
.section { padding: 92px 0; }
.section.tint { background: var(--bg-soft); }
.section.tight { padding: 62px 0; }

.sec-head { text-align: center; margin-bottom: 56px; }
.sec-head .kicker {
  display: block; font-size: .76rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
.sec-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: .3em; }
.sec-head p { color: var(--ink-soft); max-width: 660px; margin: 0 auto; }

.rule { width: 56px; height: 3px; background: var(--brand); border-radius: 2px; margin: 18px auto 0; }

/* ---------- 简介 ---------- */
.intro-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 54px; align-items: center; }
.intro-text h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.intro-text .lead { font-size: 1.06rem; color: var(--ink); }
.intro-text p { color: var(--ink-soft); }
.intro-media { position: relative; }
.intro-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

.keyword-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.keyword-pills span {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-tint); border: 1px solid #f0dcdc; color: var(--brand-dark);
  border-radius: 999px; padding: 7px 16px; font-size: .88rem; font-weight: 500;
}
.keyword-pills b { color: var(--brand); font-size: 1rem; }

.quote-dream {
  margin: 30px 0 0; padding: 22px 26px; border-left: 4px solid var(--brand);
  background: var(--brand-tint); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.02rem; color: var(--brand-dark); font-style: italic;
}

/* ---------- 卡片 ---------- */
.cards { display: grid; gap: 26px; }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.cards.c4 { grid-template-columns: repeat(4, 1fr); }
.cards.c2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
/* 仪器/顾问图统一为 4:3；素材已在生成阶段补白成 4:3，故不会裁切主体 */
.card-img { aspect-ratio: 4/3; overflow: hidden; background: #fff; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.card-date { font-size: .82rem; color: var(--brand); font-weight: 600; letter-spacing: .04em; margin-bottom: 8px; }
.card h3 { font-size: 1.06rem; margin-bottom: .5em; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--brand); }
.card p { font-size: .92rem; color: var(--ink-soft); margin-bottom: 0; }
.card .more { margin-top: 16px; font-size: .88rem; font-weight: 600; color: var(--brand); }

/* ---------- 时间轴新闻 ---------- */
.timeline { position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 8px; bottom: 8px; left: 33.33%;
  width: 2px; background: var(--brand); opacity: .5;
}
.tl-item { display: grid; grid-template-columns: 33.33% 1fr; position: relative; padding: 0 0 34px; }
.tl-date {
  text-align: right; padding-right: 46px; padding-top: 6px;
  font-weight: 600; color: var(--brand); font-size: .95rem;
}
.tl-body { padding-left: 46px; position: relative; }
.tl-body::before {
  content: ""; position: absolute; left: -9px; top: 12px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 2px solid var(--brand);
}
.tl-body h3 { font-size: 1.04rem; margin: 0 0 .35em; font-weight: 600; }
.tl-body h3 a { color: var(--ink); }
.tl-body h3 a:hover { color: var(--brand); }
.tl-body p { color: var(--ink-soft); font-size: .93rem; margin: 0; }

/* ---------- 研究方向 ---------- */
.research-item { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 58px 0; border-bottom: 1px solid var(--line); }
.research-item:last-child { border-bottom: 0; }
.research-item:nth-child(even) .ri-media { order: -1; }
.ri-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }
.ri-idx { font-size: .8rem; letter-spacing: .28em; color: var(--brand); font-weight: 700; }
.ri-text h3 { font-size: 1.5rem; margin: 8px 0 .5em; }
.ri-text p { color: var(--ink-soft); }
.ri-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.ri-tags span { background: var(--brand-tint); border: 1px solid #f0dcdc; color: var(--brand-dark); border-radius: 999px; padding: 6px 15px; font-size: .86rem; }

/* ---------- 团队成员 ---------- */
.pi-block { display: grid; grid-template-columns: 280px 1fr; gap: 44px; align-items: start; }
.pi-photo img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.pi-name { font-size: 1.6rem; margin-bottom: .1em; }
.pi-title { color: var(--brand); font-weight: 600; margin-bottom: 1em; font-size: .97rem; }
.pi-block .bio p { color: var(--ink-soft); font-size: .96rem; }

.member-group { margin-top: 68px; }

/* 首页内容块标题（与成员分组标题同款） */
.block-title {
  font-size: 1.3rem; padding-bottom: 12px; border-bottom: 2px solid var(--brand);
  display: inline-block; margin: 0 0 22px;
}
.member-group[id] { scroll-margin-top: calc(var(--nav-h) + 70px); }
.member-group > h3 {
  font-size: 1.3rem; padding-bottom: 12px; border-bottom: 2px solid var(--brand);
  display: inline-block; margin-bottom: 30px;
}
.members { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.member { display: block; text-align: center; color: inherit; text-decoration: none; }
a.member { cursor: pointer; }
a.member .nm { transition: color .2s; }
a.member:hover .nm { color: var(--brand); }
a.member .nm::after { content: "›"; margin-left: 5px; opacity: .45; font-weight: 400; }
.member .ph {
  /* 竖长方形，不是 1:1。成员照片里 19 张竖构图（中位 400×560，约 0.71）就是冲着 3:4 来的，
     窄高比正好装得下，不用裁脸；正方形那批走 cover、横向居中裁掉两边背景。
     1:1 那版会把竖构图的下巴往下切，2026-10 客户因此要求改掉。 */
  aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-soft); margin-bottom: 14px; box-shadow: var(--shadow);
}
.member .ph img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s; }
.member:hover .ph img { transform: scale(1.06); }
.member .nm { font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.member .aff { font-size: .84rem; color: var(--ink-mute); line-height: 1.5; }

.alumni-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 34px; }
.alumni-list li { font-size: .93rem; color: var(--ink-soft); padding: 7px 0; border-bottom: 1px dashed var(--line); list-style: none; }
.alumni-list { padding: 0; margin: 0; }

/* ---------- 论文 ---------- */
.pub-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; }
.pub-search { flex: 1; min-width: 240px; max-width: 380px; }
.pub-search input {
  width: 100%; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px;
  font-family: inherit; font-size: .93rem; outline: none; transition: border-color .2s, box-shadow .2s;
}
.pub-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(157,44,44,.1); }
.pub-count { color: var(--ink-mute); font-size: .9rem; }

.pub-list { list-style: none; padding: 0; margin: 0; counter-reset: pub; }
.pub-list li {
  counter-increment: pub; position: relative;
  padding: 20px 22px 20px 66px; border-bottom: 1px solid var(--line);
  font-size: .95rem; color: var(--ink-soft); transition: background .2s;
}
.pub-list li:hover { background: var(--brand-tint); }
.pub-list li::before {
  content: counter(pub); position: absolute; left: 18px; top: 20px;
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-tint);
  color: var(--brand); font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.pub-list .jr { color: var(--brand); font-weight: 600; font-style: italic; }

/* ---------- 相册 ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-grid a {
  display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius);
  box-shadow: var(--shadow); background: var(--bg-soft);
}
.gallery-grid a img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, filter .3s; }
.gallery-grid a:hover img { transform: scale(1.07); filter: brightness(1.06); }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(20,10,10,.92);
  display: none; align-items: center; justify-content: center; padding: 4vh 4vw;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .lb-close, .lightbox .lb-nav {
  position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0;
  width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.lightbox .lb-close:hover, .lightbox .lb-nav:hover { background: rgba(255,255,255,.28); }
.lightbox .lb-close { top: 22px; right: 22px; }
.lightbox .lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ---------- 文章页 ---------- */
.post-hero { padding: 52px 0 40px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.post-hero .post-date { color: var(--brand); font-weight: 600; font-size: .9rem; letter-spacing: .05em; margin-bottom: 10px; }
.post-hero h1 { font-size: clamp(1.5rem, 3.6vw, 2.3rem); margin-bottom: 0; }
.breadcrumb { font-size: .86rem; color: var(--ink-mute); margin-bottom: 22px; }
.breadcrumb a { color: var(--ink-mute); }
.breadcrumb a:hover { color: var(--brand); }

.post-body { padding: 56px 0 40px; }
.post-body .article p { font-size: 1.02rem; color: #3a3a3a; }
.post-body .article figure { margin: 30px 0; }
.post-body .article figure img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.post-body .article figcaption { text-align: center; font-size: .85rem; color: var(--ink-mute); margin-top: 10px; }

.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); }
.post-nav a { font-size: .93rem; font-weight: 600; max-width: 45%; }
.post-nav .pn-lbl { display: block; font-size: .78rem; color: var(--ink-mute); font-weight: 400; letter-spacing: .1em; margin-bottom: 4px; }
.post-nav .next { text-align: right; margin-left: auto; }

/* ---------- 青年教师详情 ---------- */
.teacher-profile { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.teacher-profile .tp-photo img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.teacher-profile dl { margin: 0 0 18px; }
.teacher-profile dt {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-top: 14px;
}
.teacher-profile dd { margin: 4px 0 0; font-size: .97rem; color: var(--ink); }

/* ---------- 成员格言 ---------- */
.motto {
  font-size: .78rem; color: var(--ink-mute); line-height: 1.55;
  margin-top: 7px; font-style: italic;
}
a.member:hover .motto { color: var(--brand); }

/* ---------- 顾问卡片 ---------- */
.advisor .card-body h3 { font-size: 1.12rem; margin-bottom: .5em; }
.advisor .card-body p { font-size: .88rem; }

/* ---------- PI 元信息 ---------- */
.pi-meta { margin: 0 0 18px; }
.pi-meta dt {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-top: 12px;
}
.pi-meta dd { margin: 4px 0 0; font-size: .96rem; color: var(--ink); }

/* ---------- 引导图与段落 ---------- */
.hero-figure { margin: 0 auto 34px; max-width: 760px; }
.hero-figure img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
}

/* 概述文字块：与「加入我们」同款的左侧强调条 */
.lead-note {
  background: var(--brand-tint);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 26px 32px;
  max-width: 980px;
}
.lead-note p {
  margin: 0; color: var(--ink); font-size: 1rem; line-height: 2;
  text-align: justify; text-justify: inter-ideograph;
}

/* 仅供屏幕阅读器 */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 研究方向：无配图时整行铺开 */
.research-item.no-media { grid-template-columns: 1fr; }
.research-item.no-media .ri-text { max-width: 940px; }

/* ---------- 招生信息 ---------- */
.recruit-box {
  background: var(--brand-tint);
  border-radius: var(--radius); padding: 24px 28px;
}
.recruit-box p { margin: 0; font-size: 1.02rem; color: var(--brand-dark); font-weight: 600; }
.recruit-box .recruit-mail {
  margin-top: 12px; font-size: .94rem; font-weight: 400; color: var(--ink-soft);
}
.recruit-box a { color: var(--brand); }

/* ---------- 关于页引文 ---------- */
.quote-dream span {
  display: block; font-size: .74rem; letter-spacing: .14em;
  text-transform: uppercase; font-style: normal; margin-top: 6px; opacity: .8;
}

/* ---------- 页脚（轻量单行） ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 0;
  font-size: .86rem;
  color: var(--ink-mute);
}
.site-footer .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.f-links { display: flex; gap: 22px; flex-wrap: wrap; }
.f-links a { color: var(--ink-mute); }
.f-links a:hover { color: var(--brand); }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center; color: var(--ink-mute); font-size: .98rem;
  padding: 64px 0 84px;
}

/* ---------- 动画 ---------- */
/* 仅在 JS 可用时才隐藏待入场元素：无 JS 环境下内容直接可见 */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
/* 顶栏：菜单文字放大后，整排导航在 1150px 以下已经放不下（中文标签会折成两行、
   顶破 76px 的顶栏），所以「折叠成汉堡菜单」的断点跟着上移到这里。 */
@media (max-width: 1150px) {
  .burger { display: block; }
  .nav {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
    padding: 8px 16px 16px;
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: .25s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 13px 14px; border-radius: 8px; }
  .nav a.active::after { display: none; }
  .nav-cta { display: none; }
}

@media (max-width: 1080px) {
  .cards.c4, .members, .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .cards.c3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  :root { --nav-h: 66px; }
  .brand img { height: 52px; }   /* 顶栏在窄屏只有 66px，校徽跟着收一档 */
  .site-footer .wrap { justify-content: center; text-align: center; }

  .intro-grid, .research-grid, .research-item, .pi-block, .teacher-profile { grid-template-columns: 1fr; gap: 30px; }
  .research-item:nth-child(even) .ri-media { order: 0; }
  .cards.c2 { grid-template-columns: 1fr; }
  .teacher-profile .tp-photo { max-width: 240px; }
  .cards.c3, .cards.c4, .members, .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .timeline::before { left: 8px; }
  .tl-item { grid-template-columns: 1fr; padding-left: 34px; }
  .tl-date { text-align: left; padding: 0 0 4px; }
  .tl-body { padding-left: 0; }
  .tl-body::before { left: -34px; top: 6px; }
}

@media (max-width: 560px) {
  .section { padding: 62px 0; }
  .cards.c3, .cards.c4, .members, .gallery-grid { grid-template-columns: 1fr; }
  .alumni-list { grid-template-columns: 1fr; }
  .post-nav { flex-direction: column; }
  .post-nav a, .post-nav .next { max-width: 100%; text-align: left; margin-left: 0; }
}

/* ---------- 首页：照片下方的「加入我们」合并块（文字紧凑排版） ---------- */
.join-card { margin-top: 24px; }
.join-card .block-title { margin-bottom: 12px; }
.join-card[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }
.join-card .recruit-box { padding: 16px 20px; }
.join-card .recruit-box p { font-size: .95rem; line-height: 1.5; }
.alumni-list.contact-list { grid-template-columns: 1fr; gap: 0; margin-top: 8px; }
.contact-list li { font-size: .88rem; line-height: 1.5; padding: 3px 0; }
.contact-list li:last-child { border-bottom: 0; }

/* ---------- 首页顶部：校园全景横幅（与内容栏同宽，紧贴菜单栏下沿） ---------- */
.campus-figure { margin: 0 0 clamp(18px, 2.6vh, 38px); }
.campus-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
/* 首页这一节不要上留白：图片直接顶到菜单栏下沿 */
body.home.page-fit main > section.fit-sec { padding-top: 0; }

/* ---------- 一屏页（首页 / 研究方向）：整页放完，不滚动 ----------
   这两页共用一套骨架：同一个栅格比例、同一号块标题、同一套正文/圆角/阴影，
   首页只是多了右栏那张合影和「加入我们」卡片。

   尺寸为什么都要用 vh 表达：1366×768 的笔电，浏览器工具条吃掉约 150px，**真机可用的
   高度只有 600 上下**。按 768 排的话真机上就会溢出一条滚动条（实测溢出 67px）。
   所以这里让留白和图去吸收多出来的高度——矮屏先收图，高屏多留白，内容本身不固定高。 */
main > section.fit-sec { padding: 48px 0 56px; }   /* 窄屏 / 非一屏页的默认 */

@media (min-width: 1024px) {
  body.page-fit { min-height: 100vh; display: flex; flex-direction: column; }
  body.page-fit main {
    flex: 1 1 auto; padding-top: var(--nav-h);
    display: flex; flex-direction: column; justify-content: safe center;
  }
  body.page-fit main > section.fit-sec {
    width: 100%;
    padding: clamp(8px, 2.2vh, 32px) 0;
  }

  /* 同一套骨架：左文右图。两页同一个比例、同一个间距 */
  body.page-fit .intro-grid,
  body.page-fit .research-grid {
    grid-template-columns: 1.12fr .88fr;
    gap: clamp(32px, 3.4vw, 54px);
    align-items: center;
  }

  /* 研究方向：右栏（示意图）给得更宽。那张图是 16:9 的横图，要真撑到和左栏文字一样高
     得有 ~850px 宽、放不下；这里是「文字还读得舒服」前提下能给的宽度。 */
  body.page-fit .research-grid { grid-template-columns: .85fr 1.15fr; }

  /* 块标题统一到同一号。「课题组简介」原来是 clamp(1.5rem,3vw,2rem)、
     「加入我们」走 .block-title 的 1.3rem——同一个 class 两种字号，是历史写法，收掉。 */
  body.page-fit .block-title {
    font-size: clamp(1.24rem, .55vw + 1rem, 1.5rem);
    padding-bottom: 10px;
    margin-bottom: 16px;
  }

  /* 正文收一档：行距 1.75 → 1.66。一屏页上这一步省下来的高度最多。
     .95rem ≈ 15.2px——和站里卡片正文（.92rem）同一档，不是硬缩出来的字号。 */
  body.page-fit .intro-text p {
    font-size: .95rem; line-height: 1.66; margin-bottom: .62em;
  }
  body.page-fit .intro-text p:last-of-type { margin-bottom: 0; }
  body.page-fit .research-lead {
    font-size: .95rem; line-height: 1.66;
    margin-bottom: clamp(10px, 1.5vh, 18px);
  }

  body.page-fit .quote-dream {
    margin-top: clamp(8px, 1.4vh, 20px);
    padding: clamp(10px, 1.5vh, 18px) 20px;
    font-size: .94rem;
  }

  /* 「加入我们」那块收紧凑：它是右栏的次要内容，不该和左栏正文抢高度 */
  body.page-fit .join-card { margin-top: clamp(12px, 1.8vh, 22px); }
  body.page-fit .join-card .block-title {
    font-size: 1.15rem; padding-bottom: 8px; margin-bottom: 8px;
  }
  body.page-fit .join-card .recruit-box { padding: clamp(10px, 1.5vh, 16px) 18px; }
  body.page-fit .join-card .recruit-box p { font-size: .91rem; line-height: 1.42; }
  body.page-fit .alumni-list.contact-list { margin-top: 6px; }
  body.page-fit .contact-list li { font-size: .84rem; line-height: 1.4; padding: 1px 0; }

  /* 配图：宽度跟着列走，高度吃掉剩下那点空间——矮屏先缩图，高屏才用得上大图 */
  body.page-fit .intro-media img { width: auto; max-width: 100%; margin: 0 auto; }
  body.home .intro-media img {
    max-height: max(120px, calc(100vh - 400px));
  }

}

/* 研究方向：示意图撑满左栏正文的整条高度——上沿对齐首段开头、下沿对齐最后一个方向框。
   图是 16:9 的横图，这条带子比它略高，所以用 cover 让它长满（左右各裁掉一点点）；
   正文行距收到刚好和图等高，裁掉的宽度就小到看不出来。

   只在 ≥1280px 生效：再窄一点内容栏跟着窗口缩，图等比变小、正文却变高，
   硬撑满要左右各裁 20% 以上——会把两边的「正极材料 / 负极材料」切掉。
   窄屏退回「图保持原比例、垂直居中」，宁可不对齐也不裁图。 */
@media (min-width: 1280px) {
  body.page-fit .research-grid { align-items: stretch; }
  body.page-fit .research-figure { align-self: stretch; }
  body.page-fit .research-figure img {
    width: 100%; height: 100%; object-fit: cover;
    margin: 0; max-height: none;
  }
  body.page-fit .research-lead { margin-bottom: 12px; }
  body.page-fit .research-points { gap: 12px; }
  body.page-fit .research-points li { padding: 11px 16px; }
}

/* ---------- 研究方向：和首页同一套骨架（左文右图） ---------- */
.research-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
/* 标题横跨两栏。这样右栏图片的上下边缘就能对着左栏「正文首段 / 最后一个方向框」，
   而不是对着标题顶。justify-self:start 是保住 .block-title 的「下划线只到文字宽度」——
   格子里的元素会被块级化，不写这句红线会拉满整栏。 */
.research-grid > .block-title { grid-column: 1 / -1; justify-self: start; }
.research-figure { margin: 0; }
.research-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.research-lead { font-size: 1rem; color: var(--ink-soft); margin-bottom: 22px; }
/* 三个方向做成「浅底 + 左侧主色条」的块——和首页那条引文（.quote-dream）同一个语汇，
   两页看起来才是一套。小圆点换掉：一屏页上它太轻，压不住三行字。 */
/* 三个方向做成「浅底 + 左侧主色条」的块——和首页那条引文（.quote-dream）同一个语汇，
   两页看起来才是一套。内边距跟着视口高度长：首页右栏那张合影会随高度变大，
   这块也得跟着长，两页的「内容从哪儿开始」才对得齐。 */
.research-points { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(10px, 1.6vh, 18px); }
.research-points li {
  padding: clamp(11px, 2vh, 24px) 16px;
  background: var(--brand-tint);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .94rem; line-height: 1.6; color: var(--ink-soft);
}
.research-points strong { color: var(--ink); font-weight: 600; }

/* 窄屏/竖屏：图文不再左右分栏，按顺序上下堆叠（文字在前、图在后）。
   断点取 1024 而不是 880——881~1023 那一段两个窄栏挤在一起既难看也放不下。

   这条**必须留在文件末尾**：它和 `.research-grid { grid-template-columns: 1fr 1fr }`
   同为单类选择器（特异性一样），只能靠先后顺序取胜；放在前面会被后面那条基础规则盖掉，
   手机上就会出现「图片仍挤在右边」——2026-10 客户就是这么发现的。 */
@media (max-width: 1023px) {
  .intro-grid, .research-grid { grid-template-columns: 1fr; gap: 28px; }
}
