* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  background-color: #f4f7f6;
  color: #1f2937;
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

h1 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: #ffffff;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Image Wrapper & Zoom Effect */
.card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #e5e7eb;
  overflow: hidden;
}

.card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: #d1d5db;
}

.card:hover .card-img {
  transform: scale(1.05);
}

/* Card Content Structure */
.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-header h2 {
  font-size: 1.15rem;
  color: #111827;
}

.card-title {
  color: inherit;
  text-decoration: none;
}

.card-title:hover {
  text-decoration: underline;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  color: #111827;
  border-radius: 0.5rem;
  transition: background-color 150ms ease;
}

.repo-link:hover {
  background-color: #f3f4f6;
}

.repo-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.repo-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.card p {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.4;
}
