/* adriansaxton.com — house style from the brand guide (Personal Brand, 2026-10-14).
   Layout: one reading column (~42rem) on a white ground; the red bar is the only mark; red is used once or twice a page. */
/* Self-hosted: no request leaves the site for fonts (CSP font-src 'self'). One variable file, weights 100 to 900. */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/HankenGrotesk-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --ground: #FFFFFF;
  --ink: #1A1A1A;
  --grey: #595959;
  --red: #CE1126;        /* text and key figures */
  --mark: #CE1126;       /* the bar: always the true brand red */
  --rule: #E2E2E2;
  --tint: #F5F5F5;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
  color-scheme: light;
}
/* Light by default whatever the device setting (Adrian, 2026-10-15); dark only when the reader chooses it. */
:root[data-theme="dark"] {
  --ground: #141414; --ink: #F2F2F2; --grey: #A6A6A6; --red: #F0505F; --rule: #2A2A2A; --tint: #1F1F1F;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

i.bar { display: block; }

/* Header */
.site-head { padding-block: 1.6rem 0; }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.4rem; }
.wordmark { display: flex; flex-direction: column; gap: 0.45rem; text-decoration: none; color: var(--ink); }
.wordmark .bar { width: 2.4rem; height: 5px; background: var(--mark); }
.wordmark span { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; align-items: center; }
nav a { color: var(--grey); text-decoration: none; font-size: 0.92rem; font-weight: 600; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }
.theme-toggle {
  font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--grey);
  background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--grey); }

/* Type */
h1, h2, h3 { text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(2.1rem, 6vw, 3.1rem); line-height: 1.05; letter-spacing: -0.025em; margin: 0; }
h2 { font-weight: 800; font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.01em; margin: 2.2rem 0 0.6rem; }
p { margin: 0 0 1.05rem; }
a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--red); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.label { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey); }
.label a { color: inherit; text-decoration: none; }
.label a:hover { color: var(--ink); }

/* Home hero */
.hero { padding-block: 4.5rem 3rem; }
.hero .bar { width: 4rem; height: 7px; background: var(--mark); margin-bottom: 1.4rem; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 4.4rem); }
.hero .lede { font-size: 1.28rem; line-height: 1.5; margin: 1.3rem 0 0; max-width: 36rem; }
.hero .lede em { font-style: normal; color: var(--red); font-weight: 600; }

/* Lists of writing */
.section { border-top: 1px solid var(--rule); padding-block: 2rem 1rem; }
.section > .label { display: block; margin-bottom: 0.6rem; }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; gap: 0.25rem; padding-block: 1.15rem; border-bottom: 1px solid var(--rule); }
.entry:last-child { border-bottom: 0; }
.entry .text { display: grid; gap: 0.25rem; align-content: start; min-width: 0; }
/* Half image, half text. The summary stops at three lines so the text matches the image's height. */
.entry.has-thumb { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.5rem; align-items: center; }
.entry .thumb { display: block; line-height: 0; }
.entry .thumb img { width: 100%; height: auto; border: 1px solid var(--rule); }
.entry.has-thumb h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry.has-thumb p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.95rem; line-height: 1.5; }
@media (max-width: 560px) {
  .entry.has-thumb { grid-template-columns: minmax(0, 1fr); row-gap: 0.8rem; }
}

