/* ============================================================
   EgoDyn-Bench Project Page — TUM Corporate Design
   ============================================================ */

:root {
  /* TUM primary */
  --tum-blue:         #0065bd;
  --tum-dark-blue:    #005293;
  --tum-light-blue:   #64a0c8;
  --tum-lighter-blue: #98c6ea;
  /* TUM emphasis */
  --tum-orange:       #e37222;
  --tum-green:        #a2ad00;
  /* TUM 2022 web */
  --tum-brand-blue:   #3070B3;
  --tum-blue-dark-1:  #0A2D57;
  --tum-grey-4:       #6A757E;
  --tum-grey-7:       #DDE2E6;
  --tum-grey-8:       #EBECEF;
  --tum-grey-9:       #FBF9FA;
  /* Functional */
  --bg-light:         #f7f9fc;
  --section-alt-bg:   #dbe5f0;
  --text-primary:     #1a1a2e;
  --text-secondary:   #4a4a6a;
  --radius:           8px;
}

/* ---- Global ---- */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, sans-serif;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.section {
  padding: 3rem 1.5rem;
}

/* ---- Hero header ---- */
.hero-header {
  background: linear-gradient(135deg, var(--tum-dark-blue) 0%, var(--tum-blue) 100%);
  padding-bottom: 2.5rem;
}

.hero-header .hero-body {
  padding-top: 3rem;
}

.conference-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(4px);
}

.publication-title {
  color: white !important;
  font-weight: 800;
  font-size: 2.2rem !important;
  line-height: 1.25;
  max-width: 800px;
  margin: 0 auto 1rem;
}

.publication-authors {
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
}

.publication-authors a {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.4);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.15s;
}

.publication-authors a:hover {
  text-decoration-color: rgba(255,255,255,1);
}

.publication-tldr {
  color: #ffffff;
  font-style: italic;
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.012em;
  max-width: 740px;
  margin: 1.6rem auto 0;
}

/* ---- Affiliated organisation logos ---- */
.publication-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
}

.publication-logos a {
  display: inline-flex;
  align-items: center;
  opacity: 0.92;
  transition: opacity 0.2s;
}

.publication-logos a:hover {
  opacity: 1;
}

.publication-logos img {
  display: block;
  width: auto;
}

.logo-tum { height: 56px; }
.logo-bmw { height: 60px; }

/* AVS uses its native colors on a white card so the blue border doesn't
   disappear against the hero gradient. */
