:root {
  color: #0a0f1a;
  background-color: #f6f6f6;
  font-family: 'Inter', 'Space Grotesk', system-ui, sans-serif;
  --gallery-row-height: 1px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #050505;
  color: #f6f6f6;
}

main {
  padding: 2rem 1.5rem 4rem;
  max-width: 1600px;
  margin: 0 auto;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(320px, 25vw, 420px), 1fr));
  grid-auto-rows: var(--gallery-row-height);
  gap: 5px;
}

.photo-card {
  width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.15s ease;
  align-self: start;
  grid-row-end: span var(--photo-row-span, 1);
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: #050505;
  transition: transform 0.3s ease;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal__content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 1rem;
  overflow: hidden;
  background: #000;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal__image {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border-radius: 0.5rem;
}

.modal__close {
  position: absolute;
  top: 0rem;
  right: 0rem;
  background: #000;
  border: none;
  border-radius: 999px;
  color: #fff;
  width: 32px;
  height: 32px;
  font-size: 1.25rem;
  cursor: pointer;
}