@import "./reset.css";
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --primary-bg-color: #0e0e0e;
  --primary-accent: #0c1618;
  --secondary-accent: #40F0D0;

  --main-text-color: #00FFFF;
  --supportive-text-color: #40F0D0;
  --gray-text-color: #00ccff;

  --white-color: #000000;
  --gray-color: #00FFFF;
  --gray-color-2: #40F0D0;
  --gray-color-3: #008080;

  --color-preloader-bg: var(--white-color);
  --color-dots: #1a1a1a;
}

/* Common styles */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  color: var(--main-text-color);
  font-family: "Cyber", sans-serif;
  letter-spacing: -0.15px;
}

.container {
  padding: 0 32px;
  max-width: 1200px;
  /* max-width: clamp(54.5rem, 38.125rem + 81.88vw, 120rem); */
  margin: 0 auto;
}

.container-lg {
  max-width: 1600px;
}

.title {
  font-size: 44px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 54px;
}

.btn {
  display: inline-block;
  height: 52px;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  line-height: 52px;
  padding: 0 36px;
  margin: 0 12px 16px 0;
  color: var(--white-color);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s;
  background-color: var(--gray-color-3);
  border: 2px solid var(--accent);
  transition: all 0.3s ease-in;
}

.btn:hover,
.btn:focus {
  background-color: var(--secondary-accent);
  border-color: var(--secondary-accent);
  color: var(--white-color);
  outline: 0;
}

.btn:active {
  background-color: #8b4a48;
}

.btn-white {
  background: transparent;
  font-weight: 700;
  border: 2px solid var(--accent);
  color: var(--accent);
  transition: all 0.3s ease-in;
}

.btn-white:hover,
.btn-white:focus {
  background: var(--gray-color);
  border: 2px solid var(--gray-color-3);
  color: var(--primary-accent);
}

.btn-white:active {
  background-color: #3c4446;
}

.btn-red {
  background: var(--secondary-accent);
  border: 2px solid var(--secondary-accent);
  color: var(--white-color);
  transition: all 0.3s ease-in;
}

.btn-red:hover,
.btn-red:focus {
  background: var(--gray-color-3);
  border: 2px solid var(--gray-color-3);
}

.btn-red:active {
  background-color: #3c4446;
}

h5 {
  font-size: 15px;
  letter-spacing: 2px;
  line-height: 23px;
  font-weight: 600;
  text-transform: uppercase;
}

.white {
  color: var(--white-color);
}

/* Header */
.header {
  z-index: 100;
  background-color: transparent;
  height: 90px;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
  height: 90px;
}

.header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1999;
  background-image: linear-gradient( to bottom, var(--primary-accent), var(--primary-accent) 50%, var(--primary-accent) 75%, transparent);
  padding-top: 0;
  padding-bottom: 0;
  transition: all 0.3s ease-in-out;
}

.logo {
  position: relative;
  line-height: 1;
  font-weight: 400;
  font-size: clamp(1.125rem, 1.211rem + 1.7vw, 1.675rem);
  color: var(--main-text-color);
}

.nav-list {
  display: flex;
  column-gap: 18px;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.15px;
  background-color: #0e0e0e;
}

.nav-btn {
  display: none;
}

.nav-link {
  color: var(--main-text-color);
}

.nav-link.active {
  text-decoration: underline;
  text-decoration-color: var(--gray-color-3);
  text-decoration-thickness: 1.2px;
  text-underline-offset: 7px;
}

/* Hero section */
.hero {
  position: relative;
  padding-top: 180px;
  background-color: var(--primary-bg-color);
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
}

.hero-content {
  text-align: left;
  align-self: center;
  padding: 20px;
  flex-grow: 1;
}

.hero-greeting {
  font-size: clamp(1rem, 0.929rem + 0.36vw, 1.25rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--secondary-accent);
}

.hero-heading {
  margin: 5px 0;
  font-weight: 500;
  font-size: clamp(3.25rem, 2.75rem + 2.5vw, 5rem);
  line-height: 1.2;
}

.hero-heading-subtitle {
  font-size: clamp(1.125rem, 1.054rem + 0.36vw, 1.375rem);
  font-weight: 400;
}

.hero-img {
  display: flex;
  flex: 1 1 356px;
  justify-content: flex-end;
  margin-top:auto;
}

.hero-img img {
  display: block;
  position: relative;
}

.about-social-list {
  display: flex;
}

.social-links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 20px;
  margin: 40px 0 40px;
  height: 24px;

  img {
    height: 24px;
    width: 24px;
  }
}

.social-links-row a {
  filter: invert(35%) sepia(11%) saturate(160%) hue-rotate(145deg)
    brightness(88%) contrast(80%);
  transition: all 0.3s ease-in-out;
}

