/* ======================
   GLOBAL RESET
====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ======================
   BODY & LAYOUT
====================== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f8faff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.links_footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ======================
   HEADER
====================== */
header {
  background: linear-gradient(135deg, #232d5d 0%, #4b9eff 100%);
  color: white;
  padding: 80px 0 60px;
  text-align: center;
}

h1 {
  font-size: 2.8em;
  margin-bottom: 20px;
  font-weight: 700;
}

.venue {
  font-size: 1.3em;
  margin-bottom: 30px;
  color: #e8f0ff;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  opacity: 0.95;
}

.authors {
  margin-bottom: 15px;
  line-height: 1.8;
  color: #f0f5ff;
}

.authors a {
  font-size: 1.2em;
  text-decoration: none;
  font-weight: 400;
  color: #f0f5ff;
}

.affiliations {
  font-size: 1.1em;
  opacity: 0.9;
  margin-bottom: 30px;
  color: #dce7ff;
  text-decoration: none;
}

/* ======================
   LINKS
====================== */
.links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: white;
  color: #232d5d;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s;
  border: 1px solid #0866ff;
  font-weight: 500;
}

.link-button:hover {
  background: linear-gradient(135deg, #0866ff 0%, #4b9eff 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(8, 102, 255, 0.3);
}

/* ======================
   MAIN LAYOUT
====================== */
main {
  background: white;
  margin: -30px auto 40px;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

section {
  padding: 60px 80px;
  border-bottom: 1px solid #e3edff;
}

section:last-child {
  border-bottom: none;
}

h2 {
  font-size: 2em;
  margin-bottom: 30px;
  color: #232d5d;
  text-align: center;
  font-weight: 600;
}

h3 {
  font-size: 1.4em;
  margin: 30px 0 15px;
  color: #232d5d;
}

/* ======================
   ABSTRACT
====================== */
.abstract {
  background: linear-gradient(135deg, #f2f7ff 0%, #e6f0ff 100%);
}

.abstract p {
  font-size: 1.1em;
  text-align: justify;
  line-height: 1.8;
  color: #333;
}

/* ======================
   FIGURES
====================== */
.figure {
  margin: 40px 0;
  text-align: center;
}

.figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.figure-caption {
  margin-top: 15px;
  font-size: 0.95em;
  color: #5679b5;
  font-style: italic;
}

.figure-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: start;
}

/* 🔥 SAME-HEIGHT FIGURE FIX (minimal change) */
.figure-row .figure img {
  height: 320px;
  width: auto;
  object-fit: contain;
}

/* ======================
   METHOD GRID
====================== */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.method-card {
  background: #f8fbff;
  padding: 25px;
  border-radius: 12px;
  border-left: 4px solid #232d5d;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.method-card h4 {
  color: #232d5d;
  margin-bottom: 10px;
  font-size: 1.2em;
}

/* ======================
   RESULTS GRID
====================== */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.result-card {
  background: linear-gradient(135deg, #232d5d 0%, #4b9eff 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.result-card .metric {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 10px;
}

.result-card .label {
  font-size: 1em;
  opacity: 0.9;
}

/* ======================
   CITATION BOX
====================== */
.citation-box {
  background: #f8fbff;
  border-left: 4px solid #232d5d;
  padding: 20px;
  margin: 30px 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  overflow-x: auto;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* ======================
   RESPONSIVE
====================== */
@media (max-width: 768px) {
  h1 { font-size: 2em; }
  section { padding: 40px 30px; }
  .links { flex-direction: column; align-items: center; }
  .method-grid, .results-grid { grid-template-columns: 1fr; }
  .abstract p { text-align: initial; }
}

/* ======================
   Placeholder
====================== */
.placeholder-image {
  background: linear-gradient(135deg, #e6f0ff 0%, #f4f8ff 100%);
  border: 2px dashed #a7c6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  border-radius: 10px;
  color: #4b78d0;
  font-size: 1.2em;
}


/* ======================
   INTERPRETABILITY COMPARISON SECTION
====================== */

/* General paragraph styling for sections with interpretability focus */
.interpretability-text {
    font-size: 1.05em;
    line-height: 1.7;
    text-align: justify;
    margin-top: 25px;
    color: #333;
}

/* Ensures figures in this section match your site-wide visuals */
.interpretability-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.interpretability-figure .figure-caption {
    margin-top: 15px;
    font-size: 0.95em;
    color: #5679b5;
    font-style: italic;
    text-align: center;
}


/* ======================
   ★ NEW ADDITIONS: TWO-COLUMN + ANIMATION
====================== */

/* Two-column layout for figure + animation */
.two-column {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Crossfade animation */
.crossfade {
  position: relative;
  width: 100%;
  max-width: 550px;
}

/* → First image stays normal, defines height */
.crossfade .img-a {
  width: 100%;
  height: auto;
  display: block;
}

/* → Second image is animated over the first */
.crossfade .img-b {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  height: auto;
  animation: fadeCycle 3s infinite;
  animation-delay: 1.5s;
}


@keyframes fadeCycle {
  0%   { opacity: 0; }
  50%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Mobile stacking */
@media (max-width: 768px) {
  .two-column {
    flex-direction: column;
  }
}

/* Fix figure alignment inside two-column layouts */
.two-column .figure {
    margin: 0;              /* remove top/bottom margin */
    flex: 1;                /* make both columns equal width */
    text-align: center;
}

.two-column .crossfade img {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Fix alignment: ensure both images stay in the same row */
.two-column .figure {
    margin: 0;
    flex: 1;
}

/* Clean spacing */
.two-column {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Crossfade fix — keep the first image static to define height */
.crossfade {
    position: relative;
    width: 100%;
}

.crossfade .img-a {
    width: 100%;
    display: block;
}

.crossfade .img-b {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    animation: fadeCycle 10s infinite;
    animation-delay: 5s;
}

/* Ensure both columns in two-column layout have equal-height images */
.two-column .figure img,
.two-column .crossfade .img-a,
.two-column .crossfade .img-b {
    height: 320px;        /* match your previous figure-row height */
    width: 100%;
    object-fit: contain;
}

/* ======================
   SMALLER FIGURES FOR EFFICIENCY SECTION
====================== */

.efficiency-section .figure img {
    max-width: 65%;       /* shrink horizontally */
    height: auto;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .efficiency-section .figure img {
        max-width: 90%;   /* still readable on mobile */
    }
}


/* =============================================
   LIMITATIONS SECTION — BUTTONS ABOVE FIGURE
   ============================================= */

.limitations-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* BUTTON ROW */
.top-buttons {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 10px;
}

.limit-btn {
    padding: 12px 26px;
    min-width: 180px;
    border-radius: 12px;
    border: 2px solid #0866ff;
    background: white;
    color: #0866ff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
    box-shadow: 0 2px 6px rgba(8,102,255,0.1);
}

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

.limit-btn.active {
    background: #0866ff;
    color: white;
    box-shadow: 0 4px 12px rgba(8,102,255,0.25);
}

/* =============================================
   FIGURE WRAPPER — AUTO HEIGHT, NO CLIPPING
   ============================================= */

.limitations-figure-wrapper {
    width: 100%;
    border: 1px solid #e3edff;
    border-radius: 14px;
    padding: 25px;
    background: #fafcff;

    /* allow full expansion */
    overflow: visible;
}

/* FIGURE SETS */
.limitations-figure-set {
    display: none;
    width: 100%;
    padding: 15px 100px;
}

.limitations-figure-set.active-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;      /* ← reduced spacing */
}

/* Interpretability = 1-column layout */
#limit-interpretability.active-set {
    grid-template-columns: 1fr;
}

/* SUBFIGURES */
.subfig {
    text-align: center;
}

.limitations-figure {
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* CAPTIONS */
.subcaption {
    margin-top: 8px;
    font-size: 0.92em;
    color: #445f8a;
    font-style: italic;
    line-height: 1.45;
}

.figure-caption {
    grid-column: 1 / -1;
    margin-top: 10px;
    text-align: center;
    font-size: 0.95em;
    color: #5679b5;
    font-style: italic;
    line-height: 1.6;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .top-buttons {
        flex-wrap: wrap;
    }

    .limitations-figure-set.active-set {
        grid-template-columns: 1fr;
    }
}

/* Slide fade animation on switching */
.limitations-figure-set {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.limitations-figure-set.active-set {
    opacity: 1;
    transform: translateX(0);
}

#bibtex-notification {
    position: absolute;
    background: white;
    color: #232d5d;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    font-size: 0.85em;
    opacity: 0;
    transform: translate(-50%, -10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    z-index: 999;
}
#bibtex-notification.show {
    opacity: 1;
    transform: translate(-50%, -18px);
}

/* Initial hidden state */
.pillar-anim {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When activated */
.pillar-anim.visible {
    opacity: 1;
    transform: translateY(0);
}

