/* ============================================================
   Michael Höbling — personal homepage
   Plain modern CSS: custom properties, Grid/Flexbox, fluid type,
   automatic dark/light mode. No frameworks, no build step.

   Typeface: self-hosted IBM Plex Sans / Mono (see fonts/, and
   "Typeface" in README.md). Sans carries the voice, Mono is the
   data voice (dates, labels, meta) — nothing else in Mono.
   Structure is hairlines and a left rail, not cards and shadows.
   ============================================================ */

/* ---------- Self-hosted typeface (latin subset, OFL) ---------- */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-400.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: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-600.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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-400.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;
}

/* ---------- Design tokens ---------- */
:root {
  --bg:            #0b1120;
  --bg-alt:        #0f172a;
  --surface:        #111c33;
  --surface-2:      #16233d;
  --border:        #22304a;
  --text:          #e6ecf5;
  --muted:         #9fb0c9;
  --accent:        #38bdf8;
  --accent-strong:  #0ea5e9;
  --accent-contrast:#04141f;

  --radius:     6px;
  --radius-sm:  4px;
  --radius-btn: 9px;

  /* Motion. Press feedback is near-instant; hovers and disclosures
     decelerate out, so the interface settles rather than stops. */
  --ease-out:  cubic-bezier(.22, 1, .36, 1);
  --dur-press: 110ms;
  --dur-hover: 180ms;
  --dur-panel: 280ms;

  --container: 1100px;
  --gap:       clamp(1rem, 3vw, 2rem);

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Automatic light theme for users who prefer it */
@media (prefers-color-scheme: light) {
  :root {
    --bg:            #f7f9fc;
    --bg-alt:        #eef2f8;
    --surface:        #ffffff;
    --surface-2:      #f2f7fd;
    --border:        #d8e0eb;
    --text:          #0f172a;
    --muted:         #55637c;
    --accent:        #0369a1;
    --accent-strong:  #075985;
    --accent-contrast:#ffffff;
  }
}

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

html {
  scroll-behavior: smooth;
  /* Clear the sticky header on anchor jumps. The header's height depends on
     how brand, nav and switcher wrap — by viewport width *and* language
     (German labels are longer) — so i18n.js keeps --header-h up to date;
     76px + 8px reproduces a sane fixed fallback when scripting is off. */
  scroll-padding-top: calc(var(--header-h, 76px) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.05rem);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); }
a:hover { color: var(--accent-strong); }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------- Translated copy ---------- */
/* i18n.js writes translations via textContent, so "\n" in a German string
   arrives as a real newline. pre-line renders it as a line break while
   keeping normal wrapping. Scoped to German because the English text is
   harvested from the indented, multi-line source in index.html — pre-line
   would turn those incidental source newlines into unwanted breaks. */
html[lang="de"] [data-i18n] { white-space: pre-line; }

/* One ring for every keyboard user. An outline (not a box-shadow) keeps the
   element's own corner radius and survives `overflow` clipping. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The data voice: dates, labels and meta lines only. */
.job-meta,
.role-period,
.list-period,
.facts dt,
.contact-label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: .78rem;
  color: var(--muted);
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section { padding-block: clamp(3rem, 7vw, 4.5rem); }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.1rem);
  letter-spacing: -0.02em;
}

.section-intro {
  max-width: 62ch;
  margin: 0 0 2.5rem;
  color: var(--muted);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -120%;
  z-index: 100;
  padding: .7rem 1.1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top .18s ease;
}
.skip-link:focus,
.skip-link:hover { top: 0; color: var(--accent-contrast); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding-block: .75rem;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.brand::after {
  content: "";
  position: absolute;
  inset: -6px -4px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .03em;
}
.brand-text { font-weight: 600; letter-spacing: -0.01em; }

/* Nav + language switcher travel together when the header wraps. */
.header-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  line-height: 1.2;
  transition: color var(--dur-hover) var(--ease-out);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* A 44px hit area around each text link, without making the header taller. */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
}
.site-nav a:active { color: var(--text); }
.site-nav .nav-cta {
  display: inline-block;
  padding: .4rem .95rem;
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
  font-size: .92rem;
  transition: background-color var(--dur-hover) var(--ease-out),
              transform var(--dur-press) var(--ease-out);
}
.site-nav .nav-cta:active { transform: scale(.97); }
/* The global a:hover colour must never win over a filled control's own
   contrast colour — including on hybrid devices where the hover media query
   below does not match but a mouse can still hover. At <=820px the CTA is a
   quiet text link, so the override is scoped to the filled desktop state. */
