/* ══════════════════════════════════════════════════════════════════
   christophlueck.de – Stylesheet
   Farben als Tokens, helles & dunkles Schema, Animationen respektieren
   prefers-reduced-motion.
   ══════════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg:        #f6f5f1;
  --bg-soft:   #eceae3;
  --surface:   rgba(255, 255, 255, .72);
  --surface-2: #ffffff;
  --border:    rgba(20, 24, 38, .10);
  --text:      #161a26;
  --muted:     #5a6272;
  --accent:    #c98a00;
  --accent-ink:#1b1400;
  --accent-2:  #e8590c;
  --accent-3:  #d6336c;
  --grad:      linear-gradient(115deg, #ffc400 0%, #ff8a1f 45%, #f0457a 100%);
  --grad-soft: linear-gradient(115deg, rgba(255,196,0,.18), rgba(240,69,122,.14));
  --shadow:    0 1px 2px rgba(20,24,38,.06), 0 12px 32px -12px rgba(20,24,38,.18);
  --shadow-lg: 0 2px 4px rgba(20,24,38,.06), 0 28px 60px -20px rgba(20,24,38,.28);
  --blob-a:    rgba(255, 196, 0, .35);
  --blob-b:    rgba(240, 69, 122, .22);
  --blob-c:    rgba(99, 102, 241, .18);
  --ok:        #2f9e44;
  --err:       #e03131;

  --radius:    18px;
  --radius-sm: 10px;
  --ease:      cubic-bezier(.22, 1, .36, 1);
  --font:      ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:      ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0b0e17;
    --bg-soft:   #121726;
    --surface:   rgba(255, 255, 255, .045);
    --surface-2: #151b2b;
    --border:    rgba(255, 255, 255, .09);
    --text:      #e9ecf3;
    --muted:     #9aa3b6;
    --accent:    #ffc53d;
    --accent-ink:#1b1400;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 30px 70px -24px rgba(0,0,0,.75);
    --blob-a:    rgba(255, 176, 0, .20);
    --blob-b:    rgba(240, 69, 122, .16);
    --blob-c:    rgba(99, 102, 241, .20);
    --ok:        #51cf66;
    --err:       #ff6b6b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:        #0b0e17;
  --bg-soft:   #121726;
  --surface:   rgba(255, 255, 255, .045);
  --surface-2: #151b2b;
  --border:    rgba(255, 255, 255, .09);
  --text:      #e9ecf3;
  --muted:     #9aa3b6;
  --accent:    #ffc53d;
  --accent-ink:#1b1400;
  --shadow:    0 1px 2px rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 30px 70px -24px rgba(0,0,0,.75);
  --blob-a:    rgba(255, 176, 0, .20);
  --blob-b:    rgba(240, 69, 122, .16);
  --blob-c:    rgba(99, 102, 241, .20);
  --ok:        #51cf66;
  --err:       #ff6b6b;
  color-scheme: dark;
}

/* ── Basis ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* ── Animierter Hintergrund ─────────────────────────────────────── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  opacity: .55;
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.b1 { width: 520px; height: 520px; background: var(--blob-a); top: -160px; left: -120px; animation: float1 22s ease-in-out infinite alternate; }
.b2 { width: 460px; height: 460px; background: var(--blob-b); top: 20%; right: -160px; animation: float2 26s ease-in-out infinite alternate; }
.b3 { width: 400px; height: 400px; background: var(--blob-c); bottom: -180px; left: 30%; animation: float3 30s ease-in-out infinite alternate; }
@keyframes float1 { to { transform: translate(120px, 80px) scale(1.15); } }
@keyframes float2 { to { transform: translate(-140px, 120px) scale(.9); } }
@keyframes float3 { to { transform: translate(80px, -120px) scale(1.1); } }

/* Scroll-Fortschritt */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}

