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

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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;
  overflow-x: hidden;
}


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

.teaser-video {
  display: block;
  width: min(100%, 900px);
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 auto 1.5rem;
  object-fit: contain;
  border-radius: var(--border-radius);
  background: #000;
}


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

.image-text-item:not(:last-child) {
  margin-bottom: 3rem;
}

.flow-chart-image {
  display: block;
  width: min(100%, 640px);
  height: auto;
  margin: 0 auto 1.5rem;
}

.image-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.image-pair .flow-chart-image {
  width: 100%;
  margin: 0;
}

@media screen and (max-width: 768px) {
  .image-pair {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 600px) {
  .publication-links {
    justify-content: flex-start;
    width: 342px !important;
    max-width: calc(100vw - 3rem) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .project-subtitle,
  .publication-authors,
  .hero-framework,
  .publication-links .button {
    width: 342px !important;
    max-width: calc(100vw - 3rem) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .motivation-layout,
  .motivation-copy,
  .motivation-figure {
    width: 294px !important;
    max-width: calc(100vw - 6rem) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

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

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

/* LIDAR-AD project page refinements */
.project-navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.project-navbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.project-brand {
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.05rem;
}

.project-nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

.project-nav-links a {
  color: var(--text-secondary);
  font-size: 0.94rem;
  font-weight: 600;
  min-width: 0;
}

.project-nav-links a:hover,
.project-brand:hover {
  color: var(--primary-color);
}

.project-hero {
  background: #ffffff;
}

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

.publication-title {
  margin-bottom: 0.5rem !important;
}

.project-subtitle {
  color: var(--text-primary);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 auto 1.8rem;
  max-width: 980px;
  width: 100%;
  overflow-wrap: anywhere;
}

.project-affiliation {
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.affiliation-separator {
  color: var(--text-light);
  margin: 0 0.35rem;
}

.publication-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.35rem 0 2rem;
  width: 100%;
}

.coming-soon-button[disabled] {
  cursor: not-allowed;
  opacity: 0.82;
  background: #263241 !important;
}

.soon-tag {
  margin-left: 0.35rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.32);
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbd5e1;
}

.hero-framework,
.method-overview,
.demo-feature {
  margin: 0 auto;
}

.hero-framework img,
.method-overview img,
.demo-feature img {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.hero-framework img {
  max-height: 760px;
  object-fit: contain;
}

.compact-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.section-title {
  margin-bottom: 1.8rem !important;
}

.demo-feature {
  max-width: 920px;
  margin-bottom: 2rem;
}

.demo-feature img {
  display: block;
  background: #000000;
}

.demo-feature .subtitle {
  margin-top: 1rem;
  color: var(--text-secondary);
}

.section-kicker {
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.motivation-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.45fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
}

.motivation-copy p:last-child {
  color: var(--text-secondary);
  font-size: 1.04rem;
  line-height: 1.75;
}

.motivation-figure {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.motivation-figure img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.motivation-figure figcaption {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.55;
  margin-top: 0.85rem;
  text-align: center;
}

.case-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  max-width: 1280px;
  margin: 1.25rem auto 0;
}

.case-video-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.case-video-featured {
  grid-column: 1 / -1;
  box-shadow: var(--shadow-md);
}

.mixed-case-showcase {
  width: min(96vw, 1600px);
  max-width: none;
  margin: 0 auto 1.35rem;
  margin-left: 50%;
  transform: translateX(-50%);
  box-shadow: var(--shadow-lg);
}

.case-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  object-fit: contain;
  background: #0f172a;
}

.case-video-featured .case-video {
  min-height: 560px;
  max-height: 78vh;
}

.mixed-case-showcase .case-video {
  min-height: clamp(700px, 53vw, 860px);
  max-height: none;
}

.case-video-featured .case-video-copy,
.mixed-case-showcase .case-video-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.mixed-case-showcase .case-video-copy {
  padding: 1rem 1.15rem 0.75rem;
}

.mixed-case-showcase .case-video-title {
  font-size: 1.25rem;
}

.mixed-case-showcase .case-options {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.case-video-copy {
  padding: 0.9rem 1rem 0.65rem;
  border-top: 1px solid var(--border-color);
}

.case-video-copy h3 {
  color: var(--text-primary);
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.35rem;
}

.case-video-copy p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0;
}

.case-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 1rem 1rem;
}

.case-choice {
  flex: 1 1 72px;
  min-width: 72px;
  padding: 0.48rem 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  transition: var(--transition);
}

.case-choice:hover,
.case-choice.is-active {
  border-color: var(--primary-color);
  background: #eaf2ff;
  color: var(--primary-hover);
}

.risk-field-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.risk-field-figure {
  margin: 0;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.risk-field-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 6px;
}

.risk-field-figure figcaption {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.5;
  margin-top: 0.7rem;
  text-align: center;
}

.risk-video-card .case-video {
  min-height: 300px;
}

.video-switcher {
  max-width: 1280px;
  margin: 0 auto;
}

.video-stage {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #0f172a;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.video-stage video {
  display: block;
  width: 100%;
  min-height: 520px;
  max-height: 74vh;
  object-fit: contain;
  background: #0f172a;
}

.video-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.9rem 0 1.15rem;
}

.video-meta h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 800;
}

.video-meta p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.video-button-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.video-button-group {
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.video-button-group h4 {
  margin: 0 0 0.55rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 800;
}

.video-choice {
  width: 100%;
  margin: 0.18rem 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  transition: var(--transition);
}

.video-choice:hover,
.video-choice.is-active {
  border-color: var(--primary-color);
  background: #eaf2ff;
  color: var(--primary-hover);
}

.demo-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.demo-card,
.resource-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.demo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #0f172a;
}

.demo-card h3,
.resource-card h3 {
  margin: 0;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
}

.method-overview {
  max-width: 920px;
  margin-bottom: 2rem;
}

.method-overview figcaption,
.analysis-grid figcaption,
.results-figures figcaption,
.ood-grid figcaption {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.5;
  margin-top: 0.7rem;
  text-align: center;
}

.method-cards {
  display: grid;
  gap: 1.25rem;
}

.method-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.method-card-reverse .method-media {
  order: 2;
}

.method-media img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
}