@media (min-width: 821px) {
  .site-nav .nav-cta:hover { color: var(--accent-contrast); }
}
@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover { color: var(--text); }
  .site-nav .nav-cta:hover { background: var(--accent-strong); color: var(--accent-contrast); }
}

/* ---------- Language switcher ---------- */
/* Two mono pills in a hairline capsule; aria-pressed is the single source
   of the selected state (i18n.js flips it). */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 3%, transparent);
}
.lang-switch button {
  position: relative;
  min-width: 34px;
  min-height: 28px;
  padding: .35rem .55rem;
  font: inherit;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .02em;
  line-height: 1;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color var(--dur-hover) var(--ease-out),
              color var(--dur-hover) var(--ease-out),
              transform var(--dur-press) var(--ease-out);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* 44px tap target, independent of the compact visual size. */
.lang-switch button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
}
.lang-switch button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--text) 14%, transparent);
  color: var(--text);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--bg) 50%, black);
}
.lang-switch button:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
  .lang-switch button:hover {
    background: color-mix(in srgb, var(--text) 8%, transparent);
    color: var(--text);
  }
  .lang-switch button[aria-pressed="true"]:hover {
    background: color-mix(in srgb, var(--text) 18%, transparent);
  }
}

/* Static language links on the legal pages: the same pill as the button-based
   switcher, but plain anchors so those pages stay JavaScript-free. */
.lang-switch a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  padding: .35rem .55rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .02em;
  line-height: 1;
  color: var(--muted);
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-hover) var(--ease-out),
              color var(--dur-hover) var(--ease-out);
}
/* 44px tap target, independent of the compact visual size. */
.lang-switch a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
}
.lang-switch a[aria-current="page"] {
  background: color-mix(in srgb, var(--text) 14%, transparent);
  color: var(--text);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--bg) 50%, black);
}
@media (hover: hover) and (pointer: fine) {
  .lang-switch a:hover {
    background: color-mix(in srgb, var(--text) 8%, transparent);
    color: var(--text);
  }
  .lang-switch a[aria-current="page"]:hover {
    background: color-mix(in srgb, var(--text) 18%, transparent);
  }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 4.5rem); }

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-content h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 1.5rem + 3.6vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.03;
}

.lead {
  max-width: 54ch;
  margin: 0 0 2rem;
  font-size: clamp(1.02rem, 1rem + .4vw, 1.15rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ---------- Buttons ---------- */
/* Two weights, one language: a filled primary and an accent-tinted
   secondary. The secondary is a surface, not a hairline — its boundary
   stays visible even where a 1px border would disappear. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .7rem 1.3rem;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  text-decoration: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-hover) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out),
              color var(--dur-hover) var(--ease-out),
              transform var(--dur-press) var(--ease-out);
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
/* Same guard for the filled button: keep its text readable on the accent
   fill when a:hover applies but the hover media query does not. */
.btn-primary:hover { color: var(--accent-contrast); }
.btn-ghost {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--accent);
}
.btn:focus-visible { outline-offset: 3px; }
.btn:active { transform: scale(.97); }
.btn-primary:active { background: var(--accent-strong); }
.btn-ghost:active { background: color-mix(in srgb, var(--accent) 20%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent-strong); color: var(--accent-contrast); }
  .btn-ghost:hover {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    border-color: color-mix(in srgb, var(--accent) 36%, transparent);
    color: var(--accent-strong);
  }
}
.btn:disabled { opacity: .55; cursor: progress; transform: none; }

/* ---------- Figures ---------- */
figure { margin: 0; }

.hero-figure img,
.about-figure img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  object-fit: cover;
}
.hero-figure img { aspect-ratio: 1 / 1; }
.about-figure img { aspect-ratio: 3 / 4; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
.about-text p { margin: 0 0 1rem; color: var(--muted); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: 1.5rem 2rem;
  margin: 2rem 0 0;
}
.facts > div {
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
/* Two columns leave the third fact orphaned in a half-empty row; give it
   the full width instead until the three-column layout fits. */
@media (max-width: 1023px) {
  .facts > div:last-child { grid-column: 1 / -1; }
}
.facts dd { margin: .3rem 0 0; color: var(--text); }

/* ---------- Services (capabilities) ---------- */
/* One flagship statement, then a ruled index — the competences are not
   six equal boxes, so they are not drawn as six equal boxes. */
.capability-lead { padding-bottom: 2rem; }
.capability-lead h3 {
  margin: 0 0 .5rem;
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem);
  letter-spacing: -0.02em;
}
.capability-lead p { margin: 0; max-width: 58ch; color: var(--muted); }

.capability-list { margin: 0; }
.capability-list > div {
  display: grid;
  grid-template-columns: minmax(16ch, 26ch) 1fr;
  gap: .6rem 2.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--border);
}
.capability-list dt { font-weight: 600; }
.capability-list dd { margin: 0; max-width: 60ch; color: var(--muted); }

