html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans', sans-serif;
}

.section.is-light {
  background-color: #f5f5f5;
}

.footer {
  background-color: #f5f5f5;
}

/* BibTeX styling */
.bibtex-container {
  position: relative;
  background: linear-gradient(135deg, #fafbfc 0%, #f0f2f5 100%);
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bibtex-container pre {
  margin: 0;
  padding: 20px;
  padding-right: 100px;
  background: transparent;
  overflow-x: auto;
}

.bibtex-container code {
  color: #24292e;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 16px;
  background: #fff;
  color: #555;
  border: 1px solid #d1d5da;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.copy-btn:hover {
  background: #f3f4f6;
  border-color: #c1c5ca;
}

.copy-btn.copied {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

/* SVG Gallery */
.svg-gallery-container {
  margin-top: 20px;
  overflow: hidden;
  position: relative;
}

.svg-gallery-wrapper {
  display: flex;
  transition: transform 0.5s ease;
}

.svg-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  min-height: 400px;
  min-width: 100%;
  flex-shrink: 0;
}

/* Responsive grid: adjust columns based on screen size */
@media screen and (max-width: 1023px) {
  .svg-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 767px) {
  .svg-gallery-grid {
    grid-template-columns: 1fr;
  }
}

.svg-gallery-item {
  text-align: center;
}

.svg-preview-2phase {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.svg-preview-2phase img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.svg-preview-2phase img:first-child {
  animation: svgAlternate1 3s ease-in-out infinite;
}

.svg-preview-2phase img:last-child {
  animation: svgAlternate2 3s ease-in-out infinite;
}

@keyframes svgAlternate1 {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes svgAlternate2 {
  0%, 45% { opacity: 0; }
  50%, 95% { opacity: 1; }
  100% { opacity: 0; }
}

/* 3-Phase alternating animation */
.svg-preview-3phase {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.svg-preview-3phase img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

.svg-preview-3phase img:nth-child(1) {
  animation: svg3phase1 4.5s ease-in-out infinite;
}

.svg-preview-3phase img:nth-child(2) {
  animation: svg3phase2 4.5s ease-in-out infinite;
}

.svg-preview-3phase img:nth-child(3) {
  animation: svg3phase3 4.5s ease-in-out infinite;
}

@keyframes svg3phase1 {
  0%, 30% { opacity: 1; }
  33%, 97% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes svg3phase2 {
  0%, 30% { opacity: 0; }
  33%, 63% { opacity: 1; }
  66%, 100% { opacity: 0; }
}

@keyframes svg3phase3 {
  0%, 63% { opacity: 0; }
  66%, 97% { opacity: 1; }
  100% { opacity: 0; }
}

/* 3-column grid for 3-phase, bspline, vector-graph */
.svg-gallery-wrapper-3col .svg-gallery-grid {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  min-height: 250px;
}

/* Responsive grid for 3-column layouts */
@media screen and (max-width: 1023px) {
  .svg-gallery-wrapper-3col .svg-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 767px) {
  .svg-gallery-wrapper-3col .svg-gallery-grid {
    grid-template-columns: 1fr;
  }
}

.svg-gallery-item p {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
}

.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.gallery-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: #555;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  font-size: 16px;
}

.gallery-nav-btn:hover {
  background: #333;
  transform: scale(1.05);
}

.gallery-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.gallery-page-info {
  font-size: 16px;
  min-width: 60px;
  text-align: center;
}

/* Gallery button */
.gallery-btn {
  background: #fff;
  color: #363636 !important;
  border: 1px solid #dbdbdb;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.gallery-btn:hover {
  background: #f5f5f5;
  border-color: #b5b5b5;
  color: #363636 !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.gallery-btn .icon {
  margin-right: 8px;
}

/* SVG alternating animation for 2-phase */
.svg-preview {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.svg-preview img {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.svg-preview img:first-child {
  animation: alternate1 4s ease-in-out infinite;
}

.svg-preview img:last-child {
  animation: alternate2 4s ease-in-out infinite;
}

@keyframes alternate1 {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes alternate2 {
  0%, 45% { opacity: 0; }
  50%, 95% { opacity: 1; }
  100% { opacity: 0; }
}

/* SVG alternating animation for 3-phase */
.svg-preview-3 {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.svg-preview-3 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  object-fit: contain;
  opacity: 0;
}

.svg-preview-3 img:nth-child(1) {
  animation: tri1 6s ease-in-out infinite;
}

.svg-preview-3 img:nth-child(2) {
  animation: tri2 6s ease-in-out infinite;
}

.svg-preview-3 img:nth-child(3) {
  animation: tri3 6s ease-in-out infinite;
}

@keyframes tri1 {
  0%, 30% { opacity: 1; }
  33%, 97% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes tri2 {
  0%, 30% { opacity: 0; }
  33%, 63% { opacity: 1; }
  66%, 100% { opacity: 0; }
}

@keyframes tri3 {
  0%, 63% { opacity: 0; }
  66%, 97% { opacity: 1; }
  100% { opacity: 0; }
}

/* Video Carousel */
.video-carousel-container {
  max-width: 900px;
  margin: 0 auto 50px;
}

.video-wrapper {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.video-wrapper video {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

.video-wrapper video.slide-out-left {
  transform: translateX(-100%);
}

.video-wrapper video.slide-out-right {
  transform: translateX(100%);
}

.video-wrapper video.slide-in-left {
  transform: translateX(-100%);
  transition: none;
}

.video-wrapper video.slide-in-right {
  transform: translateX(100%);
  transition: none;
}

/* Carousel controls */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin-top: 25px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #555;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
  font-size: 18px;
}

.nav-btn:hover {
  background: #333;
  transform: scale(1.05);
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.counter {
  font-size: 18px;
  min-width: 100px;
  text-align: center;
}

.counter .current {
  font-weight: bold;
  font-size: 24px;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #555;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Thumbnail grid */
.thumbnail-section {
  margin-top: 20px;
}

.thumbnail-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  padding: 10px 5px;
  max-height: 180px;
  overflow-y: auto;
}

.thumbnail-strip::-webkit-scrollbar {
  width: 6px;
}

.thumbnail-strip::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.thumbnail-strip::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.thumbnail-item {
  padding: 8px 12px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  color: #666;
  transition: all 0.2s ease;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumbnail-item:hover {
  border-color: #999;
  color: #333;
}

.thumbnail-item.active {
  border-color: #333;
  color: #000;
  background: #f5f5f5;
  font-weight: bold;
}

/* Keyboard hint */
.keyboard-hint {
  margin-bottom: 10px;
  color: #999;
  font-size: 13px;
  text-align: center;
}

.keyboard-hint kbd {
  display: inline-block;
  padding: 3px 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  margin: 0 3px;
}


.footer .icon-link {
    font-size: 25px;
    color: #000;
}

.link-block a {
    margin-top: 5px;
    margin-bottom: 5px;
}

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


.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.teaser {
  font-family: 'Google Sans', sans-serif;
}


.publication-title {
}

.publication-banner {
  max-height: parent;

}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: fit;
}

.publication-header .hero-body {
}

.publication-title {
    font-family: 'Google Sans', sans-serif;
}

.publication-authors {
    font-family: 'Google Sans', sans-serif;
}

.publication-venue {
    color: #555;
    width: fit-content;
    font-weight: bold;
}

.publication-awards {
    color: #ff3860;
    width: fit-content;
    font-weight: bolder;
}

.publication-authors {
}

.publication-authors a {
   color: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
    text-decoration: underline;
}

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

.publication-banner img {
}

.publication-authors {
  /*color: #4286f4;*/
}

.publication-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;

    overflow: hidden;
    border-radius: 10px !important;
}

.publication-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.publication-body img {
}

.results-carousel {
  overflow: hidden;
}

.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: 1px solid #bbb;
  border-radius: 10px;
  padding: 0;
  font-size: 0;
}

.results-carousel video {
  margin: 0;
}


.interpolation-panel {
  background: #f5f5f5;
  border-radius: 10px;
}

.interpolation-panel .interpolation-image {
  width: 100%;
  border-radius: 5px;
}

.interpolation-video-column {
}

.interpolation-panel .slider {
  margin: 0 !important;
}

.interpolation-panel .slider {
  margin: 0 !important;
}

#interpolation-image-wrapper {
  width: 100%;
}
#interpolation-image-wrapper img {
  border-radius: 5px;
}
