/* kayrkayrk.com: one stylesheet for every page.
   Plain on purpose: one column, readable text, no effects. */

/* Colours in one place. Change them here and every page follows. */
:root {
  --paper: #fbfaf7;      /* background, slightly warm white */
  --ink: #1d1d1b;        /* main text */
  --quiet: #6b6a65;      /* dates, captions, footer */
  --line: #dddad2;       /* thin dividers */
  --accent: #b4432b;     /* links: a brick red, used sparingly */
}

/* Dark mode: same layout, swapped colours, follows the system setting. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171716;
    --ink: #e9e7e1;
    --quiet: #9b998f;
    --line: #34332f;
    --accent: #e0805f;
  }
}

/* Page: one centred column about 65 characters wide, the comfortable reading width. */
body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 3.5rem 1.25rem 4rem;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

/* Headings use the system sans-serif so they stand apart from the text. */
h1, h2 {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.2;
}
h1 { font-size: 2rem; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 2.5rem 0 0.5rem; }

p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.2rem; }
li { margin: 0.25rem 0; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.quiet { color: var(--quiet); font-size: 0.9rem; }

/* Reference images: full width, thin border, caption underneath. */
figure { margin: 1.25rem 0; }
figure img { width: 100%; height: auto; border: 1px solid var(--line); display: block; }
figcaption { color: var(--quiet); font-size: 0.9rem; margin-top: 0.4rem; }

/* Placeholder box shown until a real image is added. */
.placeholder {
  border: 1px dashed var(--quiet);
  color: var(--quiet);
  padding: 2.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

/* Colour palette: a small square, the name, and the hex code. */
.palette { list-style: none; padding: 0; }
.palette li { display: flex; align-items: center; gap: 0.75rem; }
.swatch { width: 1.6rem; height: 1.6rem; border: 1px solid var(--line); flex: none; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }

/* The actual palette colours. Edit the hex codes here (the CSP blocks inline styles). */
.c1 { background: #2b2b2b; }
.c2 { background: #f2e6d8; }
.c3 { background: #b4432b; }
.c4 { background: #3d5a80; }

footer { margin-top: 4rem; }
