/* Daniel Schoenland – about.schoenland.com
   Clean rebuild, no WordPress. Typeface: Söhne (Klim Type Foundry, licensed).

   Licensed variable fonts, content-addressed in cache/immutable/
   (hash = first 8 hex chars of the file's SHA-256):
     soehne-vf-roman.<hash>.woff2  → Söhne VF, wght 200–900
     soehne-vf-kursiv.<hash>.woff2 → Söhne VF Italic, wght 200–900
   Full character set incl. umlauts and typographic quotes. */

@font-face {
  font-family: "Söhne";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../../cache/immutable/soehne-vf-roman.bb700d10.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Söhne";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../../cache/immutable/soehne-vf-kursiv.96b5bc00.woff2") format("woff2-variations");
}

/* Metric-matched fallback: local Helvetica Neue/Arial forced onto Söhne's
   vertical metrics (ascent 931, descent 191, gap 0, measured widths within
   ~1%), so a late swap no longer shifts baselines or reflows the page. */
@font-face {
  font-family: "Söhne Fallback";
  font-style: normal;
  font-weight: 200 900;
  src: local("Helvetica Neue"), local("Arial");
  ascent-override: 93.1%;
  descent-override: 19.1%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Söhne Fallback";
  font-style: italic;
  font-weight: 200 900;
  src: local("Helvetica Neue Italic"), local("Arial Italic"), local("Helvetica Neue"), local("Arial");
  ascent-override: 93.1%;
  descent-override: 19.1%;
  line-gap-override: 0%;
}

:root {
  --bg: #edeae9;
  --fg: #000000;
  --blue: #030fff;
  --red: #ff0000;
  --line: rgba(0, 0, 0, 0.22);
  --gutter: clamp(16px, 3vw, 40px);
  /* rem, not px: the content cap follows the root font-size on large screens */
  --max: 82.5rem;
}

/* Dark theme: no slab of black — the warm greige base (#edeae9) dialed
   way down. Accents are lifted for dark so contrast and glow survive.
   Set as data-theme="dark" on <html> by the theme script (see theme.js);
   the profile page (body.dark) keeps its own black. */
:root[data-theme="dark"] {
  --bg: #1c1917;
  --fg: #eae6e2;
  --blue: #7b84ff;
  --red: #ff6a5e;
  --line: rgba(255, 255, 255, 0.28);
}

:root[data-theme="dark"] img {
  filter: brightness(0.92);
}

* { box-sizing: border-box; }

html { font-size: 17px; }

/* Large screens: scale the whole composition with the viewport instead of
   leaving a 17px layout adrift in empty space. Every measure that matters
   is in rem/em, so growing the root scales type, caps, and frames together.
   Slope: +1px per 200px of viewport beyond 1700px, capped at 22px (~2700px)
   so a 5K display doesn't turn the page into a poster. */
