@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&display=swap');

:root {
  --brand-050: #D6EAEC; /* Pale Powder Blue */
  --brand-100: #BCDEE7; /* Light Sky Blue */
  --brand-200: #9ECDDD; /* Soft Summer Blue */
  --brand-400: #83B8C7; /* Muted Steel Blue */
  --brand-text-on-strong: #ffffff;
  --text: #0f172a;
}

a {
  color: #3273dc;
}

body {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  color: var(--text);
}

.hero.is-brand {
  color: var(--brand-text-on-strong);
  background: var(--brand-400);
}

.hero.is-brand-light {
  background-color: var(--brand-050);
}

.brand {
  color: var(--brand-400);
}

.project-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.max-width-100 {
  max-width: 100% !important;
}

.project-logo img {
  height: 12em;
  width: auto;
}

.logo {
  height: 1.5em;
  margin-bottom: -0.35em;
}

@media (max-width: 768px) {
  .project-logo img {
    height: 12em;
  }
}

.publication-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 2.4rem;
  color: white;
}

.publication-authors {
  font-family: 'Google Sans', sans-serif;
}

.publication-authors a {
  color: #fefaf1 !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.hero.is-brand .publication-links a.external-link.button {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.95) !important;
  color: #0b1220 !important;
}

.hero.is-brand .publication-links a.external-link.button:hover,
.hero.is-brand .publication-links a.external-link.button:focus {
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  color: #0b1220 !important;
}

.hero.is-brand .publication-links a.external-link.button:active {
  background-color: var(--brand-050) !important;
  border-color: var(--brand-050) !important;
}

.publication-links .link-logo {
  height: 1.1em;
  width: auto;
  margin-right: 0.35em;
  vertical-align: -0.15em;
}

.tldr {
  font-size: 1.6rem;
}

.figure-overview {
  width: 95%;
  margin-top: 10px;
}

.figure-eval {
  width: 70%;
  margin-top: 10px;
  max-width: 720px;
}

@media (max-width: 768px) {
  .figure-eval {
    width: 95%;
  }
}

.centered-figure {
  display: flex;
  justify-content: center;
  align-items: center;
}

.figure-block {
  margin: 0;
}

.figure-caption {
  margin: 20px 6% 35px 6%;
  padding: 0 0 0 2%;
  border-left: thick solid var(--brand-400);
  text-align: left;
}

.figure-caption-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.figure-caption-text {
  font-weight: 400;
}

.caption {
  font-weight: bold;
  margin: 20px 6% 35px 6%;
  padding: 0 0 0 2%;
  border-left: thick solid var(--brand-400);
}

.glance-cards {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.glance-cards > .column {
  flex: 1 1 250px;
  min-width: 250px;
  width: auto;
}

.glance-card {
  height: 100%;
  text-align: center;
  border-top: 4px solid var(--brand-400);
}

.glance-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
}

.glance-label {
  margin-top: 6px;
  font-weight: 600;
  color: #334155;
}

.glance-detail {
  margin-top: 10px;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.35;
}

#leaderboard-toggle-buttons.buttons.is-centered {
  padding-top: 10px;
  padding-bottom: 0px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button.is-selected {
  background-color: var(--brand-400) !important;
  border-color: var(--brand-400) !important;
  color: #fff !important;
}

.button.is-selected:focus {
  outline: none !important;
  box-shadow: 0 0 0 0.125em rgba(131, 184, 199, 0.45) !important;
}

#leaderboard-toggle-buttons .button:not(.is-selected) {
  background-color: var(--brand-200) !important;
  border-color: var(--brand-200) !important;
  color: #0b1220 !important;
}

.table-container {
  max-height: 580px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0;
  margin-top: 10px;
}

#leaderboard-container.table-container {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.table-container table {
  width: 100%;
  table-layout: auto; 
  border-collapse: collapse;
  margin-bottom: 0;
}

#leaderboard-metrics {
  min-width: 720px;
  --model-col-max: 40vw;
}

#leaderboard-metrics th,
#leaderboard-metrics td {
  overflow: hidden;
}

#leaderboard-metrics.leaderboard-table th,
#leaderboard-metrics.leaderboard-table td {
  padding: 0.3rem 0.6rem;
  vertical-align: middle;
}

#leaderboard-metrics.leaderboard-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  box-shadow: inset 0 -1px 0 #e2e8f0;
}

#leaderboard-metrics.leaderboard-table th[data-sort-col] {
  user-select: none;
}

#leaderboard-metrics.leaderboard-table th[data-sort-col][aria-sort="ascending"]::after,
#leaderboard-metrics.leaderboard-table th[data-sort-col][aria-sort="descending"]::after {
  font-weight: 700;
  color: #0f172a;
}

#leaderboard-metrics.leaderboard-table th[data-sort-col][aria-sort="ascending"]::after {
  content: " ↑";
}

#leaderboard-metrics.leaderboard-table th[data-sort-col][aria-sort="descending"]::after {
  content: " ↓";
}

#leaderboard-metrics.leaderboard-table th.is-sorted {
  background: #eef2ff;
}

#leaderboard-metrics.leaderboard-table td {
  font-variant-numeric: tabular-nums;
}

.w-100 {
  width: 100% !important;
}

#leaderboard-metrics thead th:nth-child(1),
#leaderboard-metrics tbody td:nth-child(1) {
  width: 3.25rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  text-align: right;
  white-space: nowrap;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  height: 1.55rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.9rem;
}

.rank-badge.rank-1 {
  background: #fef3c7;
  color: #92400e;
}

.rank-badge.rank-2 {
  background: #e5e7eb;
  color: #374151;
}

.rank-badge.rank-3 {
  background: #ffedd5;
  color: #9a3412;
}

#leaderboard-metrics thead th:nth-child(2),
#leaderboard-metrics tbody td:nth-child(2) {
  max-width: var(--model-col-max);
}

th[data-sort-col] {
  cursor: pointer;
  transition: background-color 0.2s;
}

th[data-sort-col]:hover {
  background-color: #f0f7f9;
}

tbody tr:hover {
  background-color: #f0f7f9;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}

.metric .ci {
  font-size: 11px;
  color: #475569;
}

#leaderboard-metrics .model-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
}

#leaderboard-metrics .model-logo {
  height: 18px;
  width: 18px;
  flex: 0 0 auto;
}

#leaderboard-metrics .model-name {
  /* display: inline-block; */
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  #leaderboard-metrics th,
  #leaderboard-metrics td {
    padding: 0.5rem 0.5rem;
  }
}

#leaderboard-metrics thead th:nth-child(2),
#leaderboard-metrics tbody td:nth-child(2) {
  text-align: left;
}

#leaderboard-metrics thead th:nth-child(n+3),
#leaderboard-metrics tbody td:nth-child(n+3) {
  text-align: right;
}

#BibTeX {
  background: #fbfbfb;
  font-family: 'Courier New', Courier, monospace;
  border: 1px solid #ddd;
  overflow: auto;
  max-width: 80vw;
}

.footer {
  display: block;
  margin: auto;
  font-size: 12px;
  padding: 3rem 1.5rem 3rem;
}

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