:root {
  --bg: #ffffff;
  --text: #111113;
  --body: #3f3f46;
  --muted: #6e6e73;
  --faint: #8e8e93;
  --line: #ededf0;
  --underline: #d4d4d8;
  --avatar-bg: #111113;
  --avatar-dot: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b10;
    --text: #f2f2f2;
    --body: #b4b4b9;
    --muted: #8a8a8f;
    --faint: #6b6b70;
    --line: #1e1e24;
    --underline: #3a3a40;
    --avatar-bg: #0b0b10;
    --avatar-dot: #f2f2f2;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font: 400 15px/24px "Geist", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 400; color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }

.column {
  /* 606px: a nod to the Roland TR-606. Side gutters only appear when the screen is narrower. */
  width: min(606px, 100% - 32px);
  margin: 0 auto;
  padding: 120px 0 160px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* Home header */
.intro { display: flex; align-items: center; gap: 16px; }
.name { font-size: 16px; line-height: 22px; font-weight: 500; color: var(--text); }
.sub { font-size: 14px; line-height: 20px; color: var(--muted); }
.avatar {
  position: relative;
  flex-shrink: 0;
  width: 80px; height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #0b0b10;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent);
  cursor: pointer;
  touch-action: none;
}
.avatar canvas, .avatar img { display: block; width: 100%; height: 100%; }
.avatar img { object-fit: cover; filter: grayscale(1); }

.about { display: flex; flex-direction: column; gap: 16px; }

/* Sections and rows */
.section { display: flex; flex-direction: column; gap: 8px; }
.label {
  font-size: 11px; line-height: 16px; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 4px;
}
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 0;
}
.row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-title { color: var(--text); }
.row-desc { font-size: 14px; line-height: 22px; color: var(--muted); }
.link-muted {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-underline-offset: 4px;
}
.muted { color: var(--muted); }
.years { flex-shrink: 0; font-size: 14px; color: var(--faint); font-variant-numeric: tabular-nums; }
.row.static .row-title strong { margin-right: 6px; }

/* Internal links: arrow only appears on hover/focus, pointing right (same tab) */
.arrow {
  flex-shrink: 0;
  fill: none; stroke: var(--text); stroke-width: 1.25;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .15s ease, transform .15s ease;
}
a.row:hover .arrow, a.row:focus-visible .arrow { opacity: 1; transform: none; }
a.row:hover .link-muted { color: var(--text); }
@media (hover: none) { .arrow { display: none; } }

.list .row { padding: 12px 0; }

/* Elsewhere: external links keep an up-right arrow (new tab) */
.elsewhere { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.elsewhere a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-underline-offset: 4px;
  transition: text-decoration-color .15s ease;
}
.elsewhere a:hover { text-decoration-color: var(--text); }
.ext { margin-left: 2px; vertical-align: -1px; fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Articles */
.article { display: flex; flex-direction: column; gap: 48px; }
.article-head { display: flex; flex-direction: column; gap: 8px; }
.article-head h1 { font-size: 28px; line-height: 36px; font-weight: 500; letter-spacing: -0.02em; color: var(--text); }
.meta { font-size: 14px; line-height: 20px; color: var(--faint); }
.lede { color: var(--muted); }
.prose { font-size: 16px; line-height: 28px; color: var(--body); }
.prose > * + * { margin-top: 20px; }
.prose h2 { font-size: 18px; line-height: 28px; font-weight: 500; color: var(--text); margin-top: 36px; }
.prose h3 { font-size: 16px; line-height: 28px; font-weight: 500; color: var(--text); margin-top: 28px; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--underline); text-underline-offset: 4px; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--line); color: var(--text); }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.prose figure { margin: 28px 0; }
.prose figcaption { margin-top: 10px; font-size: 13px; line-height: 20px; color: var(--faint); }
.prose code { font-family: "Geist Mono", ui-monospace, monospace; font-size: 14px; }
.prose ul, .prose ol { padding-left: 20px; }
.prose ul { list-style: disc; }
.more { border-top: 1px solid var(--line); padding-top: 40px; }

@media (max-width: 560px) {
  .column { padding-top: 64px; padding-bottom: 96px; gap: 48px; }
  .row.static { align-items: baseline; }
}
