@font-face {
  font-family: "CMU Serif";
  src: local("CMU Serif"), local("CMU Serif Roman"), local("Computer Modern Serif");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "CMU Serif";
  src: local("CMU Serif Bold"), local("CMU Serif Roman Bold"), local("Computer Modern Serif Bold");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "CMU Serif";
  src: local("CMU Serif Italic"), local("CMU Serif Roman Italic"), local("Computer Modern Serif Italic");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper-bg: #f2f2f2;
  --paper-surface: #eaeaea;
  --paper-surface-strong: #e2e2e2;
  --paper-border: #d2d2d2;
  --paper-ink: #4f4f4f;
  --paper-ink-strong: #303030;
  --paper-ink-soft: #6b6b6b;
  --paper-accent: #2f2f2f;
  --defense-bg: #f4f7f9;
  --defense-surface: #ffffff;
  --defense-teal: #5fb3a8;
  --defense-teal-soft: #b9e2dc;
  --defense-teal-bg: #c8ebe5;
  --defense-blue: #2d6f9f;
  --defense-ink: #1d2630;
  --defense-ink-soft: #5a6470;
  --mono-stack: "IBM Plex Mono", "JetBrains Mono", "Roboto Mono", "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper-bg);
}

body {
  margin: 0;
  background: var(--paper-bg);
  color: var(--paper-ink);
  font-family: "CMU Serif", Georgia, serif;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  padding-bottom: 3rem;
}

a {
  color: var(--paper-ink-strong);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: #1d1d1d;
  border-bottom-color: #878787;
}

.container.is-max-desktop {
  max-width: 980px !important;
}

.hero,
.section {
  background: transparent;
}

.hero-body {
  padding: 4.25rem 1.5rem;
}

.teaser .hero-body {
  padding-top: 1.75rem;
  padding-bottom: 3rem;
}

.hero.is-light {
  background: transparent !important;
  border: 0;
}

.hero.is-light .column.is-four-fifths {
  background: var(--paper-surface);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.75rem;
}

.publication-title {
  font-family: "CMU Serif", Georgia, serif !important;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem) !important;
  font-weight: 600 !important;
  color: var(--paper-ink-strong) !important;
  line-height: 1.14 !important;
  letter-spacing: 0.01em;
  max-width: 34ch;
  margin: 0 auto 2rem !important;
  text-wrap: pretty;
}

.publication-authors {
  font-family: "CMU Serif", Georgia, serif !important;
  color: var(--paper-ink-soft);
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.publication-authors.author-names {
  font-size: clamp(1.35rem, 1.75vw, 1.9rem);
  margin-bottom: 1.15rem;
}

.publication-authors.author-meta {
  font-size: clamp(1.18rem, 1.35vw, 1.55rem);
  margin-bottom: 1.6rem;
}

.publication-authors a {
  color: #2d6f9f !important;
  border-bottom-color: #96b9d3;
}

.author-block {
  display: inline-block;
  margin-right: 0.35rem;
}

.eql-cntrb {
  display: block;
  margin-top: 0.3rem;
  font-size: 1rem;
  color: var(--paper-ink-soft);
  font-style: italic;
}

.publication-banner {
  background: var(--paper-surface);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.publication-banner img,
.publication-banner video,
.publication-video iframe,
.publication-body img,
iframe {
  border-radius: var(--radius);
  border: 1px solid #d8d8d8;
  box-shadow: none;
}

.publication-body img {
  max-width: 100%;
  height: auto;
}

.button,
.more-works-btn,
.copy-bibtex-btn {
  font-family: "CMU Serif", Georgia, serif;
}

.button {
  border-radius: 999px !important;
  border: 1px solid var(--paper-border) !important;
  background: transparent !important;
  color: var(--paper-ink-strong) !important;
  box-shadow: none !important;
  font-weight: 700 !important;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
}

.button:hover,
.button:focus-visible {
  background: var(--paper-surface-strong) !important;
  border-color: #bfbfbf !important;
  transform: none;
}

.button.is-dark {
  background: var(--paper-accent) !important;
  border-color: var(--paper-accent) !important;
  color: #f7f7f7 !important;
}

.button.is-dark:hover,
.button.is-dark:focus-visible {
  background: #202020 !important;
  border-color: #202020 !important;
  color: #fcfcfc !important;
}

.link-block a {
  margin: 0.45rem 0.3rem;
}

.title,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "CMU Serif", Georgia, serif !important;
  color: var(--paper-ink-strong);
}

.title.is-3 {
  font-size: clamp(2rem, 4.4vw, 3.35rem) !important;
  font-weight: 700 !important;
  line-height: 1.2;
  letter-spacing: 0.015em;
  margin-bottom: 2.2rem !important;
  text-align: center;
}

.subtitle {
  color: var(--paper-ink-soft) !important;
}

.content,
.content.has-text-justified {
  color: var(--paper-ink-soft);
  font-size: 1.12rem;
  line-height: 1.9;
}

.content.has-text-justified {
  text-align: justify;
  text-justify: inter-word;
}

.content p,
.content.has-text-justified p {
  margin-bottom: 1.4rem;
  text-wrap: pretty;
}

.content strong {
  color: var(--paper-ink-strong);
  font-weight: 700;
}

.content ul {
  margin-left: 1.25rem;
}

.content li {
  margin-bottom: 0.5rem;
}

.publication-venue,
.publication-awards {
  color: var(--paper-ink-soft);
  background: var(--paper-surface);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius);
  padding: 0.4rem 0.8rem;
  display: inline-block;
  margin-top: 0.75rem;
}

