/* Modern CSS Variables for consistent theming */
:root {
  --primary-color: #2457c5;
  --primary-hover: #1f4aa5;
  --secondary-color: #6b7a90;
  --accent-color: #5e8fd6;
  --text-primary: #1f2937;
  --text-secondary: #5f6f85;
  --text-light: #8ea0b8;
  --background-primary: #ffffff;
  --background-secondary: #f7f9fc;
  --background-accent: #eef3f8;
  --border-color: #dde5ef;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 8px 18px -18px rgb(15 23 42 / 0.28);
  --shadow-lg: 0 14px 28px -24px rgb(15 23 42 / 0.26);
  --shadow-xl: 0 22px 42px -34px rgb(15 23 42 / 0.24);
  --gradient-primary: linear-gradient(135deg, #315fae 0%, #5e8fd6 100%);
  --gradient-accent: linear-gradient(135deg, #5e8fd6 0%, #7aa6e6 100%);
  --gradient-subtle: linear-gradient(135deg, #f8fafc 0%, #eef3f8 100%);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  line-height: 1.72;
  font-size: 16px;
  background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 12%, #ffffff 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  overflow-x: clip;
}

main > section {
  padding: 5rem 1.5rem;
}

main > section + section {
  border-top: 1px solid rgb(226 232 240 / 0.8);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--border-radius);
}


/* Modern Button Styles */
.button {
  border-radius: var(--border-radius) !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
  border: 2px solid transparent !important;
  position: relative;
  overflow: hidden;
}

.button.is-dark {
  background: #243246 !important;
  border: none !important;
  color: white !important;
  box-shadow: var(--shadow-md);
}

.button.is-dark:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  background: #2b4468 !important;
}

.button.is-dark:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.footer .icon-link {
    font-size: 25px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer .icon-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.link-block a {
    margin: 8px 4px;
}

.publication-links .button {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding-left: 0.8rem !important;
  padding-right: 0.8rem !important;
}

.publication-links .button .icon {
  width: auto;
  margin: 0 !important;
}

.dnerf {
  font-variant: small-caps;
}


/* Hero Section Modernization */
.hero {
  position: relative;
  overflow: hidden;
}

.hero.is-light {
  background: var(--background-secondary);
  border-top: 1px solid rgba(221, 229, 239, 0.9);
  border-bottom: 1px solid rgba(221, 229, 239, 0.9);
}

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

.teaser .hero-body {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.teaser {
  font-family: 'Inter', sans-serif;
}


/* Publication Content Styling */
.publication-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    margin-bottom: 2rem !important;
    line-height: 1.1 !important;
}

.publication-banner {
  max-height: 70vh;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin: 2rem 0;
}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-lg);
}

.publication-header .hero-body {
  padding: 6rem 1.5rem 0.25rem;
}

.publication-authors {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 0.8rem;
}

.publication-venue {
    color: var(--text-secondary);
    width: fit-content;
    font-weight: 600;
    background: #f3f6fa;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    display: inline-block;
    border: 1px solid rgba(221, 229, 239, 0.95);
}

.publication-awards {
    color: #ef4444;
    width: fit-content;
    font-weight: 700;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid #ef4444;
    margin-top: 1rem;
}

.publication-authors a {
   color: var(--primary-color) !important;
   text-decoration: none;
   font-weight: 600;
   transition: var(--transition);
   position: relative;
}

.publication-authors a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--gradient-accent);
    transition: var(--transition);
}

.publication-authors a:hover::after {
    width: 100%;
}

.publication-authors a:hover {
    color: var(--primary-hover) !important;
}

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

.publication-banner img {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.publication-banner img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* Modern Video and Carousel Styling */
.publication-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.publication-video:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.publication-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-lg);
}

