/* =============================================================
   Micha Burkhardt — layout & components
   All colour/type values come from tokens.css. Add none here.
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

::selection { background: var(--accent-wash); }

/* Skip link — keyboard users land here first */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: var(--sp-3) var(--sp-4); z-index: 200;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }


/* ---------- Paper grain ----------
   One 256px tile laid down twice at different offsets, so the repeat period
   is not perceptible. Light mode multiplies dark grain onto the paper; dark
   mode screens light grain over it. Purely decorative, never interactive.
   Strength is --grain-opacity in tokens.css; set it to 0 to remove. */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 300;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
  background-image: url("/static/img/noise-light.png"), url("/static/img/noise-light.png");
  background-repeat: repeat, repeat;
  background-size: 256px 256px, 256px 256px;
  background-position: 0 0, 83px 137px;
}
:root[data-theme="dark"] .grain {
  mix-blend-mode: screen;
  background-image: url("/static/img/noise-dark.png"), url("/static/img/noise-dark.png");
}
@media (max-width: 40rem) {
  /* finer grain at high DPR on small screens */
  .grain {
    background-size: 180px 180px, 180px 180px;
    background-position: 0 0, 67px 91px;
  }
}

/* ---------- Shell ---------- */
.wrap { width: min(100% - 2.5rem, var(--width-page)); margin-inline: auto; }
.wrap--text { width: min(100% - 2.5rem, var(--width-text)); margin-inline: auto; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-5); padding-block: var(--sp-4);
}
.wordmark {
  font-family: var(--font-display);
  font-size: var(--step-1); font-weight: 600;
  letter-spacing: -0.015em; text-decoration: none; white-space: nowrap;
}
.wordmark:hover { color: var(--accent); }

.site-header__right { display: flex; align-items: center; gap: var(--sp-5); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; flex: none;
  padding: 0; background: none; cursor: pointer;
  border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--ink-2);
  transition: color var(--transition), border-color var(--transition);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .icon { width: 1.05rem; height: 1.05rem; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.6; }
.icon--sun circle { fill: currentColor; stroke: none; }
.icon--moon { fill: currentColor; stroke: none; }

/* Show the icon for the theme you would switch TO */
.icon--sun { display: none; }
.icon--moon { display: block; }
:root[data-theme="dark"] .icon--sun { display: block; }
:root[data-theme="dark"] .icon--moon { display: none; }

.nav { display: flex; gap: var(--sp-5); align-items: center; }
.nav a {
  font-size: var(--step--1); text-decoration: none;
  color: var(--ink-2); letter-spacing: 0.01em;
  padding-block: var(--sp-1); position: relative;
  transition: color var(--transition);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule);
  border-radius: var(--radius); color: var(--ink);
  padding: var(--sp-2) var(--sp-3); font: inherit;
  font-size: var(--step--1); cursor: pointer;
}

@media (max-width: 56rem) {
  .nav-toggle { display: block; }
  .site-header__right { gap: var(--sp-3); }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: var(--sp-3) 1.25rem var(--sp-5);
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding-block: var(--sp-3); font-size: var(--step-0); }
  .nav a::after { display: none; }
}

/* ---------- Banner (homepage) ---------- */
.banner {
  position: relative;
  /* fill the viewport below the sticky header */
  height: calc(100svh - 4.5rem);
  min-height: 22rem;
  overflow: hidden;
}
#network {
  position: absolute; inset: 0;
  width: 100%; height: 100%; display: block;
}
.banner__inner::before {
  /* soft halo so the tagline stays legible over the mesh */
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: min(90%, 34rem); aspect-ratio: 3 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--paper) 85%, transparent) 0%,
    color-mix(in srgb, var(--paper) 45%, transparent) 38%,
    transparent 72%);
  pointer-events: none;
}
.banner__inner > * { position: relative; }
.banner__inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: var(--sp-5);
  pointer-events: none;
}
.banner__tagline {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: var(--sp-5) 0 0;
}

