:root {
  --bg: #eaf3ff;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #5d687a;
  --line: #dfe5ee;
  --blue: #2258a7;
  --blue-dark: #173d76;
  --red: #b3393b;
  --green: #176b5c;
  --shadow: 0 24px 70px rgba(31, 45, 70, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 8%, rgba(38, 101, 190, 0.3), transparent 28rem),
    radial-gradient(circle at 82% 16%, rgba(66, 143, 214, 0.22), transparent 26rem),
    linear-gradient(135deg, #f8fbff 0%, #d9e9fb 45%, #edf6ff 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(223, 229, 238, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.logo-strip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.logo-badge-tju img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.logo-badge-sutd {
  width: 88px;
  padding: 7px;
}

.logo-badge-sutd img {
  width: 74px;
  height: 30px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-links a {
  padding: 9px 11px;
  border-radius: 8px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: #eef3fb;
  color: var(--blue-dark);
  outline: none;
}

.nav-links .lab-link {
  color: var(--blue-dark);
}

main {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: auto;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 76px 0 22px;
  text-align: center;
}

.hero > * {
  min-width: 0;
}

.hero-symbol {
  width: 72px;
  height: auto;
  margin: 0;
  filter: drop-shadow(0 14px 24px rgba(23, 61, 118, 0.16));
}

.venue {
  margin: 22px 0 0;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid rgba(34, 88, 167, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  width: 100%;
  max-width: 980px;
  margin: 0;
  color: var(--ink);
  font-size: 56px;
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  white-space: nowrap;
}

.title-emphasis {
  display: block;
  color: var(--blue-dark);
  font-size: 56px;
  font-style: italic;
  font-weight: 900;
  text-wrap: balance;
}

h1 span {
  display: block;
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
  margin-top: 10px;
  color: #26364f;
  font-size: 34px;
  line-height: 1.14;
  font-weight: 760;
}

.authors {
  width: 100%;
  max-width: 960px;
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 7px;
  color: var(--blue-dark);
  font-size: 24px;
  font-weight: 760;
}

.authors a {
  border-bottom: 1px solid rgba(34, 88, 167, 0.24);
}

.authors a:hover,
.authors a:focus-visible {
  color: var(--red);
  outline: none;
}

.separator {
  color: var(--muted);
}

sup {
  font-size: 0.58em;
  line-height: 0;
}

.affiliations {
  width: 100%;
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--blue-dark);
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
}

.button-icon {
  flex: 0 0 auto;
}

.arxiv-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.github-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.button.primary {
  background: var(--blue-dark);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(23, 61, 118, 0.22);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue-dark);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.figure-section,
.contributions {
  padding: 64px 0;
}

.figure-section {
  padding-top: 44px;
}

.section-heading {
  margin-bottom: 22px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: 0;
}

.paper-figure {
  width: min(100%, 1030px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 32px 90px rgba(18, 48, 92, 0.22), 0 8px 22px rgba(18, 48, 92, 0.1);
}

.paper-figure img {
  width: 100%;
  background: #ffffff;
}

.paper-figure figcaption {
  padding: 14px 18px 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
  text-align: center;
}

.metric-explainer {
  width: min(100%, 1030px);
  margin: 34px auto 0;
  padding: 18px 0 10px;
}

.metric-explainer h2 {
  margin: 0;
  color: #242f68;
  font-size: 44px;
  line-height: 1.08;
  font-weight: 900;
  text-align: left;
}

.metric-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding-left: 24px;
}

.metric-list li {
  padding-left: 4px;
  color: #2f3b4f;
  font-size: 19px;
  line-height: 1.68;
}

.metric-list li::marker {
  color: #242f68;
}

.metric-list strong {
  color: #202844;
  font-weight: 900;
}

.metric-summary {
  margin: 20px 0 0;
  color: #2f3b4f;
  font-size: 18px;
  line-height: 1.7;
}

.diversity-need {
  margin-top: 48px;
}

.compute-diversity {
  margin-top: 48px;
}

.mechanism-analysis {
  margin-top: 54px;
}

.mechanism-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.mechanism-figure {
  display: grid;
  place-items: center;
  min-height: 360px;
  margin: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 20px 50px rgba(18, 48, 92, 0.13), 0 7px 18px rgba(18, 48, 92, 0.08);
}

.mechanism-figure img {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
}

.mechanism-summary {
  margin-top: 22px;
}

.mechanism-summary a {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.external-link-marker {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.62em;
  font-weight: 900;
  line-height: 0;
  transform: translateY(-0.32em);
}

.formula-stack {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.formula-card {
  padding: 16px 18px;
  border: 1px solid rgba(36, 47, 104, 0.16);
  border-left: 5px solid #242f68;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 28px rgba(31, 45, 70, 0.07);
}

.formula-label {
  margin: 0 0 8px;
  color: #202844;
  font-size: 16px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.formula {
  margin: 0;
  overflow-x: auto;
  color: var(--blue-dark);
  font-size: 22px;
  line-height: 1.35;
  white-space: nowrap;
}

.formula mjx-container {
  margin: 0 !important;
  min-width: max-content;
}

.formula mjx-container[jax="SVG"] > svg {
  height: auto;
}

.formula-note {
  margin: 16px 0 0;
  color: #4b5870;
  font-size: 16px;
  line-height: 1.65;
}

.citation-section {
  margin-top: 56px;
}

.citation-card {
  margin-top: 18px;
  padding: 18px 20px;
  overflow-x: auto;
  border: 1px solid rgba(36, 47, 104, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(31, 45, 70, 0.07);
}

.bibtex {
  margin: 0;
  color: #202844;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bibtex code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.takeaway {
  max-width: 1100px;
  width: 100%;
  margin: 26px auto 0;
  padding: 0 clamp(28px, 6vw, 84px);
  color: var(--blue-dark);
  font-size: clamp(8px, 2.1vw, 25px);
  line-height: 1.18;
  font-weight: 700;
  text-align: left;
}

.takeaway p {
  margin: 0;
}

.takeaway .question-line {
  white-space: nowrap;
}

.takeaway .question-text {
  font-style: italic;
  font-weight: 500;
}

.takeaway .answer-line {
  margin-top: 7px;
  font-size: 1em;
  font-weight: 700;
  text-align: left;
}

.takeaway strong {
  font-weight: 900;
}

.takeaway .answer-line strong {
  display: inline-block;
  font-size: 1.24em;
  font-style: italic;
  line-height: 1;
}

.takeaway .answer-note {
  font-style: italic;
  font-weight: 400;
}

.contribution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.contribution-card {
  min-height: 255px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 45px rgba(31, 45, 70, 0.08);
}

.number {
  color: var(--red);
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
}

.contribution-card p {
  margin: 0;
  color: #2f3b4f;
  font-size: 17px;
}

.site-footer {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 54px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 820px) {
  .nav-shell {
    min-height: 96px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
  }

  .brand {
    justify-content: space-between;
  }

  .brand-title {
    white-space: normal;
  }

  .nav-links {
    justify-content: space-between;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-links a {
    padding: 8px 9px;
  }

  .hero {
    min-height: auto;
    padding: 44px 0 18px;
  }

  .hero-symbol {
    width: 58px;
  }

  h1 {
    font-size: 56px;
  }

  .title-emphasis {
    font-size: 39px;
  }

  h1 span {
    font-size: 23px;
  }

  .authors {
    font-size: 20px;
  }

  .affiliations {
    font-size: 16px;
  }

  .venue {
    margin-top: 18px;
  }

  .actions {
    margin-top: 18px;
  }

  h2 {
    font-size: 36px;
  }

  .metric-explainer h2 {
    font-size: 34px;
  }

  .metric-list li,
  .metric-summary,
  .formula-note {
    font-size: 16px;
  }

  .formula {
    font-size: 20px;
  }

  .mechanism-figures {
    grid-template-columns: 1fr;
  }

  .mechanism-figure {
    min-height: 300px;
  }

  .takeaway {
    font-size: clamp(8px, 2vw, 17px);
    padding-inline: clamp(20px, 5vw, 48px);
  }

  .contribution-grid {
    grid-template-columns: 1fr;
  }

  .contribution-card {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  main,
  .nav-shell,
  .site-footer {
    width: min(100% - 24px, 1100px);
  }

  .brand {
    align-items: flex-start;
    gap: 10px;
  }

  .logo-badge {
    width: 36px;
    height: 36px;
  }

  .logo-badge-tju img {
    width: 29px;
    height: 29px;
  }

  .logo-badge-sutd {
    width: 74px;
    padding: 6px;
  }

  .logo-badge-sutd img {
    width: 62px;
    height: 24px;
  }

  .figure-section,
  .contributions {
    padding: 48px 0;
  }

  .figure-section {
    padding-top: 28px;
  }

  h1 {
    font-size: 42px;
  }

  .title-emphasis {
    font-size: 21px;
    max-width: none;
    line-height: 1.08;
  }

  .title-row {
    gap: 8px;
  }

  .hero-symbol {
    width: 46px;
  }

  h1 span {
    font-size: 15px;
    max-width: 340px;
  }

  .authors {
    max-width: 340px;
    font-size: 16px;
    line-height: 1.35;
  }

  .authors a,
  .authors span {
    min-width: 0;
  }

  .affiliations {
    max-width: 340px;
    font-size: 14px;
    line-height: 1.55;
  }

  h2 {
    font-size: 30px;
  }

  .metric-explainer {
    margin-top: 26px;
    padding-top: 10px;
  }

  .metric-explainer h2 {
    font-size: 28px;
  }

  .metric-list {
    padding-left: 20px;
  }

  .formula-card {
    padding: 14px 14px 15px;
  }

  .compute-diversity h2 {
    font-size: 26px;
  }

  .formula {
    font-size: 16px;
    white-space: nowrap;
  }

  .formula-label {
    font-size: 15px;
  }

  .mechanism-analysis {
    margin-top: 34px;
  }

  .mechanism-figures {
    gap: 12px;
    margin-top: 18px;
  }

  .mechanism-figure {
    min-height: 230px;
    padding: 10px;
    border-radius: 12px;
  }

  .takeaway {
    font-size: clamp(7px, calc((100vw - 24px) / 49), 9px);
  }

  .paper-figure figcaption {
    padding: 12px 14px;
  }
}
