/* ===== RELATED PROJECTS ===== */
/* Shared component for displaying related project cards */

.related-projects {
  margin-top: 3rem;
}

.related-projects-heading {
  font-size: var(--sidebar-heading-size);
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.related-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.related-project-card {
  border: var(--border-size) solid var(--border);
  border-radius: var(--border-radius);
  overflow: hidden;
  height: fit-content;
}

.related-project-card figure {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.related-project-img {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  border-bottom: var(--border-size) solid var(--border);
}

.related-project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-project-caption {
  padding: 0.75rem;
}

.related-project-caption h3 {
  font-size: var(--h2-size);
  margin-bottom: 0.5rem;
}

.related-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.related-project-meta .chip {
  font-family: var(--font-heading);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .related-projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .related-projects-grid {
    grid-template-columns: 1fr;
  }
}
