/* 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%);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 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;
}

/* Navigation */
.navbar {
  background-color: var(--background-primary);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-menu {
  display: flex;
  justify-content: center;
  align-items: center;
}

.navbar-start {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
}

.navbar-item {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.navbar-item:hover {
  color: var(--primary-color);
  background-color: transparent;
}

.navbar-burger {
  display: none;
}

/* Navbar Dropdown */
.navbar-item.has-dropdown {
  position: relative;
  padding: 0;
}

.navbar-item.has-dropdown.is-hoverable:hover .navbar-dropdown {
  display: block;
}

/* Allow dropdown to be shown when activated (for mobile/touch) */
.navbar-item.has-dropdown.is-active .navbar-dropdown,
.navbar-menu.is-active .navbar-item.has-dropdown .navbar-dropdown {
  display: block;
}

.navbar-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.navbar-link:hover {
  color: var(--primary-color);
}

.navbar-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  min-width: 200px;
  display: none;
  z-index: 20;
  margin-top: 0;
  pointer-events: auto;
}

.navbar-dropdown .navbar-item {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
  pointer-events: auto;
  cursor: pointer;
}

.navbar-dropdown .navbar-item:hover {
  background-color: var(--background-secondary);
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  padding: 1rem 1.5rem;        /* was 4rem 1.5rem */
}

.hero-body {
  padding: 0.5rem 0;             /* was 2rem 0 */
}

.publication-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.publication-authors {
  margin: 1rem 0;
  font-size: 1.25rem;
  font-weight: normal;
  color: #333;
  line-height: 1.6;
}

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

.author-block a {
  color: #0066cc;
  text-decoration: none;
}

.author-block a:hover {
  color: #0066cc;
  text-decoration: underline;
}

.author-block sup {
  font-size: 0.75em;
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
}

.publication-links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.link-block {
  margin: 0.5rem;
}

.publication-links .button {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.publication-links .button .icon {
  margin-right: 0.5rem;
}

.button {
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid #ddd;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.button .icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.button.is-dark {
  background: #333;
  border-color: #333;
  color: white;
  box-shadow: none;
}

.button.is-dark:hover {
  background: #555;
  border-color: #555;
  transform: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.button.is-medium {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.button.is-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Teaser Section */
.hero.teaser {
  background: var(--background-primary);
  padding: 2rem 1.5rem;
}

.hero.teaser video {
  width: 100%;
  max-width: 1200px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
}

.hero.teaser .subtitle {
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.25rem;
}

/* Section Styling */
.section {
  padding: 1rem 1.5rem;
  background: var(--background-primary);
  scroll-margin-top: 100px;
}

.title {
  color: var(--text-primary);
  font-weight: 700;
}

.title.is-3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.title.is-4 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Abstract */
.abstract-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.gallery-item {
  background: var(--background-accent);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-item video,
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-item .caption {
  padding: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
}

.gallery-subsection {
  margin-bottom: 2rem;
  scroll-margin-top: 100px;
}

.gallery-subsection video {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-subsection .columns {
  align-items: flex-start;
}

.gallery-subsection img {
  display: block;
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-video {
  width: 100%;
  height: auto;
  display: block;
}

.is-vcentered {
  align-items: center;
}

/* Carousel */
.carousel {
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.carousel .item {
  text-align: center;
  display: none;
}

.carousel .item.is-active {
  display: block;
}

.carousel .item img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  display: block;
  margin: 0 auto;
}

/* OSMO Gallery Container */
.osmo-gallery-container {
  width: 100%;
}

.osmo-gallery .gallery-slide-content {
  display: flex;
  gap: 2rem;
  align-items: center;    /* ← fix vertical centering everywhere */
}

.osmo-gallery .gallery-image-wrapper {
  flex: 0 0 auto;
  width: 40%;
  max-width: 500px;
  display: flex;
  align-items: flex-start;
}

.osmo-gallery .gallery-image-wrapper {
  position: relative;
}

.osmo-gallery .gallery-image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 22em; /* Constrain to approximately 1.3x text height (1.7em line-height * ~10 lines * 1.3) */
  box-shadow: none;
}

.osmo-gallery .gallery-caption {
  flex: 1;
  display: block;
  align-self: flex-start;
}

.osmo-gallery .gallery-caption-fullwidth {
  flex: 1 1 100%;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.osmo-gallery .gallery-caption-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
}

.osmo-gallery .gallery-caption p {
  margin: 0;
  line-height: 1.7;
  font-size: 1rem;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.carousel-nav-button {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

.carousel-nav-button:hover {
  background: var(--primary-hover);
  transform: scale(1.1);
}

.carousel-nav-button:active {
  transform: scale(0.95);
}

.carousel-indicator {
  color: var(--text-secondary);
  font-size: 0.9rem;
  min-width: 3rem;
  text-align: center;
}

/* BibTeX Section */
.bibtex-container {
  position: relative;
  background: var(--background-accent);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border-left: 4px solid var(--primary-color);
}

.copy-bibtex {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
}

.copy-bibtex:hover {
  background: var(--primary-hover);
}

.bibtex {
  background: var(--background-primary);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  white-space: pre-wrap;
  color: var(--text-primary);
  margin-top: 2.5rem;
  border: 1px solid var(--border-color);
}

/* Technical Details */
.tech-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.tech-link {
  background: var(--primary-color);
  color: white;
  border: none;
  transition: var(--transition);
}

.tech-link:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tech-section {
  display: none;
  margin-top: 2rem;
  padding: 2rem;
  background: var(--background-accent);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  animation: fadeIn 0.3s ease-in;
}

.tech-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tech-section ul {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}

.tech-section li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.tech-section li:last-child {
  border-bottom: none;
}

.tech-section a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.tech-section a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.tech-section .icon {
  margin-right: 0.5rem;
}

/* Footer */
.footer {
  background: var(--background-primary);
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

.footer .content {
  color: var(--text-secondary);
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
}

.is-max-desktop {
  max-width: 1100px;
  margin: 0 auto;
}

.columns {
  display: flex;
}

.column {
  flex: 1;
}

.is-centered {
  justify-content: center;
}

.has-text-centered {
  text-align: center;
}

.has-text-justified {
  text-align: justify;
}

.is-four-fifths {
  width: 80%;
}

.is-half {
  width: 50%;
}

.is-two-fifths {
  width: 40%;
}

.is-three-fifths {
  width: 60%;
}

.is-one-third {
  width: 33.333%;
}

.is-two-thirds {
  width: 66.667%;
}

.is-one-quarter {
  width: 25%;
}

.is-three-quarters {
  width: 75%;
}

/* Make vcentered columns truly center their children */
.columns.is-vcentered {
  align-items: center;
}

/* Remove the extra top margin that breaks visual centering */
.columns.is-vcentered .column > p:first-child {
  margin-top: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-burger {
    display: block;
  }

  .navbar-menu {
    display: none;
  }

  .navbar-menu.is-active {
    display: block;
  }

  .publication-title {
    font-size: 1.75rem;
  }

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

  .publication-links {
    flex-direction: column;
    align-items: center;
  }

  .gallery-subsection .columns {
    flex-direction: column;
  }

  .gallery-subsection .column.is-half,
  .gallery-subsection .column.is-two-fifths,
  .gallery-subsection .column.is-three-fifths,
  .gallery-subsection .column.is-one-third,
  .gallery-subsection .column.is-two-thirds,
  .gallery-subsection .column.is-one-quarter,
  .gallery-subsection .column.is-three-quarters {
    width: 100%;
    margin-bottom: 2rem;
  }

  .is-half,
  .is-two-fifths,
  .is-three-fifths,
  .is-one-third,
  .is-two-thirds,
  .is-one-quarter,
  .is-three-quarters {
    width: 100%;
  }

  .tech-links {
    flex-direction: column;
  }

  .tech-link {
    width: 100%;
  }

  .bibtex-container {
    padding: 1rem;
  }

  .copy-bibtex {
    position: relative;
    top: 0;
    right: 0;
    margin-bottom: 1rem;
  }

  .osmo-gallery .gallery-slide-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .osmo-gallery .gallery-image-wrapper {
    width: 100%;
    max-width: 100%;
  }

  .osmo-gallery .gallery-image-wrapper img {
    max-height: none;
  }

  .osmo-gallery .gallery-caption {
    width: 100%;
  }

  .osmo-gallery .gallery-caption-fullwidth {
    max-width: 100%;
  }
}

/* Utility Classes */
.content {
  max-width: 100%;
}

.content ul {
  margin-left: 1.5rem;
}

.content p {
  margin-bottom: 1rem;
}

