@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
:root {
  color-scheme: only light;
  --ink: #000; --line: #ccc;
  --mono: "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", monospace;
}
* { box-sizing: border-box; }
html { background: #fff; }
body {
  position: relative; max-width: 51rem; min-height: 100vh; margin: 0 auto; padding: 2rem 1.25rem 5rem;
  color: var(--ink); font: 1rem/1.4 var(--mono); font-variant-ligatures: none; overflow-wrap: break-word;
}
/* faded landscape behind the top of every page */
body::before {
  content: ""; position: absolute; z-index: -1; top: 0; left: 50%; width: 100vw; height: 28rem; transform: translateX(-50%);
  background: url(img/landscape.png) top center / max(900px, 100%) auto no-repeat; opacity: .16; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent);
  image-rendering: pixelated;
}
html { overflow-x: clip; }
a { color: inherit; text-underline-offset: .15em; }
a:hover, a:focus-visible { background: var(--ink); color: #fff; }
::selection { background: var(--ink); color: #fff; }

.top { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; justify-content: space-between; margin-bottom: 4.5rem; }
.top h1, .top p { margin: 0; font-size: 1.5rem; font-weight: bold; }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
section { margin-bottom: 4rem; }
section h2 { margin: 0 0 1rem; font-size: 2rem; line-height: 1.2; text-transform: lowercase; }
section h3 { margin: 1.5rem 0 1rem; font-size: 1.15rem; }

article h1 { margin: 0 0 1rem; font-size: 2rem; line-height: 1.2; }
article h2 { margin: 3.5rem 0 1rem; font-size: 1.5rem; line-height: 1.25; }
article h3 { margin: 2rem 0 .75rem; font-size: 1.15rem; }
article h4 { margin: 1.5rem 0 .5rem; font-size: 1rem; }
.meta, .excerpt, figcaption, .list time { font-size: .875rem; }
.meta { margin-bottom: 2.5rem; }
ul { list-style: square; }
ul, ol { padding-left: 1.5rem; }
li { margin: .4rem 0; }
.list { list-style: none; padding: 0; }
.list li { display: flex; gap: 1.5rem; justify-content: space-between; }
.list time { flex: none; }
.list .sub { display: block; margin: 0 0 1rem; padding-left: 1.5rem; font-size: .85rem; }
.sub p, .sub ul { margin: .25rem 0; }
.sub ul { padding-left: 1.25rem; }
.sub ul li { display: list-item; margin: .2rem 0; }
blockquote { margin: 1.25rem 0; padding-left: 1rem; border-left: 3px solid var(--ink); }

code { font: .95em var(--mono); font-variant-ligatures: none; }
article :is(p, li, dd, dt) code { font-weight: bold; }
:is(h1, h2, h3, h4) code { font-weight: bold; }
.code, .scroll { margin: 1rem 0; }
pre { margin: 0; padding: 1rem; overflow-x: auto; background: #f6f6f6; border: 1px solid var(--line); line-height: 1.45; tab-size: 4; }
pre code { font-size: .84rem; overflow-wrap: normal; }

img, svg { max-width: 100%; height: auto; }
figure { margin: 2rem 0; text-align: center; }
figcaption { margin-top: .4rem; }
math[display="block"] { margin: 1rem 0; overflow-x: auto; }
dt { margin-top: .75rem; }
dd { margin: .1rem 0 0 1rem; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; font-size: .875rem; overflow-wrap: normal; }
th, td { padding: .3rem .6rem; border: 1px solid var(--ink); text-align: left; vertical-align: top; }
.diagram text { font: 14px var(--mono); text-anchor: middle; dominant-baseline: middle; }
.diagram :is(rect, path) { fill: none; stroke: var(--ink); }
.diagram rect.group { stroke: var(--line); }
.diagram rect.key { stroke: var(--ink); stroke-width: 2; }

@media (max-width: 36rem) {
  .top { margin-bottom: 3rem; }
  .list li { flex-direction: column; gap: 0; }
}
