/* ==========================================================================
   Jarrod Woodard - dark editorial theme
   Black ground, white type, one accent. High contrast, no gradients-for-
   decoration, strict type scale. Every interactive element has a visible
   focus state, and every colour pair below clears WCAG AA on #0a0a0b.
   ========================================================================== */

:root {
  /* ground */
  --bg: #0a0a0b;
  --bg-raise: #121215;
  --bg-raise-2: #1a1a1f;
  --bg-inset: #0e0e10;

  /* type */
  --fg: #f4f4f5;
  --fg-soft: #b4b4bd;
  --fg-faint: #85858f;
  --fg-ghost: #5e5e68;

  /* lines */
  --rule: #26262c;
  --rule-strong: #34343c;

  /* accent - azure blue. Pure #0000ff fails WCAG on a black ground (2.30:1),
     so this is lightened until it clears AA with room to spare (7.54:1). */
  --accent: #4da3ff;
  --accent-dim: #2f7fd4;
  --accent-wash: rgba(77, 163, 255, 0.12);
  --accent-line: rgba(77, 163, 255, 0.38);

  --measure: 70ch;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 6px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--fg); text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--measure); }

/* ------------------------------------------------------------- hero media */
.hero-media {
  position: relative; margin: 0 0 8px;
  border-radius: 7px; overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--bg-inset);
}
.hero-media img {
  width: 100%; aspect-ratio: 16 / 7; object-fit: cover;
  display: block;
}
/* Extra left-weighted scrim. The baked-in veil already darkens the whole
   frame, but copy on the left needs more certainty than a histogram can
   promise, so this is the guaranteed layer. */
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(100deg, rgba(10,10,11,.86) 0%, rgba(10,10,11,.62) 38%,
                            rgba(10,10,11,.18) 72%, rgba(10,10,11,.06) 100%),
    linear-gradient(to top, rgba(10,10,11,.55), rgba(10,10,11,0) 42%);
}
.hero-caption {
  position: absolute; left: 22px; bottom: 16px; z-index: 2;
  font-family: var(--font-sans); font-size: .76rem; letter-spacing: .1em;
  text-transform: uppercase; color: #b4b4bd; margin: 0;
  max-width: 46ch; line-height: 1.5;
  /* the caption sits on top of a photograph, so it carries its own local
     scrim rather than relying on whatever the image happens to be doing
     underneath it */
  text-shadow: 0 1px 3px rgba(10,10,11,.95), 0 0 12px rgba(10,10,11,.8);
}
@media (max-width: 720px) {
  .hero-media img { aspect-ratio: 4 / 3; }
  .hero-media.art img { aspect-ratio: auto; }
  .hero-media::after {
    background:
      linear-gradient(to top, rgba(10,10,11,.90) 0%, rgba(10,10,11,.55) 45%,
                      rgba(10,10,11,.20) 100%);
  }
  .hero-caption { left: 16px; bottom: 12px; font-size: .7rem; }
}

/* Circular geometric artwork. Unlike the photographs, this is transparent
   line art already graded for a near-black ground, so it must NOT receive the
   photographic scrim -- that would bury it. It only needs a faint bloom behind
   the disc so it sits on the page rather than looking pasted on. */
.hero-media.art {
  background: transparent;
  border-color: transparent;
  /* the wrapper must not impose a 16:7 box on a square piece of art */
  aspect-ratio: auto;
}
.hero-media.art::after {
  background:
    radial-gradient(circle at 50% 50%,
      rgba(77,163,255,.09) 0%,
      rgba(77,163,255,.045) 34%,
      rgba(10,10,11,0) 62%);
}
.hero-media.art img {
  /* Full-viewport art pushed the headline and CTAs out of the first screen.
     Cap it so the composition reads as copy-led with the artwork below it,
     and so the whole disc is visible without scrolling. Both width:100% and
     the 16:7 aspect-ratio from the base rule are overridden here; without
     both the square artwork gets squashed into a wide box. */
  width: min(100%, 620px);
  max-width: min(100%, 620px);
  aspect-ratio: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  /* a touch of bloom so the fine grey sectors read without being harsh */
  filter: drop-shadow(0 0 34px rgba(77,163,255,.14));
}
@media (max-width: 720px) {
  .hero-media.art img { width: auto; max-width: min(100%, 400px); }
}

/* Article figure for the same artwork, used as an inline diagram. */
.art-figure {
  margin: 2.6em 0; padding: 26px;
  border: 1px solid var(--rule); border-radius: 7px;
  background:
    radial-gradient(circle at 50% 50%, rgba(77,163,255,.06), rgba(10,10,11,0) 68%),
    var(--bg-inset);
  display: grid; place-items: center;
}
.art-figure img {
  width: min(100%, 520px); height: auto; display: block;
  filter: drop-shadow(0 0 24px rgba(77,163,255,.12));
}

