:root {
  --paper: #fbfaf6;
  --paper-alt: #f3efe6;
  --ink: #1b2330;
  --ink-soft: #5b6472;
  --line: rgba(27, 35, 48, 0.13);
  --line-strong: rgba(27, 35, 48, 0.28);
  --gold: #b8944a;
  --gold-soft: rgba(184, 148, 74, 0.14);
  --gold-ink: #7a5f26;
  --max-width: 1120px;
  --font: 'Inter', 'Inter Placeholder', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}
img[hidden] {
  display: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  z-index: 1000;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 200;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  background: rgba(251, 250, 246, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.nav.scrolled {
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.1px;
  color: var(--ink);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 34px;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--gold);
  transition: right 0.25s ease;
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  right: 0;
}
.nav-links a.active {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.icon-link {
  display: inline-flex;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.icon-link:hover {
  color: var(--gold-ink);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--ink);
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.menu-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  will-change: transform;
}
.btn-solid {
  background: var(--ink);
  color: #fff;
}
.btn-solid:hover {
  transform: translateY(-1px);
  background: #131a24;
}
.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-line:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.btn-gold {
  background: var(--gold);
  color: #221a08;
  border: none;
}
.btn-gold:hover {
  transform: translateY(-1px);
  background: #a8843e;
}
.btn-text {
  background: none;
  border: none;
  padding: 14px 4px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}
.btn-text span {
  transition: transform 0.2s ease;
  display: inline-block;
}
.btn-text:hover span {
  transform: translateX(4px);
}
.btn-calendar {
  margin-top: 20px;
}

.contact .btn-solid {
  background: #fff;
  color: var(--ink);
}
.contact .btn-solid:hover {
  background: #f0efe9;
}
.contact .btn-line {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
}
.contact .btn-line:hover {
  border-color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 40px 0 56px;
}
.hero > .container {
  position: relative;
  z-index: 1;
}
/* Candlestick trail drawn by the pointer on the free background (script.js). */
.hero-ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
  padding-bottom: 48px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 20px;
}
.hero h1 {
  font-size: clamp(40px, 5.6vw, 62px);
  line-height: 1.05;
  letter-spacing: -1.8px;
  font-weight: 600;
  margin: 0 0 22px;
  color: var(--ink);
}
.lead {
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 34px;
  font-weight: 400;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* ---------- Hero visual: the cut-out portrait, fading out at the base ---------- */
.hero-visual {
  display: flex;
  justify-content: center;
}
.portrait {
  position: relative;
  height: min(76vh, 700px);
  aspect-ratio: 1 / 2;
  max-width: 100%;
}
.portrait-halo {
  position: absolute;
  left: 50%;
  top: 4%;
  width: 118%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(184, 148, 74, 0.45);
  background: radial-gradient(circle at 50% 45%, var(--gold-soft), transparent 62%);
}
.portrait-photo {
  position: relative;
  height: 100%;
  width: 100%;
  object-fit: contain;
  object-position: bottom;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
}

/* ---------- Sections ---------- */
.section {
  padding: 96px 0;
}
/* Werdegang follows the hero closely, the blog follows Werdegang. */
#werdegang {
  padding-top: clamp(28px, 4vw, 44px);
  padding-bottom: 8px;
}
#blog {
  padding-top: clamp(40px, 5vw, 56px);
}
.section-alt {
  background: var(--paper-alt);
}
.section-head {
  margin-bottom: 48px;
  max-width: 620px;
}
.section-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 10px;
}
.section h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  letter-spacing: -1px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.section-head-compact {
  margin-bottom: 28px;
}
.section .section-head-compact h2 {
  font-size: clamp(20px, 2.2vw, 24px);
  letter-spacing: -0.4px;
}
.section-sub {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.65;
}

