/* 14kx · v3 */

/* Fonts, self-hosted (SIL Open Font License, see /fonts) */
@font-face {
  font-family: 'STIX Two Text';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/fonts/stix-two-text-latin-wght-normal.woff2) format('woff2-variations'), url(/fonts/stix-two-text-latin-wght-normal.woff2) format('woff2');
  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: 'STIX Two Text';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/fonts/stix-two-text-latin-ext-wght-normal.woff2) format('woff2-variations'), url(/fonts/stix-two-text-latin-ext-wght-normal.woff2) format('woff2');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'STIX Two Text';
  font-style: italic;
  font-display: swap;
  font-weight: 400 700;
  src: url(/fonts/stix-two-text-latin-wght-italic.woff2) format('woff2-variations'), url(/fonts/stix-two-text-latin-wght-italic.woff2) format('woff2');
  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: 'STIX Two Text';
  font-style: italic;
  font-display: swap;
  font-weight: 400 700;
  src: url(/fonts/stix-two-text-latin-ext-wght-italic.woff2) format('woff2-variations'), url(/fonts/stix-two-text-latin-ext-wght-italic.woff2) format('woff2');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-standard-normal.woff2) format('woff2-variations'), url(/fonts/archivo-latin-standard-normal.woff2) format('woff2');
  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: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-ext-standard-normal.woff2) format('woff2-variations'), url(/fonts/archivo-latin-ext-standard-normal.woff2) format('woff2');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations'), url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2');
  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: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2-variations'), url(/fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #FFFFFF;
  --ink: #000000;
  --body: #1A1A1A;
  --dim: #333333;
  --grey: #555555;
  --hair: #E2E2E2;
  --term: #F4F4F2;
  --term-hair: #D6D6D2;
  --accent: #FF4F00;
  --accent-ink: #B33700;
  --serif: 'STIX Two Text', 'Times New Roman', Georgia, serif;
  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(20px, 4vw, 56px);
  --gap: clamp(64px, 8vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--ink); }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.muted { color: var(--grey); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px 32px; padding: 20px 0;
}
.logo {
  display: inline-flex; align-items: flex-end; gap: 2px; min-height: 44px;
  font-family: var(--sans); font-weight: 900; font-stretch: 125%; line-height: 1;
}
.logo:hover { color: inherit; }
.logo-14 { font-size: 34px; letter-spacing: -0.04em; }
.logo-kx { font-size: 12px; padding-bottom: 5px; }
.nav { display: flex; flex-wrap: wrap; gap: 0 32px; font-size: 18px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Hero */
.hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 24px 64px; padding-top: clamp(40px, 5vw, 72px);
}
.hero h1 {
  margin: 0; max-width: 18ch; text-wrap: balance;
  font-size: clamp(42px, 5.4vw, 80px); font-weight: 600; line-height: 1.02; letter-spacing: -0.02em;
}
.lede { margin: 0; max-width: 40ch; font-size: 21px; }
/* The full stop as a square, like the favicon. The text stays a real "." for copy and screen readers. */
.sq { display: inline-block; width: 0.15em; height: 0.15em; margin-left: 0.04em; overflow: hidden; color: transparent; background: var(--accent); }
.sq-ink { background: var(--ink); }

/* Command line */
.term {
  position: relative;
  margin-top: clamp(40px, 5vw, 64px); border: 2px solid var(--ink); background: var(--term);
  font-family: var(--mono); font-size: 15px; line-height: 1.55;
}
.term-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 8px 18px; border-bottom: 1px solid var(--ink); background: var(--paper); font-size: 13px;
}
.term-dots { display: inline-flex; gap: 8px; }
.term-dots span { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink); }
.term-dots span:last-child { border-color: var(--accent); background: var(--accent); }
.term-hint { color: var(--grey); }
.term-probe { position: absolute; top: 0; left: 0; visibility: hidden; white-space: pre; pointer-events: none; }
.term-out { position: relative; height: 440px; overflow: auto; padding: 14px 18px 8px; overscroll-behavior: contain; }
.term-out:focus-visible { outline-offset: -4px; }
.ln { min-height: 1.55em; white-space: pre; color: var(--dim); }
.ln-cmd { color: var(--ink); font-weight: 700; }
.ln-axis { color: var(--ink); font-weight: 700; white-space: pre !important; }
.ln a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.ln a:hover { color: var(--ink); }
.term-out.is-narrow .ln { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-form {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px 14px; border-top: 1px solid var(--term-hair);
}
.term-form label { flex: none; color: var(--accent-ink); font-weight: 700; }
.term-form input {
  flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 0 6px; border: none; border-radius: 0;
  background: transparent; color: var(--ink); font: inherit; caret-color: var(--accent-ink);
}
.term-form input::placeholder { color: #8A8A86; }
.term-form input:focus-visible { outline: none; }
.term-form:focus-within { box-shadow: inset 0 2px 0 var(--accent); }
.term, .btn, .pf-cmd { font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; }

/* Buttons: command chips and filters */
.chips, .filter { display: flex; flex-wrap: wrap; gap: 8px; }
.chips { margin-top: 14px; }
.btn {
  min-height: 44px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 14px; line-height: 1; cursor: pointer;
}
.filter .btn { padding: 0 16px; }
.btn:hover { background: var(--term); }
.btn-ink, .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.btn-ink:hover, .btn[aria-pressed="true"]:hover { background: #262626; }
.no-js .term-form, .no-js .chips, .no-js .filter, .no-js .pf-cmd { display: none; }

/* Sections */
.section { margin-top: var(--gap); }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px;
}
.section-title { margin: 0; font-size: 40px; font-weight: 600; line-height: 1.1; }

/* Portfolio */
.pf-cmd { margin: 16px 0 0; font-family: var(--mono); font-size: 14px; color: var(--grey); }
.pf-cmd .prompt { color: var(--accent-ink); font-weight: 700; }
.pf-count { margin-left: 14px; }
.pf {
  width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 18px;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.pf th { padding: 10px 12px; text-align: left; font-weight: 600; border-bottom: 1px solid var(--ink); }
.pf td { padding: 9px 12px; vertical-align: baseline; }
.pf th:first-child, .pf td:first-child { padding-left: 0; }
.pf th:last-child, .pf td:last-child { padding-right: 0; text-align: right; }
.pf td a { font-weight: 600; }
.pf .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  .pf, .pf tbody { display: block; }
  .pf thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .pf tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
  .pf tr:last-child { border-bottom: 0; }
  .pf td { padding: 0; }
  .pf td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--dim); font-size: 17px; text-align: left; }
}

