/* ==========================================================
   style.css — simple lo-fi look: white background, black text
   ========================================================== */

/* Font: Space Mono from Google Fonts (falls back to the system monospace) */
@import url("https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap");

/* ---------- Colors (change these to restyle the whole site) ---------- */
:root {
  --bg: #ffffff;      /* page background */
  --text: #000000;    /* main text */
  --muted: #555555;   /* secondary text, dates, captions */
  --line: #000000;    /* borders and rules */
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 2rem 1rem;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Mono", ui-monospace, "Courier New", monospace;
  line-height: 1.6;
}

/* Keeps text in a readable column, centered on the page */
main,
header,
footer {
  max-width: 680px;
  margin: 0 auto;
}

/* ---------- Text ---------- */
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 2rem 0 0.75rem;
}

h1 {
  font-size: 2rem;
  margin-top: 0;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1rem;
}

small,
.muted {
  color: var(--muted);
}

/* ---------- Links ---------- */
a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
}

/* ---------- Header & navigation ---------- */
header {
  border-bottom: 2px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Footer ---------- */
footer {
  border-top: 2px solid var(--line);
  padding-top: 1rem;
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Images ---------- */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--line);
}

/* Add class="pixel" to an image to keep pixel art crisp when enlarged */
img.pixel {
  image-rendering: pixelated;
}

/* ---------- Other elements ---------- */
hr {
  border: none;
  border-top: 2px dashed var(--line);
  margin: 2rem 0;
}

blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 4px solid var(--line);
}

code,
pre {
  font-family: inherit;
  background: #f2f2f2;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
}

button {
  font: inherit;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--line);
  padding: 0.4rem 1rem;
  cursor: pointer;
}

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

/* Highlight color when someone selects text */
::selection {
  background: var(--text);
  color: var(--bg);
}

/* ---------- Phones ---------- */
@media (max-width: 500px) {
  h1 {
    font-size: 1.6rem;
  }
}
