/* ============================================================
   Portfolio Simon Betz — Bento-Grid
   Aufbau nach dem Vorbild dannpetty.com:
   schwarzer Hintergrund, 20px Gutter, Karten mit 20px Radius,
   4 Spalten Masonry, einzelne Karten 2 Spalten breit.
   ============================================================ */

:root {
  --bg:        #000000;
  --card:      #1a1a1a;
  --glass:     rgba(255, 255, 255, 0.07);
  --line:      rgba(255, 255, 255, 0.10);
  --text:      #ffffff;
  --muted:     rgba(255, 255, 255, 0.55);
  --muted-2:   rgba(255, 255, 255, 0.38);
  --accent:    #e8512e;
  --fill-1:    rgba(255, 255, 255, 0.07);   /* dezente Flächen */
  --fill-2:    rgba(255, 255, 255, 0.18);   /* Hover darauf */
  --text-soft: rgba(255, 255, 255, 0.72);
  --hair:      rgba(255, 255, 255, 0.38);   /* Rand beim Hover */
  --topbar-h:  62px;
  --topbar-bg: rgba(12, 12, 14, 0.62);
  --radius:    20px;
  --radius-sm: 12px;
  --gap:       20px;
  --pad:       20px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Helles Thema ------------------------------------ */

:root[data-theme="light"] {
  --bg:        #eeeef1;
  --card:      #ffffff;
  --glass:     rgba(255, 255, 255, 0.72);
  --line:      rgba(0, 0, 0, 0.10);
  --text:      #15151a;
  --muted:     rgba(0, 0, 0, 0.58);
  --muted-2:   rgba(0, 0, 0, 0.40);
  --accent:    #d4421d;
  --fill-1:    rgba(0, 0, 0, 0.05);
  --fill-2:    rgba(0, 0, 0, 0.12);
  --text-soft: rgba(0, 0, 0, 0.70);
  --hair:      rgba(0, 0, 0, 0.26);
  --topbar-bg: rgba(255, 255, 255, 0.72);
}
:root[data-theme="light"] .card--media { background: #e4e4e8; }
:root[data-theme="light"] .btn { background: #15151a; color: #fff; }
/* Kartenumriss ist weiß gezeichnet — fürs helle Thema umkehren */
:root[data-theme="light"] .loc__map-inner img { filter: invert(1); }
/* Pills auf Bildern bleiben dunkel, sonst verschwinden sie im Motiv */
:root[data-theme="light"] .card__caption .pill,
:root[data-theme="light"] .carousel__nav {
  background: rgba(0, 0, 0, .55); color: #fff; border-color: rgba(255, 255, 255, .2);
}
:root[data-theme="light"] .site__shot::after {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .5));
}
:root[data-theme="light"] .pill--light {
  background: rgba(0, 0, 0, .05); color: var(--text); border-color: var(--line);
}
:root[data-theme="light"] .carousel__dots button { background: rgba(255, 255, 255, .55); }
:root[data-theme="light"] :root[data-theme="light"] .modal__close,
:root[data-theme="light"] .lightbox__close {
  background: rgba(255, 255, 255, .9); color: #15151a;
}
:root[data-theme="light"] .lightbox,
:root[data-theme="light"] .modal { background: rgba(230, 230, 235, .8); }
:root[data-theme="light"] .marquee {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

* { box-sizing: border-box; }

/* hidden muss gewinnen – sonst überstimmt ein eigenes display das Attribut */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  /* unten extra Raum: der Unschärfe-Verlauf soll auf leere Fläche fallen,
     sonst bliebe die letzte Kartenreihe dauerhaft unscharf */
  padding: var(--pad) var(--pad) 190px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---------- Masonry ----------------------------------------- */

.grid {
  position: relative;
  margin: 0 auto;
  max-width: 1400px;
}

.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  isolation: isolate;
}

/* Ohne JS (oder vor dem Layout-Pass) einfach untereinander */
.grid:not(.is-laid-out) .card { margin-bottom: var(--gap); }

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 30;
  transition: border-color .28s ease, box-shadow .28s ease;
}
/* Beim Hover tritt der Rand deutlich hervor (wie im Vorbild) */
.card:hover::after {
  border-color: var(--hair);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.card--glass {
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.card--pad   { padding: var(--pad); }
.card--media { background: #111; }

/* Bildkarten */
.card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
.card--link { display: block; text-decoration: none; cursor: pointer; }
.card--link:hover .card__img { transform: scale(1.045); }

/* Caption-Pill unten links (wie im Vorbild) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.pill--light { background: var(--glass); }
a.pill, button.pill { transition: filter .2s, background .2s; cursor: pointer; }
a.pill:hover, button.pill:hover { filter: brightness(1.35); }

.card__caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 20;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
}
.card:hover .card__caption { opacity: 1; transform: translateY(0); }

/* Das große Headerbild behält seine Bildunterschrift dauerhaft */
.card__caption--always { opacity: 1; transform: none; }

/* ... und bleibt dabei in der Karte: bei schmalen Schirmen bricht sie um,
   statt rechts aus dem Bild zu laufen. */
.card__caption--always { right: 14px; }
.card__caption--always .pill { white-space: normal; line-height: 1.35; }
@media (max-width: 760px) {
  /* Zweizeilig braucht die Unterschrift die volle Breite -- also ueber die Punkte heben */
  .card__caption--always { bottom: 34px; }
  .card__caption--always .pill { border-radius: 16px; padding: 8px 14px; }
}

/* Ohne Hover (Touch) sind alle Beschriftungen immer sichtbar */
@media (hover: none) {
  .card__caption { opacity: 1; transform: none; }
}

/* ---------- Typo-Bausteine ---------------------------------- */

.eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 14px;
}
.eyebrow span:last-child { color: var(--muted-2); }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14.5px; }

p { margin: 0 0 12px; color: var(--muted); }
p:last-child { margin-bottom: 0; }
.lead { color: var(--text-soft); }
.t-strong { color: var(--text); font-weight: 600; margin-bottom: 2px; }


.inline-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--hair);
  text-underline-offset: 3px;
}
.inline-link:hover { text-decoration-color: var(--text); }