@media (min-width: 1700px) {
  html { font-size: min(calc(17px + (100vw - 1700px) * 0.005), 22px); }
  /* footer and theme pill are furniture, not content — they stay quiet
     instead of scaling up with the root (padding is em, so the whole
     pill shrinks with its font-size) */
  .site-footer { font-size: 0.72rem; }
  .theme-toggle { font-size: 0.62rem; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Söhne", "Söhne Fallback", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.45s ease, color 0.45s ease;
}

body.dark {
  --bg: #000000;
  --fg: #ffffff;
  background: var(--bg);
  color: var(--fg);
}

/* Keep picture wrappers layout-transparent (grid columns, sticky portrait).
   Important: hide source elements explicitly — with display:contents
   they become empty grid items and shift the columns. */
picture { display: contents; }
picture source { display: none; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}

.site-header .brand { line-height: 1.35; font-size: 0.82rem; }
.site-header .brand strong { font-weight: 700; display: block; }

/* role units never wrap internally — breaks only between them */
.site-header .brand .r { white-space: nowrap; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4em;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ---------- Theme-Umschalter (Auto / Light / Dark) ---------- */

.theme-toggle {
  display: none; /* invisible without JavaScript; theme.js sets data-theme */
  align-items: center;
  gap: 0.5em;
  margin-left: 0.4em;
  padding: 0.38em 0.95em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.45s ease,
              color 0.45s ease, transform 0.15s ease;
}

:root[data-theme] .theme-toggle { display: inline-flex; }

.theme-toggle:hover { border-color: currentColor; text-decoration: none; }
.theme-toggle:active { transform: scale(0.94); }

.theme-toggle-icon {
  font-size: 0.9em;
  line-height: 1;
  /* fixed width: the glyphs ◐ ○ ● differ in width */
  display: inline-block;
  width: 1.2em;
  text-align: center;
}

/* Fixed label width ("Light" is the longest word) so the pill
   never jumps in width while cycling. */
.theme-toggle-label {
  display: inline-block;
  min-width: 3em;
  text-align: center;
}

/* Click animation: the icon spins once around its own axis and briefly
   scales up — like a light switch flipping. */
@keyframes theme-flip {
  0%   { transform: rotate(0deg) scale(1); }
  45%  { transform: rotate(180deg) scale(1.35); }
  100% { transform: rotate(360deg) scale(1); }
}

.theme-toggle-icon.is-spinning {
  animation: theme-flip 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle-icon.is-spinning { animation: none; }
  .theme-toggle:active { transform: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px var(--gutter) 24px;
  max-width: var(--max);
  margin: 64px auto 0;
  font-size: 0.88rem;
}

.site-footer .social { display: flex; gap: 1.2em; flex-wrap: wrap; align-items: center; }
.site-footer .building { display: flex; gap: 0.6em; }

/* ---------- Startseite ---------- */

.home-intro {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: clamp(48px, 9vh, 110px) 0 0.45em;
  max-width: 24em;
}

.home-lead {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 28em;
  margin: 0 0 clamp(28px, 4vh, 48px);
}

/* One-line bio under the hero: ties both spellings of the name together
   in visible text, word for word the Person JSON-LD description — one
   crawlable sentence a knowledge panel can lift verbatim. */
.home-id {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--mute);
  max-width: 44em;
  margin: 0 0 clamp(28px, 4vh, 40px);
}

.home-proof {
  list-style: none;
  margin: 0 0 clamp(56px, 9vh, 96px);
  padding: 0;
  max-width: 40em;
}

.home-proof li {
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr);
  gap: 0.4em;
  align-items: baseline;
  margin: 0 0 0.85em;
  font-size: 1.02rem;
  line-height: 1.45;
}

.home-proof .no {
  font-style: italic;
  color: var(--mute);
}

.home-portrait {
  display: block;
  margin: 0 auto;
  width: min(48.25rem, 88vw);
  height: auto;
  /* gentle grade: saturation and contrast only — warmth comes from the
     veil's light, not from tinting the skin (sepia read as artificial) */
  filter: saturate(1.16) contrast(1.1) brightness(0.97);
}

/* the global dark-theme brightness rule is more specific — combined here */
:root[data-theme="dark"] .home-portrait {
  filter: saturate(1.16) contrast(1.1) brightness(0.92);
}

/* ---------- Portrait veil ----------
   Fine gradient + vignette over the portraits: a touch of light up top,
   gently darkening below, plus a hairline inner edge. Lives as ::after
   on the picture frame (which is deliberately a box again here,
   overriding picture { display: contents }). */

picture.portrait-frame {
  display: block;
  position: relative;
}

.portrait-frame img { width: 100%; height: auto; display: block; margin: 0; }

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 253, 250, 0.06) 0%,
    rgba(0, 0, 0, 0) 32%,
    rgba(0, 0, 0, 0) 58%,
    rgba(24, 21, 19, 0.22) 100%
  );
  box-shadow:
    inset 0 0 56px rgba(24, 21, 19, 0.14),
    inset 0 0 0 1px rgba(24, 21, 19, 0.08);
  /* same duration/curve as the image reveal (.reveal) — a faster veil
     finishes early and the vignette visibly pulses under the portrait */
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Home veil, stronger cut: warm light falling in from the top and a soft
   radial vignette pull the eye to the face without touching skin tones. */
.portrait-home::after {
  background:
    linear-gradient(
      to bottom,
      rgba(255, 235, 205, 0.1) 0%,
      rgba(0, 0, 0, 0) 35%,
      rgba(0, 0, 0, 0) 55%,
      rgba(24, 21, 19, 0.34) 100%
    ),
    radial-gradient(120% 90% at 50% 30%, rgba(0, 0, 0, 0) 55%, rgba(24, 21, 19, 0.16) 100%);
}

/* Show overlays only once the image has faded in — otherwise empty
   gradient boxes sit on the page while the reveal runs. */
.portrait-frame:has(img.reveal:not(.is-in))::after,
.portfolio-frame:has(img.reveal:not(.is-in))::after {
  opacity: 0;
}

/* vt-skip means the image appears instantly (page cross-fade covers it) —
   the veil must not fade in after the fact */
.portrait-frame:has(img.vt-skip)::after,
.portfolio-frame:has(img.vt-skip)::after {
  transition: none;
}

.portrait-home { width: min(48.25rem, 88vw); margin: 0 auto; }

/* ---------- Portfolio grade (Ventures) ----------
   Related to the portrait veil, but its own thing: the images sit in a
   slightly desaturated editorial grade under a diagonal light sweep
   (instead of vertical). On hover the colors wake up and the image
   leans in ever so slightly. */

picture.portfolio-frame {
  display: block;
  position: relative;
  overflow: hidden;
}

