/* marence.at — Layout und Bausteine. Farben stehen in tokens.css. */

:root {
  --radius: 16px;
  --radius-pill: 50px;
  --nav-height: 64px;
  --wrap: 68rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --space: clamp(3.5rem, 8vw, 6rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1.5rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space); }
.section + .section { padding-top: 0; }
main > .section:last-child:not(.section--band) { padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.section--band { background: var(--surface); border-block: 1px solid var(--border); padding-block: var(--space) !important; }
.muted { color: var(--text-muted); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 40rem; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.sectionhead { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.sectionhead p:not(.eyebrow) { margin-top: 0.75rem; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--accent); color: var(--on-accent);
  padding: 0.5rem 1rem; border-radius: 8px; z-index: 200;
}
.skip:focus { left: 0.5rem; }

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

/* Kopfzeile */

.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.nav__logo {
  display: flex; align-items: center; gap: 0.65rem;
  font-weight: 700; color: var(--text); white-space: nowrap;
}
.nav__logo:hover { text-decoration: none; }
.nav__logo img { width: 32px; height: 32px; border-radius: 50%; }

.nav__links { display: flex; align-items: center; gap: 0.15rem; }

.nav__links a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.93rem; font-weight: 500;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}
.nav__links a:hover { color: var(--text); background: var(--tint); text-decoration: none; }
.nav__links a[aria-current] { color: var(--accent); background: var(--tint); }

.subnav { border-bottom: 1px solid var(--border); background: var(--surface); }
.subnav ul { display: flex; gap: 1.5rem; overflow-x: auto; }
.subnav a {
  display: block; padding: 0.8rem 0; font-size: 0.9rem; font-weight: 500;
  color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap;
}
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }

