/* havranci.cz/portfolio — CV of Mirek Havránek.
   Screen: five tabbed sections (.page) over a full-viewport "ripple field" canvas; light + dark.
   Print (= the generated PDF): one clean column, A4, machine-readable. The print block stays LAST
   so it overrides the dark-mode tokens when someone prints from a dark OS. */

:root {
  --navy: #323b4c;            /* from the original CV */
  --navy-ink: #1b212d;
  --slate: #8993a4;
  --bg: #f6f7fa;
  --panel: #ffffff;
  --panel-glass: rgba(255, 255, 255, .86);
  --line: #e2e6ee;
  --text: #1b212d;
  --muted: #5b6578;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-soft: #e8efff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(27, 33, 45, .08);
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c; --panel: #161d29; --panel-glass: rgba(22, 29, 41, .86); --line: #26324a; --text: #e7eaf0; --muted: #9aa5b8;
    --accent: #7aa2ff; --accent-ink: #9db8ff; --accent-soft: #1a2740; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
main { flex: 1; position: relative; z-index: 1; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.01em; line-height: 1.15; }
h2 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); margin: 0 0 .7em; }
h3 { font-size: 1.12rem; margin: 1.3em 0 .45em; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--accent-soft); padding: .15em .45em; border-radius: 5px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 880px; }
.lead { font-size: 1.05rem; }
.footnote { font-size: .85rem; color: var(--muted); }
.print-only { display: none; }

/* ---------- the field (canvas behind everything) ---------- */
.field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- top bar + tabs ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-row { max-width: 1120px; margin: 0 auto; padding: 10px 20px 22px; display: flex; align-items: center; gap: 18px; }
.brand { font-family: var(--font-display); font-weight: 800; letter-spacing: .04em; width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; text-decoration: none; flex: none; }
.tabs { position: relative; display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: .55em .9em; color: var(--muted); font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; border-radius: 10px; transition: color .2s, background .2s; }
.tabs a:hover { color: var(--text); background: var(--accent-soft); }
.tabs a[aria-selected="true"] { color: var(--text); }
.tab-ink { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w, 0px); transform: translateX(var(--x, 0px)); background: var(--accent); border-radius: 3px; transition: transform .35s var(--ease), width .35s var(--ease); }
.actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.md-wrap { position: relative; display: inline-flex; }
.quip { position: absolute; top: 100%; right: 8px; margin-top: 2px; font-size: .66rem; font-style: italic; color: var(--muted); white-space: nowrap; pointer-events: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .45em; padding: .55em 1em; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap; transition: transform .18s var(--ease), box-shadow .18s, border-color .18s, background .18s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--muted); }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-ink); border-color: var(--navy-ink); }
.btn-lg { padding: .85em 1.35em; font-size: 1.02rem; }

/* ---------- pages ---------- */
.page { padding: 44px 0 72px; }
html.js .page:not(.active) { display: none; }
html.js .page.active { animation: pageIn .5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 34px)); } to { opacity: 1; transform: none; } }

/* ghosts: elements drift in from the side when their page opens */
html.js .ghost { opacity: 0; }
html.js .page.active .ghost { animation: ghostIn .8s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 60ms + 60ms); }
@keyframes ghostIn {
  from { opacity: 0; transform: translateX(var(--from, -38px)) translateY(8px); filter: blur(10px); }
  55% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: none; }
}
.stats .stat:nth-child(even), .timeline .job:nth-child(even), .quotes blockquote:nth-child(even) { --from: 40px; }

/* ---------- overview ---------- */
.hero { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 44px; align-items: center; margin-bottom: 56px; }
.portrait { margin: 0; aspect-ratio: 3 / 4; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 60px rgba(27, 33, 45, .22); background: var(--accent-soft); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eyebrow { margin: 0 0 .5em; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.2rem); font-weight: 800; margin: 0 0 .15em; line-height: 1.02; }
.role { font-size: 1.15rem; font-weight: 500; color: var(--muted); margin-bottom: 1em; }
.pitch { font-size: 1.06rem; max-width: 62ch; }
.hero-meta { list-style: none; padding: 0; margin: 0 0 .6em; display: flex; flex-wrap: wrap; gap: .4em 1.4em; color: var(--muted); font-size: .95rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 6px; }
.ai-hint { flex-basis: 100%; margin: 4px 0 0; font-size: .85rem; color: var(--muted); }