/* ---------- Experience timeline ---------- */
/* Dates form the left rail, a hairline runs down the content — the
   chronology is the structure, not decoration around a card. */
.timeline {
  display: grid;
  gap: 3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .2rem 1.5rem;
  margin: 0 0 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.job-head h3 { margin: 0; font-size: 1.25rem; letter-spacing: -0.015em; }
.job-meta { margin: 0; font-size: .8rem; }

.role { --rail: 8.5rem; --rail-gap: 1.75rem; }

.role-details > summary {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  gap: 0 var(--rail-gap);
  align-items: start;
  padding-block: .75rem;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.role-details > summary::-webkit-details-marker,
.job-details > summary::-webkit-details-marker { display: none; }

.role-period { padding-top: .18rem; }

.role-details h4 {
  margin: 0;
  font-size: 1.02rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--border);
  transition: color var(--dur-hover) var(--ease-out);
}
.role-details > summary:hover h4,
.role-details > summary:active h4 { color: var(--accent); }

.role-details > ul {
  margin: 0 0 .5rem calc(var(--rail) + var(--rail-gap));
  padding: .2rem 0 .2rem 1.25rem;
  border-left: 1px solid var(--border);
  list-style: none;
  color: var(--muted);
}
.role-details > ul li { position: relative; max-width: 72ch; padding-left: 1.1rem; }
.role-details > ul li::before {
  content: "–";
  position: absolute;
  left: 0;
}
.role-details > ul li + li { margin-top: .5rem; }

/* Disclosure chevron sits right after the title text, not adrift at the
   far edge of the row. The whole summary row is the click target. */
.role-details h4::after,
.job-details h3::after {
  content: "";
  display: inline-block;
  width: .42rem;
  height: .42rem;
  margin-left: .65rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg) translateY(-.12rem);
  transition: transform var(--dur-panel) var(--ease-out),
              border-color var(--dur-hover) var(--ease-out);
}
.role-details[open] h4::after,
.job-details[open] h3::after {
  transform: rotate(45deg) translateY(-.12rem);
  border-color: var(--accent);
}
.role-details > summary:hover h4::after,
.job-details > summary:hover h3::after { border-color: var(--accent); }

.job-details h3 { transition: color var(--dur-hover) var(--ease-out); }

/* "Earlier roles" — a plain disclosure, same head styling as a job. */
.job-details > summary.job-head {
  margin-bottom: 0;
  transition: margin-bottom var(--dur-panel) var(--ease-out);
}
.job-details[open] > summary.job-head { margin-bottom: 1rem; }
.job-details > summary:hover h3,
.job-details > summary:active h3 { color: var(--accent); }

/* Disclosure motion. Height interpolates from 0 to auto while the content
   fades, so opening reads as the panel unfolding rather than the page
   jumping. Browsers without `interpolate-size` keep the native instant
   toggle — the interaction never depends on the animation. */
@supports (interpolate-size: allow-keywords) {
  html { interpolate-size: allow-keywords; }
  details::details-content {
    block-size: 0;
    overflow: clip;
    opacity: 0;
    transition: block-size var(--dur-panel) var(--ease-out),
                opacity var(--dur-panel) var(--ease-out),
                content-visibility var(--dur-panel) allow-discrete;
  }
  details[open]::details-content {
    block-size: auto;
    opacity: 1;
  }
}

.plain-list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.plain-list li { max-width: 72ch; color: var(--muted); font-size: .95rem; }

/* ---------- Education & training ---------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem 3rem;
}
.panel {
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.panel h3 { margin: 0 0 1rem; font-size: 1.05rem; }

.list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: .15rem 1rem;
  color: var(--muted);
  font-size: .95rem;
}
.list-period { padding-top: .12rem; }

/* ---------- Skills ---------- */
.skills-grid,
.skill-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem 3rem;
}
.skill-notes { margin-top: 2.5rem; }

