:root {
  --glitched-duration: 0.9s;
  --glitched-long-duration: 3s;
  --bg-color: #212121;
  --fg-color: #dddddd;
  --scrollh-color: #ff9800;
  --border-color: #8ae66e;
  --scroll-color: #ff003c;
}

body {
  background-color: var(--bg-color);
  /*min-height: 220vh;*/
  padding: 30px;
}

body * {
  color: var(--fg-color);
  font-family: "Advent Pro", arial ;
}

/* Titles */

h1.cpk,
h2.cpk,
h3.cpk,
h4.cpk {
  font-size: 2rem;
  line-height: 2.2rem;
  font-weight: 200;
  position: relative;
  padding-bottom: 15px;
}

h2.cpk {
  font-size: 1.7rem;
  line-height: 1.9rem;
  font-weight: 300;
}

h3.cpk {
  font-size: 1.4rem;
  line-height: 1.6rem;
  font-weight: 500;
}

h4.cpk {
  font-size: 1rem;
  line-height: 1.2rem;
  font-weight: 700;
}

h1.cpk:before,
h2.cpk:before,
h3.cpk:before,
h4.cpk:before {
    content: "";
    display: block;
    position: absolute;
    bottom: 0px;
    left: 2px;
    width: 100%;
    height: 10px;
    background-color: var(--fg-color);
    clip-path: polygon(0px 0px, 85px 0px, 90px 5px, 100% 5px, 100% 6px, 85px 6px, 80px 10px, 0px 10px);
}

