/* Refreshing Summer — Coolors trending palette
   https://coolors.co/palette/ffc759-ff7b9c-607196-babfd1-e8e9ed */
:root {
  --summer-gold: #ffc759;
  --summer-coral: #ff7b9c;
  --summer-slate: #607196;
  --summer-sky: #babfd1;
  --summer-mist: #e8e9ed;

  --primary-color: #4d8fa8;
  --primary-hover: #607196;
  --secondary-color: #607196;
  --accent-color: #ff7b9c;
  --accent-warm: #ffc759;
  --text-primary: #3a4d63;
  --text-secondary: #607196;
  --text-light: #8a9bb5;
  --background-primary: #ffffff;
  --background-secondary: #f2f9fc;
  --background-accent: #fff8f0;
  --background-coral: #fff5f8;
  --border-color: #d4e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(96 113 150 / 0.06);
  --shadow-md: 0 4px 14px -2px rgb(96 113 150 / 0.12);
  --shadow-lg: 0 12px 24px -4px rgb(96 113 150 / 0.14);
  --shadow-xl: 0 20px 32px -6px rgb(96 113 150 / 0.16);
  --gradient-primary: linear-gradient(135deg, #babfd1 0%, #ffc759 45%, #ff7b9c 100%);
  --gradient-accent: linear-gradient(135deg, #ff7b9c 0%, #ffc759 100%);
  --gradient-subtle: linear-gradient(180deg, #f2f9fc 0%, #fff8f0 55%, #ffffff 100%);
  --gradient-section: linear-gradient(180deg, #f2f9fc 0%, #eef6fa 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: var(--gradient-subtle);
  background-attachment: fixed;
  -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;
}

/* Hero link buttons */
.button-container {
  color: var(--summer-slate);
  justify-content: center;
  display: flex;
  gap: 0.75em;
  padding-top: 0.75em;
  flex-wrap: wrap;
}

.button-container .button {
  color: var(--summer-slate) !important;
  font-family: 'Inter', 'Google Sans', sans-serif;
  border-radius: 0.6em;
  min-width: 9em;
  padding: 0.7em 1.2em !important;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 1em;
  font-weight: 600 !important;
  line-height: 1.2;
  border: 1px solid var(--border-color) !important;
  background-color: #ffffff !important;
  text-align: center;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: none;
  height: auto;
}

.button-container .button i {
  margin-right: 0.35em;
  color: var(--primary-color);
}

.button-container .button:hover {
  background-color: var(--background-secondary) !important;
  border-color: var(--summer-sky) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary) !important;
}

.button-container .button-soon {
  flex-direction: column;
  gap: 0.2em;
  min-width: 8.5em;
  padding: 0.55em 1em 0.5em !important;
  cursor: default;
  opacity: 0.92;
}

.button-container .button-soon:hover {
  transform: none;
  box-shadow: var(--shadow-md);
  background-color: #ffffff !important;
  border-color: var(--border-color) !important;
  color: var(--summer-slate) !important;
}

.button-soon .button-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-soon .button-soon-text {
  font-size: 0.7em;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

@media screen and (max-width: 768px) {
  .button-container {
    gap: 0.5em;
  }
  .button-container .button {
    min-width: calc(50% - 0.5em);
    flex: 1 1 calc(50% - 0.5em);
  }
}

.dnerf {
  font-variant: small-caps;
}


/* Hero Section Modernization */
.hero {
  position: relative;
  overflow: hidden;
}

.hero.is-light {
  background: var(--gradient-section);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.publication-header {
  background: linear-gradient(180deg, #ffffff 0%, #f2f9fc 100%);
}

.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;
    -webkit-text-fill-color: var(--text-primary);
}

.title-claw {
    font-family: 'Press Start 2P', cursive;
    font-weight: 400;
    font-size: 0.72em;
    letter-spacing: 0.06em;
    vertical-align: baseline;
    margin-right: 0.2em;
    display: inline-block;
    image-rendering: pixelated;
}

.publication-title .title-acronym-letter {
    -webkit-text-fill-color: currentColor;
    font-weight: 900;
}

.title-acronym-l {
    color: var(--summer-gold);
}

.title-acronym-c {
    color: var(--summer-slate);
}

.title-acronym-a {
    color: var(--summer-coral);
}

.title-acronym-w {
    color: var(--primary-color);
}

.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-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

.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,
.paper-section-authors a {
   color: var(--primary-color) !important;
   text-decoration: none;
   font-weight: 600;
   transition: var(--transition);
   position: relative;
}

.publication-authors a::after,
.paper-section-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,
.paper-section-authors a:hover::after {
    width: 100%;
}

.publication-authors a:hover,
.paper-section-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: var(--summer-slate);
}

.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: linear-gradient(135deg, var(--summer-coral), var(--summer-gold));
  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: linear-gradient(135deg, var(--summer-gold), var(--summer-coral));
  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;
  }

  .title-claw {
    font-size: 0.55em;
    display: block;
    margin: 0 0 0.5rem;
  }

  .publication-authors {
    font-size: 0.9rem !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;
}


/* Simplified page layout (CLAW) */
/* Left TOC sidebar (interactive_world_sim style) */
.section-tracker {
  position: fixed;
  left: 1.5rem;
  top: 5rem;
  width: 11rem;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.section-tracker.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.toc-item {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  padding: 0.35rem 0 0.35rem 0.75rem;
  border-left: 2px solid var(--border-color);
  transition: color 0.2s ease, border-color 0.2s ease;
  line-height: 1.3;
}

.toc-item:hover {
  color: var(--summer-slate);
  border-left-color: var(--summer-sky);
}

.toc-item.is-active {
  color: var(--primary-color);
  border-left-color: var(--summer-coral);
  font-weight: 700;
}

@media screen and (max-width: 1199px) {
  .section-tracker {
    display: none;
  }

  .toc-section {
    margin-left: 0 !important;
  }
}

.tldr-lead {
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: 44rem;
  margin: 0 auto 1.25rem;
}

.tldr-highlights > .column {
  display: flex;
}

@media screen and (max-width: 1023px) {
  .tldr-highlights > .column {
    width: 100%;
  }
}

.tldr-list {
  list-style: none;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0;
}

.tldr-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.55;
}

.tldr-list li:last-child {
  border-bottom: none;
}

.tldr-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--summer-gold), var(--summer-coral));
}

