:root {
  --bg-color: #04040c;
  --text-color: #888;
  --panic: #ff3333;
  --accent: white;
  --hover: #c8bfe7;
  --scanline: rgba(0, 0, 0, 0);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body::before {
  content: "";
  display: block;
  position: fixed;
  inset: 0;       
  
  background-image: linear-gradient(
    to bottom,
    transparent 50%,
    var(--scanline) 51%
  );
  background-size: 100% 4px;
  
  z-index: 9999;
  pointer-events: none;

}

body {
  position:relative;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  line-height: 1.4;
  min-height: 100vh;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  max-width: 860px;
  width: 100%;
}

h1 {
  background-color: var(--panic);
  color: #000;
  font-weight: bold;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.5rem;
}

h1:hover {
  background-color: var(--panic);
  color: var(--accent);
}

p {
  color: var(--text-color);
  margin-top: 1rem;
}


ol {
  list-style: none;
  margin-bottom: 1.5rem;
}

ol li {
  margin-top: 0.2rem;
}

p::before,
ol li::before {
  color: var(--accent);
  content: "[0.000404] ";
}
p:hover::before,
ol li:hover::before {
  color: var(--panic);
  content: "[0.000404] ";
}

nav {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--bg-color);
  background-color: var(--accent);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  font-weight: bold;
}

nav a:hover,
nav a:focus {
  background-color: var(--hover);
  text-decoration: underline;
  cursor: crosshair;
}

main::after {
  content: "_";
  display: inline-block;
  opacity: 0;
  animation: 
    printLine 0.01s steps(1) 1.5s both,
    blink 1s steps(2, start) 1.5s infinite;
  color: var(--accent);
  font-weight: bold;
  margin-top: 1rem;
}

@keyframes blink {
  to { opacity: 0; }
}

header,
main section p,
ol li,
nav {
  opacity: 0;
  animation: printLine 0.01s steps(1) both;
}

header { animation-delay: 0.1s; }
main section:nth-of-type(1) p:nth-of-type(1) { animation-delay: 0.2s; }
main section:nth-of-type(1) p:nth-of-type(2) { animation-delay: 0.3s; }
main section:nth-of-type(1) p:nth-of-type(3) { animation-delay: 0.4s; }
ol li:nth-child(1)   { animation-delay: 0.5s; }
ol li:nth-child(2)   { animation-delay: 0.6s; }
ol li:nth-child(3)   { animation-delay: 0.7s; }
ol li:nth-child(4)   { animation-delay: 0.8s; }
ol li:nth-child(5)   { animation-delay: 0.9s; }
main section:nth-of-type(2) p { animation-delay: 1.0s; }
main section:nth-of-type(3) p { animation-delay: 1.3s; }
main nav { animation-delay: 1.4s; }

@keyframes printLine {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