/* ── Header / Navigation ────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .4s;
  view-transition-name: site-header;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; gap: 16px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--grad); color: #1b1400; font-weight: 850; font-size: .95rem;
  box-shadow: 0 6px 18px -6px rgba(255, 138, 31, .7);
  transition: transform .5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 4px; position: relative; }
.nav-links a {
  position: relative; display: block; padding: 8px 14px; border-radius: 999px;
  text-decoration: none; font-size: .95rem; font-weight: 550; color: var(--muted);
  transition: color .25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.nav-links a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-actions { display: flex; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; transition: transform .2s, background-color .3s;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; }

/* Theme-Toggle: Sonne <-> Mond */
.theme-toggle .sun, .theme-toggle .moon { transition: transform .6s var(--ease), opacity .4s; transform-origin: center; }
.theme-toggle .moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 0; transform: rotate(90deg) scale(.4); }
:root[data-theme="dark"] .theme-toggle .moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { opacity: 0; transform: rotate(90deg) scale(.4); }
  :root:not([data-theme="light"]) .theme-toggle .moon { opacity: 1; transform: none; }
}

/* Hamburger */
.menu-toggle { display: none; }
.menu-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease), opacity .25s; }
.menu-toggle { gap: 4px; grid-auto-flow: row; align-content: center; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .brand-name { display: none; }
  .menu-toggle { display: grid; }
  .nav-actions { margin-left: auto; }
  .nav-links {
    position: fixed; inset: 70px 0 auto 0; margin: 0; padding: 12px 16px 20px;
    flex-direction: column; gap: 4px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    clip-path: inset(0 0 100% 0); opacity: 0; visibility: hidden;
    transition: clip-path .45s var(--ease), opacity .3s, visibility 0s .45s;
  }
  .menu-open .nav-links { clip-path: inset(0 0 0 0); opacity: 1; visibility: visible; transition: clip-path .45s var(--ease), opacity .3s; }
  .nav-links a { padding: 14px 16px; font-size: 1.05rem; border-radius: 12px; }
  .nav-links a::after { display: none; }
  .nav-links li { opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .4s var(--ease); }
  .menu-open .nav-links li { opacity: 1; transform: none; }
  .menu-open .nav-links li:nth-child(2) { transition-delay: .04s; }
  .menu-open .nav-links li:nth-child(3) { transition-delay: .08s; }
  .menu-open .nav-links li:nth-child(4) { transition-delay: .12s; }
  .menu-open .nav-links li:nth-child(5) { transition-delay: .16s; }
}

/* ── Seitenwechsel ──────────────────────────────────────────────── */
@view-transition { navigation: auto; }
main { flex: 1; view-transition-name: page; }
::view-transition-old(page) { animation: .28s var(--ease) both page-out; }
::view-transition-new(page) { animation: .5s var(--ease) both page-in; }
@keyframes page-out { to { opacity: 0; transform: translateY(-14px) scale(.99); filter: blur(4px); } }
@keyframes page-in  { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } }
/* Fallback ohne View-Transitions (per JS gesetzt) */
.no-vt main { animation: .5s var(--ease) both page-in; }
.no-vt body.leaving main { animation: .26s var(--ease) both page-out; }

/* ── Sektionen ──────────────────────────────────────────────────── */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-sm { padding: clamp(32px, 5vw, 56px) 0; }
.page-head { padding: clamp(48px, 9vw, 110px) 0 clamp(16px, 3vw, 32px); }
.page-head p { max-width: 62ch; font-size: 1.15rem; color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 650;
  background: var(--grad-soft); border: 1px solid var(--border);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(255,160,0,.18); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255,160,0,0); } }
