:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --nav-bg: rgba(245, 245, 247, 0.72);
  --shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 2px 4px 16px rgba(0, 0, 0, 0.16);
  --radius: 18px;
  --gutter: max(22px, calc((100vw - 1260px) / 2));
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: #38383a;
    --accent: #2997ff;
    --accent-hover: #47a6ff;
    --nav-bg: rgba(22, 22, 23, 0.72);
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.14);
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: #38383a;
  --accent: #2997ff;
  --accent-hover: #47a6ff;
  --nav-bg: rgba(22, 22, 23, 0.72);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ Navigation */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  height: 48px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { color: var(--text); font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand:hover { text-decoration: none; opacity: .75; }
.nav-links { display: flex; gap: 26px; flex-shrink: 0; }
.nav-links a { color: var(--text); opacity: .8; font-size: 12px; letter-spacing: -0.01em; }
.nav-links a:hover { opacity: 1; text-decoration: none; }

/* ------------------------------------------------------------ Hero */
.hero {
  padding: 64px var(--gutter) 40px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap;
}
.headline {
  margin: 0; max-width: 760px;
  font-size: clamp(36px, 6vw, 56px); line-height: 1.07; font-weight: 600; letter-spacing: -0.015em;
}
.headline span { color: var(--muted); }
.hero-aside { display: flex; flex-direction: column; gap: 6px; font-size: 14px; max-width: 280px; padding-bottom: 6px; }
.hero-aside strong { font-weight: 600; font-size: 14px; }
.hero-aside a { font-size: 14px; }

/* ------------------------------------------------------------ Kategorien */
.chips {
  display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none;
  padding: 8px var(--gutter) 28px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; background: none; border: 0; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--text); min-width: 88px;
}
.chip-img {
  width: 78px; height: 78px; border-radius: 50%; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
  display: grid; place-items: center;
}
.chip-img img { width: 100%; height: 100%; object-fit: cover; }
.chip-img svg { width: 30px; height: 30px; stroke: var(--text); fill: none; stroke-width: 1.6; }
.chip:hover .chip-img { transform: scale(1.05); }
.chip.active .chip-img { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.chip.active { color: var(--accent); }

/* ------------------------------------------------------------ Regale (Shelves) */
.section { padding: 28px 0 12px; }
.section-title {
  margin: 0 0 4px; padding: 0 var(--gutter);
  font-size: clamp(24px, 3.2vw, 28px); line-height: 1.14; font-weight: 600; letter-spacing: .007em;
}
.section-title span { color: var(--muted); }
.shelf-wrap { position: relative; }
.shelf {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 24px var(--gutter) 40px; scroll-padding: 0 var(--gutter); scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(210, 210, 215, .64); color: rgba(0,0,0,.56);
  display: grid; place-items: center; opacity: 0; transition: opacity .3s, background .2s; z-index: 2;
}
.shelf-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.shelf-btn:hover { background: rgba(223, 223, 227, .9); }
.shelf-btn.prev { left: 12px; } .shelf-btn.next { right: 12px; }
.shelf-wrap:hover .shelf-btn:not([disabled]) { opacity: 1; }
.shelf-btn[disabled] { opacity: 0 !important; pointer-events: none; }

/* große Karte */
.card {
  position: relative; flex: 0 0 auto; scroll-snap-align: start;
  width: min(400px, 82vw); height: min(500px, 102vw);
  border-radius: var(--radius); overflow: hidden; background: #111;
  box-shadow: var(--shadow); color: #fff;
  transition: transform .4s cubic-bezier(0,0,.5,1), box-shadow .4s cubic-bezier(0,0,.5,1);
}
.card:hover { transform: scale(1.012); box-shadow: var(--shadow-hover); text-decoration: none; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 38%, rgba(0,0,0,0) 70%, rgba(0,0,0,.35) 100%);
}
.card-text { position: absolute; z-index: 1; top: 0; left: 0; right: 0; padding: 28px 30px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; opacity: .85; }
.card h3 { margin: 6px 0 6px; font-size: 28px; line-height: 1.14; font-weight: 600; }
.card p { margin: 0; font-size: 17px; opacity: .9; }
.card-foot { position: absolute; z-index: 1; left: 30px; right: 30px; bottom: 24px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.lock-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px;
  background: rgba(255,255,255,.2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 12px; font-weight: 600;
}
.lock-pill svg { width: 12px; height: 12px; fill: currentColor; }

/* ------------------------------------------------------------ Raster aller Galerien */
.grid {
  display: grid; gap: 20px; padding: 24px var(--gutter) 40px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.tile {
  background: var(--surface); border-radius: var(--radius); overflow: hidden; color: var(--text);
  box-shadow: var(--shadow); transition: transform .4s cubic-bezier(0,0,.5,1), box-shadow .4s;
  display: flex; flex-direction: column;
}
.tile:hover { transform: scale(1.012); box-shadow: var(--shadow-hover); text-decoration: none; }
.tile-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); position: relative; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; }
.tile-img .lock-pill { position: absolute; top: 14px; right: 14px; color: #fff; background: rgba(0,0,0,.35); }
.tile-body { padding: 20px 22px 22px; }
.tile-body .eyebrow { color: var(--muted); opacity: 1; }
.tile-body h3 { margin: 4px 0 4px; font-size: 21px; line-height: 1.2; font-weight: 600; }
.tile-body p { margin: 0; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------ Über mich / Kontakt */
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; padding: 24px var(--gutter) 64px; }
.info {
  background: var(--surface); border-radius: var(--radius); padding: 36px 34px; box-shadow: var(--shadow);
}
.info h3 { margin: 0 0 10px; font-size: 28px; line-height: 1.14; font-weight: 600; }
.info p { margin: 0 0 14px; color: var(--muted); }
.info .links { display: flex; flex-direction: column; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 0; border-radius: 980px; cursor: pointer;
  padding: 11px 22px; font-size: 17px; font-weight: 400; transition: background .2s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.btn.secondary:hover { background: var(--accent); color: #fff; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ------------------------------------------------------------ Galerie-Ansicht */
.g-head { padding: 52px var(--gutter) 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; margin-bottom: 18px; }
.back svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.g-head h1 { margin: 0; font-size: clamp(36px, 6vw, 56px); line-height: 1.07; font-weight: 600; letter-spacing: -0.015em; }
.g-head .sub { margin: 10px 0 0; font-size: clamp(19px, 2.4vw, 24px); color: var(--muted); line-height: 1.25; }
.g-meta { color: var(--muted); font-size: 14px; margin-top: 14px; }
.g-desc { padding: 0 var(--gutter) 24px; max-width: calc(720px + 2 * var(--gutter)); color: var(--muted); }

.justified { padding: 8px var(--gutter) 80px; display: flex; flex-wrap: wrap; gap: 8px; }
.ph {
  position: relative; overflow: hidden; border-radius: 12px; background: var(--line); cursor: zoom-in;
  border: 0; padding: 0;
}
.ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s, transform .6s cubic-bezier(.2,.8,.2,1); }
.ph img.loaded { opacity: 1; }
.ph:hover img { transform: scale(1.03); }
.ph:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Passwortschutz */
.lock-screen { min-height: calc(100vh - 220px); display: grid; place-items: center; padding: 40px var(--gutter); }
.lock-card {
  width: 100%; max-width: 440px; text-align: center; background: var(--surface); border-radius: 28px;
  box-shadow: var(--shadow); overflow: hidden;
}
.lock-cover { height: 200px; position: relative; background: #111; }
.lock-cover img { width: 100%; height: 100%; object-fit: cover; filter: blur(18px) saturate(1.2); transform: scale(1.2); opacity: .9; }
.lock-icon {
  position: absolute; left: 50%; bottom: -32px; transform: translateX(-50%);
  width: 64px; height: 64px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow);
}
.lock-icon svg { width: 26px; height: 26px; fill: var(--text); }
.lock-body { padding: 52px 34px 34px; }
.lock-body h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.14; font-weight: 600; }
.lock-body p { margin: 0 0 24px; color: var(--muted); font-size: 15px; }
.field { position: relative; margin-bottom: 14px; }
.field input {
  width: 100%; height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font: inherit; padding: 18px 52px 0 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field label { position: absolute; left: 17px; top: 17px; color: var(--muted); pointer-events: none; transition: all .15s; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,125,250,.2); }
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: 8px; font-size: 12px; }
.field button {
  position: absolute; right: 10px; top: 12px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--muted);
  background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted);
}
.field button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.field input:not(:placeholder-shown) ~ button { border-color: var(--text); color: var(--text); }
.lock-body .error { color: #e30000; font-size: 14px; min-height: 20px; margin: 0; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ------------------------------------------------------------ Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.97); color: #fff;
  display: grid; grid-template-columns: 72px 1fr 72px; grid-template-rows: 64px 1fr 24px;
  animation: fade .25s ease;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 0 16px 0 24px; }
