/* Smooth scroll for in-page anchors */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans', sans-serif;
  color: #1f2937;
  background: #fff;
}

section[id] {
  scroll-margin-top: 4.5rem;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  border-radius: 0.4rem;
  color: #fff;
  background: #111827;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.project-navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 3.75rem;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}

.project-wordmark {
  color: #111827;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.project-navbar .navbar-item {
  color: #374151;
  font-size: 0.94rem;
  font-weight: 600;
}

.project-navbar .navbar-item:hover,
.project-navbar .navbar-item:focus {
  color: #111827;
  background: #f3f4f6;
}

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

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

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

.project-header {
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
  background: #fff;
}

.project-title {
  max-width: 960px;
  margin-bottom: 0.35rem;
  color: #111827;
  font-size: 2.5rem;
  line-height: 1.2;
  text-align: left;
}

.project-authors {
  margin-top: 0.75rem;
  color: #4b5563;
  font-size: 1rem;
  text-align: left;
}

.project-authors p {
  margin-bottom: 0.3rem;
}

.project-affiliations {
  color: #374151;
}

.equal-contribution {
  color: #6b7280;
  font-size: 0.9rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.project-links .link-block {
  display: flex;
  margin: 0;
}

.project-links .button {
  min-height: 2.5em;
  margin: 0;
}

.project-links .icon {
  margin-right: 0.25rem;
}

.project-links .icon img {
  width: 16px;
  height: 16px;
}

.release-pending {
  cursor: default;
  color: #4b5563 !important;
  border: 1px solid #d1d5db;
  opacity: 0.82;
  pointer-events: none;
}

.benchmark-summary {
  padding: 1.6rem 1.5rem;
  color: #fff;
  background: #111827;
}

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

.summary-item {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
}

.summary-item strong {
  color: #fff;
  font-family: 'Google Sans', sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.summary-item span {
  color: #d1d5db;
  font-size: 0.9rem;
  line-height: 1.25;
}

.overview-video-section,
.results-section,
.leaderboard-section,
.citation-section {
  background: #f8fafc;
}

.video-placeholder {
  display: flex;
  min-height: 19rem;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
  border: 1px dashed #94a3b8;
  border-radius: 16px;
  color: #475569;
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  text-align: left;
}

.video-placeholder-icon {
  display: inline-flex;
  width: 4.5rem;
  height: 4.5rem;
  flex: 0 0 4.5rem;
  align-items: center;
  justify-content: center;
  padding-left: 0.25rem;
  border-radius: 999px;
  color: #fff;
  background: #111827;
  font-size: 1.5rem;
}

.video-placeholder-title {
  margin-bottom: 0.35rem;
  color: #111827;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.video-placeholder-copy {
  max-width: 34rem;
}

.section-lead {
  max-width: 760px;
  margin: 0 auto 2rem;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: center;
}

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

.result-card {
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.result-card h3 {
  margin-bottom: 0.55rem;
  color: #111827;
  font-family: 'Google Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.result-card p:last-child {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.55;
}

.result-value {
  margin-bottom: 0.45rem;
  color: #2563eb;
  font-family: 'Google Sans', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.results-link {
  margin-top: 1.75rem;
  font-weight: 600;
}

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

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

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

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

/* Ensure author names center under avatar by matching container width */
.publication-authors .author-block {
  width: 128px;
  text-align: center;
}

/* Mobile author tiles use 96px avatars */
.is-hidden-tablet .author-block {
  width: 96px;
  text-align: center;
}

/* Make sections fill the viewport height and center content */
.fullheight-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Task video tile styling */
.sim-tile {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.08);
  transition: transform 180ms ease, box-shadow 220ms ease;
}

.sim-tile > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.sim-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.12);
}

/* Show controls on hover for task videos */
.sim-task-video::-webkit-media-controls {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sim-task-video:hover::-webkit-media-controls {
  opacity: 1;
}

/* Hide volume controls for task videos */
.sim-task-video::-webkit-media-controls-volume-slider,
.sim-task-video::-webkit-media-controls-mute-button {
  display: none;
}

#domain-randomization .columns > .column {
  flex: none;
  width: 25%;
}

#domain-randomization .sim-tile {
  height: auto !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  line-height: 0;
}

#domain-randomization img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

#domain-randomization .columns > .column:nth-child(3)::after,
#domain-randomization .columns > .column:nth-child(4)::after {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

#domain-randomization .columns > .column:nth-child(3)::after {
  content: "Object Placement";
}

#domain-randomization .columns > .column:nth-child(4)::after {
  content: "Object Color";
}

.placeholder-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #fff;
}

.placeholder-panel .title {
  margin-bottom: 0.65rem;
}

.placeholder-panel p:not(.eyebrow) {
  max-width: 700px;
  color: #475569;
  line-height: 1.65;
}

.eyebrow {
  margin-bottom: 0.45rem;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.citation-block {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.citation-block pre {
  overflow-x: auto;
  padding: 3.5rem 1.5rem 1.5rem;
  border-radius: 12px;
  color: #e5e7eb;
  background: #111827;
  font-size: 0.82rem;
  line-height: 1.6;
  white-space: pre;
}

.citation-copy {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 1;
  border-color: #475569;
  color: #e5e7eb;
  background: #1f2937;
}

.citation-copy:hover,
.citation-copy:focus {
  color: #fff;
  border-color: #94a3b8;
  background: #334155;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .sim-tile {
    transition: none !important;
  }
  .sim-tile:hover {
    transform: none !important;
  }
}

@media screen and (max-width: 768px) {
  .project-navbar .navbar-menu {
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  }

  .project-header {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }

  .project-title {
    font-size: 1.8rem;
  }

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

  .summary-item {
    align-items: center;
    flex-direction: column;
    gap: 0.3rem;
  }

  .video-placeholder {
    min-height: 15rem;
    flex-direction: column;
    text-align: center;
  }

  #tasks .column,
  #disturbances .column,
  #embodiments .column {
    width: 100%;
    flex: none;
  }

  #domain-randomization .columns > .column {
    width: 50%;
  }

  .placeholder-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .project-links {
    align-items: stretch;
    flex-direction: column;
  }

  .project-links .link-block,
  .project-links .button {
    width: 100%;
  }

  .project-links .button {
    justify-content: center;
  }
}
