/* =========================================================
   Project page — minimal academic template
   Edit the variables below to restyle the whole page.
   ========================================================= */

:root {
  --maxw: 900px;
  --ink: #1a1a1a;
  --muted: #666;
  --line: #e2e2e2;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --accent: #1f4fd8;          /* link / highlight color */
  --accent-soft: #eef2ff;     /* highlighted table rows */
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */

.hero {
  padding: 56px 0 32px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.venue {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The header spans wider than the article column so the title fits one line. */
.hero .wrap { max-width: 1240px; }

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(22px, 2.45vw, 31px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.authors {
  margin: 0 0 8px;
  font-size: 18px;
}
.authors a { white-space: nowrap; }
/* Keep each superscript tight to its name; space goes after it instead. */
.authors sup { margin-right: 16px; }
.authors sup:last-of-type { margin-right: 0; }

.affil {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--muted);
}

.note {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Link buttons ---------- */

.links {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}
.btn:hover { background: var(--accent); text-decoration: none; }

/* ---------- Sections ---------- */

main { padding-bottom: 40px; }

section { margin: 52px 0; }

h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

h3 {
  margin: 32px 0 10px;
  font-size: 19px;
  font-weight: 600;
}

p { margin: 0 0 16px; }

/* ---------- Figures ---------- */

figure { margin: 0 0 26px; }

figure img,
figure video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

figcaption {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

.teaser { margin: 40px 0 8px; }

/* Narrow figure — for square plots that shouldn't span the full column. */
figure.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }

/* Placeholder box — delete these rules once every figure is a real image. */
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  width: 100%;
  border: 2px dashed #c9c9c9;
  border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, #fbfbfb, #fbfbfb 10px, #f4f4f4 10px, #f4f4f4 20px);
  color: #8a8a8a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}
.placeholder span {
  max-width: 60ch;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

/* ---------- Grids ---------- */

.grid-2, .grid-3, .grid-4, .grid-5 {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); gap: 10px; }
.grid-2 figcaption, .grid-3 figcaption,
.grid-4 figcaption, .grid-5 figcaption {
  text-align: center;
  font-size: 13.5px;
}
.grid-5 .placeholder { font-size: 11px; padding: 10px; }

/* ---------- Scene tabs ---------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tab {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.scene { display: none; }
.scene.is-active { display: block; }

/* ---------- Video ---------- */

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Table ---------- */

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th, td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th:first-child, td:first-child { text-align: left; }
thead th {
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
thead tr:last-child th { border-bottom: 2px solid var(--ink); }
thead th[rowspan] { vertical-align: bottom; }
thead th[colspan] { text-align: center; }
tr.hl { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: 2px solid var(--ink); }

/* ---------- Lists / code ---------- */

.downloads { margin: 0; padding-left: 20px; }
.downloads li { margin-bottom: 8px; }

pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
code { font-family: var(--mono); font-size: 14px; }

/* ---------- Footer ---------- */

footer {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
footer p { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: 36px 0 26px; }
  .authors { font-size: 16px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 460px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Carousel ----------
   Horizontal scroll-snap track; the buttons page it by one view.
   Change the divisor in .car-item flex-basis to show more or fewer at a time. */

.carousel { position: relative; }

.car-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.car-item {
  flex: 0 0 calc((100% - 30px) / 4);   /* 4 visible, 3 gaps of 10px */
  margin: 0;
  scroll-snap-align: start;
}

.car-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

.car-btn {
  position: absolute;
  top: calc(50% - 3px);
  transform: translateY(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
}
.car-btn:hover { border-color: var(--accent); color: var(--accent); }
.car-prev { left: -15px; }
.car-next { right: -15px; }

@media (max-width: 760px) {
  .car-item { flex: 0 0 calc((100% - 10px) / 2); }
  .car-prev { left: 2px; }
  .car-next { right: 2px; }
}

@media (max-width: 460px) {
  .car-item { flex: 0 0 100%; }
}

/* A .btn that isn't a link yet (e.g. "coming soon"). */
.btn.is-soon {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: default;
}