/* Side-by-side art pair, for the tag/category landing pages. */
.art-pair {
  display: grid; gap: 16px; margin: 0 0 30px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.art-pair figure {
  margin: 0; padding: 18px;
  border: 1px solid var(--rule); border-radius: 7px;
  background:
    radial-gradient(circle at 50% 50%, rgba(77,163,255,.06), rgba(10,10,11,0) 70%),
    var(--bg-inset);
  display: grid; place-items: center;
}
.art-pair img {
  width: 100%; max-width: 300px; height: auto; display: block;
  filter: drop-shadow(0 0 20px rgba(77,163,255,.13));
}
@media (max-width: 520px) {
  .art-figure { padding: 18px; }
}
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------- header */
header.site {
  border-bottom: 1px solid var(--rule);
  background: rgba(10, 10, 11, 0.90);
  backdrop-filter: saturate(140%) blur(10px);
  position: sticky; top: 0; z-index: 50;
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 66px; flex-wrap: wrap;
}
.brand {
  font-weight: 640; letter-spacing: -0.01em; font-size: 1rem;
  text-decoration: none; color: var(--fg);
  display: inline-flex; align-items: baseline; gap: 6px;
}
.brand .mark {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); flex: none;
  transform: translateY(-1px);
}
nav.site { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav.site a {
  color: var(--fg-soft); text-decoration: none; font-size: 0.9rem;
  padding: 6px 11px; border-radius: 4px; letter-spacing: 0.005em;
}
nav.site a:hover { color: var(--fg); background: var(--bg-raise); }
nav.site a[aria-current="page"] { color: var(--accent); background: var(--accent-wash); }

/* ---------------------------------------------------------------- hero */
.hero { padding: 64px 0 48px; border-bottom: 1px solid var(--rule); }
.hero .eyebrow {
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent); font-weight: 650; margin: 0 0 20px;
  display: flex; align-items: center; gap: 10px;
}
.hero .eyebrow::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5.4vw, 3.5rem);
  line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 18px;
  font-weight: 600; max-width: 17ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede {
  font-size: clamp(1.02rem, 2.0vw, 1.18rem); color: var(--fg-soft);
  max-width: 62ch; margin: 0 0 26px; line-height: 1.55;
}
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 4px;
  font-size: 0.93rem; font-weight: 560; text-decoration: none;
  border: 1px solid var(--accent); color: #0a0a0b; background: var(--accent);
  transition: background .13s ease, border-color .13s ease, transform .13s ease;
}
.btn:hover { background: #6fb6ff; border-color: #6fb6ff; color: #0a0a0b; transform: translateY(-1px); }
.btn.ghost {
  background: transparent; color: var(--fg); border-color: var(--rule-strong);
}
.btn.ghost:hover { background: var(--bg-raise); border-color: var(--fg-faint); color: var(--fg); }

/* ---------------------------------------------------------- post lists */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 26px;
  padding-bottom: 14px; border-bottom: 1px solid var(--rule);
}
.section-head h2 {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--fg-faint); margin: 0; font-weight: 650;
}
.section-head .more { font-size: 0.88rem; color: var(--accent); text-decoration: none; }
.section-head .more:hover { text-decoration: underline; }

.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.posts li { border-bottom: 1px solid var(--rule); }
.posts li:last-child { border-bottom: 0; }

.post-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px 28px;
  align-items: start; padding: 26px 0; position: relative;
}
.post-row-main { min-width: 0; }
.post-row-title {
  font-size: 1.18rem; font-weight: 600; letter-spacing: -0.015em;
  margin: 0 0 7px; line-height: 1.32;
}
.post-row-link { color: var(--fg); text-decoration: none; transition: color .12s ease; }
/* Stretch the title link over the whole row so the summary is clickable too,
   while chip links stay independently clickable. */
.post-row-link::after { content: ""; position: absolute; inset: 0; }
.post-row:hover .post-row-link { color: var(--accent); }
.post-row-summary {
  margin: 0; color: var(--fg-soft); font-size: 0.95rem; line-height: 1.55;
  max-width: 62ch;
}
.post-row-meta {
  grid-column: 2; grid-row: 1; display: flex; flex-direction: column;
  align-items: flex-end; gap: 9px; white-space: nowrap;
  font-size: 0.8rem; color: var(--fg-faint); text-align: right;
}
/* chips sit above the stretched overlay so they stay clickable */
.post-row-meta .chips, .post-row-meta .post-row-date { position: relative; z-index: 1; }
.chip:hover { position: relative; z-index: 2; }

