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

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

#tasks .task-tabs-wrapper {
  margin-top: 2rem;
}

#tasks .task-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #dcdfe6;
  margin-bottom: 1.5rem;
}

#tasks .task-tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.9rem 0.5rem 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #4a5568;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

#tasks .task-tab:hover {
  color: #243b63;
}

#tasks .task-tab.active {
  color: #f0a202;
}

#tasks .task-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  background: #f0a202;
}

#tasks .task-panels {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.4rem 1.5rem 1.2rem;
  box-shadow: 0 4px 16px rgba(20, 33, 61, 0.05);
}

#tasks .task-panel {
  display: none;
}

#tasks .task-panel.active {
  display: block;
}

#tasks .task-group-intro {
  font-size: 1.22rem;
  line-height: 1.7;
  color: #243447;
  margin-bottom: 1rem;
}

#tasks .task-subitem {
  font-size: 1.18rem;
  line-height: 1.75;
  color: #2f3a4a;
  margin-bottom: 0.65rem;
}

#tasks .task-subitem strong {
  color: #1f2d3d;
}

@media screen and (max-width: 768px) {
  #tasks .task-tabs {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.2rem;
  }

  #tasks .task-tab {
    font-size: 1rem;
    padding: 0.75rem 0.4rem 0.9rem;
  }

  #tasks .task-panels {
    padding: 1rem 1rem 0.9rem;
  }

  #tasks .task-group-intro,
  #tasks .task-subitem {
    font-size: 1rem;
  }
}

/* ===== overall width ===== */
.egocot-wide {
  max-width: 1520px !important;
  width: calc(100% - 48px);
  margin: 0 auto;
}

.egocot-text {
  max-width: 1080px !important;
  width: calc(100% - 48px);
  margin: 0 auto;
}

