@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Light is the default; dark follows the system unless the toggle set data-theme. */
:root {
  --paper: #ffffff;
  --bg: radial-gradient(70rem 45rem at 85% -8%, rgba(120, 132, 150, 0.22), transparent 65%), linear-gradient(170deg, #ffffff 0%, #e9ecf0 45%, #cdd3db 100%);
  --ink: #2b3038;
  --strong: #0b0d10;
  --muted: #4a5464;
  --accent: #0b0d10;
  --line: rgba(11, 13, 16, 0.14);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a0b0d;
    --bg: radial-gradient(70rem 45rem at 85% -8%, rgba(150, 165, 190, 0.30), transparent 65%), linear-gradient(170deg, #000000 0%, #1b1e23 45%, #343942 100%);
    --ink: #dde1e7;
    --strong: #ffffff;
    --muted: #b0b7c2;
    --accent: #ffffff;
    --line: rgba(255, 255, 255, 0.14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a0b0d;
  --bg: radial-gradient(70rem 45rem at 85% -8%, rgba(150, 165, 190, 0.30), transparent 65%), linear-gradient(170deg, #000000 0%, #1b1e23 45%, #343942 100%);
  --ink: #dde1e7;
  --strong: #ffffff;
  --muted: #b0b7c2;
  --accent: #ffffff;
  --line: rgba(255, 255, 255, 0.14);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; min-height: 100%; background-color: var(--paper); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--bg); pointer-events: none; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.0625rem);
  line-height: 1.7;
  overflow-wrap: break-word;
}

main, .bar, .site-footer {
  max-width: 42rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
main { padding-block: 2.5rem 5rem; }
main.wide { max-width: 64rem; }
main.wide .narrow { max-width: 42rem; margin-inline: auto; }

a { color: var(--strong); text-decoration-color: var(--muted); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; text-decoration-color: var(--strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--paper); }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--paper); color: var(--strong);
  padding: 0.4rem 0.75rem; border: 2px solid var(--accent);
  z-index: 10;
}
.skip:focus { top: 0.75rem; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.bar {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-block: 1.4rem;
}
.brand {
  font-family: var(--mono); font-size: 0.875rem;
  color: var(--strong); text-decoration: none;
}
.brand:hover { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.95rem; }
nav a { padding-block: 0.2rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--strong); text-decoration: underline; }
nav a[aria-current="page"] { color: var(--strong); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }

.theme-toggle {
  font: inherit; font-family: var(--mono); font-size: 0.75rem;
  background: none; color: var(--muted); cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.7rem;
}
.theme-toggle:hover { color: var(--strong); border-color: var(--muted); }
.theme-toggle[hidden] { display: none; }
.bar nav { align-items: baseline; }

/* type */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; color: var(--strong); }
h1 { font-size: 2rem; margin-bottom: 1rem; letter-spacing: -0.025em; }
h2 { font-size: 1.375rem; margin: 3.5rem 0 1rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1.25rem; }
.lede { font-size: 1.1875rem; color: var(--muted); margin-bottom: 1.75rem; }
.page-head { padding-top: 1.5rem; margin-bottom: 2.25rem; }
.intro { padding-top: 2.5rem; }
.meta { color: var(--muted); font-size: 0.95rem; }
.links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; margin-top: 1.5rem; }
.plain { margin: 0; padding-left: 1.25rem; }
.plain li { margin-bottom: 0.65rem; }

.label {
  font-family: var(--mono); font-size: 0.75rem; line-height: 1.6;
  color: var(--muted); letter-spacing: 0.01em;
}
.quiet { color: var(--muted); font-size: 0.9375rem; margin: 0.25rem 0 0; }

/* rows */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { padding: 1.3rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.row p:last-child { margin-bottom: 0; }
ul.rows > .row:not(.split):not(.stack), .rows > li.row:not(.split):not(.stack) {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.25rem; }
.row-head .label { white-space: nowrap; }
.row-head h3, h2.item { font-size: 1.125rem; margin: 0; }
h2.item a { font-weight: 600; }
.split { display: block; }
.split > .label { display: block; margin-bottom: 0.15rem; }
.split p { margin: 0 0 0.3rem; }
.split .title { margin-bottom: 0.15rem; }
.split .sub { margin: 0.2rem 0 0; font-size: 0.9375rem; }
.split .sub .label { margin-right: 0.5rem; }
.result { color: var(--muted); }
.result::before { content: "· "; }
.note { margin-bottom: 0; }

.skills { margin: 0; border-top: 1px solid var(--line); }
.skills .row { margin: 0; }
.skills dt { font-weight: 600; color: var(--strong); }
.skills dd { margin: 0; color: var(--muted); }

blockquote { margin: 2.5rem 0; padding: 0 0 0 1rem; border-left: 2px solid var(--accent); }
blockquote p { margin: 0 0 0.25rem; }
blockquote footer { font-style: normal; font-size: 0.875rem; color: var(--muted); padding: 0; border: 0; margin: 0; }

/* blog prose */
.back { font-size: 0.9375rem; margin: 1.5rem 0 1rem; }
.prose { margin-bottom: 1.5rem; }
.prose h1 { margin-top: 0.25rem; }
.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin: 1.75rem 0 0.5rem; }
.prose h4 { margin: 1.5rem 0 0.5rem; font-size: 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.25rem; }
.prose li > ul, .prose li > ol { margin: 0.25rem 0 0.25rem; }
.prose code { font-family: var(--mono); font-size: 0.85em; background: var(--line); padding: 0.1em 0.3em; border-radius: 2px; overflow-wrap: anywhere; }
.prose pre { overflow-x: auto; margin: 0 0 1.25rem; padding: 0.9rem 1rem; border: 1px solid var(--line); line-height: 1.5; tab-size: 4; }
.prose pre code { background: none; padding: 0; font-size: 0.8125rem; overflow-wrap: normal; white-space: pre; }
.prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; padding: 0.4rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; border-bottom-color: var(--muted); color: var(--strong); }
.prose img { max-width: 100%; height: auto; }
.prose blockquote { margin: 1.25rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* photos */
.album { margin-bottom: 3.5rem; }
.album h2 { margin-top: 1.5rem; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; background: var(--line); }
figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 0.3rem; }

/* footer */
.site-footer::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: 2rem; }
.site-footer { padding-block: 1rem 3.5rem; font-size: 0.9rem; color: var(--muted); }
.site-footer p { margin: 0 0 0.4rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

@media (min-width: 40rem) {
  h1 { font-size: 3rem; }
  .split { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0 1rem; }
  .split > .label { padding-top: 0.3rem; margin: 0; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 150ms ease, text-decoration-color 150ms ease; }
}
