:root {
  --bg: #0c0c0b;
  --raise: #141412;
  --ink: #ebe7df;
  --muted: #8f8a80;
  --rule: #24221f;
  --accent: #c4ad86;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1120px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Film grain: a faint noise layer over the black. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection {
  background: var(--accent);
  color: var(--bg);
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
  border-radius: 1px;
}
.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 14px;
  font-size: 14px;
  text-decoration: none;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}
.wrap {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
em,
.it {
  font-family: var(--serif);
  font-style: italic;
}

/* Header */
header {
  border-bottom: 1px solid var(--rule);
}
.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 26px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
}
nav ul {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
nav a:hover,
nav a[aria-current="page"] {
  color: var(--ink);
}

/* Hero */
.hero {
  padding-top: clamp(88px, 16vw, 200px);
  padding-bottom: clamp(88px, 14vw, 176px);
}
.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 6.6vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero h1 em {
  color: var(--accent);
}
.hero p {
  margin: clamp(28px, 4vw, 44px) 0 0;
}
.hero .intro + .intro {
  margin-top: 12px;
}
.hero .intro {
  margin-top: 24px;
  max-width: 62ch;
  font-size: 17px;
  color: var(--muted);
}
.page-hero {
  padding-top: clamp(64px, 10vw, 128px);
  padding-bottom: clamp(48px, 7vw, 88px);
}
.page-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.page-hero p {
  margin: 20px 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 17px;
}

/* Rows: label left, content right */
section.row {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 32px;
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: clamp(56px, 7vw, 88px);
  border-top: 1px solid var(--rule);
}
section.row > h2 {
  margin: 0;
  line-height: 1.9;
}
.more {
  display: inline-block;
  margin-top: 32px;
  font-size: 15px;
}

/* Lists of things: posts, tools, roles */
.items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.items > li {
  padding: 26px 0;
  border-top: 1px solid var(--rule);
}
.items > li:first-child {
  border-top: 0;
  padding-top: 0;
}
.items > li:last-child {
  padding-bottom: 0;
}
.item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
}
.item-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.item-title a {
  text-decoration: none;
}
.item-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--rule);
}
.item-meta {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.item-body {
  margin: 8px 0 0;
  max-width: 58ch;
  color: var(--muted);
}
.points {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  max-width: 60ch;
  color: var(--muted);
  font-size: 15px;
}
.points li {
  position: relative;
  padding-left: 20px;
}
.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.8em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}

/* Contact */
.contact-lede {
  margin: 0;
  max-width: 24ch;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.availability {
  margin: 16px 0 0;
  max-width: 56ch;
  color: var(--muted);
}
.email-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin: 24px 0 0;
}
.email-line a {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 24px);
  overflow-wrap: anywhere;
}
button,
.btn {
  appearance: none;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
button:hover {
  border-color: var(--ink);
}
button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
button.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
form.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  margin-top: 48px;
  max-width: 680px;
}
form.contact label {
  display: grid;
  gap: 8px;
}
form.contact .full {
  grid-column: 1 / -1;
}
input,
textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--raise);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 12px 14px;
  transition: border-color 0.2s ease;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.55;
}
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.hint {
  font-size: 14px;
  color: var(--muted);
}

/* Article */
.post-head {
  padding-top: clamp(64px, 10vw, 128px);
  padding-bottom: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--rule);
}
.post-head h1 {
  margin: 16px 0 0;
  max-width: 22ch;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 5.2vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.post-head .dek {
  margin: 24px 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 18px;
}
.prose {
  max-width: 66ch;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.6;
}
.prose > * + * {
  margin-top: 1.1em;
}
.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin-bottom: 0;
}
.prose strong {
  font-weight: 500;
  color: #fff;
}
.prose h2 {
  margin: 2.4em 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.prose h3 {
  margin: 1.8em 0 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose ul,
.prose ol {
  padding-left: 1.2em;
}
.prose li + li {
  margin-top: 0.3em;
}
.prose li::marker {
  color: var(--accent);
}
.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding-left: 24px;
  border-left: 1px solid var(--accent);
  font-style: italic;
  color: var(--ink);
}
.prose hr {
  border: 0;
  height: auto;
  margin: 2.4em 0;
  text-align: center;
  color: var(--muted);
}
.prose hr::before {
  content: "· · ·";
  letter-spacing: 0.6em;
}
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8em;
  background: var(--raise);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.1em 0.35em;
}
.prose pre {
  overflow-x: auto;
  background: var(--raise);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.55;
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}
.prose img {
  max-width: 100%;
  height: auto;
}
/* Single screenshots with a caption. */
.prose figure {
  margin: 1.6em 0 0;
}
.prose figure > a {
  display: block;
  text-decoration: none;
}
.prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.prose figure.narrow {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.prose figure:not(.pair) figcaption {
  margin: 10px 0 0;
}
.prose th[align="right"],
.prose td[align="right"] {
  text-align: right;
  padding-left: 16px;
}
.prose th[align="center"],
.prose td[align="center"] {
  text-align: center;
}
/* Responsive video embed. */
.prose figure.video .video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--raise);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}
.prose figure.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Collapsible raw output. */
.prose details {
  background: var(--raise);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.prose details + details {
  margin-top: 12px;
}
.prose summary {
  cursor: pointer;
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.prose summary:hover {
  color: var(--accent);
}
.prose details pre {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  font-size: 13px;
  line-height: 1.5;
}
/* Two screenshots side by side, wider than the text column; stacked on phones. */
.prose figure.pair {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1040px, calc(100vw - 2 * var(--gutter)));
  margin: 1.6em 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.prose figure.pair a {
  display: block;
  text-decoration: none;
}
.prose figure.pair img {
  display: block;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.prose figcaption {
  grid-column: 1 / -1;
  max-width: 66ch;
  margin: 4px auto 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.prose th,
.prose td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.prose th {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose .aside {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.post-foot {
  max-width: 66ch;
  margin: 0 auto;
  padding: 40px 0 clamp(64px, 8vw, 104px);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  font-size: 15px;
  color: var(--muted);
}

/* Footer */
footer {
  border-top: 1px solid var(--rule);
}
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: 32px;
  padding-bottom: 48px;
  font-size: 13px;
  color: var(--muted);
}
.foot p {
  margin: 0;
}
.foot ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 760px) {
  section.row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  form.contact {
    grid-template-columns: 1fr;
  }
  .prose {
    font-size: 19px;
  }
  .prose figure.pair {
    grid-template-columns: 1fr;
  }
  /* Wide editor screenshots keep a readable size and scroll sideways. */
  .prose figure.wide > a {
    overflow-x: auto;
    border: 1px solid var(--rule);
    border-radius: 3px;
  }
  .prose figure.wide img {
    width: 760px;
    max-width: none;
    border: 0;
    border-radius: 0;
  }
  .prose table {
    display: block;
    overflow-x: auto;
    font-size: 14px;
  }
}
@media (max-width: 440px) {
  .bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 22px;
    padding-bottom: 20px;
  }
  nav ul {
    gap: 22px;
  }
}