.social-links-row a:hover {
  filter: invert(0%) sepia(0%) saturate(7500%) hue-rotate(305deg)
    brightness(97%) contrast(103%);
}

/* About section */
.about {
  padding: 7rem 0;
}

.about-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  justify-content: center;
  gap: 90px;
  margin-bottom: 80px;
  color: var(--supportive-text-color);
}

.about-descr {
  font-size: clamp(1rem, 0.964rem + 0.18vw, 1.125rem);
  line-height: 1.7;
  font-weight: 400;
  margin-bottom: 10px;
}

.skill {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 30px;
}

.skill-title,
.skill-percent {
  display: inline-block;
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0px;
}

.skill-percent {
  float: right;
}
.skill-bar__progress {
  background-color: var(--primary-bg-color);
  border-radius: 5px;
  height: 4px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.skill-bar__fill {
  background-color: var(--secondary-accent);
  height: 4px;
  width: 0; /* Initial width is 0 */
  transition: width 1.5s ease-in-out; /* Smooth transition for the fill */
}

.about-download-btn {
  margin-top: 40px;
}

.services-row {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  justify-content: space-between;
}

.service-card {
  max-width: 300px;
}

.service-card-img {
  display: block;
  height: 50px;
  margin: 0 auto 20px;
  filter: invert(33%) sepia(7%) saturate(243%) hue-rotate(145deg)
    brightness(94%) contrast(81%);
}

.service-card-title {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: clamp(1.125rem, 1.089rem + 0.18vw, 1.25rem);
}

.service-card p {
  font-size: 16px;
  line-height: 1.7;
  text-align: center;
}

/* Works */
.projects {
  padding: 7rem 0;
  background-color: var(--primary-bg-color);
}

.projects-title {
  text-align: center;
}

.projects-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.project-box {
  position: relative;
  overflow: hidden;
  display: block;
  max-width: 510px;
}

.project-box a {
  display: inline-block;
}

.project-box:hover .project-mask {
  opacity: 1;
  visibility: visible;
}

.project-box:hover .project-mask .project-caption {
  bottom: 30px;
  opacity: 1;
}

.project-box:hover .project-img {
  transform: scale(1.1);
  transition: all 2s cubic-bezier(0.23, 1, 0.32, 1) 0s;
  width: 100%;
}

.project-img {
  transform: scale(1);
  width: 100%;
  transition: all 2s cubic-bezier(0.23, 1, 0.32, 1) 0s;
}

.project-mask {
  background: none repeat scroll 0 0 rgba(0, 0, 0, 0.7);
  height: 100%;
  position: absolute;
  transition: all 0.5s ease-in-out 0s;
  width: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
}

.project-mask p {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 400;
  margin-top: 0;
  text-align: left;
}

.project-mask .project-caption {
  position: absolute;
  bottom: -60px;
  left: 0;
  padding-left: 30px;
  padding-right: 30px;
  text-align: left;
  transition: all 0.5s ease-in-out 0s;
  opacity: 0;
}

.project-mask p {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 400;
  margin-top: 0;
  text-align: left;
}

/* Contact */
.contact {
  padding: 7rem 0;
  text-align: center;
}

.contact-content {
  font-size: clamp(1rem, 0.964rem + 0.18vw, 1.125rem);
  color: var(--supportive-text-color);
  margin: 0 auto 20px;
}

.contact form {
  max-width: 500px;
  margin: 20px auto;
  text-align: center;
}

.contact form .input-box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
  width: 100%;
  padding: 15px;
  font-size: 15px;
  color: var(--gray-text-color);
  border: 1px solid var(--gray-color-2);
  margin: 7px 0;
}

.contact form .input-box input {
  width: 100%;
}

.contact form textarea {
  resize: none;
}

.contact-button {
  margin-top: 20px;
}

/* Footer */
.footer {
  background-color: var(--primary-accent);
  color: var(--gray-color-3);
}

.footer-row {
  display: flex;
  flex-direction: column;
  column-gap: 20px;
  align-items: center;
  padding: 40px 0;
}

.footer-social {
  margin-top: 0;
}

.footer-social a:hover {
  filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg)
    brightness(102%) contrast(102%);
}

.footer-copyright {
  font-size: clamp(0.75rem, 0.679rem + 0.36vw, 1rem);
}

.response {
  position: fixed;
  display: inline-block;
  background-color: var(--primary-accent);
  color: var(--white-color);
  border: 1px solid var(--white-color);
  min-width: 280px;
  padding: 20px 40px;
  bottom: -100px;
  left: 50%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: all 0.3s ease-in-out;
  z-index: 5;
}

.response.open {
  bottom: 20px;
  opacity: 1;
  visibility: visible;
}

