/* Variant C: VC-style blocks. Archivo for display (heavy, tight), Source Sans 3 for text and figures.
   Light is the default; the dark theme follows the system setting unless the visitor picked one with the toggle (html[data-theme]). */
:root {
  --bg: #f6f5f2; --surface: #ffffff; --ink: #121212; --ink-2: #5c5c57;
  --line: #dddbd5; --line-strong: #c6c4bd; --grid: #ebeae5; --rule: #121212;
  --navy: #1b2d4f; --on-accent: #ffffff; --oxide: #b4472b; --cloud: #8c8a84; --chart-bg: var(--surface);
  --card-border: transparent;
  --c-orange: #c9552f; --c-green: #30a14e; --c-blue: #2a4a8a; --hint-ul: #2760b7;
  --sky-empty: #ebe9e4; --sky-1: #9be9a8; --sky-2: #40c463; --sky-3: #30a14e; --sky-4: #216e39;
  --font-text: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-chart: "Source Sans 3", "Helvetica Neue", Arial, sans-serif; --chart-fs: 13px;
  --section-pad: 96px; --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #121211; --c-orange: #e6805a; --c-green: #26a641; --c-blue: #9db5e3; --hint-ul: #7fa8ff; --surface: #1c1c1a; --ink: #f2f0ea; --ink-2: #a8a69e;
  --line: #2d2d2a; --line-strong: #44443f; --grid: #252523; --rule: #e7e5de;
  --navy: #9db5e3; --on-accent: #101214; --oxide: #e6805a; --cloud: #6c6b66;
  --card-border: #2a2a27;
  --sky-empty: #252523; --sky-1: #0e4429; --sky-2: #006d32; --sky-3: #26a641; --sky-4: #39d353;
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --c-orange: #e6805a; --c-green: #26a641; --c-blue: #9db5e3; --hint-ul: #7fa8ff; --surface: #1c1c1a; --ink: #f2f0ea; --ink-2: #a8a69e;
  --line: #2d2d2a; --line-strong: #44443f; --grid: #252523; --rule: #e7e5de;
  --navy: #9db5e3; --on-accent: #101214; --oxide: #e6805a; --cloud: #6c6b66;
  --card-border: #2a2a27;
  --sky-empty: #252523; --sky-1: #0e4429; --sky-2: #006d32; --sky-3: #26a641; --sky-4: #39d353;
  color-scheme: dark;
}
@media (min-width: 1024px) { :root { --section-pad: 150px; } }
::selection { background: color-mix(in srgb, var(--navy) 30%, transparent); }
h1, h2, h3, .pcard-tag, .btn-fill, .brand, .page-title { font-family: var(--font-display); }
.brand { font-weight: 700; letter-spacing: -0.01em; }
.site-header { background: var(--bg); }
.nav-list a { font-weight: 500; }
.nav-list a.is-active { border-bottom-color: var(--ink); }

/* theme toggle */
.theme-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; margin: -6px -8px -6px -4px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; transition: color var(--dur), background-color var(--dur); }
@media (hover: hover) { .theme-toggle:hover { color: var(--navy); background: color-mix(in srgb, var(--ink) 7%, transparent); } }
.theme-toggle .ico-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
@media (pointer: coarse) { .theme-toggle { width: 44px; height: 44px; margin: -10px -12px -10px -6px; } }
@media (max-width: 400px) { .nav { gap: 10px; } .nav-right { gap: 10px; } }

/* scroll progress along the bottom edge of the header (added by motion.js) */
.scrollbar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); pointer-events: none; }