/* Notes, cited */
.cites { margin: 20px 0 0; padding-left: 1.6em; max-width: 72ch; }
.cites li { margin-bottom: 14px; padding-left: 6px; }
.cites li:last-child { margin-bottom: 0; }
.cites a, .mail, .ul {
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.cites a { font-style: italic; }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px 40px; margin-top: var(--gap); padding: 20px 0 40px;
  border-top: 2px solid var(--ink); font-size: 17px;
}
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* Notes index (/thoughts) */
.thoughts-page { padding-top: clamp(40px, 5vw, 72px); }
.thoughts-title {
  margin: 0; font-size: clamp(44px, 6vw, 92px); font-weight: 600; line-height: 1; letter-spacing: -0.02em;
}
.thoughts-list { margin-top: clamp(28px, 4vw, 48px); border-top: 2px solid var(--ink); }
.thought-item { display: block; padding: 24px 0 26px; border-bottom: 1px solid var(--hair); }
.thought-item:hover { color: inherit; }
.thought-item:hover .thought-title { color: var(--accent-ink); }
.thought-date { font-size: 17px; font-style: italic; color: var(--grey); }
.thought-title {
  margin: 6px 0 8px; max-width: 30ch;
  font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em;
}
.thought-excerpt { margin: 0; max-width: 66ch; color: var(--dim); }

/* Article */
.article-page { padding-top: clamp(20px, 3vw, 40px); }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; font-style: italic; color: var(--grey); }
.article-date { margin-top: clamp(16px, 2vw, 28px); font-size: 17px; font-style: italic; color: var(--grey); }
.article-title {
  margin: 12px 0 0; max-width: 20ch;
  font-size: clamp(40px, 5vw, 72px); font-weight: 600; line-height: 1.05; letter-spacing: -0.015em;
}
.article-content { max-width: 66ch; margin-top: clamp(28px, 3vw, 40px); font-size: 19px; line-height: 1.6; color: var(--body); }
.article-content h2 { margin: 48px 0 14px; color: var(--ink); font-size: 30px; font-weight: 600; line-height: 1.2; }
.article-content p { margin: 0 0 22px; }
.article-content strong { color: var(--ink); font-weight: 600; }
.article-content a:not(.tweet-link) {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.article-content a:not(.tweet-link):hover { color: var(--accent-ink); }
.article-content ul, .article-content ol { margin: 0 0 22px; padding-left: 1.4em; }
.article-content li { margin-bottom: 8px; }
.article-content table {
  width: 100%; margin: 32px 0; border-collapse: collapse; font-size: 16px; line-height: 1.45;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
@media (max-width: 600px) {
  .article-content table { display: block; overflow-x: auto; }
}
.article-content th, .article-content td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
.article-content th { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--ink); }
.article-content th:first-child, .article-content td:first-child { padding-left: 0; }
.article-content tr:last-child td { border-bottom: 0; }
.article-content img { display: block; max-width: 100%; height: auto; margin: 32px 0; }
.article-content sup { font-size: 0.68em; line-height: 0; vertical-align: super; }
.article-content .sources-title {
  margin: 64px 0 0; padding-top: 16px; border-top: 2px solid var(--ink);
  font-size: 22px; font-weight: 600; font-variant-caps: all-small-caps; letter-spacing: 0.04em;
}
.article-content .sources {
  margin: 8px 0 0; padding: 0; list-style: none; counter-reset: src;
  font-size: 15px; line-height: 1.45; color: var(--grey);
}
.article-content .sources li {
  counter-increment: src; display: grid; grid-template-columns: 3ch minmax(0, 1fr); gap: 0 8px;
  margin: 0; padding: 9px 0; border-bottom: 1px solid var(--hair);
}
.article-content .sources li::before { content: counter(src); font-variant-numeric: tabular-nums; }
.article-content .sources a { color: var(--dim); text-decoration-color: #C4C4C4; overflow-wrap: anywhere; }
.article-content .sources a:hover { color: var(--accent-ink); text-decoration-color: var(--accent); }
.tweet-link { display: block; margin: 32px 0; }
.tweet-link img { margin: 0; border: 1px solid var(--hair); }
.tweet-link:hover { opacity: 0.85; }

@media (max-width: 640px) {
  body { font-size: 18px; }
  .nav { gap: 0 24px; font-size: 17px; }
  .lede { font-size: 19px; }
  .term { font-size: 13px; }
  .term-bar { padding: 8px 14px; }
  .term-out { height: 300px; padding: 12px 14px 6px; }
  .filter .btn { padding: 0 12px; }
  .term-form { padding: 6px 14px 10px; gap: 8px; }
  .term-form input { font-size: 16px; }
  .section-title { font-size: 34px; }
  .article-content { font-size: 18px; }
  .article-content h2 { font-size: 26px; }
}
