:root {
  --bg: #f5f4f0;
  --paper: #ffffff;
  --paper-soft: #fbfaf7;
  --ink: #18212c;
  --muted: #536171;
  --line: #d8dee7;
  --line-strong: #c6d0db;
  --accent: #1d5f8c;
  --accent-soft: #eef4fa;
  --shadow: 0 12px 36px rgba(24, 33, 44, 0.06);
  --max-width: 1340px;
  --text-width: 1210px;
  --radius: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(29, 95, 140, 0.1), transparent 26rem),
    linear-gradient(180deg, #fbfaf7, #f4f2ed 68%);
  font-family: "Source Sans 3", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

.page-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 1.7rem;
  padding: 0.8rem 1.05rem;
  border: 1px solid rgba(216, 222, 231, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(24, 33, 44, 0.06);
}

.brand {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.98rem;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
  background: rgba(29, 95, 140, 0.08);
}

.site-nav a.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(29, 95, 140, 0.18);
}

.masthead {
  padding: 3.3rem 0 2.6rem;
  text-align: center;
}

.venue-line,
.eyebrow,
.result-label,
.detail-index {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.venue-line {
  margin: 0 0 1rem;
}

.paper-title-main,
h2,
h3 {
  color: var(--ink);
  font-family: "Crimson Text", serif;
}

.paper-title-main {
  max-width: 1160px;
  margin: 0 auto 3.2rem;
  font-size: clamp(2.4rem, 4.5vw, 4rem); 
  line-height: 1.02;
  font-weight: 600;
  text-align: center;
  text-wrap: balance;
}

.gradient-title {
  background: linear-gradient(135deg, #1d5f8c 0%, #b87333 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; 
}

.authors,
.affiliations {
  margin: 0 auto;
  max-width: 1200px;
  color: var(--muted);
}

.authors {
  font-size: 1.45rem; 
  font-weight: 600;
}

.authors a {
  color: var(--ink);
  text-decoration: none;
  transition: color 150ms ease, text-decoration 150ms ease;
}

.authors a:hover,
.authors a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.affiliations {
  margin-top: 0.35rem;
  font-size: 1.25rem; 
  font-weight: 600;
}

.authors sup,
.affiliations sup,
.author-note sup {
  font-size: 0.72em;
  vertical-align: super;
}

.author-note {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.action-row {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.65rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.08rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  border-color: #b6c7d8;
  box-shadow: 0 10px 22px rgba(24, 33, 44, 0.06);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.ghost {
  color: #8a96a3;
  cursor: default;
}

.section-card {
  margin: 0;
  padding: 3rem 0;
  border-top: 1px solid var(--line-strong);
  background: transparent;
  box-shadow: none;
}

main > .section-card:first-of-type {
  padding-top: 2.2rem;
  border-top: 0;
}

.section-header {
  max-width: var(--text-width);
  margin-bottom: 1.25rem;
}

.wider-copy {
  max-width: 1240px;
}

.section-header.centered {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.55rem;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
  font-weight: 600;
  text-wrap: balance;
}

h3 {
  margin: 0 0 0.3rem;
  font-size: 1.6rem;
  font-weight: 600;
}

p {
  margin: 0;
}

.section-lede {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.62;
  text-wrap: pretty;
}

.single-line-desktop {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
}

h2.single-line-desktop {
  font-size: clamp(1.9rem, 2.75vw, 2.72rem);
  letter-spacing: -0.01em;
}

.abstract-panel {
  max-width: var(--text-width);
  margin: 0 auto;
  padding: 0.2rem 0;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.72;
  text-align: justify;
  text-justify: inter-word;
}

.media-figure,
.feature-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.media-figure {
  padding: 0.95rem;
}

.wide-media {
  width: 100%;
}

.hero-media {
  margin-top: 0.2rem;
}

.feature-figure {
  margin-top: 1.25rem;
}

.analysis-figure img {
  padding: 0.35rem 0.45rem 0.15rem 0.8rem;
}

.media-figure img,
.feature-figure img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}

.animated-media {
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 900;
  object-fit: contain;
}

.media-figure figcaption,
.feature-figure figcaption {
  padding: 1rem 0.15rem 0.1rem;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.55;
}

.feature-figure figcaption {
  padding: 1rem;
}

.three-up,
.two-up,
.method-grid,
.results-grid,
.citation-layout,
.results-hero {
  display: grid;
  gap: 1.15rem;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.method-grid,
.results-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.25rem;
}

.results-hero {
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
}

.compact-figure {
  margin-top: 0;
  max-width: 620px;
}

.efficiency-panel {
  width: 100%;
  padding: 1.5rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.efficiency-title {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-family: "Crimson Text", serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.efficiency-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem 1rem;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.45;
}

.efficiency-grid p {
  margin: 0;
  white-space: nowrap;
  text-align: center;
}

.efficiency-grid p:nth-child(5n + 1) {
  text-align: left;
}

.efficiency-grid p:nth-child(-n + 5) {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* 6-Column Grid Approach for Perfect Alignment */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.15rem;
  margin-top: 1.25rem;
}

/* Top row cards span 2 columns each */
.spotlight-card:nth-child(1),
.spotlight-card:nth-child(2),
.spotlight-card:nth-child(3) {
  grid-column: span 2;
}

/* Bottom row cards span 2 columns and push in to center perfectly */
.spotlight-card:nth-child(4) {
  grid-column: 2 / span 2;
}
.spotlight-card:nth-child(5) {
  grid-column: 4 / span 2;
}

.spotlight-card {
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(29, 95, 140, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(238, 244, 250, 0.88), rgba(255, 255, 255, 0.78));
  box-shadow: 0 10px 24px rgba(29, 95, 140, 0.08);
}

.spotlight-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.34rem;
}

.spotlight-card .result-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-family: "Source Sans 3", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.spotlight-card p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.58;
}

.info-card,
.result-card {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.info-card p,
.result-card p,
.citation-copy p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.58;
}

.result-card h3 {
  margin-bottom: 0.35rem;
}

.quote-band {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(29, 95, 140, 0.12);
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--ink);
}

.citation-layout {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  align-items: start;
}

.copy-button {
  margin-top: 0.8rem;
}

.bibtex-block {
  margin: 0;
  padding: 1.05rem;
  overflow-x: auto;
  border-radius: 18px;
  background: #172130;
  color: #e8f2ff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
}

.site-footer {
  padding: 1rem 0 2rem;
  border-top: 1px solid rgba(198, 208, 219, 0.85);
  color: var(--muted);
  text-align: center;
}

.reveal {
  animation: rise-in 620ms ease both;
}

@keyframes rise-in {
  from {
    opacity: 0.82;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .three-up,
  .two-up,
  .method-grid,
  .results-grid,
  .citation-layout,
  .results-hero,
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  /* Force all cards to span the full width on smaller screens */
  .spotlight-grid .spotlight-card {
    grid-column: 1 / -1;
  }

  .single-line-desktop {
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 1rem), var(--max-width));
  }

  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 1rem;
    border-radius: 24px;
  }

  .masthead {
    padding-top: 2rem;
  }

  .section-card {
    padding: 2rem 0;
  }

  .paper-title-main {
    font-size: clamp(1.9rem, 8vw, 2.8rem);
  }

  h2 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .authors {
    font-size: 1.25rem;
  }

  .affiliations {
    font-size: 1.1rem; 
  }
}
