/* style.css — MergeMix-Webpage (clean, white + blue accent) */

:root{
  --accent: #0b63d6;
  --muted: #6b7280;
  --max-width: 1120px;
  --radius: 10px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  margin:0;
  color:#111827;
  background: #ffffff;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  padding:30px 20px;
  display:flex;
  justify-content:center;
}

.container{
  max-width:var(--max-width);
  width:100%;
}

/* Header */
.site-header{
  display:flex;
  flex-direction:column;
  gap:14px;
  text-align:center;
  margin-bottom:18px;
}
.site-title{
  font-size:2.2rem;
  margin:0;
  /* color:var(--accent); */
  color: #4A7C59; 
}
.subtitle{margin:6px 0 0; color:var(--muted)}

/* Meta */
.meta{display:flex;flex-direction:column;gap:8px;align-items:center}
.authors{font-weight:600}
.authors a {
  color: #79A685; 
  text-decoration: none;
}
.authors a:hover {
  color: #4A7C59;
  text-decoration: underline;
}
.affiliations{color:var(--muted); font-size:0.92rem}
.institution-logos {display: flex; justify-content: center; align-items: center; gap: 30px; margin: 15px 0; padding: 10px 0;}
.inst-logo {height: 60px; width: auto; object-fit: contain; max-width: 150px;}
.links{
  margin-top:8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn{
  display:inline-flex;
  padding:8px 12px;
  border-radius:12px;
  border:none;
  background:linear-gradient(135deg, #D9E6E0 0%, #79A685 50%);
  background-size: 200% 200%;
  color: white;
  text-decoration:none;
  font-weight:600;
  transition:all .3s ease;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #79A685 0%, #4A7C59 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
  background-position: 100% 0;
}

.btn:hover::before {
  opacity: 1;
}

.btn * {
  position: relative;
  z-index: 1;
}

/* 统一图标样式 */
.btn i,
.icon-svg {
  font-size: 1.em;
  width: 1.5em;
  height: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Sections */
.panel{margin:28px 0;padding:18px 12px;border-radius:12px}
.panel h2{margin:0 0 12px;padding-bottom:6px;border-bottom:1px solid #f1f5f9;color:#0f172a}


/* Teaser */
.teaser{display:flex;flex-direction:column;align-items:center;gap:10px}
.teaser img{width:100%;max-height:420px;object-fit:cover;border-radius:12px;box-shadow:0 6px 20px rgba(2,6,23,0.06)}
.fig-caption{color:var(--muted);font-size:0.95rem;text-align:center}

/* Overview grid */
.overview-grid{display:grid;grid-template-columns:1fr;gap:18px;align-items:center}
.overview-grid img{width:100%;border-radius:10px;}

/* Implementation accordion */
.implementation-step{
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(2,6,23,0.04);
  overflow: clip;
}
.implementation-step + .implementation-step{ margin-top: 12px; }
.implementation-step > summary{
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #ecfdf3 100%);
}
.implementation-step > summary::-webkit-details-marker{ display: none; }
.implementation-title{
  font-weight: 700;
  color: #0f172a;
  font-size: 1.15rem;
}
.implementation-step > summary::after{
  content: "▾";
  color: #4A7C59;
  font-size: 1.05rem;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform .2s ease;
}
.implementation-step[open] > summary::after{
  transform: rotate(0deg);
}
.implementation-step > summary:hover{
  filter: brightness(0.98);
}
.implementation-step > :not(summary){
  padding: 0 14px 14px;
  font-size: 1.05rem;
  line-height: 1.7;
}
.implementation-step > :not(summary):first-of-type{
  padding-top: 12px;
}

/* Results grid */
.results-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.results-grid img.card{width:100%;height:220px;object-fit:cover;border-radius:10px;transition:transform .18s ease, box-shadow .18s ease}
.results-grid img.card:hover{transform:translateY(-6px);box-shadow:0 14px 30px rgba(2,6,23,0.08)}

/* calibration-grid */
.grid{display:grid;grid-template-columns:1fr;gap:12px}
.grid img{width:80%;height:auto;object-fit:cover;border-radius:8px;margin:0 auto;display:block}

/* BibTeX */
.bibtex{background:#fbfdff;border:1px solid #eef6ff;padding:12px;border-radius:8px;font-family:monospace;white-space:pre-wrap; font-size: 1.rem;}

.bibtex-container {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #79A685;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.copy-btn:hover {
  background-color: #4A7C59;
}

.copy-btn:active {
  background-color: #4A7C59;
}

/* Method Buttons */
.method-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.method-buttons .btn {
  margin: 0;
  min-width: 200px;
  text-align: center;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
}

/* Footer */
.site-footer{margin:36px 0 18px;text-align:center;color:var(--muted);font-size:0.9rem}

/* Responsive */
@media(max-width:820px){
  .overview-grid{grid-template-columns:1fr;gap:12px}
  .results-grid{grid-template-columns:1fr;gap:12px}
}

/* Light animations (fade-up) */
.fade-up{opacity:0; transform:translateY(12px); transition:opacity .6s ease, transform .6s ease}
.fade-up.visible{opacity:1; transform:none}


/* --- Single-image Carousel --- */
.results-carousel {
  position: relative;
  width: 95%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
  width: 100%;
}

.slide {
  min-width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: #fff;
  height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  display: none; /* 默认隐藏所有幻灯片 */
}

.slide.active {
  display: flex; /* 只显示激活的幻灯片 */
}

.slide img {
  width: auto;
  height: 85%;
  border-radius: 16px;
  transition: transform 0.4s ease;
}

.slide img:hover {
  transform: scale(1.02);
}


.slide-w {
  min-width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: #fff;
  height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  display: none; /* 默认隐藏所有幻灯片 */
}

.slide-w.active {
  display: flex; /* 只显示激活的幻灯片 */
}

.slide-w img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  transition: transform 0.4s ease;
}

.slide-w img:hover {
  transform: scale(1.02);
}


.slide-h {
  min-width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: #fff;
  /* height: 100%; */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  display: none; /* 默认隐藏所有幻灯片 */
}

.slide-h.active {
  display: flex; /* 只显示激活的幻灯片 */
}

.slide-h img {
  width: 80%;
  height: auto;
  border-radius: 16px;
  transition: transform 0.4s ease;
}

.slide-h img:hover {
  transform: scale(1.02);
}


.caption {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #555;
}

/* --- Buttons --- */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgb(151, 165, 156, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background: rgb(113, 122, 116);
}

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

/* Responsive */
@media (max-width: 768px) {
  .results-carousel {
    width: 95%;
  }
  
  .slide {
    height: 350px; /* 在小屏幕上减小高度 */
  }
}

/* Mathematical formulas styling */
.formula {
  text-align: center;
  margin: 6px 0;
  padding: 3px;
  background: linear-gradient(135deg, #f8fafc 0%, #d7f9e0 100%);
  border-radius: 5px;
  border-left: 5px solid #4A7C59;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.formula .MathJax {
  font-size: 1.1em !important;
}

/* Ensure MathJax renders properly */
.MathJax_Display {
  text-align: center !important;
  margin: 1em 0 !important;
}

/* Inline math styling */
.MathJax {
  display: inline-block !important;
}