.publication-body img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.publication-body img:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.results-carousel .item {
  margin: 1rem;
  overflow: hidden;
  padding: 1.5rem;
  font-size: 0;
  background: var(--background-primary);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.results-carousel .item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.results-carousel .item img,
.results-carousel video {
  margin: 0;
  border-radius: var(--border-radius);
  width: 100%;
  height: auto;
}

.results-carousel .subtitle {
  font-size: 1rem !important;
  color: var(--text-secondary);
  margin-top: 1rem;
  font-weight: 500;
}

/* Pagination and Misc Improvements */
.slider-pagination .slider-page {
  background: var(--primary-color);
  border-radius: 50%;
  transition: var(--transition);
}

.slider-pagination .slider-page.is-active {
  background: var(--primary-hover);
  transform: scale(1.2);
}

.eql-cntrb { 
  font-size: 0.875rem;
  color: var(--text-light);
  font-style: italic;
}

/* Section Titles */
.title.is-3 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  color: var(--text-primary);
  margin-bottom: 2.5rem !important;
  position: relative;
  padding-bottom: 1rem;
}

.title.is-3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 2px;
  background: rgba(94, 143, 214, 0.9);
  border-radius: 2px;
}

/* Content Improvements */
.content.has-text-justified {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 50rem;
  margin-left: auto;
  margin-right: auto;
}

.content.has-text-justified p {
  margin-bottom: 1.5rem;
}

.narrative-anchor {
  margin: 2rem auto !important;
  max-width: 44rem;
  padding: 1.15rem 0;
  text-align: center;
  font-size: 1.14rem;
  line-height: 1.7;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(203, 213, 225, 0.8);
  border-bottom: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 0;
  box-shadow: none;
}

.intro-copy {
  max-width: 46rem !important;
  margin: 0 auto;
  text-align: left;
}

.intro-lede {
  margin-top: 0 !important;
  margin-bottom: 1.35rem !important;
  max-width: none;
  text-align: left;
  font-size: clamp(1.18rem, 1.5vw, 1.42rem);
  line-height: 1.72;
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

#intro .content.has-text-justified {
  max-width: 46rem;
  font-size: 1.08rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.intro-teaser-card {
  margin-top: 2.25rem;
  padding: 1rem;
  background: transparent;
  border: 1px solid rgb(226 232 240 / 0.9);
  box-shadow: none;
}

.intro-teaser-card .content.has-text-justified {
  max-width: 42rem;
  margin: 0.9rem auto 0;
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--text-light);
  text-align: center;
}

.intro-teaser-card .content.has-text-justified p {
  font-style: italic;
}

.identity-definition-block {
  max-width: 50rem;
  margin: 0 auto;
}

.identity-definition-block .title.is-3 {
  margin-bottom: 2rem !important;
}

.identity-definition-copy {
  max-width: 50rem !important;
  margin-left: auto;
  margin-right: auto;
}

.identity-definition-table {
  margin: 2rem 0 2.25rem;
  border-top: 1px solid #dde5ef;
  border-bottom: 1px solid #dde5ef;
}

.identity-definition-row {
  display: grid;
  grid-template-columns: minmax(160px, 190px) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
  padding: 1.9rem 0;
}

.identity-definition-row + .identity-definition-row {
  border-top: 1px solid #dde5ef;
}

.identity-definition-term {
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.6;
}

.identity-definition-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Footer Improvements */
.footer {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem;
}

