* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  overflow: hidden;
  position: relative;
  background-color: #212121;
}

.navbar {
  width: 100%;
  height: 60px;
  position: fixed;
  top: 0;
  left: 0;
  padding: 0 10rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9;
}

.toggle-btn {
  position: relative;
  width: 50px;
  height: 50px;
  cursor: pointer;
}

.toggle-btn span {
  position: absolute;
  top: 25%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 3px;
  background: rgb(212, 64, 101);
  transition: 1s;
}

.toggle-btn span:nth-child(2) {
  top: 50%;
  width: 70%;
}

.toggle-btn span:nth-child(3) {
  top: 75%;
  width: 40%;
}

.toggle-btn.active span:nth-child(2) {
  display: none;
}

.toggle-btn.active span:nth-child(1) {
  top: 50%;
  transform: rotate(45deg);
}

.toggle-btn.active span:nth-child(3) {
  top: 50%;
  transform: rotate(-45deg);
  width: 100%;
}

.page-container {
  position: relative;
  width: 100%;
  height: 100%;
  transition: 1s;
  left: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4));
}

.overlay {
  position: fixed;
  bottom: 0;
  left: -100%;
  height: 100%;
  width: 100%;
  background: #212121;
  z-index: 3;
}

.page {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background-size: cover;
  background-position: center;
}

.page.active {
  opacity: 1;
  pointer-events: all;
}

.page.home {
  background-image: url(https://images.unsplash.com/photo-1469474968028-56623f02e42e?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1174);
}
.page.project {
  background-image: url(https://images.unsplash.com/photo-1447752875215-b2761acb3c5d?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170);
}
.page.about {
  background-image: url(https://images.unsplash.com/photo-1475924156734-496f6cac6ec1?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170);
}

.page .title {
  font-size: 5rem;
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 5px 5px 5px rgba(0, 0, 0, 0.4);
}

/* JavaScript Animation & Rotation */
.page-container.active {
  left: -10px;
  transform: rotateY(45deg) scale(0.5);
}

.nav-list {
  position: absolute;
  top: 40%;
  right: 10vw;
  opacity: 0;
  font-family: sans-serif;
}

.link {
  position: relative;
  color: #fff;
  text-transform: capitalize;
  font-size: 20px;
  padding: 10px;
  transition: 0.5s;
  letter-spacing: 2px;
  list-style: none;
  font-weight: 600;
  cursor: pointer;
}

.link:hover {
  opacity: 0.8;
  color: blueviolet;
  transform: translateX(-20px);
}

.nav-list.show {
  opacity: 1;
}

/* Animation for JavaScrpit */
@keyframes slide {
  100% {
    left: 100%;
  }
}