/* ---------- Profilkarte ------------------------------------- */

.avatar-btn {
  position: relative; display: block; margin: 0 0 18px;
  width: 62px; height: 62px; padding: 0; border: 0;
  background: none; cursor: zoom-in; border-radius: 50%;
}
.avatar-btn::after {                 /* Ring beim Hover */
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%; border: 1.5px solid var(--accent);
  opacity: 0; transform: scale(.88);
  transition: opacity .28s ease, transform .28s cubic-bezier(.34,1.4,.64,1);
}
.avatar-btn:hover::after,
.avatar-btn:focus-visible::after { opacity: 1; transform: scale(1); }

.profile__avatar {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; display: block;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), filter .35s ease;
}
.avatar-btn:hover .profile__avatar { transform: scale(1.05); filter: brightness(1.08); }

.avatar-btn__zoom {
  position: absolute; right: -3px; bottom: -3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  opacity: 0; transform: scale(.5);
  transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.5,.64,1);
}
.avatar-btn__zoom svg {
  width: 12px; height: 12px; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round;
}
.avatar-btn:hover .avatar-btn__zoom,
.avatar-btn:focus-visible .avatar-btn__zoom { opacity: 1; transform: scale(1); }

/* ---------- Projekt-Popup ----------------------------------- */

.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 28px 24px;
  background: rgba(0, 0, 0, .74);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  animation: lbIn .25s ease both;
  overflow-y: auto;
}
.modal[hidden] { display: none; }

.modal__inner {
  position: relative;
  width: min(1120px, 100%);
  display: flex; flex-direction: column; gap: 18px;
  animation: lbPop .35s cubic-bezier(.34, 1.3, .64, 1) both;
}

/* Websites: Seite links, Text rechts */
.modal__inner--seite {
  display: grid;
  grid-template-columns: minmax(280px, 440px) 1fr;
  gap: 26px; align-items: center;
}
.modal__inner--seite .modal__stage { height: min(70vh, 680px); }

/* Bühne: das Bild steht frei, kein Kasten, kein schwarzer Grund */
.modal__stage {
  position: relative;
  height: min(62vh, 620px);
  display: grid; place-items: center;
}
.modal__stage img,
.modal__stage video {
  display: block;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  border-radius: var(--radius);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .55);
}

