:root {
  /* Global design tokens: colors, spacing primitives, shadows, and layout widths. */
  --bg: #080c14;
  --bg-deep: rgba(8, 12, 20, 0.92);
  --surface: rgba(255, 255, 255, 0.03);
  --surface-border: rgba(255, 255, 255, 0.07);
  --text: rgba(232, 244, 255, 0.92);
  --muted: rgba(210, 228, 255, 0.45);
  --muted-soft: rgba(0, 229, 255, 0.18);
  --cyan: #00e5ff;
  --cyan-deep: #0099bb;
  --amber: #ffb400;
  --green: #35e28f;
  --red: #ff5f73;
  --shadow-cyan: 0 0 24px rgba(0, 229, 255, 0.24);
  --shadow-amber: 0 0 24px rgba(255, 180, 0, 0.22);
  --radius: 14px;
  --nav-height: 64px;
  --content-width: 1240px;
}

@font-face {
  /* Monospace display font used for terminal-like UI and metrics. */
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/JetBrainsMono-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  /* Sans font used for body copy and most readable text blocks. */
  font-family: "Inter";
  src: url("../assets/fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  /* Decorative brand font used as the site's default body face. */
  font-family: "Hey Comic";
  src: url("../assets/fonts/Hey Comic.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

body {
  /* Background gradients establish the site's glowing sci-fi atmosphere. */
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 16%, rgba(0, 229, 255, 0.18), transparent 33%),
    radial-gradient(circle at 86% 14%, rgba(93, 91, 255, 0.14), transparent 36%),
    var(--bg);
  color: var(--text);
  font-family: "Hey Comic", "Inter", sans-serif;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  background: transparent;
  border: 0;
  color: inherit;
}

.grain {
  /* Fixed overlay adds a low-opacity texture over every page. */
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.65) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.65) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  mix-blend-mode: soft-light;
}

.page-shell {
  /* Shared content wrapper that accounts for the fixed header height. */
  width: min(var(--content-width), calc(100% - 40px));
  margin: 0 auto;
  padding: calc(var(--nav-height) + 42px) 0 48px;
}

.boot-log,
.section-heading,
.countdown-pill,
.standing-row,
.performance-labels,
.feed-row,
.site-footer {
  font-family: "JetBrains Mono", monospace;
}

.boot-log {
  /* Small terminal text block used as a thematic intro on pages. */
  margin-bottom: 28px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted-soft);
  letter-spacing: 0.08em;
}

.section-heading {
  margin-bottom: 18px;
  font-size: 10px;
  letter-spacing: 0.2em;
  opacity: 0.35;
}

.site-footer {
  /* Shared footer styling for the CTF signature and glyph motif. */
  margin-top: 48px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.35;
}

.site-footer p {
  margin: 8px 0;
}

.glyph-line {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
  transition: filter 300ms ease, opacity 500ms ease;
}

.glyph-line img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.5;
  filter: invert(1);
}

.glyph-line:hover {
  filter: drop-shadow(0 0 14px rgba(255, 180, 0, 0.6));
}

.glyph-line:hover img {
  filter: invert(1) sepia(1) saturate(4) hue-rotate(5deg) brightness(1.2);
  opacity: 0.9;
}

@media (max-width: 980px) {
  .page-shell {
    width: min(calc(100% - 24px), 100%);
    padding-top: calc(var(--nav-height) + 28px);
  }
}
