body, html {
  font-family: "Times New Roman", serif;
  margin: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
  background-image: url("../images/cumulus-clouds-lq2.jpg");
  background-size: cover;
  image-rendering: pixelated;
  filter: saturate(1.5);
  text-rendering: optimizeSpeed;
  text-underline-position: under;
}

main {
  max-width: 100%;
}

/* GENERAL STYLES */

.title {
  letter-spacing: -0.015em;
}

#info {
  display: grid;
  grid-template: auto auto / 1fr 1fr;
  font-size: 3rem;
  margin: 48px;
}

a {
  color: #000;
}

a:hover {
  color: #ff58ff;
}

.preview-item:hover + .preview-image {
  visibility: visible;
  animation: appear .5s ease forwards;
}

#binbows:hover ~ .pyramid-container * {
  background-image: url("../images/previews/binbows.jpg");
}

#funny-gif:hover ~ .pyramid-container * {
  background-image: url("../images/rick-astley.gif");
}

#github:hover ~ .pyramid-container * {
  background-image: url("../images/github.svg");
  background-size: 20%;
  background-color: #FFF;
}

#email:hover ~ .pyramid-container * {
  background-image: url("../images/email.gif");
}

#discord:hover ~ .pyramid-container * {
  background-image: url("../images/discord.gif");
  background-size: 30%;
}

#matrix:hover ~ .pyramid-container * {
  background-image: url("../images/matrix.gif");
  background-size: 60%;
}

.preview-image {
  /* NOTE: Update when adding new preview-item*/
  grid-row: 1 / 11;
  justify-self: start;
  margin-left: 0px;
  visibility: hidden;
  width: 50vw;
  max-width: 300px;
  min-width: 30vw;
  border: 8px solid black;
  height: max-content;
  background-color: #000;
  z-index: 3;
}

.preview-image img, .preview-image video {
  object-fit: cover;
  object-position: top;
  max-height: 50vh;
  width: 100%;
}

.preview-image figcaption {
  font-family: monospace;
  padding: 8px 6px 0px 6px;
  font-size: 16px;
  color: #FFF;
  text-transform: capitalize;
}

.preview-image figcaption img {
  display: inline-block;
  object-fit: contain;
  height: 1.5rem;
  width: 1.5rem;
  vertical-align: middle;
}

.rubric {
  font-size: 2rem;
  animation-delay: 2s !important;
  letter-spacing: 0.2em;
  z-index: 3;
}

h2.rubric {
  letter-spacing: 0.25em;
  font-size: 3rem;
  margin-top: 48px;
  margin-bottom: 16px;
}

a.rubric {
  margin-top: 0px;
  text-transform: lowercase;
}

footer {
  font-family: monospace;
  text-transform: lowercase;
  position: absolute;
  color: #FFF;
  background-color: #000;
  padding: 20px;
  width: 100%;
  bottom: 0;
  box-sizing: border-box;
  z-index: 3;
}

footer a {
  color: #FFF;
}

.pyramid-container {
  position: absolute;
  bottom: 100px;
  right: 0px;
  height: 400px;
  width: 400px;
}

@media (max-width: 600px) {
  #info {
    font-size: 28px;
    letter-spacing: 0.2em;
  }

  h2.rubric {
    font-size: 36px;
    margin-top: 48px;
    margin-bottom: 8px;
  }

  .rubric {
    grid-column: 1;
    font-size: 28px;
  }

  .preview-image {
    display: none;
  }

  .pyramid-container {
    position: absolute;
    bottom: -50px;
    right: -80px;
    overflow-y: hidden;
    transform: scale(1.6) !important;
  }
}

@media (max-height: 660px) {
  .contact {
    grid-column: 2;
    justify-self: end;
  }

  h2.contact {
    grid-row: 4;
  }

  .preview-image {
    display: none;
  }

  #matrix:hover {
    color: lime;
  }
}

@media (max-height: 580px) {
  #info {
    margin: 16px;
    font-size: 24px;
  }

  .contact {
    grid-column: 1;
    font-size: 24px;
    justify-self: start;
  }

  h2.contact {
    grid-row: 5;
  }
}

/* Classes */

.col1 {
  grid-column: 1;
}

/* BELOW: hacky CSS please don't judge */

h1 {
  margin: 0;
  margin-bottom: 16px;
}

p {
  margin: 0;
}


#info .bottom {
  margin-bottom: 30vh;
}

.preview-image {
  grid-row-start: 1;
  grid-column: 2;
}

.preview-image img {
  display: block;
}

/* ANIMATIONS */

@keyframes appear {
  0% {
    opacity: 0%;
    filter: blur(8px) brightness(120%);
  }
  100% {
    opacity: 100%;
    filter: blur(0) brightness(100%);
  }
}
