/* sanz.one journal + about pages: matches the landing page (index.html) */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin-ext.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: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-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;
}

/* Light / dark mode: every colour comes from these custom properties. Dark is the no-JS default, the system
   preference applies until the toggle (.sz-theme, site-src/theme.js) stores a choice; theme.js sets data-theme on
   <html> before first paint. Both modes pass WCAG AA for their text pairs (sanz-tools/palettes.py). */
/* theme:start - generated by sanz-tools/palettes.py; the landing page (index.html) carries a copy */
:root, [data-theme="dark"] { color-scheme: dark; --bg: #121211; --surface: #171716; --tile: #1B1B1A; --border: #262624; --line: #363633; --hover: #1F1F1D; --text: #EDEDEA; --body: #CFCFCA; --muted: #9A9A94; --faint: #878680; --strong: #FFFFFF; --quote: #B4B4AE; --code: #E3E3DF; --accent: #EDEDEA; --pill: #EDEDEA; --pill-text: #121211; --pill-hover: #FFFFFF; --logo: #FA431E; --logo-on: #121211; --x-a: #EDEDEA; --x-b: #9A9A94; --uline: #4A4A46; --sel: rgba(237, 237, 234, .18); }
[data-theme="light"] { color-scheme: light; --bg: #F6F6F3; --surface: #FAFAF8; --tile: #EFEFEB; --border: #E3E3DE; --line: #CFCFC8; --hover: #ECECE7; --text: #1F1E1B; --body: #383732; --muted: #6A6963; --faint: #706F69; --strong: #000000; --quote: #4F4E48; --code: #1F1E1B; --accent: #1F1E1B; --pill: #1F1E1B; --pill-text: #F6F6F3; --pill-hover: #000000; --logo: #E8401C; --logo-on: #F6F6F3; --x-a: #1F1E1B; --x-b: #6A6963; --uline: #C4C4BC; --sel: rgba(31, 30, 27, .12); }
@media (prefers-color-scheme: light) { :root:not([data-theme]) { color-scheme: light; --bg: #F6F6F3; --surface: #FAFAF8; --tile: #EFEFEB; --border: #E3E3DE; --line: #CFCFC8; --hover: #ECECE7; --text: #1F1E1B; --body: #383732; --muted: #6A6963; --faint: #706F69; --strong: #000000; --quote: #4F4E48; --code: #1F1E1B; --accent: #1F1E1B; --pill: #1F1E1B; --pill-text: #F6F6F3; --pill-hover: #000000; --logo: #E8401C; --logo-on: #F6F6F3; --x-a: #1F1E1B; --x-b: #6A6963; --uline: #C4C4BC; --sel: rgba(31, 30, 27, .12); } }
/* theme:end */
:root {
  --ease: cubic-bezier(.65,0,.2,1);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Geist, system-ui, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--text); text-decoration: none; }
::selection { background: var(--sel); }

.sz-main { min-height: 100vh; min-height: 100dvh; box-sizing: border-box; padding: clamp(28px, 6vw, 80px); display: flex; flex-direction: column; gap: 64px; }
/* Content fades in on load; the nav (.sz-top) does not, so it reads as persistent across pages. */
.sz-main > :not(.sz-top) { animation: sz-fade .25s ease-out backwards; }
@keyframes sz-fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sz-main > *, .sz-content { animation: none !important; } }

.sz-top { display: flex; align-items: center; justify-content: flex-start; }
/* Segmented nav [ logo | About | Journal ]: 40px tall like the landing logo, 12px radius like the tiles.
   --l = logo segment, --w = text segments (fixed, so fonts loading can't move anything; the px numbers below
   are derived from 38/81: pills sit at x 3-41 (logo), 41-122 (About), 122-203 (Journal) inside the 206px box).
   The highlight (.sz-seg-thumb) sits ABOVE the items and moves with transforms only, so the browser's compositor
   runs the slide even while the page is busy (e.g. the landing page booting):
   - the light pill is three 38px rounded pieces (.sz-seg-p) at the pill's left edge, centre and right edge;
     their union is the pill at any width from 38 to 81px, and each piece only ever translates;
   - .sz-seg-win is a pill-sized window (translate + scaleX) holding a dark copy of every label and a black
     logo (.sz-seg-ink), counter-transformed so the copy never moves. So each label is dark exactly where the
     highlight covers it and normal (grey / orange) elsewhere, at every frame of the slide.
   site-src/nav.js animates the same transforms (Web Animations API) between these resting states. */
.sz-seg { --l: 38px; --w: 81px; position: relative; display: inline-grid; grid-template-columns: var(--l) var(--w) var(--w); view-transition-name: sz-nav; height: 40px; padding: 3px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); isolation: isolate; }
.sz-seg-thumb { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sz-seg-thumb > span { position: absolute; top: 3px; left: 0; height: 32px; transform-origin: 0 0; will-change: transform; }
.sz-seg-p { width: 38px; border-radius: 9px; background: var(--pill); }
.sz-seg-win { width: 81px; overflow: hidden; }
.sz-seg-ink { position: absolute; top: -3px; left: 0; width: 206px; height: 38px; display: grid; grid-template-columns: var(--l) var(--w) var(--w); padding: 3px; box-sizing: border-box; transform-origin: 0 0; will-change: transform; }
.sz-seg-p:nth-child(1), .sz-seg-win { transform: translateX(41px); }
.sz-seg-p:nth-child(2) { transform: translateX(62.5px); }
.sz-seg-p:nth-child(3) { transform: translateX(84px); }
.sz-seg-ink { transform: translateX(-41px); }
.sz-seg[data-active="journal"] .sz-seg-p:nth-child(1), .sz-seg[data-active="journal"] .sz-seg-win { transform: translateX(122px); }
.sz-seg[data-active="journal"] .sz-seg-p:nth-child(2) { transform: translateX(143.5px); }
.sz-seg[data-active="journal"] .sz-seg-p:nth-child(3) { transform: translateX(165px); }
.sz-seg[data-active="journal"] .sz-seg-ink { transform: translateX(-122px); }
.sz-seg[data-active="home"] .sz-seg-p { transform: translateX(3px); }
.sz-seg[data-active="home"] .sz-seg-win { transform: translateX(3px) scaleX(.469136); }
.sz-seg[data-active="home"] .sz-seg-ink { transform: scaleX(2.131579) translateX(-3px); }
.sz-seg-item, .sz-seg-ink > span { display: flex; align-items: center; justify-content: center; padding: 0 16px; border-radius: 9px; font-size: 14px; font-weight: 400; letter-spacing: 0; line-height: 1; white-space: nowrap; }
.sz-seg-item { color: var(--muted); transition: color .3s ease, background-color .2s ease; }
.sz-seg-item:hover { color: var(--text); }
.sz-seg-ink > span { color: var(--pill-text); }
.sz-seg-ink > .sz-seg-ink-home { color: var(--logo-on); }
.sz-seg-home, .sz-seg-ink > .sz-seg-ink-home { padding: 0; }
.sz-seg-home svg, .sz-seg-ink svg { display: block; height: 21px; width: auto; }
.sz-seg .sz-seg-home { color: var(--logo); }
.sz-seg .sz-seg-home:hover { background: var(--hover); }
.sz-seg-item:focus { outline: none; }
.sz-seg-item:focus-visible { outline: 2px solid var(--line); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .sz-seg-item { transition: none; } }
/* Cross-document View Transitions (same-origin navigations): the nav is the only captured element and has no
   animation, so it stays put (its live thumb slide shows through). The page itself is not snapshotted
   (no full-page captures to render and blend, so the new page shows sooner); its content fades in on its own
   (.sz-main children on load; site-src/nav.js fades it in when a prerendered page is activated). */
@view-transition { navigation: auto; }
:root { view-transition-name: none; }
::view-transition-group(sz-nav), ::view-transition-new(sz-nav) { animation: none; }
::view-transition-old(sz-nav) { display: none; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* switcher:start - light/dark toggle, top right on every page (copied into index.html too).
   An icon-only 40px glass circle: translucent fill and 1px stroke mixed from the text colour, a backdrop blur and
   a faint inner top highlight. It shows the mode it switches to (sun in dark mode, moon in light mode); the
   aria-label says the same ("Switch to light mode"). Aligned with the nav's top; like the nav it has its own
   view-transition-name and no animation, so it stays put across page switches. */
html { scrollbar-gutter: stable; }
.sz-theme { --g: color-mix(in srgb, var(--text) 5%, transparent); --gs: color-mix(in srgb, var(--text) 11%, transparent); --gh: color-mix(in srgb, var(--text) 8%, transparent); position: relative; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; margin: 0 0 0 auto; padding: 0; box-sizing: border-box; border: 1px solid var(--gs); border-radius: 50%; background: var(--g); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); color: var(--muted); cursor: pointer; view-transition-name: sz-theme; -webkit-tap-highlight-color: transparent; transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.sz-theme-abs { position: absolute; z-index: 1; top: clamp(28px, 6vw, 80px); right: clamp(28px, 6vw, 80px); }
.sz-theme svg { grid-area: 1 / 1; display: block; transition: opacity .3s ease, transform .4s var(--ease); }
.sz-theme .sz-i-moon, [data-theme="light"] .sz-theme .sz-i-sun { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="light"] .sz-theme .sz-i-moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .sz-theme .sz-i-sun { opacity: 0; } :root:not([data-theme]) .sz-theme .sz-i-moon { opacity: 1; transform: none; } }
.sz-theme:hover, .sz-theme:focus-visible { color: var(--text); --g: color-mix(in srgb, var(--text) 9%, transparent); --gs: color-mix(in srgb, var(--text) 18%, transparent); --gh: color-mix(in srgb, var(--text) 14%, transparent); }
.sz-theme:focus { outline: none; }
.sz-theme:focus-visible { outline: 2px solid color-mix(in srgb, var(--text) 60%, transparent); outline-offset: 2px; }
.sz-theme-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
::view-transition-group(sz-theme), ::view-transition-new(sz-theme) { animation: none; }
::view-transition-old(sz-theme) { display: none; }
/* While switching modes, colours ease over 250ms (theme.js adds html.sz-theming unless reduced motion). */
html.sz-theming, html.sz-theming *, html.sz-theming *::before, html.sz-theming *::after { transition: background-color .25s ease, color .25s ease, border-color .25s ease, outline-color .25s ease, fill .25s ease, stroke .25s ease, stop-color .25s ease, text-decoration-color .25s ease !important; }
html.sz-theming .sz-theme svg { transition: opacity .3s ease, transform .4s var(--ease) !important; }
@media (prefers-reduced-motion: reduce) { .sz-theme, .sz-theme svg, html.sz-theming * { transition: none !important; } }
/* switcher:end */

.sz-content { flex: 1 0 auto; width: 100%; max-width: 1000px; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }

/* Underlined link style shared with the landing footer */
.sz-u { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line); transition: color .2s, text-decoration-color .2s; }
.sz-u:hover { color: var(--text); text-decoration-color: var(--text); }

/* ---------- Index ---------- */
.sz-h1 { margin: 0; font-weight: 400; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.15; letter-spacing: -.022em; text-wrap: balance; }
.sz-sub { margin: 0; font-weight: 400; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.15; letter-spacing: -.022em; color: var(--faint); text-wrap: balance; }

/* Post cards: full-width rounded links (14px radius, hairline --border). The hover/focus state only animates
   opacity and the arrow: a slightly lighter layer (::before) fades in and the arrow nudges right while a
   full-strength copy of it fades in. Hover is read from the <li>. */
.sz-posts { list-style: none; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.sz-card { position: relative; isolation: isolate; display: flex; align-items: center; gap: 24px; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.sz-card::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; border: 1px solid var(--line); background: var(--tile); opacity: 0; transition: opacity .18s ease; }
.sz-card-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sz-card-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 400; line-height: 1.4; letter-spacing: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.sz-card-meta > span[aria-hidden] { color: var(--faint); }
.sz-card-title { margin: 0; font-size: clamp(18px, 1.5vw, 20px); font-weight: 450; line-height: 1.3; letter-spacing: -.01em; color: var(--text); text-wrap: pretty; }
.sz-card-desc { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.sz-card-thumb { flex: 0 0 auto; width: 176px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--tile); }
.sz-card-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sz-card-arrow { position: relative; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid transparent; color: var(--faint); }
.sz-card-arrow svg { display: block; transition: transform .18s cubic-bezier(.2,.8,.2,1); }
.sz-card-arrow-hot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--accent); opacity: 0; transition: opacity .18s ease; }
.sz-posts li:hover > .sz-card::before, .sz-card:focus-visible::before { opacity: 1; }
.sz-posts li:hover > .sz-card .sz-card-arrow svg, .sz-card:focus-visible .sz-card-arrow svg { transform: translateX(3px); }
.sz-posts li:hover > .sz-card .sz-card-arrow-hot, .sz-card:focus-visible .sz-card-arrow-hot { opacity: 1; }
.sz-card:focus { outline: none; }
.sz-card:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .sz-card, .sz-card-arrow svg { transition: none; }
  .sz-posts li:hover > .sz-card .sz-card-arrow svg, .sz-card:focus-visible .sz-card-arrow svg { transform: none; }
}
.sz-empty { margin: clamp(32px, 4vw, 56px) 0 0; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 16px; line-height: 1.5; }

