/* ---------------------------------------------------------------- Onest, self hosted
   The dealt pairing (Onest, 400 for display, 400 and 500 for text), served from this folder so the
   page makes no third party request and the offline build can embed it. */
@font-face{font-family:Onest;font-style:normal;font-weight:400 700;font-display:swap;
  src:url(fonts/onest-latin.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:Onest;font-style:normal;font-weight:400 700;font-display:swap;
  src:url(fonts/onest-latin-ext.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-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Onest;font-style:normal;font-weight:400 700;font-display:swap;
  src:url(fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

/* ---------------------------------------------------------------- page
   Only what the kit lacks: the portrait's crop, the three part rows of the writing section,
   the contact block and the article pages. Colours, type, grid and buttons are the system's. */

/* the portrait: the face sits in the upper third of the frame */
.hero__media > img { object-position: 50% 22%; }

/* a rule-closed list of three parts: date, title, line. One block, repeated (system.md) */
.parts > a { display: grid; grid-template-columns: 1fr; gap: var(--s-2); padding-block: var(--s-5);
  border-bottom: 1px solid var(--line); }
.parts > a:first-child { border-top: 1px solid var(--line); }
.parts h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; color: var(--ink);
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
  transition: text-decoration-color var(--dur) var(--ease); }
.parts > a:hover h3 { text-decoration-color: var(--action); }
.parts p { color: var(--muted); font-size: var(--t-small); max-width: 52ch; }
.parts > a:focus-visible { outline: 2px solid var(--action); outline-offset: 4px; }

/* the writing section: three parts side by side on the grid, one column on a phone */
.parts--row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--card-gap); }
.parts--row > a { grid-template-columns: 1fr; }
@media (max-width: 767px) { .parts--row { grid-template-columns: 1fr; } }

/* work history: the story on the left, the dates on the right */
.history { align-items: start; }
.history .story { max-width: 34ch; }
@media (max-width: 1023px) { .history .story { max-width: 62ch; } }

/* contact: the form on the split line, the details under the words */
.contact { align-items: start; }
.contact__direct { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.contact__direct dt { color: var(--muted); font-size: var(--t-small); }
.contact__direct dd { margin: 2px 0 0; font-size: var(--t-lead); line-height: 1.4; }
.contact__direct a { text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: 4px; transition: text-decoration-color var(--dur) var(--ease); }
.contact__direct a:hover { text-decoration-color: var(--action); }

/* ---------------------------------------------------------------- article pages
   A different box from a landing section, the same system: the nav, the footer, the type and the
   hairlines. Prose is set at the lead size, 62 characters, and never in a card. */
.post-head { padding-top: calc(var(--nav) + var(--s-9)); padding-bottom: var(--s-7);
  border-bottom: 1px solid var(--line); }
.post-head h1 { max-width: 24ch; margin-top: var(--s-4); }
.post-head .post-back { margin-bottom: var(--s-7); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3);
  color: var(--muted); font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.standfirst { margin: var(--s-4) 0 0; max-width: 46ch; color: var(--muted);
  font-size: var(--t-lead); line-height: 1.5; }
.post-body { padding-bottom: var(--s-9); }
.prose { max-width: min(100%, 640px); font-size: var(--t-lead); line-height: 1.62; color: var(--ink); }
.prose > * + * { margin-top: var(--s-5); }
.prose h2 { font-size: var(--t-h3); line-height: 1.2; margin-top: var(--s-8); }
.prose h3 { font-family: var(--font-text); font-weight: 500; font-size: var(--t-card); margin-top: var(--s-6); }
.prose ul, .prose ol { display: grid; gap: var(--s-2); padding-left: var(--s-5); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--muted); }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: var(--s-5); color: var(--muted); }
.prose a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em;
  background: var(--surface); padding: 1px 6px; border-radius: var(--r-sm); }
.prose img { border-radius: var(--r-md); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: var(--s-7); }
.post-back { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 500;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.post-back:hover { text-decoration-color: var(--action); }
.lede-line { color: var(--muted); font-size: var(--t-lead); line-height: 1.5; max-width: 46ch; }

/* the writing index: one ruled row per post */
.post-list > li > a { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-2) var(--s-6);
  padding-block: var(--s-5); border-bottom: 1px solid var(--line); align-items: baseline; }
.post-list > li:first-child > a { border-top: 1px solid var(--line); }
.post-list h2 { font-size: var(--t-card); font-family: var(--font-text); font-weight: 500; letter-spacing: -0.01em; }
.post-list h2 { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
  transition: text-decoration-color var(--dur) var(--ease); }
.post-list a:hover h2 { text-decoration-color: var(--action); }
.post-list p { grid-column: 2; color: var(--muted); font-size: var(--t-small); }
.post-list time { color: var(--muted); font-size: var(--t-small); font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .post-list > li > a { grid-template-columns: 1fr; } .post-list p { grid-column: 1; } }

/* the dark band's three facts: label, then the value at the lead size */
.band-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--card-gap);
  margin-top: var(--s-8); border-top: 1px solid var(--line); padding-top: var(--s-5); }
.band-facts dt { color: var(--muted); font-size: var(--t-small); }
.band-facts dd { margin: var(--s-2) 0 0; font-size: var(--t-lead); line-height: 1.4; max-width: 38ch; }
@media (max-width: 767px) { .band-facts { grid-template-columns: 1fr; gap: var(--s-5); } }

/* the band under 1024: the four facts stack, so the dark screen is not left half empty */
@media (min-width: 640px) and (max-width: 1023px) { .band-facts { grid-template-columns: 1fr; } }