.lb-count { font-size: 14px; color: rgba(255,255,255,.7); }
.lb-actions { display: flex; gap: 8px; }
.lb-btn, .lb-nav {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.1); display: grid; place-items: center; transition: background .2s;
}
.lb-btn:hover, .lb-nav:hover { background: rgba(255,255,255,.22); text-decoration: none; }
.lb-btn svg, .lb-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-nav { align-self: center; justify-self: center; }
.lb-stage { display: grid; place-items: center; min-width: 0; min-height: 0; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .25s; border-radius: 4px; }
.lb-stage img.loading { opacity: .25; }

/* ------------------------------------------------------------ Footer & Zustände */
.footer { border-top: 1px solid var(--line); }
.footer-inner { padding: 20px var(--gutter) 28px; font-size: 12px; color: var(--muted); }
.footer-inner p { margin: 0 0 6px; }
.empty { padding: 80px var(--gutter); text-align: center; color: var(--muted); }
.empty h2 { color: var(--text); font-size: 28px; margin: 0 0 8px; font-weight: 600; }
.skeleton { background: linear-gradient(90deg, var(--line) 0%, var(--surface) 50%, var(--line) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 734px) {
  .nav-links { gap: 18px; }
  .hero { padding-top: 40px; }
  .hero-aside { display: none; }
  .lightbox { grid-template-columns: 0 1fr 0; }
  .lb-nav { display: none; }
  .card-text { padding: 24px; }
  .card-foot { left: 24px; right: 24px; }
  .justified { gap: 4px; }
  .ph { border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

.cover-ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #2c2c2e, #111); }
.cover-ph svg { width: 44px; height: 44px; fill: rgba(255,255,255,.55); }
.tile-img .cover-ph { position: static; width: 100%; height: 100%; }
.lock-cover { background: linear-gradient(135deg, #2c2c2e, #111); }

.legal { padding: 56px var(--gutter) 80px; max-width: calc(860px + 2 * var(--gutter)); }
.legal h1 { margin: 0 0 24px; font-size: clamp(32px, 5vw, 48px); line-height: 1.1; font-weight: 600; }
.legal .text { white-space: pre-wrap; color: var(--muted); font-size: 16px; line-height: 1.6; }
.footer-links { display: flex; gap: 18px; margin-top: 10px; }
.footer-links a { color: var(--muted); }