.highlight-card {
  text-align: left;
  padding: 1.25rem 1.35rem;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--summer-sky);
  height: 100%;
  display: block;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.highlight-card-link {
  text-decoration: none;
  color: inherit;
}

.highlight-card-link:hover {
  border-color: var(--summer-coral);
  border-left-color: var(--summer-coral);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  background: var(--background-coral);
}

.highlight-task {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.highlight-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.85rem !important;
}

.highlight-metric {
  margin: 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-color);
}

.highlight-metric .highlight-stat {
  display: inline;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--summer-coral);
}

.highlight-vs {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.highlight-metric-qual {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
}

.highlight-stat {
  font-weight: 800;
  color: var(--primary-color);
}

.highlight-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  line-height: 1.35;
}

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

.teaser-section .container {
  max-width: 72rem;
}

.teaser-figure {
  background: #ffffff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  padding: 1.15rem 1.25rem;
  margin: 0;
  text-align: center;
}

.teaser-figure img {
  display: block;
  width: 100%;
  border-radius: var(--border-radius);
}

.method-flashcards {
  margin-top: 2rem;
}

.method-flashcards > .column {
  display: flex;
}

.method-flashcard {
  width: 100%;
  padding: 1.25rem 1.35rem;
  background: #ffffff;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--summer-coral);
  box-shadow: var(--shadow-md);
  text-align: left;
  transition: var(--transition);
}

.method-flashcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--summer-gold);
}

.method-flashcard-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.method-flashcard-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.content-image {
  width: 100%;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.method-figure {
  margin: 0 auto;
  max-width: 52rem;
}

.method-figure-panel {
  background: #ffffff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem 1.15rem;
  text-align: center;
}

.method-diagram {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--border-radius);
}