.footer .content {
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* BibTeX Styling */
pre {
  background: var(--background-accent) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  padding: 1.5rem !important;
  font-size: 0.9rem !important;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

code {
  background: var(--background-accent) !important;
  color: var(--text-primary) !important;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace !important;
}

/* BibTeX Section Improvements */
.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.copy-bibtex-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-bibtex-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.copy-bibtex-btn.copied {
  background: #10b981;
}

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

/* Figure and placeholder components */
.figure-card {
  margin-top: 2rem;
  background: var(--background-primary);
  border: 1px solid rgba(221, 229, 239, 0.92);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem;
  box-shadow: 0 18px 34px -30px rgba(15, 23, 42, 0.18);
}

.figure-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.figure-placeholder {
  border: 1px dashed #c7d3e3;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  background: linear-gradient(180deg, #fbfcfe 0%, #f5f8fc 100%);
  min-height: 210px;
}

.placeholder-badge {
  display: inline-block;
  background: #eef4fb;
  color: #42679f;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  border: 1px solid #d7e2f0;
}

.figure-placeholder p {
  color: #475569;
  margin-bottom: 0.65rem;
}

.figure-purpose {
  margin: 0 0 1.4rem;
  padding: 0 0 0.7rem 0.9rem;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  border-left: 2px solid rgba(94, 143, 214, 0.72);
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}

.figure-purpose em {
  display: block;
  font-style: italic;
  color: var(--text-primary);
  font-size: 1.02rem;
  line-height: 1.55;
}

.figure-card > figure {
  margin: 0;
}

.figure-card > figure + .content.has-text-justified {
  max-width: 54rem;
  margin: 1rem auto 0;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text-light);
  text-align: center;
}

.figure-card > figure + .content.has-text-justified p {
  font-style: italic;
}

.figure-card > figure + .content.has-text-justified .narrative-anchor {
  margin: 1.35rem auto 0 !important;
  color: var(--text-primary);
  text-align: center;
  font-style: normal;
}

.triplet-header-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.triplet-header-row span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

.takeaways-content ul {
  list-style: none;
  padding-left: 0;
  margin-top: 2rem;
}

.takeaways-content li {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem 1rem 1.35rem;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  border: 1px solid #dde5ef;
  border-radius: 12px;
  box-shadow: 0 14px 26px -28px rgba(15, 23, 42, 0.18);
  position: relative;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.8;
}

.takeaways-content li::before {
  content: "";
  position: absolute;
  left: 0.7rem;
  top: 1rem;
  bottom: 1rem;
  width: 3px;
  height: auto;
  border-radius: 999px;
  background: linear-gradient(180deg, #4a6fb1 0%, #6e99dc 100%);
}

.takeaways-content li strong {
  color: var(--text-primary);
}

#takeaways .content.has-text-justified {
  max-width: 58rem;
}

.metric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.metric-chips span {
  background: #e2e8f0;
  color: #1e293b;
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Figure 2: Metric disagreement interactive */
.metric-disagreement-figure {
  display: grid;
  gap: 1rem;
}

:root {
  --model-human: #111827;
  --model-idsim: #27ae8f;
  --model-dinov2: #e07b39;
  --model-dreamsim: #5b8dd9;
  --model-uned: #9b59b6;
}

.triplet-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.triplet-thumb {
  border: 1px solid #d5dfeb;
  border-radius: var(--border-radius);
  padding: 0.25rem;
  background: #fbfcfe;
  cursor: pointer;
  transition: var(--transition);
}

.triplet-thumb:hover {
  border-color: #60a5fa;
  box-shadow: var(--shadow-sm);
}

.triplet-thumb.is-active {
  border-color: #2563eb;
  background: #f4f8fd;
  box-shadow: 0 12px 22px -24px rgba(37, 99, 235, 0.35);
}

.triplet-thumb img {
  width: 100%;
  border-radius: 8px;
}

.triplet-zoom-panel {
  border: 1px solid rgba(221, 229, 239, 0.92);
  border-radius: var(--border-radius);
  background: var(--background-primary);
  padding: 0.75rem;
  box-shadow: 0 12px 28px -28px rgba(15, 23, 42, 0.16);
}

.triplet-column-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  text-align: center;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

#triplet-zoom-image {
  width: 100%;
  border-radius: 8px;
}

.model-decision-panel {
  margin-top: 1rem;
  overflow: visible;
}

.model-decision-legend {
  display: flex;
  gap: 0.8rem 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.9rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.legend-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.legend-human {
  width: 20px;
  height: 20px;
  color: var(--model-human);
  background: #e5e7eb;
  border-radius: 999px;
  font-size: 0.8rem;
}

.legend-idsim {
  width: 20px;
  height: 20px;
  background: transparent;
  color: var(--model-idsim);
  border-radius: 0;
  font-size: 1rem;
}

.legend-idsim::before {
  content: "★";
  line-height: 1;
}

.legend-dinov2 {
  background: var(--model-dinov2);
}

.legend-dreamsim {
  background: var(--model-dreamsim);
}

.legend-uned {
  background: var(--model-uned);
}

.model-tracks {
  display: grid;
  gap: 1.05rem;
}

.model-track-row {
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: 0.6rem;
  align-items: center;
}

.model-track-label {
  position: static;
  width: auto;
  text-align: right;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
}

.model-track-rail {
  position: relative;
  width: 76%;
  margin-left: 6%;
  height: 15px;
  border-radius: 999px;
  border: 0.5px solid #cbd5e1;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 8%, #f8fafc 92%, #eef2f7 100%);
}

.model-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #ffffff, 0 1px 3px rgb(0 0 0 / 0.2);
  opacity: 1;
}

.model-marker-human {
  width: 30px;
  height: 30px;
  color: #ffffff;
  background: var(--model-human);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border-radius: 999px;
}

.model-marker-idsim {
  width: 30px;
  height: 30px;
  background: transparent;
  color: var(--model-idsim);
  border-radius: 0;
  box-shadow: none;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.model-marker-idsim::before {
  content: "★";
  line-height: 1;
}

.model-marker-dinov2 {
  background: var(--model-dinov2);
}

.model-marker-dreamsim {
  background: var(--model-dreamsim);
}

.model-marker-uned {
  background: var(--model-uned);
}

/* Interactive identity/context block */
.interactive-panel {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--background-primary);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.interactive-labels {
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  color: var(--text-light);
  font-size: 0.9rem;
}

.score-bars {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.score-row {
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  align-items: center;
  gap: 0.75rem;
}

.score-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.score-fill-baseline {
  background: #fb7185;
}

.score-fill-idsim {
  background: #10b981;
}

/* Dense results interactive figure */
.dense-figure-card {
  background:
    radial-gradient(circle at top left, rgba(94, 143, 214, 0.05), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.dense-results-figure {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(320px, 1.04fr) minmax(320px, 1.04fr);
  gap: 1.25rem;
  align-items: stretch;
}

.dense-reference-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.18rem;
  margin-bottom: 0.7rem;
}

.dense-reference-card {
  background:
    radial-gradient(circle at top left, rgba(94, 143, 214, 0.05), transparent 32%),
    linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
  padding: 1.2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dense-reference-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dense-panel-note {
  margin: -0.15rem 0 0.95rem;
  color: var(--text-light);
  font-size: 0.94rem;
  line-height: 1.6;
}

.dense-reference-button {
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: none;
  min-height: 100%;
  overflow: hidden;
}

.dense-reference-button:hover {
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.dense-reference-button.is-active {
  border-color: #2563eb;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(94, 143, 214, 0.16);
}

.dense-reference-button img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
}

.dense-selected-reference {
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dde5ef;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 16px 28px -30px rgba(15, 23, 42, 0.22);
}

.dense-selected-reference img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.dense-display-card {
  margin: 0;
  padding: 1rem;
  background: var(--background-primary);
  border: 1px solid rgba(221, 229, 239, 0.92);
  border-radius: 18px;
  box-shadow: 0 16px 28px -30px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
}

.dense-display-label {
  margin-bottom: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.dense-display-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: cover;
}

#dense-multi-obj-image,
#dense-heatmap-image {
  aspect-ratio: 1 / 1;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
}

.scroll-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

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


/* More Works Dropdown */
.more-works-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
}

.more-works-btn {
  background: var(--background-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.more-works-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--background-secondary);
  border-color: var(--primary-color);
}

.more-works-btn .dropdown-arrow {
  transition: var(--transition);
  font-size: 0.8rem;
}

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

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  max-height: 70vh;
  overflow-y: auto;
}

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

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

.dropdown-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--background-accent);
  color: var(--text-primary);
}