/* ---------- Timeline: editorial list, not cards ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 24px;
  padding: 26px 0 26px 16px;
  border-bottom: 1px solid var(--line);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.2s ease;
}
.timeline-item:hover::before,
.timeline-item.is-linked::before {
  background: var(--gold);
}
.timeline-date {
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  padding-top: 3px;
}
.timeline-body h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin: 0 0 5px;
  color: var(--ink);
}
.timeline-role {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* ---------- Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.blog-card {
  background: var(--paper);
  padding: 32px;
}
.blog-card h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.1px;
  margin: 0 0 8px;
  color: var(--ink);
}
.blog-card p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.link-arrow span {
  transition: transform 0.2s ease;
}
.link-arrow:hover span {
  transform: translateX(3px);
}
.link-arrow:hover {
  border-color: var(--gold);
}
.blog-card .blog-meta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 10px;
}
.blog-card h3 a {
  color: inherit;
  text-decoration: none;
}
.blog-card h3 a:hover {
  color: var(--gold-ink);
}

/* ---------- Blog post ---------- */
.post {
  padding: 72px 0 96px;
}
.post .container {
  max-width: 760px;
}
.post-back {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 36px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.post-back:hover {
  color: var(--ink);
}
.post-head h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.12;
  letter-spacing: -1.2px;
  font-weight: 600;
  margin: 0 0 20px;
}
.post-lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.post-meta {
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-soft);
}
.post-meta span {
  color: var(--ink);
  font-weight: 600;
}
.post-status {
  margin: 22px 0 0;
  padding: 14px 18px;
  border-left: 2px solid var(--gold);
  background: var(--gold-soft);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
}
.post-status strong {
  color: var(--gold-ink);
}
.post-body h2 {
  font-size: 22px;
  letter-spacing: -0.4px;
  font-weight: 600;
  margin: 48px 0 12px;
}
.post-body p,
.post-body li {
  font-size: 16.5px;
  line-height: 1.75;
  color: #353d4a;
}
.post-body p {
  margin: 0 0 16px;
}
.post-list {
  margin: 0 0 16px;
  padding-left: 20px;
}
.post-list li {
  margin-bottom: 6px;
}
.post-list li::marker {
  color: var(--gold);
}
.post-list-cols {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 32px;
}
.post-list-cols li {
  break-inside: avoid;
}
.post-list-cols strong {
  display: inline-block;
  min-width: 44px;
  font-variant-numeric: tabular-nums;
  color: var(--gold-ink);
}
.post-steps {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-top: 1px solid var(--line);
}
.post-steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.post-steps li::before {
  content: counter(step, decimal-leading-zero);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-ink);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.post-body .post-callout {
  border-left: 2px solid var(--gold);
  background: var(--gold-soft);
  padding: 16px 20px;
  color: var(--ink);
}
.post-body .post-note {
  font-size: 13.5px;
  color: var(--ink-soft);
}

.post .post-figure {
  max-width: 1040px;
  margin: 48px auto 8px;
}
.post-figure-frame {
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px;
}
.post-figure-link {
  display: block;
  cursor: zoom-in;
}
.post-figure-link[hidden] {
  display: none;
}
.post-figure-frame img {
  width: 100%;
  height: auto;
}
.post-figure-fallback {
  margin: 0;
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 15px;
}
.post-figure-fallback a {
  color: var(--ink);
}
.post-figure figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.post .post-tool {
  max-width: var(--max-width);
  margin: 48px auto 16px;
  scroll-margin-top: 80px;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--ink);
  color: #fff;
  padding: 100px 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