.method-figure-panel figcaption {
  margin: 0.85rem 0 0;
  text-align: center;
}

.retrieval-figure {
  margin: 0 auto;
  max-width: 52rem;
}

.retrieval-query {
  text-align: center;
  margin-bottom: 1.25rem;
}

.retrieval-query img {
  max-width: 220px;
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.retrieval-methods {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
}

.retrieval-method {
  flex: 1 1 140px;
  max-width: 280px;
  text-align: center;
}

.retrieval-method img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.retrieval-label {
  display: block;
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.retrieval-caption {
  text-align: center;
  margin-top: 1rem;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.transfer-row {
  margin-top: 0.5rem;
  align-items: stretch;
}

.planning-examples {
  margin-top: 0.25rem;
  width: 100%;
  max-width: 100%;
}

.planning-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.5rem;
  padding: 0.25rem 0.5rem 0.75rem;
}

.planning-scroll .planning-panel {
  flex: 0 0 min(100%, 52rem);
  max-width: 100%;
  scroll-snap-align: start;
}

.planning-panel {
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  padding: 0.5rem 0.5rem 0.65rem;
  width: 100%;
}

.planning-visuals {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 0.35rem;
  align-items: stretch;
  width: 100%;
  height: clamp(7rem, 22vw, 13.5rem);
  margin-top: 0.65rem;
  margin-left: 1.25rem;
}

.planning-visual {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: var(--border-radius);
}

.planning-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.planning-captions {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 0.35rem;
  margin-top: 0.5rem;
  margin-left: 1.25rem;
}

.planning-captions figcaption {
  min-width: 0;
  text-align: center;
  margin: 0;
}

@media screen and (max-width: 768px) {
  #planning.section {
    padding: 1.75rem 1rem !important;
  }

  #planning .container.is-max-widescreen {
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #planning .content {
    margin-bottom: 1rem !important;
  }

  .planning-examples {
    overflow: hidden;
  }

  .planning-scroll {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: visible;
    gap: 1.25rem;
    padding-left: 0;
    padding-right: 0;
    scroll-snap-type: none;
  }

  .planning-scroll .planning-panel {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .planning-visuals {
    height: clamp(6rem, 30vw, 9rem);
    margin-top: 0.5rem;
    margin-left: 0.85rem;
  }

  .planning-captions {
    margin-left: 0.85rem;
  }
}

.transfer-row > .column {
  display: flex;
}

/* Latent action transfer — GIF gallery */
.transfer-showcase {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
}

.transfer-panel {
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  padding: 0.5rem 0.5rem 0.65rem;
  text-align: center;
}

.transfer-panel-selectable {
  cursor: pointer;
  transition: var(--transition);
}

.transfer-panel-selectable:hover,
.transfer-panel-selectable:focus {
  border-color: var(--summer-coral);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  outline: none;
}

.transfer-panel-selectable:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.transfer-panel-featured {
  border-color: var(--summer-sky);
  box-shadow: var(--shadow-md);
}

.transfer-panel-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 588 / 180;
  overflow: hidden;
  background: #ffffff;
  border-radius: var(--border-radius);
}

.transfer-panel-visual img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
}

.transfer-panel figcaption {
  text-align: center;
  margin: 0.5rem 0 0;
}

.transfer-showcase > .transfer-panel-featured {
  width: 100%;
  margin-bottom: 1rem;
}

.transfer-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0;
  width: 100%;
  justify-items: center;
}

.transfer-gallery .transfer-panel {
  width: 100%;
}

.transfer-flow-figure {
  margin: 2rem auto 0;
  max-width: 52rem;
}

.transfer-flow-figure figcaption {
  margin: 0 0 0.65rem;
}

.transfer-flow-panel {
  background: #ffffff;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 1rem 1.15rem;
  overflow: hidden;
}

.transfer-flow-panel .transfer-video {
  margin: 0 auto;
  box-shadow: none;
}