/* ---------- Course cards ----------
   Each card carries its own hue via --c (light) and --c-dark (dark),
   set inline from the course list in content/teaching.md. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: var(--sp-5);
  padding-block: var(--sp-6) var(--sp-8);
}
.card {
  --hue: var(--c, var(--accent));
  position: relative;
  display: flex; flex-direction: column;
  padding: var(--sp-5);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--hue);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--hue) 5%, var(--paper));
  text-decoration: none; color: inherit;
  transition: transform var(--transition), box-shadow var(--transition),
              background var(--transition), border-color var(--transition);
}
:root[data-theme="dark"] .card { --hue: var(--c-dark, var(--accent)); }
.card:hover {
  transform: translateY(-3px);
  background: color-mix(in srgb, var(--hue) 10%, var(--paper));
  border-color: color-mix(in srgb, var(--hue) 45%, var(--rule));
  box-shadow: 0 6px 24px -12px color-mix(in srgb, var(--hue) 60%, transparent);
}
.card:hover .card__title { color: var(--hue); }
.card__code {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--hue); font-weight: 400;
  margin: 0 0 var(--sp-3);
}
.card__title {
  font-size: var(--step-1); font-weight: 600; line-height: 1.25;
  letter-spacing: -0.01em; margin: 0 0 var(--sp-2);
  transition: color var(--transition);
}
.card__meta {
  font-size: var(--step--1); color: var(--ink-3);
  margin: 0 0 var(--sp-4);
}
.card__body { font-size: var(--step--1); color: var(--ink-2); margin: 0; }
.card__go {
  margin-top: auto; padding-top: var(--sp-4);
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--hue);
}
.card__go::after { content: " \2192"; }

/* Project cards are horizontal: thumbnail on the left, text on the right, one
   per row. A vertical list of wide cards scales better than a tile grid when
   entries have real summaries rather than one-liners. */
.cards--projects {
  grid-template-columns: minmax(0, 46rem);
  justify-content: start;
}
.card--project {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: start;
  border-top-width: 1px;              /* accent moves to the left edge */
  border-left: 3px solid var(--hue);
}
.card__thumb {
  display: block; margin: 0;
  aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: var(--radius);
}
.card__thumb img {
  /* cover + top: at 11rem the whole plot is illegible, so show its most
     recognisable band — the density curve — rather than shrinking all of it */
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  display: block;
}
.card__text { display: flex; flex-direction: column; height: 100%; }
.card--project .card__body { margin-bottom: var(--sp-4); }
.card--project .card__go { padding-top: 0; margin-top: auto; }

@media (max-width: 40rem) {
  .card--project { grid-template-columns: 1fr; }
  .card__thumb { max-width: 11rem; }
}

@media (prefers-reduced-motion: reduce) {
  .card:hover { transform: none; }
}

/* ---------- Page header ---------- */
.page-head { padding-block: var(--sp-8) var(--sp-6); border-bottom: 1px solid var(--rule-soft); }

/* Pages with an action row (Publications, CV) drop the rule — the buttons
   already separate the header from what follows, and on Publications the
   first year heading brings its own line right underneath. */
.page-head:has(.pub-actions),
.page-head:has(.cv-actions) {
  border-bottom: 0;
  padding-bottom: var(--sp-4);   /* was --sp-6; no rule to sit under */
}

/* The first year heading follows the action row directly, so it does not need
   the full separation the later ones use between groups. */
.pub-year:first-of-type { margin-top: var(--sp-5); }
.page-head__kicker {
  font-family: var(--font-mono); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin: 0 0 var(--sp-3);
}
.page-head__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--step-3); line-height: var(--leading-tight);
  letter-spacing: -0.02em; margin: 0; max-width: 24ch;
}
.page-head__sub { color: var(--ink-2); margin: var(--sp-4) 0 0; max-width: var(--measure); }

/* ---------- Page with a portrait column ----------
   Uses the empty space to the right of the 66ch measure. Collapses to a single
   column on narrow screens, with the photo above the text. */
.with-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: var(--sp-7);
  align-items: start;
}
.page-aside { padding-top: var(--sp-6); }
.portrait {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius);
  border: 1px solid var(--rule-soft);
}
.portrait__caption {
  font-size: var(--step--1); color: var(--ink-3);
  margin: var(--sp-3) 0 0;
}
@media (max-width: 56rem) {
  .with-aside { grid-template-columns: 1fr; gap: var(--sp-5); }
  .page-aside { order: -1; max-width: 13rem; padding-top: var(--sp-5); }
}

/* ---------- Prose ---------- */
.prose { padding-block: var(--sp-6) var(--sp-8); max-width: var(--measure); }
.prose--entries:has(> .badges:first-child) { padding-top: var(--sp-4); }

/* Reset the browser's default block margins. Wrapped in :where() so this rule
   carries no specificity — otherwise `.prose p` (0-1-1) outranks the spacing
   rule below (0-1-0) and silently zeroes every paragraph gap. */
.prose :where(p, ul, ol, blockquote, pre, table, img) { margin-block: 0; }

/* All vertical rhythm comes from here: space between siblings, never before
   the first child. Headings override this with their own margins. */
