/* vlrmzz.github.io — editorial structure: serif headings on warm paper, mono detailing */
:root {
  --paper: #FBFAF7;
  --surface: #FFFFFF;
  --ink: #1A1C1A;
  --muted: #6B7069;
  --rule: #E4E2DA;
  --accent: #1F5C46;
  --accent-hover: #164033;
  --accent-soft: #EEF3EF;
  --soft: #F2F1EC;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 39rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131614;
    --surface: #181C19;
    --ink: #E9E8E2;
    --muted: #969C93;
    --rule: #272B27;
    --accent: #7FC8A3;
    --accent-hover: #A6DCC0;
    --accent-soft: #1A211C;
    --soft: #1B1F1C;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.68; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }

/* header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding-top: 1.6rem; padding-bottom: 1.6rem; }
.site-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 1.35rem; font-family: var(--mono); font-size: 0.8125rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--ink); }

main { padding-bottom: 3rem; }

/* headings */
h1 { font-family: var(--serif); font-size: 2.8rem; line-height: 1.08; font-weight: 400; letter-spacing: -0.015em; margin: 0 0 1.15rem; }
h2 { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; line-height: 1.25; margin: 3.25rem 0 1.1rem; letter-spacing: -0.01em; }
h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; line-height: 1.22; margin: 0 0 0.45rem; letter-spacing: -0.008em; }
h1 a, h2 a, h3 a { color: inherit; text-decoration: none; }
h1 a:hover, h2 a:hover, h3 a:hover { color: var(--accent); }
p { margin: 0 0 1rem; }

/* home intro */
.intro { margin: 3.5rem 0 1rem; }
.intro-head { margin: 0 0 1.6rem; }
.intro img { width: 8rem; height: 8rem; border-radius: 50%; object-fit: cover; margin-bottom: 1.6rem; }
.intro-head h1 { margin: 0; }
.intro p { margin: 0 0 0.9rem; font-size: 1.1rem; }

/* section label — mono, with a rule running to the edge */
.sec-label { font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: lowercase; color: var(--muted); margin: 3.75rem 0 1.25rem; display: flex; align-items: center; gap: 0.85rem; }
.sec-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.sec-label a { color: inherit; text-decoration: none; }
.sec-label a:hover { color: var(--accent); }

/* listing entries as cards */
.entries { list-style: none; margin: 0; padding: 0; }
.entries li { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 1.35rem 1.45rem; margin: 0 0 0.8rem; transition: border-color .16s ease, box-shadow .16s ease; }
.entries li:hover { border-color: var(--accent); box-shadow: 0 2px 14px rgba(31, 92, 70, .07); }
.entries p { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.9875rem; line-height: 1.6; }
.entries .meta { font-family: var(--mono); font-size: 0.7188rem; color: var(--accent); background: var(--accent-soft); padding: 0.22rem 0.55rem; border-radius: 4px; display: inline-block; }
.entries .meta a { color: inherit; }
.meta { color: var(--muted); font-size: 0.9rem; }
.also { color: var(--muted); font-size: 0.9875rem; }


/* long-form pages */
.page-title { margin-top: 2.75rem; }
.lede { font-size: 1.2rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.55; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.4rem 1.5rem; margin: 0 0 2.5rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 0.9375rem; }
.facts dt { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); padding-top: 0.12rem; }
.facts dd { margin: 0; }
main ul.plain { padding-left: 1.2rem; }
main ul.plain li { margin-bottom: 0.7rem; }

.post-meta { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); margin: -0.5rem 0 2rem; }
main figure { margin: 2rem 0; }
main figure img { border: 1px solid var(--rule); border-radius: 8px; }
main figcaption { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); margin-top: 0.6rem; }
.fig-placeholder { display: flex; align-items: center; justify-content: center; min-height: 12rem; background: var(--soft); border: 1px dashed var(--rule); border-radius: 8px; color: var(--muted); font-size: 0.9375rem; text-align: center; padding: 1.5rem; }
code { font-family: var(--mono); font-size: 0.875em; background: var(--soft); padding: 0.15em 0.35em; border-radius: 3px; }
pre { background: var(--soft); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.25rem; overflow-x: auto; }
pre code { background: none; padding: 0; font-size: 0.8438rem; line-height: 1.55; }
blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 2px solid var(--rule); color: var(--muted); }
.back { margin-top: 3.5rem; font-family: var(--mono); font-size: 0.8125rem; }
.todo { background: var(--soft); border: 1px dashed var(--rule); border-left: 2px solid var(--accent); padding: 0.85rem 1.1rem; border-radius: 0 6px 6px 0; color: var(--muted); font-size: 0.9375rem; margin: 1.25rem 0; }

/* experience list */
.roles { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.roles li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.roles li:last-child { border-bottom: 0; }
.roles .role { font-weight: 500; }
.roles .when { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.roles .what { color: var(--muted); font-size: 0.9375rem; }
.roles .what::before { content: "\2014"; margin: 0 0.4em; }

.site-footer { border-top: 1px solid var(--rule); margin-top: 4.5rem; }
.site-footer .wrap { padding-top: 1.9rem; padding-bottom: 3rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--muted); font-family: var(--mono); font-size: 0.8125rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 560px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.45rem; }
  h3 { font-size: 1.2rem; }
}

