@import url("https://fonts.googleapis.com/css2?family=Nunito&display=swap");

:root {
  --primaryColor: #fff;
  --navColor1: #3891a6;
  --navColor2: #ffc15e;
  --navColor3: #ed6a5a;
  --navColor4: #3e885b;
  --navColor5: #f3c178;
}

html,
* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  background: #000;
  font-family: Nunito, sans-serif;
}

/* --- Navigation Menu ------------------------------ */
/* Overlay */
.menu-overlay {
  position: fixed;
  z-index: 9;
  top: 0;
  left: -105%;
  height: 100vh;
  width: 100vw;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-flow: column nowrap;
  justify-content: stretch;
}

.menu-overlay.overlay-slide-right {
  left: 0;
  transition: left 0.4s ease-out;
}

.menu-overlay.overlay-slide-left {
  left: -105%;
  transition: left 0.8s ease-out;
}

/* Items */

.menu-overlay > a {
  display: block;
  position: relative;
  width: 100%;
  text-align: center;
  flex-grow: 1;
  padding-top: 9vh;
  color: whitesmoke;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 3px;
  transition: font-size 0.5s;
}

.menu-overlay > a:hover {
  font-size: 1.1rem;
}

.menu-overlay > a::before {
  left: 0;
}
.menu-overlay > a:hover::before {
  width: 30%;
}
.menu-overlay > a::after {
  right: 0;
}
.menu-overlay > a:hover::after {
  width: 30%;
}

.menu-overlay > a::after,
.menu-overlay > a::before {
  content: "";
  position: absolute;
  top: 50%;
  height: 3px;
  width: 0;
  background: whitesmoke;
  transition: width 0.7s ease-out;
}

.menu-overlay > a:nth-child(1) {
  background: var(--navColor1);
}
.menu-overlay > a:nth-child(2) {
  background: var(--navColor2);
}
.menu-overlay > a:nth-child(3) {
  background: var(--navColor3);
}
.menu-overlay > a:nth-child(4) {
  background: var(--navColor4);
}
.menu-overlay > a:nth-child(5) {
  background: var(--navColor5);
}

/* Items animation */

@keyframes slide-right {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}
@keyframes slide-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.button-slide-left-1 {
  animation: slide-left 0.1s linear 0.5s both;
}
.button-slide-left-2 {
  animation: slide-left 0.1s linear 0.4s both;
}
.button-slide-left-3 {
  animation: slide-left 0.1s linear 0.3s both;
}
.button-slide-left-4 {
  animation: slide-left 0.1s linear 0.2s both;
}
.button-slide-left-5 {
  animation: slide-left 0.1s linear 0.1s both;
}

.button-slide-right-1 {
  animation: slide-right 0.4s linear 0.2s both;
}
.button-slide-right-2 {
  animation: slide-right 0.4s linear 0.4s both;
}
.button-slide-right-3 {
  animation: slide-right 0.4s linear 0.6s both;
}
.button-slide-right-4 {
  animation: slide-right 0.4s linear 0.8s both;
}
.button-slide-right-5 {
  animation: slide-right 0.4s linear 1s both;
}

/* --- Menu Bars ------------------------------------ */

.menu-bars {
  position: fixed;
  top: 1rem;
  right: 2rem;
  z-index: 10;
  display: inline;
  cursor: pointer;
}

.bar1,
.bar2,
.bar3 {
  width: 35px;
  height: 2px;
  background-color: #fff;
  margin: 8px 0;
  transition: 0.4s;
}

/* Rotate first bar */
.change .bar1 {
  transform: rotate(-45deg) translate(-7px, 8px);
}

/* Fade out the second bar */
.change .bar2 {
  opacity: 0;
}

/* Rotate last bar */
.change .bar3 {
  transform: rotate(45deg) translate(-6px, -8px);
}

/* --- Sections ------------------------------------ */

section {
  width: 100%;
  height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primaryColor);
}

section#home {
  background-image: url("https://images.unsplash.com/photo-1581453904507-626ddb717f14?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2089&q=80");
  background-size: cover;
  background-position: center center;
}

section#home a {
  position: absolute;
  z-index: 2;
  top: 1.5rem;
  left: 1.5rem;
  text-decoration: none;
  font-size: 0.8rem;
  padding-bottom: 5px;
  color: var(--primaryColor);
  border-bottom: 1px solid var(--primaryColor);
}

section#about {
  background-color: var(--navColor2);
}

section#skills {
  background-color: var(--navColor3);
}

section#projects {
  background-color: var(--navColor4);
}

section#contact {
  background-color: var(--navColor5);
}

/* Media Query: Large Smartphone (Vertical) */
@media (max-width: 600px) {
  section#home a {
    top: 1rem;
    left: 1rem;
  }

  .menu-bars {
    top: 0.5rem;
    right: 1rem;
  }
}