.skill-group h3,
.skill-note h3 {
  margin: 0 0 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  font-size: 1.02rem;
}
.skill-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.skill-note p { margin: 0; max-width: 60ch; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.contact-list { display: grid; margin: 0; padding: 0; list-style: none; }
.contact-list li {
  padding: .75rem 0;
  border-top: 1px solid var(--border);
}
.contact-list li:last-child { border-bottom: 1px solid var(--border); }
.contact-label {
  display: block;
  font-size: .74rem;
  margin-bottom: .25rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 1.5rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  font-size: .88rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
}
.footer-inner p { margin: 0; color: var(--muted); }
.footer-inner a { text-decoration: none; font-weight: 600; }
/* Copyright left; on wide footers the two outbound links travel together
   on the right. Narrow footers wrap them flush left instead of stranding
   one link under the copyright. */
@media (min-width: 641px) {
  .footer-inner > a { margin-left: auto; }
  .footer-inner nav { margin-left: 1rem; }
}
.footer-inner nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
/* The legal documents are separate static pages; the current one is marked
   with aria-current in both the page header and the footer. */
.site-nav a[aria-current="page"],
.footer-inner a[aria-current="page"] { color: var(--text); }

/* ---------- Legal pages (impressum.html, datenschutz.html) ---------- */
/* Long-form German legal text: one measured column, Mono only for the
   metadata and the "Stand" line. The pages are deliberately static — no
   i18n.js, no language switcher, no JavaScript at all. */
.legal {
  max-width: 74ch;
  margin-inline: auto;
}
.legal h1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.4rem);
  letter-spacing: -0.02em;
}
.legal-meta {
  margin: 0 0 2rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
}
.legal h2 {
  margin: 2.5rem 0 .75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.legal p { margin: 0 0 1rem; color: var(--muted); }
.legal ul { margin: 0 0 1rem; padding-left: 1.25rem; color: var(--muted); }
.legal li + li { margin-top: .35rem; }
.legal address {
  margin: 0 0 1rem;
  font-style: normal;
  color: var(--text);
}
.legal strong { color: var(--text); }
.legal code {
  padding: .1em .35em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: .88em;
}
/* The infrastructure notice sits above the detail sections so the IP-address
   processing cannot be missed. A hairline card keeps it distinct without the
   thick side-tab that would read as a generic callout. */
.legal .legal-note {
  padding: .9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.legal .legal-note strong { color: var(--accent); }
.legal-updated {
  margin: 2.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
}

/* ---------- Responsive layout ---------- */
@media (min-width: 720px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .about-grid { grid-template-columns: 1.05fr .95fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1.25fr .75fr; }
}
/* Between phone and small-tablet widths the full-size nav no longer shares a
   row with the brand (German labels are the long pole). Tighten the labels
   and demote the CTA to a quiet accent link — the hero already carries the
   primary action — so the header stays one row instead of growing a second. */
@media (max-width: 820px) {
  .header-inner { column-gap: .75rem; }
  .site-nav ul { gap: .25rem .4rem; }
  .site-nav a { font-size: .82rem; }
  .site-nav .nav-cta,
  .site-nav .nav-cta:hover,
  .site-nav .nav-cta:active {
    padding: 0;
    background: transparent;
    color: var(--accent);
    font-size: .82rem;
    transform: none;
  }
  .site-nav .nav-cta:hover { color: var(--accent-strong); }
}
@media (max-width: 640px) {
  /* At phone widths even the compact nav needs the full row, so the
     switcher moves up beside the brand. */
  .header-inner { position: relative; }
  .header-tools { flex-basis: 100%; }
  .lang-switch { position: absolute; top: .5rem; right: clamp(1rem, 4vw, 2rem); }
}
@media (max-width: 560px) {
  /* The rail collapses: dates sit above their titles, content goes flush left. */
  .role-details > summary { grid-template-columns: 1fr; gap: .3rem; }
  .role-details h4 { padding-left: 0; border-left: 0; }
  .role-details > ul { margin-left: 0; padding-left: 0; border-left: 0; }
  .capability-list > div { grid-template-columns: 1fr; gap: .4rem; }
}
@media (max-width: 480px) {
  .list li { grid-template-columns: 1fr; gap: .1rem; }
  .list-period { padding-top: 0; }
  /* Stack the actions as full-width rows instead of leaving a ragged last
     button alone on its own line. */
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  /* Colour feedback stays; the vestibular part goes. */
  .btn:active,
  .site-nav .nav-cta:active,
  .lang-switch button:active { transform: none; }
  details::details-content { transition-duration: .001ms !important; }
}

/* ---------- Transparency / contrast preferences ---------- */
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  :root { --border: color-mix(in srgb, var(--text) 40%, var(--bg)); }
  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .btn-ghost { border-color: currentColor; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .skip-link, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  .section, .section-alt { background: #fff; border: 0; padding-block: 1rem; }

  /* A printed CV has to be complete: reveal the collapsed bullet lists and
     drop the interactive disclosure affordances. */
  details::details-content {
    content-visibility: visible;
    block-size: auto;
    opacity: 1;
    transition: none;
  }
  details:not([open]) > ul { display: block; }
  .role-details h4::after,
  .job-details h3::after { display: none; }
  .job-details > summary.job-head { margin-bottom: 1rem; }
}
