@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Orbitron:wght@400..900&display=swap");

:root {
  --primary-color: #89b7e8;
  --secondary-color: #ffd41f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
  font-weight: 500;
  font-size: 1rem;
  width: 100%;
  overflow-x: hidden;
}

.bg-grid {
  background-image: linear-gradient(
      90deg,
      hsla(0, 0%, 100%, 0.5) 1px,
      transparent 0
    ),
    linear-gradient(180deg, hsla(0, 0%, 100%, 0.5) 1px, transparent 0);
  background-size: 4vw 4vw;
  position: absolute;
  inset: 0;
}

.flex {
  display: flex;
}

nav {
  & ul {
    list-style: none;
  }
}

h1,
h2,
h3,
h4,
h5,
h6,
ul {
  margin: 0;
  padding: 0;
  font-weight: unset;
}

h4 {
  font-size: 2rem;
  line-height: 1;
}

h6 {
  font-size: 1.2rem;
  line-height: 1;
}

a {
  text-decoration: none;
  color: #ffffff;
  letter-spacing: 1px;
}

img {
  width: 100%;
}

main {
  position: relative;
}

.container {
  padding-top: 40px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  padding: 0 1rem;
  width: 100%;

  .col-md-4 {
    flex: 0 0 auto;
    width: 33.33333333%;
  }
  .col-md-8 {
    flex: 0 0 auto;
    width: 66.66666667%;
  }
  .col-md-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  .mb-5 {
    margin-bottom: 2rem;
  }

  .col-content {
    padding-top: 12rem;
  }

  .group {
    margin-bottom: 64px;
  }
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  background-color: #181b1c;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  transition: all 0.3s ease-in-out;

  .counter {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
  .number {
    font-family: "Bebas Neue";
    position: absolute;
    color: #ffffff;

    font-weight: 300;
    bottom: 4vh;
    right: 4vw;

    & span {
      font-size: 4vw;
      &.percent {
        font-size: 10vw;
      }
    }
  }
  .progress {
    position: relative;
    width: 100%;
    height: 5px;
    background-color: #2f3034;
    .bar {
      position: absolute;
      top: 0;
      left: 0;
      width: 50%;
      height: 100%;
      background-color: #ffffff;
    }
  }
}

.heading {
  position: relative;
  height: 100%;

  & h3 {
    font-size: 10vw;
    color: var(--primary-color);
    font-family: "Bebas Neue";
    background-color: #ffffff;
    z-index: 1;
    text-align: center;
  }

  .line {
    position: absolute;
    width: 0.1rem;
    height: 100%;
    background-color: rgb(17, 17, 17);
    left: 50%;
    z-index: 0;
  }
}

.sub-heading {
  font-family: "Bebas Neue";
  width: fit-content;
  position: relative;

  &::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: var(--secondary-color);
    margin-top: 2rem;
  }
}

.bg-primary {
  background-color: var(--primary-color);
}

.bg-secondary {
  background-color: var(--secondary-color);
}

.flex-box {
  display: flex;
  flex-flow: row wrap;

  .head {
    width: 100%;
    margin-bottom: 1rem;
  }
  .sub-head {
    margin-bottom: 0.5rem;
  }

  .item {
    &.half {
      width: 50%;
    }

    & a {
      color: #000000;
    }
    & span {
      font-size: 1rem;
      display: block;
    }
  }

  .group {
    width: 100%;
    display: flex;
    flex-flow: row wrap;
    margin-bottom: 1rem;
    gap: 1rem;

    .sub-head {
      width: 100%;
    }
  }
}

.badges {
  display: flex;
  flex-flow: row wrap;
  gap: 1rem;
}