/* "go to top" button */
.goToTop {
  z-index: 599;
  position: fixed;
  width: 40px;
  height: 40px;
  background-color: var(--gray-color);
  top: auto;
  left: auto;
  right: 30px;
  bottom: 30px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  border-radius: 2px;
  transition: opacity 350ms, visibility 350ms;
}

.goToTop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  filter: invert(4%) sepia(23%) saturate(2306%) hue-rotate(148deg)
    brightness(91%) contrast(90%);
}

.goToTop img {
  height: 16px;
  width: 16px;
}

.goToTop:hover {
  filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg)
    brightness(102%) contrast(102%);
}

.goToTop.reveal {
  display: block;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition: all 0.3s;
}

/* Preloader with jumping dots */
#preloader {
  position: fixed;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  background: var(--color-preloader-bg);
  z-index: 3000;
  height: 100vh;
  width: 100vw;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.5s ease-out;
}

.jumping-dots {
  position: relative;
  width: 6px;
  height: 6px;
  padding: 0;
  display: inline-block;
}

.jumping-dots > div {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--color-dots);
  border-radius: 50%;
}

.jumping-dots > div:nth-of-type(1) {
  left: 20px;
}

.jumping-dots > div:nth-of-type(3) {
  left: -20px;
}

.jumping-dots > div {
  animation: jumping-dots 1.2s infinite ease;
  animation-delay: 0.2s;
}

.jumping-dots > div:nth-of-type(1) {
  animation-delay: 0.4s;
}

.jumping-dots > div:nth-of-type(3) {
  animation-delay: 0s;
}

@keyframes jumping-dots {
  0% {
    top: 0;
  }

  40% {
    top: -6px;
  }

  80% {
    top: 0;
  }
}

@import url('https://unpkg.com/normalize.css') layer(normalize);
@import url('https://fonts.googleapis.com/css2?family=Gloria+Hallelujah&display=swap');
/* @import 'normalize.css' layer(normalize); */

@font-face {
  font-family: Cyber;
  src: url('https://assets.codepen.io/605876/Blender-Pro-Bold.otf');
  font-display: swap;
}

@layer normalize, base, demo, backdrop, transition, delays, glitch, instruction;

@layer instruction {
  .instruction {
    position: absolute;
    left: 50%;
    top: 50%;
    font-family: 'Gloria Hallelujah', cursive;
    translate: -140px 20%;
    color: color-mix(in lch, canvas, canvasText 80%);

    svg {
      width: 50px;
    }

    span {
      display: inline-block;
      translate: -150% 105%;
      rotate: 10deg;
      font-size: 0.875rem;
    }
  }
}

