html {
  background-color: #000;
  overflow-x: hidden;
}

body {
  background-color: #0a0f1e;
  color: #f1f1f1;
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  text-shadow:
    -0.6px 0 0 rgba(255, 0, 80, 0.55),
    0.6px 0 0 rgba(0, 200, 255, 0.55),
    0 0 6px rgba(241, 241, 241, 0.35);
  transform: perspective(1400px) rotateX(0.6deg);
  transform-origin: center top;
}

body.crt {
  filter: blur(0.5px) contrast(1.05) saturate(1.15);
  animation: crt-flicker 7s infinite steps(1);
}

main {
  max-width: 720px;
  margin: 0 auto;
  border: 4px dashed #ff8d1e;
  padding: 1rem;
  position: relative;
  z-index: 1;
  transform: perspective(1200px);
}

h1,
h2,
h3,
h4,
h5 {
  color: #1e90ff;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
  text-shadow:
    -1px 0 0 rgba(255, 0, 80, 0.7),
    1px 0 0 rgba(0, 220, 255, 0.7),
    0 0 10px rgba(30, 144, 255, 0.55);
}

p,
blockquote {
  font-family: jbmono, monospace;
}

a {
  text-decoration: underline;
  color: #f1f1f1;
}

blockquote {
  font-style: italic;
  border-left: 2px solid #1e90ff;
  padding-left: 1rem;
}

article ul {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
  font-family: jbmono, monospace;
}

article li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.5rem;
}

article li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: #1e90ff;
  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

article li:hover::before {
  color: #ff8d1e;
  transform: translateX(2px);
}

article li a {
  color: #f1f1f1;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 141, 30, 0.5);
}

article li a:hover {
  color: #ff8d1e;
  border-bottom-color: #ff8d1e;
}

.banner {
  text-align: center;
}

.nav {
  max-width: 720px;
  margin: 0 auto 1rem;
  padding: 0 1rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  font-family: jbmono, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a {
  color: #ff8d1e;
  text-decoration: none;
}

.nav a::before {
  content: "// ";
  color: #1e90ff;
}

.nav a:hover {
  text-decoration: underline;
}

.containers {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 1rem;
}

.container {
  border: 2px solid #ff8d1e;
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 0;
  box-sizing: border-box;
}

footer {
  max-width: 720px;
  margin: 2rem auto 3rem;
  padding: 0 1rem;
  font-family: jbmono, monospace;
}

.oracle {
  position: relative;
  border: 2px solid #1e90ff;
  border-top-width: 4px;
  padding: 1.25rem 1rem 1rem;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(30, 144, 255, 0.04) 0 1px,
      transparent 1px 4px
    ),
    rgba(10, 15, 30, 0.6);
  box-shadow:
    inset 0 0 30px rgba(30, 144, 255, 0.08),
    0 0 12px rgba(30, 144, 255, 0.15);
}

.frame__label {
  position: absolute;
  top: -0.7rem;
  left: 1rem;
  padding: 0 0.5rem;
  background-color: #0a0f1e;
  color: #ff8d1e;
  font-family: jbmono, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.oracle__text {
  margin: 0;
  font-style: italic;
  color: #f1f1f1;
  line-height: 1.6;
  text-shadow:
    -0.6px 0 0 rgba(255, 0, 80, 0.45),
    0.6px 0 0 rgba(0, 200, 255, 0.45),
    0 0 8px rgba(30, 144, 255, 0.4);
}

.oracle__text::before {
  content: "> ";
  color: #1e90ff;
  font-style: normal;
}

.figure {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 2px solid #1e90ff;
  background: rgba(10, 15, 30, 0.6);
  box-shadow:
    inset 0 0 30px rgba(30, 144, 255, 0.08),
    0 0 12px rgba(30, 144, 255, 0.15);
}

.figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.figure figcaption {
  margin-top: 0.75rem;
  font-family: jbmono, monospace;
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(241, 241, 241, 0.75);
  text-align: center;
}

.figure figcaption::before {
  content: "// ";
  color: #ff8d1e;
  font-style: normal;
}

.footer__meta {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(241, 241, 241, 0.55);
  letter-spacing: 0.04em;
}

@keyframes scanlines-anim {
  0% {
    background-position:
      0 0,
      0 0;
  }
  100% {
    background-position:
      0 9px,
      0 0;
  }
}

@keyframes crt-flicker {
  0%,
  92%,
  100% {
    opacity: 1;
  }
  93% {
    opacity: 0.85;
  }
  94% {
    opacity: 1;
  }
  96% {
    opacity: 0.92;
  }
  97% {
    opacity: 1;
  }
}

@keyframes crt-rolling-scan {
  0% {
    background-position: 0 -14vh;
  }
  100% {
    background-position: 0 100vh;
  }
}

@keyframes crt-jitter {
  0%,
  100% {
    transform: perspective(1400px) rotateX(0.6deg) translateX(0);
  }
  20% {
    transform: perspective(1400px) rotateX(0.6deg) translateX(-0.3px);
  }
  40% {
    transform: perspective(1400px) rotateX(0.6deg) translateX(0.3px);
  }
  60% {
    transform: perspective(1400px) rotateX(0.6deg) translateX(-0.2px);
  }
  80% {
    transform: perspective(1400px) rotateX(0.6deg) translateX(0.2px);
  }
}

body::before {
  content: "";
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background:
    linear-gradient(rgba(20, 20, 20, 0) 66%, rgba(0, 0, 0, 0.35) 33%),
    linear-gradient(
      90deg,
      rgba(255, 0, 80, 0.06),
      rgba(0, 255, 80, 0.04),
      rgba(0, 80, 255, 0.06)
    );
  background-size:
    100% 3px,
    3px 100%;
  z-index: 100;
  pointer-events: none;
  animation: scanlines-anim 2s linear infinite;
  mix-blend-mode: multiply;
}

/* big rolling scanline, disabled because it dont work
body.crt::after {
  content: "";
  display: block;
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 100% 14vh;
  background-repeat: no-repeat;
  z-index: 101;
  pointer-events: none;
  animation: crt-rolling-scan 6s linear infinite;
  mix-blend-mode: screen;
}
*/

html::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 102;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, 0.2) 88%,
    rgba(0, 0, 0, 0.45) 100%
  );
  box-shadow:
    inset 0 0 120px 15px rgba(0, 0, 0, 0.45),
    inset 0 0 30px 3px rgba(0, 0, 0, 0.25);
  border-radius: 24px / 14px;
}

@media (prefers-reduced-motion: reduce) {
  body.crt {
    animation: none;
  }
  body::before {
    animation: none;
  }
}

.crt-toggle {
  background: none;
  border: 0;
  padding: 0;
  color: #ff8d1e;
  font-family: jbmono, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.7;
}

.crt-toggle:hover {
  opacity: 1;
  text-decoration: underline;
}

.crt-toggle::before {
  content: "// ";
  color: #1e90ff;
}

/* theres probably a better way to do this but idc!!! (I don't care!) */

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-ThinItalic.woff2") format("woff2");
  font-weight: 100;
  font-style: italic;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-ExtraLightItalic.woff2") format("woff2");
  font-weight: 200;
  font-style: italic;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-MediumItalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-SemiBoldItalic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
}

@font-face {
  font-family: "jbmono";
  src: url("/font/JetBrainsMono-ExtraBoldItalic.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
}
