:root {
  color-scheme: dark;
  --bg: #191512;
  --surface: #141312;
  --border: #34302c;
  --divider: color-mix(in srgb, var(--border) 40%, transparent);
  --text: #b4b0aa;
  --text-strong: #eeeae4;
  --text-muted: #a19c95;
  --accent: #ce9475;
  --glow: #69412c;
  --font-display: 'Libre Baskerville', 'Iowan Old Style', Palatino, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="olive"] { --bg: #17190f; --surface: #13150f; --border: #303429; --accent: #b4b57d; --glow: #4e552d; }
:root[data-theme="forest"] { --bg: #101b17; --surface: #101613; --border: #293b31; --accent: #81b29b; --glow: #285c43; }
:root[data-theme="ocean"] { --bg: #111923; --surface: #10151c; --border: #2b3643; --accent: #83aeca; --glow: #2b4d70; }
:root[data-theme="rose"] { --bg: #21151b; --surface: #191217; --border: #403039; --accent: #c68eaa; --glow: #65354c; }
:root[data-theme="github"] { --bg: #191e24; --surface: #1e232a; --border: #444c56; --text: #adbac7; --text-strong: #cdd9e5; --text-muted: #909dab; --accent: #6cb6ff; --glow: #354b64; }
:root[data-theme="underwater"] { --bg: #0a1d29; --surface: #101f29; --border: #38505a; --text: #c4c7b5; --text-strong: #f0e9d5; --text-muted: #aab19f; --accent: #e1bd78; --glow: #316f7c; }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 106.25%; line-height: 1.7; color: var(--text); scrollbar-color: color-mix(in srgb, var(--glow) 70%, var(--border)) var(--surface); -webkit-font-smoothing: antialiased; }
html::-webkit-scrollbar { width: 0.705882rem; }
html::-webkit-scrollbar-track { background: var(--surface); }
html::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--glow) 70%, var(--border)); border-radius: 58.764706rem; }
html::-webkit-scrollbar-thumb:hover { background: var(--glow); }
body { position: relative; isolation: isolate; margin: 0; padding: 4.117647rem clamp(1.411765rem, 3vw, 2.823529rem); min-height: 100vh; background: radial-gradient(ellipse at 0 35%, color-mix(in srgb, var(--glow) 45%, transparent), transparent 60%), radial-gradient(ellipse at 100% 100%, color-mix(in srgb, var(--glow) 25%, transparent), transparent 55%); }
html[data-theme="underwater"] { background: var(--water-deep-low, var(--bg)); }
html[data-theme="underwater"] body { background: none; }
html[data-theme="underwater"] body::before {
  content: "";
  z-index: -2;
  background:
    radial-gradient(ellipse at 42% -15%, var(--water-overhead, #12373d), transparent 65%),
    linear-gradient(var(--water-surface, #0a3641), var(--water-deep-high, #061a21) 55%, var(--water-deep-low, #040f16));
}
a { color: var(--text-strong); text-underline-offset: .22em; text-decoration-color: var(--text-muted); }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 0.117647rem solid var(--accent); outline-offset: 0.294118rem; }
::selection { background: var(--accent); color: var(--surface); }
.site-wrapper { position: relative; max-width: 77.647059rem; margin: 0 auto; background: transparent; border: 0 solid color-mix(in srgb, var(--border) 3%, transparent); border-radius: 1.176471rem; box-shadow: none; padding: 1.764706rem clamp(1.411765rem, 4vw, 3.176471rem) 1.882353rem; }
/* Let the card fit its container; keep reading width and type independent of viewport height. */
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.176471rem; }
/* Sticky within the card: the row returns to its original slot at the top. */
.site-header { position: sticky; top: 0.941176rem; z-index: 5; pointer-events: none; }
.home-link { pointer-events: auto; background: color-mix(in srgb, var(--surface) 40%, transparent); border-radius: 50%; transition: color .15s ease, background-color .2s ease; }
.home-link:hover { background: color-mix(in srgb, var(--surface) 65%, transparent); }
.theme-picker { pointer-events: auto; background: transparent; box-shadow: none; border-radius: 1.411765rem; }
.home-link { display: grid; place-items: center; width: 2.117647rem; height: 2.117647rem; text-decoration: none; color: var(--text-muted); }
.home-link svg { width: 1.235294rem; height: 1.235294rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-picker { --picker-size: 1.882353rem; --picker-gap: 0.117647rem; --picker-open: 0; position: relative; width: var(--picker-size); height: 2.117647rem; margin-left: auto; flex-shrink: 0; }
/* The open hit area covers the whole row immediately, including moving choices. */
.theme-picker::before { content: ""; position: absolute; right: 0; top: 0; width: calc(var(--picker-size) + (var(--picker-count, 6) - 1) * (var(--picker-size) + var(--picker-gap)) * var(--picker-open)); height: 100%; }
.theme-picker button { position: absolute; right: 0; top: 0; display: grid; place-items: center; width: var(--picker-size); height: 2.117647rem; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 50%; opacity: var(--picker-open); pointer-events: none; transform: translateX(calc(var(--picker-slot, 0) * (var(--picker-size) + var(--picker-gap)) * var(--picker-open) * -1)); transition: transform .38s ease, opacity .60s ease, color 1s ease; }
.theme-picker button[aria-pressed="true"] { opacity: 1; pointer-events: auto; z-index: 1; }
.theme-picker.is-idle button[aria-pressed="true"] { opacity: .54; }
/* Keyboard navigation opens the choices; mouse focus alone must not pin them open. */
.theme-picker:has(button:focus-visible) { --picker-open: 1; }
.theme-picker:has(button:focus-visible) button { pointer-events: auto; }
@media (hover: hover) {
  .theme-picker:hover { --picker-open: 1; }
  .theme-picker:hover button { pointer-events: auto; }
}
/* Narrow screens and touch-capable devices use a visible row with normal hit areas. */
@media (max-width: 700px), (hover: none), (any-pointer: coarse) {
  .theme-picker { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--picker-gap); width: auto; max-width: 100%; height: auto; flex-shrink: 1; }
  .theme-picker::before { content: none; }
  .theme-picker button { position: static; width: 44px; height: 44px; flex-shrink: 0; opacity: 1; pointer-events: auto; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-picker, .theme-picker button { transition: none; }
}
.theme-picker button[hidden] { display: none; }
.theme-picker button::before { content: ""; width: 0.764706rem; height: 0.764706rem; border-radius: 50%; background: var(--swatch); opacity: .7; }
.theme-picker button:hover::before { opacity: 1; }
.theme-picker button[aria-pressed="true"]::before { opacity: 1; outline: 1px solid var(--swatch); outline-offset: 0.235294rem; }
.theme-picker button[data-daylight-choice="auto"] { color: var(--auto-color, #b7a0ad); }
.theme-picker button[data-daylight-choice="auto"]::before { content: none; }
.theme-picker button[data-daylight-choice="auto"] svg { width: 0.941176rem; height: 0.941176rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .7; border-radius: 50%; }
.theme-picker button[data-daylight-choice="auto"] circle { fill: currentColor; stroke: none; }
.theme-picker button[data-daylight-choice="auto"] path { stroke: var(--bg); }
.theme-picker button[data-daylight-choice="auto"]:hover svg { opacity: 1; }
.theme-picker button[data-daylight-choice="auto"][aria-pressed="true"] svg { opacity: 1; outline: 1px solid currentColor; outline-offset: 0.235294rem; }
.site-main, .site-footer { width: 100%; max-width: 40rem; margin-inline: auto; }
.site-main { padding-top: 2.823529rem; }
.eyebrow { font-size: 0.705882rem; letter-spacing: .07em; color: var(--accent); margin: 0 0 0.882353rem; }
h1, h2, h3, h4 { color: var(--text-strong); }
.title-dot { color: var(--accent); }
.intro-subtitle { margin: 0; font-size: 1.176471rem; letter-spacing: -.02em; }
.intro-copy { margin: 1.882353rem 0; max-width: 36.470588rem; }
.intro-copy p { margin: 0 0 0.941176rem; }
.intro-links { display: flex; align-items: baseline; flex-wrap: wrap; gap: 1.411765rem; font-size: 0.823529rem; }
.text-link { text-decoration: none; color: var(--text-muted); }
.external-link { text-decoration: underline; text-underline-offset: .22em; }
.intro-links .text-link:is(:hover, :focus-visible) { color: var(--accent); }
.home-archive { margin-top: 1.882353rem; padding-top: 1.411765rem; border-top: 1px solid var(--divider); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 0.705882rem; margin-bottom: 1.176471rem; }
.section-heading h2 { font-size: 0.941176rem; font-weight: 600; margin: 0; }
.article-wheel {
  --article-wheel-facet-height: 4rem;
  --article-wheel-radius: calc(var(--article-wheel-facet-height) * 1.538842);
}
.article-wheel-stage {
  position: relative;
  height: 9.411765rem;
  overflow: hidden;
  perspective: 42.352941rem;
  perspective-origin: 50% 50%;
}
.article-wheel-rotor {
  position: absolute;
  top: 50%;
  left: 2.352941rem;
  right: 2.352941rem;
  height: var(--article-wheel-facet-height);
  transform-style: preserve-3d;
  will-change: transform;
}
.article-wheel-facet {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 5.529412rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.176471rem;
  height: var(--article-wheel-facet-height);
  padding: 0 1.058824rem;
  color: var(--text-muted);
  opacity: .18;
  text-decoration: none;
  cursor: pointer;
  backface-visibility: hidden;
  transform: rotateX(calc(var(--facet-index) * 36deg)) translateZ(var(--article-wheel-radius));
  transition: color .3s ease, opacity .3s ease;
}
.article-wheel-facet[data-active="true"] {
  color: var(--text-strong);
  opacity: 1;
}
.article-wheel-date,
.article-wheel-meta { color: var(--text-muted); font-size: 0.647059rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.article-wheel-title { min-width: 0; overflow: hidden; color: currentColor; font-size: 0.882353rem; text-overflow: ellipsis; white-space: nowrap; }
.article-wheel-facet[data-active="true"] .article-wheel-title { color: var(--text-strong); }
.article-wheel-source .archive-meta { margin-left: auto; }
.article-wheel-selected { position: absolute; top: 50%; left: 2.352941rem; right: 2.352941rem; height: var(--article-wheel-facet-height); transform: translateY(-50%); z-index: 1; }
.article-wheel-selected:focus-visible { outline-offset: -0.117647rem; }
.article-wheel-archive-link { margin-left: auto; color: var(--text-muted); font-size: 0.705882rem; text-decoration: none; }
.article-wheel-archive-link:hover { color: var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.page-title { font-family: var(--font-display); font-variant-ligatures: none; font-size: clamp(2.117647rem, 1.5rem + 2vw, 3.058824rem); line-height: 1.15; letter-spacing: normal; font-weight: 400; margin: 0 0 2.117647rem; }
.page-title-home { width: fit-content; font-size: clamp(3.764706rem, 2rem + 5vw, 5.647059rem); line-height: 1.05; letter-spacing: normal; margin-bottom: 1.176471rem; }
@media (min-width: 701px) {
  .site-wrapper { container-type: inline-size; }
  .site-header { margin-top: 4.941176rem; margin-bottom: -2.117647rem; }
  .site-header-inner { transform: translateY(calc((clamp(2.117647rem, 1.5rem + 2vw, 3.058824rem) * 1.15 - 2.117647rem) / 2)); }
  .site-main { padding-top: 0; }
  /* Reserve space for the controls only where the outer gutters are too narrow. */
  .site-main .page-title { padding-left: max(0rem, calc(3rem - max(0rem, (100cqw - 40rem) / 2))); padding-right: max(0rem, calc(12.5rem - max(0rem, (100cqw - 40rem) / 2))); }
  .home-page .page-title-home { padding-left: 0; }
}
.archive-list { padding: 0; margin: 0; list-style: none; }
.archive-item { display: flex; align-items: baseline; gap: 1.176471rem; padding: 0.588235rem 0; }
.archive-date { font-size: 0.705882rem; color: var(--text-muted); flex-shrink: 0; width: 5.529412rem; font-variant-numeric: tabular-nums; }
.archive-link { font-size: 0.941176rem; text-decoration: none; }
/* Soften the entire sibling row only while a row is targeted. */
@media (hover: hover) and (pointer: fine) {
  .archive-list:has(.archive-item:hover):not(:has(.archive-link:focus-visible)) .archive-item:not(:hover) { opacity: .3; }
  .archive-item:hover .archive-link { color: var(--text-strong); }
}
.archive-list:has(.archive-link:focus-visible) .archive-item:not(:has(.archive-link:focus-visible)) { opacity: .3; }
.archive-link:focus-visible { color: var(--text-strong); }
.archive-dots { flex: 1; min-width: 0.705882rem; border-bottom: 1px dotted var(--divider); }
.archive-meta { font-size: 0.705882rem; white-space: nowrap; color: var(--text-muted); }
.site-footer { border-top: 1px solid var(--divider); margin-top: 2.823529rem; padding-top: 1.294118rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.941176rem; font-size: 0.705882rem; color: var(--text-muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.588235rem 1.176471rem; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a.external-link { text-decoration: underline; text-underline-offset: .22em; }
.site-footer a:hover { color: var(--accent); }
.post-body { overflow-wrap: anywhere; }
.post-body p, .post-body ul, .post-body ol { margin: 0 0 1.2rem; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 { font-weight: 600; line-height: 1.3; margin: 2rem 0 1rem; color: var(--text-strong); }
.post-body h2 { font-size: 1.5rem; }
.post-body h3 { font-size: 1.25rem; }
.post-body h4 { font-size: 1.1rem; }
.post-body strong { color: var(--text-strong); }
.post-body a { color: var(--accent); }
.post-body blockquote { border-left: 0.117647rem solid var(--accent); margin: 1.5rem 0; padding-left: 1rem; }
.post-body ul, .post-body ol { padding-left: 1.4rem; }
.post-body img, .post-body video { display: block; max-width: 100%; height: auto; margin: 1.5rem 0; border-radius: 0.470588rem; }
.post-body table { display: block; overflow-x: auto; border-collapse: collapse; }
.post-body td, .post-body th { padding: .5rem; border: 1px solid var(--border); }
.post-footer { font-size: 0.764706rem; color: var(--text-muted); margin-top: 1.882353rem; }
:not(pre) > code { font-family: var(--font-mono); font-size: .85em; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--text-strong); padding: .15em .3em; border-radius: 0.235294rem; }
pre {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.470588rem;
  padding: 1.058824rem 1.176471rem;
  margin: 1.5rem 0;
  /* Override Zola's inline background to match the surrounding code window. */
  background: color-mix(in srgb, var(--surface) 85%, #000) !important;
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
pre code { font-family: var(--font-mono); font-size: 0.83rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-block { min-width: 0; margin: 1.5rem 0; border: 1px solid var(--border); border-radius: 0.529412rem; }
.code-block-header { display: flex; align-items: center; justify-content: space-between; gap: 0.705882rem; padding: 0.235294rem 0.235294rem 0.235294rem 0.941176rem; border-bottom: 1px solid var(--divider); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); border-radius: 0.470588rem 0.470588rem 0 0; }
.code-language { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.647059rem; letter-spacing: .03em; }
.code-block pre { margin: 0; border: 0; border-radius: 0 0 0.470588rem 0.470588rem; }
.code-block pre:focus-visible { outline-offset: -0.176471rem; }
.copy-button, .wrap-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.411765rem; min-height: 1.764706rem; min-width: 4.588235rem; padding: 0.235294rem 0.411765rem; font: inherit; font-size: 0.705882rem; line-height: 1.2; background: transparent; color: var(--text-muted); border: 1px solid transparent; border-radius: 0.235294rem; cursor: pointer; }
.copy-button svg { width: 0.823529rem; height: 0.823529rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.copy-button > span, .wrap-button > span { text-box-trim: trim-both; text-box-edge: cap alphabetic; }
.copy-button:hover, .wrap-button:hover { color: var(--text-strong); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: var(--border); }
.copy-button[data-state="copied"] { color: var(--accent); }
.copy-button:disabled { cursor: wait; }
.code-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Daylight colors the code-window surfaces while preserving Gruvbox syntax. */
html[data-theme="underwater"] .code-block { border-color: var(--code-border, var(--border)); }
html[data-theme="underwater"] .code-block-header { background: var(--code-header, var(--surface)); border-bottom-color: color-mix(in srgb, var(--code-border, var(--border)) 40%, transparent); }
html[data-theme="underwater"] .post-body pre { background: var(--code-bg, var(--surface)) !important; }
html[data-theme="underwater"] .code-block :is(.copy-button, .wrap-button):hover { border-color: var(--code-border, var(--border)); background: var(--code-header, var(--surface)); }
@media (pointer: coarse) { .copy-button, .wrap-button { min-height: 44px; } }
.about-list { columns: 2; column-gap: 2rem; font-size: 0.882353rem; }
.about-list li { break-inside: avoid; margin-bottom: 0.470588rem; }
.skip-link { position: fixed; top: -5.882353rem; left: 1.176471rem; padding: 0.470588rem 0.941176rem; background: var(--surface); z-index: 10; }
.skip-link:focus { top: 0.705882rem; }
@media (max-width: 700px) {
  body { min-height: 100dvh; padding: 1.176471rem 0; }
  .site-header { position: static; margin-top: 0.705882rem; }
  .site-wrapper { padding: 1.176471rem clamp(1rem, 5vw, 1.764706rem) 1.529412rem; border-radius: 0.823529rem; }
  .page-title, .archive-link { overflow-wrap: anywhere; }
  .site-header-inner { flex-wrap: wrap; }
  .code-block-header { flex-wrap: wrap; }
  pre { padding: 0.823529rem; }
  .site-main { padding-top: 1.058824rem; }
  .intro-subtitle { font-size: 1.058824rem; }
  .section-heading { display: block; }
  .article-wheel-heading { display: flex; }
  .article-wheel { --article-wheel-facet-height: 3.529412rem; }
  .article-wheel-stage { height: 8.823529rem; }
  .article-wheel-rotor, .article-wheel-selected { left: 1.058824rem; right: 1.058824rem; }
  .article-wheel-facet { grid-template-columns: minmax(0, 1fr) auto; gap: 0.529412rem; padding: 0 0.588235rem; }
  .article-wheel-date { display: none; }
  .article-wheel-meta { font-size: 0.588235rem; }
  .article-wheel-title { font-size: 0.823529rem; }
  .article-wheel-dots { display: none; }
  .archive-item { gap: 0.470588rem 0.823529rem; flex-wrap: wrap; padding: 0.647059rem 0; }
  .archive-link { order: -1; width: 100%; }
  .archive-dots { display: none; }
  .archive-date { width: auto; }
  .archive-meta { margin-left: auto; }
  .about-list { columns: 1; }
  .site-footer { margin-top: 2.117647rem; }
}
body, .site-wrapper { transition: background-color .2s ease, border-color .2s ease; }
a { transition: color .15s ease; }
.archive-link { transition: color .4s ease; }
.archive-item { transition: opacity .4s ease; }

.site-wrapper::before { display: none; }
/* A single light pass across the subtitle accompanies a theme change. */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .text-shine {
    background-image: linear-gradient(110deg, var(--text) 35%, var(--accent) 46%, #fff 50%, var(--accent) 54%, var(--text) 65%);
    background-size: 300% 100%;
    background-position: 0% 0;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }
  .eyebrow .text-shine {
    background-image: linear-gradient(110deg, var(--accent) 35%, color-mix(in srgb, var(--accent) 45%, #fff) 46%, #fff 50%, color-mix(in srgb, var(--accent) 45%, #fff) 54%, var(--accent) 65%);
  }
}
@media (forced-colors: active) {
  .text-shine { background: none; color: CanvasText; }
  .article-wheel-facet { border-color: CanvasText; }
}
.code-actions { display: flex; align-items: center; gap: 0.117647rem; }
.wrap-button { min-width: 2.823529rem; }
.wrap-button[aria-pressed="true"] { color: var(--accent); }
.code-block-unwrapped pre code { white-space: pre; overflow-wrap: normal; }

/* Keep syntax tokens upright consistently on all prose pages. */
pre span[style*="font-style"] { font-style: normal !important; }

/* Keep the shader and its fallback fixed to the viewport and out of hit testing. */
.shader-backdrop,
html[data-theme="underwater"] body::before {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.shader-backdrop { z-index: -1; opacity: 0; }

/* Tighten the header gaps on small screens; choices wrap when needed. */
@media (max-width: 400px) {
  .site-header-inner { gap: 0.470588rem; }
  .home-link { width: 1.411765rem; height: 1.411765rem; flex-shrink: 0; }
  .theme-picker { --picker-gap: 0; }
}
/* Match the base token color as well as the generated highlighted spans. */
html[data-theme="github"] pre { color: #adbac7 !important; }

/* A larger desktop baseline, independent of display density or window height. */
@media (min-width: 701px) {
  html { font-size: 142.299107%; }
  body { padding-block: 4.611765rem; }
}
