@charset "UTF-8";
/* =========================================================================
   Print.
   The screen stays dark. Paper is light-on-white — ink is expensive and a
   dark page prints as a black rectangle. Cmd+P should produce something
   clean enough to send.
   ====================================================================== */

@page {
  margin: 18mm 16mm;
}

:root,
:root[data-theme="dark"],
:root[data-theme="light"] {
  --bg:          #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-code:     #F4F4F4;
  --text:        #111111;
  --text-muted:  #333333;
  --text-faint:  #555555;
  --text-quiet:  #444444;
  --accent:      #111111;
  --accent-hover:#111111;
  --accent-deep: #555555;
  --rule:        #CCCCCC;
  --selection:   transparent;
}

html, body {
  background: #FFFFFF !important;
  color: #111111 !important;
  font-size: 11pt;
  line-height: 1.5;
}

/* Chrome that has no meaning on paper. */
.backdrop,
.motifs,
.site-header,
.site-footer,
.theme-toggle,
.skip-link,
.post-nav,
.pagination,
.section__more,
.site-nav {
  display: none !important;
}

.site-main { flex: none; }

.wrap {
  max-width: none;
  width: auto;
  padding: 0;
  margin: 0;
}

/* Keep headings with what follows them. */
h1, h2, h3, h4, h5, h6 {
  break-after: avoid;
  page-break-after: avoid;
  color: #111111 !important;
}
h1 { font-size: 20pt; margin: 0 0 6pt; }
h2 { font-size: 13pt; margin: 14pt 0 4pt; }
h3 { font-size: 11.5pt; margin: 11pt 0 3pt; }

p, li { orphans: 3; widows: 3; }
p { margin: 0 0 7pt; }
ul, ol { margin: 0 0 7pt; padding-left: 14pt; }
li { margin-bottom: 2pt; }

/* Links: keep them readable, and print the destination for external ones
   so a printed page is still usable. */
a { color: #111111 !important; text-decoration: underline; }
a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-size: 8.5pt;
  color: #555555;
  word-break: break-all;
}
a[href^="#"]::after,
a[href^="/"]::after,
a[href^="mailto:"]::after { content: ""; }

blockquote {
  border-left: 2pt solid #CCCCCC;
  color: #333333;
  margin: 7pt 0;
  padding-left: 8pt;
  font-style: italic;
}

pre, .table-wrap, figure, table, blockquote, img {
  break-inside: avoid;
  page-break-inside: avoid;
}

pre {
  background: #F4F4F4 !important;
  border: 0.5pt solid #CCCCCC;
  padding: 6pt;
  font-size: 9pt;
  white-space: pre-wrap;
  word-wrap: break-word;
}
:not(pre) > code {
  background: #F4F4F4 !important;
  border: 0;
  padding: 0 2pt;
  font-size: 9.5pt;
}

table { font-size: 9.5pt; width: 100%; }
th, td { border-bottom: 0.5pt solid #CCCCCC; padding: 3pt 5pt; }
th { text-transform: none; font-size: 9pt; }

figure { margin: 8pt 0; }
figcaption { font-size: 8.5pt; color: #555555; }

.post-header { margin-bottom: 10pt; }
.post-meta { font-size: 9pt; color: #555555 !important; }
.post-tags { display: none; }
.post-footer { border-top: 0.5pt solid #CCCCCC; margin-top: 10pt; padding-top: 6pt; }

/* The reading column is a screen constraint; paper has its own margins. */
.post-body > pre,
.post-body > figure,
.post-body > .table-wrap {
  width: auto;
  margin-inline: 0;
}

/* -------------------------------------------------------------- /work  */
/* Cmd+P on the professional page should produce something worth sending:
   one page where possible, no orphaned headings, no URL clutter. */

.work { --rhythm: 1em; }

.work .post-body h2 {
  font-size: 8.5pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555555 !important;
  border-bottom: 0.5pt solid #CCCCCC;
  padding-bottom: 2pt;
  margin: 12pt 0 5pt;
}
.work .post-body h2:first-child { margin-top: 0; }

.work .post-body h3 { font-size: 10.5pt; margin: 8pt 0 1pt; }
.work .post-body h3 + p {
  font-size: 8.5pt;
  color: #555555 !important;
  margin-bottom: 3pt;
}

.work .post-body ul { margin-bottom: 5pt; }
.work .post-body li { margin-bottom: 1pt; }
.work .post-body p { margin-bottom: 5pt; }

.work__standfirst { font-size: 10pt; color: #333333 !important; margin: 3pt 0 0; }
.work__header { margin-bottom: 8pt; }

/* A printed CV does not need every link spelled out after the text. */
.work a[href^="http"]::after { content: ""; }

/* Keep a role and its bullets together. */
.work .post-body h3,
.work .post-body h3 + p { break-after: avoid; page-break-after: avoid; }