@layer glitch {
  .letters {
    display: flex;

    span:nth-of-type(2),
    span:nth-of-type(5) {
      scale: 1 -1;
    }
    span:nth-of-type(3),
    span:nth-of-type(6),
    span:nth-of-type(7) {
      scale: -1 -1;
    }
  }
  .actual-activation {
    --shimmy-distance: 5;
    --clip-one: polygon(
      0 2%,
      100% 2%,
      100% 95%,
      95% 95%,
      95% 90%,
      85% 90%,
      85% 95%,
      8% 95%,
      0 70%
    );
    --clip-two: polygon(
      0 78%,
      100% 78%,
      100% 100%,
      95% 100%,
      95% 90%,
      85% 90%,
      85% 100%,
      8% 100%,
      0 78%
    );
    --clip-three: polygon(
      0 44%,
      100% 44%,
      100% 54%,
      95% 54%,
      95% 54%,
      85% 54%,
      85% 54%,
      8% 54%,
      0 54%
    );
    --clip-four: polygon(
      0 0,
      100% 0,
      100% 0,
      95% 0,
      95% 0,
      85% 0,
      85% 0,
      8% 0,
      0 0
    );
    --clip-five: polygon(
      0 0,
      100% 0,
      100% 0,
      95% 0,
      95% 0,
      85% 0,
      85% 0,
      8% 0,
      0 0
    );
    --clip-six: polygon(
      0 40%,
      100% 40%,
      100% 85%,
      95% 85%,
      95% 85%,
      85% 85%,
      85% 85%,
      8% 85%,
      0 70%
    );
    --clip-seven: polygon(
      0 63%,
      100% 63%,
      100% 80%,
      95% 80%,
      95% 80%,
      85% 80%,
      85% 80%,
      8% 80%,
      0 70%
    );

    &:is(:focus-visible, :hover) .glitch {
      animation: glitch 2s infinite;
      display: flex;

      .backdrop {
        background: canvas;
      }
    }

    .glitch {
      display: none;
      position: absolute;
      inset: 0;
      translate: 0% 0;
      align-items: center;
      gap: 0.5rem;
      padding: 0.5rem 0.5rem;
      pointer-events: none;
      color: var(--accent);
      text-shadow: 0 1px var(--shadow);

      kbd {
        opacity: 0;
      }
    }
  }
  .modal__glitch {
    --shimmy-distance: 2;
    --clip-one: polygon(
      0 2%,
      100% 2%,
      100% 95%,
      95% 95%,
      95% 90%,
      85% 90%,
      85% 95%,
      8% 95%,
      0 70%
    );
    --clip-two: polygon(
      0 78%,
      100% 78%,
      100% 100%,
      95% 100%,
      95% 90%,
      85% 90%,
      85% 100%,
      8% 100%,
      0 78%
    );
    --clip-three: polygon(
      0 44%,
      100% 44%,
      100% 54%,
      95% 54%,
      95% 54%,
      85% 54%,
      85% 54%,
      8% 54%,
      0 54%
    );
    --clip-four: polygon(
      0 0,
      100% 0,
      100% 0,
      95% 0,
      95% 0,
      85% 0,
      85% 0,
      8% 0,
      0 0
    );
    --clip-five: polygon(
      0 0,
      100% 0,
      100% 0,
      95% 0,
      95% 0,
      85% 0,
      85% 0,
      8% 0,
      0 0
    );
    --clip-six: polygon(
      0 40%,
      100% 40%,
      100% 85%,
      95% 85%,
      95% 85%,
      85% 85%,
      85% 85%,
      8% 85%,
      0 70%
    );
    --clip-seven: polygon(
      0 63%,
      100% 63%,
      100% 80%,
      95% 80%,
      95% 80%,
      85% 80%,
      85% 80%,
      8% 80%,
      0 70%
    );
    position: absolute;
    inset: 0;
    padding: 1rem;
    animation-duration: 2s;
    color: var(--shadow);
    z-index: -1;
  }
  @keyframes glitch {
    0% {
      clip-path: var(--clip-one);
    }
    2%,
    8% {
      clip-path: var(--clip-two);
      transform: translate(calc(var(--shimmy-distance) * -1%), 0);
    }
    6% {
      clip-path: var(--clip-two);
      transform: translate(calc(var(--shimmy-distance) * 1%), 0);
    }
    9% {
      clip-path: var(--clip-two);
      transform: translate(0, 0);
    }
    10% {
      clip-path: var(--clip-three);
      transform: translate(calc(var(--shimmy-distance) * 1%), 0);
    }
    13% {
      clip-path: var(--clip-three);
      transform: translate(0, 0);
    }
    14%,
    21% {
      clip-path: var(--clip-four);
      transform: translate(calc(var(--shimmy-distance) * 1%), 0);
    }
    25% {
      clip-path: var(--clip-five);
      transform: translate(calc(var(--shimmy-distance) * 1%), 0);
    }
    30% {
      clip-path: var(--clip-five);
      transform: translate(calc(var(--shimmy-distance) * -1%), 0);
    }
    35%,
    45% {
      clip-path: var(--clip-six);
      transform: translate(calc(var(--shimmy-distance) * -1%));
    }
    40% {
      clip-path: var(--clip-six);
      transform: translate(calc(var(--shimmy-distance) * 1%));
    }
    50% {
      clip-path: var(--clip-six);
      transform: translate(0, 0);
    }
    55% {
      clip-path: var(--clip-seven);
      transform: translate(calc(var(--shimmy-distance) * 1%), 0);
    }
    60% {
      clip-path: var(--clip-seven);
      transform: translate(0, 0);
    }
    31%,
    61%,
    100% {
      clip-path: var(--clip-four);
    }
  }
}

@layer delays {
  [data-upgrading='true'] .backdrop {
    animation: bg-flicker 0.25s var(--flicker);
  }
  .modal[data-action='Cancel'] [data-action='Cancel'] .backdrop,
  .modal[data-action='Proceed'] [data-action='Proceed'] .backdrop {
    animation: bg-flicker 0.25s var(--flicker) backwards;
  }

  [data-upgrading='true'] kbd,
  .modal[data-action='Cancel'] [data-action='Cancel'] kbd,
  .modal[data-action='Proceed'] [data-action='Proceed'] kbd {
    opacity: 0;
  }

  .modal:not(:popover-open) {
    --base-delay: 0s;
    &::before,
    &::after {
      transition-delay: calc(var(--base-delay) + 0.325s);
    }
    .body__backdrop,
    .modal__body,
    .body__content {
      transition-delay: calc(var(--base-delay) + 0.075s);
    }
    h2 span,
    h2::after,
    .body__text,
    .modal__actions {
      transition-delay: var(--base-delay);
    }
  }
  .modal[data-action] {
    --base-delay: 0.35s;
    &::before,
    &::after {
      transition-delay: calc(var(--base-delay) + 0.325s);
    }
    .body__backdrop,
    .modal__body,
    .body__content {
      transition-delay: calc(var(--base-delay) + 0.075s);
    }
    h2 span,
    h2::after,
    .body__text,
    .modal__actions {
      transition-delay: var(--base-delay);
    }
  }
  .modal:popover-open {
    &::before,
    &::after {
      animation-delay: 0.2s;
      transition-delay: 0s;
    }
    .body__backdrop,
    .modal__body,
    .body__content {
      transition-delay: 0.22s;
    }
    h2 span,
    h2::after,
    .body__text {
      transition-delay: 0.325s;
    }
    h2::after {
      transition-timing-function: ease-out;
    }
    .modal__actions {
      transition-delay: 0.5s;
    }
  }
}

