/* Portfolio styles — light/dark aware, print friendly. Fonts are self-hosted. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 200 800; font-style: normal; font-display: swap; src: url("assets/fonts/newsreader-latin-opsz-normal.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-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --bg: #f4f6f7;
  --paper: #ffffff;
  --ink: #1b2428;
  --muted: #5b6970;
  --rule: #e2e8eb;
  --accent: #0e6f7a;
  --accent-soft: #e5f2f3;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(16, 32, 38, .06), 0 12px 32px rgba(16, 32, 38, .07);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1316;
    --paper: #131c20;
    --ink: #e6edef;
    --muted: #93a3a9;
    --rule: #25333a;
    --accent: #4fc1cd;
    --accent-soft: #16303a;
    --accent-ink: #06191d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="dark"] {
    --bg: #0d1316;
    --paper: #131c20;
    --ink: #e6edef;
    --muted: #93a3a9;
    --rule: #25333a;
    --accent: #4fc1cd;
    --accent-soft: #16303a;
    --accent-ink: #06191d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Icons carry width/height="1em" in the markup too, so a missing stylesheet cannot enlarge them. */
.icon { width: 1em; height: 1em; vertical-align: -.125em; flex: none; }
.icon-ext { width: .75em; height: .75em; margin-left: .2em; vertical-align: -.02em; color: var(--muted); }
.icon-go { margin-left: .35em; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15.5px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Neutralise Quarto page chrome for a clean, centered paper */
#quarto-content, #quarto-document-content, main.content { padding: 0; margin: 0; max-width: none; }
#title-block-header, header#title-block-header { display: none; }
#quarto-content .page-columns, .page-layout-custom { display: block; }

.page {
  max-width: 880px;
  margin: 40px auto;
  padding: 56px 64px 40px;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: var(--shadow);
  border-top: 6px solid var(--accent);
}

a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding-bottom: 8px; }
.hero .name {
  margin: 0;
  font: 600 clamp(2rem, 6vw, 2.9rem)/1.1 var(--serif);
  font-optical-sizing: auto;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.role {
  display: block;
  margin-top: 8px;
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero p { margin: 0; }
.contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; margin-top: 20px; }
.contact p { display: contents; }
.chip {
  display: inline-flex; align-items: center; gap: .4em;
  padding: 3px 12px;
  font-size: .82rem;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 999px;
  white-space: nowrap;
}
a.chip { color: var(--accent); }
a.chip:hover { text-decoration: none; filter: brightness(.95); }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.actions p { display: contents; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 8px 18px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--accent-soft); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }

/* ---------- Sections ---------- */
h2 {
  margin: 36px 0 14px;
  padding-bottom: 6px;
  font: 700 .95rem/1.2 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--accent);
}
h2 + p { margin-top: 0; }
p { margin: 0 0 12px; }

/* Skills */
.skills dl { display: grid; grid-template-columns: 11.5rem 1fr; gap: 10px 20px; margin: 0; }
.skills dt { font-weight: 600; }
.skills dd { margin: 0; color: var(--muted); }

/* Entries */
.entry { margin: 0 0 20px; break-inside: avoid; }
.entry-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 0; }
.entry-head p { display: contents; margin: 0; }
.entry-head strong { font-weight: 650; font-size: 1.02rem; }
.sub { color: var(--muted); font-size: .9rem; }
.sub:first-of-type { font-style: italic; }
.date { margin-left: auto; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.degree { color: var(--muted); font-size: .93rem; margin: 2px 0 4px; }
.degree p { margin: 0; }
.degree strong { color: var(--ink); }

.entry ul, .training ul { margin: 6px 0 0; padding-left: 1.2rem; }
.entry li, .training li { margin: 4px 0; padding-left: 4px; }
.entry li::marker { color: var(--accent); }
.training ul { list-style: none; padding: 0; }
.training li { padding: 0; }
.training .date { margin-left: 6px; }

.footer { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--rule); text-align: center; color: var(--muted); font-size: .8rem; }
.footer p { margin: 0; }

/* ---------- Site chrome ---------- */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 40;
  padding: 8px 14px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.skip-link:focus { top: 12px; text-decoration: none; }