.portfolio-frame img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.82) contrast(1.02);
  /* opacity belongs in this list: it overrides the image reveal's
     transition (.reveal) — without it the fade-in would snap */
  transition: filter 0.6s ease,
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Loading surface: while the image file is still arriving, the frame
   shows a quiet paper tone with a slow diagonal light sweep instead of
   a blank hole. reveal.js adds .is-ready once the file has loaded; the
   sweep then fades out (and pauses) under the appearing image. */
picture.portfolio-frame { background: color-mix(in srgb, var(--fg) 4%, var(--bg)); }

/* Blur-up: while the file is still arriving (.is-ready not set yet) or
   the artwork is being swapped for the other theme (.is-theming), the
   bitmap shows as a soft, slightly enlarged veil; once the new file has
   decoded, the img's existing filter/transform transition resolves it
   into focus instead of letting it pop in. */
picture.portfolio-frame:not(.is-ready) img,
picture.portfolio-frame.is-theming img {
  filter: blur(18px) saturate(0.82) contrast(1.02);
  transform: scale(1.04);
}
:root[data-theme="dark"] picture.portfolio-frame:not(.is-ready) img,
:root[data-theme="dark"] picture.portfolio-frame.is-theming img {
  filter: blur(18px) saturate(0.82) contrast(1.02) brightness(0.92);
}
@media (prefers-reduced-motion: reduce) {
  picture.portfolio-frame:not(.is-ready) img,
  picture.portfolio-frame.is-theming img {
    filter: saturate(0.82) contrast(1.02);
    transform: none;
  }
}

picture.portfolio-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(0, 0, 0, 0) 32%,
    color-mix(in srgb, var(--fg) 7%, var(--bg)) 50%,
    rgba(0, 0, 0, 0) 68%
  );
  transform: translateX(-100%);
  animation: frame-sheen 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  opacity: 1;
  transition: opacity 0.6s ease;
}

picture.portfolio-frame.is-ready::before {
  opacity: 0;
  animation-play-state: paused;
}

@keyframes frame-sheen {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  picture.portfolio-frame::before { animation: none; opacity: 0; }
}

.portfolio-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 253, 250, 0.07) 0%,
    rgba(0, 0, 0, 0) 38%,
    rgba(0, 0, 0, 0) 62%,
    rgba(24, 21, 19, 0.18) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(24, 21, 19, 0.08);
  opacity: 1;
  /* synced with the image reveal, see the portrait veil note */
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-frame:hover img,
.portfolio-frame:focus-within img {
  filter: saturate(1) contrast(1.02);
  transform: scale(1.015);
}

/* In the dark theme the global brightness rule would win
   (:root[data-theme="dark"] img is more specific) — combined here. */
:root[data-theme="dark"] .portfolio-frame img {
  filter: saturate(0.82) contrast(1.02) brightness(0.92);
}

:root[data-theme="dark"] .portfolio-frame:hover img,
:root[data-theme="dark"] .portfolio-frame:focus-within img {
  filter: saturate(1) contrast(1.02) brightness(0.96);
}

.portfolio-frame:hover::after,
.portfolio-frame:focus-within::after {
  opacity: 0.35;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-frame img { transition: filter 0.6s ease; }
  .portfolio-frame:hover img { transform: none; }
}

.home-claim {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: clamp(32px, 5vh, 56px) 0 0;
}

/* ---------- In Progress (/next) ---------- */

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  align-items: end;
  gap: 24px;
  margin-top: clamp(64px, 14vh, 160px);
}

.project-hero:has(h1:only-child),
.project-hero:has(h2:only-child) {
  grid-template-columns: 1fr;
  margin-top: clamp(80px, 16vh, 180px);
}

.project-hero h1,
.project-hero h2 {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
}

.project-hero img { width: 100%; height: auto; display: block; }

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

/* Uniform 4:3 tiles so mixed source formats (landscape product shots,
   portrait architecture) sit on one shared baseline. */
.project-gallery img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; display: block; }
.project-gallery img.focus-low { object-position: 50% 62%; }

.project-details {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 24px;
  margin-top: clamp(48px, 8vh, 96px);
}

.label {
  font-size: 1.28rem;
  font-weight: 400;
  margin: 0 0 0.9em;
}

.project-meta p { margin: 0 0 0.4em; }
.project-meta .block { margin-bottom: 2.4em; }

.project-intro p { margin: 0 0 1.3em; }
.project-intro a { color: var(--blue); }

/* ---------- README ---------- */

.readme {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(40px, 8vh, 96px);
  /* let the columns stretch: the sticky portrait needs runway */
}

/* sticky sits on the portrait frame (picture), no longer on the img */
.readme-portrait .portrait-frame {
  position: sticky;
  top: 24px;
}

.readme-portrait img {
  width: 100%;
  height: auto;
  display: block;
  /* same grade as the home portrait — skin stays untinted */
  filter: saturate(1.16) contrast(1.1) brightness(0.97);
}