/* ---------- Post ---------- */
.sz-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); transition: color .2s; margin-bottom: clamp(28px, 4vw, 48px); }
.sz-back:hover { color: var(--text); }
.sz-back svg { transition: transform .3s var(--ease); }
.sz-back:hover svg { transform: translateX(-3px); }

.sz-article { max-width: 660px; }
.sz-article-title { margin: 0; font-weight: 400; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.15; letter-spacing: -.022em; text-wrap: balance; }
.sz-article-meta { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.sz-cover { display: block; width: 100%; height: auto; margin: clamp(28px, 4vw, 40px) 0 0; border-radius: 12px; border: 1px solid var(--border); background: var(--tile); }

.sz-prose { margin-top: clamp(28px, 4vw, 40px); font-size: 17px; line-height: 1.7; color: var(--body); overflow-wrap: break-word; }
.sz-prose > :first-child { margin-top: 0; }
.sz-prose p, .sz-prose ul, .sz-prose ol, .sz-prose blockquote, .sz-prose pre, .sz-prose table, .sz-prose figure { margin: 0 0 1.25em; }
.sz-prose h2, .sz-prose h3, .sz-prose h4 { color: var(--text); font-weight: 450; letter-spacing: -.015em; line-height: 1.25; margin: 2em 0 .6em; text-wrap: balance; }
.sz-prose h2 { font-size: 24px; }
.sz-prose h3 { font-size: 20px; }
.sz-prose h4 { font-size: 18px; }
.sz-prose strong { color: var(--text); font-weight: 550; }
.sz-prose a { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line); transition: text-decoration-color .2s; }
.sz-prose a:hover { text-decoration-color: var(--text); }
.sz-prose ul, .sz-prose ol { padding-left: 1.3em; }
.sz-prose li { margin: .35em 0; padding-left: .2em; }
.sz-prose li::marker { color: var(--faint); }
.sz-prose img, .sz-prose video { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: var(--tile); }
.sz-prose p > img { margin: 2em 0; }
.sz-prose figure img { margin: 0; }
.sz-prose figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.sz-prose blockquote { margin-left: 0; margin-right: 0; padding: 14px 20px; border-radius: 12px; background: var(--tile); color: var(--quote); }
.sz-prose blockquote > :last-child { margin-bottom: 0; }
.sz-prose code { font-family: var(--mono); font-size: .86em; background: var(--tile); border: 1px solid var(--border); border-radius: 6px; padding: .12em .38em; color: var(--text); }
.sz-prose pre { background: var(--tile); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; overflow-x: auto; line-height: 1.55; font-size: 14.5px; }
.sz-prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: var(--code); }
.sz-prose hr { width: 4px; height: 4px; margin: 2.5em auto; border: 0; border-radius: 50%; background: var(--faint); box-shadow: -14px 0 0 var(--faint), 14px 0 0 var(--faint); }
.sz-prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; display: block; overflow-x: auto; }
.sz-prose th, .sz-prose td { text-align: left; padding: 10px 14px; }
.sz-prose tbody tr:nth-child(odd) > * { background: var(--tile); }
.sz-prose tbody tr > :first-child { border-radius: 8px 0 0 8px; }
.sz-prose tbody tr > :last-child { border-radius: 0 8px 8px 0; }
.sz-prose th { color: var(--text); font-weight: 500; }

