:root {
  color: #fff;
  background: #000;
  font-family: Signika, Arial, sans-serif;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #000;
}

body.lightbox-open {
  overflow: hidden;
}

main {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.text-page {
  max-width: 1200px;
}

.text-page > p {
  max-width: 42rem;
  color: #bdbdbd;
  font-size: 1.2rem;
}

.text-page > p a {
  color: #fff;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 3rem;
}

.brand,
nav a,
h1 {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.brand {
  font-size: 1.35rem;
}

nav {
  display: flex;
  gap: 1.25rem;
}

nav a {
  font-size: 1.25rem;
}

nav a:hover,
nav a:focus-visible,
nav a.active {
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

h1 {
  margin: 0;
  padding: 0 0 2rem;
  font-size: 2.5rem;
}

#gallery {
  column-count: 1;
  column-gap: 1rem;
}

.gallery-item {
  margin: 0;
  padding-bottom: 1rem;
  break-inside: avoid;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

footer {
  padding: 4rem 0 1rem;
  text-align: center;
}

footer p {
  margin: 1rem 0 0;
  color: #bdbdbd;
  font-size: 0.9rem;
}

footer a {
  color: inherit;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgb(8 14 12 / 0%);
  transition: background-color 330ms cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.is-open {
  background: rgb(8 14 12 / 78%);
}

.lightbox-image {
  position: fixed;
  z-index: 1;
  object-fit: contain;
  transition: top 330ms cubic-bezier(0.4, 0, 0.2, 1),
    left 330ms cubic-bezier(0.4, 0, 0.2, 1),
    width 330ms cubic-bezier(0.4, 0, 0.2, 1),
    height 330ms cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-close {
  position: fixed;
  z-index: 2;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  color: #fff;
  background: rgb(8 14 12 / 60%);
  font: 2rem/1 Georgia, "Times New Roman", serif;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 330ms cubic-bezier(0.4, 0, 0.2, 1), background-color 160ms ease;
}

.lightbox.is-open .lightbox-close {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgb(8 14 12 / 90%);
}

.gallery-error {
  grid-column: 1 / -1;
  color: #9b3d2f;
}

@media (max-width: 560px) {
  main {
    padding-top: 1.5rem;
  }

  header {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 2rem;
  }

  nav {
    gap: 0.8rem;
  }

  nav a {
    font-size: 1rem;
  }
}

@media (min-width: 640px) {
  #gallery {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  #gallery {
    column-count: 3;
  }
}
