html {
  --light-grey: #aaa;
  --mid-grey: #777;
  --dark-grey: #333;
}

body {
  font-family: Helvetica, Arial, sans-serif;
  background: #333;
  color: #ddd;
}
p a {
  color: #ddd;
}

/* ------- GALLERY PREVIEW STYLES ------- */

.gallery {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.gallery figure {
  max-width: 25%;
  overflow: hidden;
  margin: 5px;
}
.gallery img {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

/* ------- LIGHTBOX STYLES ------- */

/* Hides the lightbox and contents, sets their styles */
.lightbox {
  opacity: 0;
  position: fixed;
  width: 100%;
  height: 100%;
  top: -100%;
  left: 0;
  background: rgba(10,10,10,.75);
  transition: opacity .5s ease-in-out;
  /* replace "opacity" with "all" to activate a dropdown animation */
}
.lightbox figure {
  box-sizing: border-box;
  width: 100%;
  max-height: 100%;
  margin: 1% auto;
  padding: 10px 20px;
  background: inherit;
  box-shadow: 0 0 40px 0 #000;
}
.lightbox figcaption {
  display: block;
  text-align: center;
  font-size: 0.75em;
  margin-top: .75em;
}
.lightbox img {
  border: 1px solid var(--mid-grey);
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 90vh;
}
.lightbox .close {
  position: absolute;
  display: block;
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  text-align: center;
  padding: 2px;
  text-decoration: none;
  font-weight: bold;
  color: white;
  background: var(--mid-grey);
}
.lightbox .close:hover {
  background: var(--dark-grey);
}

/* Shows the lightbox only when targeted */
.lightbox:target {
  opacity: 1;
  outline: none;
  top: 0;
}
.lightbox:target figure {
  display: block;
}

/* ------- GALLERY PREVIEW ABOVE MOBILE ------- */

@media (min-width: 620px) {
  .gallery img {
    /* adjust to suit */
    height: 400px;
    border-width: 2px;
  }
  .lightbox figcaption {
    font-size: 1em;
  }
}