.badge {
  padding: 5px 10px;
  background-color: rgb(17, 17, 17);
  border-radius: 4px;

  & h5 {
    font-size: 10px;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
}

.header {
  position: fixed;
  top: 0;
  overflow: hidden;
  z-index: 12;
  width: 100vw;

  &.theme-dark {
    .mobile-bt {
      .hamburger {
        .line {
          background-color: #000000;
        }
      }
    }
  }

  .mobile-bt {
    display: none;
    position: fixed;
    z-index: 12;
    width: 32px;
    height: 28px;
    top: 24px;
    right: 24px;
    z-index: 14;

    &.active {
      .hamburger {
        .line {
          &:first-child {
            top: 0px;
            transform: rotateZ(45deg);
            right: -4px;
          }

          &:nth-child(2) {
            top: 0;
            transform: rotateZ(-45deg);
          }

          &:last-child {
            top: -12px;
            transform: rotateZ(45deg);
          }
        }
      }
    }

    .hamburger {
      .line {
        position: relative;
        top: 0;
        height: 4px;
        display: block;
        background-color: #ffffff;
        margin-bottom: 8px;
        transition: 0.3s ease transform, 0.3s ease top, 0.3s ease width,
          0.3s ease right;
        border-radius: 2px;

        &:first-child {
          transform-origin: 0;
        }

        &:nth-child(2) {
          right: 0;
        }

        &:last-child {
          margin-bottom: 0;
        }
      }
    }
  }

  .menu {
    position: fixed;
    align-items: center;
    justify-content: end;
    margin: 20px;
    z-index: 11;
    right: 0;
  }

  .navigation {
    background-color: rgba(43, 43, 43, 0.6);
    backdrop-filter: blur(1rem);
    position: relative;
    z-index: 10;
    display: flex;
    gap: 1rem;
    padding: 24px;
    counter-reset: menu;

    & li {
      position: relative;
      font-family: "Bebas Neue", sans-serif;
      counter-increment: menu;

      &.active,
      &:hover {
        & a {
          color: var(--primary-color);
          &::before {
            color: var(--primary-color);
          }
        }
      }

      & a {
        display: flex;
        gap: 4px;
        transition: all 0.3s;
        &::before {
          content: "0" counter(menu);
          color: #ffffff;
          transition: all 0.3s;
        }
      }
    }
  }
}

.social-sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
  padding: 2rem;

  & nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  & a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    background-color: #ffffff;
    color: var(--primary-color);
    transition: 0.25s;

    &.active {
      border: 1px solid var(--secondary-color);
      color: var(--secondary-color);
    }
  }

  & svg {
    width: 18px;
    height: 18px;
  }
}

.hilight {
  position: relative;
  width: 100%;
  height: 100vh;
  background-color: rgba(17, 17, 17);
  margin-bottom: 32px;

  &::before {
    content: "";
    position: absolute;
    top: -80%;
    left: -10%;
    width: 70vw;
    aspect-ratio: 1;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: 10;
  }

  .wrapper {
    width: 50vw;
    height: 50%;
    background-color: var(--secondary-color);
    position: absolute;
    bottom: 0;
    left: 5vw;
    z-index: 10;
    border-radius: 20px 20px 0 0;
    transition: all 300ms ease;

    .image {
      width: 100%;
      height: 100%;
      object-fit: cover;
      position: absolute;
      z-index: 10;

      & img {
        width: 30vw;
        position: absolute;
        bottom: 0;
        left: 15%;
      }
    }

    .header {
      position: absolute;
      color: #ffffff;
      font-family: "Orbitron", sans-serif;
      text-transform: uppercase;
      top: 20%;
      left: 70%;
      font-size: 9vw;
      line-height: 9vw;
      width: fit-content;

      .title {
        position: relative;
      }
    }
  }
}

.about {
  .skill-box {
    display: flex;
    flex-direction: column;
    width: 100px;
    gap: 4px;

    .icon {
      width: 30px;
      height: 30px;
      margin: 0 auto;
    }

    & h5 {
      font-weight: 500;
      text-align: center;
      text-transform: uppercase;
    }
  }
}