:root[data-theme="dark"] .readme-portrait img {
  filter: saturate(1.16) contrast(1.1) brightness(0.92);
}

/* Profile veil: the home treatment, eased for the black page — the warm
   top light carries, the vignette steps back so it doesn't sink into
   the dark ground. */
.readme-portrait .portrait-frame::after {
  background:
    linear-gradient(
      to bottom,
      rgba(255, 235, 205, 0.08) 0%,
      rgba(0, 0, 0, 0) 35%,
      rgba(0, 0, 0, 0) 58%,
      rgba(24, 21, 19, 0.26) 100%
    ),
    radial-gradient(120% 90% at 50% 30%, rgba(0, 0, 0, 0) 60%, rgba(24, 21, 19, 0.12) 100%);
}

.readme-text p { margin: 0 0 1.3em; }
.readme-text h2,
.readme-text h3 {
  font-size: 1.28rem;
  font-weight: 400;
  margin: 2.2em 0 0.9em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.readme-text a { color: var(--red); }
.readme-text .xp-year { margin-bottom: 0.2em; }
.readme-text .xp-entry { margin-bottom: 1.6em; }
.readme-text .tech p { margin: 0; }

/* ---------- Image reveal (subtle fade-in on scroll) ----------
   Classes are set at runtime by assets/js/reveal.js; without JavaScript
   every image is visible right away (no content depends on JS). */

.reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Entrance via view transition: the page cross-fade takes over and the
   image's own fade-in is skipped (set by reveal.js via pagereveal) */
.reveal.vt-skip { transition: none; }

.project-gallery .reveal:nth-child(2),
.project-gallery picture:nth-child(2) .reveal { transition-delay: 0.12s; }
.project-gallery .reveal:nth-child(3),
.project-gallery picture:nth-child(3) .reveal { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Mobile contact bar ----------
   Small viewports only: fixed bar along the bottom edge with a direct
   LinkedIn link. Respects the iPhone safe area. */

.mobile-connect {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  justify-content: center;
  align-items: center;
  gap: 0.8em;
  padding: 0.8em var(--gutter) calc(0.8em + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: background-color 0.45s ease, color 0.45s ease;
}

.mobile-connect .mc-hint { opacity: 0.65; }

.mobile-connect a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.45em 1.1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 500;
}

.mobile-connect a:hover { border-color: currentColor; text-decoration: none; }

.mobile-connect .mc-li { display: block; flex-shrink: 0; }

/* ---------- Mobil ---------- */

@media (max-width: 760px) {
  /* Controlled tagline wrapping: "Cybersecurity Entrepreneur" gets its
     own line, the two roles below — no orphaned "derimeter" */
  .site-header .brand .sep { display: none; }
  .site-header .brand .r:first-child { display: block; }
  /* Whole brand block (name + subtitle) as one tap target to the home
     page: stretched link via ::after on the name link — mobile only */
  .site-header .brand { position: relative; }
  .site-header .brand a::after {
    content: "";
    position: absolute;
    inset: 0;
  }
  .mobile-connect { display: flex; }
  /* room for the fixed bar so it never covers the footer */
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .site-header { flex-direction: column; gap: 12px; }
  .project-hero,
  .project-details,
  .readme { grid-template-columns: 1fr; }
  .project-hero h1,
  .project-hero h2 { order: 2; }
  .project-gallery { grid-template-columns: 1fr; }
  .readme-portrait .portrait-frame { position: static; }
  .site-footer { flex-direction: column; gap: 14px; }
  /* on mobile, LinkedIn already lives in the fixed contact bar —
     a footer link would be a duplicate */
  .site-footer .social { display: none; }
}

/* ========== Ledger (design kit → website, the live design since 2026-11-04) ==========
   Four signature moves of the kit:
     1. The line    — 2px ink, top, full measure, the only ornament
     2. The figures — 01/02/… italic in mute as structure, years in italic
     3. The values  — ink #161513 instead of black, mute #7a7670, hairline #d9d6ce
     4. The labels  — roles/section names as uppercase labels, +12% tracking
   Deliberately NOT adopted: Newsreader/Inter (Söhne stays), dropping the
   accent color (blue stays for links), the no-photos rule (the web lives
   on images). */

:root {
  --fg: #161513;            /* Ink — nie reines Schwarz */
  --mute: #7a7670;          /* Labels, Ziffern, Jahre, Meta */
  --line: #d9d6ce;          /* Hairline */
}

:root[data-theme="dark"] {
  --fg: #fbfaf7;            /* paper — never pure white */
  --bg: #161513;            /* swap ink and paper (kit, "dark variant") */
  --mute: #8f8b85;
  --line: rgba(251, 250, 247, 0.22);
}

/* 1 — The line, adapted: no static bar on the header, but a 2px ink
   line at the very top that writes itself as you read
   (scroll progress = ledger line). Starts as a short stroke, runs the
   full width as you scroll. Driven by ledger.js. */
.ledger-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--fg);
  transform-origin: 0 50%;
  transform: scaleX(0.05);
  z-index: 20;
  pointer-events: none;
  transition: transform 0.2s linear, background-color 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
  .ledger-line { transition: background-color 0.45s ease; }
}

