
:root{
  --maxw: 1100px;
  --text:#222;
  --muted:#666;
  --light:#888;
  --rule:#ddd;
  --link:#1e3a8a;
  --bg:#fff;
  --codebg:#f8f9fa;
  --navy: #1e3a8a;
  --navy-light: #2563eb;
  --navy-dark: #172554;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height:1.65;
}
a{color:var(--link); text-decoration:none}
a:hover{text-decoration:underline}
.container{max-width:var(--maxw); margin:0 auto; padding:0 18px}

/* 分隔线 - 学术风格 */
hr {
  border: none;
  height: 1px;
  background: var(--rule);
  margin: 32px 0;
}




h1,h2,h3{line-height:1.2; margin:0; font-family: Georgia, "Times New Roman", Times, serif;}
h1{font-size:42px; font-weight:700; letter-spacing:-0.01em; color: #1a1a1a;}
h2{font-size:30px; font-weight:700; margin-top:32px; color: #1a1a1a; border-bottom: 3px solid #1e3a8a; padding-bottom: 10px;}
h3{font-size:20px; font-weight:600; margin-top:20px; color: #1e3a8a; border-left: 4px solid #1e3a8a; padding-left: 12px;}
p{margin:10px 0}
.small{font-size:14px; color:var(--muted)}
.muted{color:var(--muted)}
.light{color:var(--light)}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--rule);
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
}
.topbar{
  position:sticky; top:0; z-index:20;
  background:#fff;
  border-bottom:1px solid #ddd;
}
.topbar .row{
  display:flex; 
  align-items:center; 
  gap:24px; 
  padding:14px 0;
}
.brand{
  font-weight:700; 
  letter-spacing:.05em;
  font-size: 20px;
  color: #1e3a8a;
  font-family: Georgia, "Times New Roman", Times, serif;
  transition: color 0.2s ease;
  cursor: pointer;
}
.brand:hover{
  color: #2563eb;
  text-decoration: none;
}
.nav{
  display:flex; 
  gap:8px; 
  flex-wrap:wrap;
  align-items: center;
}
.nav a{
  font-size:14px; 
  color:#555;
  padding: 6px 12px;
  transition: color 0.2s ease;
  font-weight: 400;
  position: relative;
}
.nav a:hover{
  color: #2563eb;
  text-decoration: none;
}
.nav a.active{
  font-weight:600; 
  color: #1e3a8a;
  text-decoration: none;
}
.nav a.active::after{
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #1e3a8a;
}
.spacer{flex:1}
.btn{
  display:inline-flex; 
  align-items:center; 
  gap:6px;
  border:1px solid #ccc;
  padding:6px 14px; 
  border-radius:4px;
  font-size:14px; 
  color:#444;
  font-weight: 400;
  transition: all 0.2s ease;
  background: #fff;
}
.btn:hover{
  background: #f8f9fa;
  border-color: #1e3a8a;
  color: #1e3a8a;
  text-decoration:none;
}

.hero{padding:26px 0 10px}
.title2{font-size:44px; font-weight:900; letter-spacing:-0.03em}
.subtitle{font-size:18px; color:var(--muted); margin-top:8px; max-width:960px}
.authors{margin-top:12px; font-size:14px; color:#222}
.authors a{color:#222}
.links{display:flex; gap:10px; flex-wrap:wrap; margin-top:14px}
.contentlist{
  padding:0; margin:12px 0 0;
  list-style:none;
  columns:2;
}
.contentlist li{break-inside:avoid; padding:3px 0}
.contentlist a{font-size:14px; color:#222}
@media (max-width:820px){ .contentlist{columns:1} h1,.title2{font-size:34px} }

.media{
  border:1px solid #e5e7eb;
  border-radius:6px;
  overflow:hidden;
  background:#000;
}
.media video{width:100%; height:auto; display:block}
.media.media-small{background:#fff; display:flex; align-items:center; justify-content:center; padding:10px}
.media.media-small video.small-video{width:60%; max-width:720px; margin:0; height: auto; object-fit: contain;}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.grid3{display:grid; grid-template-columns:repeat(3,1fr); gap:10px}
@media (max-width:860px){ .grid2{grid-template-columns:1fr} .grid3{grid-template-columns:1fr 1fr} }
@media (max-width:560px){ .grid3{grid-template-columns:1fr} }

.card{
  border:1px solid var(--rule);
  border-radius:6px;
  padding:16px;
  background: #fafbfc;
}
.caption{font-size:14px; color:var(--muted); margin-top:8px; line-height:1.6; font-style: italic;}
.kv{display:flex; gap:18px; flex-wrap:wrap; margin-top:10px}
.kv .item{min-width:220px}
.kv .k{font-size:12px; color:var(--light); text-transform:uppercase; letter-spacing:.08em}
.kv .v{font-size:14px; color:#111; margin-top:4px}

details{border:1px solid var(--rule); border-radius:4px; padding:10px 12px; background:#fafbfc}
details summary{cursor:pointer; font-weight:600}
details .content{margin-top:10px}

.code{
  background:var(--codebg);
  border:1px solid var(--rule);
  border-radius:14px;
  padding:12px;
  overflow:auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12.5px;
  line-height:1.45;
}
.copybtn{
  margin-left:auto;
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid #ccc;
  padding:6px 10px;
  border-radius:4px;
  font-size:12px;
  cursor:pointer;
  background: #fff;
}
.copybtn:hover{background:#f8f9fa; border-color: #1e3a8a; color: #1e3a8a;}

/* Charts */
.toolbar{display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:space-between; margin:10px 0 10px;}
.controls{display:flex; gap:10px; flex-wrap:wrap; align-items:center;}
.select,.toggle{display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:4px; border:1px solid #ccc; background:#fff; font-size:13px;}
.select select{border:none; outline:none; background:transparent; font-weight:600; color:#333; font-size:13px;}
.toggle input{accent-color: #1e3a8a}
.legend{display:flex; gap:10px; flex-wrap:wrap;}
.legend .item{display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted)}
.swatch{width:12px; height:12px; border-radius:3px; border:1px solid rgba(0,0,0,.12);}
.canvas-wrap{position:relative; width:100%; border-radius:14px; border:1px solid var(--rule); background:#fff; overflow:hidden;}
canvas.chart{width:100%; height:340px; display:block;}
/* Results: three charts side-by-side should be a bit shorter to keep the section compact. */
.results-grid canvas.chart{height:300px;}
@media (max-width:720px){ canvas.chart{height:420px} }
@media (max-width:720px){ .results-grid canvas.chart{height:360px} }
.tooltip{
  position:absolute; pointer-events:none;
  padding:8px 10px; border-radius:10px;
  background: rgba(0,0,0,.86); color:#fff;
  font-size:12px; line-height:1.35;
  border:1px solid rgba(255,255,255,.18);
  opacity:0; transform: translateY(6px);
  transition: opacity .12s ease, transform .12s ease;
  max-width:260px;
}
.tooltip.on{opacity:1; transform: translateY(0)}

.footer{padding:26px 0; color:var(--muted); font-size:13px}
.progress{
  position:fixed; 
  left:0; 
  top:0; 
  height:3px; 
  z-index:50; 
  width:0%; 
  background: linear-gradient(to right, #1e3a8a, #2563eb);
}

/* Back to Top Button */
.back-to-top{
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: #1e3a8a;
  color: #fff;
  border: 1px solid #172554;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 40;
}
.back-to-top.show{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover{
  background: #172554;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}
.back-to-top:active{
  transform: scale(0.95);
}
@media (max-width: 768px){
  .back-to-top{
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ===== Fullscreen hero video (VIRAL-style opening) ===== */
.topbar{
  position:fixed; top:0; left:0; right:0;
  background:transparent;
  backdrop-filter:none;
  border-bottom:1px solid transparent;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease, box-shadow .25s ease;
}
.topbar.scrolled{
  background:#fff;
  border-bottom:1px solid #ddd;
}
/* Hero 区域的导航栏样式 */
.topbar:not(.scrolled) .brand{
  color: #fff;
}
.topbar:not(.scrolled) .brand:hover{
  color: rgba(255, 255, 255, 0.85);
}
.topbar:not(.scrolled) .nav a{
  color: rgba(255, 255, 255, 0.85);
}
.topbar:not(.scrolled) .nav a:hover{
  color: #fff;
}
.topbar:not(.scrolled) .nav a.active{
  color: #fff;
}
.topbar:not(.scrolled) .nav a.active::after{
  background: #fff;
}
.hero-video{
  position:relative;
  height:100vh;
  min-height:640px;
  overflow:hidden;
  background:#000;
}
.hero-video video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  filter: contrast(1.02) saturate(1.03);
}
.hero-video::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.20) 42%, rgba(0,0,0,.00) 72%, rgba(255,255,255,.90) 100%);
}
/* .hero-overlay{
  position:relative;
  z-index:2;
  height:100%;
  display:flex;
  align-items:flex-end;
  padding: 0 0 36px;
} */


.hero-overlay{
  position:relative;
  z-index:2;
  height:100%;
  display:flex;
  align-items:center;      /* was: flex-end */
  padding: 0;              /* was: 0 0 36px */
}


.hero-overlay .container{width:100%}
.hero-title{
  color:#fff;
  font-size:48px;
  font-weight:700;
  letter-spacing:-0.01em;
  max-width:980px;
  text-align: left;
  font-family: Georgia, "Times New Roman", Times, serif;
}
.hero-subtitle{
  color: rgba(255,255,255,.88);
  font-size:18px;
  max-width:920px;
  margin-top:10px;
}
.hero-meta{
  margin-top:18px; 
  color: rgba(255,255,255,.86); 
  font-size:17px;
}
.hero-authors{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 16px;
  line-height: 1.6;
}
.hero-authors span{
  white-space: nowrap;
}
.hero-authors sup{
  font-size: 0.7em;
  color: rgba(255,255,255,.75);
  font-weight: 600;
}

.hero-affiliations{
  margin-top:16px; 
  color: rgba(255,255,255,.82); 
  font-size:15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.affiliation-row{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 20px;
  line-height: 1.5;
}
.affil-item{
  white-space: nowrap;
  padding: 2px 0;
}
.affil-item sup{
  font-weight: 700;
  color: rgba(26, 115, 232, 0.9);
  background: rgba(255,255,255,0.15);
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 4px;
}
.hero-notes-row{
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px 16px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  font-style: italic;
}
.note-item sup{
  font-weight: 700;
  font-style: normal;
}

.hero-links{display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; justify-content: flex-start;}

.hero-links .btn{
  background: rgba(255,255,255,.95);
  border-color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-links .btn:hover{
  background:#fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-actions{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-top:10px}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid rgba(255,255,255,.28);
  color:#fff;
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
  background: rgba(0,0,0,.25);
}
.iconbtn{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid rgba(255,255,255,.30);
  color:#fff;
  padding:7px 10px;
  border-radius:12px;
  font-size:13px;
  background: rgba(0,0,0,.25);
  cursor:pointer;
}
.iconbtn:hover{background: rgba(0,0,0,.34)}
.scrollhint{
  position:absolute;
  left:50%;
  bottom:14px;
  transform:translateX(-50%);
  z-index:3;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  color: rgba(255,255,255,.85);
  font-size:12px;
  letter-spacing:.10em;
  text-transform:uppercase;
  pointer-events:none;
}
.chevdown{
  width:18px; height:18px;
  border-right:2px solid rgba(255,255,255,.85);
  border-bottom:2px solid rgba(255,255,255,.85);
  transform: rotate(45deg);
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob{
  0%,100%{transform: translateY(0) rotate(45deg)}
  50%{transform: translateY(6px) rotate(45deg)}
}
.mainwrap{padding-top:0}
@media (max-width:820px){
  .hero-title{font-size:38px}
  .hero-video{min-height:560px}
}

/* ===== Hero scroll parallax & fade ===== */
.hero-video{will-change: transform}
.hero-video video{will-change: transform, filter}
.hero-overlay{will-change: opacity, transform}
.hero-dim{
  position:absolute; inset:0; z-index:1;
  background: rgba(0,0,0,.0);
  transition: background .18s ease;
  pointer-events:none;
}
/* .hero-overlay-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
} */
.hero-overlay-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
  transform: translateY(10vh);   /* move text upward */
}


.hero-overlay .container{display:none} /* old v6 container hidden */
.hero-title.hide-title{
  opacity:0 !important;
  transform: translateY(10px) !important;
  pointer-events:none;
}
.hero-title, .hero-subtitle, .hero-meta, .hero-links, .hero-actions{
  transition: opacity .18s ease, transform .18s ease;
}


/* Contributions Cards Design */
.contrib-cards{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.contrib-card{
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  background: #fafbfc;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.2s ease;
  position: relative;
}
.contrib-card::before{
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #1e3a8a;
}
.contrib-card:hover{
  border-color: #1e3a8a;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.08);
}
.contrib-number{
  display: none;
}
.contrib-content{
  flex: 1;
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.82);
}
.highlight{
  color: #1e3a8a;
  font-weight: 700;
  font-style: italic;
}
.number-highlight{
  color: #dc2626;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== Visual sections ===== */
.section-title{
  font-size:32px;
  font-weight:900;
  letter-spacing:-0.02em;
  margin-top:0;
}
.section-lead{
  font-size:16px;
  color:var(--muted);
  max-width:900px;
}
.bigcard{
  border:1px solid var(--rule);
  border-radius:18px;
  padding:18px;
  background:#fff;
}
.gallery{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:14px;
}
@media (max-width:900px){ .gallery{grid-template-columns:1fr} }
.figure{
  border:1px solid var(--rule);
  border-radius:16px;
  overflow:hidden;
  background: linear-gradient(180deg, #fafafa, #ffffff);
}
.figure .ph{
  height:320px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(0,0,0,.35);
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.figure.small .ph{height:180px}
.figure .cap{padding:10px 12px; font-size:13px; color:var(--muted); border-top:1px solid var(--rule)}
.kpi-row{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:12px}
@media (max-width:860px){ .kpi-row{grid-template-columns:1fr} }
.kpi{
  border:1px solid var(--rule);
  border-radius:14px;
  padding:12px 14px;
  background:#fff;
}
.kpi .k{font-size:12px; color:var(--light); text-transform:uppercase; letter-spacing:.10em}
.kpi .v{font-size:22px; font-weight:900; margin-top:6px}
.kpi .d{font-size:13px; color:var(--muted); margin-top:4px}

/* ===== Interactive compositional module ===== */
.interactive{
  display:grid;
  grid-template-columns: .95fr 1.05fr;
  gap:14px;
  align-items:start;
}
@media (max-width:920px){ .interactive{grid-template-columns:1fr} }
.uploadbox{
  border:1px dashed rgba(0,0,0,.22);
  border-radius:16px;
  padding:14px;
  background: #fff;
}
.uploadbox .row{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.input{
  width:100%;
  border:1px solid var(--rule);
  border-radius:12px;
  padding:10px 12px;
  font-size:14px;
  outline:none;
}
.thumbgrid{display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:10px}
@media (max-width:560px){ .thumbgrid{grid-template-columns:repeat(2,1fr)} }
.thumb{
  border:1px solid var(--rule);
  border-radius:12px;
  padding:10px;
  background:#fff;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  height:64px;
  font-size:12px;
  color:rgba(0,0,0,.55);
}
.thumb.active{outline:2px solid rgba(26,115,232,.55)}
.preview{
  margin-top:10px;
  border:1px solid var(--rule);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}
.preview img{
  width:100%;
  height:260px;
  object-fit:cover;
  display:block;
}
.stepper{
  border:1px solid var(--rule);
  border-radius:18px;
  background:#fff;
  overflow:hidden;
}
.steps{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-bottom:1px solid var(--rule);
}
@media (max-width:820px){ .steps{grid-template-columns:1fr 1fr} }
.step{
  padding:10px 12px;
  cursor:pointer;
  font-size:13px;
  color:rgba(0,0,0,.75);
  background:#fff;
}
.step b{display:block; font-size:13px}
.step span{display:block; font-size:12px; color:var(--muted); margin-top:2px}
.step.active{background: rgba(26,115,232,.08);}
.step-content{padding:14px 14px 16px;}
.pipe{
  margin-top:12px;
  border:1px solid var(--rule);
  border-radius:16px;
  padding:12px;
  background: linear-gradient(180deg, #fbfbfb, #fff);
}
.pipe svg{width:100%; height:auto; display:block}
.runrow{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:10px}
.pulse{
  display:inline-block;
  width:10px; height:10px;
  border-radius:999px;
  background: rgba(26,115,232,.85);
  box-shadow: 0 0 0 0 rgba(26,115,232,.45);
  animation: pulse 1.4s infinite;
}
@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(26,115,232,.45)}
  70%{box-shadow:0 0 0 10px rgba(26,115,232,0)}
  100%{box-shadow:0 0 0 0 rgba(26,115,232,0)}
}

.ablation-grid canvas.chart{height:260px;}
@media (max-width:980px){ .ablation-grid{grid-template-columns:1fr;} .ablation-grid canvas.chart{height:300px;} }

/* --- Demo rotator (3-task cinematic layout) --- */
.demo-rotator-wrap{position:relative;height:150vh}
.demo-rotator-sticky{position:sticky;top:72px;height:78vh;display:flex;align-items:center;overflow:hidden}
.demo-rotator{position:relative;width:100%;height:100%}
.demo-card{position:absolute;top:50%;left:50%;width:min(68vw,980px);transform:translate(-50%,-50%) scale(.70);opacity:.28;filter:saturate(.72) brightness(.58) blur(.6px);transition:transform .82s cubic-bezier(.22,.61,.36,1),opacity .55s ease,filter .55s ease,box-shadow .55s ease;z-index:1;pointer-events:none}
/* .demo-card .media{border-radius:22px;box-shadow:0 18px 45px rgba(0,0,0,.30);border:2px solid rgba(120,140,170,.18);overflow:hidden;background:#000} */

.demo-card .media{
  border-radius:22px;
  box-shadow:0 18px 45px rgba(0,0,0,.30);
  border:none;          /* 去掉描边 */
  overflow:hidden;
  background:transparent; /* 去掉黑底 */
}
.demo-card .media video{display:block;width:100%;aspect-ratio:16/9;object-fit:cover}
.demo-card .caption{text-align:center;margin-top:10px;font-weight:700;opacity:.95}
.demo-card.is-active{transform:translate(-50%,-50%) scale(1.06);opacity:1;filter:saturate(1.04) brightness(1.04) blur(0);z-index:3;pointer-events:auto}
.demo-card.is-left{transform:translate(calc(-50% - min(31vw,430px)),-50%) scale(.70) rotateY(10deg);opacity:.30;z-index:2}
.demo-card.is-right{transform:translate(calc(-50% + min(31vw,430px)),-50%) scale(.70) rotateY(-10deg);opacity:.30;z-index:2}
@media (max-width: 1024px){
  .demo-rotator-wrap{height:140vh}
  .demo-rotator-sticky{height:72vh}
  .demo-card{width:min(84vw,760px)}
  .demo-card.is-left{transform:translate(calc(-50% - 22vw),-50%) scale(.76)}
  .demo-card.is-right{transform:translate(calc(-50% + 22vw),-50%) scale(.76)}
}
@media (max-width: 720px){
  .demo-rotator-wrap{height:auto}
  .demo-rotator-sticky{position:static;height:auto;display:grid;gap:14px}
  .demo-rotator{display:grid;gap:14px;height:auto}
  .demo-card,.demo-card.is-active,.demo-card.is-left,.demo-card.is-right{position:relative;top:auto;left:auto;transform:none;width:100%;opacity:1;filter:none;pointer-events:auto}
}

.demo-card.is-active .media{box-shadow:0 26px 64px rgba(0,0,0,.36),0 0 0 1px rgba(255,255,255,.16) inset}
.demo-rotator.is-switching .demo-card{filter:saturate(.68) brightness(.54) blur(1.1px)}
.demo-rotator.is-switching .demo-card.is-active{filter:saturate(1.02) brightness(1.02) blur(.2px)}

.carousel-container {
  position: relative;
  max-width: 1000px;
  /* margin: 30px auto;*/
  margin: 0 auto;
  padding: 12px 0 42px 0; /* 底部留空给indicators */
  overflow: hidden;
}

.carousel-window {
  width: 100%;
  position: relative;
  /* 边缘渐变遮罩 */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: 100%;
  padding: 10px 0; 
}

.carousel-card {
  flex: 0 0 60%;
  max-width: 60%;
  /* 默认开启动画 */
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
  opacity: 0.4;
  transform: scale(0.9);
  filter: blur(1px);
  
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* --- 关键：禁止动画的辅助类 --- */
/* 当 JS 给元素加上这个类时，任何变化都是瞬间完成的 */
.no-transition, 
.no-transition * {
  transition: none !important;
  animation: none !important;
}

/* 激活状态 */
.carousel-card.is-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  z-index: 10;
}

.video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  border: 1px solid #ddd;
  transform: translateZ(0);
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* .carousel-card .caption {
  margin-top: 15px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.carousel-card.is-active .caption {
  opacity: 1;
} */

.carousel-caption {
  margin-top: 15px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.carousel-card.is-active .carousel-caption {
  opacity: 1;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  border: none;
  transition: all 0.2s;
}
.nav-btn:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

/* Carousel Indicators */
.carousel-indicators{
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.indicator{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(150, 150, 150, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}
.indicator:hover{
  background: rgba(100, 100, 100, 0.6);
  transform: scale(1.2);
}
.indicator.active{
  width: 28px;
  border-radius: 5px;
  background: #1e3a8a;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.4);
}



:root {
  /* ... 原有变量 ... */
  --gap-section: 16px;    /* 大章节 (Section) 之间的距离 */
  --gap-sub: 20px;        /* 小标题 (h3/Subsection) 之间的距离 */
  --gap-element: 12px;    /* 标题与下方内容 (文字/图片/视频) 之间的距离 */
}

/* 1. 统一 Section 间距与视觉分隔 */
section {
  margin-bottom: 0;
  padding: 24px 0;
  position: relative;
}

/* 相邻 section 之间添加小间距 */
section + section {
  margin-top: 16px;
}

/* 给偶数 section 添加轻微背景色 */
section:nth-of-type(even) {
  background: linear-gradient(to bottom, rgba(249, 250, 251, 0.5), rgba(255, 255, 255, 0.2));
  margin-left: -18px;
  margin-right: -18px;
  padding-left: 18px;
  padding-right: 18px;
  border-radius: 8px;
}

/* 2. 统一 h2 (Section 标题) 样式 - 增强视觉层级 */
h2 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-top: 0; 
  margin-bottom: var(--gap-element);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--rule);
  display: inline-block;
  position: relative;
}

/* 给标题添加装饰性元素 */
h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: rgba(26, 115, 232, 0.8);
}

/* 3. 统一 h3 (Subsection 标题) 样式 - 增强子部分辨识度 */
h3 {
  font-size: 20px;
  font-weight: 800;
  margin-top: var(--gap-sub);
  margin-bottom: var(--gap-element);
  padding-left: 12px;
  border-left: 4px solid rgba(26, 115, 232, 0.6);
  color: rgba(0, 0, 0, 0.88);
}

/* 4. 统一分割线 (hr) 的间距 */
/* 建议将 hr 放在 section 之间，或者直接移除 hr 依靠 section 的 margin-bottom */
/* hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: var(--gap-section) 0;
} */

#overview{
  padding-top: 28px;   /* 从 hero 到第一个 section 的间距 */
}

/* 确保第一个 section 不被偶数背景色影响 */
section:first-of-type {
  background: transparent !important;
}




/* =========================
   Responsive foundation
   ========================= */

/* 让媒体元素天然不溢出 */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* 避免长单词/链接把布局撑爆 */
h1, h2, h3, p, li, .caption, .small {
  overflow-wrap: anywhere;
}

/* 更稳的容器内边距（桌面->手机渐进） */
.container {
  width: min(100%, var(--maxw));
  padding-left: clamp(12px, 3.5vw, 18px);
  padding-right: clamp(12px, 3.5vw, 18px);
}

/* =========================
   Tablet (<= 1024px)
   ========================= */
@media (max-width: 1024px) {
  :root { --maxw: 980px; }

  .hero-title { font-size: clamp(30px, 5.2vw, 44px); }
  .hero-subtitle { font-size: 16px; }
  .hero-meta { font-size: 16px; }
  .hero-authors { gap: 7px 14px; }
  .hero-affiliations { font-size: 14px; }
  .affiliation-row { gap: 5px 16px; }

  .grid3 { grid-template-columns: 1fr 1fr; }
  .results-grid { grid-template-columns: 1fr; } /* 结果图在平板改单列更清晰 */
}

/* =========================
   Mobile (<= 768px)
   ========================= */
@media (max-width: 768px) {
  /* 顶栏改为可横向滑动，避免挤成两行导致高度混乱 */
  .topbar .row {
    gap: 12px;
    padding: 10px 0;
  }
  .brand {
    font-size: 16px;
    white-space: nowrap;
    flex: 0 0 auto;
    padding: 4px 10px;
  }
  .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    white-space: nowrap;
    font-size: 13px;
    padding: 6px 12px;
  }
  .nav a.active::after {
    bottom: 3px;
    left: 12px;
    right: 12px;
  }

  /* Hero 区 */
  .hero-video {
    min-height: 520px;
    height: 88vh;
  }
  .hero-overlay-inner {
    transform: translateY(0);   /* 手机上取消上移，防止信息被裁切 */
    padding: 0 12px;
  }
  .hero-links {
    margin-top: 8px;
    gap: 8px;
  }
  .hero-links .btn {
    padding: 6px 9px;
    font-size: 12px;
  }
  .hero-title {
    font-size: clamp(24px, 7.2vw, 34px);
    line-height: 1.12;
  }
  .hero-subtitle {
    font-size: 14px;
    margin-top: 8px;
    max-width: 100%;
  }
  .hero-meta {
    margin-top: 12px;
    font-size: 14px;
  }
  .hero-authors{
    gap: 6px 12px;
    font-size: 14px;
  }
  .hero-affiliations {
    margin-top: 12px;
    font-size: 13px;
    gap: 5px;
  }
  .affiliation-row{
    gap: 5px 14px;
  }
  .affil-item sup{
    padding: 1px 3px;
    margin-right: 3px;
  }
  .hero-notes-row{
    font-size: 12px;
    gap: 3px 12px;
  }
  .scrollhint { display: none; } /* 手机上容易遮挡内容 */

  /* 标题层级间距统一一点 */
  h2 { 
    font-size: 24px; 
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 6px;
  }
  h2::after {
    width: 40px;
  }
  
  h3 { 
    font-size: 17px; 
    margin-top: 16px;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left-width: 3px;
  }
  
  section {
    padding: 16px 0;
  }
  
  section + section {
    margin-top: 12px;
  }
  
  section:nth-of-type(even) {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
  
  hr {
    margin: 16px 0;
  }
  
  hr::after {
    font-size: 8px;
    padding: 0 8px;
  }
  p, li { font-size: 14px; }

  /* 全部双/三列在手机改单列 */
  .grid2, .grid3, .results-grid, .ablation-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* 卡片/工具栏更紧凑 */
  .card { padding: 12px; }
  .toolbar {
    gap: 8px;
    margin: 8px 0;
  }
  .legend { gap: 8px; }

  /* Contributions cards on mobile */
  .contrib-card {
    padding: 14px 16px;
    gap: 12px;
  }
  .contrib-number {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    font-size: 15px;
  }
  .contrib-content {
    font-size: 14px;
  }

  /* 轮播卡片在手机放宽，按钮缩小 */
  .carousel-container {
    margin: 8px auto;
    padding: 8px 0 36px 0; /* 底部留空给indicators */
  }
  .carousel-indicators {
    bottom: 6px;
  }
  .carousel-track { gap: 12px; }
  .carousel-card {
    flex: 0 0 86%;
    max-width: 86%;
  }
  .nav-btn {
    width: 38px;
    height: 38px;
  }
  .prev-btn { left: 6px; }
  .next-btn { right: 6px; }

  /* 图表高度减少，避免首屏过长 */
  canvas.chart { height: 280px !important; }

  /* BibTeX 代码块可横向滚动（你本来有 overflow:auto，这里补充触摸体验） */
  .code {
    font-size: 12px;
    -webkit-overflow-scrolling: touch;
  }
}

/* =========================
   Small phones (<= 420px)
   ========================= */
@media (max-width: 420px) {
  .hero-video {
    min-height: 500px;
    height: 84vh;
  }
  .hero-title { font-size: 22px; }
  .hero-subtitle { font-size: 13px; }
  .hero-meta { font-size: 13px; }
  .hero-authors { gap: 5px 10px; font-size: 13px; }
  .hero-affiliations { font-size: 12px; }
  .affiliation-row { gap: 4px 10px; }
  .hero-notes-row { font-size: 11px; gap: 3px 10px; }

  .btn { font-size: 12px; padding: 6px 8px; }
  .caption { font-size: 12px; }
  canvas.chart { height: 250px !important; }
  
  section {
    padding: 14px 0;
  }
  section + section {
    margin-top: 10px;
  }
  hr {
    margin: 16px 0;
  }
}


/* 基础设置 */
.carousel-container {
  position: relative;
  max-width: 1000px;
  margin: 20px auto;
  overflow: hidden; /* 隐藏溢出 */
  user-select: none;
  -webkit-user-select: none;
}

.carousel-window {
  width: 100%;
  position: relative;
  /* 边缘虚化 */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.carousel-track {
  display: flex;
  gap: 15px; /* 固定间距 15px */
  width: 100%;
  padding: 10px 0;
  cursor: grab;
  will-change: transform;
}
.carousel-track:active { cursor: grabbing; }

/* --- 卡片核心样式 --- */
.carousel-card {
  /* 电脑端默认：60% */
  flex: 0 0 60%;
  width: 60%;
  
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.3;
  transform: scale(0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* 手机端适配：75% (留出一点边给按钮) */
@media (max-width: 768px) {
  .carousel-card {
    flex: 0 0 75%;
    width: 75%;
  }
}

/* 激活状态 */
.carousel-card.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 10;
}

/* 禁止动画类 (用于瞬移) */
.no-transition, .no-transition * {
  transition: none !important;
}

/* --- 视频区域 --- */
.video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  transform: translateZ(0);
  
  /* 核心：彻底禁止视频层响应鼠标，让点击穿透到底下的图层 */
  pointer-events: none; 
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 
.caption {
  margin-top: 12px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
} */
/* .carousel-card.is-active .caption { opacity: 1; } */

/* --- 按钮样式 (核弹级层级) --- */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 9999; /* 保证最顶层 */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  border: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto; /* 恢复按钮的点击 */
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* 手机上稍微把按钮往里收一点，防误触边缘 */
@media (max-width: 768px) {
  .prev-btn { left: 5px; }
  .next-btn { right: 5px; }
}

/* 添加这段精简的移动端适配 */
@media (max-width: 768px) {
  .carousel-container {
    padding-bottom: 40px; /* 给下方的按钮留点空间 */
  }
  
  /* 让按钮在手机上稍微大一点，好点按 */
  .nav-btn {
    width: 44px;
    height: 44px;
  }
  
  /* 确保视频圆角和阴影正常 */
  .video-wrapper {
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  }
}


main .caption { opacity: 1 !important; }

@media (max-width: 768px) {
  .hero-overlay .hero-links {
    margin-top: 10px;      /* 可选：按钮离上方稍微留一点 */
    margin-bottom: 30px;   /* 关键：拉开和标题的距离，建议 18~28px */
  }

  .hero-overlay .hero-title {
    margin-top: 0;
  }
}

/* ===== WeChat Video Play Hint ===== */
.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 5;
  backdrop-filter: blur(2px);
}

.video-play-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.video-play-btn {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.video-play-overlay:hover .video-play-btn {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

.video-play-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 24px solid #1e3a8a;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 6px;
}

/* Hero video wrapper needs position relative */
.hero-video {
  position: relative;
}

/* Media wrappers need position relative for overlay */
.media {
  position: relative;
}

/* Smaller play button for smaller videos */
.media .video-play-btn {
  width: 60px;
  height: 60px;
}

.media .video-play-btn::after {
  border-left: 18px solid #1e3a8a;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 4px;
}

/* Even smaller for carousel */
.carousel-card .video-play-btn {
  width: 50px;
  height: 50px;
}

.carousel-card .video-play-btn::after {
  border-left: 15px solid #1e3a8a;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 3px;
}

/* ===== 修复视频封面黑边问题 ===== */
video {
  object-fit: cover;
  background-color: #000;
}

/* 确保视频填充满容器 */
.media video,
.video-wrapper video,
.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 小视频特殊处理 - 完整显示封面不裁剪 */
.media.media-small video.small-video {
  height: auto !important;
  object-fit: contain !important;
  background-color: transparent !important;
}
