/* Layout: a quiet terminal. Mono for the voice, serif for reading. One cursor, one prompt line, one photo. */
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/martian-mono-latin.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/source-serif-4-latin.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/source-serif-4-italic-latin.woff2) format("woff2"); }

:root {
  --bg: #EEF1F0; --surface: #E3E8E6; --fg: #16201C; --muted: #5B6964; --rule: #CFD7D3; --accent: #A8520A;
  --photo: grayscale(.85) contrast(1.04);
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #101513; --surface: #182019; --fg: #E3E8E5; --muted: #8D9A95; --rule: #252E2A; --accent: #F0A055;
  --photo: grayscale(.85) brightness(.78) contrast(1.06); color-scheme: dark } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--serif); font-size: 18px; line-height: 1.6; }
img { max-width: 100%; }
.wrap { max-width: 960px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

header.site .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-block: 26px; }
.brand { display: inline-flex; align-items: flex-end; font-family: var(--mono); font-weight: 600; font-size: 16px; line-height: 1; color: var(--fg); text-decoration: none; }
.brand svg { height: 1.45em; width: auto; color: var(--accent); margin-right: 8px; }
nav { display: flex; gap: 22px; font-family: var(--mono); font-size: 13px; }
nav a { color: var(--muted); text-decoration: none; }
nav a[aria-current="page"] { color: var(--fg); }

/* Home */
.joke { padding-block: 56px 48px; display: grid; gap: 30px; max-width: 820px; }
.t1 { font-family: var(--mono); font-weight: 400; font-size: clamp(27px, 5vw, 50px); line-height: 1.14; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.t2 { font-size: clamp(18px, 2.3vw, 23px); line-height: 1.5; margin: 0; max-width: 44ch; }
.model { font-family: var(--mono); font-size: .86em; font-weight: 600; }
.model .nw { white-space: nowrap; }
.t3 { font-size: 17px; line-height: 1.62; margin: 0; max-width: 60ch; color: var(--muted); }
.cmd { font-family: var(--mono); font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }
.cmd .d { color: var(--accent); }
.prompt { font-family: var(--mono); font-size: 13.5px; color: var(--muted); display: grid; gap: 6px; margin-top: 6px; }
.prompt p { margin: 0; }
.prompt .q { color: var(--fg); margin-bottom: 4px; }
.prompt .sel { color: var(--accent); font-weight: 600; }
.prompt .mk { display: inline-block; width: 2ch; }
.prompt a { color: var(--fg); overflow-wrap: anywhere; }
.cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--accent); vertical-align: -.22em; margin-left: 4px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none } }

figure.photo { margin: 0; }
figure.photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 6; object-fit: cover; object-position: 60% 32%; filter: var(--photo); }
figure.photo figcaption { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 8px; }
figure.photo figcaption a { color: inherit; }

.contact-line { padding-block: 36px 12px; font-family: var(--mono); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 32px; }
.contact-line a { color: var(--fg); }

/* Articles */
.section-h { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 40px 0 8px; font-weight: 400; }
.post { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 6px 28px; padding-block: 24px; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.post .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 1.9; font-variant-numeric: tabular-nums; }
.post h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.25; margin: 0 0 8px; text-wrap: balance; }
.post p { margin: 0; color: var(--muted); font-size: 16.5px; max-width: 62ch; }
.post:hover h2 { color: var(--accent); }
.post code { font-family: var(--mono); font-size: .8em; }

/* Article */
article { max-width: 680px; padding-block: 24px 40px; }
.kicker { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.kicker a { color: inherit; }
article h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.15; margin: 10px 0 26px; text-wrap: balance; }
.body h2 { font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: -.01em; margin: 44px 0 10px; }
.body h3 { font-style: italic; font-weight: 400; font-size: 19px; margin: 26px 0 6px; }
.body ul { padding-left: 1.2em; display: grid; gap: 10px; }
.body code { font-family: var(--mono); font-size: .76em; background: var(--surface); padding: .1em .35em; }
/* Inline code never breaks inside, so "/substantial" can't leave its slash at a line end. */
.body :not(pre) > code, .post code { white-space: nowrap; }
.body a { color: var(--accent); }
.body pre { overflow-x: auto; background: var(--surface); padding: 14px 16px; font-size: 14px; }
.end { margin-top: 44px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.end a { color: var(--fg); }

footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 28px 32px; margin-top: 32px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; color: var(--muted); }
footer a { color: var(--fg); }

@media (max-width: 560px) { .post { grid-template-columns: 1fr; } }
