/* ============================================================
   PITA – Physics-Informed Terrain Affordance
   Project website stylesheet
   ============================================================ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=Noto+Sans:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --pita-indigo: #1a237e;
  --pita-blue: #283593;
  --pita-accent: #3949ab;
  --pita-light: #e8eaf6;
  --pita-teal: #00796b;
  --text-dark: #212121;
  --text-muted: #616161;
  --bg-gray: #f5f5f5;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.09);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans', sans-serif;
  color: var(--text-dark);
  background: #fff;
}

/* ── Hero ── */
.hero-paper {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: url('../images/teaser_vf_14.png') center center / cover no-repeat fixed;
  overflow: hidden;
}

.hero-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
      rgba(26, 35, 126, 0.82) 0%,
      rgba(26, 35, 126, 0.65) 50%,
      rgba(0, 0, 0, 0.70) 100%);
  z-index: 0;
}

.hero-paper .hero-navbar,
.hero-paper .hero-body-content {
  position: relative;
  z-index: 1;
}

.hero-navbar {
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-navbar a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.hero-navbar a:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hero-body-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
}

.pita-acronym {
  font-family: 'Audiowide', 'Inter', sans-serif;
  /* font-family: 'Orbitron', sans-serif; */
  /* font-family: 'Rajdhani', sans-serif; */
  /* font-family: 'Exo 2', sans-serif; */
  /* font-family: 'Audiowide', sans-serif; */
  /* font-family: 'Oxanium', sans-serif; */
  /* font-family: 'Space Grotesk', sans-serif; */
  /* font-family: 'DM Sans', sans-serif; */
  /* font-family: 'Outfit', sans-serif; */
  /* font-family: 'Plus Jakarta Sans', sans-serif; */
  /* font-family: 'Syne', sans-serif; */
  /* font-family: 'Bebas Neue', sans-serif; */
  /* font-family: 'Oswald', sans-serif; */
  /* font-family: 'Barlow Condensed', sans-serif; */
  /* font-family: 'Montserrat', sans-serif; */
  /* To resize: change the last value (9rem = max size).
     e.g. clamp(5rem, 12vw, 11rem) makes it larger on wide screens. */
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 0.5rem;
}

.paper-title-hero {
  font-size: clamp(1.6rem, 3.6vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  max-width: 1500px;
  line-height: 1.25;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.2rem;
}

.acronym-suffix {
  font-family: 'Inter', sans-serif;
  font-size: 1em;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  vertical-align: 0;
  opacity: 0.9;
}

.acr-letter {
  color: #90caf9;
  font-style: italic;
}

.venue-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  margin-bottom: 2rem;
}

/* ── Section helpers ── */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pita-indigo);
  text-align: center;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.section-gray {
  background: var(--bg-gray);
}

/* ── Authors ── */
.authors-section {
  padding: 3rem 1.5rem 2rem;
}

.authors-block {
  font-size: 1.05rem;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 0.4rem;
}

.affil-block {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.6rem;
}

.paper-title-main {
  font-size: clamp(1.2rem, 2.8vw, 1.85rem);
  font-weight: 700;
  text-align: center;
  color: var(--text-dark);
  max-width: 860px;
  margin: 0 auto 1.2rem;
  line-height: 1.4;
}

/* ── Link buttons ── */
.link-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.link-btn.btn-dark {
  background: #212121;
  color: #fff;
}

.link-btn.btn-dark:hover {
  background: #424242;
  color: #fff;
}

.link-btn.btn-outline {
  background: transparent;
  color: var(--pita-indigo);
  border-color: var(--pita-indigo);
}

.link-btn.btn-outline:hover {
  background: var(--pita-indigo);
  color: #fff;
}

/* ── Abstract ── */
.abstract-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #333;
  text-align: justify;
  max-width: 850px;
  margin: 0 auto;
}

/* ── System overview ── */
.system-fig {
  width: 100%;
  max-width: 900px;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  display: block;
  margin: 0 auto;
}

.fig-caption {
    font-size: 1.0rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 900px;
  margin: 1rem auto 0;
  line-height: 1.6;
}

/* ── Contribution cards ── */
.contrib-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.8rem 1.5rem;
  box-shadow: var(--card-shadow);
  height: 100%;
  border-top: 4px solid var(--pita-accent);
  transition: transform 0.2s, box-shadow 0.2s;
}

.contrib-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14);
}

.contrib-icon {
  font-size: 2rem;
  color: var(--pita-accent);
  margin-bottom: 0.8rem;
}

.contrib-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pita-indigo);
  margin-bottom: 0.6rem;
}

.contrib-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.contrib-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tag-pill {
  background: var(--pita-light);
  color: var(--pita-indigo);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

/* ── Bézier grid ── */
.bezier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .bezier-grid {
    grid-template-columns: 1fr;
  }
}