/* Schaltflächen und Marken */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  font: inherit; font-size: 0.95rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--border); color: var(--text); background: var(--card); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--light { background: #ffffff; color: #181b20; }
.btn--glass { border-color: rgba(255, 255, 255, 0.5); color: #ffffff; }
.btn--glass:hover { background: rgba(255, 255, 255, 0.14); }
.btn--card { margin-top: 1.25rem; padding: 0.65rem 1.25rem; font-size: 0.93rem; }
.btn--card span { transition: transform 0.2s; }
.btn--card:hover span { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--tint); color: var(--accent);
  font-size: 0.78rem; font-weight: 600;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Karten und Raster */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

a.card, .card--link {
  display: block; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
a.card:hover, .card--link:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.97rem; }

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.icon {
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--tint); color: var(--accent);
  margin-bottom: 1.1rem;
}
.icon svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.more { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 1rem; font-weight: 600; font-size: 0.93rem; }
.more::after { content: '→'; transition: transform 0.2s; }
a:hover .more::after, .more:hover::after { transform: translateX(3px); }

/* Bild-Hero (Startseite, Firma) */

.hero {
  position: relative; isolation: isolate;
  min-height: min(78vh, 44rem);
  display: flex; align-items: flex-end;
  color: #ffffff;
  margin-top: calc(var(--nav-height) * -1);
  padding-top: var(--nav-height);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.35) 0%, rgba(10, 14, 20, 0.15) 35%, rgba(10, 14, 20, 0.82) 100%);
}
.hero__inner { padding-block: clamp(3rem, 8vw, 5.5rem); width: 100%; }
.hero .eyebrow { color: #c9d9f0; }
.hero p.lead { color: rgba(255, 255, 255, 0.86); margin-top: 1.1rem; }
.hero blockquote { margin-top: 1.4rem; font-size: clamp(1.1rem, 2vw, 1.4rem); font-style: italic; color: rgba(255, 255, 255, 0.9); }
.hero cite { display: block; margin-top: 0.4rem; font-size: 0.9rem; font-style: normal; color: rgba(255, 255, 255, 0.7); }

/* Über dem Bild ist die Kopfzeile durchsichtig */
.nav--over { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background 0.25s, border-color 0.25s; }
.nav--over .nav__logo, .nav--over .nav__links a { color: #ffffff; }
.nav--over .nav__links a:hover, .nav--over .nav__links a[aria-current] { background: rgba(255, 255, 255, 0.16); color: #ffffff; }
.nav--over.is-stuck { background: var(--nav-bg); border-bottom-color: var(--border); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); }
.nav--over.is-stuck .nav__logo { color: var(--text); }
.nav--over.is-stuck .nav__links a { color: var(--text-muted); }
.nav--over.is-stuck .nav__links a:hover { color: var(--text); background: var(--tint); }
.nav--over.is-stuck .nav__links a[aria-current] { color: var(--accent); background: var(--tint); }

/* Personen */

.members { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.25rem; }
.member { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.member > img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.member__body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.member h3 { margin: 0; font-size: 1.15rem; }
.member__role { min-height: 1.4em; }
.member__role { font-size: 0.88rem !important; margin-top: 0.15rem; }
.member__links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.member__links a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--tint); color: var(--accent);
  font-size: 0.88rem; font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.member__links a:hover { background: var(--accent); color: var(--on-accent); text-decoration: none; }
.member__links svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.profile { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.profile img { width: 9rem; height: 11rem; object-fit: cover; border-radius: 12px; }
.profile blockquote { font-style: italic; color: var(--text-muted); margin: 0.6rem 0 1rem; }
.profile blockquote span { font-style: normal; font-size: 0.88rem; }
.linklist { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-size: 0.93rem; font-weight: 600; }

/* Partner */

.partners { display: flex; flex-wrap: wrap; gap: 1rem; }
.partners a {
  flex: 1 1 14rem; display: grid; place-items: center;
  padding: 1.5rem 2rem; min-height: 6.5rem;
  background: #ffffff; border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}
.partners a:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.partners img { max-height: 3rem; width: auto; }
.partners img.is-padded { max-height: 6rem; }

/* Projektliste der Firma */

.work { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.work + .work { margin-top: 0.75rem; }
.work summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.4rem; cursor: pointer; list-style: none;
  font-weight: 650; font-size: 1.05rem; letter-spacing: -0.01em;
}
.work summary::-webkit-details-marker { display: none; }
.work summary:hover { color: var(--accent); }
.work summary span { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.work summary span::after { content: ''; width: 0.55rem; height: 0.55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.2s; }
.work[open] summary span::after { transform: rotate(-135deg) translateY(-2px); }

.work ol { border-top: 1px solid var(--border); }
.work li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding: 0.8rem 1.4rem; }
.work li + li { border-top: 1px solid var(--border); }
.work time { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--accent); font-size: 0.93rem; }
.work strong { font-weight: 600; display: block; }
.work small { color: var(--text-muted); font-size: 0.85rem; }

/* Toni: Einstieg */

.intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem); }
.intro h1 { margin-bottom: 1.25rem; }
.intro__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-md); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; }
.stat { text-align: center; padding: 1.5rem 1rem; }
.stat b { display: block; font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; color: var(--accent); line-height: 1.1; }
.stat span { font-size: 0.88rem; color: var(--text-muted); }