/* ---------- hero: the headline is pinned while its words light up with the scroll ---------- */
/* the pinned distance gives every drawing at least about one wheel notch (100 px) of scroll, also on short screens */
.hero-track { position: relative; height: calc(100svh + max(95svh, 960px) - var(--nav-h)); }
.hero-pin { position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); box-sizing: border-box; max-width: var(--max); margin-inline: auto; padding: 24px var(--gutter) 96px; display: flex; flex-direction: column; justify-content: center; }
.hero-title { word-spacing: 0.06em; font-weight: 800; font-size: clamp(30px, min(4.1vw, 6.8svh), 64px); line-height: 1.04; letter-spacing: -0.03em; max-width: 24ch; text-wrap: pretty; }
@media (min-width: 1100px) and (min-height: 560px) {
  .hero-pin { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-content: center; align-items: center; column-gap: 64px; }
  .hero-title { max-width: none; }
}
.hero-sentence { display: block; text-wrap: pretty; }
/* the second sentence is the subtitle: much smaller than the title, still lit word by word with it */
.hero-sentence + .hero-sentence { margin-top: clamp(16px, 3.2svh, 30px); font-size: clamp(24px, min(2.35vw, 3.8svh), 34px); font-weight: 600; line-height: 1.28; letter-spacing: -0.015em; word-spacing: 0; max-width: 36ch; }
.hero-hint { position: absolute; left: var(--gutter); bottom: 28px; margin: 0; display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--ink-2); opacity: var(--hero-hint, 1); }
.hero-hint::before { content: ""; width: 1px; height: 30px; background: currentColor; transform-origin: top; }
@media (prefers-reduced-motion: no-preference) { .hero-hint::before { animation: hint 2.4s var(--ease) 1.2s 3 both; } }
@keyframes hint { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-height: 520px) { .hero-hint { display: none; } }
.hero::after { display: none; }
.hero-rest { padding-top: 0; padding-bottom: 72px; }
.deck { font-size: 20px; margin-top: 0; max-width: 52ch; }
.btn-fill { display: inline-block; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 700; font-size: 16px; padding: 14px 22px; border-radius: 999px; letter-spacing: -0.005em; transition: background-color 200ms, color 200ms, translate 300ms var(--ease); }
@media (hover: hover) { .btn-fill:hover { background: var(--navy); color: var(--on-accent); translate: 0 -2px; } }
.sheet-rows { border-top: 1px solid var(--rule); }
.sheet-row dt { font-weight: 600; color: var(--ink); }
@media (min-width: 640px) { .deck { font-size: 22px; } }
/* portraits: plain photos with the card radius, 4:5, no frame; in the hero beside the deck, in the contact section beside the e-mail */
.photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; background: var(--grid); }
.hero-photo { max-width: 240px; margin-bottom: 28px; }
.contact-row { display: grid; gap: 32px; }
.contact-photo { max-width: 240px; }
@media (min-width: 1024px) {
  .hero-rest { padding-top: 24px; padding-bottom: 96px; }
  .hero-photo { grid-column: 1 / span 3; max-width: none; margin-bottom: 0; }
  .hero-text { grid-column: 4 / span 5; } .sheet { grid-column: 9 / span 4; padding-top: 8px; }
  .hero-rest:not(:has(.hero-photo)) .hero-text { grid-column: 1 / span 8; }
  .contact-row { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .contact-text { grid-column: 1 / span 8; }
  .contact-photo { grid-column: 10 / span 3; max-width: none; }
}
@media (prefers-reduced-motion: reduce), (prefers-contrast: more), (forced-colors: active) {
  .hero-track { height: auto; }
  .hero-pin { position: static; height: auto; min-height: 62svh; padding-top: 56px; padding-bottom: 56px; }
  .hero-hint { display: none; }
}
:root.motion-fail .hero-track { height: auto; }
:root.motion-fail .hero-pin { position: static; height: auto; min-height: 62svh; padding-top: 56px; padding-bottom: 56px; }
:root.motion-fail .hero-hint { display: none; }
/* very short viewports (large zoom): no pinning, the whole headline is visible */
@media (max-height: 520px) {
  .hero-track { height: auto; }
  .hero-pin { position: static; height: auto; min-height: 0; padding-top: 40px; padding-bottom: 40px; }
  .hero-hint { display: none; }
  .hero-title .w { opacity: 1 !important; }
}
/* without JavaScript nothing lights up, so the headline is a plain block */
:root:not(.js) .hero-track { height: auto; }
:root:not(.js) .hero-pin { position: static; height: auto; min-height: 62svh; padding-top: 56px; padding-bottom: 56px; }
:root:not(.js) .hero-hint { display: none; }

/* without JavaScript the phone menu cannot open, so the links sit in a row under the brand and the theme toggle (which needs a script) is hidden */
:root:not(.js) .nav-toggle, :root:not(.js) .theme-toggle { display: none; }
@media (max-width: 1023px) {
  :root:not(.js) .site-header { position: static; }
  :root:not(.js) .nav { flex-wrap: wrap; }
  :root:not(.js) .nav-menu { position: static; display: block; order: 3; width: 100%; padding: 0 0 12px; overflow: visible; }
  :root:not(.js) .nav-list { display: flex; flex-wrap: wrap; gap: 0 18px; }
  :root:not(.js) .nav-list li { border-bottom: 0; }
  :root:not(.js) .nav-list a { font-size: 16px; padding: 6px 0; }
  :root:not(.js) .nav-menu .nav-lang { display: none; }
}

/* ---------- sections: big display titles as blocks ---------- */
.section { display: block; }
.rail { border-bottom: 0; padding-bottom: 0; margin-bottom: 28px; }
.rail h2, .page-title { font-weight: 800; font-size: clamp(40px, 7vw, 96px); line-height: 0.95; letter-spacing: -0.035em; }
.content { max-width: none; }
.rail h2, .page-title { transform: translate3d(0, var(--drift, 0px), 0); }
/* figures beside scroll-lit words (hero and profile): black and white line drawings from src/figs.mjs; shown from 1100 px wide
   and only while the scroll motion runs, so reduced motion, no script and the failsafe keep the plain text */
.lead-row { display: grid; }
@media (min-width: 1100px) and (min-height: 560px) {
  #profil.section .content, #profile.section .content { grid-column: 1 / span 12; }
  #profil .kv-block, #profile .kv-block { max-width: calc(100% * 10 / 12); }
  .lead-row { grid-template-columns: auto minmax(0, 1fr); column-gap: 56px; align-items: center; }
}
.fig-art { display: none; position: relative; width: 100%; color: var(--ink); pointer-events: none; }
.fig-art-hero { max-width: 440px; aspect-ratio: 1; justify-self: end; }
.fig-art-profile { max-width: 420px; aspect-ratio: 4 / 3; justify-self: end; }
.fig-art .fig { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: 0; transform: translateY(12px); transition: opacity 160ms ease, transform 160ms ease; }
.fig-art .fig.on { opacity: 1; transform: none; transition: opacity 520ms var(--ease) 160ms, transform 800ms var(--ease) 160ms; }
:root.theme-anim .fig-art { transition: color 350ms ease; }
:root.theme-anim .fig .ring { transition: fill 350ms ease, opacity 500ms var(--ease) var(--t, 0ms); }
.fig .g { stroke-width: 1; opacity: 0.3; }
/* one accent per drawing, by topic: finance orange (as the VaR line of the tools), software and algorithms green (as the commit
   graph), AI blue; the rest of the drawing stays ink */
.fig[data-fig="mff"], .fig[data-fig="fin"], .fig[data-fig="ets"], .fig[data-fig="port"] { --hue: var(--c-orange); }
.fig[data-fig="sw"], .fig[data-fig="alg"], .fig[data-fig="map"], .fig[data-fig="pipe"] { --hue: var(--c-green); }
.fig[data-fig="ai"], .fig[data-fig="proc"], .fig[data-fig="edu"] { --hue: var(--c-blue); }
.fig .d.acc { stroke: var(--hue, currentColor); }
.fig .dot.acc { fill: var(--hue, currentColor); }
:root.theme-anim .fig .d.acc { transition: stroke 350ms ease, stroke-dashoffset 1400ms var(--ease) var(--t, 0ms); }
:root.theme-anim .fig .dot.acc { transition: fill 350ms ease, opacity 500ms var(--ease) var(--t, 0ms); }
.fig .d { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1400ms var(--ease) var(--t, 0ms); }
.fig .dot { fill: currentColor; stroke: none; opacity: 0; transition: opacity 500ms var(--ease) var(--t, 0ms); }
.fig .ring { fill: var(--bg); opacity: 0; transition: opacity 500ms var(--ease) var(--t, 0ms); }
.fig.drawn .d { stroke-dashoffset: 0; }
.fig.drawn .dot, .fig.drawn .ring { opacity: 1; }
@media (min-width: 1100px) and (min-height: 560px) and (prefers-reduced-motion: no-preference) { :root.js:not(.motion-fail) .fig-art { display: block; } }
/* below 1100 px the headline sits higher and its drawing comes under it (the profile keeps plain text there) */
@media (max-width: 1099px) and (min-height: 560px) {
  .hero-pin { justify-content: flex-start; padding-top: clamp(28px, 7svh, 72px); }
  .fig-art-hero { width: min(100%, 34svh, 380px); margin-top: clamp(20px, 4svh, 40px); align-self: center; }
  :root.js:not(.motion-fail) .fig-art-hero { display: block; }
}
@media (max-width: 1099px) and (prefers-reduced-motion: reduce) { .fig-art-hero { display: none !important; } }
@media (forced-colors: active), (prefers-contrast: more) { .fig-art { display: none !important; } }
/* notes on tagged phrases (hero and profile): the phrase is a link with a dotted underline under its words; assets/js/hints.js
   shows a small note with a link on hover, keyboard focus or a first tap, placed inside the pinned hero or the profile row */
.hint { color: inherit; text-decoration: none; }
.hint .u { text-decoration: underline dotted; text-decoration-thickness: max(2px, 0.05em); text-underline-offset: 0.15em; text-decoration-color: var(--hint-ul); }
.hint:hover, .hint:focus-visible { color: inherit; }
.hint.is-open .u, .hint:focus-visible .u { text-decoration-style: solid; text-decoration-color: var(--hint-ul); }
@media (hover: hover) { .hint:hover .u { text-decoration-style: solid; text-decoration-color: var(--hint-ul); } }
.lead-row { position: relative; }
.hint-pop { position: absolute; z-index: 20; left: 0; top: 0; box-sizing: border-box; width: max-content; max-width: min(320px, calc(100vw - 24px)); padding: 12px 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 6px; font: 400 15px/1.45 var(--font-text); letter-spacing: normal; word-spacing: normal; text-align: left; visibility: hidden; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity 140ms ease, transform 200ms var(--ease), visibility 0s linear 200ms; }
.hint-pop.is-open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity 160ms ease, transform 240ms var(--ease), visibility 0s; }
.hint-text { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.hint-link { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--ink); }
.hint-link:hover { color: var(--navy); }
@media (pointer: coarse) { .hint-link { padding: 8px 0; margin: -2px 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .hint-pop { transform: none; } }
.lead, .deck, .row-exit, .edu-note { text-wrap: pretty; }
.lead { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.25; letter-spacing: -0.015em; max-width: 36ch; }
.section-heading { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.25; letter-spacing: -0.015em; max-width: 36ch; }
.section-intro { font-size: 18px; max-width: 56ch; margin-bottom: 28px; }
.kv-block { margin-top: 44px; }
.kv-block h3 { font-size: 20px; letter-spacing: -0.01em; }
@media (min-width: 1024px) {
  .section { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .rail { grid-column: 1 / span 12; margin-bottom: 40px; }
  .content { grid-column: 1 / span 12; }
  #profil .content, #profile .content { grid-column: 1 / span 10; }
  .ledger { margin-top: 0; }
}

/* ---------- ledgers (experience, education) ---------- */
.ledger { border-top: 1px solid var(--rule); }
.row { padding: 28px 0; border-bottom: 0; position: relative; }
.row::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); transform-origin: left; }
.row-head h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.row-role { font-style: normal; font-size: 16px; }
@media (min-width: 1024px) { .row, #vzdelani .row, #education .row { padding: 36px 0; } .row-head h3 { font-size: 30px; } }
.edu-note, .interests { margin-top: 36px; }
.row-exit { font-size: 15px; }
.interests a { text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--navy); }
.interests a:hover { color: var(--navy); }