/* --------------------------------------------------------------- chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.chip {
  display: inline-block; padding: 3px 10px; border-radius: 3px;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.055em;
  text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--rule-strong); color: var(--fg-soft);
  background: var(--bg-raise);
}
.chip:hover { border-color: var(--fg-faint); color: var(--fg); }
.chip.cat {
  border-color: var(--accent-line); color: var(--accent);
  background: var(--accent-wash);
}
.chip.cat:hover { background: rgba(77, 163, 255, 0.20); color: var(--accent); }
.chip .count { color: var(--fg-ghost); margin-left: 5px; font-weight: 500; }
.chip.cat .count { color: var(--accent-dim); }

/* ------------------------------------------------------------ post meta */
.entry-head { padding: 54px 0 30px; border-bottom: 1px solid var(--rule); margin-bottom: 44px; }
.crumbs { font-size: 0.85rem; color: var(--fg-faint); margin: 0 0 18px; }
.crumbs a { color: var(--fg-faint); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.entry-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.1; letter-spacing: -0.028em; margin: 0 0 18px;
  font-weight: 600;
}
.entry-head .summary {
  color: var(--fg-soft); font-size: 1.05rem; margin: 0 0 22px; max-width: 60ch;
  line-height: 1.55;
}
.entry-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  font-size: 0.84rem; color: var(--fg-faint);
}
.entry-meta .sep { color: var(--rule-strong); }

/* ---------------------------------------------------------------- prose */
.prose { font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.74; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.16em; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: var(--font-sans); line-height: 1.25; letter-spacing: -0.018em;
  margin: 2.1em 0 0.62em; font-weight: 620; color: var(--fg);
}
.prose h1 { font-size: 2rem; margin-top: 0; }
.prose h2 { font-size: 1.4rem; }
.prose h3 { font-size: 1.15rem; }
.prose h4 {
  font-size: 0.86rem; color: var(--fg-faint);
  text-transform: uppercase; letter-spacing: 0.13em;
}
.prose ul, .prose ol { margin: 0 0 1.16em; padding-left: 1.32em; }
.prose li { margin-bottom: 0.46em; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin: 1.7em 0; padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent); color: var(--fg-soft); font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: 0.86em; background: var(--bg-raise-2);
  padding: 0.14em 0.4em; border-radius: 3px; border: 1px solid var(--rule);
  color: var(--fg);
}
.prose pre {
  background: var(--bg-inset); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 16px 18px; overflow-x: auto;
  margin: 1.7em 0;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose figure { margin: 2.2em 0; }
.prose figure img {
  border: 1px solid var(--rule); border-radius: var(--radius);
  width: 100%; background: var(--bg-raise);
}
.prose figcaption {
  font-family: var(--font-sans); font-size: 0.82rem; color: var(--fg-faint);
  margin-top: 10px; line-height: 1.45;
}
.prose .callout {
  background: var(--accent-wash); border: 1px solid var(--accent-line);
  border-radius: var(--radius); padding: 15px 18px;
  margin: 1.9em 0; font-size: 0.95rem; line-height: 1.6; color: var(--fg);
}
.prose .callout strong { color: var(--accent); }
.prose .disclaimer {
  font-family: var(--font-sans); font-size: 0.87rem; color: var(--fg-soft);
  background: var(--bg-raise); border: 1px solid var(--rule);
  border-left: 2px solid var(--fg-ghost);
  padding: 13px 16px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.7em 0;
}
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.6em 0; }

/* ------------------------------------------------------------- taxonomy */
.tax-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tax-card {
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 22px 24px; background: var(--bg-raise);
  display: block; text-decoration: none; color: inherit;
  transition: border-color .14s ease, background .14s ease;
}
.tax-card:hover { border-color: var(--accent-line); background: var(--bg-raise-2); }
.tax-card h3 {
  margin: 0 0 8px; font-size: 1.02rem; font-weight: 620; letter-spacing: -0.01em;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.tax-card h3 .count { color: var(--accent); font-size: 0.86rem; font-weight: 600; }
.tax-card p { margin: 0; color: var(--fg-soft); font-size: 0.92rem; line-height: 1.55; }
.grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* section card with a photo header */
.tax-card.pictured { padding: 0; overflow: hidden; display: block; }
.tax-card.pictured .card-media {
  display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--bg-inset); border-bottom: 1px solid var(--rule);
}
.tax-card.pictured .card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease;
}
.tax-card.pictured:hover .card-media img { transform: scale(1.03); }
.tax-card.pictured .card-body { padding: 22px 24px 24px; }

