@import url('https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css');
@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Text:wght@700&family=Literata:ital,wght@0,300;1,300&family=Roboto+Condensed:ital,wght@0,300;1,300&display=swap');

html {
  font-size: 1.125em;
  font-family: 'Literata', serif;
  font-weight: 300;
}

body {
  line-height: 2em;
  max-width: 680px;
  padding: 1.5em 1em 1em 1em;
  margin: 0 auto;
  text-align: justify;
}
body::after {
  content: 'Copyright © 2022 Michael Meisel';
  color: grey;
  display: block;
  font-family: 'Big Shoulders Text', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 2rem;
  text-align: center;
}

figure {
  margin-inline: 0;
}
figure img, figure video {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

figcaption {
  font-family: 'Roboto Condensed', sans-serif;
  font-style: italic;
  font-weight: 300;
  text-align: center;
}

h1, h2, h3 {
  font-family: 'Big Shoulders Text', sans-serif;
  font-weight: 700;
  line-height: 1.5em;
}
h1 {
  text-align: center;
}

h4, h5, h6 {
  font-family: 'Roboto Condensed', sans-serif;
  font-style: italic;
  font-weight: 300;
  line-height: 1.5em;
}

common-header {
  line-height: 1em;
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: calc(100% - 2rem);
  display: flex;
  justify-content: space-between;
}

nav-crumbs {
  color: grey;
  font-family: 'Big Shoulders Text', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
}

social-links {
  display: flex;
  gap: 0.5em;
  justify-content: center;
}
social-links a {
  color: grey;
}
social-links a:active, social-links a:hover {
  color: black;
}

.overlay-container {
  position: relative;
}

.image-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.image-grid > * {
  flex-grow: 0;
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  overflow: hidden;
}
.image-grid img {
  object-fit: cover;
}
.image-grid img.pan-r {
  transform: translateX(calc(-100% + 220px)); height: 100%;
}
.image-grid img.pan-lr, .image-grid img.pan-rl {
  height: 100%;
}
.image-grid img.pan-tb, .image-grid img.pan-bt {
  width: 100%;
}
.image-grid img.fade-out, .image-grid .overlay {
  position: absolute;
  top: 0;
  left: 0;
}
.image-grid .overlay {
  background-color: rgba(255, 255, 255, 0.75);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0;
  margin: 0;
}
.image-grid .overlay:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: no-preference) {
  .image-grid > .animating img.pan-lr {
    animation: 60s ease 2 alternate forwards pan-lr;
  }
  .image-grid > .animating img.pan-rl {
    animation: 60s ease 2 alternate forwards pan-rl;
  }
  .image-grid > .animating img.pan-tb {
    animation: 60s ease 2 alternate forwards pan-tb;
  }
  .image-grid > .animating img.pan-bt {
    animation: 60s ease 2 alternate forwards pan-bt;
  }
  .image-grid > .animating img.fade-out {
    animation: 5s ease 12 alternate forwards fade-out;
  }
}

.side-by-side {
  display: flex;
  flex-wrap: nowrap;
}

@keyframes pan-lr {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% + 220px));
  }
}

@keyframes pan-rl {
  from {
    transform: translateX(calc(-100% + 220px));
  }
  to {
    transform: translateX(0);
  }
}

@keyframes pan-tb {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(-100% + 220px));
  }
}

@keyframes pan-bt {
  from {
    transform: translateY(calc(-100% + 220px));
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