@media screen and (max-width: 768px) {
  .transfer-gallery {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

/* Mobile: sections below planning (transfer, retrieval, evaluation, paper) */
@media screen and (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  #main-content {
    overflow-x: hidden;
  }

  #planning ~ .section,
  #planning ~ .section.hero.is-light {
    padding: 1.75rem 1rem !important;
  }

  #transfer .container,
  #retrieval .container,
  #realworld .container,
  #environments .container,
  #paper .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #transfer .content,
  #retrieval .content,
  #realworld .content,
  #environments .content {
    margin-bottom: 1rem !important;
  }

  .transfer-panel-visual {
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    padding: 0.35rem;
  }

  .transfer-panel-visual img {
    width: 100%;
    max-height: 11rem;
    object-fit: contain;
  }

  .transfer-panel-featured {
    margin-bottom: 0.65rem;
  }

  .transfer-flow-figure {
    margin-top: 1.25rem;
    max-width: 100%;
  }

  .transfer-flow-panel {
    padding: 0.5rem;
  }

  .transfer-video {
    max-height: 14rem;
    width: 100%;
    object-fit: contain;
  }

  .retrieval-figure {
    max-width: 100%;
  }

  .retrieval-query {
    margin-bottom: 0.85rem;
  }

  .retrieval-query img {
    max-width: min(100%, 16rem);
    max-height: 9rem;
    object-fit: contain;
  }

  .retrieval-methods {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0.65rem;
    padding: 0 0.15rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .retrieval-method {
    flex: 0 0 min(72vw, 15rem);
    max-width: none;
    scroll-snap-align: start;
  }

  .retrieval-method img {
    max-height: 11rem;
    object-fit: contain;
  }

  .retrieval-caption {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .realworld-figure {
    max-width: 100%;
  }

  .realworld-video-panel {
    padding: 0.5rem;
  }

  .realworld-video {
    max-height: 16rem;
    width: 100%;
    object-fit: contain;
  }

  #environments .content-image {
    width: 100%;
    height: auto;
  }

  #paper .paper-pages {
    padding-bottom: 0.35rem;
  }
}

.transfer-media {
  margin: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
}

.transfer-visual {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.transfer-video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--background-accent);
}

video.transfer-video {
  background: #000;
}

/* Real-world policy video */
.realworld-figure {
  margin: 0 auto;
  max-width: 52rem;
}

.realworld-video-panel {
  background: #ffffff;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  padding: 1rem 1.15rem;
  overflow: hidden;
}

.realworld-video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--border-radius-lg);
  background: #000;
}

.realworld-figure > figcaption {
  margin-top: 0.75rem;
}

.transfer-media figcaption {
  flex: 0 0 auto;
  text-align: center;
  margin-top: 0.75rem;
}

@media screen and (max-width: 768px) {
  .transfer-row > .column + .column {
    margin-top: 1.5rem;
  }

  .transfer-visual {
    min-height: 0;
  }
}

/* Paper section — page rollout (TD-MPC2 style) */
.paper-section {
  text-align: center;
}

.paper-section-meta {
  margin: 0.75rem auto 1.25rem;
  max-width: 42rem;
  line-height: 1.5;
}

.paper-section-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.paper-section-authors {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.paper-pages {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 4px;
  margin: 0 auto;
  max-width: 100%;
  padding: 0.5rem 0.25rem 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.paper-page {
  display: inline-block;
  flex-shrink: 0;
  width: 96px;
  height: 124px;
  border: 1px solid #bbb;
  margin: 0;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  text-decoration: none;
}

.paper-page:hover {
  border-color: var(--summer-sky);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.paper-view-link {
  margin-top: 2rem;
  font-size: 1rem;
}

.paper-view-link a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.paper-view-link a:hover {
  color: var(--summer-coral);
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .paper-page {
    width: 80px;
    height: 104px;
  }
}

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

@media screen and (max-width: 768px) {
  .highlight-metric .highlight-stat {
    font-size: 1.2rem;
  }
}

/* Print styles */
@media print {
  .section-tracker {
    display: none;
  }

  .more-works-container {
    display: none;
  }
  
  .hero, .section {
    animation: none;
  }
  
  .button {
    background: transparent !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
  }
}