@layer transition {
  :root {
    --flicker: linear(
      0 0%,
      0.1864 6.17%,
      0.0001 14.41%,
      0.5244 20.97%,
      0.3927 37.91%,
      0.8115 60.62%,
      0.9416 61.92%,
      0.9928 67.98%,
      0.5032 70.42%,
      0.9077 96.96%,
      0.6736 98.74%,
      1 100%
    );
  }
  /* this is "trickier" than normal because there are many things happening */
  /*
    1. Side bar fade + translate in
    2. The backdrop slides in
    3. The heading and content fade in but the paragraphs translate too
    4. The heading underline draws in
    5. The actions fade in last with a slight translate
    6. [optional] fire a glitch animation on the content once on load
  */
  .modal {
    transition-property: display, overlay;
    transition-duration: 1s;
    transition-behavior: allow-discrete;
    transition-timing-function: ease-out;
  }

  modal[data-action] {
    transition-duration: 1s;
  }

  modal:popover-open {
    transition-duration: 1s;
  }

  .modal::after,
  .modal::before {
    transition-property: opacity, translate;
    transition-duration: 0.2s;
    transition-timing-function: ease-out;
    translate: -25% 0;
    opacity: 0;
  }

  .modal h2::after {
    transform-origin: 0 50%;
    transition-duration: 0.26s;
    transition-property: scale;
    transition-timing-function: ease-in;
    scale: 0 1;
  }

  .modal h2 span {
    opacity: 0;
    transition-property: opacity;
    transition-timing-function: ease-out;
    transition-duration: 0.26s;
  }

  .modal .body__backdrop {
    transition-property: translate;
    transition-duration: 0.26s;
    translate: calc(-100% - (2 * var(--border))) 0;
  }

  .modal .modal__body,
  .modal .body__content {
    transition-property: clip-path;
    transition-duration: 0.26s;
    clip-path: inset(0 calc(100% + (2 * var(--border))) 0 0);
  }

  .modal .body__text {
    opacity: 0;
    translate: 0 -1lh;
    transition-property: opacity, translate;
    transition-duration: 0.26s;
    transition-timing-function: ease-out;
  }

  .modal .modal__actions {
    transition-property: translate, opacity;
    transition-duration: 0.1s;
    transition-timing-function: ease-out;
    opacity: 0;
    translate: -24px 0;
  }

  .modal:popover-open {
    &::before,
    &::after {

      opacity: 1;
      translate: var(--border) 0;
    }
    &::before {
            animation: flicker 0.625s var(--flicker) none;
    }
    .body__backdrop {
      translate: 0 0;
    }
    .body__content {
      clip-path: inset(0 calc(var(--border) * -1) 0 0);
    }
    .modal__body {
      clip-path: inset(0 calc(var(--border) * -1) 0 0);
    }
    h2 span {
      opacity: 1;
    }
    h2::after {
      scale: 1 1;
    }
    .body__text {
      translate: 0 0;
      opacity: 1;
    }
    .modal__actions {
      opacity: 1;
      translate: 0 0;
    }
  }

  @starting-style {
    .modal:popover-open {
      opacity: 0;

      &::before,
      &::after {
        opacity: 0;
        translate: -25% 0;
      }

      .modal__actions {
        translate: -24px 0;
        opacity: 0;
      }

      .body__backdrop {
        translate: calc(-100% - (2 * var(--border))) 0;
      }

      .body__text {
        opacity: 0;
        translate: 0 -1lh;
      }

      .body__content {
        clip-path: inset(0 calc(100% + (2 * var(--border))) 0 0);
      }

      .modal__body {
        clip-path: inset(0 calc(100% + (2 * var(--border))) 0 0);
      }

      h2 span {
        opacity: 0;
      }

      h2::after {
        scale: 0 1;
      }
    }
  }
  @keyframes flicker {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
  @keyframes bg-flicker {
    0% {
      background: light-dark(hsl(0 0% 100% / 0.65), hsl(0 0% 0% / 0.65));
    }
    100% {
      background: var(--accent);
    }
  }
}

@layer backdrop {
  .body__backdrop {
    position: absolute;
    inset: 0;

    &::after {
      content: '';
      position: absolute;
      left: 100%;
      top: 2rem;
      width: calc(2 * var(--border));
      height: 40%;
      background: var(--accent);
      opacity: 0.7;
      clip-path: polygon(0 0, 0 100%, 100% calc(100% - 6px), 100% 6px);
    }
  }

  .button-to-a {
    outline: none;
    outline-color: hsl(183 38% 57%);

    &:is(:hover, :focus-visible) {
      kbd {
        color: var(--accent);
      }
      .backdrop {
        background: var(--accent);
      }
      color: canvas;
    }
  }

  .backdrop {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: light-dark(hsl(0 0% 100% / 0.4), hsl(0 0% 0% / 0.4));
    clip-path: var(--clip);
    pointer-events: none;

    &::before {
      content: '';
      position: absolute;
      inset: 0;
      background: var(--accent);
      translate: 0 0;
      border: var(--border) solid #0000;
      clip-path: var(--clip);
      mask: linear-gradient(#0000 0% 100%), linear-gradient(#fff 0% 100%);
      mask-clip: padding-box, border-box;
      mask-repeat: no-repeat;
      mask-composite: intersect;
      z-index: 2;
    }

    .corner {
      position: absolute;
      bottom: 0;
      right: 0;
      height: var(--corner);
      width: var(--corner);

      &::after {
        content: '';
        height: calc(var(--border) * 2);
        width: 200%;
        position: absolute;
        top: 50%;
        left: 50%;
        translate: -50% -50%;
        transform: rotate(135deg);
        background: var(--accent);
      }
    }
  }
}

@layer demo {
  :root {
    --shadow: hsl(10 100% 60%);
    --accent: hsl(183 38% 57%);
  }
  h1 {
    font-size: 4rem;
  }
  .modal {
    --corner: 12px;
    --border: 2px;
    --clip: polygon(
      0 0,
      100% 0,
      100% calc(100% - var(--corner)),
      calc(100% - var(--corner)) 100%,
      0% 100%
    );
    color: var(--accent);
    width: clamp(340px, 55vw, 480px);
    border: 0;
    padding: 0;
    overflow: visible;
    background: #0000;
    font-family: 'Cyber', sans-serif;

    .version {
      position: absolute;
      right: 4px;
      top: 4px;
      font-size: 8px;
      opacity: 0.5;
    }

    ::selection {
      background: var(--accent);
      color: canvasText;
    }

    h2 {
      padding-bottom: 0.5rem;
      margin: 0;
      text-transform: uppercase;
      position: relative;
      font-size: 1.25rem;

      &::after {
        content: '';
        height: var(--border);
        top: 100%;
        left: 0;
        right: 0;
        background: var(--accent);
        position: absolute;
      }
    }

    p {
      /* color: color-mix(in oklch, var(--accent), canvasText 50%);
      text-shadow: 1px 1px var(--accent); */
    }

    &::after,
    &::before {
      content: '';
      position: absolute;
      top: 1px;
      bottom: 1px;
      right: 100%;
      width: 1rem;
      border: var(--border) solid var(--accent);
      translate: var(--border) 0;
      backdrop-filter: saturate(180%) blur(6px);
    }

    &::before {
      background: var(--accent);
      mask: linear-gradient(#fff, hsl(0 0% 100% / 0.6) 15% 95%, #fff);
    }

    .modal__body {
      backdrop-filter: saturate(180%) blur(6px);
      clip-path: inset(0 -100% 0 0);
    }

    .body__content {
      padding: 1rem;
      position: relative;
    }

    .modal__actions {
      position: absolute;
      top: 100%;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.5rem;
      padding-block: 1rem;
    }
  }
  .cyber-btn {
    --corner: 12px;
    --border: 0px;
    /*--clip: polygon(
      0 0,
      100% 0,
      100% calc(100% - var(--corner)),
      calc(100% - var(--corner)) 100%,
      0% 100%
    );*/
    font-family: 'Cyber', sans-serif;
    width: clamp(140px, 140px, 280px);
    height: clamp(48px, 48px, 56px);
    text-align: center;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.5rem;
    background: transparent;
    position: relative;
    color: var(--accent);
    cursor: pointer;

    * {
      pointer-events: none;
    }

    .backdrop {
      backdrop-filter: saturate(180%) blur(6px);
    }

    kbd {
      color: canvas;
      font-weight: bold;
      width: 0px;
      display: inline-block;
      aspect-ratio: 1;
      font-size: 8px;
      border-radius: 50%;
      background: var(--accent);
      display: inline-grid;
      place-items: center;

      svg {
        width: 65%;
      }
    }
  }
}

@layer base {
  :root {
    --font-size-min: 16;
    --font-size-max: 20;
    --font-ratio-min: 1.2;
    --font-ratio-max: 1.33;
    --font-width-min: 375;
    --font-width-max: 1500;
  }

  html {
    color-scheme: dark;
  }

  [data-theme='light'] {
    color-scheme: light only;
  }

  [data-theme='dark'] {
    color-scheme: dark only;
  }

  :where(.fluid) {
    --fluid-min: calc(
      var(--font-size-min) * pow(var(--font-ratio-min), var(--font-level, 0))
    );
    --fluid-max: calc(
      var(--font-size-max) * pow(var(--font-ratio-max), var(--font-level, 0))
    );
    --fluid-preferred: calc(
      (var(--fluid-max) - var(--fluid-min)) /
        (var(--font-width-max) - var(--font-width-min))
    );
    --fluid-type: clamp(
      (var(--fluid-min) / 16) * 1rem,
      ((var(--fluid-min) / 16) * 1rem) -
        (((var(--fluid-preferred) * var(--font-width-min)) / 16) * 1rem) +
        (var(--fluid-preferred) * var(--variable-unit, 100vi)),
      (var(--fluid-max) / 16) * 1rem
    );
    font-size: var(--fluid-type);
  }

  *,
  *:after,
  *:before {
    box-sizing: border-box;
    justify-content: center;
  }

  /* Utilities */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}

div.tp-dfwv {
  width: 256px;
}

/* LOGO GLITCH */

.layers-logo {
    position: relative;
}

.layers-logo::before,
.layers-logo::after {
    content: attr(data-text);
    position: absolute;
    width: 110%;
    z-index: -1;
}

.layers-logo::before {
    top: 10px;
    left: 15px;
    color: #e0287d;
}

.layers-logo::after {
    top: 5px;
    left: -10px;
    color: #1bc7fb;
}

.single-path {
    clip-path: polygon(
        0% 12%,
        53% 12%,
        53% 26%,
        25% 26%,
        25% 86%,
        31% 86%,
        31% 0%,
        53% 0%,
        53% 84%,
        92% 84%,
        92% 82%,
        70% 82%,
        70% 29%,
        78% 29%,
        78% 65%,
        69% 65%,
        69% 66%,
        77% 66%,
        77% 45%,
        85% 45%,
        85% 26%,
        97% 26%,
        97% 28%,
        84% 28%,
        84% 34%,
        54% 34%,
        54% 89%,
        30% 89%,
        30% 58%,
        83% 58%,
        83% 5%,
        68% 5%,
        68% 36%,
        62% 36%,
        62% 1%,
        12% 1%,
        12% 34%,
        60% 34%,
        60% 57%,
        98% 57%,
        98% 83%,
        1% 83%,
        1% 53%,
        91% 53%,
        91% 84%,
        8% 84%,
        8% 83%,
        4% 83%
    );
}

.paths {
    animation: paths 5s step-end infinite;
}

@keyframes paths {
    0% {
        clip-path: polygon(
            0% 43%,
            83% 43%,
            83% 22%,
            23% 22%,
            23% 24%,
            91% 24%,
            91% 26%,
            18% 26%,
            18% 83%,
            29% 83%,
            29% 17%,
            41% 17%,
            41% 39%,
            18% 39%,
            18% 82%,
            54% 82%,
            54% 88%,
            19% 88%,
            19% 4%,
            39% 4%,
            39% 14%,
            76% 14%,
            76% 52%,
            23% 52%,
            23% 35%,
            19% 35%,
            19% 8%,
            36% 8%,
            36% 31%,
            73% 31%,
            73% 16%,
            1% 16%,
            1% 56%,
            50% 56%,
            50% 8%
        );
    }

    5% {
        clip-path: polygon(
            0% 29%,
            44% 29%,
            44% 83%,
            94% 83%,
            94% 56%,
            11% 56%,
            11% 64%,
            94% 64%,
            94% 70%,
            88% 70%,
            88% 32%,
            18% 32%,
            18% 96%,
            10% 96%,
            10% 62%,
            9% 62%,
            9% 84%,
            68% 84%,
            68% 50%,
            52% 50%,
            52% 55%,
            35% 55%,
            35% 87%,
            25% 87%,
            25% 39%,
            15% 39%,
            15% 88%,
            52% 88%
        );
    }

    30% {
        clip-path: polygon(
            0% 53%,
            93% 53%,
            93% 62%,
            68% 62%,
            68% 37%,
            97% 37%,
            97% 89%,
            13% 89%,
            13% 45%,
            51% 45%,
            51% 88%,
            17% 88%,
            17% 54%,
            81% 54%,
            81% 75%,
            79% 75%,
            79% 76%,
            38% 76%,
            38% 28%,
            61% 28%,
            61% 12%,
            55% 12%,
            55% 62%,
            68% 62%,
            68% 51%,
            0% 51%,
            0% 92%,
            63% 92%,
            63% 4%,
            65% 4%
        );
    }

    45% {
        clip-path: polygon(
            0% 33%,
            2% 33%,
            2% 69%,
            58% 69%,
            58% 94%,
            55% 94%,
            55% 25%,
            33% 25%,
            33% 85%,
            16% 85%,
            16% 19%,
            5% 19%,
            5% 20%,
            79% 20%,
            79% 96%,
            93% 96%,
            93% 50%,
            5% 50%,
            5% 74%,
            55% 74%,
            55% 57%,
            96% 57%,
            96% 59%,
            87% 59%,
            87% 65%,
            82% 65%,
            82% 39%,
            63% 39%,
            63% 92%,
            4% 92%,
            4% 36%,
            24% 36%,
            24% 70%,
            1% 70%,
            1% 43%,
            15% 43%,
            15% 28%,
            23% 28%,
            23% 71%,
            90% 71%,
            90% 86%,
            97% 86%,
            97% 1%,
            60% 1%,
            60% 67%,
            71% 67%,
            71% 91%,
            17% 91%,
            17% 14%,
            39% 14%,
            39% 30%,
            58% 30%,
            58% 11%,
            52% 11%,
            52% 83%,
            68% 83%
        );
    }

    76% {
        clip-path: polygon(
            0% 26%,
            15% 26%,
            15% 73%,
            72% 73%,
            72% 70%,
            77% 70%,
            77% 75%,
            8% 75%,
            8% 42%,
            4% 42%,
            4% 61%,
            17% 61%,
            17% 12%,
            26% 12%,
            26% 63%,
            73% 63%,
            73% 43%,
            90% 43%,
            90% 67%,
            50% 67%,
            50% 41%,
            42% 41%,
            42% 46%,
            50% 46%,
            50% 84%,
            96% 84%,
            96% 78%,
            49% 78%,
            49% 25%,
            63% 25%,
            63% 14%
        );
    }

    90% {
        clip-path: polygon(
            0% 41%,
            13% 41%,
            13% 6%,
            87% 6%,
            87% 93%,
            10% 93%,
            10% 13%,
            89% 13%,
            89% 6%,
            3% 6%,
            3% 8%,
            16% 8%,
            16% 79%,
            0% 79%,
            0% 99%,
            92% 99%,
            92% 90%,
            5% 90%,
            5% 60%,
            0% 60%,
            0% 48%,
            89% 48%,
            89% 13%,
            80% 13%,
            80% 43%,
            95% 43%,
            95% 19%,
            80% 19%,
            80% 85%,
            38% 85%,
            38% 62%
        );
    }

    1%,
    7%,
    33%,
    47%,
    78%,
    93% {
        clip-path: none;
    }
}

.movement {
    position: relative;
    animation: movement 8s step-end infinite;
}

@keyframes movement {
    0% {
        top: 0px;
        left: -20px;
    }

    15% {
        top: 10px;
        left: 10px;
    }

    60% {
        top: 5px;
        left: -10px;
    }

    75% {
        top: -5px;
        left: 20px;
    }

    100% {
        top: 10px;
        left: 5px;
    }
}

.opacity {
    animation: opacity 5s step-end infinite;
}

@keyframes opacity {
    0% {
        opacity: 0.1;
    }

    5% {
        opacity: 0.7;
    }

    30% {
        opacity: 0.4;
    }

    45% {
        opacity: 0.6;
    }

    76% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.8;
    }

    1%,
    7%,
    33%,
    47%,
    78%,
    93% {
        opacity: 0;
    }
}

.font {
    animation: font 7s step-end infinite;
}

@keyframes font {
    0% {
        font-weight: 100;
        color: #e0287d;
        filter: blur(3px);
    }

    20% {
        font-weight: 500;
        color: #fff;
        filter: blur(0);
    }

    50% {
        font-weight: 300;
        color: #1bc7fb;
        filter: blur(2px);
    }

    60% {
        font-weight: 700;
        color: #fff;
        filter: blur(0);
    }

    90% {
        font-weight: 500;
        color: #e0287d;
        filter: blur(6px);
    }
}

.glitch-logo span {
    animation: paths 5s step-end infinite;
}

.glitch-logo::before {
    animation: paths 5s step-end infinite, opacity 5s step-end infinite,
        font 8s step-end infinite, movement 10s step-end infinite;
}

.glitch-logo::after {
    animation: paths 5s step-end infinite, opacity 5s step-end infinite,
        font 7s step-end infinite, movement 8s step-end infinite;
}

.hero-container {
    position: relative;
    padding: 200px 0px; 
    text-align: center;
}

.environment {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.5;
    filter: blur(5px);
    background: url(https://images.unsplash.com/photo-1602136773736-34d445b989cb?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1200&q=80)
        center no-repeat;
    background-size: cover;
}