html {
  font-size: 1.5em;
}

body {
  background: #f2f2f2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body::after {
  content: "";
  background-color: #eeeeef;
  background-image: url("./background.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.1;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  position: absolute;
  z-index: -1;
}

main {
  opacity: 0;
  background-color: #fff;
  max-height: 80vh;
  width: 80%;
  margin: 10vh auto;
  display: grid;
  grid-template-columns: 25fr 25fr 25fr 25fr;
  grid-template-rows: 3rem 0.1rem 100fr;
  overflow-x: auto;
  border-radius: 0.3rem;
  box-shadow: 0 1.2rem 3rem 0 rgba(0, 0, 0, 0.19),
    0 0.8rem 2rem 0 rgba(0, 0, 0, 0.24);
  transition: opacity 1s ease-in-out;
  font-size: 1rem;
}

p,
div,
a {
  font-size: 1.3rem;
}

.home-content > div {
  display: flex;
  flex-direction: row;
}

.home-content > div {
  display: flex;
}

a {
  font-weight: 700;
  color: black;
  text-decoration: none;
  transition: color 0.18s ease-in-out;
}

a:hover {
  color: #666;
  transition: color 0.18s ease-in-out;
}

p {
  text-align: justify;
  padding: 0.5rem;
}

.portrait {
  height: 30vw;
  max-height: 12rem;
  width: auto;
  border-radius: 100%;
  margin: 0.5rem 1rem 0.5rem 0;
  -webkit-filter: grayscale(70%); /* Safari 6.0 - 9.0 */
  filter: grayscale(70%);
}

.icon {
  height: 3rem;
  padding-left: 1rem;

  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
  transition: filter 0.18s ease-in-out, height 0.18s ease-in-out;
}

.icon:hover {
  -webkit-filter: none;
  height: 5rem;
  filter: none;
  transition: filter 0.18s ease-in-out, height 0.18s ease-in-out;
}

.navitem {
  grid-row-start: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  color: black;
  cursor: pointer;
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  box-shadow: none;
  font-size: 1.3rem;
  background-color: transparent;
  z-index: 1;
  transition: opacity 0.5s ease-in-out, box-shadow 0.18s ease-out,
    font-weight 0.18s ease-out, color 0.18s ease-out,
    background-color 0.18s ease-out, font-size 0.18s ease-out;
  border-radius: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
}

.navitem:hover {
  color: #000;
  box-shadow: 0 0.1rem 0.1rem 0 rgba(0, 0, 0, 0.06),
    0 0.2rem 0.5rem 0 rgba(0, 0, 0, 0.2);
  font-weight: 700;
  transition: box-shadow 0.18s ease-out, font-weight 0.18s ease-out,
    color 0.18s ease-out, background-color 0.18s ease-out,
    font-size 0.18s ease-out;
}

.home {
  grid-column-start: 1;
}

.home-active {
  background-color: #a54776;
}

.projects {
  grid-column-start: 2;
}

.projects-active {
  background-color: #e2d5e8;
}

.resume {
  grid-column-start: 3;
}

.resume-active {
  background-color: #170f1a;
}

.contact {
  grid-column-start: 4;
}

.contact-active {
  background-color: #6385cf;
}

.home-active,
.projects-active,
.resume-active,
.contact-active,
.home-active:hover,
.projects-active:hover,
.resume-active:hover,
.contact-active:hover {
  box-shadow: 0 0 0.4rem rgba(0, 0, 0, 0.16),
    0 0.4rem 0.8rem rgba(0, 0, 0, 0.32);
  cursor: default;
  font-weight: 700;
  font-size: 1.5rem;
  transition: box-shadow 0.18s ease-out, font-size 0.18s ease-out,
    color 0.18s ease-out, background-color 0.18s ease-out;
}

.home-active,
.resume-active,
.contact-active,
.home-active:hover,
.resume-active:hover {
  color: #ffffff;
}

#box-shadow {
  grid-row-start: 2;
  grid-column-start: 1;
  grid-column-end: span 4;
  z-index: 10;
}

#content {
  grid-row-start: 3;
  grid-column-start: 1;
  grid-column-end: span 4;
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 1.3rem;
  padding: 1rem;
  transition: opacity 0.5s ease-in-out;
  overflow: auto;
}

h1 {
  font-size: 2rem;
  line-height: 1;
}

h2 {
  font-size: 1.5rem;
}

.project-item {
  box-shadow: 0 0 0.1rem rgba(0, 0, 0, 0.16),
    0 0.1rem 0.2rem rgba(0, 0, 0, 0.32);
  margin-bottom: 1rem;
  padding: 0.6rem 1rem 1rem 1rem;
  border-radius: 0.3rem;
  background-color: #f2f2f2;
}

.project-item:hover {
  background-color: #fbfbfb;
}

.project-item-detail {
  display: flex;
  flex-direction: row;
}

.project-item-description {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

.andor-gif,
.sat-zoo-gif,
.boolean-logic-png,
.async-explorations-gif,
.pumpkin-time-gif,
.stress-hooks-gif,
.github-jira-link-png {
  background-size: cover;
  background-position: center;
  margin: 0.5rem 1rem 0 0;
  width: 18rem;
  border-radius: 0.3rem;
}

.andor-gif {
  background-image: url("./img/andor.gif");
  height: 8.5rem;
}

.sat-zoo-gif {
  background-image: url("./img/sat-zoo.gif");
  height: 9.5rem;
}

.boolean-logic-png {
  background-image: url("./img/boolean-logic.png");
  height: 8.623rem;
}

.async-explorations-gif {
  background-image: url("./img/async-explorations.gif");
  height: 17.3625rem;
}

.stress-hooks-gif {
  background-image: url("./img/stress-hooks.gif");
  height: 24rem;
  background-size: contain;
}

.pumpkin-time-gif {
  background-image: url("./img/pumpkintime.gif");
  height: 18rem;
}

.github-jira-link-png {
  background-image: url("./img/github-jira-link.png");
  height: 11rem;
}

.badge img {
  height: 2.5rem;
  width: auto;
}

.badge {
  padding: 0;
  background-color: transparent;
  line-height: 0;
  border-radius: 0.6rem;
}

.resume {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.iframe-container {
  position: relative;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

#open-resume {
  position: absolute;
  font-size: 1.5rem;
  top: 0rem;
  right: 0.37rem;
}

iframe {
  margin: auto;
  border-radius: 0.3rem;
  width: 75%;
  box-shadow: 0 0 0.1rem rgba(0, 0, 0, 0.16),
    0 0.1rem 0.2rem rgba(0, 0, 0, 0.32);
  transition: opacity 1s ease-in-out;
}

iframe body {
  font-size: 0.5em;
}

.home-content,
.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (orientation: portrait) {
  main {
    width: 90%;
    min-height: 75vh;
  }

  iframe {
    width: calc(59vh * 0.77);
    height: 59vh;
  }

  .home-content > div,
  .project-item-detail {
    flex-direction: column;
  }

  .portrait {
    height: 40vw;
    max-height: 15rem;
    width: auto;
    border-radius: 100%;
    margin: 0.5rem 1rem 0 0;
  }

  .portrait,
  .play-links {
    margin: auto;
  }

  .play-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .badge {
    margin: 0.1rem;
  }

  .project-item > h1 {
    text-align: center;
    padding: 0 0 0.5rem 0;
  }

  .project-image {
    margin: auto;
    padding: 0 0 0.5rem 0;
  }

  .andor-gif {
    height: 8.05rem;
  }

  .navitem {
    letter-spacing: 0.1rem;
  }

  .home-content,
  .contact-content {
    height: 66vh;
  }
}