a.card.app { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.app img { width: 3.5rem; height: 3.5rem; border-radius: 22.37%; flex-shrink: 0; }
.app h3 { margin: 0 0 0.1rem; font-size: 1.02rem; }
.app p { font-size: 0.85rem; }

/* Projekte */

.project + .project { margin-top: 1rem; }
.project__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.project__head img, .project__initials { width: 4rem; height: 4rem; border-radius: 22.37%; flex-shrink: 0; }
.project__initials { display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 1.3rem; }
.app .project__initials { width: 3.5rem; height: 3.5rem; font-size: 1.1rem; }
.project__head > div { flex: 1; min-width: 0; }
.project__head h2 { font-size: 1.5rem; }
.project__publisher { font-size: 0.85rem !important; font-weight: 600; color: var(--accent); }
.project__head p { font-size: 0.97rem; }
.project__head .tag { flex-shrink: 0; align-self: flex-start; }
.tag--soon { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.project p + p { margin-top: 0.75rem; }
.project .tags { margin-top: 1.25rem; }
.project .actions { margin-top: 1.25rem; align-items: center; }
.badge { display: inline-block; }
.badge img { height: 2.75rem; }

/* Lebenslauf */

.cvhead { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: 2rem; align-items: center; padding-block: clamp(2.5rem, 6vw, 4rem) 0; }
.cvhead img { width: 11rem; height: 11rem; object-fit: cover; object-position: center 20%; border-radius: 50%; }
.cvhead dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1rem; margin: 1.25rem 0 0; color: var(--text-muted); font-size: 0.97rem; }
.cvhead dt { font-weight: 600; color: var(--text); }
.cvhead dd { margin: 0; }

.cv { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.cv h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.cv aside h2:not(:first-child), .cv__main h2:not(:first-child) { margin-top: 2.75rem; }

.timeline { border-left: 2px solid var(--border); margin-left: 0.35rem; }
.timeline > li { position: relative; padding: 0 0 1.9rem 1.6rem; break-inside: avoid; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before { content: ''; position: absolute; left: -0.45rem; top: 0.4rem; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline .period { font-size: 0.8rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.timeline h3 { margin: 0.2rem 0 0.1rem; }
.timeline .org { color: var(--text-muted); font-size: 0.95rem; }
.timeline ul { margin-top: 0.6rem; }
.timeline ul li { position: relative; padding-left: 1rem; font-size: 0.95rem; color: var(--text-muted); }
.timeline ul li + li { margin-top: 0.3rem; }
.timeline ul li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: var(--border); background: color-mix(in srgb, var(--text-muted) 55%, transparent); }

.skills li { padding: 0.7rem 0; border-top: 1px solid var(--border); }
.skills li:first-child { border-top: 0; padding-top: 0; }
.skills b { display: block; font-weight: 600; font-size: 0.97rem; }
.skills span { font-size: 0.88rem; color: var(--text-muted); }

.cert { display: flex; align-items: center; gap: 1rem; padding: 1rem; }
.cert img { width: 4rem; height: 4rem; }
.cert b { display: block; font-size: 0.95rem; line-height: 1.35; }
.cert span { font-size: 0.85rem; color: var(--text-muted); }

/* Kontakt */

.contact { text-align: center; }
.contact .icon { margin-inline: auto; }
.contact a { font-weight: 600; overflow-wrap: anywhere; }

/* Fußzeile */

.footer { border-top: 1px solid var(--border); background: var(--surface); padding-block: 2.5rem; margin-top: 0; font-size: 0.9rem; color: var(--text-muted); }
main:has(> .section--band:last-child) + .footer { margin-top: 0; border-top: 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer ul { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); }

.printonly { display: none; }

.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }

/* ── Feinschliff: schwebende Kopfzeile, weiche Farbflächen, Bewegung ───────── */

:root { --radius: 22px; --nav-height: 76px; }

body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 36rem at 88% -8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(48rem 30rem at -10% 38%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%);
}

h1 { letter-spacing: -0.035em; font-weight: 750; }
h2 { letter-spacing: -0.03em; }

/* Kopfzeile als schwebende Kapsel */
.nav, .nav--over, .nav--over.is-stuck { background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav { height: var(--nav-height); padding-top: 12px; pointer-events: none; }
.nav__inner {
  pointer-events: auto;
  height: 52px; max-width: 46rem;
  padding: 0 0.5rem 0 1.1rem;
  background: var(--nav-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-md);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.wrap.nav__inner { width: calc(100% - 2 * var(--gutter)); }
.nav--over:not(.is-stuck) .nav__inner { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.24); box-shadow: none; }

/* Unterseiten von Toni: Reiter als Kapsel */
.subnav { border: 0; background: none; padding-top: 0.5rem; }
.subnav .wrap { display: flex; justify-content: center; }
.subnav ul { scrollbar-width: none; gap: 0.15rem; padding: 0.25rem; background: var(--tint); border-radius: var(--radius-pill); max-width: 100%; }
.subnav a { padding: 0.4rem 1rem; border: 0; border-radius: var(--radius-pill); font-size: 0.88rem; }
.subnav a[aria-current] { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }

/* Bild-Hero */
.hero { min-height: min(92vh, 52rem); overflow: hidden; }
.hero__bg { animation: drift 28s ease-out both; }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero::after { background: linear-gradient(180deg, rgba(8, 12, 20, 0.45) 0%, rgba(8, 12, 20, 0.1) 32%, rgba(8, 12, 20, 0.55) 68%, var(--bg) 100%); }
.hero__inner { padding-bottom: clamp(5rem, 12vw, 9rem); }
.hero h1 { font-size: clamp(3rem, 9vw, 6.5rem); }
.hero .eyebrow {
  display: inline-block; padding: 0.35rem 0.9rem; margin-bottom: 1.25rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #ffffff; letter-spacing: 0.1em;
}
.hero + .section { margin-top: clamp(-5rem, -7vw, -3rem); position: relative; }

/* Karten */
.card { box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.btn { padding: 0.8rem 1.5rem; }
.btn--primary { box-shadow: 0 8px 20px -10px var(--accent); }
.icon { border-radius: 14px; }

/* Startseite: große Firmenkarte neben zwei kleinen */
.bento { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.card--apps { display: flex !important; flex-direction: column; justify-content: space-between; gap: 2rem; min-height: 22rem; }
.card--apps h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; }
.appicons { display: grid; grid-template-columns: repeat(3, 4.5rem); gap: 0.9rem; }
.appicons img, .appicons .project__initials { width: 4.5rem; height: 4.5rem; border-radius: 22.37%; box-shadow: var(--shadow-md); transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.card--apps:hover .appicons > :nth-child(odd) { transform: translateY(-4px) rotate(-3deg); }
.card--apps:hover .appicons > :nth-child(even) { transform: translateY(-4px) rotate(3deg); }
.card--feature {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex !important; flex-direction: column; justify-content: flex-end;
  min-height: 22rem; color: #ffffff !important; border: 0;
}
.card--feature img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card--feature::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 12, 20, 0.05) 20%, rgba(8, 12, 20, 0.85) 100%); }
.card--feature:hover img { transform: scale(1.05); }
.card--feature h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; }
.card--feature p { color: rgba(255, 255, 255, 0.85); max-width: 28rem; }
.card--feature .more { color: #ffffff; }

/* Toni: Einstieg */
.intro h1 {
  font-size: clamp(3rem, 8vw, 5.75rem);
  background: linear-gradient(120deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.08em;
}
.intro__photo { position: relative; }
.intro__photo::before { content: ''; position: absolute; inset: 8% -6% -6% 8%; z-index: -1; border-radius: 32px; background: var(--accent); opacity: 0.18; filter: blur(34px); }
.intro__photo img { border-radius: 32px; }
.chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.9rem; margin-bottom: 1.25rem; border-radius: var(--radius-pill); background: var(--card); border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; color: var(--text-muted); box-shadow: var(--shadow-sm); }
.chip::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }

/* Lebenslauf */
.cvhead { grid-template-columns: minmax(0, 1fr) 15rem; padding-block: clamp(3rem, 7vw, 5rem) 0; }
.cvhead h1 {
  font-size: clamp(3rem, 8vw, 5.25rem); margin-bottom: 1.5rem; padding-bottom: 0.08em;
  background: linear-gradient(120deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cvhead__photo { position: relative; }
.cvhead__photo::before { content: ''; position: absolute; inset: 8% -6% -6% 8%; z-index: -1; border-radius: 32px; background: var(--accent); opacity: 0.18; filter: blur(30px); }
.cvhead .cvhead__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 28px; object-position: center 20%; box-shadow: var(--shadow-md); }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.facts li { padding: 0.45rem 0.95rem; border-radius: var(--radius-pill); background: var(--card); border: 1px solid var(--border); font-size: 0.9rem; box-shadow: var(--shadow-sm); }
.facts span { color: var(--text-muted); margin-right: 0.5rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.timeline > li::before { box-shadow: 0 0 0 4px var(--bg); }
.tag--now { margin-left: 0.6rem; font-size: 0.72rem; padding: 0.1rem 0.6rem; vertical-align: 1px; }
.timeline h3 { font-size: 1.2rem; }
.timeline .org { color: var(--accent); font-weight: 600; }

.cv aside { display: grid; gap: 1rem; }
/* Die Seitenleiste steht im HTML vor der Zeitleiste, damit sie im Druck rechts umflossen werden kann */
.cv aside { grid-column: 2; grid-row: 1; }
.cv__main { grid-column: 1; grid-row: 1; }
.cvbox h2, .cv aside .cvbox h2 { font-size: 1.15rem; margin: 0 0 1rem !important; }
.cv aside .cvbox__title { font-size: 1.15rem; margin: 0.75rem 0 0 !important; }
.langs { display: grid; gap: 0.5rem; }
.langs li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.95rem; }
.langs b { font-weight: 600; }
.langs span { color: var(--text-muted); }

/* Zeitraum als Kapsel auf der Zeitleiste */
.timeline { margin-left: 0; border-left: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 1.1rem; top: 0.9rem; bottom: 0; width: 2px; background: var(--border); }
.timeline > li { padding-left: 0; }
.timeline > li::before { display: none; }
.timeline .period {
  position: relative; display: inline-block;
  padding: 0.22rem 0.85rem;
  border: 1.5px solid var(--accent); border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: 0.8rem; font-weight: 650; letter-spacing: 0.02em; text-transform: none;
  color: var(--accent);
}
.timeline .period--now { background: var(--accent); color: var(--on-accent); }
.entry {
  margin: 0.7rem 0 0 2.4rem; padding: 1.2rem 1.4rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.entry:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.entry h3 { margin-top: 0; }
.wrap--wide { max-width: 78rem; }
.cv { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }

.edu li + li { margin-top: 1rem; }
.edu .period { display: inline-block; padding: 0.12rem 0.65rem; margin-bottom: 0.35rem; border: 1.5px solid var(--accent); border-radius: var(--radius-pill); font-size: 0.75rem; font-weight: 650; color: var(--accent); }
.edu b { display: block; font-weight: 600; font-size: 0.97rem; line-height: 1.35; }
.edu li > span:last-child { font-size: 0.88rem; color: var(--text-muted); }

.cvhead h1 { margin-bottom: 1rem; }
.cvhead__summary { margin-bottom: 1.5rem; max-width: 38rem; font-size: 1.1rem; }

/* Hydropower-Rechner. Die Skripte in static/calculator/ lesen diese drei Farbvariablen. */
:root { --text-color: var(--text); --secondary-text: var(--text-muted); --primary-color: var(--accent); }
.calc__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.calc__head .lead { margin-top: 0.75rem; }
.calc__grid { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.calc__side { display: grid; gap: 1rem; }
.calc .card h2 { font-size: 1.15rem; margin-bottom: 1.1rem; }
.field + .field { margin-top: 1rem; }
.field label { display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; }
.field label b { color: var(--accent); }
.field__input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); transition: border-color 0.2s, box-shadow 0.2s; }
.field__input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.field__input input { flex: 1; min-width: 0; padding: 0.7rem 0.9rem; border: 0; background: none; color: var(--text); font: inherit; font-variant-numeric: tabular-nums; outline: none; }
.field__input span { padding-right: 0.9rem; color: var(--text-muted); font-size: 0.9rem; }
.field input[type='range'] { width: 100%; accent-color: var(--accent); }
.result { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.6rem 0; }
.result + .result { border-top: 1px solid var(--border); }
.result span { color: var(--text-muted); }
.result b { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
#suitable-turbines ul { display: flex; flex-wrap: wrap; gap: 0.5rem; }
#suitable-turbines li { padding: 0.45rem 1rem; border-radius: var(--radius-pill); background: var(--tint); color: var(--accent); font-weight: 600; font-size: 0.93rem; cursor: pointer; transition: background 0.2s, color 0.2s; }
#suitable-turbines li:hover, #suitable-turbines li.selected { background: var(--accent); color: var(--on-accent); }
.chart-container { height: clamp(22rem, 55vw, 34rem); }
.chart-container canvas { width: 100%; height: 100%; display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.legend-item { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-pill); background: none; color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: opacity 0.2s, border-color 0.2s; }
.legend-item:hover { border-color: var(--accent); }
.legend-item.inactive { opacity: 0.5; }
.legend-item.inactive .legend-color { background: rgba(128, 128, 128, 0.2) !important; border-color: rgba(128, 128, 128, 1) !important; }
.legend-color { width: 0.9rem; height: 0.9rem; border-radius: 4px; }
.legend-color.pelton { background: rgba(255, 59, 48, 0.2); border: 1px solid rgba(255, 59, 48, 1); }
.legend-color.francis { background: rgba(52, 199, 89, 0.2); border: 1px solid rgba(52, 199, 89, 1); }
.legend-color.kaplan { background: rgba(0, 122, 255, 0.2); border: 1px solid rgba(0, 122, 255, 1); }
.legend-color.crossflow { background: rgba(255, 149, 0, 0.2); border: 1px solid rgba(255, 149, 0, 1); }
.legend-color.bulb { background: rgba(88, 86, 214, 0.2); border: 1px solid rgba(88, 86, 214, 1); }
.turbine-details-section { margin-top: 1rem; }
.turbine-details-section h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.ranges { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.ranges div { padding: 0.8rem 1rem; border-radius: 12px; background: var(--bg); }
.ranges span { display: block; font-size: 0.8rem; color: var(--text-muted); }
.ranges b { font-weight: 650; }
#turbine-description { margin: 0; font: inherit; white-space: pre-wrap; color: var(--text-muted); }

/* Zahlen ohne Kästen */
.stats { gap: 0; border-block: 1px solid var(--border); }
.stat, .stat.card { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 2.25rem 1rem; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat b { font-size: clamp(2.4rem, 5vw, 3.75rem); }

/* Einblenden beim Scrollen (nur mit JavaScript, siehe static/js/reveal.js) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 52rem) {
  .intro, .cv, .cvhead, .calc__grid { grid-template-columns: 1fr; }
  .intro__photo { max-width: 20rem; order: -1; }
  .cvhead__photo { order: -1; max-width: 11rem; }
  .cv aside { grid-column: 1; grid-row: 2; }
  .project__head { flex-wrap: wrap; }
  .nav__links a { padding: 0.4rem 0.6rem; font-size: 0.88rem; }
  .nav__logo span { display: none; }
  .bento { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; }
}

@media (max-width: 30rem) {
  .subnav a { padding: 0.4rem 0.65rem; font-size: 0.84rem; }
  .profile { grid-template-columns: 1fr; }
  .work li { grid-template-columns: 1fr; gap: 0.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Lebenslauf als PDF drucken */
@media print {
  @page { size: A4; margin: 7mm 10mm 6mm; }
  :root { --bg: #fff; --card: #fff; --surface: #fff; --text: #111; --text-muted: #444; --accent: #2a60b2; --border: #d5d8dd; }
  body { font-size: 9pt; line-height: 1.32; }
  .nav, .subnav, .footer, .skip, .noprint { display: none !important; }
  body::before { display: none; }
  .printonly { display: block !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section { padding-block: 5mm 0 !important; }
  .cvhead { padding-top: 0; grid-template-columns: 1fr 30mm; }
  .cvhead h1 { color: #111; background: none; margin-bottom: 3mm; }
  .cvhead__photo::before { display: none; }
  .cvhead__summary { font-size: 9pt !important; margin-bottom: 2.5mm; max-width: none; color: #333; }
  .cvbox .tag { font-size: 7.5pt; padding: 0.3mm 2mm; border: 0.3mm solid #c9d3e3; background: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cvbox .tags { gap: 1.2mm; }
  .cvhead__photo { order: 0 !important; max-width: none !important; }
  .cvhead .eyebrow { font-size: 8pt; margin-bottom: 2mm; }
  .cvhead h1 { font-size: 24pt !important; padding: 0; }
  .facts span { font-size: 7.5pt; }
  .timeline h3 { font-size: 10.5pt; margin: 0.5mm 0 0; }
  .timeline .period { font-size: 7.5pt; }
  .timeline .org { font-size: 8.5pt !important; }
  .timeline ul { margin-top: 1mm; }
  .timeline ul li, .skills span, .langs li { font-size: 8.3pt !important; line-height: 1.3; }
  .timeline ul li + li { margin-top: 0.3mm; }
  .timeline::before { left: 4mm; top: 3mm; background: #d5d8dd; }
  .timeline .period { font-size: 7.5pt !important; padding: 0.4mm 2.5mm; border-width: 0.3mm; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .timeline .period--now { background: #2a60b2; color: #fff; }
  .edu li + li { margin-top: 2mm; }
  .edu .period { font-size: 7pt; padding: 0.2mm 2mm; border-width: 0.3mm; margin-bottom: 0.6mm; }
  .edu b, .edu li > span:last-child { font-size: 8.5pt; }
  .entry { margin: 0.8mm 0 0 8mm; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
  .cvbox h2, .cv aside .cvbox h2 { margin-bottom: 2mm !important; }
  .skills b { font-size: 8.5pt !important; }
  .cert { padding: 2mm; border: 0; }
  .cert, .cvbox, .timeline > li { break-inside: avoid; }
  .cv aside h2:not(:first-child), .cv__main h2:not(:first-child) { margin-top: 4mm !important; }
  .section { padding-block: 2.5mm 0 !important; }
  .cert img { width: 10mm; height: 10mm; }
  .cvhead .cvhead__photo img { border-radius: 4mm; box-shadow: none; }
  .facts li { padding: 0; border: 0; box-shadow: none; background: none; width: 100%; font-size: 9pt; }
  .facts { display: grid; grid-template-columns: auto 1fr; gap: 0.5mm 8mm; justify-content: start; }
  .cv aside { gap: 4mm; }
  .cvbox { border: 0; padding: 0; }
  .tag--now { display: none; }
  .timeline .org { color: #444; }
  h1 { font-size: 22pt; }
  .cv { display: block; }
  .cv aside { float: right; width: 28%; margin: 0 0 4mm 7mm; }
  .cv__main { display: block; }
  .cvhead { grid-template-columns: 1fr 27mm !important; gap: 6mm; }
  .cv h2 { font-size: 12pt; margin-bottom: 2mm; }
  .cv aside h2:not(:first-child), .cv__main h2:not(:first-child) { margin-top: 6mm; }
  .timeline > li { padding-bottom: 0.8mm; }
  .timeline ul li, .timeline .org, .skills b { font-size: 9pt; }
  .skills li { padding: 1.5mm 0; }
  .card { box-shadow: none; }
  a { color: inherit; }
}
