@import url("https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap");

* {
  box-sizing: border-box;
}

body {
  background: gray;
  color: #333;
  font-family: "EB Garamond", serif;
  padding: 1rem 4%;
}

@media (min-width: 40rem) {
  body {
    padding: 4rem 8%;
  }
}

nav {
  font-size: 1.2rem;
  display: flex;
  gap: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  font-weight: inherit;
}

nav > a,
.lightbox-nav > span {
  color: #ddd;
  cursor: pointer;
}

nav > a:hover,
.lightbox-nav > span:hover,
.lightbox-close:hover {
  color: white;
}

nav > a svg {
    fill: #ddd;
    height:1.7rem;
    width: auto;
    vertical-align: middle;
}

nav > a:hover svg {
  fill: white;
}

header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-direction: column;
}

@media (min-width: 40rem) {
  header {
    flex-direction: row;
    align-items: center;
  }
}

header h1 {
  font-size: 2.25rem;
  font-weight: 100;
  margin: 0;
}

[role="doc-subtitle"] {
  font-size: 1.5rem;
  color: #ccc;
  display: none;
}

@media (min-width: 45rem) {
  [role="doc-subtitle"] {
    display: block;
  }
}

.gallery {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

.thumbnail {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: 0.1s;
  opacity: 0;
}

@media (min-width: 45rem) {
  .thumbnail {
    height: 20rem;
    width: auto;
  }
}

.lightbox {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: gray;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  color: #bbb;
}

.lightbox-close {
  position: fixed;
  font-size: 3rem;
  right: 2rem;
  top: 1rem;
  line-height: 1;
  font-family: sans-serif;
  font-weight: 100;
  cursor: pointer;
}

.lightbox-img {
  max-height: 85%;
  max-width: 85%;
  width: auto !important;
  height: auto !important;
  margin: auto;
  cursor: default;
  animation: none !important;
  opacity: 1 !important;
}

.lightbox-nav {
  position: fixed;
  bottom: 5%;
}

.text-block {
  background: #bbb;
  width: max-content;
  max-width: 100%;
  margin: auto;
  padding: 4%;
}

h2:first-child {
  margin-top: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.fade-in {
  animation: fadeIn 2s;
  opacity: 1;
}

.fade-out {
  animation: fadeOut 100ms;
  opacity: 0;
}

.fade-short {
  animation: fadeIn 200ms;
  opacity: 1;
}