/* Bildstrecke: alle Bilder übereinander, weich überblendet */
.modal__stage--slider img,
.modal__stage--slider video {
  position: absolute; inset: 0; margin: auto;
  opacity: 0; transition: opacity .35s ease;
}
.modal__stage--slider img.is-active,
.modal__stage--slider video.is-active { opacity: 1; }

/* Langer Screenshot: eigenes Fenster, scrollt (auch von allein) */
.modal__frame {
  width: min(440px, 92%); height: 100%;
  overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--radius);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .55);
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* alte Edge */
}
.modal__frame::-webkit-scrollbar { width: 0; height: 0; display: none; }
.modal__frame img {
  display: block; width: 100%; height: auto;
  max-width: none; max-height: none;
  border-radius: 0; box-shadow: none;
}

/* Pfeile und Zähler liegen über der Bühne */
.modal__stage .carousel__nav { opacity: 1; }
.modal__count {
  position: absolute; right: 0; bottom: -30px; z-index: 25;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid var(--line);
  font-size: 11px; font-weight: 500; color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Textkarte darunter */
.modal__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px 26px;
}
.modal__card .eyebrow { padding-right: 46px; }
.modal__card h2 { font-size: 21px; margin-bottom: 10px; }
.modal__card p { font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; }
.modal__card .tags { margin-bottom: 20px; }
.modal__card .btn { width: auto; display: inline-block; padding: 11px 20px; }

.modal__close {
  position: absolute; top: -6px; right: 0; z-index: 30;
  width: 38px; height: 38px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  backdrop-filter: blur(10px);
  transition: background .2s, transform .2s;
}
.modal__close svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round;
}
.modal__close:hover { background: rgba(255, 255, 255, .26); transform: rotate(90deg); }

:root[data-theme="light"] .modal { background: rgba(228, 228, 234, .8); }
:root[data-theme="light"] .modal__close,
:root[data-theme="light"] .modal__count {
  background: rgba(255, 255, 255, .9); color: #15151a;
}

@media (max-width: 760px) {
  .modal { padding: 54px 14px 20px; align-items: start; }
  .modal__inner--seite { display: flex; flex-direction: column; gap: 18px; }
  .modal__inner--seite .modal__stage { height: 46vh; }
  .modal__stage { height: 46vh; }
  .modal__card { padding: 20px; }
  .modal__close { top: -44px; }
  .modal__count { bottom: -28px; }
}
@media (prefers-reduced-motion: reduce) {
  .modal, .modal__inner { animation: none; }
}

/* ---------- Lightbox ---------------------------------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 24px;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: lbIn .25s ease both;
}
.lightbox[hidden] { display: none; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox__figure { margin: 0; animation: lbPop .35s cubic-bezier(.34,1.35,.64,1) both; }
@keyframes lbPop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }

.lightbox img {
  display: block; width: min(420px, 78vw); height: auto;
  border-radius: 24px; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.lightbox__close {
  position: absolute; top: 22px; right: 22px;
  width: 40px; height: 40px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s, transform .2s;
}
.lightbox__close svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .22); transform: rotate(90deg); }

@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox__figure { animation: none; }
}
.profile__head { margin-bottom: 16px; }
/* p:last-child setzt sonst den Abstand auf 0, weil die Rolle das letzte Kind ist */
.profile__role { color: var(--muted); margin: 2px 0 0; }
.profile__recht {
  margin: 16px 0 0; font-size: 11.5px; color: var(--muted-2);
}
.profile__recht a { color: var(--muted-2); text-decoration: none; }
.profile__recht a:hover { color: var(--text); text-decoration: underline; }

.profile__social {
  display: flex; align-items: center; gap: 8px;
  margin-top: 18px; flex-wrap: wrap;
}
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--fill-1);
  color: var(--text); text-decoration: none;
  transition: background .2s;
}
.icon-btn:hover { background: var(--fill-2); }
.icon-btn svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- „Aktuell bei“ ----------------------------------- */