.section-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 28px; }
.section-title .num { font: 700 .9rem var(--mono); color: var(--accent); }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  --b: var(--surface);
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--b); color: var(--text); font: 650 1rem var(--font);
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .3s;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--grad); color: #1b1400; border-color: transparent; box-shadow: 0 10px 30px -12px rgba(255,138,31,.8); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Karten ─────────────────────────────────────────────────────── */
.card {
  position: relative; border-radius: var(--radius); padding: 26px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.card.interactive::before {   /* Spotlight folgt der Maus */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,170,30,.14), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.card.interactive:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.card.interactive:hover::before { opacity: 1; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.icon-badge {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 16px;
  background: var(--grad-soft); border: 1px solid var(--border); color: var(--accent);
  transition: transform .5s var(--ease);
}
.icon-badge svg { width: 24px; height: 24px; }
.card.interactive:hover .icon-badge { transform: rotate(-6deg) scale(1.08); }
.link-card { text-decoration: none; display: block; }
.link-card .arrow { position: absolute; top: 26px; right: 26px; opacity: .4; transition: transform .35s var(--ease), opacity .3s; }
.link-card:hover .arrow { opacity: 1; transform: translate(3px, -3px); }
.link-card p { color: var(--muted); margin: 0; }

/* ── Hero (Startseite) ──────────────────────────────────────────── */
.hero { padding: clamp(56px, 10vw, 120px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 { margin-bottom: .3em; }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 54ch; margin-bottom: 28px; }
.typer { display: block; min-height: 1.2em; font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 650; margin-bottom: 20px; }
.typer .caret { display: inline-block; width: 3px; height: 1em; margin-left: 3px; vertical-align: -.12em; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.portrait { position: relative; justify-self: center; width: min(320px, 78vw); aspect-ratio: 1; }
.portrait::before {    /* rotierender Farbring */
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(from var(--a, 0deg), #ffc400, #ff8a1f, #f0457a, #6366f1, #ffc400);
  animation: spin 8s linear infinite;
}
.portrait::after { content: ""; position: absolute; inset: -40px; border-radius: 50%; background: var(--grad); filter: blur(60px); opacity: .28; z-index: -1; }
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --a: 360deg; } }
.portrait img {
  position: relative; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  border-radius: 50%; border: 6px solid var(--bg);
}
.portrait .chip {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  font-size: .88rem; font-weight: 650; white-space: nowrap; animation: bob 5s ease-in-out infinite;
}
.portrait .chip b { color: var(--accent); }
.portrait .c1 { top: 8%; left: -18%; }
.portrait .c2 { bottom: 10%; right: -14%; animation-delay: -2.5s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat { text-align: left; }
.stat .value { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat .label { color: var(--muted); font-size: .92rem; margin-top: 6px; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { order: -1; width: min(220px, 60vw); }
  .portrait .c1 { left: -30%; }
  .portrait .c2 { right: -26%; }
}

/* ── Zeitleiste ─────────────────────────────────────────────────── */
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 34px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent-3));
  transform-origin: top; transform: scaleY(var(--tl, 1));
}
.js .timeline::before { --tl: 0; transition: transform 1.4s var(--ease); }
.js .timeline.in-view::before { --tl: 1; }
.timeline > li { position: relative; margin-bottom: 18px; }
.timeline > li::before {
  content: ""; position: absolute; left: -31px; top: 28px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 5px var(--bg);
  transition: transform .4s var(--ease), background-color .3s;
}
.timeline > li:hover::before { transform: scale(1.3); background: var(--accent); }
.when { display: inline-block; font: 650 .82rem var(--mono); color: var(--accent); margin-bottom: 6px; letter-spacing: .02em; }
.timeline h3 { margin-bottom: 6px; }
.timeline p { color: var(--muted); margin: 0; }
.grade {
  display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; vertical-align: 2px;
  font-size: .78rem; font-weight: 700; background: var(--grad-soft); border: 1px solid var(--border); color: var(--text);
}

/* ── Skills ─────────────────────────────────────────────────────── */
.skills { display: grid; gap: 16px; }
.skill-head { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 7px; font-size: .97rem; }
.skill-head span:last-child { color: var(--muted); font-weight: 500; font-size: .88rem; }
.bar { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: var(--grad); }
.js .bar i { width: 0; transition: width 1.3s var(--ease); }
.js .in-view .bar i { width: var(--v); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

/* ── Tags / Chips ───────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tag {
  padding: 5px 12px; border-radius: 999px; font-size: .84rem; font-weight: 550;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  transition: transform .25s var(--ease), border-color .25s;
}
.tag:hover { transform: translateY(-2px); border-color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; align-items: center; }
.filter {
  position: relative; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font: 600 .95rem var(--font); transition: color .25s, border-color .25s, transform .2s;
}
.filter:hover { color: var(--text); transform: translateY(-1px); }
.filter[aria-pressed="true"] { color: #1b1400; background: var(--grad); border-color: transparent; box-shadow: 0 8px 22px -10px rgba(255,138,31,.8); }
.filter .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 6px; padding: 0 6px; border-radius: 99px; font-size: .75rem; background: rgba(0,0,0,.08); }
.search {
  margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 42px; min-width: 240px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  transition: border-color .25s, box-shadow .25s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.search input { flex: 1; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: .95rem; }
.search svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 640px) { .search { margin-left: 0; width: 100%; min-width: 0; } }

/* ── Projekte ───────────────────────────────────────────────────── */
.projects { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.project { display: flex; flex-direction: column; gap: 14px; }
.project.hide { display: none; }
.project.pop { animation: pop .5s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.project-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kind { font: 700 .75rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.project h3 { margin: 0; }
.project p { color: var(--muted); margin: 0; font-size: .98rem; }
.project .tags { margin-top: auto; padding-top: 4px; }
.project .tag { font-size: .78rem; padding: 3px 10px; }
.download {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; text-decoration: none;
  background: var(--bg-soft); border: 1px dashed var(--border); font-weight: 600; font-size: .92rem;
  transition: border-color .25s, background-color .25s;
}
.download:hover { border-color: var(--accent); border-style: solid; }
.download svg { width: 20px; height: 20px; color: var(--accent); transition: transform .35s var(--ease); }
.download:hover svg { transform: translateY(2px); }
.download small { margin-left: auto; color: var(--muted); font-weight: 500; white-space: nowrap; }
.empty { display: none; text-align: center; padding: 48px 0; color: var(--muted); }
.empty.show { display: block; animation: pop .4s var(--ease); }

/* ── Fließtext (Privates, Impressum) ────────────────────────────── */
.prose { max-width: 72ch; }
.prose p { color: var(--muted); }
.prose p strong, .prose h3 { color: var(--text); }
.prose h3 { margin-top: 1.8em; }
.story { display: grid; gap: 20px; }
.story .card { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: start; }
.story .year { font: 800 1.8rem/1 var(--font); letter-spacing: -.03em; }
.story p { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .story .card { grid-template-columns: 1fr; gap: 8px; } }

/* ── Formular ───────────────────────────────────────────────────── */
.form { display: grid; gap: 18px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; padding: 24px 16px 10px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 1rem; resize: vertical;
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { min-height: 160px; }
.field label {
  position: absolute; left: 17px; top: 17px; color: var(--muted); pointer-events: none;
  transform-origin: left top; transition: transform .25s var(--ease), color .25s;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.field input:focus + label, .field textarea:focus + label,
.field input:not(:placeholder-shown) + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.78); color: var(--accent); }
.field.invalid input, .field.invalid textarea { border-color: var(--err); animation: shake .4s; }
.field .error { display: block; min-height: 0; font-size: .85rem; color: var(--err); margin-top: 6px; }
.field .error:empty { display: none; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }
.btn .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rot .7s linear infinite; }
.btn.loading .spinner { display: block; }
.btn.loading .label-send { opacity: .7; }
@keyframes rot { to { transform: rotate(360deg); } }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.social { display: grid; gap: 12px; }
.social a { display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-decoration: none; }
.social .icon-badge { margin: 0; width: 44px; height: 44px; }
.social strong { display: block; }
.social span { color: var(--muted); font-size: .9rem; }
.result { text-align: center; padding: 48px 26px; }
.result .icon-badge { margin: 0 auto 18px; width: 64px; height: 64px; }
.result.ok .icon-badge { color: var(--ok); }
.result.err .icon-badge { color: var(--err); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; display: flex; align-items: center; gap: 12px;
  max-width: calc(100% - 32px); padding: 14px 20px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transform: translate(-50%, 140%); opacity: 0; transition: transform .5s var(--ease), opacity .4s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.toast.err .dot { background: var(--err); }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 40px; font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner a { color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-inner a:hover { color: var(--accent); }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease);
  box-shadow: var(--shadow);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ── Scroll-Reveal ──────────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in-view { opacity: 1; transform: none; }

/* ── Bewegung reduzieren ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
