:root {
  --bg: oklch(97.5% .008 85);
  --surface: oklch(99% .006 85);
  --ink: oklch(24% .015 85);
  --muted: oklch(48% .015 85);
  --accent: oklch(52% .11 165);
  --line: rgb(0 0 0 / .12);
  --edge: oklch(60% .015 85);
  --serif: "Spectral", Georgia, serif;
  --display: "Lora", Georgia, serif;
  --mono: "Roboto Mono", ui-monospace, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(19% .01 85);
    --surface: oklch(23% .01 85);
    --ink: oklch(92% .01 85);
    --muted: oklch(70% .012 85);
    --accent: oklch(76% .11 165);
    --line: rgb(255 255 255 / .12);
    --edge: oklch(55% .012 85);
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.125rem/1.65 var(--serif); }
a { color: var(--accent); text-underline-offset: .2em; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }
.wide { max-width: 72rem; }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; padding-block: 1.25rem; max-width: 72rem; }
.brand { font: 600 1rem var(--mono); color: var(--ink); text-decoration: none; margin-right: auto; }
.brand::before { content: "~/"; color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font: .85rem var(--mono); }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current] { color: var(--ink); }
nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.kicker { font: .8rem var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin: 3.5rem 0 .25rem; }
h1 { font: 600 clamp(2rem, 5vw, 2.75rem)/1.15 var(--display); margin: 0 0 .75rem; text-wrap: balance; }
.lede { color: var(--muted); font-size: 1.25rem; margin: 0 0 2.5rem; text-wrap: pretty; }

/* posts */
.post { border-top: 1px solid var(--line); padding-block: 3rem; }
.post h2 { font: 600 1.9rem/1.2 var(--display); margin: 0 0 .35rem; text-wrap: balance; }
.post-body h1, .post-body h2, .post-body h3 { font-family: var(--display); }
.post h2 a { color: inherit; text-decoration: none; }
.post .meta { font: .8rem var(--mono); color: var(--muted); margin-bottom: 1.5rem; }
.post .sub { color: var(--muted); font-size: 1.2rem; margin: 0 0 .5rem; }
.post .cover { border-radius: 10px; margin-bottom: 1.5rem; display: block; }
.post-body figure { margin: 2rem 0; }
.post-body figcaption { font-size: .9rem; color: var(--muted); text-align: center; }
.post-body pre, .post-body code { font-family: var(--mono); font-size: .85em; }
.post-body pre { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; overflow-x: auto; }
.post-body blockquote { border-left: 3px solid var(--accent); margin: 1.5rem 0; padding-left: 1.25rem; color: var(--muted); }
.post-body iframe { max-width: 100%; }
/* Substack widgets that do nothing off-platform */
.post-body .subscription-widget-wrap, .post-body .subscription-widget-wrap-editor,
.post-body .button-wrapper, .post-body .image-link-expand, .post-body .footnote-anchor-wrap { display: none; }
.more { font: .85rem var(--mono); }
.status { font: .9rem var(--mono); color: var(--muted); padding-block: 2rem; }

/* photos */
.grid { columns: 3 18rem; column-gap: 12px; }
.grid a { display: block; margin-bottom: 12px; break-inside: avoid; border-radius: 8px; overflow: hidden; }
.grid img { display: block; width: 100%; transition: scale .4s; }
@media (prefers-reduced-motion: no-preference) { .grid a:hover img { scale: 1.03; } }
dialog { border: 0; padding: 0; background: none; max-width: 95vw; max-height: 95vh; }
dialog::backdrop { background: rgb(0 0 0 / .85); }
dialog img { max-height: 92vh; border-radius: 6px; display: block; }

/* about */
.portrait { width: 9rem; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.now { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.5rem; margin: 2rem 0; }
.now h2 { font: .8rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 .5rem; }
.now ul { margin: 0; padding-left: 1.2rem; }

/* contact */
.links { list-style: none; padding: 0; font-family: var(--mono); font-size: 1rem; }
.links li { border-top: 1px solid var(--line); padding-block: .9rem; display: flex; justify-content: space-between; gap: 1rem; }
.links span { color: var(--muted); }

footer { border-top: 1px solid var(--line); margin-top: 4rem; padding-block: 2rem; font: .8rem var(--mono); color: var(--muted); }
.more.all { border-top: 1px solid var(--line); padding-top: 2rem; }

/* contact form */
.contact { display: grid; gap: 1rem; margin-top: 3rem; }
.contact label { display: grid; gap: .35rem; font: .8rem var(--mono); color: var(--muted); }
.contact input, .contact textarea { font: 1rem var(--serif); color: var(--ink); background: var(--surface); border: 1px solid var(--edge); border-radius: 8px; padding: .65rem .8rem; }
.contact input:focus-visible, .contact textarea:focus-visible, .contact button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact button { justify-self: start; font: 600 .9rem var(--mono); color: var(--bg); background: var(--ink); border: 0; border-radius: 8px; padding: .75rem 1.25rem; cursor: pointer; }
.contact button:disabled { opacity: .6; cursor: wait; }
.contact .status { padding: 0; min-height: 1.5em; }
.hp { position: absolute; left: -9999px; }