.method-copy h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.method-copy p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.analysis-grid,
.results-figures,
.ood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.results-figures {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-grid figure,
.results-figures figure,
.ood-grid figure {
  margin: 0;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.analysis-grid img,
.results-figures img,
.ood-grid img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 6px;
}

.results-lead {
  color: var(--text-secondary);
  font-size: 1.08rem;
}

.result-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.6rem auto 1.2rem;
  max-width: 1180px;
}

.result-summary-grid article {
  padding: 1rem;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-sm);
}

.result-summary-grid span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-summary-grid strong {
  display: block;
  color: var(--primary-hover);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0.35rem 0;
}

.result-summary-grid p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.4;
  margin: 0;
}

.results-table-container {
  background: #ffffff;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
}

.results-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
  min-width: 1260px;
}

.results-table thead th {
  background: #172235;
  border-color: #31415a;
  color: #ffffff;
  text-align: center;
  vertical-align: middle;
}

.results-table thead tr:first-child th {
  font-size: 0.82rem;
  font-weight: 800;
}

.results-table thead tr:nth-child(2) th {
  background: #22324b;
  color: #dbeafe;
  font-size: 0.74rem;
}

.results-table td {
  border-color: #e3eaf2;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.results-table td:first-child {
  background: #f8fafc;
  color: var(--text-primary);
  text-align: left;
  font-weight: 700;
  position: sticky;
  left: 0;
  z-index: 1;
}

.ours-row {
  background: #ecfdf5 !important;
  color: #064e3b;
}

.ours-row td {
  border-top: 2px solid #34d399;
  border-bottom: 2px solid #34d399;
}

.ours-row td:first-child {
  background: #dcfce7;
  color: #064e3b;
}

.results-table tbody tr:hover td {
  background: #f2f7ff;
}

.results-table tbody tr.ours-row:hover td {
  background: #dcfce7;
}

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

.environment-panel {
  margin-top: 2.5rem;
}

.environment-panel .title {
  margin-bottom: 1.5rem;
}

.environment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.environment-grid figure {
  margin: 0;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.environment-grid img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 6px;
}

.environment-grid figcaption {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.5;
  margin-top: 0.7rem;
  text-align: center;
}

.trajectories-panel figure {
  margin: 0;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.trajectories-panel img {
  width: 100%;
  border-radius: 6px;
}

.ood-panel {
  margin-top: 2.5rem;
}

.ood-panel .title {
  text-align: center;
}

.resource-card {
  padding: 1.1rem;
}

.resource-card h3 {
  padding: 0;
  margin-bottom: 0.45rem;
}

.resource-card p {
  min-height: 4.6rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.resource-card .button {
  width: 100%;
}

.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 700;
  padding: 0.55rem 0.85rem;
}

.copy-bibtex-btn.copied {
  border-color: #16a34a;
  color: #166534;
  background: #f0fdf4;
}

#bibtex-code {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #101827;
  color: #e5e7eb;
  overflow-x: auto;
}