/* Ohne Kontaktformular nimmt der Text die ganze Breite ein. */
.contact-grid:has(> :only-child) {
  grid-template-columns: 1fr;
}
.section-kicker-light {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.contact h2 {
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -1.2px;
  font-weight: 600;
  margin: 0 0 18px;
}
.contact-lead {
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  max-width: 46ch;
  margin: 0 0 28px;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-form {
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-row label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}
.form-row input,
.form-row textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0;
  padding: 8px 2px;
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.form-row input::placeholder,
.form-row textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.contact-form .btn {
  align-self: flex-start;
}
.form-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Footer ---------- */
.footer {
  padding: 26px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
}
.footer-inner a {
  color: var(--ink-soft);
  text-decoration: none;
}
.footer-inner a:hover {
  color: var(--ink);
}

/* ---------- Timeline: rows turn dark on hover, a gold line follows the scroll ---------- */
.timeline[data-track] {
  position: relative;
}
.timeline[data-track]::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
  transform: scaleY(var(--track, 0));
  transform-origin: top;
  z-index: 1;
}
.timeline-item {
  isolation: isolate;
  transition:
    opacity 0.35s ease,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.timeline-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}
.timeline-item > * {
  transition:
    color 0.3s ease,
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.timeline-item h3,
.timeline-role {
  transition: color 0.3s ease;
}
.timeline-item:hover::after,
.timeline-item.is-linked::after {
  transform: scaleX(1);
}
.timeline-item:hover > *,
.timeline-item.is-linked > * {
  transform: translateX(12px);
}
.timeline-item:hover .timeline-date,
.timeline-item.is-linked .timeline-date {
  color: var(--gold);
}
.timeline-item:hover h3,
.timeline-item.is-linked h3 {
  color: #fff;
}
.timeline-item:hover .timeline-role,
.timeline-item.is-linked .timeline-role {
  color: rgba(255, 255, 255, 0.7);
}
.js .timeline:hover .timeline-item.in-view:not(:hover),
.js .cv-list.has-linked .timeline-item.in-view:not(.is-linked) {
  opacity: 0.45;
}

/* ---------- Blog cards: spotlight follows the pointer ---------- */
.blog-card {
  position: relative;
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition:
    background 0.3s ease,
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(184, 148, 74, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.blog-card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-card:hover {
  background: #fff;
}
.blog-card:hover::before {
  opacity: 1;
}
.blog-card:hover::after {
  transform: scaleX(1);
}
.blog-card > * {
  position: relative;
}

/* ---------- Blog cards: sketch revealed along the pointer's path (script.js) ---------- */
.blog-card > .blog-reveal {
  display: none;
}
@media (hover: hover) and (pointer: fine) and (min-width: 721px) {
  .blog-card.has-reveal {
    padding-right: calc(36% + 16px);
  }
  .blog-card > .blog-reveal {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 36%;
    height: 100%;
    opacity: 0.5;
    pointer-events: none;
    /* A faint dot grid hints that something lies underneath. */
    background: radial-gradient(circle, var(--line) 1px, transparent 1.5px) center / 14px 14px;
    border-left: 1px dashed var(--line);
  }
}

/* ---------- Section kicker: gold rule draws in ---------- */
.section-kicker::before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 28px;
  height: 1px;
  margin-right: 12px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}
html:not(.js) .section-kicker::before,
.in-view .section-kicker::before {
  transform: scaleX(1);
}

/* ---------- Section titles build up letter by letter ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.section-head h2 .split {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  vertical-align: top;
}
.section-head h2 .split > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i) * 28ms + 0.15s);
}
.section-head.in-view h2 .split > span {
  transform: none;
}

/* ---------- Contact title greets the visitor ---------- */
.contact h2.is-greeting {
  animation: greet 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes greet {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- Blog: stack of cards (script.js) ---------- */
.blog-grid.is-stack {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 640px;
  gap: 0;
  background: none;
  border: none;
  padding-bottom: 40px;
}
.blog-grid.is-stack > .blog-card {
  grid-area: 1 / 1;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 22px 44px -30px rgba(27, 35, 48, 0.45);
  transform-origin: 50% 100%;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.38s ease,
    background 0.3s ease;
}
.blog-grid.is-stack > .blog-card:hover {
  background: #fff;
}
.blog-grid.is-stack > .blog-card.is-dragging {
  cursor: grabbing;
  transition: background 0.3s ease;
}
.blog-grid.is-stack > .blog-card.is-flying {
  transition:
    transform 0.38s cubic-bezier(0.55, 0, 0.75, 0.3),
    opacity 0.38s ease;
}
.stack-controls {
  max-width: 640px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}
.stack-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
.stack-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.stack-btn:active {
  transform: scale(0.94);
}
.stack-count {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stack-hint {
  margin-left: auto;
  width: 92px;
  transition: opacity 0.8s ease;
}
@media (prefers-reduced-motion: reduce) {
  .blog-grid.is-stack > .blog-card,
  .blog-grid.is-stack > .blog-card.is-flying {
    transition: none;
  }
}

/* ---------- Werdegang: tag per row and the time axis chart (script.js) ---------- */
.anchor {
  display: block;
  position: relative;
  top: -80px;
}
.timeline-tag {
  align-self: start;
  justify-self: start;
  margin-top: 2px;
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition:
    color 0.3s ease,
    border-color 0.3s ease;
}
.timeline-item[data-kind='bildung'] .timeline-tag {
  color: var(--gold-ink);
  border-color: rgba(184, 148, 74, 0.5);
}
.timeline-item:hover .timeline-tag,
.timeline-item.is-linked .timeline-tag {
  color: var(--gold);
  border-color: rgba(184, 148, 74, 0.6);
}
/* The tag stays put while the row's text slides in. */
.timeline-item:hover > .timeline-tag,
.timeline-item.is-linked > .timeline-tag {
  transform: none;
}

.cv-chart {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin: 0 0 44px;
}
/* Only the last years fit; earlier ones fade out to the left. */
.cv-scroll {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-mask-image: linear-gradient(90deg, #000, #000);
  mask-image: linear-gradient(90deg, #000, #000);
}
.cv-scroll::-webkit-scrollbar {
  display: none;
}
.cv-scroll.has-history {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.35) 4%, #000 16%);
  mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.35) 4%, #000 16%);
}
.cv-scroll.has-later {
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.cv-scroll.has-history.has-later {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.35) 4%, #000 16%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, 0.35) 4%, #000 16%, #000 88%, transparent);
}
.cv-scroll.is-dragging {
  cursor: grabbing;
}
.cv-plot {
  position: relative;
  padding-top: 8px;
}
.cv-labels {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 8px 0 0 18px;
}
.cv-back {
  position: absolute;
  left: 0;
  bottom: -30px;
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    color 0.2s ease,
    opacity 0.3s ease;
}
.cv-back:hover {
  color: var(--gold-ink);
}
.cv-back.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.cv-gridline,
.cv-now {
  position: absolute;
  top: 0;
  bottom: 26px;
  width: 1px;
  background: var(--line);
}
.cv-now {
  background: none;
  border-left: 1px dashed var(--gold);
}
.cv-lane {
  position: relative;
  height: 48px;
  margin-bottom: 10px;
}
.cv-lane-label {
  display: flex;
  align-items: center;
  height: 48px;
  margin-bottom: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cv-bar {
  position: absolute;
  top: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 2px;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  cursor: default;
  transform-origin: left center;
  transform: scaleX(0);
  transition:
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease,
    box-shadow 0.3s ease;
}
.cv-lane-bildung .cv-bar {
  background: var(--gold);
  color: #221a08;
}
.cv-chart.in-view .cv-bar {
  transform: scaleX(1);
}
.cv-bar-label {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.4s ease 0.6s;
}
.cv-chart.in-view .cv-bar-label {
  opacity: 1;
}
.cv-plot.has-active .cv-bar:not(.is-active) {
  opacity: 0.35;
}
.cv-bar.is-active {
  box-shadow: 0 10px 24px -12px rgba(27, 35, 48, 0.6);
}
/* The current station runs up to today. */
.cv-bar.is-current {
  overflow: visible;
}
.cv-bar.is-current::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(184, 148, 74, 0.5);
  animation: cv-pulse 2.2s ease-out infinite;
}
@keyframes cv-pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(184, 148, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(184, 148, 74, 0);
  }
}
.cv-axis {
  position: relative;
  height: 26px;
  border-top: 1px solid var(--line-strong);
}
.cv-year {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.cv-year-now {
  color: var(--gold-ink);
  font-weight: 600;
  transform: translateX(-100%);
  padding-right: 4px;
}
.cv-year.is-first {
  transform: none;
}
.cv-year.is-near-now {
  display: none;
}
.cv-tip {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  max-width: 300px;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 3px;
  box-shadow: 0 16px 30px -18px rgba(27, 35, 48, 0.7);
  transform: translate(-50%, calc(-100% - 6px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.cv-tip.is-below {
  transform: translate(-50%, 6px);
}
.cv-chart.has-active .cv-tip {
  opacity: 1;
}
/* After a tap the box stays a while, then fades out slowly. */
.cv-tip.is-fading {
  transition-duration: 1s;
}
.cv-tip-title {
  font-size: 13.5px;
}
.cv-tip-role {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
}
.cv-tip-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .cv-lane,
  .cv-lane-label {
    height: 40px;
  }
  .cv-labels {
    padding-left: 10px;
  }
  .cv-lane-label {
    font-size: 10px;
    letter-spacing: 0.06em;
  }
  .cv-bar {
    padding: 0 6px;
  }
  .cv-bar-label {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cv-bar,
  .cv-bar-label {
    transition: none;
  }
  .cv-bar.is-current::after {
    animation: none;
  }
}

/* ---------- Hero: its own surface, closed off by a chart axis ---------- */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(27, 35, 48, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 35, 48, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  border-top: 1px solid var(--ink);
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 64px);
  background-size: 64px 6px;
  background-repeat: repeat-x;
  pointer-events: none;
}
/* Small sketches stand in for written hints: a head-and-shoulders line
   dotted out from a mouse in the hero, an arc beside the blog stack. The
   dots drift slowly along the line, the way the pointer is meant to go. */
.pencil-sketch {
  display: block;
  overflow: visible;
  fill: none;
  stroke: rgb(128, 134, 145);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
}
.pencil-sketch .pencil-guide {
  stroke-width: 1.6;
  stroke-dasharray: 0.1 4.5;
  animation: pencil-flow 3s linear infinite;
}
.pencil-sketch .pencil-faint {
  stroke-width: 0.75;
  opacity: 0.45;
}
.pencil-sketch .pencil-accent {
  stroke: var(--gold);
  stroke-width: 1.4;
}
@keyframes pencil-flow {
  to {
    stroke-dashoffset: -9.2;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pencil-sketch .pencil-guide {
    animation: none;
  }
}
.hero-sketch {
  position: absolute;
  right: max(24px, calc((100% - var(--max-width)) / 2 + 24px));
  bottom: 24px;
  z-index: 1;
  width: 160px;
  height: auto;
  pointer-events: none;
  transition: opacity 1.2s ease;
}
.hero-sketch.is-used,
.stack-hint.is-used {
  opacity: 0;
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce), (max-width: 720px) {
  .hero-sketch {
    display: none;
  }
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.js .reveal-delay-1 {
  transition-delay: 0.1s;
}
.js .reveal-delay-2 {
  transition-delay: 0.15s;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .scroll-progress {
    display: none;
  }
  .timeline-item:hover > * {
    transform: none;
  }
  .section-kicker::before {
    transform: scaleX(1);
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: center;
  }
  .hero-visual {
    order: -1;
    margin-bottom: 8px;
  }
  .portrait {
    height: 440px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 4px;
    padding: 12px 24px 18px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a {
    padding: 10px 0;
  }
  .menu-toggle {
    display: flex;
  }
  .hero {
    padding: 56px 0 0;
  }
  .hero-grid {
    padding-bottom: 36px;
  }
  .section {
    padding: 64px 0;
  }
  .contact {
    padding: 64px 0;
  }
  .post {
    padding: 48px 0 64px;
  }
  .post-list-cols {
    columns: 1;
  }
  .post-figure-frame {
    padding: 4px;
  }
}