.hero .publication-title {
  font-size: clamp(4rem, 6vw, 5.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero .subtitle.is-4 {
  max-width: 1180px;
  margin: 0.4rem auto 0 !important;
  font-size: clamp(1.75rem, 2.6vw, 2.6rem);
  line-height: 1.25;
}

.hero-body {
  padding-top: 2.4rem;
  padding-bottom: 2.1rem;
}

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

.publication-links {
  margin-top: 0.6rem;
}

.publication-links .button {
  padding-left: 1.15rem;
  padding-right: 1.15rem;
  font-weight: 700;
}

@media screen and (max-width: 768px) {
  .egocot-wide,
  .egocot-text {
    width: calc(100% - 20px);
  }
}

/* ===== author styling ===== */
.publication-authors .author-block {
  margin: 0 0.18rem;
}

.publication-authors .author-block a {
  color: inherit;
  text-decoration: none;
}

.author-equal {
  font-weight: 700;
}

.author-equal-1 a,
.author-equal-1 {
  color: #2f91ff !important;
}

.author-equal-2 a,
.author-equal-2 {
  color: #2eb67d !important;
}

.publication-authors sup {
  font-size: 0.7em;
  vertical-align: super;
}

/* ===== hover zoom ===== */
.zoomable-image {
  cursor: zoom-in;
  transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
  will-change: transform;
}

.zoomable-image:hover {
  transform: scale(1.03);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
  filter: brightness(1.01);
}

/* ===== lightbox ===== */
.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 24, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 28px;
}

.image-lightbox.show {
  display: flex;
}

.lightbox-img {
  max-width: min(96vw, 1800px);
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
  animation: lightboxZoomIn 0.18s ease;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 26px;
  font-size: 42px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.94);
    opacity: 0.75;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== Hero style like EOC-Bench ===== */
.egocot-hero .hero-body {
  padding-top: 2.2rem;
  padding-bottom: 1.8rem;
}

.egocot-title {
  font-size: clamp(3.3rem, 5.5vw, 5.6rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.03em;
  font-weight: 800 !important;
  color: #303030;
  max-width: 1480px;
  margin: 0 auto 1.2rem auto;
}

.egocot-title .title-main {
  color: #303030;
}

.egocot-title .title-accent-1 {
  color: #379fd3;
}

.egocot-title .title-accent-2 {
  color: #35c28f;
}

.egocot-authors {
  max-width: 1220px;
  margin: 0.8rem auto 0 auto;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #1e88e5;
}

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

.egocot-authors .author-block a {
  color: #1e88e5;
  text-decoration: none;
}

.egocot-authors .author-block a:hover {
  text-decoration: underline;
}

.egocot-authors sup {
  color: #e57373;
  font-size: 0.8em;
  vertical-align: super;
}

.egocot-affiliations {
  margin-top: 0.7rem;
  font-size: 1rem;
  color: #444;
  line-height: 1.6;
}

.egocot-affiliations sup {
  color: #e57373;
  font-size: 0.82em;
  margin-right: 1px;
}

.egocot-note {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: #777;
}

.egocot-note sup {
  color: #e57373;
}

.egocot-venue {
  margin-top: 0.55rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #666;
}

.egocot-hero .publication-links .button {
  margin-top: 0.25rem;
}

/* ===== Hero style ===== */
.egocot-hero .hero-body {
  padding-top: 1.8rem;
  padding-bottom: 1.4rem;
}

.egocot-title {
  font-size: clamp(2.8rem, 4.6vw, 4.2rem) !important;
  line-height: 1.06 !important;
  letter-spacing: -0.02em;
  font-weight: 800 !important;
  color: #303030;
  max-width: 1200px;
  margin: 0 auto 0.5rem auto;
}

.egocot-title .title-accent-1 {
  color: #379fd3;
}

.egocot-title .title-accent-2 {
  color: #35c28f;
}

.egocot-subtitle {
  max-width: 1100px;
  margin: 0 auto 1rem auto !important;
  font-size: clamp(1.25rem, 2vw, 1.9rem) !important;
  line-height: 1.28;
  font-weight: 500;
  color: #444;
}

.egocot-authors {
  max-width: 1000px;
  margin: 0.6rem auto 0 auto;
  font-size: 1.2rem;
  line-height: 1.7;
  color: #1e88e5;
}

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

.egocot-authors .author-block a {
  color: #1e88e5;
  text-decoration: none;
}

.egocot-authors .author-block a:hover {
  text-decoration: underline;
}

.egocot-authors sup {
  color: #e57373;
  font-size: 0.8em;
  vertical-align: super;
}

.egocot-affiliations {
  margin-top: 0.55rem;
  font-size: 1.05rem;
  color: #444;
  line-height: 1.5;
}

.egocot-affiliations sup {
  color: #e57373;
  font-size: 0.82em;
  margin-right: 1px;
}

.egocot-note {
  margin-top: 0.2rem;
  font-size: 0.9rem;
  color: #777;
}

.egocot-note sup {
  color: #e57373;
}

.egocot-venue {
  margin-top: 0.45rem;
  margin-bottom: 0.9rem;
  font-size: 0.98rem;
  color: #666;
}

.egocot-hero .publication-links .button {
  margin-top: 0.2rem;
}

@media screen and (max-width: 768px) {
  .egocot-title {
    font-size: clamp(2rem, 8vw, 2.8rem) !important;
    line-height: 1.1 !important;
  }

  .egocot-subtitle {
    font-size: 1.05rem !important;
  }

  .egocot-authors {
    font-size: 1rem;
    line-height: 1.6;
  }

  .egocot-affiliations,
  .egocot-venue {
    font-size: 0.92rem;
  }
}

/* make large figures narrower for readability */
.figure-narrow {
  width: 85%;
  margin: 0 auto;
}

@media screen and (max-width: 768px) {
  .figure-narrow {
    width: 100%;
  }
}

/* =========================
   Leaderboard (compact, globally sorted)
   ========================= */
#leaderboard .leaderboard-shell {
  width: 90%;
  max-width: 1500px;
  margin: 0 auto;
}

#leaderboard .leaderboard-card {
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

#leaderboard .leaderboard-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #2f2f2f;
}

#leaderboard .leaderboard-note,
#leaderboard .leaderboard-legend,
#leaderboard .leaderboard-subnote {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #444;
  margin: 8px 0;
  text-align: center;
}

#leaderboard .best-demo {
  font-weight: 700;
  text-decoration: underline;
}

#leaderboard .legend-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  margin-right: 4px;
}

#leaderboard .legend-proprietary {
  background: #f6e3cf;
  color: #8a4f11;
}

#leaderboard .legend-open {
  background: #eef2f7;
  color: #425466;
}

#leaderboard .legend-human {
  background: #e6f4ea;
  color: #1f6b3b;
}