/* engagements: one firm, clients beneath it */
.firm { margin: 0 0 1.75rem; }
.firm-name { font-weight: 600; margin: 0 0 0.15rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.firm-role { color: var(--muted); font-size: 0.9375rem; margin: 0 0 0.75rem; }
.firm .roles { margin: 0; padding-left: 1.1rem; border-left: 2px solid var(--rule); }
.firm .roles li { padding: 0.55rem 0 0.55rem 0; }

/* work page as a cv: entries with a dated head, engagements indented beneath the firm */
.cv .facts { margin-bottom: 1rem; }
.cv-entry { margin: 0 0 2.1rem; }
.cv-head { font-weight: 600; margin: 0 0 0.15rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.cv-head .when { font-family: var(--mono); font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.cv-sub { color: var(--muted); font-size: 0.9375rem; margin: 0 0 0.7rem; }
.cv-engagements { margin: 1.1rem 0 0; padding-left: 1.1rem; border-left: 2px solid var(--rule); }
.cv-engagement { margin: 0 0 1.35rem; }
.cv-engagement:last-child { margin-bottom: 0; }
.cv-engagement h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.4; letter-spacing: 0; margin: 0 0 0.4rem; }
.cv ul.plain { margin: 0 0 0.5rem; font-size: 0.9688rem; }
.cv ul.plain li { margin-bottom: 0.3rem; }
.cv-more { font-family: var(--mono); font-size: 0.8125rem; margin: 0; }
.cv .roles li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }

/* consulting: situation -> engagement */
.situations { margin: 0 0 1rem; }
.situations dt { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; line-height: 1.3; margin: 1.6rem 0 0.4rem; letter-spacing: -0.008em; }
.situations dt:first-child { margin-top: 0; }
.situations dd { margin: 0 0 0 0; color: var(--muted); font-size: 0.9875rem; }
.situations dd a { font-family: var(--mono); font-size: 0.8125rem; white-space: nowrap; }

/* tables in long-form posts */
main table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: 0.9375rem; }
main table th, main table td { text-align: left; vertical-align: top; padding: 0.6rem 0.9rem 0.6rem 0; border-bottom: 1px solid var(--rule); }
main table th { font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); text-transform: lowercase; border-bottom-color: var(--ink); }
main table tr:last-child td { border-bottom: 0; }
main ol.plain { padding-left: 1.3rem; }
main ol.plain li { margin-bottom: 0.6rem; }
main ul.plain ul { margin-top: 0.5rem; padding-left: 1.2rem; }
@media (max-width: 560px) { main table { font-size: 0.875rem; } }

/* email addresses are stored reversed in the source; without JavaScript this shows them the right way round */
.rev { unicode-bidi: bidi-override; direction: rtl; }

/* print: used by the private resume (private/make-pdf.sh), which is kept off the site */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 14mm 16mm; }
  :root { --paper: #fff; --surface: #fff; --ink: #111; --muted: #555; --rule: #d6d6d6; --accent: #1F5C46; --soft: #fff; }
  body { font-size: 9.4pt; line-height: 1.42; }
  .site-header, .site-footer, .todo, .back, .screen-only, .cv .page-title, .cv-more { display: none; }
  .print-only { display: block; }
  span.print-only { display: inline; }
  .wrap { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  .cv-name { font-family: var(--serif); font-size: 23pt; line-height: 1.1; margin: 0 0 4pt; }
  .cv .lede { font-size: 10.4pt; margin: 0 0 7pt; }
  .cv .facts { margin: 0 0 4pt; padding: 6pt 0; gap: 1.5pt 14pt; }
  .cv .facts dt { font-size: 7.6pt; }
  .cv .facts dd { font-size: 9.2pt; }
  .cv .sec-label { font-size: 7.6pt; margin: 11pt 0 6pt; break-after: avoid; }
  .cv-entry { margin: 0 0 9pt; }
  .cv-head { break-after: avoid; }
  .cv-head .when { font-size: 7.8pt; }
  .cv-sub { font-size: 8.8pt; margin: 0 0 3pt; break-after: avoid; }
  .cv-engagements { margin-top: 6pt; padding-left: 9pt; }
  .cv-engagement { margin: 0 0 6pt; break-inside: avoid; }
  .cv-engagement h3 { font-size: 9.4pt; margin: 0 0 2pt; }
  .cv-entry:not(:has(.cv-engagements)) { break-inside: avoid; }
  .cv ul.plain { font-size: 9.2pt; margin: 0 0 2pt; }
  .cv ul.plain li { margin-bottom: 1pt; }
  .cv .roles li { break-inside: avoid; font-size: 9.2pt; padding: 2.5pt 0; }
  .cv .roles .when { font-size: 7.8pt; }
  .cv .keep { break-inside: avoid; }
}

/* diagrams drawn as inline SVG: they take their colours from the page, so they follow light and dark mode */
.diagram { display: block; width: 100%; height: auto; font-family: var(--sans); }
.diagram text { font-family: var(--sans); }
.diagram .mono { font-family: var(--mono); }
main figure .diagram { border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
