/* ssobczak.net
   One 680px reading column, quiet header, no sidebars. Infino navy as ink, crimson as the single accent.
   Light by default; dark only on an explicit choice (header toggle, stored in localStorage). */
/* Self-hosted fonts (Google Fonts, variable): Latin + Polish letters only. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/fonts/inter-normal-latin.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: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/static/fonts/inter-normal-pl.woff2") format("woff2"); unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/static/fonts/source-serif-4-normal-latin.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: "Source Serif 4"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("/static/fonts/source-serif-4-normal-pl.woff2") format("woff2"); unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url("/static/fonts/source-serif-4-italic-latin.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: "Source Serif 4"; font-style: italic; font-weight: 400; font-display: swap; src: url("/static/fonts/source-serif-4-italic-pl.woff2") format("woff2"); unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("/static/fonts/jetbrains-mono-normal-latin.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: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("/static/fonts/jetbrains-mono-normal-pl.woff2") format("woff2"); unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C; }

:root {
  --bg: #FFFFFF;
  --panel: #F6F7FB;
  --ink: #1E1D45;          /* body text (Infino NAVY_INK) */
  --heading: #282658;      /* headings (Infino NAVY) */
  --muted: #6B6A88;        /* meta, captions: 5.2:1 on bg */
  --rule: #E7E7F0;
  --rule-strong: #CFCFE0;
  --accent: #AD1545;       /* links + the one highlighted value (Infino CRIMSON) */
  --series: #282658;       /* chart marks */
  --series-soft: #D9D9EA;
  --code-bg: #F6F7FB;
  --syn-kw: #AD1545; --syn-str: #2F6B4F; --syn-com: #6B6A88; --syn-fn: #282658; --syn-num: #8A4B08;

  --font-text: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 680px;
  --step--1: 0.875rem; --step-0: 1.125rem; --step-1: 1.25rem; --step-2: 1.5rem; --step-3: 2.125rem;
  --space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px; --space-5: 40px; --space-6: 64px;
  --radius: 6px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #25263B; --panel: #2E2F47; --ink: #E4E4F0; --heading: #F4F4FA; --muted: #A5A4C0;
  --rule: #3A3B56; --rule-strong: #4C4E6C; --accent: #F07799; --series: #B3B1EC; --series-soft: #42435F;
  --code-bg: #2E2F47;
  --syn-kw: #F07799; --syn-str: #8FD1AE; --syn-com: #A5A4C0; --syn-fn: #C9C7F5; --syn-num: #E8B07A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: 15px; line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: var(--space-5) var(--space-6);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }

/* ---------- Header, footer ---------- */
.site { max-width: var(--measure); margin: 0 auto; display: grid; gap: var(--space-5); }
main { display: grid; gap: var(--space-6); min-width: 0; }
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-2) var(--space-4); }
.wordmark { font-weight: 700; font-size: 1.0625rem; color: var(--heading); text-decoration: none; letter-spacing: -0.01em; }
.wordmark span { color: var(--accent); }
.nav { display: flex; gap: var(--space-4); font-size: var(--step--1); align-items: baseline; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a[aria-current] { color: var(--heading); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.nav a:hover { color: var(--accent); }
.theme-toggle { font: inherit; background: none; border: 0; padding: 0 2px; color: var(--muted); cursor: pointer; }
.theme-toggle:hover { color: var(--accent); }
.site-footer { border-top: 1px solid var(--rule); padding-top: var(--space-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); font-size: var(--step--1); color: var(--muted); }
.site-footer nav { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Home ---------- */
.hello { display: grid; gap: var(--space-3); }
.hello h1 { margin: 0; font-size: var(--step-3); line-height: 1.15; font-weight: 700; color: var(--heading); letter-spacing: -0.02em; text-wrap: balance; }
.hello .role { margin: 0; font-size: var(--step--1); color: var(--muted); }
.hello .role a { font-weight: 500; text-decoration: none; }
.hello p.bio { margin: 0; font-family: var(--font-text); font-size: var(--step-0); line-height: 1.6; }
.block { display: grid; gap: var(--space-3); }
.list-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.list-head h2 { margin: 0; font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.list-head .more { font-size: var(--step--1); text-decoration: none; }
.empty { margin: 0; color: var(--muted); }
.filter { display: flex; gap: 2px; font-size: 12px; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 2px; }
.filter button { font: inherit; font-weight: 500; border: 0; background: none; color: var(--ink); padding: 3px 10px; border-radius: 999px; cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--heading); color: var(--bg); }
.entries { list-style: none; margin: 0; padding: 0; }
.entries li { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--space-1) var(--space-3); padding-block: 12px; border-top: 1px solid var(--rule); }
.entries li > * { min-width: 0; }
.entries time { font-family: var(--font-mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 3px; }
.entries a { color: var(--ink); text-decoration: none; font-family: var(--font-text); font-size: var(--step-0); line-height: 1.4; }
.entries a:hover { color: var(--accent); }
.entries .excerpt { margin: 4px 0 0; font-family: var(--font-text); font-size: 1rem; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta-tags { display: flex; gap: var(--space-2); margin-top: 4px; font-size: 12px; color: var(--muted); }
.lang { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; border: 1px solid var(--rule-strong); border-radius: 3px; padding: 0 4px; color: var(--ink); }
@media (max-width: 520px) { .entries li { grid-template-columns: 1fr; } }

/* ---------- Post ---------- */
.post { display: grid; gap: var(--space-4); min-width: 0; }
.post-head { display: grid; gap: var(--space-3); }
.post-head h1 { margin: 0; font-size: var(--step-3); line-height: 1.15; font-weight: 700; color: var(--heading); letter-spacing: -0.02em; text-wrap: balance; }
.post-meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: center; font-size: var(--step--1); color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.lead { font-family: var(--font-text); font-size: var(--step-1); line-height: 1.55; margin: 0; color: var(--ink); }
.discuss { margin: 0; font-size: var(--step--1); }

.prose { font-family: var(--font-text); font-size: var(--step-0); line-height: 1.65; display: grid; gap: 1.1em; min-width: 0; }
.prose > * { margin: 0; min-width: 0; }
.prose h2 { font-family: var(--font-ui); font-size: var(--step-2); line-height: 1.25; font-weight: 650; color: var(--heading); margin-top: 0.9em; letter-spacing: -0.01em; text-wrap: balance; }
.prose h3 { font-family: var(--font-ui); font-size: var(--step-1); line-height: 1.3; font-weight: 600; color: var(--heading); margin-top: 0.4em; }
.prose a { text-decoration-line: underline; text-decoration-color: var(--rule-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { font-weight: 600; color: var(--heading); }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 0.35em; }
.prose li > p { margin: 0; }
.prose li::marker { color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: 0.82em; background: var(--code-bg); border: 1px solid var(--rule); border-radius: 4px; padding: 0.05em 0.3em; }
.prose blockquote { border-left: 2px solid var(--rule-strong); padding-left: var(--space-3); font-style: italic; }
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); width: 100%; }
.prose img { border-radius: 4px; }

/* code block: filename tab + Pygments class names */
.code { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.code-name { font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding: 6px 14px; border-bottom: 1px solid var(--rule); }
.code pre { margin: 0; padding: 14px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.6; color: var(--ink); tab-size: 4; }
.code pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.k, .kn, .kd, .kr, .kc, .ow { color: var(--syn-kw); }
.s, .s1, .s2, .sa, .sb, .sc, .se, .si, .sd, .sh { color: var(--syn-str); }
.c, .c1, .cm, .ch, .cs { color: var(--syn-com); font-style: italic; }
.sd { font-style: italic; }
.nf, .nc, .nb, .fm, .bp { color: var(--syn-fn); font-weight: 500; }
.mi, .mf, .mh, .mo, .il { color: var(--syn-num); }
.gp { color: var(--muted); user-select: none; }

/* figures, charts, diagrams */
figure { display: grid; gap: var(--space-2); }
figcaption { font-family: var(--font-ui); font-size: var(--step--1); color: var(--muted); line-height: 1.45; }
figcaption b { color: var(--ink); font-weight: 600; }
.chart-title { font-family: var(--font-ui); font-size: 0.9375rem; font-weight: 600; color: var(--heading); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font-ui); font-size: 12px; fill: var(--muted); }
.chart .val { fill: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .val-hl { fill: var(--accent); font-weight: 700; }
.chart .bar { fill: var(--series); }
.chart .bar-hl { fill: var(--accent); }
.chart .base { stroke: var(--rule-strong); stroke-width: 1; }
.chart .join { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.diagram { border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--space-3); overflow-x: auto; }
.diagram pre.mermaid { margin: 0; background: none; text-align: center; font-family: var(--font-ui); }

/* tables: numbers right-aligned (Markdown `---:`), tabular figures, no header fill */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-family: var(--font-ui); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 600; color: var(--heading); border-bottom: 1px solid var(--heading); padding: 8px 10px; vertical-align: bottom; font-size: var(--step--1); }
td { padding: 8px 10px; border-bottom: 1px solid var(--rule); }
th[style*="right"], td[style*="right"] { white-space: nowrap; }
tbody tr:nth-child(even) td { background: var(--panel); }

/* note (Obsidian callout): panel fill + small label, no side rail */
.note { background: var(--panel); border-radius: var(--radius); padding: 14px 18px; font-size: 1rem; line-height: 1.6; display: grid; gap: 4px; }
.note p { margin: 0; }
.note-label { font-family: var(--font-ui); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--heading); }

/* footnotes (markdown-it footnote plugin) */
.footnotes-sep { display: none; }
.footnotes { border-top: 1px solid var(--rule); padding-top: var(--space-3); font-family: var(--font-ui); font-size: var(--step--1); color: var(--muted); }
.footnotes ol { margin: 0; padding-left: 1.2em; }
.footnote-ref a { text-decoration: none; font-family: var(--font-ui); font-size: 0.75em; font-weight: 600; }

/* ---------- Talks ---------- */
.slide { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #FFFFFF; border: 1px solid var(--rule-strong); border-radius: 4px; }
.viewer { display: grid; gap: var(--space-2); }
.viewer-stage .slide { display: none; }
.viewer-stage .slide.on { display: block; }
.viewer-stage .slide { cursor: zoom-in; }
.lightbox { border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100vw; height: 100dvh; background: #101020; color: #E4E4F0; }
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.lightbox::backdrop { background: #101020; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; min-height: 0; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.lb-bar { display: flex; justify-content: center; align-items: center; gap: var(--space-3); padding: 12px 16px max(12px, env(safe-area-inset-bottom, 0px)); }
.lb-bar button { font: inherit; font-size: 1rem; color: #E4E4F0; background: transparent; border: 1px solid #4C4E6C; border-radius: var(--radius); padding: 6px 14px; cursor: pointer; }
.lb-bar button:hover:not(:disabled) { border-color: #E4E4F0; }
.lb-bar button:disabled { opacity: 0.35; cursor: default; }
.lb-bar [data-lb-close] { margin-left: var(--space-4); }
.lb-bar .count { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: center; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); font-size: var(--step--1); color: var(--muted); flex-wrap: wrap; }
.viewer-bar .pdf { font-weight: 500; text-decoration: none; }
.viewer-bar .ctrls { display: flex; gap: var(--space-2); align-items: center; }
.viewer-bar button { font: inherit; font-weight: 500; color: var(--ink); background: var(--bg); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 4px 12px; cursor: pointer; }
.viewer-bar button:hover:not(:disabled) { border-color: var(--heading); }
.viewer-bar button:disabled { opacity: 0.4; cursor: default; }
.viewer-bar .count { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: center; color: var(--ink); }

.annotated { display: grid; gap: var(--space-5); }
.annotated h2 { margin: 0; font-size: var(--step-2); font-weight: 650; color: var(--heading); letter-spacing: -0.01em; }
.ann { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: var(--space-4); align-items: start; scroll-margin-top: var(--space-4); }
.ann-text { font-size: 1.0625rem; gap: 0.7em; }
.ann-num { font-family: var(--font-ui); font-size: 12px; color: var(--muted); text-decoration: none !important; }
.ann-num:hover { color: var(--accent); }
@media (max-width: 620px) { .ann { grid-template-columns: 1fr; } }

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