.stats { list-style: none; padding: 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; background: var(--panel-glass); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s; }
.stat:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(27, 33, 45, .14); }
.num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 2.1vw, 2.2rem); line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.stat span { font-size: .9rem; line-height: 1.45; color: var(--muted); }
@media (prefers-color-scheme: dark) { .num { color: var(--accent-ink); } }
.now-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.now-grid h2 { font-size: 1.35rem; }

/* ---------- experience ---------- */
.timeline { list-style: none; padding: 0; margin: 0 0 56px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.job { position: relative; padding: 0 0 36px 36px; transition: opacity .3s; }
.job:last-child { padding-bottom: 0; }
.job::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--panel); border: 3px solid var(--navy); transition: all .3s; }
.job h3 { margin: 0 0 .2em; font-size: 1.18rem; }
.meta { margin: 0 0 .7em; color: var(--muted); font-size: .92rem; }
.org { font-weight: 600; color: var(--text); }
.job ul { padding-left: 1.15em; margin: .4em 0 0; }
.job li { margin: .4em 0; }
.cv.highlighting .job:not(.lit), .cv.highlighting .cred:not(.lit) { opacity: .4; }
.job.lit::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.cred.lit, .cards.lit { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cred { background: var(--panel-glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; transition: box-shadow .25s, border-color .25s; }
.cred h3 { margin: 0 0 .5em; font-size: 1rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .45em 0; border-top: 1px solid var(--line); font-size: .93rem; line-height: 1.5; }
.plain li:first-child { border-top: 0; padding-top: 0; }

/* ---------- skills & AI ---------- */
.skillgroup { margin: 22px 0; }
.skillgroup h3 { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 .7em; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: .45em .95em; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-glass); font-size: .92rem; font-weight: 500; cursor: pointer; user-select: none; transition: all .18s var(--ease); }
.chip:hover, .chip:focus-visible, .chip.pinned { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); transform: translateY(-2px); }
.chip .proof { display: none; }
.tip { position: fixed; z-index: 70; max-width: 320px; background: var(--navy-ink); color: #fff; padding: 10px 13px; border-radius: 10px; font-size: .85rem; line-height: 1.45; box-shadow: 0 14px 40px rgba(0, 0, 0, .3); pointer-events: none; }
.tip b { display: block; margin-top: 4px; color: #9ec1ff; font-weight: 600; }
.ai-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.ai-list li { padding: 16px 20px; background: var(--panel-glass); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 12px; }
.ai-list strong { display: block; font-family: var(--font-display); margin-bottom: .2em; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border-radius: 14px; transition: box-shadow .25s; }
.cards a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-glass); color: inherit; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.cards strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: .25em; }
.cards span { font-size: .9rem; color: var(--muted); }

/* ---------- references ---------- */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 6px 0 14px; }
blockquote { margin: 0; padding: 16px 18px; background: var(--panel-glass); border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 10px; font-size: .95rem; }
blockquote p { margin: 0 0 .5em; }
blockquote footer { color: var(--muted); font-size: .85rem; }

