:root {
  color-scheme: dark;
  font-family: "Raleway", Arial, Helvetica, sans-serif;
  font-size: 2.667vw;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: #020712;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  color: #fff;
  background: #020712;
}

img {
  display: block;
  max-width: 100%;
}

.page {
  position: relative;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: #020712;
}

.hero {
  display: grid;
  height: 18rem;
  place-items: center;
  background: url("images/pixel-grid.png") center top / cover no-repeat;
}

.hero__logo {
  width: 19rem;
  height: auto;
  margin-top: -2.2rem;
}

main {
  padding: 5.8rem 0 6rem;
}

.profile {
  display: flex;
  width: 30rem;
  margin: 0 auto;
  align-items: center;
  gap: 2.2rem;
}

.profile__photo {
  width: 6.7rem;
  height: 6.7rem;
  flex: 0 0 6.7rem;
  border-radius: 50%;
  object-fit: cover;
}

.profile__text {
  min-width: 0;
}

.profile h1 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: -0.08rem;
  line-height: 1.12;
  white-space: nowrap;
}

.profile p {
  margin: 0.8rem 0 0;
  font-size: 1.34rem;
  font-weight: 400;
  letter-spacing: -0.04rem;
  line-height: 1.25;
  white-space: nowrap;
}

.contacts {
  display: flex;
  width: 32rem;
  margin: 6.3rem auto 0;
  justify-content: space-between;
  gap: 1.4rem;
}

.contact {
  position: relative;
  isolation: isolate;
  display: flex;
  width: 9.7rem;
  height: 5.9rem;
  flex: 0 0 9.7rem;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0.8rem 1.25rem;
  overflow: visible;
  border: 0;
  border-radius: 1rem;
  color: #fff;
  font-size: 1.17rem;
  line-height: 1;
  text-decoration: none;
  background: #020b1b;
  transition:
    transform 180ms ease,
    filter 180ms ease;
}

.contact::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  background: var(--blur) center / cover no-repeat;
  pointer-events: none;
  content: "";
}

.contact > span:last-child {
  position: relative;
  z-index: 3;
}

.contact:hover,
.contact:focus-visible {
  z-index: 4;
  outline: none;
  filter: brightness(1.16);
  transform: translateY(-0.25rem);
}

.contact--whatsapp {
  --blur: url("images/wa-blur.png");
}

.contact--telegram {
  --blur: url("images/tg-blur.png");
}

.contact--viber {
  --blur: url("images/viber-blur.png");
}

.contact__art {
  position: absolute;
  z-index: 1;
  top: -4.5rem;
  left: 50%;
  width: 7.5rem;
  height: 7.5rem;
  pointer-events: none;
  transform: translateX(-50%);
}

.contact__icon {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 6.1rem;
  height: 6.1rem;
  max-width: none;
  transform-origin: center;
  animation: icon-sway 2.2s ease-in-out infinite alternate;
}

.contact--telegram .contact__icon {
  animation-delay: -0.8s;
}

.contact--viber .contact__icon {
  animation-delay: -1.6s;
}

@keyframes icon-sway {
  from {
    transform: translate(-50%, -50%) rotate(-10deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(10deg);
  }
}

.portfolio {
  position: absolute;
  top: 50.2rem;
  left: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 16.5rem;
  overflow: hidden;
  contain: paint;
}

.carousel__track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  gap: 1.4rem;
  animation: carousel-scroll 45s linear infinite;
  will-change: transform;
}

.carousel__slide {
  width: 18rem;
  flex: 0 0 18rem;
  margin: 0;
  opacity: 1;
  filter: none;
  transform: none;
}

.carousel__slide img {
  width: 100%;
  aspect-ratio: 808 / 632;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 1.2rem 2.8rem rgba(0, 0, 0, 0.48);
}

@keyframes carousel-scroll {
  to {
    transform: translate3d(-194rem, 0, 0);
  }
}

@media (min-width: 500px) {
  :root {
    font-size: 10px;
  }

  .page {
    width: 42rem;
  }
}

@supports (overflow: clip) {
  html,
  body,
  .page,
  .portfolio,
  .carousel {
    overflow-x: clip;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel__track {
    animation-duration: 90s;
  }
}
