h1 {
    color: rgb(245, 245, 245);
    font-family: "Raleway", sans-serif;
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  body {
    background-color: rgb(0, 0, 0);
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
  }

.background-glitch {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    background:
        linear-gradient(90deg, rgba(0, 255, 255, 0.05), rgba(255, 0, 120, 0.04)),
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, var(--scanline-opacity, 0.025)) 0,
            rgba(255, 255, 255, var(--scanline-opacity, 0.025)) 1px,
            transparent 1px,
            transparent 4px
        );
    mix-blend-mode: screen;
}

.background-glitch::before,
.background-glitch::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.background-glitch::before {
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.015) 0,
        rgba(255, 255, 255, 0.015) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.35;
}

.background-glitch::after {
    top: var(--tear-top, 45%);
    height: var(--tear-height, 14px);
    bottom: auto;
    background:
        linear-gradient(90deg, rgba(0, 255, 255, 0.2), transparent 28%, rgba(255, 0, 90, 0.16)),
        rgba(255, 255, 255, 0.06);
    opacity: 0;
    transform: translateX(var(--tear-x, 0));
}

.vcr-noise {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: var(--noise-opacity, 0.06);
    image-rendering: pixelated;
    mix-blend-mode: screen;
}

body.is-glitching .background-glitch {
    animation: background-glitch var(--glitch-duration, 140ms) steps(2, end);
}

body.is-glitching .background-glitch::after {
    opacity: var(--tear-opacity, 0.35);
}

body.is-glitching .vcr-noise {
    opacity: var(--noise-burst-opacity, 0.16);
}

.fullcenter {

    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.internal-link {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: rgb(245, 245, 245);
    font-size: 24px;
    text-decoration: none;
}

.pdf-compressor-link {
    right: 68px;
}

.internal-link:hover {
    text-decoration: underline;
}

.internal-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

body.is-transitioning .background-glitch,
body.is-transitioning .vcr-noise {
    z-index: 3;
}

body.is-transitioning .vcr-noise {
    --noise-opacity: 0.5;
}

body.is-transitioning.is-glitching .fullcenter,
body.is-transitioning.is-glitching .internal-link {
    transform: translate(var(--page-glitch-x), var(--page-glitch-y)) skewX(-8deg);
    text-shadow: -12px 0 cyan, 12px 0 #ff0078;
}

@keyframes background-glitch {
    0% {
        transform: translate(0, 0);
        filter: none;
    }

    25% {
        transform: translate(var(--glitch-x), var(--glitch-y));
        filter: hue-rotate(8deg);
    }

    60% {
        transform: translate(var(--glitch-x-inverse), 1px);
        filter: contrast(1.3);
    }

    100% {
        transform: translate(0, 0);
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.is-transitioning .fullcenter {
        opacity: 0.45;
    }

    body.is-transitioning.is-glitching .fullcenter,
    body.is-transitioning.is-glitching .internal-link {
        transform: none;
        text-shadow: none;
    }

    .background-glitch,
    .vcr-noise {
        display: none;
    }
}
