/* william-armstrong.com
   One reading column, one accent (Merrimack river green), one bold element:
   the home page's cross-section of the stack under a website.
   Type: Atkinson Hyperlegible Next and Mono (OFL), self-hosted. */

@font-face {
  font-family: "Atkinson Next";
  src: url("/fonts/atkinson-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("/fonts/atkinson-next-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Mono";
  src: url("/fonts/atkinson-mono-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --paper: #F3F5F2;
  --ink: #15202B;
  --graphite: #55606C;
  --rule: #D5DAD4;
  --river: #1D5C50;
  --river-deep: #143F37;
  --wash: #E4ECE8;
  --layer-server: #C9DCD5;
  --layer-dns: #6E9C90;
  --layer-dns-ink: #15202B;
  --measure: 40rem;
  --wide: 62rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10161C;
    --ink: #E6ECE8;
    --graphite: #9CA7B1;
    --rule: #28323C;
    --river: #6CC0AC;
    --river-deep: #8FD3C2;
    --wash: #16252A;
    --layer-server: #1F3A35;
    --layer-dns: #2F6658;
    --layer-dns-ink: #E6ECE8;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Next", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
@media (min-width: 48rem) { body { font-size: 1.1875rem; } }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--river); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--river-deep); text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--river); outline-offset: 3px; border-radius: 2px; }
p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.012em; }
h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.5rem); font-weight: 800; max-width: 20ch; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.9rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }

.skip {
  position: absolute; left: 1rem; top: -5rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 0.5rem 0.9rem; border-radius: 4px;
}
.skip:focus { top: 1rem; }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.head-row {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.25rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand { color: var(--ink); font-weight: 800; letter-spacing: -0.01em; text-decoration: none; padding: 0.35rem 0; }
.site-head ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.site-head nav a { display: inline-block; padding: 0.45rem 0; color: var(--ink); text-decoration: none; }
.site-head nav a:hover { color: var(--river); }
.site-head nav a[aria-current="page"] {
  text-decoration: underline; text-decoration-color: var(--river);
  text-decoration-thickness: 0.14em; text-underline-offset: 0.4em;
}
.site-head nav a.nav-cta { color: var(--river); font-weight: 700; }

/* Page flow */
main { padding-bottom: 4rem; }
main:focus { outline: none; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 1.5rem 0 0; font-size: 0.9rem; color: var(--graphite); }
.crumbs li + li::before { content: "/" / ""; margin-right: 0.4rem; }
.crumbs a { color: var(--graphite); }
.flow > * { max-width: var(--measure); }
.flow > * + * { margin-top: 1.25rem; }
.flow > h2 { margin-top: 3rem; }
.flow > h3 { margin-top: 2rem; }
.flow > .features, .flow > .steps, .flow > .stats, .flow > .work-list,
.flow > .sources, .flow > .timeline { margin-top: 3rem; }
.flow > .facts { margin-top: 2rem; }
.flow > .hero, .flow > .shot, .flow > .split, .flow > .features,
.flow > .stats, .flow > .work-list, .flow > .cta, .flow > .shell { max-width: var(--wide); }
.eyebrow { color: var(--graphite); font-size: 0.95rem; font-weight: 600; margin-bottom: 0.6rem; }
.lede { font-size: 1.2em; max-width: 36rem; margin-top: 1rem; }

/* Hero, and the home page's stack */
.hero { padding: 2.5rem 0 0.5rem; }
.hero .button { margin-top: 1.5rem; }
.hero-home { display: grid; gap: 2.5rem; align-items: center; padding-top: 3.5rem; }
@media (min-width: 60rem) { .hero-home { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.stack { margin: 0; display: grid; gap: 0.4rem; font-weight: 700; }
.layer { border-radius: 6px; padding: 0.85rem 1.1rem; }
.layer-site { border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.layer-server { background: var(--layer-server); color: var(--ink); margin-left: 0.75rem; }
.layer-dns { background: var(--layer-dns); color: var(--layer-dns-ink); margin-left: 1.5rem; }
.layer-mail { background: var(--river); color: var(--paper); margin-left: 2.25rem; }

.button {
  display: inline-block; padding: 0.7rem 1.2rem; border-radius: 6px;
  background: var(--river); color: var(--paper); font-weight: 700; text-decoration: none;
}
.button:hover { background: var(--river-deep); color: var(--paper); }

/* Selected work */
.work-list ul { list-style: none; padding: 0; margin-top: 1.25rem; display: grid; gap: 0.9rem; }
@media (min-width: 40rem) { .work-list ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.work-list a {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.15rem 1rem; align-items: center;
  padding: 0.75rem; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink); text-decoration: none;
}
.work-list a:hover { border-color: var(--river); }
.work-list img { grid-row: span 2; width: 6.5rem; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; }
.wl-title { font-weight: 700; line-height: 1.3; }
.wl-tag { color: var(--graphite); font-size: 0.9rem; }

/* Features */
.features ul { list-style: none; padding: 0; margin-top: 1.25rem; display: grid; gap: 1.6rem; }
@media (min-width: 48rem) { .features ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.features .icon { width: 1.6rem; height: 1.6rem; color: var(--river); margin-bottom: 0.5rem; }
.features h3 { margin-bottom: 0.35rem; }
.features p { color: var(--graphite); }

/* Numbers */
.stats > p { margin-top: 0.75rem; color: var(--graphite); max-width: var(--measure); }
.stats dl { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
@media (min-width: 40rem) { .stats dl { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stats dl > div { display: flex; flex-direction: column; }
/* Read in order label, number, note; shown number first. */
.stats .num { order: -1; font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--river); }
.stats dt { font-weight: 700; margin-top: 0.45rem; }
.stats .hint { color: var(--graphite); font-size: 0.9rem; margin-top: 0.2rem; }

/* Key facts and definitions */
.facts h2 { margin-bottom: 1rem; }
.facts dl { border-top: 1px solid var(--rule); }
.facts dl > div { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--graphite); }
.defs dt { font-weight: 700; margin-top: 1rem; }
.defs dd { margin-top: 0.25rem; color: var(--graphite); }

/* Steps, quotes, notes */
.steps ol { padding-left: 1.4rem; margin-top: 1rem; }
.steps li { margin-top: 0.8rem; padding-left: 0.3rem; }
.steps li::marker { color: var(--river); font-weight: 800; }
.steps li span { color: var(--graphite); }
.pull { padding: 0.2rem 0 0.2rem 1.25rem; border-left: 4px solid var(--river); font-size: 1.25em; line-height: 1.45; }
.flow > .pull { margin-top: 2rem; margin-bottom: 0.75rem; }
.note { background: var(--wash); border-radius: 6px; padding: 1rem 1.2rem; }

/* Pictures */
.shot img, .split img { border: 1px solid var(--rule); border-radius: 6px; width: 100%; }
.flow > .shot { margin-top: 2rem; }

/* Terminal output, dark in both themes */
.shell { background: #13202A; color: #E3EAE6; border-radius: 8px; overflow: hidden; }
.flow > .shell { margin-top: 2rem; }
.shell figcaption { padding: 0.6rem 1rem; font-size: 0.9rem; color: #AAB7B1; border-bottom: 1px solid #2A3A44; }
.shell pre { margin: 0; padding: 1rem; overflow-x: auto; font-family: "Atkinson Mono", ui-monospace, monospace; font-size: 0.88rem; line-height: 1.55; }
.ln-comment { color: #9DB0A8; }
.ln-output { color: #C8D3CE; }
.prompt { color: #6CC0AC; }

/* Image beside text */
.split { display: grid; gap: 1.75rem; align-items: start; }
.flow > .split { margin-top: 3rem; }
@media (min-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .split-right > figure { order: 2; }
}
.split .portrait { max-width: 22rem; }
.split h2 { margin-bottom: 0.9rem; }
.split > div > * + * { margin-top: 1rem; }
.split ul { padding-left: 1.2rem; }
.split li + li { margin-top: 0.35rem; }

/* Projects index */
.case { padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.flow > .case { margin-top: 2rem; }
.case h2 { font-size: 1.35rem; }
.case h2 a { color: var(--ink); text-decoration-color: var(--river); }
.case p { margin-top: 0.6rem; }
.metrics { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: 0.9rem; }
.metrics div { display: flex; flex-direction: column-reverse; }
.metrics dt { color: var(--graphite); font-size: 0.88rem; }
.metrics dd { font-weight: 800; font-size: 1.15rem; color: var(--river); }

/* Sources, timeline, contact */
.sources ul { padding-left: 1.2rem; margin-top: 1rem; }
.sources li + li { margin-top: 0.5rem; }
.by { color: var(--graphite); }
.timeline ol { list-style: none; padding: 0; margin-top: 1rem; }
.timeline li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--rule); }
.when { color: var(--graphite); font-weight: 700; }
.timeline p { margin-top: 0.3rem; color: var(--graphite); }
@media (max-width: 30rem) { .timeline li { grid-template-columns: 1fr; gap: 0.2rem; } }
.contact { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.flow > .contact { margin-top: 1.75rem; }
.contact li { display: flex; align-items: center; gap: 0.6rem; font-size: 1.15em; }
.contact .icon { width: 1.4rem; height: 1.4rem; color: var(--river); flex: none; }

/* Closing call to action */
.cta { padding: 2rem; border-radius: 10px; background: var(--wash); }
.flow > .cta { margin-top: 4rem; }
.cta h2 { max-width: 24ch; }
.cta > p { margin-top: 0.75rem; max-width: 36rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 2.5rem 0 3rem; font-size: 0.95rem; }
.foot-grid { display: grid; gap: 1.5rem; }
@media (min-width: 40rem) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 14rem)) 1fr; align-items: start; } .foot-note { align-self: end; } }
.site-foot h2 { font-size: 0.95rem; font-weight: 700; color: var(--graphite); }
.site-foot ul { list-style: none; padding: 0; margin-top: 0.6rem; }
.site-foot li + li { margin-top: 0.3rem; }
.site-foot a { color: var(--ink); }
.foot-note { color: var(--graphite); }