/* Sticky header: name and navigation stay pinned while scrolling.
   The background sits on a ::before spanning the full viewport width
   (the header itself is capped at --max), semi-transparent with blur
   like the mobile contact bar. The hairline below only appears once
   the page is scrolled (ledger.js). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: -1;
  transition: background-color 0.45s ease, box-shadow 0.3s ease;
}

.site-header.is-stuck::before {
  box-shadow: 0 1px 0 var(--line);
}

/* Page navigation: cross-document view transitions (Safari 18.2+,
   Chrome; Firefox falls back to the hard swap — progressive enhancement).
   Content cross-fades with a slight upward drift (house easing);
   header, ledger line and mobile bar carry their own
   view-transition-names and hold still during the swap (app feel). */
@view-transition { navigation: auto; }

.site-header { view-transition-name: site-header; }
.ledger-line { view-transition-name: ledger-line; }
.mobile-connect { view-transition-name: mobile-connect; }

::view-transition-old(root) {
  animation: vt-leave 0.18s ease both;
}

::view-transition-new(root) {
  animation: vt-enter 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes vt-leave {
  to { opacity: 0; }
}

@keyframes vt-enter {
  from { opacity: 0; transform: translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* 2 — Die Ziffern */
.project-hero h2 {
  /* slightly smaller with a leading figure, otherwise
     "02 #derimeter" runs into the hero image */
  font-size: clamp(2.6rem, 5.8vw, 4.4rem);
  min-width: 0;
}

h2 .no {
  font-style: italic;
  font-weight: 400;
  font-size: 0.45em;
  color: var(--mute);
  letter-spacing: 0;
  text-transform: none;
  margin-right: 1em;
  vertical-align: 0.35em;
}

.readme-text .xp-year {
  font-style: italic;
  color: var(--mute);
}

/* 3 — the values: body copy steps back from the name */
.project-intro p,
.readme-text p { color: color-mix(in srgb, var(--fg) 86%, var(--bg)); }
.project-intro strong,
.readme-text strong { color: var(--fg); }

/* profile page: ink instead of pure black, red yields to the ledger principle */
body.dark {
  --bg: #161513;
  --fg: #fbfaf7;
}
/* 6 — Links: the line writes itself here too.
   On hover a 1px line draws in from the left underneath the link — the
   same gesture as the progress line up top. Text links carry a hairline
   at rest as affordance; nav/footer stay bare. */

.site-nav a,
.site-footer .social a,
.site-footer .building a,
.home-intro a,
.home-lead a,
.project-intro a,
.readme-text a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}

.site-nav a:hover,
.site-footer .social a:hover,
.site-footer .building a:hover,
.home-intro a:hover,
.home-lead a:hover,
.project-intro a:hover,
.readme-text a:hover {
  text-decoration: none;
  background-size: 100% 1px;
}

/* text links: hairline at rest, the ink/color line draws over it */
.project-intro a,
.readme-text a {
  background-image: linear-gradient(currentColor, currentColor),
                    linear-gradient(var(--line), var(--line));
  background-size: 0% 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
}

/* hero venture links: subtle accent tint + hairline so clickability is immediate */
.home-intro a,
.home-lead a {
  color: color-mix(in srgb, var(--fg) 68%, var(--blue));
  background-image: linear-gradient(var(--blue), var(--blue)),
                    linear-gradient(color-mix(in srgb, var(--blue) 42%, var(--line)), color-mix(in srgb, var(--blue) 42%, var(--line)));
  background-size: 0% 1.5px, 100% 1px;
  background-position: 0 100%, 0 100%;
}
.home-intro a:hover,
.home-lead a:hover {
  color: var(--blue);
  background-size: 100% 1.5px, 100% 1px;
}

.project-intro a:hover,
.readme-text a:hover {
  background-size: 100% 1px, 100% 1px;
}

.readme-text a { color: inherit; }

/* 4 — the labels: the header stays as reduced as the original,
   only the role line steps back into mute. */
.site-header .brand { color: var(--mute); }
.site-header .brand strong { color: var(--fg); }

h3.label,
.readme-text h2 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--mute);
}

.readme-text h2 .no { font-size: 0.95em; vertical-align: 0; margin-right: 0.9em; }

/* 5 — Images as sheets.
   Light: the images rest on the ground like sheets of paper — the shadow
   quotes the kit's document previews. The grade is stronger here (more
   desaturation, a hint of warmth); on hover the sheet lifts.
   Dark: a slightly deeper vignette and a fine paper inner edge. */

