/* eliasburlison.com: one stylesheet for every page.
   External on purpose: the live site's CSP is style-src 'self' (no inline <style>). */

/* ---------- Font: Inter, self-hosted (SIL Open Font License) ---------- */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

/* ---------- Theme tokens (Graphite): dark is the default ---------- */
:root {
  color-scheme: dark;
  --bg: #0f0f0e; --ink: #ededea; --muted: #a9a9a4; --faint: #8d8d88;
  --line: #2b2b29; --line-soft: rgba(43, 43, 41, .55); --uline: #474744;
  --accent: #ffffff; --cu: #e5925a; --glow: rgba(255, 255, 255, .05); --bar: #171716; --field: #61615e;  /* form outlines: 3:1 against --bg */
  /* Type: Inter for everything, on one scale. Every piece of text uses one of these sizes.
       hero   the name on the home page          h1    page and essay titles
       h2     headings inside essays             sub   subtitle under an essay title
       h3     entry titles (roles, essays in lists)   lead  intro lines and essay body
       body   forms and plain text               small descriptions, places, list subtitles
       xs     nested subtitles, citations        fine  disclaimers and form notes
       label  small uppercase labels, dates, nav (always 11px, tracked) */
  --display: "Inter", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --text: var(--display);
  --label: var(--display);
  --t-hero: clamp(2.1rem, 8vw, 3.4rem);
  --t-h1: clamp(1.9rem, 6vw, 2.75rem);
  --t-h2: clamp(1.25rem, 3.4vw, 1.5rem);
  --t-sub: clamp(1.05rem, 3vw, 1.25rem);
  --t-h3: 1.125rem;
  --t-lead: 1.0625rem;
  --t-body: 1rem;
  --t-small: .9375rem;
  --t-xs: .875rem;
  --t-fine: .8125rem;
  --t-label: 11px;
  --dw: 600;          /* weight for the name, titles and headings */
  --label-track: .1em;
  --col: 43rem; --pad: clamp(20px, 6vw, 40px);
  --rail: 30px; --datecol: 6.4rem; --gap: 16px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf7; --ink: #121211; --muted: #545450; --faint: #63635f;
  --line: #e1e1dc; --line-soft: rgba(225, 225, 220, .8); --uline: #a3a39e;
  --accent: #000000; --cu: #b0531c; --glow: rgba(176, 83, 28, .05); --bar: #f1f1ec; --field: #8f8f8c;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    color-scheme: light;
    --bg: #fafaf7; --ink: #121211; --muted: #545450; --faint: #63635f;
    --line: #e1e1dc; --line-soft: rgba(225, 225, 220, .8); --uline: #a3a39e;
    --accent: #000000; --cu: #b0531c; --glow: rgba(176, 83, 28, .05); --bar: #f1f1ec; --field: #8f8f8c;
  }
}

/* ---------- Base ---------- */
html { scroll-padding-top: 76px; background-color: var(--bg); }
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(60rem 30rem at 78% -12%, var(--glow), transparent 62%);
  color: var(--ink); font-family: var(--text); line-height: 1.6;
  -webkit-font-smoothing: antialiased; transition: background-color .25s, color .25s;
}
a { color: inherit; }
.d, .sd, .pub .k, .meta, .witem .d { font-variant-numeric: tabular-nums; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* Skip link: hidden until focused with the keyboard */
.skip { position: absolute; z-index: 40; left: 12px; top: -48px; padding: 8px 14px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: var(--t-xs); text-decoration: none; }
.skip:focus { top: 12px; }
a.inline { text-decoration: underline; text-decoration-color: var(--uline); text-underline-offset: 3px; }
a.inline:hover { color: var(--accent); text-decoration-color: var(--accent); }


/* ---------- Top bar: Work / Writing on the left, theme on the right ---------- */
/* Solid and exactly the page color, so iOS fills the strip behind the Dynamic Island and the
   pull-down area above the bar with the same color (both come from --bg via the html background
   and the theme-color meta, which theme.js keeps in step with the switch). */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); transition: background-color .25s; }