.logo-avs {
  height: 60px;
  background: #ffffff;
  border-radius: 10px;
  padding: 4px;
  box-sizing: content-box;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

@media (max-width: 600px) {
  .publication-logos { gap: 1.6rem; margin-top: 1.8rem; }
  .logo-tum { height: 40px; }
  .logo-avs { height: 44px; }
  .logo-bmw { height: 44px; }
}

.publication-links {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.publication-links .button {
  font-weight: 600;
  font-size: 0.9rem;
}

.publication-links .button[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/* ---- Teaser ---- */
.teaser-figure img {
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  max-width: 700px;
  margin: 0 auto;
  display: block;
}

.teaser-caption {
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0.8rem auto 0;
  line-height: 1.5;
}

/* ---- Abstract ---- */

.abstract-section .content p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* ---- Light section alternation ---- */
.section-light {
  background: var(--section-alt-bg);
}

/* ---- Stat cards ---- */
.stat-card {
  text-align: center;
  background: white;
  border: 1px solid var(--tum-grey-7);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  transition: box-shadow 0.2s;
}

.stat-card:hover {
  box-shadow: 0 4px 16px rgba(0,101,189,0.1);
}

.stat-card-secondary {
  background: var(--bg-light);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--tum-blue);
  line-height: 1.1;
}

.stat-number-sm {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--tum-blue);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  font-weight: 500;
}

/* ---- Question types ---- */
.category-header {
  font-weight: 700;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.8rem;
}

.cat-direct {
  background: rgba(0,101,189,0.08);
  color: var(--tum-blue);
  border-left: 4px solid var(--tum-blue);
}

.cat-comparative {
  background: rgba(227,114,34,0.08);
  color: var(--tum-orange);
  border-left: 4px solid var(--tum-orange);
}

.question-list {
  margin-left: 0.5rem;
}

.question-list li {
  padding: 0.2rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ---- Figures ---- */
figure.image img {
  border-radius: var(--radius);
}

.fig-caption {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.6rem;
}

/* ---- Results table ---- */
.results-table {
  font-size: 0.85rem;
}

.results-table thead th {
  background: var(--tum-blue);
  color: white;
  font-weight: 600;
  border: none;
  white-space: nowrap;
}

.results-table thead th:first-child {
  border-radius: var(--radius) 0 0 0;
}

.results-table thead th:last-child {
  border-radius: 0 var(--radius) 0 0;
}

.results-table tbody tr:hover {
  background: rgba(0,101,189,0.04);
}

.results-table tbody tr.has-traj {
  background: rgba(227,114,34,0.05);
}

.results-table td, .results-table th {
  vertical-align: middle;
  padding: 0.5rem 0.55rem;
}

.results-table .tag {
  font-size: 0.75rem;
  font-weight: 600;
}

.results-table thead .th-group {
  border-bottom: 2px solid rgba(255,255,255,0.4);
  padding-bottom: 0.3rem;
}

.results-table thead .th-sub {
  font-size: 0.8rem;
  font-weight: 500;
  padding-top: 0.25rem;
}

.results-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.results-table thead th.sortable:hover {
  background: #005293;
}

.results-table thead th.sortable.active-sort {
  background: #005293;
}

.results-table thead th .sort-arrow {
  font-size: 0.65em;
  opacity: 0.85;
  margin-left: 0.2em;
}

/* ---- BibTeX ---- */
.bibtex-block {
  position: relative;
  background: var(--tum-blue-dark-1);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  overflow-x: auto;
}

.bibtex-block pre {
  background: transparent;
  color: rgba(255,255,255,0.9);
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.copy-btn:hover {
  opacity: 1;
}

/* ---- Video comparisons ---- */
.video-figure video {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

/* ---- Interactive examples ---- */
#example-display {
  border: 1px solid var(--tum-grey-7);
  border-radius: var(--radius);
  background: white;
}

.example-frames .columns {
  overflow-x: auto;
}

.example-frame {
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--tum-grey-7);
}

.prediction-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  border: 1px solid var(--tum-grey-7);
  height: 100%;
}

.prediction-card .model-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.prediction-card .model-answer {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.prediction-card.is-correct {
  border-color: #48c774;
  background: rgba(72, 199, 116, 0.06);
}

.prediction-card.is-wrong {
  border-color: #f14668;
  background: rgba(241, 70, 104, 0.06);
}

/* ---- Question type tables ---- */
.question-list-table td,
.question-list-table th {
  padding: 0.35rem 0.5rem;
  vertical-align: top;
}

.question-list-table thead th {
  border-bottom: 2px solid var(--tum-grey-7);
  font-weight: 600;
  color: var(--text-secondary);
}

.question-list-table .tag {
  margin-bottom: 2px;
}

/* ---- Footer ---- */
.footer {
  padding: 2rem 1.5rem;
  background: var(--tum-grey-8);
}

.footer a {
  color: var(--tum-blue);
}

/* ---- Smooth scrolling ---- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 48px;
}

/* ---- Section nav ---- */
#nav {
  background: #f7f9fc;
  border-bottom: 1px solid var(--tum-grey-7);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  text-align: center;
  padding: 0.55rem 1rem;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* legacy IE/Edge */
}

#nav::-webkit-scrollbar {
  display: none;                  /* Chrome, Safari, modern Edge */
}

#nav a {
  display: inline-block;
  padding: 0.32rem 0.9rem;
  margin: 0 0.1rem;
  border-radius: 20px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  box-shadow: inset 0 0 0 1px transparent;
}

#nav a:hover {
  background: rgba(0, 101, 189, 0.08);
  color: var(--tum-blue);
}

#nav a.active {
  background: #ffffff;
  color: var(--tum-blue);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--tum-grey-7);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .publication-title {
    font-size: 1.6rem !important;
  }

  .stat-number {
    font-size: 2rem;
  }

  .publication-links {
    gap: 0.4rem;
  }

  .publication-links .button {
    font-size: 0.8rem;
  }
}