/* -------------------------------------------------------------- archives */
.archive { padding: 44px 0 8px; }
.archive-year {
  display: flex; align-items: baseline; gap: 16px;
  padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--rule);
}
.archive-year h2 {
  margin: 0; font-size: 1.5rem; font-family: var(--font-serif);
  font-weight: 600; letter-spacing: -0.02em; color: var(--fg);
}
.archive-year .n { color: var(--fg-faint); font-size: 0.85rem; }
.archive-block { margin-bottom: 44px; }

/* --------------------------------------------------------- empty / note */
.empty {
  border: 1px dashed var(--rule-strong); border-radius: var(--radius);
  padding: 28px 26px; background: var(--bg-inset);
  color: var(--fg-soft); font-size: 0.95rem; line-height: 1.6;
}
.empty strong { color: var(--fg); display: block; margin-bottom: 7px; font-weight: 620; }
.empty code {
  font-family: var(--font-mono); font-size: 0.85em; background: var(--bg-raise-2);
  padding: 0.1em 0.36em; border-radius: 3px; border: 1px solid var(--rule);
}

.placeholder {
  border: 1px dashed var(--accent-line); border-radius: var(--radius);
  background: var(--accent-wash); padding: 20px 22px;
  font-size: 0.93rem; color: var(--fg-soft); margin: 1.9em 0; line-height: 1.6;
}
.placeholder strong { color: var(--accent); display: block; margin-bottom: 6px; font-weight: 620; }
.placeholder code {
  font-family: var(--font-mono); font-size: 0.85em; background: var(--bg-raise-2);
  padding: 0.1em 0.36em; border-radius: 3px; border: 1px solid var(--rule);
}

/* --------------------------------------------------------------- contact */
.contact-list {
  list-style: none; margin: 2em 0 2.2em; padding: 0;
  /* two columns on desktop so all four fit without scrolling; the prose
     column is narrow, so this is a grid on the list, not a full-width block */
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
}
.contact-list li { margin-bottom: 0; }
.contact-link {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border: 1px solid var(--rule);
  border-radius: var(--radius); background: var(--bg-raise);
  text-decoration: none; color: inherit;
  transition: border-color .14s ease, background .14s ease;
}
.contact-link:hover { border-color: var(--accent-line); background: var(--bg-raise-2); }
.contact-icon {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 5px; background: var(--bg-inset);
  border: 1px solid var(--rule); color: var(--fg-soft);
  transition: color .14s ease, border-color .14s ease;
}
.contact-link:hover .contact-icon { color: var(--accent); border-color: var(--accent-line); }
.contact-link:hover .contact-value { color: var(--accent); }
.contact-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contact-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: #a8a8b3; font-weight: 650;
}
.contact-value {
  font-size: 0.98rem; color: var(--fg); line-height: 1.35;
  transition: color .14s ease;
}
/* the address is one unbreakable token: wrap() would still break it, so keep
   it on one line and let it shrink instead of orphaning "om" from protonmail.com */
.contact-value { overflow-wrap: normal; word-break: keep-all; }
.contact-link { min-height: 68px; }
@media (max-width: 480px) {
  .contact-link { padding: 12px 14px; gap: 13px; }
  .contact-value { font-size: 0.92rem; }
}

/* --------------------------------------------------------------- footer */
footer.site { border-top: 1px solid var(--rule); padding: 36px 0 48px; }
footer.site .wrap {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  align-items: baseline; font-size: 0.87rem; color: var(--fg-faint);
}
footer.site a { color: var(--fg-soft); text-decoration: none; }
footer.site a:hover { color: var(--accent); }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 720px) {
  body { font-size: 16px; }
  header.site .wrap { min-height: 0; padding-top: 12px; padding-bottom: 10px; }
  nav.site a { padding: 5px 8px; font-size: 0.86rem; }
  .hero { padding: 56px 0 42px; }
  .post-row { grid-template-columns: 1fr; gap: 12px; }
  .post-row-meta {
    grid-column: 1; grid-row: auto; flex-direction: row;
    align-items: center; justify-content: flex-start; gap: 8px; text-align: left;
    flex-wrap: wrap;
  }
  .entry-head { padding: 38px 0 26px; margin-bottom: 34px; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 18px; }
  nav.site { gap: 0; }
  nav.site a { padding: 5px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  header.site, footer.site, .hero-media, .chips, .entry-meta { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose { color: #000; }
  .prose a { color: #000; text-decoration: underline; }
}