picture.portrait-frame,
picture.portfolio-frame {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease;
}

:root:not([data-theme="dark"]) .portrait-frame,
:root:not([data-theme="dark"]) .portfolio-frame {
  box-shadow:
    0 1px 2px rgba(22, 21, 19, 0.08),
    0 24px 50px -24px rgba(22, 21, 19, 0.3);
}

:root:not([data-theme="dark"]) .portfolio-frame img {
  filter: saturate(0.7) contrast(1.04) sepia(0.05);
}

:root:not([data-theme="dark"]) .portfolio-frame:hover,
:root:not([data-theme="dark"]) .portfolio-frame:focus-within {
  transform: translateY(-4px);
  box-shadow:
    0 2px 3px rgba(22, 21, 19, 0.08),
    0 34px 60px -24px rgba(22, 21, 19, 0.38);
}

:root:not([data-theme="dark"]) .portfolio-frame:hover img,
:root:not([data-theme="dark"]) .portfolio-frame:focus-within img {
  filter: saturate(1) contrast(1.03);
}

:root[data-theme="dark"] .portfolio-frame::after {
  box-shadow:
    inset 0 0 64px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(251, 250, 247, 0.08);
}

:root[data-theme="dark"] .portfolio-frame:hover,
:root[data-theme="dark"] .portfolio-frame:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px -28px rgba(0, 0, 0, 0.85);
}

:root[data-theme="dark"] .portfolio-frame:hover img,
:root[data-theme="dark"] .portfolio-frame:focus-within img {
  filter: saturate(1) contrast(1.02) brightness(1);
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-frame:hover,
  .portfolio-frame:focus-within { transform: none; }
}

/* footer: contacts as labels above a hairline */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--mute);
}
.site-footer a { color: inherit; }

/* ---------- Mobile: images wake up on scroll ----------
   Touch devices have no hover; ledger.js sets .in-view once a portfolio
   image reaches the middle third of the screen — same effect as :hover
   on desktop. */

.portfolio-frame.in-view img {
  filter: saturate(1) contrast(1.03);
  transform: scale(1.015);
}

.portfolio-frame.in-view::after { opacity: 0.35; }

:root:not([data-theme="dark"]) .portfolio-frame.in-view {
  box-shadow:
    0 2px 3px rgba(22, 21, 19, 0.08),
    0 34px 60px -24px rgba(22, 21, 19, 0.38);
}

:root[data-theme="dark"] .portfolio-frame.in-view img {
  filter: saturate(1) contrast(1.02) brightness(1);
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-frame.in-view img { transform: none; }
}

/* ---------- Essays ("Compounding") ----------
   The blog inside the ledger system: numbered entries, hairlines, white
   space. Used by the pages under /essays/ (preview: /v3/essays/). */

.essays-hero {
  max-width: 48.25rem;
  margin: clamp(48px, 9vh, 110px) 0 clamp(28px, 5vh, 56px);
}

.essays-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

.essays-hero p { color: var(--mute); max-width: 36em; margin: 0; }

.essay-list { list-style: none; margin: clamp(32px, 6vh, 64px) 0 0; padding: 0; }

.essay-item { border-top: 1px solid var(--line); }
.essay-item:last-child { border-bottom: 1px solid var(--line); }

.essay-item a {
  display: grid;
  grid-template-columns: 3.4em 1fr;
  gap: 1em;
  padding: 28px 0 32px;
  text-decoration: none;
  background: none;
}

.essay-item .no {
  font-style: italic;
  color: var(--mute);
  font-size: 1.1rem;
  padding-top: 0.35em;
}

.essay-item h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.35em;
  transition: color 0.25s ease;
}

.essay-item a:hover h2 { color: var(--blue); }
.essay-item .meta { font-style: italic; color: var(--mute); font-size: 0.9rem; margin: 0 0 0.6em; }
.essay-item .teaser { color: color-mix(in srgb, var(--fg) 86%, var(--bg)); max-width: 42em; margin: 0; }

/* Einzel-Essay */

.essay { max-width: 42.5rem; margin: 0 auto; }

.essay-head { margin: clamp(48px, 9vh, 110px) 0 clamp(28px, 5vh, 48px); }
.essay-head .no { font-style: italic; color: var(--mute); font-size: 1.3rem; display: block; margin-bottom: 0.6em; }
.essay-head h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0 0 0.5em;
}
.essay-head .meta { font-style: italic; color: var(--mute); }

.essay-body { border-top: 1px solid var(--line); padding-top: clamp(24px, 4vh, 40px); }
.essay-body p {
  font-size: 1.06rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--fg) 88%, var(--bg));
  margin: 0 0 1.4em;
}
.essay-body h2 {
  font-size: 1.35rem;
  font-weight: 500;
  margin: 2em 0 0.8em;
}
.essay-body strong { color: var(--fg); }
.essay-body a {
  color: var(--blue);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--line), var(--line));
  background-size: 0% 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.essay-body a:hover { background-size: 100% 1px, 100% 1px; text-decoration: none; }

