@import url('https://fonts.googleapis.com/css?family=Lato:300,400|Poppins:300,400,800&display=swap');
@import url('https://raw.githubusercontent.com/elad2412/the-new-css-reset/main/css/reset.css');

/* #region Animations */
@keyframes top {
  0% {
    opacity: 0;
    bottom: -80px;
  }
  100% {
    opacity: 1;
    bottom: 0px;
  }
}
@keyframes icon {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.3) rotate(-02deg);
  }
  100% {
    opacity: 1;
    bottom: 0px;
  }
}
@keyframes mainBlock {
  0% {
    width: 0%;
    left: 0;
  }
  50% {
    width: 100%;
    left: 0;
  }
  100% {
    width: 0;
    left: 100%;
  }
}

@keyframes secBlock {
  0% {
    width: 0%;
    left: 0;
  }
  50% {
    width: 100%;
    left: 0;
  }
  100% {
    width: 0;
    left: 100%;
  }
}

@keyframes mainFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes popIn {
  0% {
    width: 0px;
    height: 0px;
    background: #e9d856;
    border: 0px solid #ddd;
    opacity: 0;
  }
  50% {
    width: 10px;
    height: 10px;
    background: #e9d856;
    opacity: 1;
    bottom: 45px;
  }
  65% {
    width: 7px;
    height: 7px;
    bottom: 0px;
    width: 15px;
  }
  80% {
    width: 10px;
    height: 10px;
    bottom: 20px;
  }
  100% {
    width: 7px;
    height: 7px;
    background: #e9d856;
    border: 0px solid #222;
    bottom: 13px;
  }
}

@keyframes secFadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 0.5;
  }
}
/* #endregion */

/* #region Helpers*/
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
}
.go-back {
  display: inline-flex;
  margin: 1rem;
  padding: 0.5rem 1.5rem;
  border: 0.0625rem solid rgb(255, 181, 16);
  border-radius: 0.5rem;
}
/* #endregion */
* {
  margin: 0;
  padding: 0;
  list-style-type: none;
  text-decoration: none;
}

body {
  width: 100dvw;
  height: 100dvh;
  font-family: 'Lato', sans-serif;
  line-height: calc(1em + 0.725rem);
  color: #ffffff;
  background: #232323;
  overflow: hidden;
}
a {
  color: currentColor;
}

.page {
  display: grid;
  grid-template-areas: 'indent-left content indent-right';
  grid-template-columns: minmax(20px, 1fr) minmax(280px, 1024px) minmax(
      20px,
      1fr
    );
  align-items: center;
  justify-items: center;
}
.header,
.homeworks {
  grid-area: content;
}
.header {
  align-self: self-start;

  width: 100%;
  padding-block: 2rem;
  display: flex;
  justify-content: space-between;
}

.box {
  width: fit-content;
  height: 250px;
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;

  .title {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    height: 50px;

    .block {
      width: 0%;
      height: inherit;
      background: #ffb510;
      position: absolute;
      animation: mainBlock 2s cubic-bezier(0.74, 0.06, 0.4, 0.92) forwards;
      display: flex;
    }

    h1 {
      font-family: 'Poppins';
      color: #fff;
      font-size: 32px;
      animation: mainFadeIn 2s forwards;
      animation-delay: 1.6s;
      opacity: 0;
      display: flex;
      align-items: baseline;
      position: relative;

      span {
        width: 0px;
        height: 0px;
        border-radius: 50%;
        background: #ffb510;
        animation: popIn 0.8s cubic-bezier(0.74, 0.06, 0.4, 0.92) forwards;
        animation-delay: 2s;
        margin-left: 5px;
        margin-top: -10px;
        position: absolute;
        bottom: 13px;
        right: -12px;
      }
    }
  }

  .role {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    height: 30px;
    margin-top: -10px;

    .block {
      width: 0%;
      height: inherit;
      background: #e91e63;
      position: absolute;
      animation: secBlock 2s cubic-bezier(0.74, 0.06, 0.4, 0.92) forwards;
      animation-delay: 2s;
      display: flex;
    }

    p {
      animation: secFadeIn 2s forwards;
      animation-delay: 3.2s;
      opacity: 0;
      font-weight: 400;
      font-family: 'Lato';
      color: #ffffff;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 5px;
    }
  }
}

.homeworkd-list {
  .homeworks-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    &:not(:last-child) {
      margin-block-end: 1rem;
    }

    &::before {
      content: '';
      width: 1.25rem;
      height: 1.25rem;

      background-image: url('./images/arrow.svg');
      background-repeat: no-repeat;
      background-position: center;
      background-size: contain;
      transition: 350ms ease 0s;
      transition-property: transform;
    }

    &:hover::before {
      transform: translateX(0.5rem);
    }
  }
  .homeworks-link {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.25rem 0.75rem;
    color: rgb(255, 181, 16);

    &::after {
      position: absolute;
      content: '';
      z-index: -1;
      width: 100%;
      height: 100%;
      inset: 0px;
      border-radius: 8px;
      transform-origin: center center;
      background-color: rgb(44, 70, 84);
      transition: 350ms ease 0s;
      transition-property: opacity, transform;

      opacity: 0.33;
      transform: scale(0.99);
    }

    &:hover::after {
      opacity: 0.5;
      transform: scale(1.06);
    }
  }
}

.effect-controls {
  display: flex;
  gap: 0.5rem;
  border: none;

  label:not(:last-of-type) {
    margin-inline-end: 0.5rem;
  }
}
