/* ============================================================
   ENC-Bench Project Page — Custom Styles
   Color: #1a2744 (navy), white background, Inter font
   ============================================================ */

/* ============================================================
   1. GLOBAL BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #333;
  line-height: 1.65;
  background: #fff;
}

.section {
  padding: 4rem 1.5rem;
}

/* ============================================================
   2. TYPOGRAPHY
   ============================================================ */
.enc-section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a2744;
  margin-bottom: 0.5rem;
  padding-bottom: 0.55rem;
  border-bottom: 3px solid #1a2744;
  display: inline-block;
}

.enc-section-subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 2rem;
  margin-top: 0.5rem;
  line-height: 1.7;
}

/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */
.enc-section-white { background: #ffffff; }
.enc-section-light  { background: #f6f8fc; }

.enc-full-img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(26, 39, 68, 0.12);
  display: block;
}

.enc-figcaption {
  margin-top: 0.9rem;
  font-size: 0.87rem;
  color: #666;
  line-height: 1.65;
  text-align: center;
}

/* Fade-in on scroll */
.enc-fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.enc-fade-in.enc-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   4. STICKY NAV
   ============================================================ */
.enc-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #e4e8f4;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.enc-nav-brand {
  font-weight: 800;
  color: #1a2744;
  font-size: 0.95rem;
  letter-spacing: -0.3px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.enc-nav-cvpr {
  font-size: 0.72rem;
  font-weight: 700;
  background: #1a2744;
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  vertical-align: middle;
  line-height: 1.8;
}

.enc-nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.enc-nav-links a {
  font-size: 0.85rem;
  color: #555;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.enc-nav-links a:hover,
.enc-nav-links a.enc-nav-active {
  color: #1a2744;
  font-weight: 600;
}

/* ============================================================
   5. HERO
   ============================================================ */
.enc-hero {
  background: #fff;
  border-bottom: 1px solid #e8eaf0;
  padding: 3.5rem 1.5rem 0;
}

.enc-conference-badge {
  display: inline-block;
  background: #1a2744;
  color: #fff;
  border-radius: 20px;
  padding: 5px 20px;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.enc-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1a2744;
  line-height: 1.24;
  margin-bottom: 1.4rem;
}

.enc-authors {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 0.4rem;
  line-height: 1.9;
}

.enc-author { white-space: nowrap; }

.enc-author-link {
  color: #1a2744;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s;
}
.enc-author-link:hover { border-bottom-color: #1a2744; }

.enc-author-note {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 1rem;
}

.enc-affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.enc-affil-badge {
  background: #f0f2f8;
  border: 1px solid #d0d5e8;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.82rem;
  color: #1a2744;
  font-weight: 500;
}

/* Button row */
.enc-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.enc-btn-primary {
  background: #1a2744 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
  padding: 0.6rem 1.4rem !important;
  transition: background 0.2s, box-shadow 0.2s !important;
  box-shadow: 0 2px 8px rgba(26,39,68,0.25) !important;
}
.enc-btn-primary:hover {
  background: #253a6e !important;
  box-shadow: 0 4px 16px rgba(26,39,68,0.35) !important;
}

.enc-btn-secondary {
  background: #fff !important;
  color: #1a2744 !important;
  border: 2px solid #1a2744 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
  padding: 0.6rem 1.4rem !important;
  transition: background 0.2s, color 0.2s !important;
}
.enc-btn-secondary:hover {
  background: #1a2744 !important;
  color: #fff !important;
}

.enc-btn-outline {
  background: transparent !important;
  color: #555 !important;
  border: 2px solid #ccc !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
  padding: 0.6rem 1.4rem !important;
  transition: border-color 0.2s, color 0.2s !important;
}
.enc-btn-outline:hover {
  border-color: #1a2744 !important;
  color: #1a2744 !important;
}

/* CVPR venue photo in hero */
.enc-venue-bar {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}

.enc-venue-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  display: block;
  filter: brightness(0.55);
}

.enc-venue-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.enc-venue-text {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* ============================================================
   6. TEASER
   ============================================================ */
.enc-teaser-figure { margin: 0; }

/* ============================================================
   7. ABSTRACT
   ============================================================ */
.enc-abstract-body {
  font-size: 1.02rem;
  line-height: 1.85;
  color: #333;
  max-width: 820px;
  margin: 0 auto;
}
.enc-abstract-body p { margin-bottom: 1rem; }

/* ============================================================
   8. STATS BAR
   ============================================================ */
.enc-stats-section {
  background: #1a2744;
  padding: 2.4rem 1.5rem;
}

.enc-stats-heading {
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.enc-stats-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;      /* force single row */
  max-width: 860px;
  margin: 0 auto;
}

.enc-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 3.5rem;
}

.enc-stat-number {
  font-size: 2.7rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
}

.enc-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  margin-top: 0.45rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 500;
}

.enc-stat-divider {
  width: 1px;
  height: 52px;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
}

/* ============================================================
   9. PIPELINE
   ============================================================ */
.enc-pipeline-img {
  max-width: 100%;
}

/* ============================================================
   10. COMPARISON SLIDER
   ============================================================ */
.enc-slider-wrapper {
  max-width: 100%;
  margin: 0 auto 2rem;
}

img-comparison-slider {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 32px rgba(26,39,68,0.18);
  --divider-width: 4px;
  --divider-color: #e83535;
  --handle-background-color: #e83535;
  --handle-shadow: 0 0 0 4px rgba(232,53,53,0.28);
}

.enc-slider-panel {
  position: relative;
  overflow: hidden;
}

.enc-slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 320px;
  max-height: 480px;
}