.bezier-item {
  text-align: center;
}

.bezier-item img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.bezier-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ── Results highlight banner ── */
.results-banner {
  background: linear-gradient(135deg, var(--pita-indigo) 0%, var(--pita-accent) 100%);
  border-radius: 14px;
  padding: 2rem 2.5rem;
  color: #fff;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  box-shadow: 0 6px 25px rgba(26, 35, 126, 0.35);
}

.results-banner h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.results-banner .stat-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 0.3rem;
  text-align: center;
}

/* ── Ablation table ── */
.table-wrapper {
  overflow-x: auto;
  max-width: 100%;
}

table.pita-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

table.pita-table th {
  background: var(--pita-indigo);
  color: #fff;
  padding: 0.55rem 0.7rem;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}

table.pita-table th.left {
  text-align: left;
}

table.pita-table td {
  padding: 0.5rem 0.7rem;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

table.pita-table td.left {
  text-align: left;
}

table.pita-table tr:nth-child(odd) td {
  background: #fafafa;
}

table.pita-table tr.highlight td {
  background: #e8eaf6;
  font-weight: 600;
}

table.pita-table .pending {
  color: #aaa;
  font-style: italic;
}

.table-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.6rem;
  font-style: italic;
}

/* ── BibTeX ── */
.bibtex-block {
  background: #1e1e2e;
  border-radius: 5px;
  padding: 0.2rem 0.2rem;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.bibtex-block pre {
  margin: 0;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.82rem;
  color: #1f2d58;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #cdd6f4;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ── Keywords ── */
.keywords-block {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 700px;
  margin: 0 auto 1rem;
}

.kw-tag {
  background: #fff;
  border: 1px solid #c5cae9;
  color: var(--pita-indigo);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
}

/* ── Footer ── */
footer.site-footer {
  background: #212121;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.82rem;
}

footer.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

/* ── Teaser gallery ── */
.teaser-banner {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  display: block;
  margin-bottom: 0.5rem;
}

/* Two-column strip for side-by-side real-robot thumbnails */
.teaser-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.teaser-strip figure {
  margin: 0;
  position: relative;
}

.teaser-strip img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  display: block;
}

/* Label badge overlaid on bottom-left of each strip image */
.teaser-strip figcaption {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  background: rgba(26, 35, 126, 0.78);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  letter-spacing: 0.03em;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* Two-column strip that shows the full image (no crop) — used for experiment figures */
.teaser-experiment {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.teaser-experiment figure {
  margin: 0;
  position: relative;
  background: #f0f2fa;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.teaser-experiment img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px 8px 0 0;
}

.teaser-experiment figcaption {
  width: 100%;
  padding: 0.4rem 0.75rem;
  background: var(--pita-indigo);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.03em;
  border-radius: 0 0 8px 8px;
}

@media (max-width: 640px) {
  .teaser-experiment {
    grid-template-columns: 1fr;
  }
}

/* Centered standalone image (affordance map) */
.teaser-solo {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.teaser-solo img {
  width: 100%;
  max-width: 620px;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  margin: 0 auto;
  display: block;
}

@media (max-width: 640px) {
  .teaser-strip {
    grid-template-columns: 1fr;
  }
  .teaser-banner { height: 160px; }
  .teaser-strip img { height: 130px; }
  .teaser-solo img { width: 100%; max-width: 100%; }
}

/* ── Utility ── */
.centered {
  text-align: center;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.section-pad {
  padding: 3.5rem 1.5rem;
}

.narrow {
  max-width: 860px;
  margin: 0 auto;
}

/* ── Responsive nav on mobile ── */
@media (max-width: 768px) {
  .hero-navbar {
    justify-content: center;
  }

  .pita-acronym {
    font-size: 5rem;
  }

  .results-banner .stat-row {
    gap: 1.2rem;
  }
}

/* ── Video section ── */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 900px;
  margin: 0 auto;
}

.video-col-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--pita-indigo);
  text-align: center;
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--pita-indigo);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-row-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0 0.15rem 0.6rem;
  border-left: 3px solid var(--pita-accent);
  margin-top: 0.4rem;
}

.video-row-header .task-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pita-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.video-row-header .task-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pita-indigo);
}

.video-row-header .task-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.video-ph {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1e1e2e;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.video-ph:hover {
}

/* When a real <video> is placed, hide the placeholder overlay */
.video-ph video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.video-ph video~.video-ph-overlay {
  display: none;
}

.video-ph-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}

.video-ph-overlay i {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.25);
}

.video-ph-overlay span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Divider between rows */
.video-row-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: #e8eaf6;
  margin: 0.1rem 0;
}

@media (max-width: 700px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-col-header {
    display: none;
  }

  .video-row-header .task-desc {
    display: none;
  }
}
