/* Modern CSS Variables for consistent theming */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --accent-color: #0ea5e9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --background-primary: #ffffff;
  --background-secondary: #f8fafc;
  --background-accent: #f1f5f9;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-subtle: linear-gradient(135deg, #ffecd2 0%, #fcb69f 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.6;
  font-size: 16px;
  background-color: var(--background-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* 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: var(--text-primary) !important;
  border: none !important;
  color: white !important;
  box-shadow: var(--shadow-md);
}

.button.is-dark:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--primary-color) !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;
}

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


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

.hero.is-light {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.hero-body {
  padding: 4rem 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 4rem;
}

.publication-authors {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.publication-venue {
    color: var(--text-secondary);
    width: fit-content;
    font-weight: 600;
    background: var(--background-accent);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    display: inline-block;
}

.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.5rem;
}

.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: 2rem !important;
  position: relative;
  padding-bottom: 1rem;
}

.title.is-3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

/* Content Improvements */
.content.has-text-justified {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

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

/* 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!";
}

/* 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: 2rem 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;
  }
  
  .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;
  }
  
  .teaser .hero-body {
    padding: 1rem;
  }
  
  .content.has-text-justified {
    font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .publication-title {
    font-size: 2rem !important;
  }
  
  .hero-body {
    padding: 1.5rem 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;
  }
  
  .link-block {
    display: block;
    margin-bottom: 0.5rem;
  }
  
  .button {
    width: 100%;
    justify-content: center;
  }
}

/* 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;
  }
}

/* Scroll-linked reveal: content below enters softly as content above leaves. */
.scroll-fade-enabled [data-scroll-fade] {
  opacity: var(--scroll-fade-opacity, 1);
}

/* 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;
  }

  .scroll-fade-enabled [data-scroll-fade] {
    opacity: 1 !important;
  }
  
  .button {
    background: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
  }
}

/* LiMA project page */
.project-header {
  background: linear-gradient(135deg, #fcfefb 0%, #f6fbf3 100%);
  border-top: 1px solid #f1f7ee;
  border-bottom: 1px solid #e8f2e3;
}

.project-header .hero-body {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.project-header .container {
  width: calc(100% - 3rem);
  max-width: 1180px !important;
}

.project-header .project-logo {
  display: block;
  width: 1.55em;
  height: 1.55em;
  margin: 0;
  flex: none;
  object-fit: contain;
}

.project-header .publication-title {
  max-width: 1180px;
  margin: 0 auto 2rem !important;
  font-family: 'Times New Roman', Times, serif !important;
  font-size: clamp(2.1rem, 3.35vw, 2.85rem) !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
}

.title-brand-lockup {
  white-space: nowrap;
}

.project-header .publication-title .title-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.12em;
  height: 1em;
  margin-right: 0.06em;
  vertical-align: -0.13em;
}

.project-header .title-wordmark {
  display: block;
  width: auto;
  height: 0.85em;
  flex: none;
  transform: translateY(0.3em);
}

.title-line {
  display: block;
  white-space: nowrap;
}

@media screen and (max-width: 1024px) {
  .project-header .title-line {
    display: inline;
    white-space: normal;
  }
}

.author-list {
  margin-bottom: 1.35rem;
  color: var(--text-primary);
  font-size: 1.13rem;
  font-weight: 700;
  line-height: 1.9;
}

.author-line {
  display: block;
}

.author-name {
  display: inline-block;
  margin: 0 0.12rem;
}

.author-list sup,
.publication-affiliations sup {
  color: #66805f;
  font-size: 0.7em;
  font-weight: 700;
}

.publication-affiliations {
  color: #52604f;
  font-size: 0.98rem;
  line-height: 1.65;
}

.publication-affiliations p {
  margin: 0;
}

.publication-affiliations .author-notes {
  margin-top: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.conference-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.9rem auto 0;
  color: #3a7890;
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.conference-badge::before,
.conference-badge::after {
  content: "";
  width: 2rem;
  height: 2px;
  background: #bfd7dc;
}

.publication-resources {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  width: min(100%, 650px);
  margin: 1.1rem auto 0;
}

.publication-resource {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.6rem;
  padding: 0.75rem 1rem;
  border: 1px solid #b9d5bd;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgb(42 82 49 / 0.07);
  color: #23553d;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

a.publication-resource {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.publication-resource:hover,
a.publication-resource:focus-visible {
  transform: translateY(-2px);
  border-color: #7fb089;
  box-shadow: 0 7px 18px rgb(42 82 49 / 0.12);
  color: #174b32;
}

.publication-resource .resource-label {
  font-weight: 700;
}

.publication-resource .resource-status {
  color: #718477;
  font-size: 0.75rem;
  font-weight: 500;
}

.publication-resource.is-pending {
  border-color: #dce9dd;
  background: #f9fcf8;
  color: #6c7f70;
  cursor: default;
}

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

.project-overview-video,
.media-slide video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
}

.section-title {
  margin-bottom: 2.25rem !important;
  color: var(--text-primary) !important;
}

.subsection-title {
  margin: 3.5rem 0 1.5rem !important;
  color: var(--text-primary) !important;
}

.paper-figure {
  margin: 0 auto;
}

.paper-figure a {
  display: block;
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  background: #fff;
}

.paper-figure-wide {
  max-width: 1100px;
}

.abstract-copy {
  max-width: 960px;
  margin: 2.25rem auto 0;
  font-size: 1.08rem;
  line-height: 1.75;
}

.method-copy {
  max-width: 1020px;
  margin: 2rem auto 0;
}

.method-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 !important;
  padding: 0;
  list-style: none !important;
}

.content .method-highlights li + li {
  margin-top: 0;
}

.method-highlight {
  min-width: 0;
  padding: 1.35rem 1.3rem 1.45rem;
  border: 1px solid #dcebdd;
  border-radius: var(--border-radius-lg);
  background: linear-gradient(145deg, #f9fcf8 0%, #f1f8f0 100%);
  box-shadow: var(--shadow-sm);
}

.method-highlight::before {
  display: block;
  width: 0.65rem;
  height: 0.65rem;
  margin: 0.15rem 0 1.05rem 0.25rem;
  border-radius: 50%;
  background: #5c9a70;
  box-shadow: 0 0 0 0.35rem #e3f1e5;
  content: '';
}

.method-highlight h3 {
  margin: 0 0 0.65rem;
  color: #254a34;
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.35;
}

.method-highlight p {
  margin: 0;
  color: #53645a;
  font-size: 0.96rem;
  line-height: 1.62;
}

.experiment-figures {
  align-items: stretch;
  margin-top: 0.5rem;
}

@media screen and (min-width: 769px) {
  .experiment-figures .column:first-child {
    width: 43%;
  }

  .experiment-figures .column:last-child {
    width: 57%;
  }
}

.experiment-figures .column,
.compact-figure {
  display: flex;
  flex-direction: column;
}

.compact-figure {
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.compact-figure a {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compact-figure img {
  width: auto;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  box-shadow: none;
}

.compact-figure figcaption {
  margin-top: 0.85rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.media-carousel {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 0 2.5rem;
  border-radius: var(--border-radius-lg);
  outline: none;
  overflow: hidden;
}

.media-carousel:focus-visible {
  outline: 3px solid rgb(37 99 235 / 0.35);
  outline-offset: 6px;
}

.media-slides {
  position: relative;
  aspect-ratio: 2.12;
}

.media-slide {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 66%;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) scale(0.84);
  transform-origin: center top;
  transition: left 450ms ease, transform 450ms ease, opacity 450ms ease, visibility 450ms ease;
}

.media-slide.is-active {
  z-index: 3;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

.media-slide.is-prev,
.media-slide.is-next {
  z-index: 2;
  opacity: 0.62;
  visibility: visible;
  pointer-events: auto;
  cursor: pointer;
}

.media-slide.is-prev {
  left: 12%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 85%);
  mask-image: linear-gradient(to right, transparent 0%, #000 85%);
}

.media-slide.is-next {
  left: 88%;
  -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 85%);
  mask-image: linear-gradient(to left, transparent 0%, #000 85%);
}

.media-slide h4 {
  margin-top: 0.9rem;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
}

.media-slide:not(.is-active) h4 {
  opacity: 0;
}

.media-slide:not(.is-active) video {
  pointer-events: none;
}

.carousel-control {
  position: absolute;
  top: calc(50% - 2.2rem);
  z-index: 5;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.55);
  border-radius: 50%;
  background: rgb(15 23 42 / 0.78);
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-control:hover,
.carousel-control:focus-visible {
  background: var(--primary-color);
  transform: scale(1.06);
  outline: none;
}

.carousel-previous {
  left: 1rem;
}

.carousel-next {
  right: 1rem;
}

.carousel-status {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.generation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
  gap: 1.25rem;
  align-items: stretch;
}

.generation-video-panel,
.generation-chart {
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.generation-video-panel {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.45rem;
}

.generation-layout .media-carousel {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-bottom: 1.5rem;
}

.generation-layout .media-slides {
  aspect-ratio: 1.62;
}

.generation-layout .media-slide {
  top: 50%;
  width: 92%;
  transform: translate(-50%, -50%) scale(0.84);
  transform-origin: center;
}

.generation-layout .media-slide.is-active {
  transform: translate(-50%, -50%) scale(1);
}

.generation-layout .media-slide.is-prev {
  left: 7%;
}

.generation-layout .media-slide.is-next {
  left: 93%;
}

.generation-layout .media-slide h4 {
  margin-top: 0.6rem;
  font-size: 1rem;
}

.generation-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.75rem;
}

.generation-chart img {
  display: block;
  width: 100%;
  max-width: 355px;
  height: auto;
}

.results-table-block {
  margin-top: 4rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

.results-table {
  min-width: 1320px;
  margin-bottom: 0 !important;
  font-size: 0.84rem;
  white-space: nowrap;
}

.results-table caption {
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.98rem;
  line-height: 1.45;
  text-align: left;
  caption-side: top;
}

.results-table th,
.results-table td {
  padding: 0.7rem 0.65rem !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.results-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: left !important;
}

.results-table.is-striped tbody tr:not(.is-selected):nth-child(even) th {
  background: #fafafa;
}

.results-table .ours-row,
.results-table .ours-row th,
.results-table.is-striped tbody .ours-row:not(.is-selected) th {
  background: #eaf7ec !important;
}

.table-note {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media screen and (max-width: 768px) {
  .section {
    padding: 3rem 1rem;
  }

  .section-title {
    margin-bottom: 1.5rem !important;
    font-size: 2rem !important;
  }

  .project-header .hero-body {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .project-header .publication-title {
    font-size: 2rem !important;
  }

  .project-header .project-logo {
    width: 1.45em;
    height: 1.45em;
  }

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

  .author-list {
    font-size: 1rem;
    line-height: 1.75;
  }

  .author-line {
    display: inline;
  }

  .publication-affiliations {
    font-size: 0.9rem;
  }

  .publication-resources {
    gap: 0.5rem;
  }

  .publication-resource {
    flex-direction: column;
    gap: 0.2rem;
    min-height: 5rem;
    padding: 0.6rem 0.3rem;
    font-size: 0.9rem;
  }

  .publication-resource .resource-status {
    font-size: 0.68rem;
  }

  .compact-figure a {
    min-height: 0;
  }

  .compact-figure img {
    width: 100%;
    max-height: none;
  }

  .generation-layout {
    grid-template-columns: 1fr;
  }

  .generation-layout .media-slides {
    aspect-ratio: 1.5;
  }

  .generation-layout .media-slide {
    width: 82%;
  }

  .generation-chart img {
    max-width: none;
  }

  .media-slides {
    aspect-ratio: 1.6;
  }

  .media-slide {
    width: 76%;
  }

  .media-slide.is-prev {
    left: 8%;
  }

  .media-slide.is-next {
    left: 92%;
  }

  .carousel-control {
    top: calc(50% - 2rem);
    width: 44px;
    height: 44px;
  }

  .carousel-previous {
    left: 0.5rem;
  }

  .carousel-next {
    right: 0.5rem;
  }

  .abstract-copy {
    font-size: 1rem;
    text-align: left !important;
  }

  .results-table-block {
    margin-top: 3rem;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-fade-enabled [data-scroll-fade] {
    opacity: 1 !important;
  }

  .carousel-control {
    transition: none;
  }

  .media-slide {
    transition: none;
  }
}
