:root {
  --color-bg: #fff;
  --color-text: #1f1f1f;
  --color-gray: #ccc;
  --color-no-link: #aaa;
}

.ascii {
  white-space: pre;
}

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

body {
  -webkit-font-smoothing: antialiased;
  font: 300 normal 0.75em/2 'IBM Plex Mono', monospace;
  background: var(--color-bg);
  color: var(--color-text);
  text-align: center;
  padding: 1em 1em 4em 1em;
  overflow-x: hidden;
  position: relative;
  letter-spacing: -1px;
  z-index: 0;
}

p span {
  white-space: nowrap;
  overflow: hidden;
}

a {
  color: var(--color-text);
  text-decoration: none;
  position: relative;
}

a:hover {
  border-bottom: 2px solid var(--color-text);
}

.no-link {
  color: var(--color-no-link);
}

h1 {
  -webkit-font-smoothing: none;
  font: 600 normal 8vw/1 'VT323', monospace;
  text-transform: uppercase;
  text-align: center;
}

h1,
th {
  text-transform: uppercase;
}

p {
  max-width: 780px;
  font-weight: 400;
  margin: 2em auto;
}

table {
  margin: 2em auto;
  width: 100%;
}

th, td {
  vertical-align: top;
  width: 4%;
}

th:first-child,
th:last-child,
td:first-child,
td:last-child {
  padding: 0 0 0 2%;
  width: 48%;
  text-align: left;
}

th:first-child,
td:first-child {
  padding: 0 2% 0 0;
}

th:nth-child(1),
td:nth-child(1) {
  text-align: right;
}

td:nth-child(1) {
  font-weight: 300;
}

tr a::after {
  content: '';
  position: absolute;
  z-index: -1;
}

tr:nth-child(10n+1) a:hover::after { left: -10%; top: 0; background: rgba(0,0,0,1); width: 50%; height: 10%; }
tr:nth-child(10n+2) a:hover::after { left: 100%; top: 0; background: rgba(0,0,0,0.2); width: 20%; height: 20%; }
tr:nth-child(10n+3) a:hover::after { left: 50%; top: 80%; background: rgba(0,0,0,0.6); width: 90%; height: 15%; }
tr:nth-child(10n+4) a:hover::after { left: 20%; top: -10%; background: rgba(0,0,0,0.4); width: 70%; height: 30%; }
tr:nth-child(10n+5) a:hover::after { left: 0; top: -20%; background: rgba(0,0,0,0.3); width: 150%; height: 25%; }
tr:nth-child(10n+6) a:hover::after { left: 30%; top: 30%; background: rgba(0,0,0,0.5); width: 100%; height: 20%; }
tr:nth-child(10n+7) a:hover::after { left: -20%; top: 40%; background: rgba(0,0,0,0.9); width: 10%; height: 100%; }
tr:nth-child(10n+8) a:hover::after { left: 50%; top: 50%; background: rgba(0,0,0,0.7); width: 30%; height: 40%; }
tr:nth-child(10n+9) a:hover::after { left: 120%; top: 10%; background: rgba(0,0,0,0.1); width: 80%; height: 10%; }
tr:nth-child(10n+0) a:hover::after { left: 20%; top: 110%; background: rgba(0,0,0,0.8); width: 50%; height: 10%; }

span {
  display: inline-block;
  position: relative;
  line-height: 1.25;
}

span::before {
  content: attr(title);
  font-weight: 200;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  line-height: 1.05;
  pointer-events: none;
  opacity: .7;
}

th:first-child span::before,
td:first-child span::before {
  text-align: right;
}

tr:nth-child(10n+1) span::before { left: 1px; line-height: 1; }
tr:nth-child(10n+2) span::before { left: -1px; line-height: .95; }
tr:nth-child(10n+3) span::before { left: 0; line-height: 1.05; }
tr:nth-child(10n+4) span::before { left: 1px; line-height: 1; }
tr:nth-child(10n+5) span::before { left: -1px; line-height: .95; }
tr:nth-child(10n+6) span::before { left: 0; line-height: 1.1; }
tr:nth-child(10n+7) span::before { left: 1px; line-height: .9; }
tr:nth-child(10n+8) span::before { left: -1px; line-height: 1.05; }
tr:nth-child(10n+9) span::before { left: 0; line-height: 1; }
tr:nth-child(10n+0) span::before { left: 1px; line-height: .95; }

.button {
  background: transparent;
  display: inline-block;
  color: var(--color-text);
  border: 2px solid var(--color-text);
  border-width: 4px 2px !important;
  cursor: pointer;
  padding: 8px 20px;
  position: relative;
}

.button:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.button:hover span::before {
  color: var(--color-bg);
}

.glitch-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  transform: translateZ(0);
}

tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: auto 1.5em;
}

footer {
  color: var(--color-gray);
  font-size: 0.9em;
  margin: 2.5em 0 0 0;
}

footer a {
  color: var(--color-gray);
  font-style: italic;
}

footer a:hover {
  border-color: var(--color-gray);
}

@media all and (min-width: 45em) {
  body {
    font-size: 1.25em;
    padding: 2em 2em 4em 2em;
  }

  footer {
    font-size: 0.65em;
    margin: 3em 0 0 0;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1f1f1f;
    --color-text: #eee;
  }

  tr:nth-child(10n+1) a:hover::after { background: rgba(255,255,255,1); }
  tr:nth-child(10n+2) a:hover::after { background: rgba(255,255,255,0.2); }
  tr:nth-child(10n+3) a:hover::after { background: rgba(255,255,255,0.6); }
  tr:nth-child(10n+4) a:hover::after { background: rgba(255,255,255,0.4); }
  tr:nth-child(10n+5) a:hover::after { background: rgba(255,255,255,0.3); }
  tr:nth-child(10n+6) a:hover::after { background: rgba(255,255,255,0.5); }
  tr:nth-child(10n+7) a:hover::after { background: rgba(255,255,255,0.9); }
  tr:nth-child(10n+8) a:hover::after { background: rgba(255,255,255,0.7); }
  tr:nth-child(10n+9) a:hover::after { background: rgba(255,255,255,0.1); }
  tr:nth-child(10n+0) a:hover::after { background: rgba(255,255,255,0.8); }
}
