/* oliverkirkup.com · Editorial. Fraunces for display, Inter for text. Ink + navy, one accent. Self-hosted fonts (CSP is 'self'). */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/fraunces-normal-latin.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/fraunces-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/inter-normal-latin.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --surface: #efeadf;
  --ink: #141820;
  --text: #2b2f36;
  --muted: #5a5e66;
  --rule: #dcd5c6;
  --rule-strong: #141820;
  --accent: #1f3d73;
  --on-ink: #f6f3ec;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "SF Mono", Menlo, monospace;
  --wrap: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #11151d;
    --surface: #181d27;
    --ink: #ece8df;
    --text: #d6d2c9;
    --muted: #a3a6ad;
    --rule: rgba(236, 232, 223, 0.14);
    --rule-strong: rgba(236, 232, 223, 0.7);
    --accent: #93b3ea;
    --on-ink: #11151d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { margin: 0; background: var(--paper); color: var(--text); font: 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 500; letter-spacing: -0.02em; margin: 0; font-optical-sizing: auto; }
h1 { font-size: clamp(44px, 6.2vw, 84px); line-height: 1.02; letter-spacing: -0.028em; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
h2 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 10px; background: var(--ink); color: var(--on-ink); padding: 8px 14px; z-index: 10; text-decoration: none; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.narrow { max-width: 700px; }
.kicker { display: flex; align-items: center; gap: 14px; font: 500 12.5px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 26px; }
.kicker::before { content: ""; width: 44px; height: 1px; background: var(--rule-strong); flex: none; }
.lead { font-size: clamp(18px, 1.6vw, 20.5px); line-height: 1.62; color: var(--text); max-width: 35em; }
.muted { color: var(--muted); }
.fine { font-size: 13.5px; color: var(--muted); }

/* header & footer */
.site-head { border-bottom: 1px solid var(--rule); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 78px; flex-wrap: wrap; }
.wordmark { font: 600 22px/1 var(--serif); letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.site-head nav { display: flex; gap: 30px; flex-wrap: wrap; }
.site-head nav a { font: 500 12.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; }
.site-head nav a:hover { color: var(--ink); }
.site-head nav a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.site-foot { border-top: 1px solid var(--rule); margin-top: 24px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 84px; font-size: 14px; color: var(--muted); }
.foot-row .wordmark { font-size: 18px; }
.foot-links { display: flex; gap: 26px; }
.foot-links a { text-decoration: none; color: var(--muted); }
.foot-links a:hover { color: var(--ink); }
.term-link { font-family: var(--mono); font-weight: 700; }

/* buttons & links */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 26px; background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink); border-radius: 2px; font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.textlink { font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
.textlink:hover { color: var(--accent); }
.ctas { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; margin-top: 36px; }
.term-hint { margin: 26px 0 0; font-size: 14px; color: var(--muted); }
.term-hint a { color: var(--muted); text-decoration: none; }
.term-hint a:hover { color: var(--accent); }
.term-hint code { font: 700 13px/1 var(--mono); border: 1px solid var(--rule); padding: 3px 7px; margin-left: 4px; border-radius: 3px; color: var(--ink); }

/* portrait with offset frame */
.portrait { margin: 0; }
.frame { position: relative; isolation: isolate; }
.frame img, .frame .monogram { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.frame::after { content: ""; position: absolute; inset: 16px -16px -16px 16px; border: 1px solid var(--rule-strong); z-index: -1; }
.portrait figcaption { font: italic 500 14.5px/1.5 var(--serif); color: var(--muted); margin-top: 30px; max-width: 30em; }
.monogram { display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 500 96px/1 var(--serif); }

/* home */
.hero .portrait { width: 100%; max-width: 360px; justify-self: end; }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); gap: clamp(40px, 6vw, 88px); align-items: end; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 88px); border-bottom: 1px solid var(--rule); }
.hero h1 { margin-bottom: 30px; }
.sec { padding: clamp(56px, 7vw, 88px) 0; border-bottom: 1px solid var(--rule); }
.sec:last-child { border-bottom: 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 6vw, 80px); margin-bottom: 44px; align-items: baseline; }
.sec-head p { margin: 0; color: var(--muted); font-size: 18px; max-width: 36em; }
.sec-head .more { justify-self: start; }
.topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); }
.topic { padding: 30px 28px 6px 0; border-right: 1px solid var(--rule); }
.topic + .topic { padding-left: 28px; }
.topic:last-child { border-right: 0; padding-right: 0; }
.num { font: 500 15px/1 var(--serif); color: var(--accent); font-variant-numeric: lining-nums; }
.topic h3 { margin: 16px 0 10px; }
.topic p { color: var(--muted); font-size: 15.5px; line-height: 1.6; margin: 0; }
.feature { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; text-decoration: none; }
.feature-img img { box-shadow: 0 28px 56px -22px rgba(20, 24, 32, .45); }
.feature h2 { margin-bottom: 16px; }
.feature p:not(.kicker) { font-size: 18px; color: var(--text); max-width: 34em; }
.entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.entries li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.entries .meta { font: 500 12.5px/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }
.entries a.t { font: 500 26px/1.2 var(--serif); letter-spacing: -0.015em; color: var(--ink); text-decoration: none; }
.entries a.t:hover { color: var(--accent); }
.entries .hook { display: block; color: var(--muted); font-size: 16px; margin-top: 8px; }