/* „Aktuell bei“ und „Womit ich arbeite“ bilden ein Paar gleicher Höhe */
.now, .card--tools { min-height: 146px; display: flex; flex-direction: column; }
.now { position: relative; }
.now .now__meta { margin-top: auto; }
/* Wortmarke des Arbeitgebers, bringt ihren eigenen Hintergrund mit */
.now__mark {
  display: block; margin: 2px 0 12px;
  width: 100%; max-width: 252px;
  transition: transform .25s cubic-bezier(.22,.61,.36,1);
}
.now__mark img { display: block; width: 100%; height: auto; }
.now__mark:hover { transform: translateY(-2px) scale(1.015); }
.now__name { font-weight: 600; }
.now__meta { color: var(--muted); }
.now__mail { color: var(--muted-2); font-size: 12.5px; margin-top: 2px; }

/* ---------- To-Do ------------------------------------------- */

.todo { margin: 0; padding: 0; list-style: none; }
.todo li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 0; cursor: pointer; color: var(--text-soft);
}
.todo .box {
  flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px;
  border-radius: 4px; border: 1px solid var(--hair);
  display: grid; place-items: center; transition: all .18s;
}
.todo .box svg { width: 9px; height: 9px; opacity: 0; }
.todo li.done .box { background: var(--accent); border-color: var(--accent); }
.todo li.done .box svg { opacity: 1; }
.todo li.done { color: var(--muted-2); text-decoration: line-through; }

/* ---------- Logo-Raster (Kunden) ---------------------------- */

.logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.logos div {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  background: var(--fill-1);
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted); text-align: center; padding: 4px;
}

/* ---------- Standort / Vektorkarte -------------------------- */

.loc { min-height: 236px; display: flex; flex-direction: column; }
.loc .eyebrow { margin-bottom: 4px; }