.results-carousel {
  overflow: hidden;
  padding: 0.6rem 0;
}

.results-carousel .item {
  margin: 0.8rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--paper-border);
  background: var(--paper-surface);
}

.results-carousel .item img,
.results-carousel video {
  width: 100%;
  height: auto;
  margin: 0;
}

.results-carousel .subtitle {
  font-size: 1rem !important;
  line-height: 1.6;
  margin-top: 0.9rem;
}

.slider-pagination .slider-page {
  background: #b0b0b0;
}

.slider-pagination .slider-page.is-active {
  background: #444;
}

pre {
  border-radius: var(--radius) !important;
  border: 1px solid var(--paper-border) !important;
  background: #e7e7e7 !important;
  box-shadow: none !important;
  padding: 1.25rem !important;
  font-size: 0.95rem !important;
  line-height: 1.65;
  overflow-x: auto;
}

code {
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", monospace !important;
  color: #333 !important;
  background: transparent !important;
}

.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.copy-bibtex-btn {
  border-radius: 999px;
  border: 1px solid #2c2c2c;
  background: #2f2f2f;
  color: #f8f8f8;
  cursor: pointer;
  padding: 0.58rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.copy-bibtex-btn:hover,
.copy-bibtex-btn:focus-visible {
  background: #202020;
  border-color: #202020;
}

.copy-bibtex-btn.copied {
  background: #1f4f2a;
  border-color: #1f4f2a;
}

.copy-bibtex-btn.copied .copy-text::after {
  content: "ied!";
}

.footer {
  background: transparent;
  border-top: 1px solid var(--paper-border);
  padding: 3rem 1.5rem;
}

.footer .content {
  color: var(--paper-ink-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.footer .icon-link {
  color: var(--paper-ink-soft);
}

.more-works-container {
  position: fixed;
  top: 1.4rem;
  right: 1.4rem;
  z-index: 1000;
}

.more-works-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--paper-border);
  background: rgba(242, 242, 242, 0.96);
  color: var(--paper-ink-strong);
  padding: 0.56rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.more-works-btn:hover,
.more-works-btn:focus-visible {
  background: var(--paper-surface);
  border-color: #bdbdbd;
}

.more-works-btn .dropdown-arrow {
  transition: transform 0.2s ease;
  font-size: 0.8rem;
}

.more-works-btn.active .dropdown-arrow {
  transform: rotate(180deg);
}

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  width: 410px;
  max-width: calc(100vw - 1.25rem);
  max-height: 72vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--paper-border);
  background: var(--paper-bg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.more-works-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--paper-border);
}

.dropdown-header h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--paper-ink-strong);
}

.close-btn {
  border: 0;
  background: transparent;
  color: var(--paper-ink-soft);
  border-radius: 999px;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
}

.close-btn:hover,
.close-btn:focus-visible {
  background: var(--paper-surface-strong);
  color: var(--paper-ink-strong);
}

