/* ============================================================
   The Technical Communication of Video Games
   Retro arcade theme: purples, greens, magentas, neon
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&family=Space+Mono:wght@400;700&display=swap');

/* ---- Color palette ---- */
:root {
  --bg-deep:      #16002e;   /* deep purple-black background */
  --bg-panel:     #240046;   /* panel purple */
  --bg-panel-2:   #3c096c;   /* lighter panel purple */
  --neon-magenta: #ff2e97;   /* hot magenta */
  --neon-purple:  #b14aed;   /* electric purple */
  --neon-green:   #39ff14;   /* arcade green */
  --neon-cyan:    #00f0ff;   /* cyan accent */
  --neon-yellow:  #ffe600;   /* coin yellow */
  --text-main:    #f3e9ff;   /* soft white-lavender */
  --text-dim:     #c9a9f0;   /* dimmed lavender */
  --grid-line:    rgba(177, 74, 237, 0.15);
}

/* ---- Base ---- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'VT323', 'Space Mono', monospace;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
}

/* Content container (works with most GitHub Pages themes) */
.markdown-body,
main,
.container,
article,
#content {
  max-width: 880px;
  margin: 2.5rem auto;
  padding: 2.5rem 3rem;
  background: linear-gradient(160deg, var(--bg-panel) 0%, var(--bg-deep) 100%);
  border: 3px solid var(--neon-purple);
  border-radius: 10px;
  box-shadow:
    0 0 20px rgba(177, 74, 237, 0.5),
    inset 0 0 30px rgba(60, 9, 108, 0.6);
}

/* ---- Headings ---- */
h1, h2, h3, h4 {
  font-family: 'Press Start 2P', 'VT323', monospace;
  line-height: 1.4;
  letter-spacing: 0.5px;
}

h1 {
  font-size: 1.5rem;
  color: var(--neon-magenta);
  text-shadow:
    0 0 8px var(--neon-magenta),
    3px 3px 0 var(--bg-panel-2);
  border-bottom: 3px dashed var(--neon-cyan);
  padding-bottom: 1rem;
  margin-top: 0.5rem;
}

h2 {
  font-size: 1.1rem;
  color: var(--neon-green);
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.6);
  margin-top: 2.5rem;
  border-left: 6px solid var(--neon-green);
  padding-left: 0.75rem;
}

h3 {
  font-size: 0.95rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
  margin-top: 2rem;
}

h4 {
  font-size: 0.8rem;
  color: var(--neon-yellow);
}

/* ---- Body text ---- */
p, li {
  font-family: 'VT323', 'Space Mono', monospace;
  font-size: 1.3rem;
  color: var(--text-main);
}

strong {
  color: var(--neon-yellow);
  text-shadow: 0 0 4px rgba(255, 230, 0, 0.4);
}

em {
  color: var(--text-dim);
}

/* ---- Links ---- */
a {
  color: var(--neon-cyan);
  text-decoration: none;
  border-bottom: 1px dotted var(--neon-cyan);
  transition: all 0.15s ease;
}

a:hover {
  color: var(--neon-magenta);
  border-bottom: 1px solid var(--neon-magenta);
  text-shadow: 0 0 8px var(--neon-magenta);
}

/* ---- Lists ---- */
ul, ol {
  padding-left: 1.8rem;
}

ul li::marker {
  color: var(--neon-magenta);
}

ol li::marker {
  color: var(--neon-green);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
}

/* ---- Horizontal rule as a scanline divider ---- */
hr {
  border: none;
  height: 4px;
  margin: 2.5rem 0;
  background: repeating-linear-gradient(
    90deg,
    var(--neon-magenta) 0,
    var(--neon-magenta) 12px,
    var(--neon-purple) 12px,
    var(--neon-purple) 24px
  );
  box-shadow: 0 0 10px rgba(255, 46, 151, 0.5);
}

/* ---- Blockquotes ---- */
blockquote {
  border-left: 6px solid var(--neon-magenta);
  background: rgba(60, 9, 108, 0.4);
  margin: 1.5rem 0;
  padding: 0.8rem 1.5rem;
  color: var(--text-dim);
  border-radius: 0 6px 6px 0;
}

/* ---- Code ---- */
code {
  font-family: 'Space Mono', monospace;
  background: var(--bg-panel-2);
  color: var(--neon-green);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 1.05rem;
}

pre {
  background: #0d0020;
  border: 2px solid var(--neon-purple);
  border-radius: 8px;
  padding: 1.2rem;
  overflow-x: auto;
}

pre code {
  background: none;
  color: var(--text-main);
}

/* ---- Tables (grading scale, etc.) ---- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
}

th {
  background: var(--neon-purple);
  color: var(--bg-deep);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  padding: 0.8rem;
  text-align: left;
  text-shadow: none;
}

td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--neon-purple);
  color: var(--text-main);
}

tr:nth-child(even) td {
  background: rgba(60, 9, 108, 0.35);
}

tr:hover td {
  background: rgba(255, 46, 151, 0.12);
}

/* ---- Selection ---- */
::selection {
  background: var(--neon-magenta);
  color: var(--bg-deep);
}

/* ---- Scrollbar (WebKit) ---- */
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--neon-purple);
  border-radius: 7px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-magenta);
}

/* ---- Site header and navigation ---- */
.site-header {
  max-width: 880px;
  margin: 2rem auto 0;
  padding: 1.5rem 3rem 1rem;
  border-bottom: 3px dashed var(--neon-cyan);
}