/* Uhrzeit rechts, direkt unter „Mittelfranken“ */
.loc__time {
  text-align: right; font-size: 12.5px; color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

/* Ort steht unten in der Karte */
.loc__place { margin-top: auto; padding-top: 16px; }
.loc__city { font-weight: 600; font-size: 15px; }
.loc__sub  { color: var(--muted); font-size: 12.5px; }
.loc > *:not(.loc__map) { position: relative; z-index: 2; }

/* Umriss des Landkreises Roth als SVG, Pin sitzt im gleichen Raster */
.loc__map {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  display: grid; place-items: center;
}
.loc__map-inner { position: relative; aspect-ratio: 400 / 300; height: 100%; max-width: 100%; }
.loc__map-inner img { width: 100%; height: 100%; display: block; }

.loc__pin {
  position: absolute; left: 59.55%; top: 60.62%;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,81,46,.28), 0 0 18px 5px rgba(232,81,46,.5);
}
.loc__pin::before {
  content: ""; position: absolute; inset: -8px;
  border-radius: 50%; border: 1px solid rgba(232,81,46,.65);
  animation: pinPulse 2.6s ease-out infinite;
}
@keyframes pinPulse {
  0%   { transform: scale(.6); opacity: .9; }
  70%  { transform: scale(1.8); opacity: 0; }
  100% { transform: scale(1.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .loc__pin::before { animation: none; } }

/* ---------- Logo-Laufleiste (Tools) ------------------------- */

.marquee {
  position: relative;
  overflow: hidden;
  padding: 4px 0 32px;
  margin: 0 -20px;                 /* randlos laufen lassen */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track {
  display: flex; gap: 12px; width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

.logo-tile {
  position: relative; flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--fill-1);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: background .2s, transform .2s;
}
.logo-tile:hover { background: var(--fill-2); transform: translateY(-2px); }
.logo-tile img { width: 24px; height: 24px; display: block; }
/* n8n ist eine breite, flache Marke und wirkt sonst zu klein */
.logo-tile[data-name="n8n"] img { width: 32px; height: auto; }

/* Logos, die selbst schon eine App-Kachel sind, füllen den Kreis aus.
   Kein overflow:hidden auf der Kachel – das würde den Tooltip abschneiden;
   stattdessen rundet das Bild sich selbst. */
.logo-tile--fill { background: transparent; padding: 0; }
.logo-tile--fill img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.logo-tile--fill:hover { background: transparent; }

/* Tooltip unterhalb der Kachel (bleibt im sichtbaren Bereich) */
.logo-tile::after {
  content: attr(data-name);
  position: absolute; top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(-3px);
  padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,.8); border: 1px solid var(--line);
  font-size: 10.5px; font-weight: 500; color: #fff; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.logo-tile:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.logo-tile:hover { z-index: 2; }

/* ---------- Tag-Wolke / Toolbox ----------------------------- */

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span {
  padding: 6px 11px; border-radius: 999px; font-size: 12px;
  background: var(--fill-1); color: var(--text-soft);
}


/* ---------- Promo-Karte (Bild + Text + CTA) ----------------- */

.promo__thumb {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: var(--radius-sm); margin-bottom: 14px;
}
.btn {
  display: block; width: 100%; text-align: center;
  padding: 11px 16px; border-radius: 999px;
  background: #fff; color: #111; font-weight: 600; font-size: 13px;
  text-decoration: none; border: 0; cursor: pointer;
  transition: opacity .2s;
}
.btn:hover { opacity: .86; }
.btn span { opacity: .5; font-weight: 500; }

/* Pfeil im Button: fliegt beim Hover nach schräg oben raus,
   der zweite rückt von links unten nach */
.btn__pfeil {
  position: relative; display: inline-block;
  width: 1em; height: 1em; margin-left: 5px;
  vertical-align: -0.12em; overflow: hidden; opacity: 1;
}
.btn__pfeil i {
  position: absolute; inset: 0; font-style: normal;
  display: grid; place-items: center;
  transition: transform .36s cubic-bezier(.4, 0, .2, 1);
}
.btn__pfeil i:nth-child(2) { transform: translate(-105%, 105%); }
.btn:hover .btn__pfeil i:nth-child(1),
.btn:focus-visible .btn__pfeil i:nth-child(1) { transform: translate(105%, -105%); }
.btn:hover .btn__pfeil i:nth-child(2),
.btn:focus-visible .btn__pfeil i:nth-child(2) { transform: translate(0, 0); }
@media (prefers-reduced-motion: reduce) { .btn__pfeil i { transition: none; } }

/* ---------- Zitat ------------------------------------------- */

.quote { font-size: 15.5px; line-height: 1.5; color: var(--text); }
.quote + .quote-by { margin-top: 14px; color: var(--muted); font-size: 12.5px; }

/* ---------- Karussell --------------------------------------- */

.carousel { position: relative; width: 100%; height: 100%; }
.carousel__track { position: absolute; inset: 0; }
.carousel__track img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .7s ease;
}
.carousel__track img.is-active { opacity: 1; }
.carousel__dots {
  position: absolute; right: 14px; bottom: 18px; z-index: 20;
  display: flex; gap: 6px;
}
.carousel__dots button {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.35); cursor: pointer; transition: all .25s;
}
.carousel__dots button.is-active { background: #fff; width: 18px; border-radius: 3px; }

/* ---------- Website-Karten mit Scroll-Animation ------------- */

.card--site { display: block; text-decoration: none; }
.site__shot { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.site__shot img {
  position: absolute; top: 0; left: 0; width: 100%; height: auto; display: block;
  transform: translateY(0);
  transition: transform 7s cubic-bezier(.37, 0, .24, 1);
  will-change: transform;
}
.card--site:hover .site__shot img,
.card--site:focus-visible .site__shot img { transform: translateY(var(--scroll, -50%)); }

/* Verlauf unten, damit die Pill immer lesbar bleibt */
.card--site .site__shot::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.65));
  pointer-events: none;
}
.site__ext { opacity: .55; font-style: normal; margin-left: 2px; }

/* Ohne Hover (Touch) läuft die Vorschau von allein */
@media (hover: none) {
  .site__shot img {
    transition: none;
    animation: siteScroll 18s ease-in-out infinite alternate;
  }
}
@keyframes siteScroll {
  from { transform: translateY(0); }
  to   { transform: translateY(var(--scroll, -50%)); }
}
@media (prefers-reduced-motion: reduce) {
  .site__shot img { animation: none; transition: none; }
}

/* Videokarte */
.card--video { display: block; text-decoration: none; }
.card--video video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}