/* newsletter */
.newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 80px); align-items: end; }
.newsletter p:not(.kicker):not(.fine) { color: var(--muted); font-size: 18px; margin: 14px 0 0; max-width: 32em; }
.signup { display: flex; align-items: stretch; border-bottom: 1px solid var(--rule-strong); }
.signup input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 18px/1.4 var(--sans); color: var(--ink); padding: 14px 0; }
.signup input::placeholder { color: var(--muted); }
.signup input:focus { outline: none; }
.signup:focus-within { border-bottom-color: var(--accent); }
.signup button { border: 0; background: transparent; font: 600 15px/1 var(--sans); color: var(--ink); cursor: pointer; padding: 0 0 0 18px; white-space: nowrap; }
.signup button:hover { color: var(--accent); }
.newsletter .fine { grid-column: 2; margin: 12px 0 0; }

/* page heads */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(42px, 5.4vw, 72px); }
.page-head .lead { margin: 22px 0 0; color: var(--muted); }

/* about */
.about { display: grid; grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: clamp(40px, 7vw, 96px); padding: clamp(48px, 6vw, 80px) 0; align-items: start; }
.about-side { position: sticky; top: 32px; }
.facts { margin: 52px 0 0; border-top: 1px solid var(--rule-strong); }
.facts div { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font: 500 12px/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.facts dd { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.55; }
.about-side .ctas { margin-top: 28px; }
.prose { font-size: 18px; line-height: 1.75; max-width: 36em; }
.prose > p:first-child { font: 400 clamp(24px, 2.4vw, 30px)/1.35 var(--serif); color: var(--ink); letter-spacing: -0.01em; margin-bottom: 1em; }
.about-main h2 { margin: 64px 0 24px; }
.about-prose { margin-top: 36px; }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); max-width: 40em; }
.timeline li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--rule); color: var(--text); }
.timeline .yr { font: 500 19px/1.4 var(--serif); color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }

/* resources */
.resource { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); padding: clamp(48px, 6vw, 72px) 0; border-bottom: 1px solid var(--rule); align-items: start; }
.resource .cover img { box-shadow: 0 28px 56px -22px rgba(20, 24, 32, .45); }
.resource h2 { margin-bottom: 16px; }
.resource p:not(.kicker) { font-size: 18px; max-width: 34em; }
.slides { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 14px; margin: 26px 0 8px; scroll-snap-type: x mandatory; }
.slides img { flex: none; width: 150px; border: 1px solid var(--rule); scroll-snap-align: start; }
.resource .ctas { margin-top: 18px; }

/* contact & forms */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(40px, 7vw, 96px); padding: clamp(48px, 6vw, 80px) 0; }
.contact-grid aside p { color: var(--muted); font-size: 17px; }
.contact { display: grid; gap: 26px; }
.contact label { display: grid; gap: 6px; font: 500 12px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact input, .contact select, .contact textarea { font: 400 17px/1.5 var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule-strong); border-radius: 0; padding: 10px 0; width: 100%; letter-spacing: 0; text-transform: none; }
.contact textarea { resize: vertical; min-height: 140px; }
.contact select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: none; border-bottom-color: var(--accent); }
.contact .btn { justify-self: start; margin-top: 8px; }

/* writing */
.post { padding: clamp(48px, 6vw, 80px) 0; }
.post h1 { font-size: clamp(38px, 4.6vw, 60px); margin: 0 0 32px; }
.post .prose ol, .post .prose ul { padding-left: 22px; }
.post .prose > p:first-child { font: inherit; color: inherit; letter-spacing: 0; }
.post-img { margin: 12px 0 28px; border: 1px solid var(--rule); }
.post .slides img { width: 220px; }
.back { display: inline-block; margin-top: 36px; font-weight: 600; font-size: 15px; text-decoration: none; }

/* centered messages */
.message { text-align: center; padding: clamp(80px, 12vw, 160px) 0; }
.message h1 { margin-bottom: 18px; }
.message .lead { margin: 0 auto; color: var(--muted); }
.message .ctas { justify-content: center; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero .portrait { max-width: 260px; justify-self: start; }
  .sec-head { grid-template-columns: 1fr; gap: 12px; }
  .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic:nth-child(2) { border-right: 0; }
  .topic:nth-child(3) { padding-left: 0; }
  .topic:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .about, .contact-grid { grid-template-columns: 1fr; }
  .about-side { position: static; display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .about-side .facts { margin-top: 0; }
  .about-side .ctas, .about-side .term-hint { grid-column: 1 / -1; }
  .newsletter { grid-template-columns: 1fr; }
  .newsletter .fine { grid-column: auto; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { width: min(var(--wrap), 100% - 32px); }
  .head-row { min-height: 64px; gap: 10px; padding: 10px 0; }
  .site-head nav { gap: 20px; }
  .topics { grid-template-columns: 1fr; }
  .topic, .topic + .topic { padding: 22px 0 18px; border-right: 0; }
  .topic + .topic { border-top: 1px solid var(--rule); }
  .feature, .resource { grid-template-columns: 1fr; }
  .feature-img, .resource .cover { max-width: 240px; }
  .entries li { grid-template-columns: 1fr; gap: 6px; }
  .about-side { grid-template-columns: 1fr; }
  .about-side .portrait { max-width: 280px; }
  .facts div { grid-template-columns: 132px minmax(0, 1fr); gap: 12px; }
  .timeline li { grid-template-columns: 64px minmax(0, 1fr); }
  .ctas { gap: 22px; }
  .frame::after { inset: 10px -10px -10px 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