.works-list {
  padding: 0.75rem;
}

.work-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: var(--radius);
  color: inherit;
  padding: 0.75rem;
  margin-bottom: 0.35rem;
  border-bottom: 0;
}

.work-item:hover,
.work-item:focus-visible {
  background: var(--paper-surface);
}

.work-info h5 {
  margin: 0 0 0.2rem 0;
  font-size: 1rem;
  color: var(--paper-ink-strong);
}

.work-info p {
  margin: 0 0 0.35rem 0;
  color: var(--paper-ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.work-venue {
  font-size: 0.81rem;
  color: #7f7f7f;
  font-style: italic;
}

.work-item .fas {
  color: #8f8f8f;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.scroll-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #2f2f2f;
  background: #2f2f2f;
  color: #f6f6f6;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
  z-index: 999;
}

.scroll-to-top:hover,
.scroll-to-top:focus-visible {
  background: #1d1d1d;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.button:focus-visible,
.related-works-btn:focus-visible,
a:focus-visible,
.copy-bibtex-btn:focus-visible,
.more-works-btn:focus-visible,
.scroll-to-top:focus-visible {
  outline: 2px solid #444;
  outline-offset: 2px;
}

@media screen and (max-width: 1024px) {
  .hero-body {
    padding: 3.4rem 1.2rem;
  }

  .container.is-max-desktop {
    max-width: 920px !important;
  }
}

@media screen and (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.78;
  }

  .hero-body,
  .section {
    padding: 2.4rem 1rem;
  }

  .publication-title {
    font-size: clamp(1.4rem, 6.4vw, 2rem) !important;
    margin-bottom: 1.2rem !important;
  }

  .publication-authors.author-names {
    font-size: 1.18rem;
    margin-bottom: 0.8rem;
  }

  .publication-authors.author-meta {
    font-size: 1.03rem;
    margin-bottom: 1.2rem;
  }

  .eql-cntrb {
    font-size: 0.95rem;
  }

  .content,
  .content.has-text-justified {
    font-size: 1.03rem;
  }

  .title.is-3 {
    margin-bottom: 1.4rem !important;
  }

  .hero.is-light .column.is-four-fifths {
    padding: 1.65rem 1.3rem;
  }

  .publication-banner {
    padding: 0.65rem;
  }

  .results-carousel .item {
    margin: 0.45rem;
    padding: 0.8rem;
  }

  .button {
    margin: 0.2rem !important;
    font-size: 0.85rem !important;
    padding: 0.6rem 0.9rem !important;
  }

  .link-block {
    display: block;
    margin-bottom: 0.35rem;
  }

  .more-works-container {
    top: auto;
    bottom: 1.2rem;
    right: 0.9rem;
  }

  .more-works-dropdown {
    top: auto;
    right: 0;
    bottom: calc(100% + 0.4rem);
    width: min(420px, calc(100vw - 1rem));
  }

  .scroll-to-top {
    right: 0.9rem;
    bottom: 5rem;
    width: 40px;
    height: 40px;
  }
}

@media screen and (max-width: 480px) {
  .hero-body,
  .section {
    padding: 1.8rem 0.8rem;
  }

  .content,
  .content.has-text-justified {
    font-size: 0.98rem;
  }

  .bibtex-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .copy-bibtex-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ------- Defense-styled sections (style ported from defense slides) ------- */

.defense-tagline {
  font-family: var(--mono-stack);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 500;
  color: var(--defense-ink-soft);
  letter-spacing: 0.02em;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.45;
}

.defense-tagline .mark {
  background: var(--defense-teal-bg);
  padding: 0.05em 0.35em;
  border-radius: 4px;
  color: var(--defense-ink);
}

.tpu-credit {
  font-family: var(--mono-stack);
  font-size: 0.85rem;
  color: var(--paper-ink-soft);
  letter-spacing: 0.03em;
  text-align: center;
  margin-top: 1.25rem;
}

.tpu-credit .accent {
  color: #4285f4;
  font-weight: 700;
}

.section.defense-block {
  background: var(--defense-bg);
  border-top: 1px solid var(--paper-border);
  border-bottom: 1px solid var(--paper-border);
}

.defense-heading {
  font-family: var(--mono-stack) !important;
  font-size: clamp(1.35rem, 2.6vw, 2rem) !important;
  font-weight: 700;
  color: var(--defense-ink) !important;
  line-height: 1.4;
  letter-spacing: -0.005em;
  max-width: 56ch;
  margin: 0 auto 2.25rem !important;
  text-align: center;
}

.defense-heading .mark {
  background: var(--defense-teal-bg);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}

.defense-heading .underline {
  text-decoration: underline;
  text-decoration-color: var(--defense-teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.actor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  align-items: start;
  margin: 2rem 0 1rem;
}

.actor-card {
  background: var(--defense-surface);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.2rem 1.6rem;
  text-align: center;
}

.actor-card .actor-art {
  height: 160px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.actor-card .actor-art img,
.actor-card .actor-art svg {
  height: 160px !important;
  width: 160px !important;
  max-height: 160px;
  max-width: 160px;
  display: block;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.actor-card .actor-icon {
  height: 160px;
  width: 160px;
  display: grid;
  place-items: center;
  color: var(--defense-teal);
  font-size: 5rem;
  line-height: 1;
}

.actor-card h3 {
  font-family: var(--mono-stack) !important;
  font-size: 1.4rem !important;
  font-weight: 700;
  color: var(--defense-ink) !important;
  margin: 0 0 0.55rem !important;
  letter-spacing: -0.01em;
}

.actor-card p {
  font-family: var(--mono-stack);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--defense-ink-soft);
  margin: 0;
}

.actor-card p strong {
  color: var(--defense-ink);
  font-weight: 700;
}

.coi-equation {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  text-align: center;
  background: var(--defense-surface);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  margin: 1.8rem auto 0;
}

.coi-equation .formula {
  font-family: "CMU Serif", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--defense-ink);
}

.coi-equation .formula em {
  font-style: italic;
}

.coi-equation .caption {
  font-family: var(--mono-stack);
  font-size: 0.92rem;
  color: var(--defense-ink-soft);
  max-width: 46ch;
  margin: 0 auto;
  line-height: 1.55;
}

.takeaways {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 720px;
  display: grid;
  gap: 0.85rem;
}

.takeaways li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  align-items: start;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--defense-surface);
  border: 1px solid var(--paper-border);
  border-left: 3px solid var(--defense-teal);
  border-radius: var(--radius);
  font-family: var(--mono-stack);
  font-size: 1rem;
  color: var(--defense-ink);
  line-height: 1.5;
}

.takeaways li .num {
  font-weight: 700;
  color: var(--defense-teal);
  font-size: 1.05rem;
}

.takeaways li .stat {
  display: block;
  font-size: 0.82rem;
  color: var(--defense-ink-soft);
  margin-top: 0.25rem;
}

.deploy-line {
  font-family: var(--mono-stack);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  text-align: center;
  margin: 2rem auto 0;
  max-width: 48ch;
  color: var(--defense-ink);
  line-height: 1.55;
}

.deploy-line strong {
  background: var(--defense-teal-bg);
  padding: 0.05em 0.35em;
  border-radius: 4px;
}

.hf-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  background: #fff8e7;
  border: 1px solid #f3dba0;
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.3rem;
  margin: 1.6rem auto 0;
  max-width: 720px;
  font-family: var(--mono-stack);
}

.hf-callout .hf-emoji {
  font-size: 2rem;
  line-height: 1;
}

.hf-callout h4 {
  margin: 0 0 0.3rem 0 !important;
  font-family: var(--mono-stack) !important;
  font-size: 1.05rem !important;
  color: var(--defense-ink) !important;
}

.hf-callout p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--defense-ink-soft);
  line-height: 1.5;
}

.hf-callout a {
  color: var(--defense-blue);
  border-bottom-color: var(--defense-teal-soft);
  font-size: 0.85rem;
}

@media screen and (max-width: 768px) {
  .actor-grid {
    grid-template-columns: 1fr;
  }

  .takeaways li {
    grid-template-columns: 2rem 1fr;
    gap: 0.7rem;
  }

  .hf-callout {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media print {
  .more-works-container,
  .scroll-to-top,
  .button,
  .copy-bibtex-btn {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero.is-light .column.is-four-fifths,
  .publication-banner,
  .results-carousel .item,
  pre {
    border-color: #cfcfcf;
    background: #fff !important;
  }
}