/* Pfeile hier dauerhaft sichtbar, nicht erst beim Hover */

.modal__count {
  position: absolute; right: 12px; bottom: 12px; z-index: 25;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  font-size: 11px; font-weight: 500; color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Logo-Animation: das SVG steht frei auf der Kachel */
.card--logo { display: block; text-decoration: none; }
.card--logo .logo-anim {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 16% 17% 22%;
  border-radius: inherit;
}
.card--logo .logo-anim img {
  display: block;
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}
.card--logo:hover .logo-anim img,
.card--logo:focus-visible .logo-anim img { transform: scale(1.04); }

/* Im Popup steht dasselbe SVG gross und ohne Schatten.
   Die feste Zeile verhindert, dass die Buehne mit dem Bild mitwaechst. */
.modal__stage--vektor { grid-template-rows: minmax(0, 1fr); }
/* Im Popup steht dasselbe SVG gross und ohne Schatten */
.modal__stage img.ist-vektor {
  width: auto; height: auto;
  max-width: min(100%, 520px); max-height: 100%;
  border-radius: 0; box-shadow: none;
}

/* Einzelfoto füllt die Karte vollständig, kein Durchscrollen */
.card--cover { display: block; text-decoration: none; }
.card--cover .site__shot img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transform: none;
  transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}
.card--cover:hover .site__shot img { transform: scale(1.05); }
@media (hover: none) { .card--cover .site__shot img { animation: none; } }

/* ---------- Fotostrecken: drei Bilder als loser Stapel ------- */

.card--stapel { display: flex; flex-direction: column; text-decoration: none; }
.card--stapel .eyebrow span:first-child { color: var(--text); font-weight: 600; font-size: 13.5px; }

.stapel { position: relative; flex: 1; min-height: 0; }
.stapel img {
  position: absolute;
  width: 58%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
  transition: transform .55s cubic-bezier(.22, .61, .36, 1);
}
.stapel img:nth-child(1) { left: 0;   top: 9%;    transform: rotate(-6deg); }
.stapel img:nth-child(2) { right: 0;  top: 2%;    transform: rotate(5deg); }
.stapel img:nth-child(3) { left: 19%; bottom: 3%; width: 63%; z-index: 2; transform: rotate(-1.5deg); }

.card--stapel:hover .stapel img:nth-child(1),
.card--stapel:focus-visible .stapel img:nth-child(1) { transform: rotate(-9deg) translate(-6px, -7px); }
.card--stapel:hover .stapel img:nth-child(2),
.card--stapel:focus-visible .stapel img:nth-child(2) { transform: rotate(8deg) translate(6px, -7px); }
.card--stapel:hover .stapel img:nth-child(3),
.card--stapel:focus-visible .stapel img:nth-child(3) { transform: rotate(-1.5deg) translateY(7px) scale(1.03); }

@media (prefers-reduced-motion: reduce) { .stapel img { transition: none; } }

/* ---------- Karussell-Pfeile -------------------------------- */

.carousel__nav {
  position: absolute; top: 50%; z-index: 25;
  width: 36px; height: 36px; margin-top: -18px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; transition: opacity .25s ease, background .2s, transform .2s;
}
.carousel__nav svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.carousel__nav--prev { left: 14px; }
.carousel__nav--next { right: 14px; }
.carousel:hover .carousel__nav,
.carousel:focus-within .carousel__nav { opacity: 1; }
.carousel__nav:hover { background: rgba(0,0,0,.75); transform: scale(1.08); }

/* Auf Touchgeräten dauerhaft sichtbar */
@media (hover: none) { .carousel__nav { opacity: 1; } }

/* ---------- Responsive -------------------------------------- */

@media (max-width: 680px) {
  body { padding: 12px 12px 140px; }
  :root { --gap: 12px; --pad: 16px; }
  h1 { font-size: 20px; }
  /* Entwicklerhilfe soll auf dem Handy nichts verdecken */
  .ph-toggle:hover, .ph-toggle:focus { opacity: 1; }
}

/* ============================================================
   Topbar — erscheint beim Scrollen
   links Profil, mittig Filter, rechts Thema + Lebenslauf
   ============================================================ */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 700;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform .34s cubic-bezier(.22,.61,.36,1), opacity .28s ease;
}
.topbar.is-visible { transform: none; opacity: 1; pointer-events: auto; }

