/* Layout: feste linke Navigationsleiste (Desktop) + geteilter Hero – Typografie links, randlos angeschnittenes Porträt rechts – danach ruhige zweispaltige Abschnitte */
:root {
  /* Verbindliche Farbpalette */
  --ink: #222222;
  --muted: #7B7B7B;
  --paper: #F8F8F8;
  --white: #FFFFFF;
  /* Haarlinien, abgeleitet aus #222222 bzw. #F8F8F8 */
  --line: rgb(34 34 34 / 0.12);
  --line-inverse: rgb(248 248 248 / 0.18);

  --font-sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail: 264px;
  --bar: 64px;
  --pad: clamp(24px, 5vw, 80px);
  --gutter-l: max(var(--pad), env(safe-area-inset-left, 0px));
  --gutter-r: max(var(--pad), env(safe-area-inset-right, 0px));
  --hero-top: clamp(32px, 6vh, 64px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.menu-open {
  overflow: hidden;
}

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

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

h1, h2, h3, p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

h1, h2, h3 {
  font-weight: 300;
  text-wrap: balance;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.icon {
  width: 0.8em;
  height: 0.8em;
  flex: none;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Kopfbereich: obere Leiste (mobil), feste linke Leiste (Desktop) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: env(safe-area-inset-top, 0px);
  background: var(--paper);
}

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--bar);
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-role {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.menu-toggle-icon {
  position: relative;
  width: 22px;
  height: 10px;
}

.menu-toggle-icon span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.menu-toggle-icon span:first-child {
  top: 0;
}

.menu-toggle-icon span:last-child {
  top: 8.5px;
}

.site-header[data-open] .menu-toggle-icon span:first-child {
  top: 4.25px;
  transform: rotate(45deg);
}

.site-header[data-open] .menu-toggle-icon span:last-child {
  top: 4.25px;
  transform: rotate(-45deg);
}

.site-nav {
  position: fixed;
  inset: calc(var(--bar) + env(safe-area-inset-top, 0px)) 0 0 0;
  z-index: 29;
  overflow-y: auto;
  padding-block: 32px calc(40px + env(safe-area-inset-bottom, 0px));
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}

.site-header[data-open] .site-nav {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--ease), visibility 0s;
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-nav a {
  display: flex;
  align-items: center;
  padding-block: 8px;
  color: var(--muted);
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.site-nav a::before {
  content: "";
  width: 0;
  height: 1px;
  margin-right: 0;
  background: currentColor;
  transition: width 0.35s var(--ease), margin-right 0.35s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="location"] {
  color: var(--ink);
}

.site-nav a[aria-current="location"]::before {
  width: 0.9em;
  margin-right: 0.4em;
}

.rail-foot {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "title"
    "body"
    "meta"
    "photo";
  background: var(--paper);
  scroll-margin-top: var(--bar);
}

.hero > :not(.hero-photo) {
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.hero-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 56px;
  padding-top: 36px;
}

.hero-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-fact-value {
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-fact-label {
  color: var(--muted);
  font-size: 0.8125rem;
}

.hero-title {
  grid-area: title;
  container-type: inline-size;
  padding-top: clamp(40px, 9vw, 72px);
}

.hero h1 {
  margin-left: -0.055em;
  font-size: clamp(4.25rem, 12vw, 14rem);
  font-size: clamp(4.25rem, 38cqi, 14rem);
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 0.86;
}

.hero-sub {
  margin-top: clamp(16px, 2.6vh, 28px);
  font-size: clamp(1.0625rem, 1.25vw, 1.25rem);
  line-height: 1.4;
}

.hero-body {
  grid-area: body;
  padding-top: 32px;
}

.hero-intro,
.hero-desc {
  max-width: 36ch;
}

.hero-desc {
  margin-top: 8px;
  color: var(--muted);
}

.hero-hint {
  grid-area: hint;
  display: none;
  align-items: center;
  gap: 10px;
  justify-self: start;
  font-size: 0.9375rem;
}

.hero-hint:hover span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.hero-hint svg {
  width: 14px;
  height: 14px;
}

/* Das Porträt hat denselben Hintergrund wie die Seite (#F8F8F8) und schließt unten und rechts bündig ab */
.hero-photo {
  grid-area: photo;
  justify-self: end;
  width: min(100%, 720px);
  margin-top: 48px;
}

.hero-photo img {
  width: 100%;
  height: auto;
}

/* ---------- Abschnitte ---------- */
.section {
  padding-block: clamp(72px, 10vw, 152px);
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  background: var(--white);
  scroll-margin-top: var(--bar);
}

.section--paper {
  background: var(--paper);
}

.section-grid {
  display: grid;
  gap: 28px;
  max-width: 1120px;
}

.section-head {
  min-width: 0;
}

.section h2 {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  hyphens: auto;
  overflow-wrap: break-word;
}

.section-note {
  max-width: 30ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.section-body > p {
  max-width: 62ch;
}

.section-body > .lead {
  max-width: 34ch;
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

/* Über mich: Steckbrief */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin-top: 16px;
}

.facts > div {
  min-width: 0;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}

.facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Über mich: freigestelltes Schwarzweiß-Porträt auf Seitenweiß, unten auf einer feinen Linie */
.about-photo {
  width: min(100%, 440px);
  margin-top: 40px;
  border-bottom: 1px solid var(--line);
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
}

/* Werdegang */
.timeline,
.pubs,
.projects {
  border-top: 1px solid var(--line);
}

.entry {
  display: grid;
  gap: 6px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
}

.entry-period,
.pub-year,
.project-year {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.entry-period {
  padding-top: 0.3em;
}

.entry h3,
.tile h3,
.pub h3 {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.entry-place,
.pub-meta,
.project-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.entry-text {
  max-width: 58ch;
  margin-top: 12px;
}

/* Hobbys */
.tiles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 40px;
}

.tile {
  padding-block: 24px 28px;
  border-top: 1px solid var(--line);
}

.tile p {
  margin-top: 8px;
}

/* Hobbys: Kohleskizzen, die beim Überfahren entstehen und sich bewegen (auf Touch-Geräten beim Hineinscrollen) */
.sketch-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sketch {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin-top: 12px;
  overflow: visible;
  color: var(--ink);
  opacity: 0.1;
  transition: opacity 0.5s ease;
}

.sketch .ink,
.sketch .hatch {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.sketch .ink {
  stroke-width: 2.1;
}

.sketch .thin {
  stroke-width: 1.2;
}

.sketch .hatch {
  stroke-width: 0.9;
  opacity: 0.75;
}

.sketch .occ {
  fill: var(--paper);
}

.sketch .sk-speed {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 6 9;
  opacity: 0;
}

.sk-swing {
  transform-origin: 29px 132px;
}

.sk-shoe {
  transform-box: fill-box;
  transform-origin: 50% 90%;
}

.sk-far {
  opacity: 0.55;
}

.hobby:hover .sketch,
.hobby.is-active .sketch {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .hobby:hover .sketch .ink,
  .hobby.is-active .sketch .ink {
    animation: sketch-draw 1.3s var(--ease) both;
  }

  .hobby:hover .sketch .hatch,
  .hobby.is-active .sketch .hatch {
    animation: sketch-draw 0.9s ease 0.6s both;
  }

  .hobby:hover .sk-swing,
  .hobby.is-active .sk-swing {
    animation: sk-swing 1.6s ease-in-out 1s infinite alternate;
  }

  .hobby:hover .sk-ball,
  .hobby.is-active .sk-ball {
    animation: sk-bounce 0.55s cubic-bezier(0.3, 0, 0.6, 1) 1s infinite alternate;
  }

  .hobby:hover .sk-carriage,
  .hobby.is-active .sk-carriage {
    animation: sk-carriage 6s 1s infinite;
  }

  .hobby:hover .sk-shoe,
  .hobby.is-active .sk-shoe {
    animation: sk-run 0.8s linear 1s infinite;
  }

  .hobby:hover .sk-far,
  .hobby.is-active .sk-far {
    animation-delay: 0.6s;
  }

  .hobby:hover .sk-speed,
  .hobby.is-active .sk-speed {
    animation: sk-speed 0.45s linear 1s infinite;
  }

  .hobby:hover .sk-kid,
  .hobby.is-active .sk-kid {
    animation: sk-bob 1.1s ease-in-out infinite alternate;
    animation-delay: calc(1s + var(--i) * 0.18s);
  }
}

@keyframes sketch-draw {
  from {
    stroke-dashoffset: 1;
  }
}

@keyframes sk-swing {
  from {
    transform: rotate(5deg);
  }
  to {
    transform: rotate(-9deg);
  }
}

@keyframes sk-bounce {
  to {
    transform: translateY(-24px);
  }
}

/* Die Walze rückt Anschlag für Anschlag nach rechts und fährt dann zurück */
@keyframes sk-carriage {
  0% {
    transform: translateX(-16px);
    animation-timing-function: steps(14, end);
  }
  86% {
    transform: translateX(18px);
    animation-timing-function: ease-in-out;
  }
  100% {
    transform: translateX(-16px);
  }
}

/* Laufzyklus: in der Luft nach vorn schwingen, auf dem Boden nach hinten abdrücken */
@keyframes sk-run {
  0% {
    transform: translate(-26px, 0) rotate(10deg);
  }
  35% {
    transform: translate(0, -20px) rotate(-4deg);
  }
  55% {
    transform: translate(24px, -6px) rotate(-12deg);
  }
  65% {
    transform: translate(20px, 0) rotate(0deg);
  }
  100% {
    transform: translate(-26px, 0) rotate(10deg);
  }
}

@keyframes sk-speed {
  from {
    opacity: 0.6;
    stroke-dashoffset: 0;
  }
  to {
    opacity: 0.6;
    stroke-dashoffset: 15;
  }
}

@keyframes sk-bob {
  to {
    transform: translateY(-2.5px);
  }
}

/* Autor */
.pub {
  display: grid;
  gap: 6px;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}

/* Einleitung über der Bücherliste; sie wandert mit der Karte nach links */
.author-intro {
  display: grid;
  gap: 1em;
  max-width: 62ch;
  margin-bottom: 36px;
}

/* Buchseiten: Klappentext, Illustrationen, Bestelllinks */
.book-text {
  display: grid;
  gap: 1em;
  max-width: 62ch;
}

.book-claim {
  padding-top: 1em;
  border-top: 1px solid var(--line);
  font-style: italic;
}

.book-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* Sobald ein Buch geöffnet ist, bleibt auf der Karte nur die Bücherliste */
.career.is-side .author-intro {
  display: none;
}

.book-cover {
  max-width: 280px;
  margin: 0 0 0 24px;
}

.book-cover img {
  width: 100%;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px var(--line),
    0 24px 48px -28px rgb(34 34 34 / 0.55);
}

/* Vorschaubilder der Illustrationen; ein Klick öffnet die Großansicht */
.book-plate {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: zoom-in;
}

.book-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.book-plate:hover img {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgb(34 34 34 / 0.86);
  cursor: zoom-out;
  animation: fade 0.3s ease both;
}

.lightbox-image {
  max-width: min(100%, 1100px);
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  border-radius: 6px;
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.6);
}

.lightbox-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-inverse);
  border-radius: 999px;
  background: none;
  color: var(--paper);
  cursor: pointer;
}

.lightbox-close .icon {
  width: 14px;
  height: 14px;
}

html.lightbox-open {
  overflow: hidden;
}

.order-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.9375rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.order-link:hover {
  background: var(--ink);
  color: var(--white);
}

.order-link .icon {
  width: 12px;
  height: 12px;
}

.order-note {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

@container (max-width: 420px) {
  .book-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.2s ease;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

/* Projekte */
.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 24px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
}

.project-name {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.project-year {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-top: 0.6em;
}

.project-year .icon {
  transition: transform 0.35s var(--ease);
}

.project:hover .project-year .icon {
  transform: translate(3px, -3px);
}

.project-text {
  grid-column: 1 / -1;
  max-width: 58ch;
  margin-top: 10px;
}

/* ---------- Kontakt ---------- */
.section--ink {
  background: var(--ink);
  color: var(--paper);
}

.section--ink .section-note {
  color: var(--muted);
}

.contact h2 {
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.contact-mail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line-inverse);
}

.contact-label {
  color: var(--muted);
  font-size: 0.8125rem;
}

.contact-address {
  max-width: 100%;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--line-inverse);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 0.2s ease;
}

.contact-address:hover {
  text-decoration-color: currentColor;
}

.copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.copy-btn {
  margin: 0;
  padding: 8px 18px;
  border: 1px solid var(--line-inverse);
  border-radius: 999px;
  background: none;
  color: var(--paper);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.copy-btn:hover {
  border-color: var(--paper);
}

.copy-status {
  color: var(--muted);
  font-size: 0.8125rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}

.section--ink .text-link {
  text-decoration-color: var(--line-inverse);
}

.section--ink .text-link:hover {
  text-decoration-color: currentColor;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  max-width: 1120px;
  margin-top: clamp(72px, 9vw, 128px);
  padding-top: 24px;
  border-top: 1px solid var(--line-inverse);
  color: var(--muted);
  font-size: 0.8125rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer a {
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--paper);
}

/* ---------- Beruflicher Werdegang: Stationen mit Detailansicht ---------- */
.entry--detail {
  position: relative;
}

.entry-open {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Die ganze Zeile ist klickbar */
.entry-open::after {
  content: "";
  position: absolute;
  inset: 0;
}

.entry-open:focus-visible {
  outline: none;
}

.entry-open:focus-visible::after {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.entry--detail:hover .entry-open {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.entry-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8125rem;
  transition: color 0.2s ease;
}

.entry-more .icon {
  transition: transform 0.35s var(--ease);
}

.entry--detail:hover .entry-more {
  color: var(--ink);
}

.entry--detail:hover .entry-more .icon {
  transform: translateX(4px);
}

/* ---------- Kartenstapel: Liste schiebt sich nach links, rechts öffnet sich die Detailseite ---------- */
.career {
  --s: 1;
  position: relative;
  align-items: start;
}

/* Negativer Rand + Innenabstand: Die Liste wird zur Karte, ohne dass sich ihr Inhalt verschiebt */
.career-list {
  position: relative;
  z-index: 2;
  margin: -24px;
  padding: 24px;
  border-radius: 20px;
  transform-origin: 0 0;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.career-list.is-moving {
  animation: stack-move 0.75s var(--ease);
}

.career .section-head {
  transition: opacity 0.4s ease 0.25s, visibility 0s;
}

.career-detail {
  display: none;
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: clamp(24px, 3vw, 44px);
  border-radius: 20px;
  background: var(--paper);
  container-type: inline-size;
  transform-origin: 0 0;
}

.career.is-open .career-detail {
  display: block;
}

/* Auf grauen Abschnitten hebt sich die Detailseite weiß ab */
.section--paper .career-detail {
  background: var(--white);
}

.section--paper .portfolio-item {
  background: var(--paper);
}

/* Zitat unter einer Abschnittsüberschrift */
.section-quote {
  max-width: 30ch;
  margin: 20px 0 0;
}

.section-quote blockquote {
  margin: 0;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.section-quote figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}

.section-quote figcaption::before {
  content: "– ";
}

.career-detail.is-switching {
  animation: detail-switch 0.45s var(--ease) both;
}

.career-detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -8px 0 20px;
}

.detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}

.detail-btn .icon {
  width: 14px;
  height: 14px;
}

.detail-close {
  margin-left: auto;
}

/* Seitenmodus (breite Fenster): Liste als Karte über dem Titel, Detailseite rechts daneben */
.career.is-side {
  --s: 0.86;
  grid-template-columns: calc(var(--list-w) * var(--s)) minmax(0, 1fr);
  column-gap: 40px;
  max-width: none;
}

.career.is-side .section-head {
  grid-column: 1;
  grid-row: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.career.is-side .career-list {
  grid-column: 1;
  grid-row: 1;
  width: calc(var(--list-w) + 48px);
  background: var(--white);
  /* Eine zweite Karte schaut versetzt hervor: der Kartenstapel */
  box-shadow:
    0 0 0 1px var(--line),
    14px 14px 0 -1px var(--white),
    14px 14px 0 0 var(--line),
    0 40px 80px -40px rgb(34 34 34 / 0.35);
  transform: scale(var(--s));
}

.career.is-side .career-detail {
  grid-column: 2;
  grid-row: 1;
  margin-top: -24px;
  animation: detail-reveal 0.75s var(--ease) 0.12s both;
}

/* Auf hohen Bildschirmen bleibt die Listenkarte beim Lesen der Detailseite stehen */
@media (min-height: 820px) {
  .career.is-side .career-list {
    position: sticky;
    top: calc(var(--bar) + 40px);
  }
}

/* Steht darunter eine Visualisierung, bleibt die Liste an ihrem Platz und gleitet nicht über die Animation */
.career.is-side.has-aside .career-list {
  position: relative;
  top: auto;
}

.career.is-side .entry--detail {
  transition: opacity 0.3s ease;
}

.career.is-side .entry--detail:not(.is-active) {
  opacity: 0.5;
}

.career.is-side .entry--detail:hover {
  opacity: 1;
}

.career.is-side .entry--detail.is-active::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: -14px;
  width: 2px;
  background: var(--ink);
}

.career.is-side .detail-back,
.career.is-swap .detail-close {
  display: none;
}

/* Tauschmodus (schmale Fenster): Detailseite ersetzt die Liste */
.career.is-swap .career-list {
  display: none;
}

.career.is-swap .career-detail {
  animation: detail-swap 0.5s var(--ease) both;
}

/* Begleitende Visualisierung einer Station (z. B. Knie-Animation): links unter der Kartenliste,
   in schmalen Fenstern unter der Detailseite */
.career-aside {
  min-width: 0;
}

.career:not(.is-open) .career-aside {
  display: none;
}

.career.is-side {
  row-gap: 40px;
}

.career.is-side .career-aside {
  grid-column: 1;
  grid-row: 2;
  width: calc(100% + 48px * var(--s));
  margin-left: -24px;
}

/* Wächst die Detailseite (z. B. durch „mehr“), wächst nur die zweite Zeile – die Visualisierung bleibt unter der Liste */
.career.is-side.has-aside {
  grid-template-rows: auto 1fr;
}

.career.is-side.has-aside .career-detail {
  grid-row: 1 / span 2;
}

/* ---------- Artikelansicht: Die Detailseite legt sich auf den Kartenstapel, rechts öffnet sich der Artikel ---------- */
.career-article {
  display: none;
  position: relative;
  z-index: 1;
  min-width: 0;
  border-radius: 20px;
  background: var(--paper);
  container-type: inline-size;
}

.section--paper .career-article {
  background: var(--white);
}

.career.is-article .career-article {
  display: flex;
  flex-direction: column;
}

/* Die Detailseite behält ihre Breite und wird wie die Liste verkleinert; die Liste schaut oben hervor */
.career.is-side.is-article .career-detail {
  grid-column: 1;
  grid-row: 1;
  position: absolute;
  top: -4px;
  left: -24px;
  z-index: 3;
  width: var(--detail-w);
  margin: 0;
  transform: scale(var(--ds));
  cursor: pointer;
  box-shadow:
    0 0 0 1px var(--line),
    14px 14px 0 -1px var(--white),
    14px 14px 0 0 var(--line),
    0 40px 80px -40px rgb(34 34 34 / 0.35);
  transition: box-shadow 0.3s ease;
}

.career.is-side.is-article .career-detail:hover {
  box-shadow:
    0 0 0 1px var(--muted),
    14px 14px 0 -1px var(--white),
    14px 14px 0 0 var(--line),
    0 40px 80px -36px rgb(34 34 34 / 0.45);
}

/* Die Karte reagiert als Ganzes: ein Klick holt die Detailseite zurück */
.career.is-article .career-detail > * {
  pointer-events: none;
}

.career.is-side .career-detail.no-reveal {
  animation: none;
}

.career.is-side .career-detail.is-moving {
  animation: stack-move 0.75s var(--ease);
}

/* Das Lesefenster bleibt beim Scrollen stehen, der Artikel scrollt in sich */
.career.is-side.is-article .career-article {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  margin-top: -24px;
  overflow: hidden;
  animation: detail-reveal 0.75s var(--ease) 0.12s both;
}

.career.is-swap.is-article .career-detail {
  display: none;
}

.career.is-swap .career-article {
  animation: detail-swap 0.5s var(--ease) both;
}

.article-bar {
  margin: 0;
  padding: 12px clamp(20px, 2.6vw, 36px);
  border-bottom: 1px solid var(--line);
}

.article-bar .detail-btn {
  white-space: nowrap;
}

.pdf {
  position: relative;
  flex: 1;
  min-height: 0;
}

.pdf-scroll {
  height: 100%;
  overflow-y: auto;
  padding: clamp(20px, 2.6vw, 36px) clamp(20px, 2.6vw, 36px) 72px;
}

.article-head {
  margin-bottom: 28px;
}

.article-title {
  font-size: clamp(1.25rem, 3.6cqi, 1.75rem);
  hyphens: manual;
}

.pdf-status {
  padding: 56px 0;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.pdf-pages {
  display: grid;
  gap: 16px;
}

.pdf-page {
  overflow: hidden;
  border-radius: 6px;
  background: var(--white);
  box-shadow:
    0 0 0 1px var(--line),
    0 18px 40px -28px rgb(34 34 34 / 0.45);
}

.pdf-page canvas {
  display: block;
  width: 100%;
  height: auto;
}

.pdf-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
  pointer-events: none;
}

/* Schmale Fenster: Der Artikel ersetzt die Detailseite und scrollt mit der Seite */
.career.is-swap .pdf-scroll {
  height: auto;
  overflow: visible;
  padding-bottom: clamp(20px, 2.6vw, 36px);
}

.career.is-swap .pdf-counter {
  display: none;
}

/* ---------- Knie-Animation ---------- */
.knee,
.rig {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  animation: knee-in 0.7s var(--ease) 0.25s both;
}

.knee-stage,
.rig-stage {
  position: relative;
  width: 100%;
  max-height: 640px;
  overflow: hidden;
  aspect-ratio: 5 / 6;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
}

.knee-canvas,
.rig-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
}

.knee-leaders,
.knee-labels,
.rig-leaders,
.rig-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.knee-leaders line,
.rig-leaders line {
  stroke: var(--ink);
  stroke-width: 1;
}

.knee-leaders circle,
.rig-leaders circle {
  fill: var(--ink);
  stroke: var(--white);
  stroke-width: 2;
}

.knee-label,
.rig-label {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 170px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(255 255 255 / 0.94);
  box-shadow: 0 10px 24px -18px rgb(34 34 34 / 0.45);
  opacity: 0;
  will-change: transform, opacity;
}

.knee-label-name,
.rig-label-name {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.knee-label-sub,
.rig-label-sub {
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1.3;
}

.knee-label-load {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-variant-numeric: tabular-nums;
}

.knee-label-bar {
  position: relative;
  flex: 1;
  min-width: 44px;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(34 34 34 / 0.08);
}

.knee-label-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
}

.knee-title,
.rig-title {
  position: absolute;
  top: 16px;
  left: 18px;
  font-size: 0.8125rem;
  font-weight: 500;
  pointer-events: none;
}

.knee-readout,
.rig-readout {
  position: absolute;
  top: 14px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.knee-readout-label,
.rig-readout-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}

.knee-readout-value {
  font-size: 1.75rem;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.knee-hint,
.rig-hint {
  position: absolute;
  top: 36px;
  left: 18px;
  color: var(--muted);
  font-size: 0.6875rem;
  pointer-events: none;
}

.knee-controls,
.rig-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.knee-btn,
.rig-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.knee-btn:hover,
.rig-btn:hover {
  border-color: var(--ink);
}

.knee-btn svg,
.rig-btn svg {
  width: 10px;
  height: 10px;
}

.knee-fallback,
.rig-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  margin: 0;
  padding: 24px;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.knee.is-unavailable .knee-fallback,
.rig.is-unavailable .rig-fallback {
  display: grid;
}

.knee-caption,
.rig-caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.knee-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.75rem;
}

.knee-legend > span:first-child {
  color: var(--ink);
  font-weight: 500;
}

.knee-legend-bar {
  width: 110px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #93D3A2, #F0C24B, #E0484D);
}

.knee-note,
.rig-note {
  color: var(--muted);
  font-size: 0.6875rem;
  line-height: 1.4;
}

@keyframes knee-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ---------- Prüfstand-Animation (Hydraulic Burst and Leak Tester) ----------
   Nutzt die Grundregeln der Knie-Figur; eigen sind Querformat, Bauteilnummern wie in der CAD-Zeichnung,
   Druckverlauf und Prüfling */
.rig-stage {
  aspect-ratio: 4 / 3;
  max-height: 560px;
}

.rig-label-name {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rig-label-num {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1;
}

.rig-readout-value {
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.rig-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

.rig-chart-box,
.rig-sample {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.rig-chart {
  display: block;
  width: 100%;
  height: auto;
}

.rig-chart text {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.rig-chart .rig-chart-title {
  fill: var(--ink);
}

.rig-chart-axis {
  stroke: var(--muted);
  stroke-width: 1;
}

.rig-chart-sep {
  stroke: var(--line);
  stroke-dasharray: 2 3;
}

.rig-chart-hold {
  stroke: var(--muted);
  stroke-dasharray: 4 3;
}

.rig-chart-all {
  fill: none;
  stroke: rgb(34 34 34 / 0.16);
  stroke-width: 1.5;
}

.rig-chart-now {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.rig-chart-dot {
  fill: var(--ink);
}

.rig-chart-burst {
  fill: #E0484D;
}

.rig-sample {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rig-sample-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}

.rig-balloon {
  display: block;
  width: 100%;
  height: auto;
}

.rig-balloon-shaft {
  stroke: var(--ink);
  stroke-width: 1.5;
}

.rig-balloon-tip,
.rig-balloon-marker {
  fill: var(--ink);
}

.rig-balloon-skin {
  fill: rgb(34 34 34 / 0.06);
  stroke: var(--ink);
  stroke-width: 1.2;
}

.rig-balloon-torn path {
  fill: rgb(34 34 34 / 0.08);
  stroke: var(--muted);
  stroke-width: 1;
  stroke-linejoin: round;
}

.rig-sample-state {
  font-size: 0.8125rem;
}

.rig-explain {
  min-height: 3em;
  max-width: 62ch;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Schmale Bildschirme: höhere Bühne, Hinweis nach unten links, Prüfling neben seiner Beschriftung */
@media (max-width: 30em) {
  .rig-stage {
    aspect-ratio: 1 / 1;
  }

  .rig-hint {
    top: auto;
    bottom: 14px;
    left: 12px;
    max-width: 52%;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgb(255 255 255 / 0.88);
  }

  .rig-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .rig-sample {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    align-items: center;
  }

  .rig-balloon {
    grid-row: 1 / span 2;
    grid-column: 2;
  }
}

.detail-period {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.detail-title {
  margin-top: 12px;
  font-size: clamp(1.5rem, 6.5cqi, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  hyphens: auto;
  overflow-wrap: break-word;
}

.detail-title:focus {
  outline: none;
}

.detail-company {
  margin-top: 10px;
  color: var(--muted);
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.detail-section h4 {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-section > p {
  max-width: 62ch;
}

.thesis-title {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.task-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--line);
}

.task-list li:first-child {
  border-top: 1px solid var(--line);
}

.task-list li::before {
  content: "";
  position: absolute;
  top: calc(12px + 0.8em);
  left: 0;
  width: 14px;
  height: 1px;
  background: var(--ink);
}

/* Einleitung: nur der erste Absatz ist zu sehen, „mehr“ klappt den übrigen Text auf */
.detail-intro {
  max-width: 62ch;
  margin-top: 28px;
}

.more-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.55s var(--ease), opacity 0.4s ease;
}

.more-body.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.more-inner {
  min-height: 0;
  overflow: hidden;
}

.more-inner p {
  margin-top: 1em;
}

.more-toggle {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  cursor: pointer;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.more-toggle:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

/* Verweis auf einen Artikel: öffnet das Lesefenster neben dem Kartenstapel */
.article-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.article-link:hover {
  border-color: var(--ink);
}

.article-link-icon {
  width: 30px;
  height: 37px;
  stroke: currentColor;
  stroke-width: 1.2;
}

.article-link-icon .sheet {
  fill: var(--white);
}

.article-link-icon text {
  fill: currentColor;
  stroke: none;
  font-family: var(--font-mono);
  font-size: 8px;
}

.article-link-title {
  display: block;
  font-weight: 500;
  line-height: 1.35;
}

.article-link-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.article-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease);
}

.article-link:hover .icon {
  transform: translateX(4px);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-list li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
}

/* Meine Tätigkeit: vier Kacheln, in schmalen Detailseiten untereinander */
.portfolio {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.portfolio-name {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.portfolio-text {
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Stichpunkte innerhalb einer Kachel */
.portfolio-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portfolio-points li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.portfolio-points li::before {
  content: "";
  position: absolute;
  top: 0.8em;
  left: 0;
  width: 8px;
  height: 1px;
  background: var(--ink);
}

/* Meine Tätigkeit als Kartenstapel (aus .portfolio aufgebaut, siehe main.js):
   geschlossen nur die Überschriften gestaffelt, offen eine Karte vorn und die übrigen als Kanten dahinter */
.portfolio.deck {
  display: block;
  position: relative;
  transition: height 0.55s var(--ease);
}

.deck-card {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: block;
  padding: 0;
  transform-origin: 50% 100%;
  box-shadow: 0 -12px 24px -20px rgb(34 34 34 / 0.45);
  cursor: pointer;
  transition: transform 0.55s var(--ease), box-shadow 0.3s ease, border-color 0.2s ease;
}

.deck:not(.is-ready),
.deck:not(.is-ready) .deck-card,
.deck:not(.is-ready) .deck-body {
  transition: none;
}

.deck-card:hover {
  border-color: rgb(34 34 34 / 0.3);
}

.deck-card.is-open {
  border-color: var(--line);
  box-shadow: 0 22px 44px -30px rgb(34 34 34 / 0.5);
  cursor: default;
}

.deck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 18px 22px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.deck-icon {
  flex: none;
  width: 14px;
  height: 14px;
  transition: transform 0.35s var(--ease);
}

.deck-card.is-open .deck-icon {
  transform: rotate(180deg);
}

.deck-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}

.deck-card.is-open .deck-body {
  grid-template-rows: 1fr;
}

.deck-inner {
  min-height: 0;
  overflow: hidden;
}

.deck-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 22px 20px;
}

/* Grundriss eines OP-Projekts (bei geöffneter Karte „OP-Planung“): Räume anklickbar, Fotos darunter */
.op-plan {
  animation: detail-switch 0.45s var(--ease) both;
}

.op-plan-map {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.op-plan-map img {
  display: block;
  width: 100%;
  height: auto;
}

.op-plan-rooms {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.op-room {
  fill: rgb(34 34 34 / 0);
  stroke: rgb(34 34 34 / 0);
  stroke-width: 4;
  cursor: pointer;
  outline: none;
  transition: fill 0.2s ease, stroke 0.2s ease;
}

.op-room:hover,
.op-room:focus-visible {
  fill: rgb(34 34 34 / 0.1);
  stroke: rgb(34 34 34 / 0.45);
}

.op-room.is-active {
  fill: rgb(34 34 34 / 0.16);
  stroke: var(--ink);
  stroke-width: 7;
}

.op-dots circle {
  fill: var(--ink);
  stroke: var(--white);
  stroke-width: 6;
  pointer-events: none;
}

.op-tag {
  pointer-events: none;
}

.op-tag rect {
  fill: var(--ink);
}

.op-tag text {
  fill: var(--white);
  font-family: var(--font-sans);
  font-size: 40px;
  font-weight: 500;
}

.op-plan-info {
  display: grid;
  gap: 10px;
  min-height: 2.5em;
}

.op-plan-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-weight: 500;
}

.op-plan-area,
.op-plan-hint {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.op-plan-area {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.op-plan-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.op-photo {
  aspect-ratio: 4 / 3;
}

/* Meine Kernkompetenzen */
.competence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.competence-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

/* Bei ungerader Anzahl nimmt der letzte Punkt die volle Breite ein */
.competence-list li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.competence-name {
  font-weight: 500;
  line-height: 1.35;
}

.competence-text {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

@container (max-width: 520px) {
  .portfolio,
  .competence-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Breakpoints ---------- */
@media (max-width: 30em) {
  .facts,
  .portfolio {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 40em) {
  .entry {
    grid-template-columns: 9.5rem minmax(0, 1fr);
    gap: 24px;
  }

  .entry--detail {
    grid-template-columns: 9.5rem minmax(0, 1fr) auto;
  }

  .entry-more {
    align-self: center;
    margin-top: 0;
  }

  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pub {
    grid-template-columns: 5rem minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 24px;
  }
}

@media (min-width: 56.25em) {
  .section-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(40px, 5vw, 88px);
  }
}

/* Ab 900 px im Querformat: Hero wie in der Vorlage – Text links, Porträt groß unten rechts.
   Breite des Porträts: Spaltenanteil, begrenzt auf 92 % der Bildschirmhöhe (Seitenverhältnis 1800:1510). */
@media (min-width: 56.25em) and (orientation: landscape) {
  .hero {
    grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
    grid-template-rows: auto 0.8fr auto auto 1.2fr auto;
    grid-template-areas:
      "meta  ."
      ".     ."
      "title ."
      "body  ."
      ".     ."
      "hint  .";
    min-height: calc(100vh - var(--bar));
    min-height: calc(100svh - var(--bar));
  }

  .hero > :not(.hero-photo) {
    position: relative;
    z-index: 1;
    padding-right: clamp(24px, 3vw, 48px);
  }

  .hero-meta {
    padding-top: var(--hero-top);
  }

  .hero-title {
    padding-top: 0;
  }

  .hero h1 {
    font-size: clamp(5rem, 12.5vw, 13.5rem);
  }

  .hero-body {
    padding-top: clamp(20px, 3vh, 32px);
  }

  .hero-hint {
    display: inline-flex;
    padding-block: 32px clamp(28px, 5vh, 48px);
  }

  .hero-photo {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(64%, calc((100vh - var(--bar)) * 1.097));
    width: min(64%, calc((100svh - var(--bar)) * 1.097));
    margin: 0;
  }
}

@media (min-width: 64em) and (orientation: landscape) {
  .hero-photo {
    width: min(70%, calc(100vh * 1.097));
    width: min(70%, calc(100svh * 1.097));
  }
}

@media (min-width: 80em) and (orientation: landscape) {
  .hero-sub {
    white-space: nowrap;
  }

  .hero-photo {
    width: min(74%, calc(100vh * 1.097));
    width: min(74%, calc(100svh * 1.097));
  }
}

/* Ab 1024 px: feste Navigation links */
@media (min-width: 64em) {
  :root {
    --bar: 0px;
  }

  body::before {
    display: none;
  }

  .site-header {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 40px;
    width: var(--rail);
    height: auto;
    overflow-y: auto;
    padding-block: clamp(32px, 6vh, 56px) calc(32px + env(safe-area-inset-bottom, 0px));
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: 32px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .menu-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    overflow: visible;
    padding: 0;
    background: none;
    opacity: 1;
    visibility: visible;
    transition: none;
  }

  .site-nav a {
    padding-block: 7px;
    font-size: 0.9375rem;
    font-weight: 400;
    letter-spacing: 0;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .site-nav a[aria-current="location"]::before {
    width: 12px;
    margin-right: 8px;
  }

  .rail-foot {
    display: block;
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  main {
    margin-left: var(--rail);
  }

  .section-head {
    position: sticky;
    top: 48px;
    align-self: start;
  }
}

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 {
    animation: rise 1s var(--ease) both;
  }

  .hero-sub {
    animation: rise 1s var(--ease) 0.1s both;
  }

  .hero-body {
    animation: rise 1s var(--ease) 0.18s both;
  }

  .hero-meta {
    animation: fade 1.2s var(--ease) 0.3s both;
  }

  .hero-photo img {
    animation: fade 1.2s var(--ease) both;
  }

  .hero-hint svg {
    animation: nudge 2.4s var(--ease) 1.2s infinite;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .career-list.is-moving,
  .career .career-detail,
  .career .career-article,
  .knee,
  .rig {
    animation: none !important;
  }

  .more-body {
    transition: none;
  }
}

/* Die Liste gleitet wie eine Karte vom Stapel: leicht gekippt, dann abgelegt */
@keyframes stack-move {
  from {
    transform: translate(var(--dx), var(--dy)) scale(var(--from-s)) rotate(0deg);
  }
  50% {
    transform: translate(calc(var(--dx) * 0.5), calc(var(--dy) * 0.5)) scale(calc((var(--from-s) + var(--to-s)) / 2 - 0.02)) rotate(var(--tilt));
  }
  to {
    transform: translate(0px, 0px) scale(var(--to-s)) rotate(0deg);
  }
}

/* Die Detailseite kommt unter der Karte hervor */
@keyframes detail-reveal {
  from {
    opacity: 0;
    transform: translateX(-56px) scale(0.97);
  }
}

@keyframes detail-switch {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes detail-swap {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes nudge {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(4px);
  }
}