h1.cpk.glitched {
  animation-name: h1glitched;
  animation-duration: calc(var(--glitched-duration) * 1.4);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

h2.cpk.glitched {
  animation-name: h1glitched;
  animation-duration: calc(var(--glitched-duration) * 1.7);
  animation-iteration-count: infinite;
  animation-direction: reverse;
  animation-timing-function: linear;
}

h3.cpk.glitched {
  animation-name: h1glitched;
  animation-duration: calc(var(--glitched-duration) * 1.1);
  animation-iteration-count: infinite;
  animation-direction: reverse;
  animation-timing-function: ease-out;
}

h4.cpk.glitched {
  animation-name: h1glitched;
  animation-duration: calc(var(--glitched-duration) * 2.1);
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

@keyframes h1glitched {
  0% {
    transform: skew(-20deg);
    left: -4px;
  }
  10% {
    transform: skew(-20deg);
    left: -4px;
  }
  11% {
    transform: skew(0deg);
    left: 2px;
  }
  50% {
    transform: skew(0deg);
  }
  51% {
    transform: skew(10deg);
  }
  59% {
    transform: skew(10deg);
  }
  60% {
    transform: skew(0deg);
  }
  100% {
    transform: skew(0deg);
  }
}

h1.cpk.glitched:before {
  animation-name: h1beforeglitched;
  animation-duration: calc(var(--glitched-duration) * 2);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@keyframes h1beforeglitched {
  0% {
    transform: skew(-20deg);
    left: -4px;
    clip-path: polygon(0px 0px, 85px 0px, 90px 5px, 100% 5px, 100% 6px, 85px 6px, 80px 10px, 0px 10px);
  }
  10% {
    transform: skew(-20deg);
    left: -4px;
    clip-path: polygon(0px 0px, 85px 0px, 90px 5px, 100% 5px, 100% 6px, 85px 6px, 80px 10px, 0px 10px);
  }
  11% {
    transform: skew(0deg);
    left: 2px;
    clip-path: polygon(0px 0px, 85px 0px, 90px 5px, 100% 5px, 100% 6px, 85px 6px, 80px 10px, 0px 10px);
  }
  50% {
    transform: skew(0deg);
    clip-path: polygon(0px 0px, 85px 0px, 90px 5px, 100% 5px, 100% 6px, 85px 6px, 80px 10px, 0px 10px);
  }
  51% {
    transform: skew(0deg);
    clip-path: polygon(0px 0px, 85px 0px, 90px 5px, 100% 5px, 40% 5px, calc(40% - 30px) 0px, calc(40% + 30px) 0px, calc(45% - 15px) 5px, 100% 5px, 100% 6px, calc(45% - 14px) 6px, calc(40% + 29px) 1px, calc(40% - 29px) 1px, calc(40% + 1px) 6px, 85px 6px, 80px 10px, 0px 10px);
  }
  59% {
    transform: skew(0deg);
    clip-path: polygon(0px 0px, 85px 0px, 90px 5px, 100% 5px, 40% 5px, calc(40% - 30px) 0px, calc(40% + 30px) 0px, calc(45% - 15px) 5px, 100% 5px, 100% 6px, calc(45% - 14px) 6px, calc(40% + 29px) 1px, calc(40% - 29px) 1px, calc(40% + 1px) 6px, 85px 6px, 80px 10px, 0px 10px);
  }
  60% {
    transform: skew(0deg);
    clip-path: polygon(0px 0px, 85px 0px, 90px 5px, 100% 5px, 100% 6px, 85px 6px, 80px 10px, 0px 10px);
  }
  100% {
    transform: skew(0deg);
    clip-path: polygon(0px 0px, 85px 0px, 90px 5px, 100% 5px, 100% 6px, 85px 6px, 80px 10px, 0px 10px);
  }
}

h2.cpk:before {
  clip-path: polygon(0px 5px, 35px 5px, 40px 0px, 85px 0px, 90px 5px, 100% 5px, 100% 6px, 85px 6px, 80px 10px, 20px 10px, 15px 6px, 0px 6px);
}

h2.cpk.glitched:before {
  animation-name: h2beforeglitched;
  animation-duration: calc(var(--glitched-duration) * 2);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@keyframes h2beforeglitched {
  0% {
    transform: scaleY(1);
  }
  10% {
    transform: scaleY(1);
  }
  11% {
    transform: scaleY(-1);
  }
  50% {
    transform: scaleY(-1);
  }
  51% {
    transform: scaleY(1);
  }
  59% {
    transform: scaleY(1);
  }
  60% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(1);
  }
}

h3.cpk:before {
        clip-path: polygon(0px 5px, 10px 5px, 15px 0px, 40px 0px, 45px 5px, 100% 5px, 100% 6px, 31px 6px, 27px 2px, 15px 2px, 8px 10px, 0px 10px);
}

h4.cpk:before {
        clip-path: polygon(0px 3px, 15px 3px, 20px 0px, 80px 0px, 85px 3px, 100% 3px, 100% 4px, 85px 4px, 80px 7px, 20px 7px, 15px 4px, 0px 4px);
}

h1.cpk:after,
h2.cpk:after,
h3.cpk:after,
h4.cpk:after,
p.cpk:after {
  content: "_";
  animation-name: hxafter;
  animation-duration: var(--glitched-duration);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

h3.cpk:after,
h4.cpk:after {
  animation-direction: reverse;
  animation-duration: calc(var(--glitched-duration) / 2);
}

@keyframes hxafter {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  51% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

/* Separator */

hr {
  height: 14px;
  background-color: var(--fg-color);
  width: 100%;
  clip-path: polygon(1px 0px, 0px 0px, 0px 0px, 8px 14px, 13px 14px, 22px 7px, 42px 6px, 49px 2px, 100% 2px, 100% 0px, 42px 0px, 35px 5px, 22px 6px, 13px 13px, 9px 13px);
  animation-name: hr;
  animation-duration: var(--glitched-long-duration);
  animation-iteration-count: infinite;
  animation-timing-function: linear; 
}

@keyframes hr {
  0% {
    transform: skew(0deg);
  }
  15% {
    transform: skew(0deg);
  }
  16% {
    transform: skew(20deg);
  }
  20% {
    transform: skew(20deg);
  }
  21% {
    transform: skew(0deg);
  }
  100% {
    right: 35px;
  }
}

/* Scrollbar */

::-webkit-scrollbar {
  background-color: var(--bg-color);
}
::-webkit-scrollbar-button {
  display: none;
}
::-webkit-scrollbar-track {
  display: none;
}
::-webkit-scrollbar-track-piece {
  display: none;
}
::-webkit-scrollbar-thumb {
  background-color: var(--scroll-color);
  border-bottom: 2px solid var(--border-color);
  border-right: 2px solid var(--border-color);
  transition: background var(--glitched-duration);
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollh-color);
}
::-webkit-scrollbar-corner {
  display: none;
}
::-webkit-resizer {
  display: none;
}
*/