.work {
  .w-cursor {
    position: absolute;
    width: 320px;
    height: 180px;
    margin: -100px 0 0 -100px;
    z-index: 0;
    pointer-events: none;
    transform: scale(0);
    z-index: 3;

    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .projects {
    counter-reset: item;
  }

  .project {
    position: relative;
    align-items: center;
    padding: 12px;
    border-bottom: solid 1px rgba(255, 255, 255, 0.2);
    color: #ffffff;
    margin-top: 20px;
    cursor: pointer;
    z-index: 2;
    counter-increment: item;

    .box {
      display: grid;
      grid-template-columns: 10% 1fr;
      color: #000000;

      .number {
        font-family: "Bebas Neue";
        font-size: 2rem;
        &::before {
          content: "0" counter(item);
        }
      }

      .detail {
        display: flex;
        flex-flow: wrap;

        .title {
          font-family: "Bebas Neue";
          width: 100%;
          font-size: 6vw;
        }
        .categories {
          width: 50%;

          text-transform: uppercase;
        }

        .year {
          width: 50%;
        }
      }

      .overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        cursor: pointer;
      }
    }
  }
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: pointer;
}

.wheel {
  .resume-text {
    position: absolute;
    bottom: 100px;
    right: 100px;
    font-family: "Bebas Neue";
    color: #ffffff;
    font-size: 1rem;
    user-select: none;
    pointer-events: none;
    animation: textWheel 7.5s linear infinite;
    z-index: 10;

    &:before {
      content: "";
      position: absolute;
      transform: translate(-50%, -50%);
      width: 20px;
      height: 20px;
      background-color: #ffffff;
      border-radius: 50%;
    }

    & span {
      position: absolute;
      top: -55px;
      text-transform: uppercase;
      display: inline-block;
      transform-origin: 0 55px;
    }
  }
}

.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background-color: #ffffff;
  border: solid 1px #ffffff;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.3s;
  mix-blend-mode: difference;
  z-index: 12;

  &.theme-dark {
    background-color: transparent;
    border: solid 1px var(--primary-color);
  }

  &.expand {
    transform: translate(-50%, -50%) scale(4);
    cursor: pointer;
  }
  &.expand-large {
    transform: translate(-50%, -50%) scale(10);
  }

  &.circle {
    border: solid 1px var(--secondary-color);
    background-color: transparent;
    mix-blend-mode: normal;
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 1200px) {
  .cursor {
    display: none;
  }
  .hilight {
    &::before {
      top: -20%;
      left: 0%;
      width: 80vw;
    }

    .wrapper {
      width: 60vw;
      height: 60%;
      .header {
        left: 40%;
        top: 10%;
      }
      .image {
        & img {
          width: 40vw;
        }
      }
    }
  }
}

@media (max-width: 768px) {
  .row {
    .col-12 {
      flex: 0 0 auto;
      width: 100%;
    }
    .col-content {
      padding-top: 0;
    }
  }

  .flex-box {
    gap: 1rem;

    .item {
      &.half {
        width: 100%;
      }
    }
  }

  .header {
    .navigation {
      position: fixed;
      z-index: 12;
      inset: 0 0 0 30%;
      flex-direction: column;
      padding: min(30vh, 10rem) 2rem;
      transform: translateX(100%);
      transition: transform 350ms ease-out;
      & ul {
        & li {
          margin-top: 1rem;
        }
      }
    }
    .mobile-bt {
      display: block;
    }
    .navigation {
      background-color: rgba(43, 43, 43, 0.7);

      & li {
        font-size: 2rem;
      }

      &.active {
        transform: translateX(0);
      }
    }
  }

  .heading {
    .line {
      display: none;
    }
  }

  .work {
    .project {
      .box {
        grid-template-columns: 1fr;
        & .detail {
          .title {
            font-size: 10vw;
          }
        }
      }
    }
  }
}

@keyframes textWheel {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