.funding-note {
  margin-top: 1.5rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
}

.funding-note h3 {
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.funding-note p {
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.project-footer {
  background: #101827;
  color: #cbd5e1;
}

.project-footer h4,
.project-footer a {
  color: #ffffff;
}

.template-credit {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-affiliations {
  color: #aab8cb;
  font-size: 0.9rem;
  line-height: 1.65;
}

.visit-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.35rem 0 0.75rem;
  color: #dbe4ef;
  font-size: 0.9rem;
}

.visit-counter span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.32rem 0.58rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.visit-counter strong {
  color: #ffffff;
  font-weight: 800;
}

@media screen and (max-width: 1024px) {
  .demo-grid,
  .resource-grid,
  .ood-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .motivation-layout,
  .case-video-grid,
  .risk-field-panel {
    grid-template-columns: 1fr;
  }

  .result-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-button-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-stage video {
    min-height: 420px;
  }

  .case-video-featured .case-video {
    min-height: 420px;
  }

  .mixed-case-showcase .case-video {
    min-height: 460px;
  }

  .method-card,
  .method-card-reverse {
    grid-template-columns: 1fr;
  }

  .method-card-reverse .method-media {
    order: 0;
  }
}

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

  .project-hero .container,
  .project-hero .column,
  .project-hero .hero-body {
    max-width: 100vw;
    overflow: hidden;
  }

  .project-navbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.75rem 1rem;
    max-width: 100%;
  }

  .project-nav-links {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: flex-start;
    column-gap: 0.52rem;
    row-gap: 0.45rem;
    width: 100%;
  }

  .project-nav-links a {
    font-size: 0.82rem;
    white-space: normal;
  }

  .project-hero .hero-body {
    padding-top: 2.5rem;
  }

  .project-subtitle {
    font-size: 1rem;
    line-height: 1.22;
    width: calc(100vw - 3rem);
    max-width: calc(100vw - 3rem);
    margin-left: auto;
    margin-right: auto;
  }

  .publication-title {
    font-size: 2.1rem !important;
  }

  .publication-authors,
  .author-block {
    overflow-wrap: anywhere;
    max-width: 100%;
  }

  .publication-authors {
    width: calc(100vw - 3rem);
    max-width: calc(100vw - 3rem);
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem !important;
  }

  .author-block {
    display: inline;
    margin-right: 0.25rem;
  }

  .hero-framework {
    width: calc(100vw - 3rem);
    max-width: calc(100vw - 3rem);
    margin-left: auto;
    margin-right: auto;
  }

  .hero-framework img,
  .method-overview img,
  .demo-feature img {
    max-width: 100%;
  }

  .publication-links .button {
    width: calc(100vw - 3rem);
    max-width: calc(100vw - 3rem);
    margin-left: auto;
    margin-right: auto;
  }

  .demo-grid,
  .resource-grid,
  .results-figures,
  .ood-grid {
    grid-template-columns: 1fr;
  }

  .result-summary-grid {
    grid-template-columns: 1fr;
  }

  .case-video {
    min-height: 220px;
  }

  .case-video-featured .case-video {
    min-height: 240px;
    max-height: 58vh;
  }

  .mixed-case-showcase .case-video {
    min-height: 260px;
    max-height: 58vh;
  }

  .case-video-featured .case-video-copy,
  .mixed-case-showcase .case-video-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .case-options {
    gap: 0.35rem;
  }

  .case-choice {
    flex-basis: calc(50% - 0.35rem);
  }

  .motivation-figure {
    padding: 0.7rem;
  }

  .motivation-layout,
  .motivation-copy,
  .motivation-figure {
    width: calc(100vw - 3rem);
    max-width: calc(100vw - 3rem);
    overflow: hidden;
  }

  .motivation-copy h2,
  .motivation-copy p {
    overflow-wrap: anywhere;
  }

  .video-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-button-panel {
    grid-template-columns: 1fr;
  }

  .video-stage video {
    min-height: 230px;
    max-height: 58vh;
  }

  .compact-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .environment-grid {
    grid-template-columns: 1fr;
  }

  .resource-card p {
    min-height: auto;
  }

  .bibtex-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
