@import url("../site.css");

.research-page {
  --site-nav-gap: 20px;

  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 46px 24px 82px;
}

.research-hero {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1.25fr);
  gap: clamp(34px, 5vw, 58px);
  align-items: center;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--border);
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 500px;
}

.kicker,
.eyebrow,
.project-tag {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: uppercase;
}

.research-hero h1,
.section-heading h2,
.project-card h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0;
}

.research-hero h1 {
  max-width: 500px;
  margin-top: 14px;
  font-size: clamp(3.3rem, 5.5vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
}

.hero-line {
  display: block;
}

.hero-line-wide {
  font-size: 0.82em;
}

.hero-lead {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.62;
}

.hero-mosaic {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 10px;
  align-items: start;
}

.hero-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.hero-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.hero-tile {
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-tile video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-tile-contact {
  aspect-ratio: 1920 / 538;
}

.hero-tile-twist {
  aspect-ratio: 64 / 27;
}

.theme-section {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 42px;
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.section-heading {
  min-width: 0;
}

.section-heading h2 {
  margin-top: 12px;
  font-size: clamp(1.55rem, 2.7vw, 2.25rem);
  font-weight: 700;
}

.accent-cool {
  color: var(--accent-cool);
}

.accent-green {
  color: var(--accent-green);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
}

.project-card {
  min-width: 0;
  padding: 20px;
  background: color-mix(in srgb, #fff 48%, var(--surface));
  border: 1px solid var(--border);
  border-radius: 8px;
}

.project-card-wide {
  grid-column: 1 / -1;
}

.project-meta {
  margin-bottom: 14px;
}

.project-card h3 {
  margin-top: 7px;
  font-size: 1.02rem;
  font-weight: 650;
}

.project-card h3 a {
  text-decoration: none;
}

.paper-citation {
  display: inline-block;
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 500;
}

.project-tag {
  color: var(--muted);
  font-size: 0.72rem;
}

.media-frame,
.video-selector-box,
.video-pair video {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: 8px;
}

.media-frame video,
.video-pair video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.media-frame-uncropped video {
  object-fit: contain;
}

.media-frame-twist video {
  aspect-ratio: 64 / 27;
}

.media-frame-cop video {
  aspect-ratio: 1920 / 538;
}

.video-selector-box {
  background: #111;
}

.vs-main {
  aspect-ratio: 16 / 9;
  background: #111;
}

.vs-main video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vs-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.vs-btn {
  flex: 1 1 150px;
  min-height: 38px;
  padding: 8px 11px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vs-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
}

.vs-btn.is-active {
  color: #fff;
  background: var(--accent-cool);
  border-color: var(--accent-cool);
}

.video-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.project-caption {
  max-width: 860px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.58;
}

.project-video-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-video-column {
  min-width: 0;
}

.selector-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-video-columns .vs-buttons {
  flex-wrap: nowrap;
}

.project-video-columns .vs-btn {
  flex: 1 1 0;
  min-width: 0;
  padding-inline: 6px;
  white-space: nowrap;
}

.section-actions {
  grid-column: 2 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 30px;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer a {
  text-decoration: none;
}

@media (max-width: 980px) {
  .research-hero,
  .theme-section {
    grid-template-columns: 1fr;
  }

  .research-hero {
    align-items: start;
  }

  .hero-mosaic {
    grid-template-columns: 1fr;
  }

  .theme-section {
    gap: 24px;
  }

  .section-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 740px) {
  .research-page {
    padding: 34px 18px 68px;
  }

  .site-nav,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    margin-bottom: 34px;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 10px;
  }

  .research-hero {
    padding-bottom: 42px;
  }

  .project-grid,
  .project-video-columns,
  .video-pair {
    grid-template-columns: 1fr;
  }

  .hero-mosaic {
    grid-template-columns: 1fr;
  }

  .hero-duo {
    grid-template-columns: 1fr;
  }

  .theme-section {
    padding: 42px 0;
  }

  .project-card {
    padding: 16px;
  }
}

@media (max-width: 460px) {
  .research-hero h1 {
    font-size: 2.28rem;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .vs-btn {
    flex-basis: 100%;
  }
}