#leaderboard .leaderboard-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
}

#leaderboard .leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 0.83rem;
  color: #2f2f2f;
  background: #fff;
}

#leaderboard .leaderboard-table th,
#leaderboard .leaderboard-table td {
  border: 1px solid #d8d8d8;
  padding: 6px 7px;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

#leaderboard .leaderboard-table thead th {
  background: #f5f5f5;
  font-weight: 700;
  line-height: 1.2;
}

#leaderboard .leaderboard-table thead tr:first-child th {
  font-size: 0.88rem;
}

#leaderboard .leaderboard-table thead tr:nth-child(2) th {
  font-size: 0.80rem;
}

#leaderboard .leaderboard-table td.method,
#leaderboard .leaderboard-table th.method-col {
  text-align: left;
  font-weight: 600;
  min-width: 170px;
}

#leaderboard .leaderboard-table td.rank,
#leaderboard .leaderboard-table th.rank-col {
  min-width: 54px;
  width: 54px;
}

#leaderboard .leaderboard-table .ref-row {
  background: #edf8f0;
  font-weight: 600;
}

#leaderboard .leaderboard-table .top1,
#leaderboard .leaderboard-table .top2,
#leaderboard .leaderboard-table .top3 {
  background: #f7ecdf;
}

#leaderboard .leaderboard-table .best {
  font-weight: 700;
  text-decoration: underline;
}

#leaderboard .model-proprietary {
  color: #c96a00;
}

#leaderboard .model-open {
  color: #2d5fd0;
}

#leaderboard .group-divider {
  border-right: 2px solid #cfcfcf !important;
}

#leaderboard .group-head {
  white-space: normal !important;
  min-width: 92px;
}

#leaderboard .group-head .abbr {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #333;
}

#leaderboard .group-head .full {
  display: block;
  font-size: 0.70rem;
  font-weight: 600;
  line-height: 1.15;
  color: #666;
  margin-top: 2px;
}

@media screen and (max-width: 768px) {
  #leaderboard .leaderboard-shell {
    width: 100%;
  }

  #leaderboard .leaderboard-card {
    padding: 16px 12px;
  }

  #leaderboard .leaderboard-title {
    font-size: 1.5rem;
  }

  #leaderboard .leaderboard-note,
  #leaderboard .leaderboard-legend,
  #leaderboard .leaderboard-subnote {
    font-size: 0.88rem;
  }

  #leaderboard .leaderboard-table {
    font-size: 0.78rem;
  }

  #leaderboard .leaderboard-table th,
  #leaderboard .leaderboard-table td {
    padding: 5px 6px;
  }

  #leaderboard .leaderboard-table td.method,
  #leaderboard .leaderboard-table th.method-col {
    min-width: 150px;
  }
}

  .section-block {
    margin: 72px auto;
    max-width: 1100px;
    padding: 0 20px;
  }

  .section-header h2 {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  .section-header p {
    font-size: 1rem;
    line-height: 1.75;
    color: #555;
    max-width: 900px;
  }

  .qa-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 28px 0 24px;
  }

  .qa-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 18px 18px 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  }

  .qa-card-label {
    font-size: 0.92rem;
    color: #666;
    margin-bottom: 8px;
  }

  .qa-card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
  }

  .qa-card-desc {
    font-size: 0.92rem;
    color: #777;
    line-height: 1.5;
  }

  .qa-panel {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 18px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  }

  .qa-panel h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
  }

  .qa-subpanel h4 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .qa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
  }

  .qa-table th,
  .qa-table td {
    border-bottom: 1px solid #ececec;
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
  }

  .qa-table th {
    background: #fafafa;
    font-weight: 600;
    color: #222;
  }

  .qa-note {
    margin-top: 14px;
    color: #666;
    font-size: 0.95rem;
  }

  .qa-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .qa-subpanel {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 18px;
  }

  .qa-list {
    margin: 0;
    padding-left: 18px;
    color: #555;
    line-height: 1.75;
  }

  .qa-highlight {
    background: #fcfcff;
    border-color: #dfe5ff;
  }

  @media (max-width: 900px) {
    .qa-cards {
      grid-template-columns: 1fr 1fr;
    }

    .qa-grid-two {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 640px) {
    .qa-cards {
      grid-template-columns: 1fr;
    }
  }

.egocot-quiz-shell {
  width: 90%;
  margin: 0 auto;
}

.egocot-quiz-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.4rem 1.4rem 1.3rem;
  box-shadow: 0 6px 24px rgba(20, 33, 61, 0.06);
}

