/* michaldaniel.eu: "Reference Manual"
   An IBM reference manual cover (kraft board, a column of monogram tiles) over plain manual pages.
   One blue ink at two strengths, the old M. monogram as the source of every shape. */

/* ── Fonts (self-hosted, SIL Open Font License) ─────────── */
@font-face { font-family: "Rokkitt"; font-weight: 100 900; font-display: swap; src: url(fonts/rokkitt-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: "Rokkitt"; font-weight: 100 900; font-display: swap; src: url(fonts/rokkitt-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: "News Cycle"; font-weight: 400; font-display: swap; src: url(fonts/news-cycle-latin-400-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: "News Cycle"; font-weight: 400; font-display: swap; src: url(fonts/news-cycle-latin-ext-400-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: "News Cycle"; font-weight: 700; font-display: swap; src: url(fonts/news-cycle-latin-700-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: "News Cycle"; font-weight: 700; font-display: swap; src: url(fonts/news-cycle-latin-ext-700-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: "IBM Plex Serif"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-serif-latin-400-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: "IBM Plex Serif"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-serif-latin-ext-400-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: "IBM Plex Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/ibm-plex-serif-latin-400-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: "IBM Plex Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/ibm-plex-serif-latin-ext-400-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: "IBM Plex Serif"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-serif-latin-600-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: "IBM Plex Serif"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-serif-latin-ext-600-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; }

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --paper: #f2f0ea;
  --ink: #26211d;            /* brown-black */
  --ink-2: #5f574f;
  --rule: #26211d;
  --kraft: #b5865a;          /* cover board */
  --cover-ink: #26211d;      /* small print on kraft, 4.95:1 */
  --name: #26211d;           /* kraft is printed in dark ink: name 4.95:1, like the small print */
  --sky: #86b9d1;            /* one blue ink: the tint (duller, like ink on board) ... */
  --blue: #1c6690;           /* ... and full strength, same hue (5.5:1 on paper) */
  --spine-white: #e9e5da;    /* board, not bright white */
  --on-blue: #fff;           /* text on the deep blue */
  --back: #26211d; --back-ink: #f2f0ea;
  --tab: #a7a59f;
  --grain-opacity: .08;

  --display: "Rokkitt", "Rockwell", "Roboto Slab", serif;
  --label: "News Cycle", "News Gothic MT", "Arial Narrow", sans-serif;
  --text: "IBM Plex Serif", Charter, Georgia, serif;

  --measure: 38.5rem;        /* ≈64 characters of body text; rem, not ch, so smaller-type rows (running head, footer) match */
  --spine: clamp(7rem, 19vw, 16rem);   /* one grid: spine width = margin column */
  --pad: clamp(1.25rem, 3.5vw, 3rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1d1a17; --ink: #ebe6dc; --ink-2: #a89f93; --rule: #ebe6dc;
    --kraft: #5b3c26; --cover-ink: #f3ece0; --name: #fbf7ef;
    --sky: #3f7f9c; --blue: #7cc4e4;
    --spine-white: #cfc9bd; --tab: #4a4640; --grain-opacity: .06;
    --back: #0f0d0b; --back-ink: #ebe6dc; --on-blue: #10202a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1d1a17; --ink: #ebe6dc; --ink-2: #a89f93; --rule: #ebe6dc;
  --kraft: #5b3c26; --cover-ink: #f3ece0; --name: #fbf7ef;
  --sky: #3f7f9c; --blue: #7cc4e4;
  --spine-white: #cfc9bd; --tab: #4a4640; --grain-opacity: .06;
  --back: #0f0d0b; --back-ink: #ebe6dc; --on-blue: #10202a;
}

/* ── Base ───────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.62 var(--text); min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  opacity: var(--grain-opacity); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.8 -.45'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
p, li, dd { text-wrap: pretty; hanging-punctuation: first; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; text-decoration-color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.cover :focus-visible, .band :focus-visible { outline-color: currentColor; }
.label { font-family: var(--label); font-weight: 700; letter-spacing: .02em; }
.muted { color: var(--ink-2); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 60; background: var(--paper); color: var(--ink); padding: .4rem .8rem; font-family: var(--label); }
.skip:focus { left: .5rem; }

/* ── Cover ──────────────────────────────────────────────── */
.cover { display: grid; grid-template-columns: var(--spine) 1fr; min-height: min(66vh, 36rem); background: var(--kraft); }
/* Spine: one column of squares down the left edge. The monogram is the first square, drawn edge to
   edge so its 60° bands line up with the tiles below; then white and blue tiles alternate. */
.spine { position: relative; background: var(--kraft); }
/* clip-path trims the column top and bottom but lets the monogram's full stop hang out to the right */
/* never a cut square: auto-fill makes only the rows that fit whole; leftover squares land in zero-height rows */
.column { position: absolute; left: 0; top: 0; bottom: 0; display: grid; grid-template-columns: var(--sq); grid-template-rows: repeat(auto-fill, var(--sq)); grid-auto-rows: 0; gap: .4rem; padding: .4rem; clip-path: inset(0 -40rem 0 0); --sq: clamp(2.6rem, 3.6vw, 3.2rem); }
.column .tile { min-height: 0; overflow: hidden; }   /* the logo is not clipped: its full stop hangs out */
.column .tile { aspect-ratio: auto; height: 100%; }
.column .logo { position: relative; z-index: 1; display: flex; align-items: center; }
/* the M's bands span the square; the full stop (the last ~16% of the drawing) overhangs the column */
.column .logo svg { flex: none; width: 119.5%; height: auto; fill: var(--cover-ink); }
.column .tile { --cut: var(--kraft); }
.column .tile:nth-child(even) { --ink: var(--sky); }
.column .tile:nth-child(odd) { --ink: var(--spine-white); }
/* Print feel: the squares sit a fraction off, as paste-up and press registration drift, and the
   monogram is set slightly askew. Fractions of a degree: felt, not seen. */
.column .logo svg { transform: rotate(-.7deg) translate(.5px, .5px); }
.column .tile:nth-child(3n) { transform: rotate(.45deg) translate(.6px, -.3px); }
.column .tile:nth-child(3n+1) { transform: rotate(-.35deg) translate(-.4px, .4px); }
.column .tile:nth-child(5n+2) { transform: rotate(.7deg) translate(.3px, .6px); }
.column .tile:nth-child(7n) { transform: rotate(-.6deg) translate(.8px, 0); }
/* printer's registration mark beside the file number */
.regmark { display: inline-block; width: .95rem; height: .95rem; margin-right: .5rem; vertical-align: -.15rem; }
.regmark circle, .regmark path { fill: none; stroke: currentColor; stroke-width: 1.1; }
/* Film grain over the cover and inner-page headers: fine light and dark specks, like a scanned print */
.cover, .band { position: relative; isolation: isolate; }
.cover::after, .band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: .24; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' seed='7' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/><feComponentTransfer><feFuncR type='linear' slope='1.6' intercept='-.3'/><feFuncG type='linear' slope='1.6' intercept='-.3'/><feFuncB type='linear' slope='1.6' intercept='-.3'/></feComponentTransfer></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}
.board { background: var(--kraft); color: var(--cover-ink); padding: var(--pad); display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.fileno { align-self: flex-end; text-align: right; margin: 0; white-space: nowrap; font-family: var(--label); font-size: .82rem; line-height: 1.45; }
.twoline { margin: 0 0 .55rem; font: 700 1.05rem/1.1 var(--label); letter-spacing: .05em; text-transform: uppercase; }
.cover-title h1 { margin: 0 0 1.2rem; font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 8.2vw, 6.4rem); line-height: .86; letter-spacing: -.025em; color: var(--name); }
/* Quick reference: contact details as a printed data table */
.quickref { border-collapse: collapse; font-family: var(--label); font-size: .96rem; min-width: min(34rem, 100%); }
.quickref caption { text-align: left; font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; padding-bottom: .25rem; }
.quickref thead th { text-align: left; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; padding: .15rem 1.6rem .2rem 0; border-top: 2px solid var(--cover-ink); border-bottom: 1px solid var(--cover-ink); }
.quickref tbody th { text-align: left; font-weight: 700; white-space: nowrap; padding: .16rem 1.6rem .16rem 0; }
.quickref td { padding: .16rem 1.6rem .16rem 0; }
.quickref tbody th, .quickref td { border-bottom: 1px solid color-mix(in srgb, var(--cover-ink) 25%, transparent); }
.quickref a, .band a { text-decoration-color: currentColor; }
.quickref a:hover, .band a:hover { color: inherit; text-decoration-thickness: 2px; }
.cover-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "ref contents"; column-gap: 2.5rem; align-items: start; }
.cover-title { grid-area: title; }
.cover-foot > .quickref { grid-area: ref; }
.contents { grid-area: contents; }
.contents .quickref { min-width: 13rem; }

/* Compact cover for inner pages: same spine, shorter board */
.band { display: grid; grid-template-columns: var(--spine) 1fr; background: var(--kraft); }
.band-spine { display: block; min-height: 9rem; }
.band-board { background: var(--kraft); color: var(--cover-ink); padding: calc(var(--pad) * .8) var(--pad); }
.band-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: .9; letter-spacing: -.02em; color: var(--name); }
.band-back { margin: .9rem 0 0; font-family: var(--label); font-size: .95rem; }

/* ── Stripe tiles: the monogram's bands ─────────────────── */
/* never a cut square: one row of as many whole tiles as fit, centred; the rest drop into zero-height rows */
.tiles { --t: clamp(2.2rem, 5vw, 3.4rem); display: grid; grid-template-columns: repeat(auto-fill, var(--t)); grid-template-rows: var(--t); grid-auto-rows: 0; justify-content: center; column-gap: .45rem; row-gap: 0; padding: .45rem 0; overflow: hidden; }
.tiles .tile { aspect-ratio: auto; min-height: 0; }
.tile { aspect-ratio: 1; --ink: var(--blue); --cut: var(--paper); background: linear-gradient(60deg, var(--ink) 0 29%, var(--cut) 29% 41%, var(--ink) 41% 70%, var(--cut) 70% 82%, var(--ink) 82%); }

/* ── Pages ──────────────────────────────────────────────── */
.sheet { display: block; padding: 1.5rem var(--pad) 4rem 0; }
.grid { display: grid; grid-template-columns: var(--spine) minmax(0, var(--measure)); column-gap: var(--pad); }
.pagehead { padding: .6rem 0 .5rem; font-family: var(--label); font-size: .85rem; color: var(--ink-2); }
.pagehead .r { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rule); padding-bottom: .5rem; margin-bottom: -.5rem; }
.section { padding: 1.7rem 0 .6rem; scroll-margin-top: 1rem; }
.section > .body { border-bottom: 1px solid color-mix(in srgb, var(--rule) 30%, transparent); padding-bottom: .6rem; }
.side { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.1; text-align: right; }
.side .num { display: block; font-family: var(--label); font-weight: 700; font-size: .85rem; color: var(--blue); margin-bottom: .2rem; letter-spacing: .04em; }
.body > :first-child { margin-top: 0; }
.body p { margin: 0 0 .85em; }
h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; margin: 1.7rem 0 .25rem; }
h3:first-child { margin-top: 0; }
.link { margin-top: -.2rem; }
ul.items { margin: 0 0 1rem; padding: 0; list-style: none; }
ul.items li { position: relative; padding-left: 1.3rem; margin-bottom: .35rem; }
ul.items li::before { content: ""; position: absolute; left: 0; top: .62em; width: .5rem; height: .5rem; background: var(--blue); }
.rev { position: relative; }
.rev::after { content: ""; position: absolute; left: -1.5rem; top: .25rem; bottom: .3rem; width: 4px; background: var(--blue); }

/* Justified like print, with hyphenation so word gaps stay even. Product names never hyphenate (.nh,
   added by the build's `prose` filter). Phones keep ragged-right: a narrow column justifies badly. */
@media (min-width: 761px) {
  .body p, .body li, .feat p {
    text-align: justify; hyphens: auto; -webkit-hyphens: auto;
    hyphenate-limit-chars: 7 3 3; -webkit-hyphenate-limit-before: 3; -webkit-hyphenate-limit-after: 3;
  }
}
.nh { hyphens: none; -webkit-hyphens: none; }

/* What I bring: a manual's features page */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 2rem; padding-bottom: .6rem; }
.feat { border-top: 1px solid var(--rule); padding-top: .55rem; }
.feat .num { display: block; font-family: var(--label); font-weight: 700; font-size: .8rem; color: var(--blue); letter-spacing: .04em; }
.feat h3 { margin: .1rem 0 .3rem; font-size: 1.12rem; }
.feat p { margin: 0; font-size: .95rem; line-height: 1.55; }

/* Experience: one row per job, notes in the margin */
.job { padding-top: 1.5rem; }
.job:first-child { padding-top: 0; }
.job > .side { grid-column: 1; margin-bottom: 1.2rem; }
.job > .notes { grid-column: 1; text-align: right; }
.job > .body { grid-column: 2; border-bottom: 1px solid color-mix(in srgb, var(--rule) 30%, transparent); padding-bottom: .6rem; }
.job:not(:last-child) > .body { border-bottom-style: dotted; }
.jobnote { margin: .2rem 0 0; font-family: var(--label); font-size: .92rem; line-height: 1.35; display: flex; flex-direction: column; align-items: flex-end; }
.jobnote .num { font-weight: 700; color: var(--blue); letter-spacing: .04em; font-size: .85rem; margin-bottom: .15rem; }
.jobnote b { font-size: 1.02rem; }
.job h3 { margin-top: 0; }

/* Skills and education: label column + text */
dl.skills { margin: 0 0 .4rem; }
dl.skills > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; padding: .45rem 0; border-top: 1px dotted color-mix(in srgb, var(--rule) 45%, transparent); }
dl.skills > div:first-child { border-top: 0; padding-top: 0; }
dl.skills dt { font-family: var(--label); font-weight: 700; }
dl.skills dd { margin: 0; }

