/* Research page styles: hero intro + card grid (screenshot-inspired) */

body {
  color: #222;
}

.research-hero {
  max-width: 1100px;
  margin: 140px auto 40px; /* leave room for sticky header */
  text-align: center;
  color: #7a7a7a;
  font-family: "Helvetica Neue", sans-serif;
  line-height: 1.6;
  font-size: 1.05rem;
}

.research-hero h1 {
  font-size: 52px;
  margin: 0 0 18px;
  font-weight: 300;
  color: #222;
}

.cards {
  max-width: 1200px;
  margin: 40px auto 80px;
  padding: 0 24px;
}

.card {
  background: transparent;
}

.card a {
  color: inherit;
  text-decoration: none;
  padding: 0 24px;
}

.cards-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: row;
  gap: 36px;
  width: 100%;
}

.card-media {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-caption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* inline highlight next to the title */
.card-caption .highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 10px 8px;
  border-radius: 999px;
  background: rgba(88, 193, 213, 0.06);
  color: #71c1d9;
  font-weight: 600;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 0.72rem;
  text-transform: none;
  vertical-align: middle;
}
.card-caption .highlight svg {
  width: 12px;
  height: 12px;
}
.card-caption .highlight .highlight-text {
  color: inherit;
}

/* Card tag badges (paper, demo, code, awards, video) */
.card-tags {
  margin-top: 3px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #555;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: lowercase;
  font-family: "Helvetica Neue", sans-serif;
}

.tag:hover {
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

/* highlight badge styled with small icon and colored text */
.highlight {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(183, 117, 88, 0.06);
  color: #3a6ab7;
  font-weight: 600;
  font-family: "Helvetica Neue", sans-serif;
  font-size: 0.78rem;
}
.highlight svg {
  display: inline-block;
  vertical-align: middle;
  color: #3a6ab7;
}
.highlight .highlight-text {
  color: inherit;
}

@media (max-width: 900px) {
  .cards-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .research-hero h1 {
    font-size: 38px;
  }
}

/* Loader and error message */
.cards-loader {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}
.loader {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid rgba(0, 0, 0, 0.08);
  border-top-color: rgba(0, 0, 0, 0.35);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error-message {
  max-width: 900px;
  margin: 18px auto;
  padding: 14px 18px;
  border-radius: 8px;
  background: #fff6f6;
  color: #7a1f1f;
  border: 1px solid rgba(122, 31, 31, 0.08);
  font-size: 0.95rem;
}

/* Per-card color modes: default preserved as black-and-white for cards with `.bw` */
.card.bw .card-media img {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
}
.card.bw .card-media img:hover {
  filter: none;
  -webkit-filter: grayscale(0);
}

.card.color .card-media img {
  filter: none;
  -webkit-filter: none;
}