.top-in { max-width: var(--col); margin: 0 auto; padding: 14px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.primary { display: flex; align-items: center; gap: 22px; }
.nl { padding: 6px 0 5px; font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); text-decoration: none; border-bottom: 1.5px solid transparent; transition: color .15s, border-color .15s; }
.nl:hover { color: var(--ink); }
.nl[aria-current] { color: var(--ink); border-bottom-color: var(--cu); }
.theme { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.theme button { display: inline-flex; align-items: center; color: var(--faint); background: none; border: 0; border-radius: 999px; padding: 5px 8px; cursor: pointer; }
.theme button:hover { color: var(--ink); }
.theme button[aria-checked="true"] { background: var(--line); color: var(--ink); }
.theme svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

main { max-width: var(--col); margin: 0 auto; padding: clamp(32px, 7vw, 72px) var(--pad) 0; }

/* Reading progress (essays): a thin rail down the left edge of the window */
.progress { position: fixed; z-index: 25; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-soft); pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--cu); transform: scaleY(0); transform-origin: top; will-change: transform; }

/* ---------- Home ---------- */
.name { font: var(--dw) var(--t-hero)/1.06 var(--display); letter-spacing: -.03em; }
.headline { margin-top: 1rem; color: var(--muted); font-size: var(--t-lead); text-wrap: balance; }
.headline .sep { color: var(--cu); padding: 0 .35em; }
.lh { margin-top: 3.2rem; padding-bottom: 12px; border-bottom: 1px solid var(--line); font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); }

ol.work { list-style: none; }
.pos { position: relative; padding: 26px 0 24px var(--rail); border-bottom: 1px solid var(--line-soft); }
.pos:last-child { border-bottom: 0; }
.pos::before { content: ""; position: absolute; z-index: 1; left: 0; top: 33px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--cu); }
.pos.now::before { background: var(--cu); }
.pos::after { content: ""; position: absolute; left: 5.5px; top: 39px; bottom: -33px; width: 1px; background: var(--cu); opacity: .5; }
.pos:last-child::after { bottom: 0; background: linear-gradient(var(--cu), transparent); }
.head { display: grid; grid-template-columns: var(--datecol) 1fr; column-gap: var(--gap); align-items: baseline; }
.d { font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.d span { display: block; }
.role { font: var(--dw) var(--t-h3)/1.35 var(--display); }
.org { color: var(--muted); font-size: var(--t-small); }
.org .loc { color: var(--faint); }
.dot-sep { padding: 0 .45em; color: var(--faint); }
.desc { grid-column: 2; margin-top: 8px; color: var(--muted); font-size: var(--t-small); text-wrap: pretty; max-width: 33rem; }
.indent { margin-left: calc(var(--datecol) + var(--gap)); }

/* Rotation stops inside one position */
ol.stops { list-style: none; margin-top: 18px; }
.stop { position: relative; padding: 0 0 20px 20px; }
.stop::before { content: ""; position: absolute; left: 0; top: 7px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--cu); background: var(--bg); z-index: 1; }
.stop.here::before { background: var(--cu); }
.stop::after { content: ""; position: absolute; left: 4px; top: 16px; bottom: -7px; width: 1px; background: repeating-linear-gradient(var(--cu) 0 3px, transparent 3px 7px); opacity: .7; }
.stop:last-child { padding-bottom: 0; }
.stop:last-child::after { display: none; }
.stop.next::before { border-style: dashed; }
.sh { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0; }
.sl { font: var(--dw) var(--t-h3)/1.35 var(--display); }
.sn { color: var(--muted); font-size: var(--t-small); }
.sd { margin-left: auto; padding-left: 12px; font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); }
.sp { margin-top: 1px; color: var(--muted); font-size: var(--t-small); }
.pos.next::before { border-style: dashed; }

.sdesc { margin-top: 4px; color: var(--muted); font-size: var(--t-small); text-wrap: pretty; max-width: 31rem; }

