@font-face { font-family: "Archivo"; src: url(fonts/archivo-wdth-wght.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

/* kyleboddy.com — direction "Night drafting" (Opus) */
/* Light (default): a cool grey drafting board, white sheets, navy-black ink.
   Hairlines are ink on paper, so they sit at 12% / 30% instead of the dark theme's 9% / 18%:
   a 9% line vanishes on light. Sheets (plate, note, feature, thumbs) are white with a
   hairline and a 1px neutral shadow, so they read as paper laid on the board. */
:root {
  --deep: #e9edf3;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --raised: #e8ecf2;
  --raised-2: #dde3ec;
  --plate: #ffffff;
  --line: rgb(10 15 26 / 0.12);
  --line-strong: rgb(10 15 26 / 0.3);
  --shadow: 0 1px 2px rgb(10 15 26 / 0.06);
  --text: #0a0f1a;
  --on-text: #f5f7fa;
  --body: #1f2737;
  --text-2: #4a5466;
  --muted: #5f6b80;
  --accent: #1f56c7;
  --accent-line: rgb(31 86 199 / 0.4);
  --sans: "Archivo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --wide: 118%;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page: 1200px;
  --gutter: 32px;
  color-scheme: light;
}

/* Dark: the original night-drafting ramp */
[data-theme="dark"] {
  --deep: #05070c;
  --bg: #080b12;
  --surface: #0e1320;
  --raised: #151b2a;
  --raised-2: #1c2335;
  --plate: #05070c;
  --line: rgb(233 238 247 / 0.09);
  --line-strong: rgb(233 238 247 / 0.18);
  --text: #e9eef7;
  --on-text: #05070c;
  --body: #d3d9e4;
  --text-2: #a7b0c2;
  --muted: #7d879c;
  --accent: #6ea8fe;
  --accent-line: rgb(110 168 254 / 0.45);
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--accent-line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; line-height: 16px; letter-spacing: 0.01em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark {
  font-weight: 500; font-stretch: var(--wide); font-size: 17px; letter-spacing: -0.01em;
  text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.wordmark svg { color: var(--accent); }
.nav { display: flex; gap: 4px; }
.nav a {
  position: relative; font-size: 14px; color: var(--text-2); text-decoration: none;
  padding: 8px 12px; border-radius: 6px;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.nav a:hover { color: var(--text); background: var(--raised); }
.nav a[aria-current] { color: var(--text); }
.nav a[aria-current]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 1px; background: var(--accent);
}
.menu { display: none; }

.theme { display: grid; place-items: center; width: 36px; height: 36px; color: var(--text-2); background: none; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.theme:hover { color: var(--text); background: var(--raised); }
.head-end { display: flex; align-items: center; gap: 12px; }

/* ---------- Signature: dimension line ---------- */
.dim { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dim::before, .dim > .rule { content: ""; flex: 1; height: 9px; border: solid var(--line-strong); border-width: 0 1px; background: linear-gradient(var(--line-strong), var(--line-strong)) center / 100% 1px no-repeat; }
.dim::before { flex: 0 0 24px; }
.dim > .rule { min-width: 24px; }
.dim b { font-weight: 400; color: var(--text-2); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 96px 0 112px; }
.hero h1 {
  margin: 24px 0 0; font-weight: 500; font-stretch: var(--wide);
  font-size: clamp(48px, 7vw, 92px); line-height: 0.98; letter-spacing: -0.035em;
}
.hero .lede { margin: 24px 0 0; max-width: 32rem; font-size: 19px; line-height: 30px; color: var(--text-2); }
.hero .lede strong { color: var(--text); font-weight: 500; }
.actions { display: flex; gap: 12px; margin-top: 40px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 8px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background-color 150ms var(--ease), transform 150ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--text); color: var(--on-text); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2); }
.btn.primary:hover { background: var(--body); }
.btn.secondary { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.secondary:hover { background: var(--raised-2); }

/* The one moment: the portrait as a drafting plate */
.plate { position: relative; padding: 28px; }
.plate::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px;
  mask: radial-gradient(closest-side, #000 60%, transparent);
}
.plate .ruler { position: absolute; color: var(--line-strong); }
.plate .ruler.x { left: 40px; right: 40px; top: 0; height: 10px;
  background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 8px) top / 100% 5px no-repeat,
              repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 40px) top / 100% 10px no-repeat; }
.plate .ruler.y { top: 40px; bottom: 56px; left: 0; width: 10px;
  background: repeating-linear-gradient(currentColor 0 1px, transparent 1px 8px) left / 5px 100% no-repeat,
              repeating-linear-gradient(currentColor 0 1px, transparent 1px 40px) left / 10px 100% no-repeat; }
.plate .frame { position: relative; border: 1px solid var(--line-strong); padding: 12px; background: var(--plate); box-shadow: var(--shadow); }
.plate .frame img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(0.9) contrast(1.04); }
.plate .reg { position: absolute; width: 20px; height: 20px; border-color: var(--accent); border-style: solid; border-width: 0; }
.plate .reg.tl { top: 16px; left: 16px; border-width: 1px 0 0 1px; }
.plate .reg.tr { top: 16px; right: 16px; border-width: 1px 1px 0 0; }
.plate .reg.bl { bottom: 16px; left: 16px; border-width: 0 0 1px 1px; }
.plate .reg.br { bottom: 16px; right: 16px; border-width: 0 1px 1px 0; }
.plate figcaption { position: relative; display: flex; justify-content: space-between; margin-top: 12px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: baseline; margin-bottom: 32px; }
.section-head h2 { margin: 0; font-weight: 500; font-stretch: var(--wide); font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.section-head h2 .mono { display: block; margin-bottom: 8px; }
.cols { display: grid; grid-template-columns: 280px 1fr; gap: 32px; }

.note { display: grid; grid-template-columns: 5fr 6fr; gap: 40px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.note .art { margin: 24px 0 0; }
.note .art img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; background: var(--plate); }
.note .art figcaption { margin-top: 8px; }
.note .shout { margin: 0; font-family: var(--mono); font-size: 14px; line-height: 22px; color: var(--muted); }
.note p:last-child { margin: 16px 0 0; font-size: 18px; color: var(--text); }
.note a { color: var(--accent); text-decoration-color: var(--accent-line); text-underline-offset: 4px; }

.readout { margin: 0; padding-left: 40px; border-left: 1px solid var(--line); }
.readout .mono { margin-bottom: 12px; }
.readout > div:not(.mono) { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 6px 0; font-size: 14px; line-height: 20px; }
.readout dt { color: var(--text-2); }
.readout dd { margin: 0; color: var(--text); }
.spec { margin: 0; }
.spec > div { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.spec > div:first-child { border-top: 1px solid var(--line); }
.spec dt { font-family: var(--mono); font-size: 12px; line-height: 26px; color: var(--muted); }
.spec dd { margin: 0; font-size: 16px; line-height: 26px; color: var(--text); }
.spec dd a { color: var(--accent); text-decoration-color: var(--accent-line); text-underline-offset: 4px; }
.pgp summary { cursor: pointer; color: var(--text); list-style: none; display: inline-flex; gap: 8px; align-items: center; }
.pgp summary::-webkit-details-marker { display: none; }
.pgp summary svg { color: var(--muted); transition: transform 180ms var(--ease); }
.pgp[open] summary svg { transform: rotate(90deg); }
.pgp pre { margin: 16px 0 0; padding: 16px; max-height: 280px; overflow: auto; background: var(--deep); border: 1px solid var(--line); border-radius: 8px; font: 12px/18px var(--mono); color: var(--text-2); }

/* ---------- Entry lists ---------- */
.entries { list-style: none; margin: 0; padding: 0; }
.entries a {
  display: grid; grid-template-columns: 104px 1fr auto 16px; gap: 24px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background-color 150ms var(--ease);
}
.entries li:first-child a { border-top: 1px solid var(--line); }
.entries .t { font-size: 17px; line-height: 26px; color: var(--text); transition: color 150ms var(--ease); }
.entries .go { display: flex; color: var(--muted); transition: color 150ms var(--ease), transform 150ms var(--ease); }
.entries a:hover .t { color: var(--accent); }
.entries a:hover .go { color: var(--accent); transform: translateX(2px); }
.more { display: inline-flex; margin-top: 24px; font-size: 14px; color: var(--text-2); text-decoration: none; }
.more:hover { color: var(--text); }

.entries .t { display: flex; align-items: center; gap: 20px; }
.thumb { flex: none; width: 96px; height: 64px; object-fit: cover; border-radius: 4px; background: var(--plate); border: 1px solid var(--line); }

/* Blog: the latest entry as a sheet, the one moment on the index */
.feature { display: grid; grid-template-columns: 7fr 5fr; margin: 0 0 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: border-color 150ms var(--ease); }
.feature:hover { border-color: var(--line-strong); }
.feature img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--plate); border-right: 1px solid var(--line); }
.feature .ft { padding: 32px; display: grid; align-content: center; gap: 16px; }
.feature .ft .mono { display: flex; gap: 20px; }
.feature h2 { margin: 0; font-weight: 500; font-stretch: var(--wide); font-size: 32px; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); transition: color 150ms var(--ease); }
.feature:hover h2 { color: var(--accent); }
.feature p { margin: 0; font-size: 17px; line-height: 26px; color: var(--text-2); }
.prose figure.lead { margin: 0 0 40px; }

/* Blog index: ledger by year */
.page-head { padding: 96px 0 64px; }
.page-head h1 { margin: 0 0 24px; font-weight: 500; font-stretch: var(--wide); font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -0.03em; }
.page-head p { margin: 0 0 32px; max-width: 36rem; font-size: 18px; line-height: 28px; color: var(--text-2); }
.year { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding: 32px 0 48px; border-top: 1px solid var(--line); }
.year h2 { position: sticky; top: 24px; align-self: start; margin: 0; font-weight: 400; font-stretch: var(--wide); font-size: 40px; line-height: 1; letter-spacing: -0.02em; color: var(--muted); font-variant-numeric: tabular-nums; }
.year h2 small { display: block; margin-top: 12px; font: 12px/16px var(--mono); }
.year .entries li:first-child a { border-top: 0; padding-top: 4px; }
.year .entries a { grid-template-columns: 64px 1fr auto 16px; }

/* ---------- Article ---------- */
.article-head { padding: 96px 0 48px; display: grid; grid-template-columns: 280px minmax(0, 44rem); gap: 32px; }
.article-head .crumbs { padding-top: 12px; }
.article-head .crumbs a { color: var(--muted); text-decoration: none; }
.article-head .crumbs a:hover { color: var(--text); }
.article-head h1 { margin: 0 0 32px; font-weight: 500; font-stretch: var(--wide); font-size: clamp(36px, 5.2vw, 64px); line-height: 1.02; letter-spacing: -0.03em; }
.article { display: grid; grid-template-columns: 280px minmax(0, 44rem); gap: 32px; padding-bottom: 96px; counter-reset: sec; }
.toc { position: sticky; top: 32px; align-self: start; }
.toc ol { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 12px; padding: 6px 0; font-size: 14px; line-height: 20px; color: var(--text-2); text-decoration: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 12px/20px var(--mono); color: var(--muted); }
.toc a:hover { color: var(--text); }

.prose { font-size: 18px; line-height: 1.7; color: var(--body); }
.prose > * { margin: 0 0 24px; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent-line); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color 150ms var(--ease); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--text); font-weight: 600; }
.prose h4, .prose h3, .prose h2 {
  counter-increment: sec; margin: 64px 0 20px; font-weight: 500; font-stretch: var(--wide);
  font-size: 26px; line-height: 1.2; letter-spacing: -0.015em; color: var(--text);
}
.prose h4::before, .prose h3::before, .prose h2::before {
  content: counter(sec, decimal-leading-zero); display: block; margin-bottom: 12px;
  font: 400 12px/16px var(--mono); color: var(--accent);
}
.prose code { font: 0.86em var(--mono); padding: 2px 6px; background: var(--raised); border: 1px solid var(--line); border-radius: 4px; color: var(--text); }
.prose ul, .prose ol { padding-left: 20px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--muted); }
.prose blockquote { margin: 40px 0; padding: 0 0 0 24px; border-left: 1px solid var(--accent); }
.prose blockquote p { margin: 0; font-size: 21px; line-height: 1.5; color: var(--text); }
.prose blockquote em { display: block; margin-top: 16px; font: 400 12px/18px var(--mono); font-style: normal; color: var(--muted); }
.prose figure { margin: 40px 0; }
.prose figure img { width: 100%; border: 1px solid var(--line); border-radius: 4px; }
.embed { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none !important; }
.embed span:first-child { color: var(--text); font-size: 15px; }

