.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: clamp(10px, 1.8vw, 16px);
  align-items: stretch;
}

.repo-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--apartsin-card-border, rgba(24,32,42,0.1));
  border-radius: 24px;
  background: var(--apartsin-card-surface, rgba(255,255,255,0.92));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.repo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

.repo-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(156,90,46,0.06), rgba(255,255,255,0.85));
  border-bottom: 1px solid var(--site-border, rgba(24,32,42,0.1));
}

.repo-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.repo-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.repo-card__title {
  margin: 0;
  font: 800 1rem/1.25 "Manrope", "Segoe UI", sans-serif;
  color: var(--site-text, #18202a);
}

.repo-card__desc {
  margin: 8px 0 0;
  color: var(--site-muted, #586271);
  font: 600 0.84rem/1.55 "Manrope", "Segoe UI", sans-serif;
}

/* Badge-style links (matching content-card__link) */
.repo-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

.repo-card__link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--apartsin-card-accent-soft, rgba(156, 90, 46, 0.08));
  color: var(--apartsin-card-accent, #9c5a2e);
  font: 700 0.82rem/1.25 "Manrope", sans-serif;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.repo-card__link-badge:hover {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--apartsin-card-accent, #9c5a2e);
}

.repo-card__link-badge svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
  flex-shrink: 0;
}

.repo-card__theme-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--badge-color, #1d4ed8) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--badge-color, #1d4ed8) 28%, transparent);
  color: var(--badge-color, #1d4ed8);
  font: 700 0.68rem/1.5 "Manrope", sans-serif;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
