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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #FEFAF6;
  background-image: url('background.gif');
  background-repeat: repeat;
  background-position: top left;
  background-size: 100vw auto;
  image-rendering: pixelated;
  font-family: Optima, -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

header {
  text-align: left;
  padding: 2rem 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.social {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.social a {
  color: #7D7C7B;
  display: block;
  opacity: 0.7;
}

.social a:hover {
  opacity: 1;
}

.social svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

header h1 {
  color: #7D7C7B;
  font-weight: normal;
  font-size: 1.2rem;
  line-height: 1.3;
}

header h1 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
}

header h1 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.chop {
  height: 1em;
  vertical-align: middle;
  filter: brightness(0) invert(1) brightness(0.49);
}

.filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  padding: 0 1rem 1rem;
}

.filters button {
  white-space: nowrap;
}

.fgroup {
  display: contents;
}

@media (max-width: 767px) {
  .filters {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0 10px 1rem;
  }
  .fgroup {
    display: flex;
    gap: 0.75rem;
  }
}

.filters button {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  color: #7D7C7B;
  cursor: pointer;
  padding: 0;
  opacity: 0.35;
}

.filters button.active {
  opacity: 1;
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
}

.gallery {
  column-count: 5;
  column-gap: 6px;
  padding: 3px 5px;
  max-width: 2000px;
  margin: 0 auto;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 5px;
}

.gallery-item a {
  display: block;
  cursor: zoom-in;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  transition: filter .2s;
}

.gallery-item:hover img,
.gallery-item:hover video {
  filter: brightness(.8);
}

@media (max-width: 767px) {
  header {
    padding-left: 10px;
    padding-right: 10px;
  }
  .gallery {
    column-count: 2;
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (min-width: 768px) {
  header {
    padding-left: 50px;
    padding-right: 50px;
  }
  .filters {
    padding-left: 50px;
    padding-right: 50px;
  }
  .gallery {
    padding-left: 50px;
    padding-right: 50px;
  }
}