/* Sources at the foot of a note: a "## Sources" heading in the Markdown (Pandoc gives it id="sources") */
.post-body h2#sources {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey);
  border-top: 1px solid var(--rule); padding-top: 1.4rem; margin-top: 2.6rem;
}
.post-body h2#sources + ul { font-size: 0.88rem; line-height: 1.55; color: var(--grey); padding-left: 1.1rem; }
.post-body h2#sources + ul li { margin-bottom: 0.55rem; }
.post-body h2#sources + ul a { color: var(--grey); }
.post-body h2#sources + ul a:hover { color: var(--ink); }
.post-body h2#sources ~ .post-foot { border-top: 0; padding-top: 0.4rem; }
.entry .meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; }
.entry .meta time { font-size: 0.82rem; color: var(--grey); }
.entry h3 { margin: 0; font-size: 1.22rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { color: var(--red); }
.entry p { margin: 0; color: var(--grey); font-size: 0.98rem; }
.empty { padding-block: 1.2rem; color: var(--grey); }

/* Series intro */
.intro { padding-block: 3.5rem 1.5rem; }
.intro .bar { width: 3rem; height: 6px; background: var(--mark); margin-bottom: 1.1rem; }
.intro p { color: var(--grey); font-size: 1.12rem; margin: 1rem 0 0; max-width: 36rem; }

/* Post */
.post-head { padding-block: 3.5rem 1.6rem; display: grid; gap: 0.9rem; }
.post-head .wrap { display: grid; gap: 0.9rem; }
.post-head .bar { width: 3rem; height: 6px; background: var(--mark); }
.post-head .meta { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; align-items: baseline; }
.post-head time { color: var(--grey); font-size: 0.9rem; }
.post-body { padding-bottom: 2rem; }
.post-body blockquote { margin: 1.4rem 0; padding: 0.2rem 0 0.2rem 1.1rem; border-left: 2px solid var(--rule); color: var(--grey); }
.post-foot { border-top: 1px solid var(--rule); padding-block: 1.2rem 0; color: var(--grey); font-size: 0.9rem; }

/* Visually hidden, still read by screen readers */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Tags under a note's title */
.tags { list-style: none; margin: 0.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; }
.tags a {
  display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--grey); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 999px; padding: 0.12rem 0.65rem;
}
.tags a:hover { color: var(--ink); border-color: var(--grey); }

/* Tag cloud: size by class (c1 fewest to c4 most), never inline style */
.cloud { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.1rem; }
.cloud a { text-decoration: none; color: var(--grey); font-weight: 600; line-height: 1.3; }
.cloud a:hover { color: var(--red); }
.cloud .c1 { font-size: 0.92rem; }
.cloud .c2 { font-size: 1.08rem; }
.cloud .c3 { font-size: 1.3rem; color: var(--ink); }
.cloud .c4 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.01em; }
.cloud .c3 a, .cloud .c4 a { color: var(--ink); }
.cloud .c4 a { font-weight: 800; }
.more { margin: 1rem 0 0; font-weight: 600; }
.intro .label { display: block; margin-bottom: 0.4rem; }

/* Image at the top of a note (its own graphic, or the house-style card) */
.post-image { margin: 0 0 2rem; }
.post-image img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }

/* Tables from Pandoc: alignment by class (the CSP forbids inline style) */
.table-wrap { overflow-x: auto; margin: 1.4rem 0; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.45; }
.post-body th { text-align: left; font-weight: 600; border-bottom: 1px solid var(--ink); padding: 0.5rem 0.75rem 0.5rem 0; vertical-align: bottom; }
.post-body td { border-bottom: 1px solid var(--rule); padding: 0.55rem 0.75rem 0.55rem 0; vertical-align: top; }
.post-body pre { background: var(--tint); padding: 0.9rem 1rem; overflow-x: auto; font-size: 0.85rem; line-height: 1.5; }
.post-body code { font-size: 0.9em; }
.post-body ol, .post-body ul { padding-left: 1.3rem; margin: 0 0 1.05rem; }
.post-body li { margin-bottom: 0.4rem; }
.align-left { text-align: left; } .align-right { text-align: right; } .align-center { text-align: center; }

/* Footer */
.site-foot { margin-top: 4rem; border-top: 1px solid var(--rule); padding-block: 1.8rem 3rem; color: var(--grey); font-size: 0.88rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem 1.5rem; }
.site-foot a { color: var(--grey); }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.3rem; }
.social a { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; color: var(--grey); border-radius: 6px; }
.social a:hover { color: var(--ink); }
.social svg { width: 22px; height: 22px; }

@media (prefers-reduced-motion: no-preference) {
  a, .theme-toggle { transition: color 120ms ease, border-color 120ms ease, text-decoration-color 120ms ease; }
}