/* ---------- activity (contribution graph) and project grid ---------- */
.activity { background: var(--surface); border: 1px solid var(--card-border); border-radius: 6px; padding: 18px 16px; margin-bottom: 16px; }
/* the graph is one figure, how many commits in the last year, next to a small calendar of the last five weeks (one row per week);
   statistics, legend and hint text are hidden (the hint stays for screen readers because the canvas is described by it) */
.activity .skyline-stats, .activity .skyline-corner, .activity .skyline-legend { display: none; }
.activity .skyline-foot { margin: 0; }
.activity .skyline-hint { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.activity .skyline { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); gap: 0 clamp(14px, 4vw, 44px); align-items: center; }
.activity .skyline-plot { grid-area: 1 / 1; width: 100%; max-width: 280px; justify-self: start; }
.activity .skyline-head { grid-area: 1 / 2; margin: 0; flex-direction: column; align-items: flex-start; gap: 10px; }
.activity .skyline-title { text-wrap: balance; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: clamp(14px, 1.7vw, 19px); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; }
.activity .skyline-title-num { font-size: clamp(48px, 7.4vw, 88px); font-weight: 800; line-height: 0.84; letter-spacing: -0.03em; }
@media (min-width: 640px) {
  .activity { padding: 24px 28px; margin-bottom: 20px; }
  .activity .skyline { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 0 48px; }
  .activity .skyline-head { gap: 14px; }
}
.pgrid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pcard { background: var(--surface); border: 1px solid var(--card-border); border-radius: 6px; padding: 26px 24px 28px; display: flex; flex-direction: column; gap: 10px; transition: translate 400ms var(--ease), border-color 300ms; }
@media (hover: hover) { .pcard:hover { translate: 0 -4px; border-color: var(--line-strong); } }
.pcard h3 { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; margin-top: 10px; }
.pcard h3 a { text-decoration: none; } .pcard h3 a:hover { text-decoration: underline; }
.pcard-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--ink-2); }
.pcard-tag { font-weight: 600; color: var(--ink); font-size: 14px; }
.pcard-role { font-size: 17px; color: var(--ink-2); margin-top: -4px; }
.pcard .results { margin-top: 6px; } .pcard .results li { font-size: 16px; }
.pcard .row-stack { margin-top: auto; padding-top: 14px; font-size: 14px; }
.pcard-wide .row-stack { margin-top: 0; }
@media (min-width: 640px) { .pgrid { grid-template-columns: 1fr 1fr; gap: 20px; } .pcard-wide { grid-column: 1 / -1; } .pcard-wide h3 { font-size: 40px; } .pcard { padding: 32px 30px 34px; } }
@media (min-width: 1024px) { .pgrid { grid-template-columns: repeat(3, 1fr); } .pcard-wide { grid-column: 1 / span 2; } }
/* a last card that would stand alone in its row (the first card spans two columns, so that is a count divisible by three) takes
   the whole row: tag and period across the top as on every card, then the title on the left and the points on the right */
