.ap4-projects {
  background: #f8fafc;
  padding: 4.5rem 1rem;
}

.ap4-projects__inner {
  margin: 0 auto;
  max-width: 80rem;
}

.ap4-projects__header {
  margin: 0 auto 3rem;
  max-width: 42rem;
  text-align: center;
}

.ap4-projects__eyebrow {
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.ap4-projects__header h2 {
  color: #0f172a;
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin: 0;
}

.ap4-projects__header p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0.75rem 0 0;
}

.ap4-project-group + .ap4-project-group {
  margin-top: 4rem;
}

.ap4-project-group h3 {
  border-bottom: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 1.5rem;
  padding-bottom: 0.8rem;
}

.ap4-project-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.ap4-project-card {
  align-self: start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  margin: 0;
  overflow: hidden;
}

.ap4-project-card a {
  display: block;
  overflow: hidden;
}

.ap4-project-card a:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: -3px;
}

.ap4-project-card img {
  aspect-ratio: 2 / 3;
  background: #e2e8f0;
  display: block;
  height: auto;
  object-fit: cover;
  transition: transform 220ms ease;
  width: 100%;
}

.ap4-project-card a:hover img {
  transform: scale(1.025);
}

.ap4-project-card figcaption {
  color: #334155;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  padding: 0.9rem 1rem 1rem;
}

@media (max-width: 640px) {
  .ap4-projects {
    padding: 3.5rem 1rem;
  }

  .ap4-projects__header {
    margin-bottom: 2.5rem;
  }

  .ap4-project-group + .ap4-project-group {
    margin-top: 3rem;
  }

  .ap4-project-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ap4-project-card img {
    transition: none;
  }
}