/* Prose pages (privacy) */
.prose .body h2 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin: 1.6rem 0 .3rem; }
.prose .body ul { padding: 0; list-style: none; }
.prose .body ul li { position: relative; padding-left: 1.3rem; }
.prose .body ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: .5rem; height: .5rem; background: var(--blue); }
.prose .body li { margin-bottom: .3rem; }
.prose .body code { font-family: var(--label); font-size: .95em; }

/* ── Thumb index ────────────────────────────────────────── */
.thumbs { position: fixed; right: 0; top: 50%; transform: translate(110%, -50%); display: none; flex-direction: column; align-items: flex-end; gap: .5rem; z-index: 40; visibility: hidden; transition: transform .35s ease, visibility 0s .35s; }
.thumbs.shown { transform: translate(0, -50%); visibility: visible; transition: transform .35s ease; }
.thumbs a { display: flex; align-items: center; height: 3.1rem; max-width: 2.6rem; overflow: hidden; background: var(--tab); color: var(--ink); font-family: var(--label); font-weight: 700; font-size: .8rem; text-decoration: none; white-space: nowrap; transition: max-width .25s ease, background .15s; }
.thumbs .n { flex: 0 0 2.6rem; text-align: center; }
.thumbs .t { padding-right: .9rem; font-weight: 400; font-size: .92rem; }
.thumbs a.on { background: var(--blue); color: var(--on-blue); }
.thumbs a:hover, .thumbs a:focus-visible { max-width: 14rem; }
.thumbs a:hover:not(.on) { background: var(--sky); color: #1d2a33; }
.thumbs a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (min-width: 1180px) { .thumbs { display: flex; } }

/* ── Back cover ─────────────────────────────────────────── */
.backcover { background: var(--back); color: var(--back-ink); margin-top: 1rem; }
.backcover .tiles { padding: 0 0 .45rem; background: var(--paper); }
.backcover .inner { padding: 1.4rem var(--pad) 2rem 0; font-family: var(--label); font-size: .85rem; }
.backcover .backmark { justify-self: end; align-self: center; width: 3.2rem; color: var(--sky); }
.backcover .backmark svg { display: block; width: 100%; fill: currentColor; }
.backcover .r { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1.4rem; }
.backcover a { text-decoration-color: var(--sky); }
.backcover a:hover { color: var(--sky); }
.theme { display: inline-flex; border: 1px solid color-mix(in srgb, var(--back-ink) 45%, transparent); }
.theme button { font: inherit; background: none; color: inherit; border: 0; padding: .1rem .5rem; cursor: pointer; opacity: .7; }
.theme button[aria-pressed="true"] { background: var(--back-ink); color: var(--back); opacity: 1; }

/* ── Small screens ──────────────────────────────────────── */
@media (max-width: 1000px) { .cover-foot { grid-template-areas: "title" "ref" "contents"; grid-template-columns: minmax(0, 1fr); row-gap: 1.6rem; } .contents .quickref { min-width: 0; width: 100%; } }
@media (max-width: 760px) {
  :root { --spine: 4.2rem; }
  .cover { min-height: auto; }
  .board { gap: 2.5rem; }
  .column { --sq: 2.6rem; padding: .4rem .3rem; }
  .quickref caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .quickref tbody th, .quickref td, .quickref thead th { padding-right: .8rem; }
  .sheet { padding: 1.5rem 1rem 4rem; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .section { padding-top: 1.3rem; }
  .side { margin-bottom: .7rem; text-align: left; }
  .side .num { display: inline; margin-right: .6rem; }
  .rev::after { left: -.75rem; }
  .features { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .job > .side, .job > .notes, .job > .body { grid-column: 1; }
  .job > .side { margin-bottom: .9rem; }
  .job > .notes { text-align: left; }
  .jobnote { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 .6rem; margin-bottom: .35rem; }
  .jobnote .num { margin: 0; }
  dl.skills > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .backcover .inner { padding: 1.4rem 1rem 2rem; row-gap: .9rem; }
  .backcover .backmark { justify-self: start; width: 2.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ── Print: the CV as a plain, light document ───────────── */
@media print {
  :root, :root[data-theme] {
    color-scheme: light; --paper: #fff; --ink: #000; --ink-2: #444; --rule: #000; --blue: #1c6690;
    --kraft: #fff; --cover-ink: #000; --name: #000; --back: #fff; --back-ink: #000;
  }
  @page { size: A4; margin: 14mm 14mm 16mm; }
  body { display: block; font-size: 10pt; }
  body::before, .cover::after, .band::after, .thumbs, .skip, .theme, .tiles, .spine, .contents { display: none !important; }
  .cover, .band { display: block; min-height: 0 !important; }
  .board { padding: 0 0 4mm; border-bottom: 2px solid #000; }
  .sheet, .backcover .inner { padding: 0; }
  .grid { grid-template-columns: 30mm minmax(0, 1fr); column-gap: 6mm; }
  a { color: inherit; text-decoration: none; }
  .section, .job, .feat, dl.skills > div { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
}
