/* Page-specific refinements for the Research catalogue. */

/* Six research-theme links: three per row on desktop, then adapt responsively. */
.qs-project-theme-nav {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, max-content));
  column-gap: 1.75rem !important;
  row-gap: .5rem !important;
  align-items: baseline;
  justify-content: start;
  margin: .15rem 0 1.35rem !important;
  padding-bottom: .85rem !important;
  overflow: visible !important;
  border-bottom: 1px solid rgba(49, 79, 96, .12);
  white-space: normal !important;
  scrollbar-width: none !important;
}

.qs-project-theme-nav::-webkit-scrollbar {
  display: none;
}

.qs-project-theme-nav a {
  min-width: 0;
  white-space: nowrap;
}

/* Theme metadata uses the same compact badge language as Publications and Talks. */
.qs-theme-badges {
  display: flex !important;
  flex-wrap: wrap;
  gap: .35rem !important;
  margin: .15rem 0 .58rem;
}

/* Research question and rationale read as one continuous paragraph. */
.qs-theme-rationale {
  margin: 0 0 1.05rem !important;
  color: var(--qs-ink);
  font-size: 1.06rem !important;
  line-height: 1.62 !important;
}

.qs-theme-rationale strong {
  color: #0b1320 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
  font-weight: 600 !important;
}

/* Keep project cards visually clean: retain only the dark external boundary. */
.qs-project-tile,
.qs-project-tile.qs-project-no-logo {
  border: 1px solid #0b1320 !important;
  box-shadow: none !important;
}

.qs-project-visual {
  border-right: 0 !important;
  border-bottom: 0 !important;
}

.qs-project-footer {
  border-top: 0 !important;
  padding-top: .45rem !important;
}

@media (max-width: 820px) {
  .qs-project-theme-nav {
    grid-template-columns: repeat(2, minmax(0, max-content));
    column-gap: 1.25rem !important;
  }
}

@media (max-width: 520px) {
  .qs-project-theme-nav {
    grid-template-columns: 1fr;
  }

  .qs-project-theme-nav a {
    white-space: normal;
  }
}

/* Repository visibility is explicit without exposing private GitHub links. */
.qs-project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
}

.qs-project-visibility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  font-size: .82rem;
  line-height: 1;
}

.qs-project-visibility-private {
  color: #9a6200;
  background: rgba(196, 132, 0, .11);
}

.qs-project-visibility-public {
  color: #39724d;
  background: rgba(57, 114, 77, .10);
}

.qs-project-repository-state {
  color: #6b7280;
  font-size: .84rem;
  white-space: nowrap;
}