.prose > * + * { margin-top: var(--sp-5); }
.prose h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--step-2); line-height: 1.25; letter-spacing: -0.015em;
  margin-top: var(--sp-7); margin-bottom: var(--sp-3);
}
.prose h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--step-1); line-height: 1.3;
  margin-top: var(--sp-6); margin-bottom: var(--sp-2);
}
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: var(--sp-2); }
.prose li::marker { color: var(--ink-3); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin-block: var(--sp-7); }
.prose blockquote {
  margin: var(--sp-5) 0; padding-left: var(--sp-4);
  border-left: 2px solid var(--accent);
  color: var(--ink-2); font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: var(--paper-2); padding: 0.15em 0.4em; border-radius: var(--radius);
}
.prose pre {
  background: var(--paper-2); padding: var(--sp-4); border-radius: var(--radius);
  overflow-x: auto; border: 1px solid var(--rule-soft);
}
.prose pre code { background: none; padding: 0; font-size: 0.85em; }
.prose img { border-radius: var(--radius); margin-block: var(--sp-5); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.prose th, .prose td { text-align: left; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--rule-soft); }
.prose th { font-weight: 600; }

/* CV tables: the first column is a "when" column on every table, so fix it to
   one width across all of them instead of letting each table auto-size to its
   own content. Mirrors templates/cv_pdf.html so page and PDF agree. */
.prose--cv table { table-layout: fixed; }
.prose--cv td:first-child,
.prose--cv th:first-child { width: 9rem; padding-left: 0; }
/* .cv-wide is deliberately NOT honoured here: on the web every CV table keeps
   the same first-column width. The exemption applies only in the PDF, where
   the narrower page makes a shrink-to-fit column worth having. */


/* ---------- Entry-style prose (Personal) ----------
   Each h2 starts a new entry, separated by a rule the way CV sections are. */
.prose--entries h2 {
  border-top: 1px solid var(--rule);
  padding-top: var(--sp-6);
  margin-top: var(--sp-7);
}
.prose--entries h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.prose--entries .entry-date {
  font-family: var(--font-mono); font-size: var(--step--1);
  color: var(--ink-3); letter-spacing: 0.06em;
  display: block; margin-top: calc(var(--sp-2) * -1);
}

/* ---------- Figure with the caption beside it ----------
   The image keeps the text's 66ch measure so it lines up with the paragraphs,
   while the figure element itself spans the full page width — the extra space
   on the right holds the caption instead of sitting empty. Stacks on narrow
   screens, where there is no spare column. */
.prose .figure--aside {
  width: min(var(--width-page), calc(100vw - 2.5rem));
  max-width: none;
  margin: var(--sp-6) 0;
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(9rem, 1fr);
  gap: var(--sp-5);
  align-items: start;
}
.figure--aside img {
  /* No frame or backing plate: the plot has a transparent background, so it
     should sit directly on the page and pick up the paper grain. */
  width: 100%; height: auto; display: block;
  border-radius: var(--radius);
}
/* In dark mode that transparency works against us — the plot is drawn in dark
   ink, so it would be near-invisible on a dark page. Give it a light plate. */
:root[data-theme="dark"] .figure--aside img,
:root[data-theme="dark"] .card__thumb img {
  background: #f6f4ef;
  padding: var(--sp-3);
}
.figure--aside button {
  display: block; width: 100%; padding: 0; border: 0;
  background: none; cursor: zoom-in;
}
.figure--aside button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.figure--aside figcaption {
  font-size: var(--step--1); color: var(--ink-2);
  margin: 0; max-width: none;
  /* Nudge down so the caption title reads as level with the top of the image
     rather than sitting above it — text has no leading above its cap height. */
  padding-top: var(--sp-3);
}
/* A leading <b> in a caption is its title: own line, full ink, space beneath. */
.figure--aside figcaption > b:first-child,
.figure--aside figcaption > strong:first-child {
  display: block;
  color: var(--ink);
  margin-bottom: var(--sp-3);
}
@media (max-width: 56rem) {
  .prose .figure--aside { grid-template-columns: 1fr; gap: var(--sp-3); }
  .figure--aside figcaption { max-width: var(--measure); }
}

/* ---------- Badges ----------
   The two-tone shields.io shape, rendered natively: no external request, no
   raster image, follows the theme, and stays crisp at any zoom. Each badge
   sets its own hue inline via --c, like the course cards. */
.badges {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin: var(--sp-5) 0;
}
/* A badge row opening an article sits right under the page rule, where the
   prose padding already supplies the gap — its own top margin is redundant. */