@media (min-width: 1024px) {
  .pgrid > .pcard:not(.pcard-wide):last-child:nth-child(3n) { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-content: start; column-gap: 48px; row-gap: 10px; }
  .pgrid > .pcard:not(.pcard-wide):last-child:nth-child(3n) > * { grid-column: 1; }
  .pgrid > .pcard:not(.pcard-wide):last-child:nth-child(3n) > .pcard-meta { grid-column: 1 / -1; }
  .pgrid > .pcard:not(.pcard-wide):last-child:nth-child(3n) > .results { grid-column: 2; grid-row: 2 / span 3; margin-top: 0; }
}

/* ---------- tools: teaser on the home page, full tools on their own page ---------- */
.tcards { display: grid; grid-template-columns: 1fr; gap: 16px; }
.tcard a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--card-border); border-radius: 6px; overflow: hidden; transition: translate 400ms var(--ease), border-color 300ms; }
@media (hover: hover) { .tcard a:hover { translate: 0 -4px; border-color: var(--line-strong); color: inherit; } }
.tcard-art { display: block; padding: 22px 22px 4px; color: var(--ink); }
.tcard-art svg { display: block; width: 100%; max-width: 400px; height: auto; overflow: visible; }
/* thumbnails: the classes only set the colour; every stroke and fill in the SVG is currentColor */
.th-ink { color: var(--ink); } .th-muted { color: var(--ink-2); } .th-grid { color: var(--line-strong); }
.th-accent { color: var(--navy); } .th-oxide { color: var(--oxide); } .th-fill-muted { color: var(--cloud); }
.tcard-body { display: block; padding: 14px 22px 26px; }
.tcard h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; }
.tcard p { margin-top: 8px; font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.section-teaser .actions { margin-top: 36px; }
@media (min-width: 700px) { .tcards { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 900px) { .tcards { gap: 20px; } }
.page-head { max-width: var(--max); margin-inline: auto; padding: 48px var(--gutter) 0; }
.crumb { font-size: 15px; margin-bottom: 36px; }
.crumb a { color: var(--ink-2); } .crumb a:hover { color: var(--navy); }
.page-title { font-size: clamp(56px, 11vw, 168px); line-height: 0.9; letter-spacing: -0.045em; }
.page-intro { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.25; letter-spacing: -0.015em; max-width: 36ch; margin-top: 32px; }
.page-index ul { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.page-index a { display: inline-block; text-decoration: none; font-weight: 600; font-size: 16px; padding: 9px 18px; border: 1px solid var(--line-strong); border-radius: 999px; transition: background-color 200ms, color 200ms, border-color 200ms; }
@media (hover: hover) { .page-index a:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); } }
.page-more { margin-top: 20px; font-size: 16px; color: var(--ink-2); }
.section-tools { padding-top: 56px; }
.section-tools > .content { grid-column: 1 / -1; }
.tools { margin-top: 0; gap: 96px; }
.tool-title { font-size: 34px; font-weight: 700; letter-spacing: -0.025em; }
.tool-quote { font-size: 19px; }
.panel { background: var(--surface); border: 1px solid var(--card-border); border-radius: 6px; padding: 0 24px; }
@media (min-width: 1024px) { .chart { padding-left: 24px; padding-right: 0; } }
.skills-grid { border-top: 1px solid var(--rule); }
/* the AI engineering frame: a light outlined card; its cells are the same .skill cells as above */
.card-frame { margin-top: 36px; background: var(--surface); border-color: var(--line-strong); border-radius: 6px; padding: 16px 16px 14px; }
.card-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.interests-card .interests { margin-top: 0; font-size: 17px; }
@media (min-width: 640px) { .card-frame { padding: 20px 22px 18px; } .card-frame.ai-frame { margin-top: 40px; } }
@media (min-width: 900px) { .card-frame { padding: 24px 28px 20px; } .ai-grid { gap: 0 36px; } }
.contact-email { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; font-size: clamp(28px, 5.6vw, 76px); line-height: 1; }
.contact-email a { text-decoration: none; } .contact-email a:hover { text-decoration: underline; }
.contact-list { font-size: 19px; }
#kontakt, #contact { padding-bottom: 24px; }

/* colour changes when the theme is flipped */
:root.theme-anim body, :root.theme-anim .site-header, :root.theme-anim .pcard, :root.theme-anim .panel, :root.theme-anim .activity, :root.theme-anim .tcard a, :root.theme-anim .btn-fill, :root.theme-anim .page-index a { transition: background-color 350ms ease, color 350ms ease, border-color 350ms ease; }

/* ---------- motion (JS-gated, reduced-motion safe) ----------
   The hidden states below apply only while the page runs motion.js (html.js, no html.motion-fail) and the visitor allows motion.
   motion.js adds .in when an element scrolls into view; the delay of stacked items comes from --i. */
[data-magic] .w { transition: none; }
:root.js:not(.motion-ready):not(.motion-fail) [data-magic] .w { opacity: 0.6; }
:root.js:not(.motion-ready):not(.motion-fail) .hero-title .w.l0 { opacity: 1; }
:root.motion-fail [data-magic] .w { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce), (prefers-contrast: more), (forced-colors: active) { [data-magic] .w { opacity: 1 !important; } }
.mw { display: inline-block; overflow: clip; vertical-align: top; padding: 0.06em 0.04em 0.16em; margin: -0.06em -0.04em -0.16em; }
.mw > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  :root.js:not(.motion-fail) [data-reveal="rail"] .mw > span, :root.js:not(.motion-fail) .page-title .mw > span { transition: transform 950ms var(--ease); }
  :root.js:not(.motion-fail) [data-reveal="rail"]:not(.in) .mw > span { transform: translateY(112%); }
  :root.js:not(.motion-fail) [data-reveal="rail"] .mw:nth-child(2) > span { transition-delay: 70ms; }
  :root.js:not(.motion-fail) [data-reveal="rail"] .mw:nth-child(3) > span { transition-delay: 140ms; }
  :root.js:not(.motion-fail) [data-reveal="rail"] .mw:nth-child(4) > span { transition-delay: 210ms; }
  :root.js:not(.motion-fail) .page-title .mw > span { animation: mask-up 950ms var(--ease) both; }
  :root.js:not(.motion-fail) .page-title .mw:nth-child(2) > span { animation-delay: 80ms; }
  /* ledger rows: the hairline draws, then date, title and body come in one after another */
  :root.js:not(.motion-fail) [data-reveal="row"] .row-date, :root.js:not(.motion-fail) [data-reveal="row"] .row-head, :root.js:not(.motion-fail) [data-reveal="row"] .row-body { transition: opacity 800ms var(--ease), transform 900ms var(--ease); }
  :root.js:not(.motion-fail) [data-reveal="row"]::after { transition: transform 1200ms var(--ease); }
  :root.js:not(.motion-fail) [data-reveal="row"]:not(.in)::after { transform: scaleX(0); }
  :root.js:not(.motion-fail) [data-reveal="row"]:not(.in) .row-date { opacity: 0; transform: translateX(-20px); }
  :root.js:not(.motion-fail) [data-reveal="row"]:not(.in) .row-head { opacity: 0; transform: translateY(28px); }
  :root.js:not(.motion-fail) [data-reveal="row"]:not(.in) .row-body { opacity: 0; transform: translateY(28px); }
  :root.js:not(.motion-fail) [data-reveal="row"] .row-head { transition-delay: calc(100ms + var(--i, 0) * 90ms); }
  :root.js:not(.motion-fail) [data-reveal="row"] .row-body { transition-delay: calc(200ms + var(--i, 0) * 90ms); }
  :root.js:not(.motion-fail) [data-reveal="row"] .row-date, :root.js:not(.motion-fail) [data-reveal="row"]::after { transition-delay: calc(var(--i, 0) * 90ms); }
  :root.js:not(.motion-fail) [data-reveal="kv"] { transition: opacity 700ms var(--ease), transform 800ms var(--ease); }
  :root.js:not(.motion-fail) [data-reveal="kv"]:not(.in) { opacity: 0; transform: translateX(-16px); }
  :root.js:not(.motion-fail) [data-reveal="rise"] { transition: opacity 800ms var(--ease), transform 900ms var(--ease); }
  :root.js:not(.motion-fail) [data-reveal="rise"]:not(.in) { opacity: 0; transform: translateY(30px); }
  /* cards tilt up into place */
  :root.js:not(.motion-fail) [data-reveal="card"] { transition: opacity 800ms var(--ease), transform 1000ms var(--ease), translate 400ms var(--ease), border-color 300ms; transform-origin: 50% 100%; }
  :root.js:not(.motion-fail) [data-reveal="card"]:not(.in) { opacity: 0; transform: perspective(1000px) translateY(56px) rotateX(7deg) scale(0.965); }
  /* panels (tools, activity) settle from slightly below and larger */
  :root.js:not(.motion-fail) [data-reveal="panel"] { transition: opacity 900ms var(--ease), transform 1100ms var(--ease); }
  :root.js:not(.motion-fail) [data-reveal="panel"]:not(.in) { opacity: 0; transform: translateY(44px) scale(0.985); }
  /* the target of a #hash link is shown in place at once, so the browser scrolls to its final position and the header does not cover it */
  :root.js:not(.motion-fail) [data-reveal]:target, :root.js:not(.motion-fail) [data-reveal]:focus-within { opacity: 1 !important; transform: none !important; transition: none !important; }
  /* tool thumbnails draw themselves */
  :root.js:not(.motion-fail) [data-reveal="kv"], :root.js:not(.motion-fail) [data-reveal="rise"], :root.js:not(.motion-fail) [data-reveal="card"], :root.js:not(.motion-fail) [data-reveal="panel"] { transition-delay: calc(var(--i, 0) * 90ms); }
  :root.js:not(.motion-fail) .tcard .th-draw { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1800ms var(--ease) 250ms; }
  :root.js:not(.motion-fail) .tcard:not(.in) .th-draw { stroke-dashoffset: 1; }
  /* the rest of the drawing fades in under the line, the markers arrive once the line has passed them */
  :root.js:not(.motion-fail) .tcard svg > :not(.th-draw, circle) { transition: opacity 900ms var(--ease) 100ms; }
  :root.js:not(.motion-fail) .tcard svg > circle { transition: opacity 500ms var(--ease) 600ms; }
  :root.js:not(.motion-fail) .tcard:not(.in) svg > :not(.th-draw) { opacity: 0; }
}
@keyframes mask-up { from { transform: translateY(112%); } to { transform: none; } }

/* printing: show everything in its final state */
@media print {
  [data-magic] .w { opacity: 1 !important; }
  .hero-track { height: auto !important; }
  .hero-pin { position: static !important; height: auto !important; min-height: 0 !important; }
  [data-reveal], [data-reveal] * { opacity: 1 !important; transform: none !important; }
  .mw > span { transform: none !important; }
  .rail h2, .page-title { transform: none !important; }
  .scrollbar, .hero-hint, .theme-toggle, .fig-art, .hint-pop { display: none !important; }
  .hint .u { text-decoration: none; }
}