/* every link outside running text is a 44px target on a phone (system.md, Access) */
@media (max-width: 639px) {
  .contact__direct a, .footer__legal a, .post-back, .link { display: inline-flex; align-items: center; min-height: 44px; }
  .footer__legal { gap: var(--s-2) var(--s-5); }
}
/* the two columns of a split start on the same line */
.contact > *, .history > * { align-self: start; }
/* a post title at the card size was 1.25x the body; set it at h3 */
.parts h3 { font-size: var(--t-h3); line-height: 1.2; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); }

/* the history story runs at body size on a phone, so the two-screen section fits two screens */
@media (max-width: 639px) { .history .story { font-size: var(--t-body); line-height: 1.55; } }

/* a definition list carries a browser margin: the split's columns start on the same line without it */
.contact__direct { margin: 0; }
/* one size for every h3 on the page: the FAQ questions and the article titles */
.faq__item h3 { font-size: var(--t-h3); line-height: 1.2; }

/* one size for every h3: the article titles and the questions */
.faq .faq__item > h3 { font-size: var(--t-h3); line-height: 1.2; }

/* the foot of an article: back to the list, and the two posts either side */
.post-nav { display: grid; gap: var(--s-6); padding: var(--s-7) 0 var(--s-9); border-top: 1px solid var(--line); }
.post-nav__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--card-gap); }
.post-nav__link { display: grid; gap: var(--s-2); font-family: var(--font-display); font-size: var(--t-card);
  font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.25; max-width: 34ch; }
.post-nav__link span { font-family: var(--font-text); font-size: var(--t-small); font-weight: 500;
  letter-spacing: 0; color: var(--muted); }
.post-nav__link:hover { text-decoration: underline; text-decoration-color: var(--action); text-underline-offset: 4px; }
.post-nav__link--next { justify-self: end; text-align: right; }
@media (max-width: 767px) { .post-nav__pair { grid-template-columns: 1fr; } .post-nav__link--next { justify-self: start; text-align: left; } }

/* the blog index: the newest piece set as a masthead story, the rest as ruled rows */
.post-head--index { padding-bottom: var(--s-8); }
.featured { display: grid; gap: var(--s-3); padding: var(--s-6) 0 var(--s-7);
  border-bottom: 1px solid var(--line); }
.featured h2 { font-size: var(--t-h2); line-height: 1.05; max-width: 24ch; }
.featured h2 { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px;
  transition: text-decoration-color var(--dur) var(--ease); }
.featured:hover h2, .featured:focus-visible h2 { text-decoration-color: var(--action); }
.featured p { font-size: var(--t-lead); line-height: 1.5; color: var(--muted); max-width: 52ch; }
.featured__more { font-size: var(--t-small); font-weight: 500; }
.featured__more::after { content: " \2192"; display: inline-block; transition: transform var(--dur) var(--ease); }
.featured:hover .featured__more::after { transform: translateX(3px); }
.post-list { margin-top: var(--s-5); }
@media (max-width: 767px) { .featured h2 { max-width: 18ch; } }

.post-reviewed { margin-top: var(--s-6); color: var(--muted); font-size: var(--t-small); }
.prose h2 + p, .prose ul { margin-top: var(--s-4); }
.prose ul { padding-left: var(--s-5); }
.prose li { margin-top: var(--s-2); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.prose a:hover { text-decoration-color: var(--action); }

/* no paragraph should end on a single word */
p, li, dd, blockquote, figcaption { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }

/* the three facts a recruiter looks for, under the hero lead */
.hero__quick { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin: var(--s-4) 0 0;
  font-size: var(--t-small); color: var(--muted); }
.hero__quick span { display: inline-flex; align-items: baseline; gap: var(--s-4); }
.hero__quick span + span::before { content: "\00b7"; color: var(--line); }
.section-note { margin-top: var(--s-5); font-size: var(--t-small); color: var(--muted); max-width: 62ch; }
.field__hint { margin-top: var(--s-2); font-size: var(--t-small); color: var(--muted); }

@media (max-width: 1023px) {
  .hero--split .hero__media { min-height: 188px; }
}

.post-byline { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line);
  color: var(--muted); font-size: var(--t-small); max-width: 54ch; }
.post-byline a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.post-byline a:hover { text-decoration-color: var(--action); }
.post-byline + .post-reviewed { margin-top: var(--s-3); }

/* a figure inside an article: the art keeps its own scale on a phone rather than shrinking to nothing */
.post-figure { margin: var(--s-8) 0; }
.post-figure__art { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5);
  overflow-x: auto; }
.post-figure__art svg { display: block; width: 100%; height: auto; }
.post-figure figcaption { margin-top: var(--s-4); color: var(--muted); font-size: var(--t-small);
  max-width: 62ch; }
@media (max-width: 639px) { .post-figure__art { padding: var(--s-3); } .post-figure__art svg { min-width: 540px; } }

/* a table in an article: hairlines, no zebra, and its own scroll on a phone */
.table-wrap { margin: var(--s-6) 0; overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-small); min-width: 520px; }
.prose th, .prose td { text-align: left; padding: var(--s-3) var(--s-3) var(--s-3) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 500; color: var(--ink); white-space: nowrap; }
.prose td { color: var(--ink); }

@media (max-width: 639px) {
  /* a five column table is unreadable on a phone: each row becomes a small block with its labels */
  .table-wrap { overflow-x: visible; }
  .prose table { min-width: 0; display: block; }
  .prose thead { display: none; }
  .prose tbody, .prose tr, .prose td { display: block; }
  .prose tr { padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
  .prose td { border: 0; padding: 2px 0; }
  .prose td:first-child { font-weight: 500; font-size: var(--t-body); margin-bottom: 2px; }
  .prose td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
  .prose td:first-child::before { content: ""; }
}