.prose > .badges:first-child { margin-top: 0; }
.badge {
  --hue: var(--c, var(--accent));
  display: inline-flex; align-items: stretch;
  font-family: var(--font-mono); font-size: 0.72rem;
  line-height: 1; text-decoration: none;
  border-radius: var(--radius); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.badge__label, .badge__value {
  display: inline-flex; align-items: center;
  padding: 0.45em 0.7em; letter-spacing: 0.04em;
}
.badge__label { background: var(--ink); color: var(--paper); }
.badge__value { background: var(--hue); color: #fff; font-weight: 500; }
.badge:hover { transform: translateY(-1px); box-shadow: 0 3px 10px -5px var(--hue); }
.badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .badge:hover { transform: none; } }

/* ---------- Photo gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: var(--sp-3);
  padding-bottom: var(--sp-8);
}
.gallery__item {
  padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 1 / 1;
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.gallery__item:hover { transform: scale(1.03); box-shadow: 0 4px 18px -8px rgba(0,0,0,0.4); }
.gallery__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .gallery__item:hover { transform: none; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-3);
  background: color-mix(in srgb, #08080a 92%, transparent);
  padding: var(--sp-5);
}
.lightbox[hidden] { display: none; }
.lightbox__stage {
  margin: 0; display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-3); max-width: min(92vw, 60rem); max-height: 88vh;
}
.lightbox__stage img {
  max-width: 100%; max-height: 82vh;
  object-fit: contain; border-radius: var(--radius);
}
.lightbox__count {
  font-family: var(--font-mono); font-size: var(--step--1);
  color: rgba(255,255,255,0.65); letter-spacing: 0.1em;
}
.lightbox__nav, .lightbox__close {
  background: none; border: 0; cursor: pointer; flex: none;
  color: rgba(255,255,255,0.8);
  font-size: 2.4rem; line-height: 1;
  padding: var(--sp-3);
  transition: color var(--transition);
}
.lightbox__nav:hover, .lightbox__close:hover { color: #fff; }
.lightbox__nav:focus-visible, .lightbox__close:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px; border-radius: var(--radius);
}
.lightbox__close {
  position: absolute; top: var(--sp-3); right: var(--sp-4); font-size: 2rem;
}
@media (max-width: 40rem) {
  .lightbox { padding: var(--sp-3); gap: 0; }
  .lightbox__nav { position: absolute; bottom: var(--sp-5); font-size: 2.8rem; }
  .lightbox__nav--prev { left: var(--sp-4); }
  .lightbox__nav--next { right: var(--sp-4); }
}

/* ---------- Publications ---------- */
/* Buttons on the left, counts pushed to the right of the same row. */
.pub-actions {
  display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-5);
  align-items: center; justify-content: space-between;
  margin-top: var(--sp-5);
}
.pub-counts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
.pub-count { font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-3); }

@media (max-width: 40rem) {
  /* stacked on narrow screens, counts left-aligned under the buttons */
  .pub-actions { justify-content: flex-start; }
}

.pub-year {
  font-family: var(--font-mono); font-size: var(--step--1);
  color: var(--ink-3); letter-spacing: 0.1em;
  margin: var(--sp-7) 0 var(--sp-4);
  padding-bottom: var(--sp-2); border-bottom: 1px solid var(--rule);
}
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub {
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--rule-soft);
  display: grid; gap: var(--sp-2);
}
.pub__title {
  font-family: var(--font-display); font-size: var(--step-1);
  font-weight: 600; line-height: 1.3; margin: 0; letter-spacing: -0.01em;
}
.pub__title a { text-decoration: none; }
.pub__authors { font-size: var(--step--1); color: var(--ink-2); margin: 0; }
.pub__authors .me { color: var(--ink); font-weight: 600; }
.pub__venue { font-size: var(--step--1); color: var(--ink-3); margin: 0; font-style: italic; }
.pub__links { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.tag {
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.25em 0.6em; border: 1px solid var(--rule);
  border-radius: var(--radius); text-decoration: none;
  color: var(--ink-2); transition: all var(--transition);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag--oa { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.tag--plain { pointer-events: none; color: var(--ink-3); }

/* ---------- Post list ---------- */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-item { padding-block: var(--sp-5); border-bottom: 1px solid var(--rule-soft); }
.post-item__date {
  font-family: var(--font-mono); font-size: var(--step--1); color: var(--ink-3);
}
.post-item__title {
  font-family: var(--font-display); font-size: var(--step-2); font-weight: 600;
  margin: var(--sp-2) 0; line-height: 1.25; letter-spacing: -0.015em;
}
.post-item__title a { text-decoration: none; }
.post-item__title a:hover { color: var(--accent); }
.post-item__excerpt { color: var(--ink-2); margin: 0; max-width: var(--measure); }

/* ---------- CV ---------- */
.cv-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-5); }
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: var(--step--1); font-weight: 500;
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid var(--ink); border-radius: var(--radius);
  text-decoration: none; color: var(--paper); background: var(--ink);
  transition: all var(--transition);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: none; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: none; color: var(--accent); border-color: var(--accent); }


/* ---------- 404 ---------- */
.notfound { padding-block: var(--sp-9); text-align: center; }
.notfound__code {
  font-family: var(--font-mono); font-size: var(--step-4);
  color: var(--accent); margin: 0 0 var(--sp-4);
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