.sz-article-foot { margin-top: clamp(40px, 6vw, 64px); padding-top: 24px; }
.sz-article-foot .sz-back { margin-bottom: 0; }

/* ---------- About ---------- */
.sz-about { max-width: 720px; }
.sz-about picture { display: block; line-height: 0; }
.sz-photo { display: block; width: 144px; height: 144px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: var(--tile); margin-bottom: clamp(28px, 3vw, 40px); }
.sz-bio { margin: clamp(18px, 2vw, 24px) 0 0; max-width: 660px; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.65; color: var(--body); }
.sz-contact { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: clamp(32px, 4vw, 48px); }
.sz-email { position: relative; font-size: clamp(20px, 2vw, 24px); font-weight: 400; letter-spacing: -.015em; padding-bottom: 4px; white-space: nowrap; transition: color .2s; }
.sz-email:hover { color: var(--strong); }
.sz-email::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--uline); }
.sz-social { display: flex; gap: 8px; }
/* Tiles match the landing page: 52px, --tile, hairline --border; the icon brightens on hover */
.sz-tile { position: relative; overflow: hidden; isolation: isolate; width: 52px; height: 52px; border-radius: 12px; background: var(--tile); border: 1px solid var(--border); box-sizing: border-box; color: var(--muted); display: flex; align-items: center; justify-content: center; transition: color .3s ease; }
.sz-tile:hover, .sz-tile:focus-visible { color: var(--text); border-color: var(--border); }
.sz-tile svg { position: relative; }
.sz-tile-li svg, .sz-tile-x svg, .sz-tile-ig .sz-dot { fill: currentColor; }
.sz-tile-ig svg { stroke: currentColor; }

/* ---------- Footer (same as landing) ---------- */
.sz-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--faint); }
.sz-roles { white-space: pre-wrap; }

@media (max-width: 640px) {
  .sz-roles { display: flex; flex-direction: column; gap: 4px; }
  .sz-role { display: block; }
  .sz-sep { display: none; }
  .sz-photo { width: 120px; height: 120px; }
  .sz-social { flex-basis: 100%; }
  .sz-tile { flex: 1 1 0; width: auto; }
  .sz-posts { gap: 16px; }
  .sz-card { flex-wrap: wrap; gap: 14px 16px; padding: 18px; }
  .sz-card-thumb { order: -1; width: 100%; aspect-ratio: 16 / 9; }
  .sz-card-desc { font-size: 14.5px; }
  .sz-card-arrow { align-self: flex-start; width: 32px; height: 32px; }
  .sz-prose { font-size: 17px; }
  .sz-prose h2 { font-size: 23px; }
  .sz-prose h3 { font-size: 19px; }
  .sz-prose pre { margin-left: -4px; margin-right: -4px; padding: 16px; font-size: 13.5px; }
}