.essay-foot { margin-top: clamp(40px, 6vh, 64px); padding-top: 20px; border-top: 1px solid var(--line); font-style: italic; color: var(--mute); }

@media (max-width: 760px) {
  .essay-item a { grid-template-columns: 2.4em 1fr; }
}

/* ---------- Essays: Bilder + Suche ---------- */

.essay-item a {
  grid-template-columns: 3.4em 1fr minmax(140px, 200px);
  align-items: center;
}

.essay-item .thumb { margin: 0; }
.essay-item .thumb img { aspect-ratio: 4 / 3; object-fit: cover; }

.essay-hero { margin: 0 0 clamp(24px, 4vh, 40px); }
.essay-hero figcaption {
  font-style: italic;
  color: var(--mute);
  font-size: 0.88rem;
  margin-top: 10px;
}

.essay-search {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  margin-top: clamp(28px, 5vh, 48px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  max-width: 17.65rem;
  position: relative;
  /* focus: the field unfolds to full width … */
  transition: max-width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* … while the ink line draws in from the left beneath it */
.essay-search::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.essay-search:focus-within {
  max-width: 100%;
}

.essay-search:focus-within::after { transform: scaleX(1); }

.essay-search .no {
  font-style: italic;
  color: var(--mute);
  transition: color 0.3s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.essay-search:focus-within .no {
  color: var(--fg);
  transform: scale(1.2);
}

@media (prefers-reduced-motion: reduce) {
  .essay-search,
  .essay-search::after,
  .essay-search .no { transition: none; }
}

.essay-search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  outline: none;
  padding: 0;
}

.essay-search input::placeholder { color: var(--mute); font-style: italic; }

.essay-none {
  padding: 32px 0;
  font-style: italic;
  color: var(--mute);
  border-top: 1px solid var(--line);
  display: none;
}

@media (max-width: 760px) {
  .essay-item a { grid-template-columns: 2.4em 1fr; }
  .essay-item .thumb { grid-column: 2; margin-top: 14px; }
}

/* ---------- Essays: Kategorien + Themen-Cloud ---------- */

.essay-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6em;
  margin-top: 22px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--mute);
}

.essay-cats button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  padding: 0 0 3px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}

.essay-cats button:hover { color: var(--fg); background-size: 100% 1px; }
.essay-cats button[aria-pressed="true"] { color: var(--fg); background-size: 100% 1px; }
.essay-cats button .count { font-style: italic; text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 0.35em; }

.essay-topics {
  margin-top: clamp(56px, 9vh, 96px);
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.essay-topics .label-k {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--mute);
  margin: 0 0 18px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6em 1.4em;
  max-width: 54em;
}

.tag-cloud button {
  border: 0;
  background: none;
  font-family: inherit;
  font-style: italic;
  color: var(--mute);
  cursor: pointer;
  padding: 0 0 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}

.tag-cloud button:hover { color: var(--fg); background-size: 100% 1px; }
.tag-cloud .t1 { font-size: 0.95rem; }
.tag-cloud .t2 { font-size: 1.25rem; }
.tag-cloud .t3 { font-size: 1.6rem; color: color-mix(in srgb, var(--fg) 75%, var(--bg)); }

/* ---------- Essays: Discuss on LinkedIn ---------- */

.essay-foot { display: block; }

/* Full width of the reading column: a capsule that fills with a hint
   of ink from the left on hover (the same gesture as the lines),
   the arrow pulls to the right. */
.essay-discuss {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  padding: 1.05em 1.6em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-style: normal;
  font-size: 1.05rem;
  color: var(--fg);
  text-decoration: none;
  background-image: linear-gradient(
    color-mix(in srgb, var(--fg) 6%, transparent),
    color-mix(in srgb, var(--fg) 6%, transparent)
  );
  background-size: 0% 100%;
  background-repeat: no-repeat;
  transition: background-size 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease,
              transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.essay-discuss:hover {
  border-color: currentColor;
  text-decoration: none;
  background-size: 100% 100%;
  transform: translateY(-2px);
}

.essay-discuss svg { display: block; flex-shrink: 0; }

.essay-discuss .ed-left {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-weight: 500;
}

.essay-discuss .ed-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-style: italic;
  color: var(--mute);
  transition: color 0.25s ease;
  white-space: nowrap;
}

.essay-discuss:hover .ed-right { color: var(--fg); }

