header {
  padding: 0.4rem;
  overflow: hidden;
  width: 100vw;
  position: fixed;
  color: white;
  background-color: black;
  z-index: 999;
}
header nav {
  font-size: 46px;
  padding-right: 20px;
  display: grid;
  grid-template-columns: 5fr max-content max-content max-content max-content max-content;
  gap: 1em;
  align-items: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
}
header img {
  height: auto;
  width: 6vw;
}

img {
  width: 100%;
  height: auto;
}

body {
  background-color: #9252ff;
}

.seperator {
  background-color: black;
  width: 100vw;
  height: 7vh;
  margin-top: -0.3rem;
}

#exercises {
  margin-top: 5em;
  margin-bottom: 5em;
  margin-left: 78vw;
  padding: 2rem;
  background-color: black;
  display: grid;
  font-size: 40px;
}

/* this is for the looping video that plays on the projects page */
#looping_video {
  width: 100%;
  padding-top: 3rem;
}

#projects nav {
  display: grid;
  grid-template-rows: 3fr 3fr 3fr 1fr;
  background-color: black;
  font-size: 2rem;
  font-weight: bold;
  width: 30%;
  padding-left: 10rem;
  padding: 2rem;
  padding-bottom: 5rem;
  margin-top: 7rem;
  margin-left: 70vw;
}


/* Gallery */

#gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  padding: 10vw;
}

#gallery img {
aspect-ratio: 4 / 3;
transition: transform 0.4s;
}

#gallery figure:hover img{
  transform: scale(120%);
}

#gallery figcaption, dialog figcaption{
  position: relative;
    width: 100%;
    padding-top: 1.2rem;
}

#gallery figure {
  cursor: pointer;
  overflow: hidden;
}


/* Modal */

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

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

dialog figcaption {
  color: black;
}

dialog::backdrop {
  background: rgb(1, 4, 60);
  opacity: 50%;
}

/* button in dialog */
dialog button {
  width: 100%;
  height: 1.5rem;
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: bold;
  color: aliceblue;
  background-color: black;
}

dialog button:hover {
  color: black;
  background-color: aliceblue;
}

/* dialog animations */

dialog {
  animation: fade-out 0.4s ease-out;
}

dialog:open {
  animation: fade-in 0.4s ease-out;
}

/* dialog:open::backdrop {
  animation: fade-in 0.7s ease-out forwards;
  background: rgb(2, 22, 39 /0.2);
} */

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: scaleY(0);
    display: none;
  }
  100% {
    opacity: 1;
    transform: scaleY(1);
    display: block;
  }
}

@keyframes fade-out {
  0% {
    opacity: 1;
    transform: scaleY(1);
    display: block;
  }
  100% {
    opacity: 0;
    transform: scaleY(0);
    display: none;
  }
}

@keyframes backdrop-fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 0.25;
  }
}

section {
  overflow: hidden;
}

a h1:hover {
  color: black;
}


footer {
  padding: 2em;
  background-color: black;
  display: grid;
  grid-template-columns: 1fr max-content;
}

footer a {
  color: aliceblue;
}

@media screen and (max-width: 1024px) {
  #gallery {
    grid-template-columns: 1fr;
    padding-top: 25vw;
  }
  header {
    padding: 1rem;
  }
  header nav {
    font-size: 20px;
    padding-right: 0;
    gap: 0.5rem;
  }
  header img {
    width: 10vw;
  }
  dialog {
    max-width: 100%;
    max-height: fit-content;
    margin: auto 0;
  }
  #projects nav{
    margin-top: 10rem;
    margin-bottom: 3rem;
    margin-left: 40vw;
    width: 60%;
    font-size: 1rem;
    padding: 0.8rem;
  }
  #exercises {
    margin-left: 33vw;
  }
}