.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(
      42.02deg,
      rgb(28 28 28 / 30%) 23%,
      rgb(var(--color-primary-rgb) / 30%) 100%
    ),
    var(--color-background);
}

.hero__content {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: max-content;
  transform: translate(-50%, -50%);
}

.hero__profession {
  margin: 0 0 12px;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1;
  white-space: nowrap;
}

.hero__profession--typing {
  animation: hero-profession-type 1.5s steps(var(--profession-characters, 18), end) 150ms both;
}

@keyframes hero-profession-type {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

.hero h1 {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 128px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
}

.hero__actions .button:first-child {
  width: 172px;
}

.hero__actions .button:last-child {
  width: 143px;
}

.hero__scroll-indicator,
.hero__contact {
  position: absolute;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 24px;
}

.hero__scroll-indicator {
  left: max(96px, calc((100vw - var(--content-width)) / 2));
  height: 312px;
}

.hero__mouse {
  position: relative;
  width: 30px;
  height: 48px;
  border: 1px solid var(--color-primary);
  border-radius: 15px;
}

.hero__mouse span {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 2px;
  height: 12px;
  background-color: var(--color-primary);
  transform: translateX(-50%);
}

.hero__line {
  display: block;
  width: 1px;
  flex: 1;
  background-color: var(--color-text);
}

.hero__line--primary {
  background-color: var(--color-primary);
}

.hero__contact {
  right: max(96px, calc((100vw - var(--content-width)) / 2));
  width: 32px;
  height: 480px;
}

.hero__email {
  height: 170px;
  color: var(--color-text);
  font-size: 18px;
  line-height: 22px;
  text-decoration: none;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.hero__socials {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  height: 76px;
}

.hero__socials a {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.hero__socials img {
  width: 100%;
  height: 100%;
  transition: filter 100ms ease-in;
}

.hero__socials a:hover img {
  filter: brightness(0) invert(1);
}

.hero__mail-icon {
  display: none;
}

.marquee {
  position: absolute;
  bottom: 0;
  left: -21px;
  z-index: 3;
  width: calc(100% + 40px);
  height: 62px;
  padding-inline: 32px;
  overflow: hidden;
  background-color: rgb(255 255 255 / 12%);
  backdrop-filter: blur(5.3px);
  transform: rotate(-3deg);
  transform-origin: top left;
}

.marquee__track,
.marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee__track {
  width: max-content;
  height: 100%;
  animation: marquee-scroll 10s linear infinite;
}

.marquee__group {
  gap: 56px;
  padding-right: 56px;
}

.marquee__group span {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 56px;
  color: var(--color-primary);
  font-size: 32px;
  line-height: 38px;
}

.marquee__group span::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-primary);
  content: "";
}

@keyframes marquee-scroll {
  to {
    transform: translateX(-50%);
  }
}

@keyframes mobile-scroll-indicator {
  from {
    top: 18px;
  }

  to {
    top: 26px;
  }
}

@media (max-width: 990px) {
  .hero {
    height: 100vh;
  }

  .hero__content {
    top: 50%;
    width: min(calc(100% - 24px), 366px);
    transform: translate(-50%, -50%);
  }

  .hero__profession {
    margin-bottom: 12px;
    font-size: 24px;
    line-height: 24px;
  }

  .hero h1 {
    font-size: clamp(50px, 15.9vw, 62px);
    line-height: 62px;
    white-space: nowrap;
  }

  .hero__actions {
    gap: 24px;
    margin-top: 32px;
  }

  .hero__actions .button:first-child {
    width: 153px;
  }

  .hero__actions .button:last-child {
    width: 143px;
  }

  .hero__scroll-indicator {
    left: 16px;
    height: 296px;
  }

  .hero__mouse span {
    background-color: var(--color-text);
    animation: mobile-scroll-indicator 500ms ease-in 10ms infinite alternate;
  }

  .hero__contact {
    right: 16px;
    height: 256px;
  }

  .hero__email {
    display: none;
  }

  .hero__socials {
    height: 120px;
  }

  .hero__mail-icon {
    display: block;
  }

  .marquee {
    top: auto;
    bottom: 0;
    left: calc(50% - 740px);
    width: 1480px;
    height: 53px;
    padding-inline: 32px;
    transform: matrix(1, -0.05, 0.05, 1, 0, 0);
    transform-origin: top left;
  }

  .marquee__group {
    gap: 40px;
    padding-right: 40px;
  }

  .marquee__group span {
    gap: 40px;
    font-size: 24px;
    line-height: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__profession--typing {
    animation-duration: 1.5s !important;
  }

  .hero__socials img {
    transition-duration: 100ms !important;
  }

  .marquee__track {
    animation-duration: 10s !important;
    animation-iteration-count: infinite !important;
  }
}

@media (max-width: 990px) and (prefers-reduced-motion: reduce) {
  .hero__mouse span {
    animation-duration: 500ms !important;
    animation-iteration-count: infinite !important;
  }
}
