body {
  font-family: 'Times New Roman', Times, serif;
}

/* ===== Hero banner with background video ===== */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 1;
  pointer-events: none;
}

.hero-banner {
  position: relative;
  aspect-ratio: 5 / 3;
}

.hero-banner .hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-banner .hero-bg-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-banner .hero-head,
.hero-banner .hero-body {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
}

.hero-banner .hero-head {
  top: 0;
}

.hero-banner .hero-body {
  top: 50%;
  transform: translateY(-55%);
}

@media screen and (max-width: 768px) {
  .hero-banner {
    aspect-ratio: auto;
    min-height: 100vh;
  }
}

/* ===== End hero ===== */

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

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

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

/* Reduce gap between abstract and greatest hits */
.greatest-hits-section {
  padding-top: 1rem;
}

/* Greatest hits square video — centered at reduced width */
.greatest-hits-video {
  position: relative;
  max-width: 60%;
  margin: 0 auto 2rem;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

/* Full dark overlay — fades after 2s */
.gh-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  pointer-events: auto;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.gh-overlay-text {
  color: #fff;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  pointer-events: none; /* let clicks pass through to the overlay div */
}

.gh-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}


.greatest-hits-video video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

@media screen and (max-width: 768px) {
  .greatest-hits-video {
    max-width: 90%;
  }
}


.teaser {
  font-family: 'Times New Roman', Times, 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: 'Times New Roman', Times, serif;
}

.publication-authors {
    font-family: 'Times New Roman', Times, 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 {
}

.teaser-video {
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
}

.splash-video {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.results-carousel {
  overflow: hidden;
  margin-bottom: 30px;
}

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

.results-carousel video {
  margin: 0;
  margin-bottom: -5px;
}


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

/* Video layout section */
.t {
  width: 100%;
  margin-bottom: 2rem;
}

/* Make the unordered list more flexible */
.t ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style-type: none;
}

/* Base styling for all list items */
.t li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem;
  box-sizing: border-box;
}

/* Standardize video container styling */
.t li > div {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
}

/* Make all videos responsive within their containers */
.t video {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Specific category sizing */
/* For grasping tasks - 2 videos per row on desktop */
.t li.grasp-item,
.t li.OOD-item,
.t li.ablation-suff-item {
  width: 50%;
}

.t li.robust-bg-item,
.t li.robust-perturb-item,
.t li.ablation-suff-item {
  width: 33%;
}

/* For non-prehensile tasks - 4 videos per row on desktop */
.t li.non-prehensile-item,
.t li.robust-misc-item, 
.t li.ablation-obj-item,
.t li.ablation-premanip-item {
  width: 25%;
}

/* For multi-step tasks - 1 video per row */
.t li.multi-step-item {
  width: 75%;
  max-width: 800px;
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
  .t li.non-prehensile-item {
    width: 33.33%;
  }
}

@media screen and (max-width: 900px) {
  .t li.grasp-item {
    width: 100%;
  }
  
  .t li.non-prehensile-item {
    width: 50%;
  }
  
  .t li.multi-step-item {
    width: 100%;
  }
}

@media screen and (max-width: 600px) {
  .t li.non-prehensile-item {
    width: 100%;
  }
}

/* Fix for old class names to ensure backward compatibility */
.t li .grasp,
.t li .non-prehensile,
.t li .multi-step,
.t li .item-plate-push,
.t li .robustness,
.t li .item-OOD {
  width: 100%;
  height: auto;
  margin: 0 0 1rem 0;
}

/* Tool category section */
.tool-category-section {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

.tool-category-section .subtitle {
  color: #666;
  margin-bottom: 1rem;
}

/* Tool category pill buttons */
.tool-category-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.tool-btn {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.55rem 1.4rem;
  border: 2px solid #dbdbdb;
  border-radius: 24px;
  background: #fff;
  color: #4a4a4a;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1;
}

.tool-btn i {
  font-size: 0.85rem;
  transition: color 0.25s ease;
}

.tool-btn:hover {
  border-color: hsl(204, 86%, 53%);
  color: hsl(204, 86%, 53%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(32, 156, 238, 0.15);
}

.tool-btn.active {
  background: hsl(204, 86%, 53%);
  border-color: hsl(204, 86%, 53%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(32, 156, 238, 0.3);
}

.tool-btn.active i {
  color: #fff;
}

/* Video player container */
.tool-video-container {
  position: relative;
  max-width: 85%;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tool-video-container video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  transition: opacity 0.3s ease;
}

.tool-video-container video.switching {
  opacity: 0.4;
}

.tool-video-caption {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.9rem;
  color: #888;
  margin-top: 0.75rem;
  text-align: center;
}

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

@media screen and (max-width: 600px) {
  .tool-btn {
    font-size: 0.875rem;
    padding: 0.4rem 1rem;
    gap: 0.3rem;
  }

  .tool-btn i {
    font-size: 0.75rem;
  }
}

/* Approach / method video sections */
.approach-section {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.approach-video-container {
  position: relative;
  max-width: 85%;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.approach-video-container video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.failure-speed-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  background: #000;
  color: #fff;
  border-radius: 2px;
  padding: 0.5rem 0.95rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

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

iframe {
  display: block;
}

/* Medium screens (two videos per row) */
@media (max-width: 1024px) {
  li {
    width: 48%; /* Two videos per row */
  }
}

/* Small screens (one video per row) */
@media (max-width: 600px) {
  li {
    width: 100%; /* Full width */
  }
}