/* Site extras — projects grid + galleries */

.projects-grid-section {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.75rem;
  width: 100%;
}

.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.project-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.92;
  overflow: hidden;
  background: #e8e8e8;
  text-decoration: none;
  color: inherit;
}

.project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.project-card__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #d8d8d8, #efefef 45%, #cfcfcf);
}

.project-card__media:hover .project-card__img {
  transform: scale(1.03);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.project-card__year {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.project-card__title {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-card__title a {
  color: inherit;
  text-decoration: none;
}

.project-card__title a:hover {
  text-decoration: underline;
}

.project-card__summary {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.9;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.image-gallery__img {
  width: 100%;
  height: auto;
  display: block;
}

.image-gallery__caption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.8;
}

@media (max-width: 991px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.25rem;
  }
}

@media (max-width: 640px) {
  .projects-grid,
  .image-gallery {
    grid-template-columns: 1fr;
  }
}