/* ---------- contact ---------- */
.contact-card { max-width: 560px; padding: 24px 28px; background: var(--panel-glass); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
dl { margin: 0; }
dt { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .9em; }
dt:first-child { margin-top: 0; }
dd { margin: 0; overflow-wrap: anywhere; }


/* ---------- intro ----------
   The full show plays once per tab session; later loads get a short fade (intro-quick); nothing under reduced motion.
   States on <html>: intro-pre (set by the inline <head> script, so the cover is up from the first paint and the page never
   flashes) -> intro-live (script.js decodes the name) -> intro-out (the hand-off, 1.5 s: the name rises into its seat as the
   headline (intro-seat) while the cover is still dark, then the cover dissolves and the page comes into focus around it)
   -> intro-done. finalize() (print/PDF) removes it all. */
.intro { position: fixed; inset: 0; z-index: 100; color: #e7eaf0; display: grid; place-items: center; overflow: hidden; pointer-events: none; }
html:not(.js):not(.intro-pre) .intro, html.intro-done .intro, html.intro-quick .intro, html.print-all .intro { display: none; }
.intro-bg { position: absolute; inset: 0; background: #0b0f17; overflow: hidden; }
.intro.out .intro-bg { animation: introAway .75s cubic-bezier(.45, 0, .55, 1) .45s forwards; } /* after the name has risen into its seat */
.intro-grid { position: absolute; inset: -60% -20%; background-image: linear-gradient(rgba(122, 162, 255, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(122, 162, 255, .09) 1px, transparent 1px); background-size: 46px 46px; transform: perspective(700px) rotateX(58deg); animation: gridDrift 3.6s linear both; -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 15%, transparent 65%); mask-image: radial-gradient(ellipse at 50% 45%, #000 15%, transparent 65%); }
@keyframes gridDrift { from { background-position: 0 0; } to { background-position: 0 92px; } }
.intro-core { position: relative; text-align: center; font-family: var(--font-display); padding: 0 20px; }
.intro-mark { font-size: .8rem; font-weight: 700; letter-spacing: .5em; color: #7aa2ff; opacity: 0; animation: introFade .7s ease .2s forwards; }
/* set exactly like the headline (.hero h1), so at the hand-off it can glide into that spot and become it */
.intro-name { display: inline-block; vertical-align: top; margin-top: .3em; font-size: clamp(2.5rem, 5.4vw, 4.2rem); font-weight: 800; letter-spacing: -.01em; line-height: 1.02; white-space: nowrap; text-shadow: 0 0 28px rgba(122, 162, 255, .5); }
@media (max-width: 359px) { .intro-name { font-size: 2rem; } } /* the headline wraps there: no glide, just fit the screen */
html.intro-pre .intro-name { visibility: hidden; } /* script.js decodes it in */
.intro-sub { margin-top: .7em; font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; color: #9aa5b8; opacity: 0; animation: introFade .8s ease 1s forwards; }
.intro-bar { width: 240px; max-width: 70vw; height: 2px; margin: 20px auto 0; background: rgba(255, 255, 255, .1); overflow: hidden; }
.intro-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #7aa2ff, #e879f9); transform: scaleX(0); transform-origin: left; animation: introBar 1.9s cubic-bezier(.2, .7, .2, 1) .1s forwards; }
@keyframes introBar { to { transform: scaleX(1); } }
@keyframes introFade { to { opacity: 1; } }
@keyframes introAway { to { opacity: 0; } }
html.intro-pre main, html.intro-live main { opacity: 0; filter: blur(8px); }
html.intro-pre .topbar, html.intro-pre .site-footer, html.intro-live .topbar, html.intro-live .site-footer { opacity: 0; }
html.intro-out main { animation: pageFocus .9s cubic-bezier(.2, .7, .2, 1) .55s both; }
html.intro-out .topbar, html.intro-out .site-footer { animation: chromeIn .8s ease .6s both; }
@keyframes pageFocus { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: none; } }
@keyframes chromeIn { from { opacity: 0; } to { opacity: 1; } }
/* the headline's seat stays empty while the name glides into it; .seated keeps it from replaying its drift-in on landing */
html.intro-seat #h-name { visibility: hidden; }
html.intro-seat #h-name, #h-name.seated { animation: none; opacity: 1; filter: none; transform: none; }
/* failsafe: script.js swaps intro-pre for intro-live at once; if it never runs (blocked, offline), the cover steps aside by itself */
html.intro-pre .intro { animation: introAway .5s ease 4s forwards; }
html.intro-pre main, html.intro-pre .topbar, html.intro-pre .site-footer { animation: failsafeIn .5s ease 4s forwards; }
@keyframes failsafeIn { to { opacity: 1; filter: none; } }
html.intro-quick main, html.intro-quick .topbar, html.intro-quick .site-footer { animation: chromeIn .45s ease both; }

/* ---------- section pager (built by script.js) ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager .next { margin-left: auto; }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0; }
.kbd-hint { opacity: .7; }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro { display: none; }
  html.intro-pre main, html.intro-pre .topbar, html.intro-pre .site-footer,
  html.intro-live main, html.intro-live .topbar, html.intro-live .site-footer { opacity: 1; transform: none; filter: none; animation: none; }
  html.js .page.active, html.js .page.active .ghost { animation: none; }
  html.js .ghost { opacity: 1; }
  .btn, .chip, .cards a, .stat, .tab-ink { transition: none; }
}
html.print-all .page { display: block !important; animation: none !important; }
html.print-all .ghost { animation: none !important; opacity: 1 !important; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar-row { flex-wrap: wrap; gap: 10px; padding: 8px 14px; }
  .quip { display: none; }
  .tabs { order: 3; flex-basis: 100%; }
  .topbar .btn .label { display: none; }
  .topbar .btn { padding: .5em .8em; }
  .page { padding: 28px 0 56px; }
  .hero { grid-template-columns: 1fr; gap: 22px; margin-bottom: 40px; }
  .portrait { width: 150px; border-radius: 22px; }
  .pitch { font-size: 1rem; }
  .now-grid, .cred-grid, .quotes, .cards { grid-template-columns: 1fr; }
  .btn-lg { width: 100%; justify-content: center; }
  .kbd-hint { display: none; }
}
@media (max-width: 480px) {
  .stats { gap: 10px; }
  .stat { padding: 16px 14px; }
  .num { font-size: 1.5rem; }
}

/* =====================================================================
   PRINT = the downloadable PDF. One column, A4, plain structure: easy for
   people to skim and for ATS/AI parsers to read.
   ===================================================================== */
@page { size: A4; margin: 10mm 14mm 10mm; }
/* ---------- homepage family (2026-10-14, Mirek picked variant A) ----------
   Numbered tabs + section headings, the homepage's card look (radius 12, hairline ring, soft shadow,
   blue ring on hover), crisper timeline points, the pager as numbered cards. Screen only: the PDF keeps its own print rules. */
:root { --card-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(27, 33, 45, .07); --card-hover: 0 0 0 2px var(--accent), 0 14px 34px rgba(37, 99, 235, .14); }
@media (prefers-color-scheme: dark) { :root { --card-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(0, 0, 0, .3); --card-hover: 0 0 0 2px var(--accent), 0 14px 34px rgba(0, 0, 0, .45); } }
@media screen {
  .tabs { counter-reset: tab; }
  .tabs a { counter-increment: tab; }
  .tabs a::before { content: counter(tab, decimal-leading-zero); font: 800 .72rem/1 var(--font-display); color: var(--slate); margin-right: .5em; letter-spacing: .02em; vertical-align: 1px; transition: color .2s; }
  .tabs a[aria-selected="true"]::before { color: var(--accent); }
  .sec-num { font-weight: 800; color: var(--slate); margin-right: .45em; letter-spacing: -.02em; }

  .stat, .cred, .cards a, blockquote, .contact-card { background: var(--panel); border: 0; border-radius: 12px; box-shadow: var(--card-shadow); }
  blockquote { box-shadow: inset 3px 0 0 var(--navy), var(--card-shadow); }
  .stat:hover, .cards a:hover { transform: translateY(-2px); box-shadow: var(--card-hover); }
  .cred.lit { box-shadow: 0 0 0 2px var(--accent), 0 0 0 7px var(--accent-soft); }
  .portrait { border-radius: 12px; }

  .timeline::before { width: 1px; left: 7.5px; background: color-mix(in srgb, var(--slate) 45%, transparent); }
  .job::before { width: 9px; height: 9px; left: 3.5px; top: 9px; border: 0; background: var(--navy); box-shadow: 0 0 0 4px var(--bg); }
  .job.lit::before { width: 11px; height: 11px; left: 2.5px; top: 8px; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
  @media (prefers-color-scheme: dark) { .job::before { background: var(--accent); } }

  .pager { border-top: 0; gap: 14px; }
  .pcard { display: flex; align-items: center; gap: 14px; min-width: 270px; padding: 14px 20px; background: var(--panel); border-radius: 12px; box-shadow: var(--card-shadow); color: var(--text); text-decoration: none; transition: box-shadow .25s var(--ease), translate .25s var(--ease); }
  .pcard:hover, .pcard:focus-visible { translate: 0 -2px; box-shadow: var(--card-hover); }
  .pcard .pn { font: 600 2rem/1 var(--font-display); color: var(--muted); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .pcard .pt { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .pcard small { font: 700 .64rem/1.2 var(--font-display); letter-spacing: .18em; text-transform: uppercase; color: var(--slate); }
  .pcard b { font: 700 1.04rem/1.2 var(--font-display); }
  .pcard .pa { font-size: 1.08rem; transition: color .2s, transform .25s var(--ease); }
  .pcard:hover .pa { color: var(--accent); }
  .pcard.next:hover .pa { transform: translateX(4px); }
  .pcard.prev:hover .pa { transform: translateX(-4px); }
  
  @media (max-width: 640px) { .pcard { min-width: 0; flex: 1 1 100%; } }
}

@media print {
  :root {
    --bg: #fff; --panel: #fff; --panel-glass: #fff; --line: #d9dee8; --text: #1b212d; --muted: #5b6578;
    --accent: #323b4c; --accent-ink: #323b4c; --accent-soft: #eef1f6; --navy: #323b4c; --shadow: none;
  }
  html, body { background: #fff !important; color: var(--text); font-size: 9pt; line-height: 1.3; display: block; }
  .topbar, .field, .intro, .pager, .hero-actions, .eyebrow, .site-footer, .tip, .no-print, .print-hide { display: none !important; }
  html.intro-pre main, html.intro-live main, html.intro-out main, html.intro-quick main { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; }
  .page { display: block !important; padding: 0; animation: none !important; opacity: 1; }
  .ghost { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .cv.highlighting .job:not(.lit), .cv.highlighting .cred:not(.lit) { opacity: 1; }
  .print-only { display: block; font-size: 7pt; color: #8993a4; margin: 1.2mm 0 0; }
  a { color: inherit; text-decoration: none; }
  .wrap, .wrap.narrow { max-width: none; margin: 0; padding: 0; }
  code { background: none; padding: 0; }

  .hero { display: grid; grid-template-columns: 30mm minmax(0, 1fr); gap: 6mm; align-items: start; margin-bottom: 4mm; }
  .portrait { display: block !important; width: 30mm; aspect-ratio: auto; border-radius: 2mm; box-shadow: none; }
  .portrait img { width: 30mm; height: 38mm; object-fit: cover; display: block; }
  /* Manrope headings lose their word spaces in the PDF text layer ("MirekHavránek"); a small explicit word-spacing makes Chromium emit them */
  h1, h2, h3, .num { letter-spacing: 0; word-spacing: .08em; }
  .hero h1 { font-size: 22pt; margin: 0 0 1mm; }
  .role { font-size: 10pt; font-weight: 600; color: #3f4a5e; margin: 0 0 2mm; }
  .pitch { font-size: 8.8pt; max-width: none; margin: 0 0 1.6mm; }
  /* inline items with real separators, so position-based PDF parsers do not glue them into one token */
  .hero-meta { display: block; font-size: 8.4pt; margin: 0; color: #3f4a5e; }
  .hero-meta li { display: inline; }
  .hero-meta li + li::before { content: " \00b7  "; }
  h2 { font-size: 12pt; margin: 2.8mm 0 1.4mm; padding-bottom: .8mm; border-bottom: 0.4mm solid #323b4c; break-after: avoid; }
  h3 { break-after: avoid; }
  p { margin: 0 0 1.6mm; }

  /* one number per line, label beside it: a row-by-row parser then reads each number with its own label */
  .stats { grid-template-columns: 1fr; gap: .9mm; margin: 0 0 1mm; }
  .stat { display: grid; grid-template-columns: 34mm minmax(0, 1fr); align-items: baseline; column-gap: 3mm; padding: .9mm 2.2mm; border: 0.25mm solid #d9dee8; border-radius: 1.5mm; box-shadow: none; break-inside: avoid; }
  .num { font-size: 11pt; color: #323b4c; }
  .stat span { font-size: 7.6pt; line-height: 1.3; }
  .now-grid { grid-template-columns: 1fr 1fr; gap: 6mm; }
  .now-grid h2 { font-size: 10.5pt; }
  .now-grid p { font-size: 8.5pt; }

  .timeline { margin: 0 0 1mm; }
  .timeline::before { left: 1.35mm; top: 2mm; bottom: 2mm; width: 0.4mm; background: #c9cfda; }
  .job { padding: 0 0 1.6mm 6.5mm; break-inside: avoid; }
  .job::before { left: 0; top: 1.1mm; width: 3.2mm; height: 3.2mm; border-width: 0.6mm; background: #fff; }
  .job h3 { font-size: 10.3pt; margin: 0 0 .5mm; }
  .meta { font-size: 8.1pt; margin-bottom: 1.2mm; }
  .job p, .job li { font-size: 8.4pt; }
  .job ul { margin-top: .5mm; padding-left: 3.6mm; }
  .job li { margin: .4mm 0; }
  .cred-grid { grid-template-columns: 1fr; gap: 0; }
  .cred { padding: 0; border: 0; background: none; border-radius: 0; break-inside: avoid; }
  .cred h3 { font-size: 9.5pt; margin: 1.5mm 0 1mm; }
  .plain li { font-size: 8pt; line-height: 1.33; padding: .7mm 0; border-color: #e4e8ef; }

  .lead { font-size: 8.9pt; }
  .skillgroup { margin: 1.4mm 0 2mm; break-inside: avoid; }
  h2 + .lead { break-after: avoid; }
  .skillgroup h3 { font-size: 7.4pt; margin-bottom: 1mm; }
  .chips { display: block; line-height: 1.42; }
  .chip { display: inline; padding: 0; border: 0; background: none; font-size: 8.2pt; font-weight: 500; transform: none; }
  .chip::after { content: "; "; font-weight: 400; }
  .chip:last-child::after { content: "."; }
  .chip .proof { display: inline; color: #5b6578; font-size: 6.9pt; font-weight: 400; }
  .chip .proof::before { content: " ("; }
  .chip .proof::after { content: ")"; }
  .ai-list { gap: 1mm; margin: 0 0 2mm; }
  .ai-list li { padding: 1mm 2.2mm; font-size: 8.3pt; border: 0.25mm solid #d9dee8; border-left: 0.9mm solid #323b4c; border-radius: 1mm; break-inside: avoid; }
  .ai-list strong { display: inline; }
  .cards { grid-template-columns: 1fr 1fr; gap: 2mm; }
  .cards a { padding: 1.6mm 2.4mm; border: 0.25mm solid #d9dee8; border-radius: 1mm; }
  .cards strong { font-size: 9pt; }
  .cards span { font-size: 7.8pt; }

  .quotes { grid-template-columns: 1fr 1fr; gap: 2mm; margin: .8mm 0 1.4mm; }
  blockquote { padding: 1.2mm 2.4mm; border: 0.25mm solid #d9dee8; border-left: 0.9mm solid #323b4c; border-radius: 1mm; font-size: 8.2pt; break-inside: avoid; }
  blockquote p { margin: 0 0 .8mm; }
  blockquote footer { font-size: 7.3pt; }
  .footnote { font-size: 7.6pt; }
  #references h3 { font-size: 9.8pt; margin: 1.6mm 0 .6mm; }
  #references p, #references li { font-size: 8.5pt; }
  .refs li { font-size: 8pt; padding: .5mm 0; }
  /* last, and specific enough to beat `.page { display:block !important }` and `html.print-all .page` (Contact is not printed) */
  html.print-all .page.print-hide, html .page.print-hide, .print-hide { display: none !important; }
}

/* Cross-document view transition: when arriving from /projects/ (or any same-site page), dissolve in from the outgoing screen. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: vtArrive .6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes vtArrive { from { opacity: 0; filter: blur(10px); } to { opacity: 1; filter: none; } }