/* What was published along the way */
.along { margin-top: 18px; font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); }
ul.pubs { list-style: none; margin-top: 8px; padding-left: 0; border-left: 0; }
.pub { padding: 6px 0 8px; }
.pub .k { display: block; font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); }
.pub .k b { font-weight: 400; color: var(--cu); }
.pub .ti { font: 500 var(--t-body)/1.4 var(--display); color: var(--ink); text-wrap: balance; }
.pub a.ti { text-decoration: none; }
.pub a.ti .tt { text-decoration: underline; text-decoration-color: var(--uline); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pub a.ti:hover .tt { color: var(--accent); text-decoration-color: var(--accent); }
.tsub { display: block; font: 400 var(--t-xs)/1.4 var(--display); letter-spacing: 0; color: var(--muted); }
.pub .sub { display: block; font: 400 var(--t-xs)/1.4 var(--display); color: var(--muted); text-wrap: pretty; }
.pub.soon .ti { color: var(--ink); }

/* ---------- Writing index ---------- */
.kicker { font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); }
.ptitle { margin-top: .6rem; font: var(--dw) var(--t-h1)/1.1 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.pdeck { margin-top: .9rem; color: var(--muted); font-size: var(--t-lead); max-width: 34rem; text-wrap: pretty; }
ol.wlist { list-style: none; margin-top: 2rem; border-top: 1px solid var(--line); }
.witem { display: grid; grid-template-columns: var(--datecol) 1fr; column-gap: var(--gap); align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.witem:last-child { border-bottom: 0; }
.witem .d .rt { display: block; color: var(--faint); }
.witem.soon .d { color: var(--cu); }
.witem.soon .wt { color: var(--muted); }
.witem .wt { font: var(--dw) var(--t-h3)/1.35 var(--display); text-decoration: none; text-wrap: balance; }
.witem a.wt:hover { color: var(--accent); }
.witem .tsub { margin-top: 2px; font-size: var(--t-small); }
.witem p { margin-top: 8px; color: var(--muted); font-size: var(--t-small); text-wrap: pretty; }

/* ---------- Essay page ---------- */
.meta { font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); }
.meta .sep { color: var(--cu); padding: 0 .5em; }
.atitle { margin-top: .8rem; font: var(--dw) var(--t-h1)/1.1 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.atitle .tsub { margin-top: .45rem; font-size: var(--t-sub); line-height: 1.35; }
.deck { margin-top: 1.1rem; color: var(--muted); font-size: var(--t-lead); max-width: 36rem; text-wrap: pretty; }
.prose { margin-top: clamp(1.6rem, 4vw, 2.2rem); padding-top: clamp(1.4rem, 3.5vw, 2rem); border-top: 1px solid var(--line); font-size: var(--t-lead); }
.prose p { margin: 0 0 1.15rem; line-height: 1.75; text-wrap: pretty; }
.prose h2 { margin: 2.6rem 0 .8rem; font: var(--dw) var(--t-h2)/1.25 var(--display); letter-spacing: -.015em; }
.prose h3 { margin: 2rem 0 .6rem; font: var(--dw) var(--t-h3)/1.35 var(--display); }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.2rem; }
.prose li { margin: .4rem 0; line-height: 1.65; }
.prose li::marker { color: var(--cu); }
.prose strong { font-weight: 600; }
.prose em { color: var(--muted); }
.prose blockquote { margin: 1.6rem 0; padding-left: 1.1rem; border-left: 2px solid var(--cu); color: var(--muted); }
.prose hr { margin: 2.25rem 0; border: 0; border-top: 1px solid var(--line); }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--uline); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; }
.prose table { width: 100%; margin: 0 0 1.4rem; border-collapse: collapse; font-size: var(--t-small); }
.prose th, .prose td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.sources { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--t-xs); }
.sources h2 { margin-bottom: .85rem; font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); }
.sources ol { padding-left: 1.2rem; }
.sources li { margin: .45rem 0; overflow-wrap: anywhere; }
.sources li::marker { color: var(--faint); }
.sources a { color: var(--muted); }
.more { margin-top: 3rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; }
.more a { color: var(--muted); text-decoration: none; }
.more a:hover { color: var(--ink); }
.more .nx { color: var(--faint); opacity: .75; }


/* ---------- Share row (end of essays) ---------- */
.nw { white-space: nowrap; }
.meta-li { color: var(--faint); text-decoration: none; border-bottom: 1px solid var(--uline); white-space: nowrap; }
.meta-li:hover { color: var(--ink); border-color: var(--ink); }
.share { margin-top: 1.3rem; }
.sh-end { margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.sh-k { margin-right: 6px; font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); }
.sh-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.sh-i { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; transition: color .15s, background-color .15s; }
.sh-i[hidden] { display: none; }
.sh-i:hover, .sh-i:focus-visible { color: var(--ink); background: var(--bar); }
.sh-i svg { width: 17px; height: 17px; }
.ic-fill { fill: currentColor; }
.ic-line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sh-copy .ic-check { display: none; }
.sh-copy.done { color: var(--cu); }
.sh-copy.done .ic-link { display: none; }
.sh-copy.done .ic-check { display: block; }
.sh-li { font-size: var(--t-xs); color: var(--muted); text-decoration: underline; text-decoration-color: var(--uline); text-underline-offset: 3px; }
.sh-li:hover { color: var(--ink); text-decoration-color: var(--ink); }
.sh-end + .more, article + .more { margin-top: 1.6rem; }

