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

html {
  font-size: 24px;
  line-height: 1.44;
  height: 100%;
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
}

h1 {
  margin-top: 0;
  font-size: 1.728rem;
  text-align: center;
  background-color: rgb(205 129 1 / 0.9);
}

figcaption {
  width: 100%;
  text-align: center;
  font-size: 0.833rem;
  color: rgb(16 16 16 /1);
}

#gallery{
  padding: 0.482rem;
  display: grid;
  gap: 0.482rem;
}

#gallery img, header img{
  width: 100%;
}

#gallery img{
  max-width: 400px;
  object-fit: cover;
  aspect-ratio: 16/9;
}

header img{
  max-width: 1600px;
}

#gallery figcaption, dialog figcaption{
  transform: translateY(-1.482rem);
  background: rgb(240 240 240 / 0.7);
}

/* modal styles */

dialog{
  position: fixed;
  top: 5vh;
  max-width: 90vw;
  max-height: 90vh;
  margin: 0 auto;
}

dialog::backdrop{
  background: rgb(16 16 16 /0.8);
}

dialog img{
  width: 100%;
  max-height: 83vh;
}

footer{
  width: 100vw;
  background-color: rgb(205 129 1 / 0.9);
  color: rgb(240 240 240 / 0.95);
}

@media screen and (min-width: 400px) {
  #gallery{
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (min-width: 800px) {
  #gallery{
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media screen and (min-width: 1200px) {
  #gallery{
    grid-template-columns: repeat(4, 1fr);
  }
}