.egocot-quiz-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.2rem;
}

.egocot-quiz-tab {
  border: none;
  background: #f1f4f8;
  color: #4a5568;
  border-radius: 12px;
  padding: 0.8rem 0.85rem;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 64px;
}

.egocot-quiz-tab:hover {
  background: #e8edf5;
}

.egocot-quiz-tab.active {
  background: #fff4dc;
  color: #d99200;
  box-shadow: inset 0 -3px 0 #f0a202;
}

.egocot-quiz-media-wrap {
  border-radius: 14px;
  overflow: hidden;
  background: #eef2f7;
}

.egocot-quiz-video {
  display: block;
  width: 100%;
  border-radius: 14px;
}

.egocot-quiz-panel {
  padding-top: 0.15rem;
}

.egocot-quiz-group {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: #edf4ff;
  color: #2f6db5;
  font-size: 0.82rem;
  font-weight: 700;
}

.egocot-quiz-subtask {
  margin: 0 0 0.8rem 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: #2c3340;
}

.egocot-quiz-question {
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.5;
  color: #2f3640;
  margin-bottom: 1rem;
}

.egocot-quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.egocot-quiz-option {
  border-radius: 12px;
  background: #f5f1df;
  border: 1px solid #ede5c7;
  padding: 0.95rem 1rem;
  font-size: 1rem;
  line-height: 1.35;
  color: #2c3340;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.egocot-quiz-option:hover {
  background: #f0ebd4;
}

.egocot-quiz-option .option-letter {
  display: inline-block;
  width: 1.4rem;
  font-weight: 800;
  color: #2c3340;
}

.egocot-quiz-option.selected-correct {
  background: #edf9f1;
  border-color: #76c893;
}

.egocot-quiz-option.selected-correct .option-letter {
  color: #238b63;
}

.egocot-quiz-option.selected-wrong {
  background: #fff1f0;
  border-color: #f2a7a1;
}

.egocot-quiz-option.selected-wrong .option-letter {
  color: #cc3a2b;
}

.egocot-quiz-option.correct-answer {
  box-shadow: inset 0 0 0 2px #76c893;
}

.egocot-quiz-result {
  display: none;
  text-align: center;
  margin-top: 0.35rem;
  margin-bottom: 1rem;
}

.egocot-quiz-result.show {
  display: block;
}

.quiz-result-label {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.quiz-result-label.correct {
  color: #1fa463;
}

.quiz-result-label.incorrect {
  color: #e3342f;
}

.quiz-result-answer {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.5;
  color: #2f3640;
}

.egocot-quiz-extra {
  display: none;
}

.egocot-quiz-extra.show {
  display: block;
}

.egocot-quiz-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.egocot-quiz-meta-item {
  background: #f8fafc;
  border: 1px solid #e5eaf0;
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
}

.meta-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 0.18rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.meta-value {
  font-size: 1rem;
  font-weight: 700;
  color: #2f3640;
}

.egocot-quiz-actions {
  margin-bottom: 0.8rem;
}

.egocot-quiz-detail {
  display: none;
  background: #fbfcfe;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  padding: 1rem 1rem 0.35rem;
}

.egocot-quiz-detail.show {
  display: block;
}

.egocot-quiz-detail-block {
  margin-bottom: 0.85rem;
}

.egocot-quiz-detail-block h4 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  color: #2c3340;
}

.egocot-quiz-detail-block p {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.7;
  color: #4a5568;
}

@media screen and (max-width: 1024px) {
  .egocot-quiz-shell {
    width: 94%;
  }

  .egocot-quiz-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .egocot-quiz-shell {
    width: 100%;
  }

  .egocot-quiz-card {
    padding: 1rem;
  }

  .egocot-quiz-tabs {
    grid-template-columns: 1fr;
  }

  .egocot-quiz-options {
    grid-template-columns: 1fr;
  }

  .egocot-quiz-subtask {
    font-size: 1.18rem;
  }

  .egocot-quiz-question {
    font-size: 1.02rem;
  }
}