/* ---------- Newsletter signup (footer, end of essays, /newsletter/) ---------- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Flat like the rest of the site: a hairline rule, a small label, and one rounded field that holds
   the input and the button, the same shape as the theme switch and the share icons. */
/* The signup is a band between two hairlines (the one under its label and the next section's),
   with the same space above and below its content: --band. */
.signup { --band: 1.75rem; margin: 0 0 var(--band); }
main > .signup:last-child { margin-bottom: 0; }
main:has(> .signup:last-child) + .foot { padding-top: 1.75rem; }
/* Same section-label pattern as "Work": label, then the rule under it, then the content. */
.su-h { padding-bottom: 12px; border-bottom: 1px solid var(--line); font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); }
.su-p { margin-top: var(--band); font-size: var(--t-body); color: var(--ink); text-wrap: pretty; }
.su-form { margin-top: var(--band); max-width: 28rem; }
.su-p + .su-form { margin-top: .75rem; }
.su-field { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--field); border-radius: 999px; transition: border-color .15s, box-shadow .15s; }
.su-field:hover { border-color: var(--faint); }
.su-field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.su-in { flex: 1 1 auto; min-width: 0; font: var(--t-body) var(--text); color: var(--ink); background: none; border: 0; border-radius: 999px; padding: .5rem .85rem; }
.su-in::placeholder { color: var(--faint); }
.su-in:focus { outline: none; }
.su-btn { flex: 0 0 auto; font: 600 var(--t-small)/1.2 var(--text); color: var(--bg); background: var(--ink); border: 0; border-radius: 999px; padding: .62rem 1.1rem; cursor: pointer; transition: background-color .15s, color .15s; }
.su-btn:hover { background: color-mix(in srgb, var(--ink) 78%, var(--bg)); }
.su-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.su-fine { margin-top: .6rem; font-size: var(--t-fine); color: var(--faint); text-wrap: pretty; }
.signup-essay { margin-top: 2.6rem; margin-bottom: 0; }
.signup-page, .signup-expired, .signup-error { margin-top: 2rem; }
.su-confirm { margin-top: 1.6rem; }
.dev-box { margin-top: 1.6rem; padding: 1rem 1.2rem; border: 1px dashed var(--cu); border-radius: 12px; font-size: var(--t-xs); color: var(--muted); }
.dev-box b { color: var(--cu); font-weight: 600; }
.dev-box a { color: var(--ink); word-break: break-all; }
.dev-box p + p { margin-top: .8rem; }
.dev-box a.su-btn { display: inline-block; color: var(--bg); text-decoration: none; word-break: normal; }
.dev-box a.su-btn:hover { color: var(--bg); }
.dev-box details { margin-top: .9rem; }
.dev-box summary { cursor: pointer; color: var(--ink); }
.dev-box pre { margin-top: .6rem; white-space: pre-wrap; overflow-wrap: anywhere; font: var(--t-xs)/1.5 var(--text); color: var(--ink); }

/* ---------- Footer (every page) ---------- */
.foot { max-width: var(--col); margin: 0 auto; padding: 3.2rem var(--pad) 64px; }
dl.contact { padding-top: 1.6rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.5rem; align-items: baseline; }
dl.contact dt { font: 400 var(--t-label)/1.5 var(--label); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--faint); }
dl.contact dd { font-size: var(--t-small); overflow-wrap: anywhere; }
dl.contact a { text-decoration: none; border-bottom: 1px solid var(--uline); padding-bottom: 1px; }
dl.contact a:hover { color: var(--accent); border-color: var(--accent); }
.fine { margin-top: 1.6rem; font-size: var(--t-fine); color: var(--faint); text-wrap: pretty; }

/* ---------- Phone ---------- */
@media (max-width: 600px) {
  :root { --datecol: 0px; --gap: 0px; }
  .primary { gap: 16px; }
  .theme button { padding: 10px 12px; }
  .theme svg { width: 15px; height: 15px; }
  .head, .witem { grid-template-columns: 1fr; }
  .d { margin-bottom: 2px; }
  .witem .d .rt { display: inline; }
  .witem .d .rt::before { content: " · "; }
  .d span { display: inline; }
  .desc { grid-column: 1; }
  .pos::before { top: 30px; }
  .pos::after { top: 36px; bottom: -30px; }
  .sd { margin-left: 0; padding-left: 0; flex-basis: 100%; }
  .sn { flex-basis: 100%; }
  .sn .dot-sep { display: none; }
  .sh-i { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { body, .top { transition: none; } }