.essay-discuss .arrow {
  font-style: normal;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.essay-discuss:hover .arrow { transform: translateX(6px); }

.essay-back {
  display: inline-block;
  margin-top: 20px;
  font-style: italic;
  color: var(--mute);
}

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

/* ---------- Track-record teaser (/ventures/) ----------
   The third chapter points to the gated archive instead of a live
   venture: a hairline chapter break and the capsule gesture from the
   essays, with a small “locked” tell. */

.track-teaser {
  margin-top: clamp(80px, 16vh, 180px);
  padding-top: clamp(40px, 8vh, 80px);
  padding-bottom: clamp(48px, 10vh, 120px);
  border-top: 1px solid var(--line);
}

.track-teaser h2 {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0 0 0.7em;
}

.tt-copy {
  color: var(--mute);
  max-width: 42em;
  line-height: 1.6;
  margin: 0 0 3.4em;
}

.tt-cta { max-width: 36em; }

.tt-lock {
  font-size: 0.5em;
  letter-spacing: 0.3em;
  color: var(--mute);
  vertical-align: 0.22em;
  margin-right: 1.4em;
}

/* ---------- 404 (/404.html) ---------- */
/* One centered composition in a sea of negative space: a ghost numeral
   barely lifted off the background, the claim set into its lower edge,
   then nothing but air down to three quiet links. */

.lost {
  min-height: max(62vh, 420px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 9vh, 110px) 0 clamp(64px, 11vh, 130px);
}

.lost-no {
  font-style: italic;
  font-size: clamp(11rem, 30vw, 24rem);
  font-weight: 300;
  line-height: 0.82;
  letter-spacing: -0.04em;
  margin: 0;
  color: color-mix(in srgb, var(--fg) 9%, var(--bg));
  user-select: none;
}

/* the generic error page ghosts a word instead of a status code */
.lost-no-word { font-size: clamp(6rem, 17vw, 14rem); }

.lost h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  /* set into the numeral's lower edge: editorial layering, not a stack */
  margin: clamp(-2.4rem, -5vw, -4.5rem) 0 0;
}

.lost-copy {
  color: var(--mute);
  margin: 1.4em 0 0;
}

.lost-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em clamp(2.5em, 6vw, 5em);
  margin-top: clamp(56px, 10vh, 110px);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* drawn-line hover, as on the rest of the site's labels */
.lost-links a {
  color: var(--mute);
  padding-bottom: 0.4em;
  background: linear-gradient(currentColor, currentColor) no-repeat left bottom;
  background-size: 0% 1px;
  transition: background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}

.lost-links a:hover {
  color: var(--fg);
  text-decoration: none;
  background-size: 100% 1px;
}

@media (prefers-reduced-motion: reduce) {
  .lost-links a { transition: none; }
}

/* ---------- Contact modal (“Get in touch”) ---------- */

.contact-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45em 1.15em;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease,
              background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}

.contact-link:hover { transform: translateY(-2px); opacity: 0.88; text-decoration: none; }

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

.contact-dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  color: var(--fg);
  padding: 0;
  max-width: 30.6rem;
  width: calc(100vw - 32px);
}

/* the dialog itself carries the initial focus (contact.js) — no ring */
.contact-dialog:focus { outline: none; }

.contact-dialog::backdrop {
  background: rgba(22, 21, 19, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.cd-inner { padding: 30px 32px 32px; }
.cd-line { height: 2px; background: var(--fg); width: 56px; margin-bottom: 22px; }

.contact-dialog h2 {
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
}

.contact-dialog .cd-note { color: var(--mute); margin: 0 0 1.6em; font-size: 0.95rem; }

.cd-actions { display: flex; flex-direction: column; gap: 12px; }

.cd-action {
  display: flex;
  align-items: center;
  gap: 0.65em;
  padding: 0.85em 1.3em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  color: var(--fg);
  text-decoration: none;
  background: none;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cd-action:hover { border-color: currentColor; transform: translateY(-2px); text-decoration: none; }
.cd-action svg { flex-shrink: 0; }
.cd-action .hint { margin-left: auto; font-style: italic; color: var(--mute); font-size: 0.88rem; white-space: nowrap; }

.cd-close {
  position: absolute;
  top: 14px;
  right: 18px;
  border: 0;
  background: none;
  color: var(--mute);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  transition: color 0.25s ease, transform 0.3s ease;
}

.cd-close:hover { color: var(--fg); transform: rotate(90deg); }

/* Keyboard focus stays visible — but in the design's own language,
   not browser blue (Safari painted the ring just from opening) */
.cd-close:focus,
.cd-action:focus { outline: none; }
.cd-close:focus-visible,
.cd-action:focus-visible { outline: 1px solid var(--mute); outline-offset: 3px; border-radius: 999px; }

@media (prefers-reduced-motion: reduce) {
  .cd-action:hover, .cd-close:hover { transform: none; }
}

/* the footer capsule speaks the uppercase language of the ledger footer */
.site-footer .contact-link {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
}