.site-title {
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: var(--neon-magenta);
  text-shadow:
    0 0 8px var(--neon-magenta),
    3px 3px 0 var(--bg-panel-2);
  text-decoration: none;
  border-bottom: none;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.site-title:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
  border-bottom: none;
}

.site-nav {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: var(--neon-green);
  text-decoration: none;
  border-bottom: 1px dotted var(--neon-green);
  padding-bottom: 3px;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.site-nav a:hover {
  color: var(--neon-magenta);
  border-bottom: 1px solid var(--neon-magenta);
  text-shadow: 0 0 8px var(--neon-magenta);
}

/* ---- Theme toggle button (arcade default) ---- */
/* Pinned to the top-left of the viewport so it is the first thing seen. */
.theme-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--neon-cyan);
  background: var(--bg-panel-2);
  border: 2px solid var(--neon-cyan);
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.theme-toggle:hover {
  color: var(--bg-deep);
  background: var(--neon-cyan);
  text-shadow: none;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--neon-yellow);
  outline-offset: 2px;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .markdown-body, main, .container, article, #content {
    margin: 1rem;
    padding: 1.5rem 1.2rem;
  }
  body { font-size: 1.1rem; }
  h1 { font-size: 1.1rem; }
  h2 { font-size: 0.9rem; }
  h3 { font-size: 0.8rem; }
  p, li { font-size: 1.15rem; }
}

/* ============================================================
   STANDARD VIEW
   A plain, accessible, high-readability theme. Activated by
   adding the .standard-view class to <html>. These rules are
   scoped under .standard-view and override the arcade defaults
   above; the arcade theme remains the default when the class
   is absent.
   ============================================================ */
.standard-view body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: #1a1a1a;
  background-color: #ffffff;
  background-image: none;
}

/* Content container: calm, borderless, plain document */
.standard-view .markdown-body,
.standard-view main,
.standard-view .container,
.standard-view article,
.standard-view #content {
  max-width: 780px;
  margin: 2rem auto;
  padding: 1rem 2rem 2.5rem;
  background: #ffffff;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Headings: normal weight, dark text, no pixel font or glow */
.standard-view h1,
.standard-view h2,
.standard-view h3,
.standard-view h4 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
  color: #111111;
  text-shadow: none;
  letter-spacing: normal;
  line-height: 1.3;
}

.standard-view h1 {
  font-size: 2rem;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 0.4rem;
}

.standard-view h2 {
  font-size: 1.5rem;
  border-left: none;
  padding-left: 0;
  margin-top: 2rem;
}

.standard-view h3 {
  font-size: 1.25rem;
  text-shadow: none;
}

.standard-view h4 {
  font-size: 1.05rem;
  color: #333333;
}

/* Body text */
.standard-view p,
.standard-view li {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  color: #1a1a1a;
}

.standard-view strong {
  color: #1a1a1a;
  text-shadow: none;
  font-weight: 700;
}

.standard-view em {
  color: #1a1a1a;
}

/* Links: simple underlined */
.standard-view a {
  color: #0645ad;
  text-decoration: underline;
  border-bottom: none;
  text-shadow: none;
}

.standard-view a:hover {
  color: #0b0080;
  text-shadow: none;
  border-bottom: none;
}

.standard-view ul li::marker,
.standard-view ol li::marker {
  color: #1a1a1a;
  font-family: inherit;
  font-size: inherit;
}

/* Horizontal rule: plain line */
.standard-view hr {
  height: 1px;
  background: #dddddd;
  box-shadow: none;
}

/* Blockquotes */
.standard-view blockquote {
  border-left: 4px solid #cccccc;
  background: #f6f6f6;
  color: #333333;
  border-radius: 0;
}

/* Code */
.standard-view code {
  background: #f0f0f0;
  color: #b30000;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.standard-view pre {
  background: #f6f6f6;
  border: 1px solid #dddddd;
}

.standard-view pre code {
  color: #1a1a1a;
}

/* Tables */
.standard-view table {
  font-family: inherit;
  font-size: 1rem;
}

.standard-view th {
  background: #f0f0f0;
  color: #111111;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: 1px solid #cccccc;
  text-shadow: none;
}

.standard-view td {
  border: 1px solid #dddddd;
  color: #1a1a1a;
}

.standard-view tr:nth-child(even) td {
  background: #fafafa;
}

.standard-view tr:hover td {
  background: #f0f4ff;
}

.standard-view ::selection {
  background: #b3d4fc;
  color: #1a1a1a;
}

/* Site header and nav: present but plain */
.standard-view .site-header {
  max-width: 780px;
  border-bottom: 1px solid #dddddd;
}

.standard-view .site-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #111111;
  text-shadow: none;
}

.standard-view .site-title:hover {
  color: #0645ad;
  text-shadow: none;
}

.standard-view .site-nav a {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  color: #0645ad;
  text-decoration: underline;
  border-bottom: none;
  letter-spacing: normal;
}

.standard-view .site-nav a:hover {
  color: #0b0080;
  text-shadow: none;
  border-bottom: none;
}

/* Toggle button: plain, accessible */
.standard-view .theme-toggle {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  letter-spacing: normal;
  color: #ffffff;
  background: #333333;
  border: 1px solid #333333;
  border-radius: 4px;
}

.standard-view .theme-toggle:hover {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
  box-shadow: none;
}

.standard-view .theme-toggle:focus-visible {
  outline: 3px solid #0645ad;
  outline-offset: 2px;
}
