/* mannabiscuit.com -- the zine.
 *
 * Hand-written, one request, no framework and no build step of its own --
 * same approach as dnsismagic.com's stylesheet and for the same reason.
 *
 * The palette is still taken literally from the markup of caveofevil.com,
 * the only site that has linked here for twenty years: `bgcolor="black"`
 * and `<font color="red">`, so #000000 and #ff0000, nothing tinted or
 * desaturated. What changed in September 2026 is where the red goes: it
 * used to be a hairline under the masthead; now it is the masthead, a
 * block with black type on it. Everything else stays divided by --edge.
 *
 * Two faces: Georgia for anything that is a sentence or a name (it ships
 * everywhere, so no webfont and no font-src in the CSP), and the system
 * monospace for anything that is a label -- dates, the nav, section heads,
 * the tagline. A label in mono and a title in serif beside it is what
 * makes a dense index scannable without any other decoration.
 *
 * Deliberately no light mode. The site is black; that is the identity.
 */
:root {
  --ink:   #000000;
  --paper: #ffffff;
  --blood: #ff0000;
  --ash:   #8a8a8a;   /* labels, dates, summaries: 6.16:1 on black */
  --edge:  #2a2a2a;   /* every divider */

  --serif: Georgia, "Times New Roman", Times, serif;
  --mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 18px/1.75 var(--serif);
  -webkit-text-size-adjust: 100%;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
}

a { color: var(--blood); }

:focus-visible {
  outline: 2px solid var(--blood);
  outline-offset: 3px;
}

/* --------------------------------------------------------------- masthead */

.masthead {
  background: var(--blood);
  color: var(--ink);
  padding: 40px 48px 34px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.wordmark {
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.03em;
}

.wordmark:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 3px; }

.tagline {
  margin: 0;
  font: 13px/1.4 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
}

.menu {
  display: flex;
  gap: 22px;
  font: 13px/1.4 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.menu a {
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.menu a.on,
.menu a:hover,
.menu a:focus-visible { border-bottom-color: var(--ink); }

/* ---------------------------------------------------------------- columns */

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
}

main { padding: 36px 48px 64px; min-width: 0; }

.side {
  border-left: 1px solid var(--edge);
  padding: 36px 40px 64px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

@media (max-width: 60rem) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  main { padding: 28px 20px 40px; }
  .side { border-left: 0; border-top: 1px solid var(--edge); padding: 28px 20px 48px; }
  .masthead { padding: 28px 20px 24px; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}

/* ---------------------------------------------------------------- the index */

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rows li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto 64px;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--edge);
}

.rows time,
.rows .s {
  font: 12px/1.5 var(--mono);
  color: var(--ash);
}

.rows time { letter-spacing: .1em; }

.rows .s {
  max-width: 26em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rows .t {
  color: var(--paper);
  text-decoration: none;
  font-size: 22px;
  line-height: 1.25;
}

.rows .t:hover,
.rows .t:focus-visible { text-decoration: underline; text-underline-offset: .15em; }

.rows .pic {
  display: block;
  width: 64px;
  height: 48px;
  border: 1px solid var(--edge);
  background: #111111;
  overflow: hidden;
}

.rows .pic img,
.rows .pic video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 40rem) {
  .rows li {
    grid-template-columns: minmax(0, 1fr) 64px;
    grid-template-areas: "time pic" "title pic" "sum pic";
    row-gap: 2px;
  }
  .rows time { grid-area: time; }
  .rows .t   { grid-area: title; font-size: 19px; }
  .rows .s   { grid-area: sum; }
  .rows .pic { grid-area: pic; }
}

.empty {
  margin: 0;
  padding: 1.5rem 0 .5rem;
  color: var(--ash);
  font: 13px/1.5 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- sidebar */

.side h2 {
  margin: 0 0 12px;
  font: 12px/1.4 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blood);
}

.side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.projects a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--paper);
  text-decoration: none;
}

.projects img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: left top;
  border: 1px solid var(--edge);
}

.projects .name {
  font-size: 16px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.projects .blurb { color: var(--ash); }

.projects a:hover .name,
.projects a:focus-visible .name { text-decoration: underline; }

.years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  border-top: 1px solid var(--edge);
  padding-top: 22px;
  font: 12px/1.5 var(--mono);
  letter-spacing: .1em;
}

.years a { color: var(--ash); text-decoration: none; }
.years a:hover, .years a:focus-visible { color: var(--paper); }

/* ---------------------------------------------------------------- the post */

.post,
.notfound { max-width: 40em; }

.post header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.post header time,
.archive-h .count {
  font: 12px/1.5 var(--mono);
  letter-spacing: .1em;
  color: var(--ash);
}

.post h1,
.notfound h1,
.archive-h {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: normal;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.archive-h { margin-bottom: 1.5rem; }
.archive-h .count { margin-left: .75rem; }

.post h2,
.post h3 {
  margin: 2.5rem 0 .6rem;
  font-weight: normal;
  line-height: 1.3;
}

.post h2 { font-size: 1.4rem; }
.post h3 { font-size: 1.15rem; font-style: italic; }

.post p, .post ul, .post ol { margin: 0 0 1.4rem; }
.post li { margin-bottom: .4rem; }

/* Underlined always in prose: it is what links looked like when this
 * design is from, and colour is then not the only thing marking them. */
.post a {
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}

.post img,
.post video {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--edge);
}

.post video { display: block; margin: 0 0 1.4rem; }

.post blockquote {
  margin: 0 0 1.4rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--edge);
  color: var(--ash);
  font-style: italic;
}

.post code {
  font: .85em/1.6 var(--mono);
  color: var(--paper);
  background: #141414;
  padding: .1em .35em;
  border: 1px solid var(--edge);
}

.post pre {
  margin: 0 0 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--edge);
  background: #0a0a0a;
  overflow-x: auto;
}

.post pre code { background: none; border: 0; padding: 0; }

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

.tags, .backlink {
  margin-top: 2.5rem;
  font: 12px/1.5 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ash);
}

.backlink a, .tags a { color: var(--blood); text-decoration: none; }
.backlink a:hover, .tags a:hover { color: var(--paper); }