.site-header { max-width: 880px; margin: 22px auto 0; padding: 0 4px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; }
.site-title { font: 600 1.05rem/1 var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.site-title:hover { text-decoration: none; color: var(--accent); }
.nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 0; padding: 0; list-style: none; }
.nav-link { display: block; padding: 6px 12px; border-radius: 8px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.nav-link:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.theme-toggle {
  width: 34px; height: 34px; margin-left: 4px;
  display: grid; place-items: center; padding: 0;
  font: inherit; font-size: 1.05rem; line-height: 1; color: var(--muted);
  background: none; border: 1.5px solid var(--rule); border-radius: 50%; cursor: pointer;
}
.theme-toggle > span { display: contents; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.site-header + main .page { margin-top: 16px; }
.page :is(h2, h3, h4, [id]) { scroll-margin-top: 16px; }

/* Wide screens: the header stays at the top while reading. On phones the nav wraps to
   two rows, so there it scrolls away with the page instead of covering the content. */
@media (min-width: 721px) {
  .site-header {
    position: sticky; top: 0; z-index: 20; max-width: none; margin: 0;
    padding: 22px max(4px, calc((100% - 880px) / 2 + 4px)) 8px;
    background: var(--bg); border-bottom: 1px solid transparent;
    transition: border-color .2s;
  }
  .site-header.is-scrolled { border-bottom-color: var(--rule); }
  .site-nav { max-width: 880px; margin: 0 auto; }
  .site-header + main .page { margin-top: 8px; }
  .page :is(h2, h3, h4, [id]) { scroll-margin-top: 84px; }
}
.site-footer { max-width: 880px; margin: 28px auto 36px; padding: 0 4px; text-align: center; color: var(--muted); font-size: .8rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); text-decoration: underline; }
.print-only { display: none; }

/* ---------- Page content ---------- */
h1.page-title { margin: 0 0 8px; font: 600 clamp(1.7rem, 4.5vw, 2.2rem)/1.15 var(--serif); font-optical-sizing: auto; letter-spacing: -.01em; }
.page > h1 + p, .page > .kicker + p { margin-top: 0; }
.kicker { display: block; margin-bottom: 14px; color: var(--accent); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.back { display: inline-flex; align-items: center; gap: .4em; margin-bottom: 14px; font-size: .88rem; font-weight: 600; }
.lede { max-width: 56ch; margin: 18px auto 0; }
.lede p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.more { display: inline-flex; align-items: center; font-weight: 600; }
/* Links inside running text must not rely on color alone */
.page :is(p, li) a:not(.btn, .chip, .back, .more) { text-decoration: underline; text-decoration-thickness: 1px; }
.page :is(p, li) a:not(.btn, .chip, .back, .more):hover { text-decoration-thickness: 2px; }
.card :is(h2, h3) a { text-decoration: none; }
.page li { margin: 4px 0; }
.page li::marker { color: var(--accent); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 4px 0 14px; }
.cards-wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 22px; }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 18px 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.card :is(h2, h3) { margin: 0 0 4px; padding: 0; border: 0; font: 700 1.08rem/1.25 var(--sans); letter-spacing: 0; text-transform: none; }
.card :is(h2, h3) a { color: var(--ink); }
.card :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.card :is(h2, h3) a:hover { text-decoration: none; color: var(--accent); }
.card .icon-go { color: var(--muted); }
.card .kicker { margin-bottom: 8px; font-size: .7rem; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: .92rem; }
.card p:last-child { margin-bottom: 0; }
.card p:has(.tag) { margin-top: auto; padding-top: 6px; }

.tag {
  display: inline-block; margin: 0 4px 4px 0; padding: 2px 10px;
  font-size: .76rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px;
}
h1.page-title + p .kicker, h1.page-title + .kicker { margin-top: 0; }
.empty { padding: 24px; color: var(--muted); border: 1.5px dashed var(--rule); border-radius: 12px; }
.empty p:last-child { margin-bottom: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .page { margin: 0; padding: 36px 20px 28px; border-radius: 0; box-shadow: none; }
  .site-header { padding: 0 16px; }
  .site-nav { justify-content: flex-start; }
  .site-footer { padding: 0 16px; }
  .site-header + main .page { margin-top: 12px; }
  .skills dl { grid-template-columns: 1fr; gap: 2px; }
  .skills dd { margin-bottom: 10px; }
  .date { margin-left: 0; flex-basis: 100%; }
}

/* ---------- Print ---------- */
@media print {
  @page { size: letter; margin: .45in .5in; }
  :root { --bg: #fff; --paper: #fff; --ink: #111; --muted: #444; --rule: #ccc; --accent: #0e6f7a; --accent-soft: #fff; }
  body { background: #fff; font-size: 9.6pt; line-height: 1.33; }
  .page { margin: 0; padding: 0; max-width: none; box-shadow: none; border: 0; border-radius: 0; }
  .skip-link, .site-header, .site-footer, .actions, .footer { display: none; }
  .print-only { display: inline-block; }
  .chip { padding: 0 2px; background: none; }
  .contact { gap: 0 10px; margin-top: 10px; }
  .hero .name { font-size: 24pt; font-variation-settings: "wght" 600; }
  h2 { margin: 13px 0 8px; padding-bottom: 3px; font-size: 9.5pt; break-after: avoid; }
  .skills dl { gap: 5px 16px; }
  .entry { margin-bottom: 10px; }
  .entry li, .training li { margin: 2px 0; }
  .entry ul { margin-top: 3px; }
  a { color: inherit; }
}

/* ==========================================================================
   Project pages — case studies, technical reports, projects index
   Markup contract: see projects/*.qmd. Uses only the tokens defined above.
   ========================================================================== */

/* Project nav: tab-like pills under the back link */
.project-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.project-nav p { display: contents; }
.project-nav a {
  display: inline-flex; align-items: center; gap: .5em; min-height: 44px; padding: 0 16px;
  font-size: .88rem; font-weight: 600; color: var(--accent);
  border: 1.5px solid var(--rule); border-radius: 999px;
  transition: background .15s, color .15s, border-color .15s;
}
.project-nav a:hover { background: var(--accent-soft); border-color: var(--accent); text-decoration: none; }
.project-nav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.project-nav a[aria-current="page"]:hover { filter: brightness(1.08); }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 20px; }
.stat {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; break-inside: avoid;
}
.stat p { display: contents; }
.stat-value { display: block; font: 600 clamp(1.6rem, 4vw, 2.1rem)/1.1 var(--serif); font-optical-sizing: auto; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-label { display: block; font-size: .82rem; line-height: 1.4; color: var(--muted); }

/* Figures (Quarto: div.quarto-figure > figure.figure > p > img.fig.figure-img + figcaption) */
.page figure { margin: 22px 0; padding: 0; break-inside: avoid; }
.page figure > p, .page .quarto-figure > p { margin: 0; }
.page .quarto-figure { margin: 22px 0; }
.page .quarto-figure figure { margin: 0; }
.page img { max-width: 100%; height: auto; }
.page img.fig, .page figure img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }
.page figcaption, .page .figure-caption {
  margin-top: 8px; font-size: .84rem; line-height: 1.45; color: var(--muted); text-align: left;
}
/* Charts have white/transparent backgrounds and dark text: seat them on a light plate in dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .page img.fig { background: #fff; padding: 10px; }
}
:root[data-theme="dark"] .page img.fig { background: #fff; padding: 10px; }

/* Diagrams (inline SVG; colors via currentColor and tokens only) */
.page figure.diagram { margin: 22px 0; padding: 14px 12px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
.diagram svg { display: block; width: 100%; height: auto; color: var(--ink); font-family: var(--sans); font-size: 14px; overflow: visible; }
.diagram svg text { font-family: var(--sans); fill: currentColor; }
.diagram .d-box { fill: var(--paper); stroke: currentColor; stroke-width: 1.4; }
.diagram .d-accent { stroke: var(--accent); }
.diagram rect.d-accent, .diagram path.d-accent.d-fill, .diagram circle.d-accent { fill: var(--accent-soft); stroke-width: 1.8; }
.diagram text.d-accent { fill: var(--accent); stroke: none; font-weight: 600; }
.diagram .d-muted { stroke: var(--muted); color: var(--muted); }
.diagram text.d-muted { fill: var(--muted); stroke: none; }
.diagram .d-arrow { fill: none; stroke: currentColor; stroke-width: 1.5; }
.diagram .d-arrow.d-accent { stroke: var(--accent); }
.diagram .d-arrow.d-muted { stroke: var(--muted); }
.diagram marker path { fill: currentColor; fill: context-stroke; stroke: none; }
.diagram figcaption { margin-top: 10px; }

/* Tables */
.page table { width: 100%; margin: 16px 0 20px; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.page caption { padding: 0 0 8px; font-size: .84rem; color: var(--muted); text-align: left; caption-side: bottom; }
.page th, .page td { padding: 8px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.page thead th { background: var(--accent-soft); font-weight: 700; border-bottom: 2px solid var(--accent); }
.page td[align="right"], .page th[align="right"], .page .text-end { text-align: right; }
.page td[align="center"], .page th[align="center"] { text-align: center; }
.page tbody tr:last-child td { border-bottom: 0; }
.page td code { overflow-wrap: anywhere; }

/* Timeline (iteration history) */
.timeline ul { list-style: none; margin: 14px 0 20px; padding: 0 0 0 22px; border-left: 2px solid var(--rule); }
.timeline li { position: relative; margin: 0; padding: 0 0 16px 8px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::marker { content: ""; }
.timeline li::before {
  content: ""; position: absolute; left: -30px; top: .5em; width: 12px; height: 12px;
  background: var(--accent); border: 2px solid var(--paper); border-radius: 50%;
}
.timeline li { break-inside: avoid; }

/* Sample document excerpt */
.sample-doc { margin: 18px 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.sample-doc > p { margin: 0; }
.sample-source {
  display: block; padding: 8px 14px; font-size: .72rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); background: var(--accent-soft); border-bottom: 1px solid var(--rule);
}
.sample-doc pre, .sample-doc div.sourceCode { margin: 0; border: 0; border-radius: 0; }
.sample-doc pre { max-height: 22em; overflow: auto; font-size: 13px; }

/* Callout */
.caveat { margin: 18px 0; padding: 12px 16px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; break-inside: avoid; }
.caveat p:last-child { margin-bottom: 0; }

/* Group heading on the projects index */
h2.group-title, .group-title { display: flex; align-items: baseline; gap: 10px; }
.group-title > .icon { align-self: center; width: 1.1em; height: 1.1em; color: var(--accent); }
.group-title .count, .group-title small { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--muted); }

/* Code */
code { font: 400 .88em/1.4 var(--mono); }
:not(pre) > code { padding: 1px 5px; background: var(--accent-soft); border-radius: 4px; overflow-wrap: anywhere; }
pre, div.sourceCode {
  margin: 14px 0 18px; padding: 12px 14px; overflow-x: auto; color: var(--ink);
  background: var(--bg); border: 1px solid var(--rule); border-radius: 8px;
  font: 400 13px/1.5 var(--mono);
}
div.sourceCode { padding: 0; }
div.sourceCode pre, div.sourceCode pre.sourceCode { margin: 0; padding: 12px 14px; border: 0; border-radius: 0; background: none; }
pre code { padding: 0; background: none; font: inherit; overflow-wrap: normal; white-space: pre; }
div.sourceCode pre.sourceCode, pre.sourceCode code, code.sourceCode > span { color: var(--ink); }
pre span, .page pre code span, .page div.sourceCode pre code span { color: inherit !important; font-style: normal !important; font-weight: inherit; background: none !important; }
pre:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Project pages: small screens */
@media (max-width: 720px) {
  .project-nav { gap: 6px; }
  .project-nav a { padding: 0 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .page table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .page figure.diagram { padding: 10px 8px 8px; overflow-x: auto; }
  .diagram svg { min-width: 600px; }
  .diagram figcaption { position: sticky; left: 0; }
  .diagram figcaption::before { content: "Scroll sideways to see the whole diagram. "; display: block; font-style: italic; }
  .timeline ul { padding-left: 18px; }
  .timeline li::before { left: -26px; }
}

/* Project pages: print */
@media print {
  .icon { display: none !important; }
  .project-nav { display: none; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .stat { border: 1px solid #ccc; padding: 6px 8px; }
  .stat-value { font-size: 15pt; }
  .page table { display: table; font-size: 8.5pt; break-inside: avoid; }
  .page thead th { background: none; }
  .page img.fig, .page figure img { background: #fff; padding: 0; }
  .page figure, .stat, .caveat, .sample-doc, .page tr { break-inside: avoid; }
  .sample-doc pre, pre { max-height: none; overflow: visible; white-space: pre-wrap; border-color: #ccc; background: none; }
  .caveat { background: none; }
  .diagram svg { color: #111; }
}

/* ==========================================================================
   Motion. Gated on prefers-reduced-motion: no-preference; the hidden state of
   the card fade also needs html.js-motion (set in the head) and .rv (set by
   assets/js/site.js only on cards below the fold).
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .card .icon-go, .more .icon-go { transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
  .card:is(:hover, :focus-within) .icon-go, .more:hover .icon-go { transform: translateX(3px); }

  html.js-motion .rv {
    opacity: 0; transform: translateY(8px);
    transition: opacity 420ms cubic-bezier(.2, .7, .2, 1), transform 420ms cubic-bezier(.2, .7, .2, 1);
    transition-delay: calc(var(--rv-i, 0) * 50ms);
  }
  html.js-motion .rv.is-in { opacity: 1; transform: none; }

  /* Reading progress (technical reports) */
  .read-progress {
    position: fixed; top: 0; left: 0; z-index: 30; width: 100%; height: 2px;
    background: var(--accent); transform-origin: 0 50%;
    transform: scaleX(var(--read, 0)); pointer-events: none;
  }
  @supports (animation-timeline: scroll()) {
    .read-progress { transform: scaleX(0); animation: read-grow linear both; animation-timeline: scroll(root); }
    @keyframes read-grow { to { transform: scaleX(1); } }
  }
}

@media print {
  .read-progress { display: none !important; }
  html.js-motion .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
}
