@import url('https://fonts.googleapis.com/css2?family=Open+Sans&family=Ubuntu&display=swap');

:root {
  --bg: #fafaf5;
  --fg: black;
  --accent: #F76902;
}

html {
  color: var(--fg);
  background-color: var(--bg);
  height: 100%;
  font-family: 'Open Sans', sans-serif;
}

body {
  margin: 0;
  height: 100%;
  display: flex;
}

html, body, #app {
  margin: auto;
}

#app {
  flex-direction: column;
  width: 90vw;
  font-size: 2.5vw;
}

@media screen and (max-width: 700px) {
  .link a img {
    max-width: 20vw;
    max-height: 20vw;
  }
  #headshot {
    margin-top: 30px;
  }
}

@media screen and (min-width: 700px) {
  #app {
    font-size: 18px;
  }
}

#headshot {
  border-radius: 50%;
  overflow: hidden;
  width: 80vw;
  height: 80vw;
  max-width: 320px;
  max-height: 320px;
  margin: auto;
  margin-bottom: 30px;
}

#headshot img {
  background: black;
  display: block;
  position: relative;
  left: 27%;
  margin: auto;
  height: 100%;
  float: right;
}

nav {
  min-height: 150px;
  width: 100%;
  max-width: 520px;
  margin: auto;
}

.fadein {
  filter: opacity(0%);
  animation: showNav;
  animation-duration: 1s;
  filter: opacity(100%);
}

.nav-links {
  display: flex;
  margin: auto;
  padding: 1vw;
}

.nav-links .link {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: auto;
  text-align: center;
}

h3.nav-links a {
  text-align: center;
  color: #666;
  text-decoration: none;
  text-transform: uppercase;
  margin: auto;
}

h3.nav-links a:hover {
  text-align: center;
  color: #F76902;
}

.link a {
  max-width: min-content;
  margin: auto;
  padding: 10px;
  padding-bottom: 7px;
}

.link a img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
}

.link a:hover {
  background-image: radial-gradient(#ccc, #ccc, #0000, #0000);
}

.link a:active {
  animation: clicked;
  animation-duration: 0.1s;
  filter: invert(100%);
}

header {
  padding: 1vw;
  font-size: 2.25em;
  max-width: max-content;
  margin: auto;
  font-weight: 100;
  cursor: default;
}

@keyframes showNav {
  from { filter: opacity(0%); }
  to { filter: opacity(100%); }
}

@keyframes clicked {
  from { filter: none; }
  to { filter: invert(100%); }
}

#top {
  display: flex;
  flex-direction: row;
  cursor: default;
  max-width: 850px;
  margin: auto;
  margin-bottom: 2rem;
}

#skills {
  min-height: 100%;
  font-size: 2rem;
  display: flex;
  margin: auto;
  flex-direction: column;
  line-height: 50px;
}

#skills * {
  flex: 1;
}

.skill::before {
  content: ">";
  margin-right: 2rem;
  color: var(--accent);
}

/* use vertical align on mobile */
@media screen and (max-width: 800px) {
  #top {
    text-align: center;
    flex-direction: column;
    margin: auto;
    max-width: fit-content;
  }
  #skills {
    font-size: 1.5rem;
    line-height: 2rem; 
    font-weight: 700;
  }
  #skills *::before {
    content: "";
    margin: 0;
  }

  header {
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .nav-links{ 
    width: 70%;
  }

  /* make icons slightly smaller */
  .link a img {
    max-width: 12vw;
    max-height: 12vw;
  }

  #resume {
    margin-top: -3.25rem !important;
  }

  /* make profile pic smaller */
  #headshot {
    margin-top: 1rem;
    max-width: 50vw;
    max-height: 50vw;
  }

  #projects {
    width: 6.25rem;
    right: -3rem;
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    animation: showDownFull !important;
    animation-duration: 1s !important;
    animation-fill-mode: forwards;
    
  }

  @keyframes showDownFull {
    from { height: 0rem; }
    to { height: 22rem; }
  }

  #project-container {
    position: absolute;
    top: 2rem;
    right: 4.5rem;
  }

  #project-menu {
    font-size: 2.5rem !important;
  }
}

/* left class and not slideLeft class */
.left {
  transform: translateX(100vw);
}

.slideDown {
  transform: translateY(-100vh);
  animation: slideIn;
  animation-duration: 1.5s;
  animation-fill-mode: forwards;
}

.slideLeft {
  transform: translateX(100vw);
  animation: slideLeft;
  animation-duration: 1.5s;
  animation-fill-mode: forwards;
}

/* slide in content above screen */
@keyframes slideIn {
  from { transform: translateY(-200vh) }
  to { transform: translateY(0); }
}

@keyframes slideLeft {
  from { transform: translateX(100vw); }
  to { transform: translateX(0); } 
}

#resume {
  font-size: 1.5rem;
  margin-top: -1rem;
}

/* subdomain navigation */
#project-container {
  width: 0;
  height: 1rem;
}

#project-menu {
  cursor: pointer;
  font-size: 2rem;
  margin-left: -0.25rem;
  color: var(--accent);
  /* disable select */
  user-select: none;
}

#projects {
  background: black;
  position: absolute;
  max-width: 25rem;
  border-radius: 2px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  z-index: 1;
  overflow: hidden;
  /* add animation that exapnds up the menu downward */
  animation: showDownMenu;
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
}

@keyframes showDownMenu {
  from { height: 0rem; }
  to { height: 7rem; }
}

#projects a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  flex: 1;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

#projects a:hover {
  color: var(--accent);
}

#projects a:active {
  color: var(--fg);
  background: var(--accent);
}