.topbar__inner {
  height: 100%; max-width: 1400px; margin: 0 auto;
  padding: 0 var(--pad);
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 16px;
}

/* links: Profilbild + Name */
.topbar__id {
  display: flex; align-items: center; gap: 10px;
  min-width: 0; background: none; border: 0; padding: 0;
  color: var(--text); cursor: pointer; font: inherit;
}
.topbar__id img {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto;
}
.topbar__id span {
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar__id:hover span { opacity: .75; }

/* mittig: Filter */
.topbar__filter {
  display: flex; gap: 6px; justify-self: center;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.topbar__filter::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 7px 13px; border-radius: 999px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  background: var(--fill-1); color: var(--muted);
  border: 1px solid transparent; cursor: pointer;
  white-space: nowrap; text-decoration: none;
  transition: background .2s, color .2s;
}
.chip:hover { color: var(--text); background: var(--fill-2); }
.chip.is-active { background: var(--text); color: var(--bg); }

/* rechts: Thema + Lebenslauf */
.topbar__actions {
  display: flex; align-items: center; gap: 8px; justify-self: end;
}
.icon-round {
  width: 34px; height: 34px; padding: 0; flex: 0 0 auto;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--fill-1); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s, transform .25s;
}
.icon-round:hover { background: var(--fill-2); transform: rotate(18deg); }
.icon-round svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-round .i-moon { display: none; }
:root[data-theme="light"] .icon-round .i-sun  { display: none; }
:root[data-theme="light"] .icon-round .i-moon { display: block; }

.chip--solid {
  background: var(--accent); color: #fff; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip--solid:hover { background: var(--accent); filter: brightness(1.12); color: #fff; }
.chip--solid svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }

/* gefilterte Karten */
.card.is-hidden { display: none; }
.grid.is-ready .card {
  transition: transform .45s cubic-bezier(.22,.61,.36,1), opacity .3s ease;
}

@media (max-width: 900px) {
  .topbar__inner { grid-template-columns: auto 1fr auto; gap: 10px; }
  .topbar__filter { justify-self: start; }
  .topbar__id span { display: none; }
}
@media (max-width: 560px) {
  .chip--solid span { display: none; }
  .chip--solid { padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar { transition: none; }
  .grid.is-ready .card { transition: none; }
}

/* ---------- Unschärfe-Verlauf am unteren Rand ---------------
   Vier gestapelte Ebenen mit wachsender Unschärfe und jeweils
   kürzerer Maske: unten am stärksten, nach oben sauber auslaufend.
   ------------------------------------------------------------ */

.scroll-blur {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 190px; z-index: 400; pointer-events: none;
}
.scroll-blur span {
  position: absolute; inset: 0;
  backdrop-filter: blur(var(--b));
  -webkit-backdrop-filter: blur(var(--b));
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent var(--to));
          mask-image: linear-gradient(to top, #000 0%, transparent var(--to));
}

@media (max-width: 680px) { .scroll-blur { height: 130px; } }

/* ---------- Impressum / Datenschutz -------------------------- */

body.textseite { padding: var(--pad) var(--pad) 90px; }

.textblatt {
  max-width: 720px; margin: 0 auto;
  padding: 40px 44px 48px;
  font-size: 13.5px; line-height: 1.65;
}
.textblatt h1 { font-size: 26px; margin: 18px 0 26px; }
.textblatt h2 {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
  margin: 26px 0 8px;
}
.textblatt p { color: var(--text-soft); }
.textblatt .adresse { line-height: 1.8; }
.textblatt a { color: var(--text); text-decoration: underline;
  text-decoration-color: var(--hair); text-underline-offset: 3px; }
.textblatt a:hover { text-decoration-color: var(--text); }

.zurueck {
  display: inline-block; font-size: 12.5px; color: var(--muted) !important;
  text-decoration: none !important;
}
.zurueck:hover { color: var(--text) !important; }

.textblatt .hinweis {
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--fill-1); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}

@media (max-width: 680px) { .textblatt { padding: 28px 22px 34px; } }