.works-list {
  padding: 1rem;
}

.work-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  margin-bottom: 0.5rem;
}

.work-item:hover {
  background: var(--background-accent);
  transform: translateX(4px);
}

.work-info h5 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.work-info p {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.work-venue {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
}

.work-item .fas {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}


/* Mobile Responsive Improvements */
@media screen and (max-width: 768px) {
  .hero-body {
    padding: 3.5rem 1rem;
  }
  
  .publication-header .hero-body {
    padding: 3rem 1rem 2rem;
  }
  
  .publication-title {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1.5rem !important;
  }
  
  .publication-authors {
    font-size: 1rem !important;
    gap: 0.35rem 0.65rem;
  }
  
  .button {
    margin: 0.25rem !important;
    font-size: 0.875rem !important;
    padding: 0.75rem 1rem !important;
  }
  
  .more-works-container {
    bottom: 2rem;
    right: 1rem;
    top: auto;
  }
  
  .more-works-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }
  
  .more-works-dropdown {
    width: calc(100vw - 2rem);
    right: -1rem;
    bottom: calc(100% + 0.5rem);
    top: auto;
  }
  
  .results-carousel .item {
    margin: 0.5rem;
    padding: 1rem;
  }

  .triplet-thumbnails {
    grid-template-columns: 1fr;
  }

  .model-track-row {
    grid-template-columns: 84px 1fr;
    gap: 0.5rem;
  }

  .model-track-label {
    text-align: right;
    font-size: 0.92rem;
    margin-bottom: 0;
  }

  .score-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .dense-results-figure {
    grid-template-columns: 1fr;
  }

  .dense-reference-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dense-results-display {
    grid-template-columns: 1fr;
  }

  .interactive-labels {
    gap: 0.75rem;
    font-size: 0.82rem;
  }
  
  .teaser .hero-body {
    padding: 1rem;
  }
  
  .content.has-text-justified {
    font-size: 1rem;
  }

  .intro-lede {
    font-size: 1.08rem;
    line-height: 1.7;
    margin-bottom: 1rem !important;
  }

  #intro .content.has-text-justified {
    font-size: 1rem;
  }

  .identity-definition-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1.35rem 0;
  }

  .identity-definition-copy,
  .identity-definition-text,
  .identity-definition-term {
    font-size: 1rem;
  }

  main > section {
    padding: 3.75rem 1rem;
  }

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

  .figure-card {
    padding: 1.25rem;
  }

  .figure-purpose {
    padding: 0.85rem 1rem;
  }

  .narrative-anchor {
    padding: 0.85rem 0;
    font-size: 1rem;
  }

  .takeaways-content ul {
    margin-top: 1.5rem;
  }

  .triplet-header-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media screen and (max-width: 480px) {
  .publication-title {
    font-size: 2rem !important;
  }
  
  .hero-body {
    padding: 1.5rem 0.75rem;
  }

  main > section {
    padding: 3rem 0.75rem;
  }
  
  .more-works-container {
    position: fixed;
    bottom: 2rem;
    right: 1rem;
    z-index: 1000;
  }
  
  .more-works-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .more-works-dropdown {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    width: calc(100vw - 2rem);
    max-width: 90vw;
  }

  .dense-reference-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .link-block {
    display: block;
    margin-bottom: 0.5rem;
  }
  
  .button {
    width: 100%;
    justify-content: center;
  }

  .publication-authors {
    justify-content: center;
  }

  .intro-lede {
    font-size: 1rem;
  }
}

/* Tablet Responsive */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .hero-body {
    padding: 3rem 2rem;
  }
  
  .publication-header .hero-body {
    padding: 4rem 2rem 3rem;
  }
}

/* Animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero, .section {
  animation: fadeInUp 0.6s ease-out;
}

/* Improved focus states for accessibility */
.button:focus,
.related-works-btn:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}


/* Print styles */
@media print {
  .more-works-container {
    display: none;
  }
  
  .hero, .section {
    animation: none;
  }
  
  .button {
    background: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
  }
}