/* ---------- Footer: drawing title block ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 48px 0 64px; }
.titleblock { display: grid; grid-template-columns: 1.6fr 0.8fr 1fr 1.6fr; border: 1px solid var(--line-strong); background: var(--surface); }
.titleblock .v.mono { white-space: nowrap; }
.titleblock > div { padding: 16px 20px; border-left: 1px solid var(--line-strong); }
.titleblock > div:first-child { border-left: 0; }
.titleblock .mono { display: block; margin-bottom: 6px; }
.titleblock .v { font-size: 14px; line-height: 20px; color: var(--text); }
.titleblock .v a { color: var(--text); text-decoration: none; }
.titleblock .v a:hover { color: var(--accent); }

/* ---------- Load ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 480ms var(--ease) both; }
  .rise.d1 { animation-delay: 60ms; } .rise.d2 { animation-delay: 120ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
}

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .nav { display: none; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; font-size: 14px; color: var(--text-2); padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu nav { position: absolute; right: 0; top: 48px; z-index: 10; min-width: 200px; padding: 8px; display: grid; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; }
  .menu nav a { padding: 10px 12px; border-radius: 6px; font-size: 15px; color: var(--text-2); text-decoration: none; }
  .menu nav a[aria-current] { color: var(--text); background: var(--raised); }
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 48px 0 64px; }
  .hero .lede { font-size: 17px; line-height: 27px; }
  .plate { padding: 20px; }
  .hero .dim .rule ~ * , .hero .dim .rule { display: none; }
  .plate .ruler { display: none; }
  .plate .reg.tl, .plate .reg.tr { top: 8px; } .plate .reg.bl, .plate .reg.br { bottom: 8px; }
  .plate .reg.tl, .plate .reg.bl { left: 8px; } .plate .reg.tr, .plate .reg.br { right: 8px; }
  .section { padding: 48px 0; }
  .section-head, .cols, .year, .article-head, .article { grid-template-columns: 1fr; gap: 16px; }
  .spec > div { grid-template-columns: 1fr; gap: 4px; }
  .note { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .cat { display: none; }
  .readout { padding-left: 0; border-left: 0; padding-top: 20px; border-top: 1px solid var(--line); }
  .readout > div:not(.mono) { grid-template-columns: 1fr; gap: 0; padding: 8px 0; }
  .entries a { grid-template-columns: 1fr 16px; gap: 4px 16px; }
  .entries a .mono { grid-column: 1 / -1; }
  .year h2 { position: static; font-size: 32px; }
  .year .entries a { grid-template-columns: 52px 1fr 16px; }
  .year .entries a .mono { grid-column: auto; }
  .page-head, .article-head { padding: 48px 0 32px; }
  .toc { display: none; }
  .thumb { width: 64px; height: 44px; }
  .entries .t { gap: 12px; }
  .feature { grid-template-columns: 1fr; }
  .feature img { border-right: 0; border-bottom: 1px solid var(--line); }
  .feature .ft { padding: 20px; }
  .feature h2 { font-size: 26px; }
  .prose { font-size: 17px; }
  .prose blockquote p { font-size: 19px; }
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > div:nth-child(3) { border-left: 0; }
  .titleblock > div:nth-child(n+3) { border-top: 1px solid var(--line-strong); }
}


/* ---------- WordPress content ---------- */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.readout > div:not(.mono) { grid-template-columns: 32px 1fr; }
.readout dt { font: 12px/20px var(--mono); color: var(--muted); }
.prose img { height: auto; border-radius: 4px; }
.prose figcaption, .prose .wp-element-caption, .prose .wp-caption-text { margin-top: 8px; font: 12px/18px var(--mono); color: var(--muted); }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.prose .alignleft { float: left; max-width: 50%; margin: 4px 24px 16px 0; }
.prose .alignright { float: right; max-width: 50%; margin: 4px 0 16px 24px; }
.prose pre { overflow: auto; padding: 16px; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; font: 13px/20px var(--mono); color: var(--text); }
.prose pre code { padding: 0; border: 0; background: none; }
.prose hr { margin: 48px 0; border: 0; border-top: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose iframe, .prose video { max-width: 100%; }
.prose .wp-block-embed__wrapper { display: block; }

.comments { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); font-size: 16px; }
.comments h2, .comments .comment-reply-title { margin: 0 0 24px; font-weight: 500; font-stretch: var(--wide); font-size: 22px; letter-spacing: -0.01em; color: var(--text); }
.comments h2::before, .comments .comment-reply-title::before { content: none; }
.comment-list { list-style: none; margin: 0 0 48px; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-meta, .comment-metadata, .reply { font: 12px/18px var(--mono); color: var(--muted); }
.comment-meta a, .reply a { color: inherit; }
.comment-author .fn { font: 500 15px/22px var(--sans); color: var(--text); }
.comment-form label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-2); }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 8px;
}
.comment-form .btn { border: 0; cursor: pointer; }
