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

* {
  margin: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

:root {
  --light: #ffffff;
  --dark: #101218;
  --gd: linear-gradient(180deg, var(--dark) 50%, var(--on) 100%);
  --gl: linear-gradient(180deg, rgb(2, 55, 104) 50%, var(--on) 100%);
  --bg: var(--dark);
  --on: var(--light);
  --grad: light-dark(var(--gd), var(--gl));
  --accent: #ff0055;
  --s: 2rem;
  --fade-strength: 1;
}

html,
body {
  color: var(--light);
  display: flex;
  flex-flow: column nowrap;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

html {
  font-family: "Barlow", system-ui;
  font-weight: 100;
  background: var(--bg);
}

body {
  padding: var(--s);
}

main {
  width: 100;
  position: relative;
  transform: translateY(-10vh);
}

nav {
  position: absolute;
  top: var(--s);
  right: var(--s);
  display: flex;
  flex-flow: row nowrap;
  gap: 1rem;
}

a {
  color: #ffffff;
  text-decoration: none;
  opacity: 0.5;
  cursor: pointer;
}
a:hover {
  opacity: 1;
}

.work {
  position: absolute;
  bottom: 17%;
  left: calc(100% + 2.5rem);
  width: max-content;
  animation: an-in-same 0.2s step-start 0.4s forwards;
  opacity: 0;
}
.work p:not(.--blink) {
  opacity: 0.9;
}

.logo {
  position: relative;
  animation: an-in 0.5s step-start;
}

.tekha {
  width: 10rem;
}

.--shine {
  position: absolute;
  inset: 0;
  filter: blur(4px);
  opacity: 0.75;
}

.glyph {
  fill: var(--on);
}
.glyph:not(.--blink) {
  opacity: 0.6;
}

.dot {
  fill: var(--accent);
  animation: blink 1s step-start 0s infinite;
  transform-origin: 75% 97%;
  opacity: 1;
}
.dot.--focus {
  opacity: 0.3;
}
.dot.--blink {
  opacity: 0.1;
}
.dot.--break {
  opacity: 0.05;
  animation: blink-dot 0.1s 0.2s infinite;
}

.--z1 {
  z-index: 1;
}

.--z2 {
  z-index: 2;
}

.--z3 {
  z-index: 3;
}

.scanlines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.6;
}
.scanlines:before, .scanlines:after {
  display: block;
  pointer-events: none;
  content: "";
  position: absolute;
}
.scanlines:before {
  width: 100%;
  height: 2px;
  z-index: 2147483649;
  background: rgba(34, 34, 34, 0.3);
  opacity: 0.75;
  animation: scanline 6s linear infinite;
}
.scanlines:after {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483648;
  background: linear-gradient(to bottom, transparent 50%, rgba(34, 34, 34, 0.3) 51%);
  background-size: 100% 4px;
  animation: scanlines 1s steps(60) infinite;
}

.noise {
  position: fixed;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  width: 200%;
  height: 200vh;
  background: transparent url("img/noise.png") repeat 0 0;
  background-repeat: repeat;
  animation: noise 0.2s infinite;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.--blink {
  animation: blink 0.05s step-start 0s infinite;
}

.--fade {
  animation: fade 60s infinite;
}

.gradient {
  position: absolute;
  inset: 0;
  background: rgb(0, 94, 180);
  background: var(--gl);
  mix-blend-mode: color-dodge;
  opacity: 0;
  pointer-events: none;
}

@keyframes an-in {
  10% {
    transform: translateX(-5px);
    opacity: 0.2;
  }
  18% {
    transform: translateX(2px) translateY(-25px) scale(4);
    opacity: 1;
    filter: invert(47%) sepia(47%) saturate(4861%) hue-rotate(178deg) brightness(111%) contrast(101%);
  }
  20% {
    transform: translateX(2px) translateY(-25px) scale(3);
    opacity: 0.8;
    filter: invert(32%) sepia(98%) saturate(6660%) hue-rotate(326deg) brightness(94%) contrast(117%);
  }
  30% {
    transform: translateX(50px) translateY(2px);
    opacity: 0.2;
  }
  40% {
    transform: translateX(-10px);
    opacity: 1;
  }
  89% {
    transform: translateX(-10px);
    opacity: 1;
  }
  90% {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes an-in-same {
  10% {
    transform: translateX(-5px);
    opacity: 0;
  }
  20% {
    transform: translateX(2px) translateY(-25px) scale(0.5);
    opacity: 0.8;
  }
  30% {
    transform: translateX(50px) translateY(2px);
    opacity: 0.2;
  }
  40% {
    transform: translateX(-10px);
    opacity: 1;
    filter: none;
  }
  80% {
    transform: translateX(0px) translateY(5px);
    filter: invert(47%) sepia(47%) saturate(4861%) hue-rotate(178deg) brightness(111%) contrast(101%);
    opacity: 0.7;
  }
  82% {
    transform: translateX(-10px) translateY(-5px);
    filter: invert(32%) sepia(98%) saturate(6660%) hue-rotate(326deg) brightness(94%) contrast(117%);
    opacity: 1;
  }
  90% {
    transform: translateX(0);
    opacity: 0.7;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes noise {
  0% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(-5%, -5%);
  }
  20% {
    transform: translate(-10%, 5%);
  }
  30% {
    transform: translate(5%, -10%);
  }
  40% {
    transform: translate(-5%, 15%);
  }
  50% {
    transform: translate(-10%, 5%);
  }
  60% {
    transform: translate(15%, 0);
  }
  70% {
    transform: translate(0, 10%);
  }
  80% {
    transform: translate(-15%, 0);
  }
  90% {
    transform: translate(10%, 5%);
  }
  100% {
    transform: translate(5%, 0);
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
  51% {
    opacity: 1;
  }
  52% {
    opacity: 0;
  }
  53% {
    opacity: 1;
  }
  54% {
    opacity: 0;
  }
}
@keyframes fade {
  10% {
    opacity: calc(0 * var(--fade-strength));
  }
  20% {
    opacity: calc(0.1 * var(--fade-strength));
  }
  30% {
    opacity: calc(0.3 * var(--fade-strength));
  }
  40% {
    opacity: calc(0.2 * var(--fade-strength));
  }
  50% {
    opacity: calc(0.9 * var(--fade-strength));
  }
  60% {
    opacity: calc(0.4 * var(--fade-strength));
  }
  70% {
    opacity: calc(0.8 * var(--fade-strength));
  }
  80% {
    opacity: calc(0.5 * var(--fade-strength));
  }
  90% {
    opacity: calc(0.3 * var(--fade-strength));
  }
  100% {
    opacity: calc(0 * var(--fade-strength));
  }
}
@keyframes blink-dot {
  0% {
    transform: scale(0.5);
    opacity: 0.1;
  }
  25% {
    transform: scale(0.75);
    opacity: 0.04;
  }
  50% {
    transform: scale(0.4);
    opacity: 0;
  }
  75% {
    transform: scale(0.25);
    opacity: 0.02;
  }
}
@keyframes scanline {
  0% {
    transform: translate3d(0, 200000%, 0);
  }
}
@keyframes scanlines {
  0% {
    background-position: 0 50%;
  }
}