.enc-slider-label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(26, 39, 68, 0.82);
  color: #fff;
  padding: 5px 14px;
  border-radius: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.enc-slider-label--right {
  left: auto;
  right: 14px;
}

/* Lighting modes */
.enc-lighting-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.enc-lighting-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a2744;
  margin-bottom: 0.3rem;
}

.enc-lighting-subtitle {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1.2rem;
}

.enc-lighting-grid {
  gap: 1rem;
}

.enc-lighting-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 16px rgba(26,39,68,0.1);
  background: #fff;
}

.enc-lighting-img {
  width: 100%;
  display: block;
  height: 200px;
  object-fit: cover;
}

.enc-lighting-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  padding: 8px 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.enc-mode-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.enc-mode-day   { background: #f5c842; }
.enc-mode-dusk  { background: #e07040; }
.enc-mode-night { background: #2d6ec7; }

/* ============================================================
   11. BENCHMARK RESULTS
   ============================================================ */
.enc-results-figure { margin-bottom: 0; }

/* ============================================================
   12. BIBTEX
   ============================================================ */
.enc-bibtex-wrapper {
  border: 1px solid #d0d5e8;
  border-radius: 10px;
  overflow: hidden;
  max-width: 820px;
  margin: 0 auto;
}

.enc-bibtex-header {
  background: #1a2744;
  padding: 0.7rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.enc-bibtex-label {
  color: rgba(255,255,255,0.85);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.enc-copy-btn {
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  border-radius: 5px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}
.enc-copy-btn:hover { background: rgba(255,255,255,0.22) !important; }
.enc-copy-btn.is-success {
  background: #48c774 !important;
  border-color: #48c774 !important;
}

.enc-bibtex-block {
  background: #f7f8fc;
  padding: 1.5rem 1.6rem;
  margin: 0;
  font-family: 'Courier New', 'Lucida Console', Courier, monospace;
  font-size: 0.84rem;
  line-height: 1.7;
  color: #2d3a50;
  overflow-x: auto;
  white-space: pre;
  border-radius: 0;
}
.enc-bibtex-block code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ============================================================
   13. AUTHOR CARDS
   ============================================================ */
.enc-author-grid { row-gap: 1.5rem !important; }
.enc-author-card-col { padding: 0.5rem !important; }

.enc-author-card {
  text-align: center;
  padding: 1.4rem 1rem 1.2rem;
  border-radius: 12px;
  border: 1px solid #e4e8f4;
  background: #fff;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
  height: 100%;
}
.enc-author-card:hover {
  box-shadow: 0 6px 20px rgba(26,39,68,0.12);
  transform: translateY(-2px);
}

.enc-author-card--contact {
  border: 2px solid #1a2744;
  background: #f9faff;
}

.enc-author-photo-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.9rem;
  border: 3px solid #e4e8f4;
}
.enc-author-card--contact .enc-author-photo-wrap { border-color: #1a2744; }

.enc-author-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.enc-photo-initials {
  width: 100%;
  height: 100%;
  background: #1a2744;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.enc-author-name {
  font-weight: 700;
  color: #1a2744;
  font-size: 0.93rem;
  margin-bottom: 0.15rem;
}

.enc-author-affil {
  font-size: 0.77rem;
  color: #999;
}

.enc-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: #1a2744;
  text-decoration: none;
  margin-top: 0.6rem;
  word-break: break-all;
  transition: opacity 0.2s;
}
.enc-contact-link:hover { opacity: 0.7; text-decoration: underline; }

/* ============================================================
   14. VISITOR MAP
   ============================================================ */
.enc-visitor-map-section {
  background: #f6f8fc;
  padding: 3rem 1.5rem;
  border-top: 1px solid #e4e8f4;
  text-align: center;
}

.enc-visitor-label {
  font-size: 0.75rem;
  color: #bbb;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.enc-clustrmap-container {
  display: inline-block;
  max-width: 400px;
}

/* ============================================================
   15. FOOTER
   ============================================================ */
.enc-footer {
  background: #1a2744;
  color: rgba(255,255,255,0.5);
  padding: 1.4rem 1.5rem;
  font-size: 0.82rem;
  text-align: center;
}
.enc-footer a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  transition: color 0.2s;
}
.enc-footer a:hover { color: #fff; }

/* ============================================================
   16. SIMPLELIGHTBOX OVERRIDES
   ============================================================ */
.sl-overlay { background: rgba(10, 16, 35, 0.94) !important; }
.sl-close, .sl-navigation button { color: #fff !important; }
.sl-caption { background: rgba(26,39,68,0.85) !important; color: #fff !important; }

/* ============================================================
   17. DATA COLUMNS
   ============================================================ */
.enc-data-columns { gap: 1.5rem; }

/* ============================================================
   18. HOVER & MOTION EFFECTS
   ============================================================ */

/* Lighting mode cards — image zoom on hover */
.enc-lighting-card {
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.enc-lighting-card:hover {
  box-shadow: 0 8px 28px rgba(26,39,68,0.18);
  transform: translateY(-3px);
}
.enc-lighting-card .enc-lighting-img {
  transition: transform 0.45s ease;
}
.enc-lighting-card:hover .enc-lighting-img {
  transform: scale(1.06);
}
.enc-lighting-link {
  display: block;
  overflow: hidden;
  cursor: zoom-in;
}

/* Full-width figures — subtle lift on hover */
.enc-full-img {
  transition: box-shadow 0.35s ease, transform 0.35s ease;
  will-change: transform;
}
figure:hover .enc-full-img {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(26,39,68,0.18);
}

/* Author cards — photo scale on hover */
.enc-author-card .enc-author-photo-wrap {
  transition: transform 0.3s ease;
}
.enc-author-card:hover .enc-author-photo-wrap {
  transform: scale(1.05);
}

/* Breathing animation for contact avatar border */
@keyframes enc-pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26,39,68,0.25); }
  50%       { box-shadow: 0 0 0 7px rgba(26,39,68,0.07); }
}

/* Stat items — number glow on hover */
.enc-stat-item {
  transition: transform 0.25s ease;
}
.enc-stat-item:hover {
  transform: translateY(-3px);
}
.enc-stat-item:hover .enc-stat-number {
  text-shadow: 0 0 24px rgba(255,255,255,0.5);
}

/* ============================================================
   19. CONTACT SECTION
   ============================================================ */
.enc-contact-card {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e4e8f4;
  border-left: 4px solid #1a2744;
  border-radius: 14px;
  padding: 2.2rem 2.4rem;
  box-shadow: 0 4px 24px rgba(26,39,68,0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.enc-contact-card:hover {
  box-shadow: 0 10px 36px rgba(26,39,68,0.14);
  transform: translateY(-2px);
}

.enc-contact-person {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin-bottom: 1.4rem;
}

.enc-contact-avatar {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #1a2744;
  animation: enc-pulse-border 3s ease-in-out infinite;
}
.enc-contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.enc-contact-details {
  flex: 1;
}

.enc-contact-name {
  font-size: 1.18rem;
  font-weight: 700;
  color: #1a2744;
  margin-bottom: 0.2rem;
}

.enc-contact-role {
  font-size: 0.88rem;
  color: #888;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.enc-contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #1a2744;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.enc-contact-email-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.enc-contact-note {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.75;
  border-top: 1px solid #eef0f7;
  padding-top: 1.2rem;
  margin-top: 0;
}

@media (max-width: 540px) {
  .enc-contact-person {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .enc-contact-card {
    padding: 1.6rem 1.4rem;
  }
}

/* ============================================================
   21. MORE WORKS DROPDOWN
   ============================================================ */
.more-works-container {
  position: fixed;
  top: 4.2rem;
  right: 1.5rem;
  z-index: 1000;
}

.more-works-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.95);
  border: 1px solid #e4e8f4;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a2744;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,39,68,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  font-family: inherit;
}
.more-works-btn:hover {
  background: #1a2744;
  color: #fff;
  border-color: #1a2744;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(26,39,68,0.22);
}
.more-works-btn i { font-size: 0.8rem; }

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: #fff;
  border: 1px solid #e4e8f4;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(26,39,68,0.18);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s ease;
}
.more-works-dropdown.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e4e8f4;
}

.work-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
}
.work-item:hover {
  background: #f6f8fc;
  transform: translateX(4px);
}

.work-item-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 2px;
}
.work-item-badge--aaai { background: #fde8e8; color: #c0392b; }
.work-item-badge--aied { background: #e0f7f4; color: #0d7a6a; }
.work-item-badge--gh   { background: #f0f0f0; color: #24292e; }

.work-item-info strong {
  display: block;
  font-size: 0.85rem;
  color: #1a2744;
}
.work-item-info span {
  font-size: 0.78rem;
  color: #888;
}

@media (max-width: 480px) {
  .more-works-container { top: 3.8rem; right: 1rem; }
  .more-works-dropdown { width: 260px; }
}
@media (max-width: 900px) {
  .enc-stat-item { padding: 0 1.8rem; }
  .enc-stat-number { font-size: 2.2rem; }
}

@media (max-width: 768px) {
  .enc-title { font-size: 1.5rem; }
  .enc-section-title { font-size: 1.4rem; }

  /* Stats: switch to 2x2 grid on mobile */
  .enc-stats-inner {
    flex-wrap: wrap;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    justify-items: center;
  }
  .enc-stat-divider { display: none; }
  .enc-stat-item { padding: 0.6rem 1rem; }
  .enc-stat-number { font-size: 2rem; }

  .enc-slider-img { min-height: 200px; max-height: 280px; }

  .enc-nav-links { display: none; }

  .enc-venue-bar { height: 80px; }

  .enc-lighting-img { height: 150px; }

  .enc-author-card-col { padding: 0.4rem !important; }

  .enc-button-row .button {
    font-size: 0.82rem !important;
    padding: 0.5rem 1rem !important;
  }
}

@media (max-width: 480px) {
  .enc-bibtex-block { font-size: 0.7rem; padding: 1rem; }
  .enc-stat-number { font-size: 1.7rem; }
  .enc-venue-bar { display: none; }
}
