/* ---------- Farben & Schriften ----------
   Alle Farben stehen hier oben. Für einen anderen Lila-Ton
   ändere --accent und --accent-strong. */
:root {
  --paper: #0e0a18;          /* Hintergrund: fast schwarzes Aubergine */
  --surface: #171127;        /* Kacheln */
  --surface-2: #1f1734;
  --ink: #f2edfb;            /* Text */
  --muted: #a89dc2;          /* Nebentext */
  --line: #2b2242;           /* Linien */
  --accent: #a46bff;         /* sattes Lila */
  --accent-strong: #7c3aed;  /* dunkleres Lila für Flächen */
  --accent-soft: rgba(164, 107, 255, .14);
  --glow: rgba(124, 58, 237, .45);
  --grid: rgba(164, 107, 255, .09);

  /* Systemschriften: schnell und datenschutzfreundlich (keine Google Fonts) */
  --sans: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  --wide: 70rem;
  --narrow: 40rem;
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-strong); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }

.wrap { width: min(var(--wide), 100% - 3rem); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -3rem; background: var(--accent); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { top: 1rem; }

/* Link mit wachsender Unterstreichung */
.link {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .35s var(--ease), color .2s; padding-bottom: 1px;
}
.link:hover, .link:focus-visible { background-size: 100% 1px; }
.text-link { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font: inherit; font-size: .975rem; font-weight: 500;
  padding: .8rem 1.4rem; border-radius: 99px; border: 1px solid var(--line);
  background: transparent; color: var(--ink);
  transition: background .25s var(--ease), border-color .25s, box-shadow .3s, transform .2s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: #8b4cf5; box-shadow: 0 0 0 6px var(--accent-soft), 0 10px 40px -10px var(--glow); }

/* ---------- Kopfzeile ---------- */
.site-header { padding: 1.5rem 0; position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: .6rem 2rem; flex-wrap: wrap; }
.brand { font-weight: 700; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: .55rem; }
.home-icon { width: 1.15rem; height: 1.15rem; flex: none; color: var(--accent); filter: drop-shadow(0 0 6px var(--glow)); transition: transform .3s var(--ease); }
.brand:hover .home-icon { transform: translateY(-2px); }.nav { display: flex; gap: .4rem 1.75rem; flex-wrap: wrap; font-size: .975rem; }
@media (max-width: 30rem) { .nav { gap: .4rem 1.1rem; font-size: .95rem; } }
.nav a { color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background-size: 100% 1px; }

/* ---------- Startseite: Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 10vh, 7rem) 0 clamp(4rem, 12vh, 7rem); isolation: isolate; }
/* feines Raster im Hintergrund */
.hero::before {
  content: ""; position: absolute; inset: -6rem 0 0; z-index: -2;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 30%, transparent 75%);
}
/* lila Leuchten */
.hero::after {
  content: ""; position: absolute; z-index: -1; width: min(60rem, 120vw); aspect-ratio: 1;
  left: 50%; top: -18rem; transform: translateX(-50%);
  background: radial-gradient(circle, var(--glow), transparent 62%);
  opacity: 0; animation: glow 2.4s var(--ease) .1s forwards;
}
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 52rem) { .hero-grid { grid-template-columns: 1fr 22rem; } }

.hero-role {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .925rem; color: var(--accent);
  border: 1px solid var(--line); background: var(--accent-soft);
  padding: .3rem .85rem; border-radius: 99px;
  opacity: 0; animation: fade .8s var(--ease) .05s forwards;
}
.hero-hello { display: block; font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 400; color: var(--muted); margin: 1.75rem 0 .5rem; letter-spacing: -0.01em; }
.hero-name { display: block; font-size: clamp(3rem, 9.5vw, 7.5rem); font-weight: 700; letter-spacing: -0.05em; line-height: .95; }
.hero-name .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero-name .line > span { display: block; transform: translateY(105%); animation: rise 1.1s var(--ease) .15s forwards; }
.hero-name .line:nth-child(2) > span { animation-delay: .27s; }
.hero-name .line:nth-child(3) > span { animation-delay: .39s; }
.hero-name .line:nth-child(4) > span { animation-delay: .51s; }

.hero-sub { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 36ch; margin: 1.75rem 0 0; opacity: 0; animation: fade .9s var(--ease) .65s forwards; }
.hero-actions { display: flex; gap: .75rem; margin-top: 2.25rem; flex-wrap: wrap; align-items: center; opacity: 0; animation: fade .9s var(--ease) .8s forwards; }
.socials { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 2rem; font-size: .925rem; color: var(--muted); opacity: 0; animation: fade .9s var(--ease) .95s forwards; }
.socials a:hover { color: var(--ink); }

.hero-photo {
  width: 100%; max-width: 18rem; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(160deg, var(--surface-2), var(--accent-strong));
  box-shadow: 0 30px 80px -30px var(--glow);
  opacity: 0; animation: fade 1s var(--ease) .5s forwards;
}
@media (max-width: 52rem) { .hero .hero-photo { max-width: 12rem; } }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .monogram { width: 100%; height: 100%; display: grid; place-items: center; font-size: 5rem; font-weight: 300; letter-spacing: -0.05em; color: #fff; }
.hero-photo figcaption { display: none; }

/* Leichte Animationen rund ums Foto auf der Startseite */
@property --hv-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.hero-visual {
  position: relative; width: 100%; max-width: 22rem; justify-self: center; isolation: isolate;
  opacity: 0; animation: fade 1s var(--ease) .5s forwards;
}
@media (max-width: 52rem) { .hero-visual { max-width: 15rem; justify-self: start; } }
.hero-visual .hero-photo, .hero .hero-visual .hero-photo { position: relative; max-width: none; opacity: 1; animation: float 7s ease-in-out infinite; }
.hero-visual > span { position: absolute; pointer-events: none; }
/* atmendes Leuchten dahinter */
.hv-glow {
  inset: 10% -15%; z-index: -2; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 65%); filter: blur(20px);
  animation: breathe 6s ease-in-out infinite;
}
/* versetzter Rahmen, der leicht schwebt */
.hv-frame {
  inset: 0; z-index: -1; border-radius: 28px; border: 1px solid rgba(164, 107, 255, .35);
  animation: drift 9s ease-in-out infinite;
}
/* Lichtkante, die um das Foto wandert */
.hv-border {
  inset: -2px; z-index: 0; border-radius: 30px;
  background: conic-gradient(from var(--hv-angle), transparent 0 60%, #d4b8ff 80%, transparent 100%);
  filter: drop-shadow(0 0 8px var(--accent));
  animation: spin 6s linear infinite, float 7s ease-in-out infinite;
}
/* kleine schwebende Punkte */
.hv-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: bob 5s ease-in-out infinite; }
.hv-dot-1 { top: 8%; left: -1.25rem; }
.hv-dot-2 { bottom: 14%; right: -1.5rem; width: .35rem; height: .35rem; animation-delay: -1.8s; animation-duration: 6s; }
.hv-dot-3 { top: -1rem; right: 22%; width: .25rem; height: .25rem; opacity: .7; animation-delay: -3.2s; animation-duration: 7s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes drift { 0%, 100% { transform: translate(18px, 18px) rotate(3deg); } 50% { transform: translate(22px, 10px) rotate(4.5deg); } }
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .9; transform: scale(1.08); } }
@keyframes spin { to { --hv-angle: 360deg; } }
@keyframes bob { 0%, 100% { transform: translate(0, 0); opacity: .9; } 50% { transform: translate(4px, -12px); opacity: .4; } }

@keyframes rise { to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes glow { to { opacity: .9; } }

/* ---------- Abschnitte ---------- */
.section { padding: 4rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.section-head h2, .section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.03em; }

.split { display: grid; gap: 1.5rem 4rem; }
@media (min-width: 48rem) { .split { grid-template-columns: 12rem 1fr; } }

.page-head { padding: clamp(3rem, 9vh, 5.5rem) 0 2.5rem; position: relative; }
.page-head h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 700; letter-spacing: -0.045em; }
.page-head p { color: var(--muted); max-width: 46ch; margin: 1.25rem 0 0; font-size: 1.15rem; }

.lead { font-size: 1.25rem; line-height: 1.6; max-width: 40ch; margin: 0; }

/* ---------- Kacheln (Kurzprofil) ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem); position: relative; overflow: hidden;
  transition: border-color .3s;
}
.card:hover { border-color: #3a2e58; }
.card h3 { font-size: 1.15rem; margin-bottom: .75rem; }
.card-label { font-size: .925rem; color: var(--muted); margin: 0 0 .75rem; }

.bento { display: grid; gap: 1rem; }
@media (min-width: 52rem) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; }
}
.card-glow::after {
  content: ""; position: absolute; right: -30%; bottom: -60%; width: 80%; aspect-ratio: 1;
  background: radial-gradient(circle, var(--glow), transparent 65%); opacity: .55; pointer-events: none;
}

.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem clamp(2rem, 8vw, 6rem); text-align: center; }
.stat-value { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .925rem; margin-top: .3rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.chips li { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: .35rem .9rem; font-size: .95rem; }

/* ---------- Fließtext (Über mich, Beiträge) ---------- */
.prose { font-family: var(--serif); font-size: 1.15rem; line-height: 1.75; max-width: var(--narrow); }
.prose > * + * { margin-top: 1.25em; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin-bottom: 0; }
.prose h2, .prose h3, .prose h4 { font-family: var(--sans); margin-top: 2em; }
.prose h2 { font-size: 1.5rem; } .prose h3 { font-size: 1.2rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose blockquote { border-left: 2px solid var(--accent); padding-left: 1.25rem; margin-left: 0; color: var(--muted); }
.prose img { border-radius: 12px; margin-block: 2rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--accent); }
.prose code { font-size: .9em; background: var(--accent-soft); padding: .1em .35em; border-radius: 4px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5rem; }

/* ---------- Über mich ---------- */
.about-intro { display: grid; gap: 2.5rem; align-items: end; }
@media (min-width: 48rem) { .about-intro { grid-template-columns: 1fr 18rem; } }
.about-intro .hero-photo { animation: none; opacity: 1; }

.facts { margin: 0; display: grid; gap: 1.1rem; align-content: start; }
.facts div { display: grid; gap: .1rem; }
.facts dt { font-size: .875rem; color: var(--muted); }
.facts dd { margin: 0; }

.interests { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .interests { grid-template-columns: 1fr 1fr; } }
.interests p { margin: 0; color: var(--muted); }
.interests h3::before { content: ""; display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); margin-right: .6rem; vertical-align: .15em; }

.contact-line { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 500; letter-spacing: -0.02em; word-break: break-word; }

/* ---------- Werdegang (Zeitstrahl) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; top: .55rem; bottom: 3.5rem; left: .3rem; width: 1px;
  background: linear-gradient(var(--accent), var(--line) 40%);
}
.station { position: relative; padding: 0 0 3rem 2rem; display: grid; gap: .35rem 3rem; }
.station::before {
  content: ""; position: absolute; left: 0; top: .45rem; width: .65rem; height: .65rem; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--accent);
}
.station:first-child::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), 0 0 18px var(--accent); }
@media (min-width: 48rem) { .station { grid-template-columns: 10rem 1fr; } }
.station-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.station h2 { font-size: 1.35rem; }
.station-place { color: var(--accent); margin: .2rem 0 0; }
.station-desc { margin: .75rem 0 0; max-width: 52ch; color: var(--muted); }
.tag {
  display: inline-block; font-size: .8rem; color: var(--accent); background: var(--accent-soft);
  border-radius: 99px; padding: .1rem .65rem; margin-left: .5rem; vertical-align: .2em; font-weight: 500; letter-spacing: 0;
}

/* ---------- Filter ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.filter {
  font: inherit; font-size: .925rem; cursor: pointer; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px; padding: .4rem 1rem;
  transition: background .25s var(--ease), color .25s, border-color .25s;
}
.filter:hover { color: var(--ink); border-color: var(--accent); }
.filter[aria-pressed="true"] { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }

/* ---------- Blogliste ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { border-top: 1px solid var(--line); }
.post-row:last-child { border-bottom: 1px solid var(--line); }
.post-row a { display: grid; gap: .25rem 2rem; padding: 1.6rem 0; }
@media (min-width: 48rem) { .post-row a { grid-template-columns: 12rem 1fr; } }
.post-meta { color: var(--muted); font-size: .925rem; display: flex; gap: .75rem; flex-wrap: wrap; }
@media (min-width: 48rem) { .post-meta { flex-direction: column; gap: .1rem; } }
.post-cat { color: var(--accent); }
.post-meta.post-meta-inline { flex-direction: row; gap: 1rem; margin-top: 1rem; }
.post-row h3 { font-size: 1.3rem; transition: color .2s; }
.post-row p { margin: .35rem 0 0; color: var(--muted); max-width: 60ch; }
.post-row a:hover h3 { color: var(--accent); }
.post-row.is-hidden { display: none; }

/* ---------- Portfolio ---------- */
.grid { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .grid { grid-template-columns: 1fr 1fr; } }
.work { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .75rem 1.5rem; transition: border-color .3s; }
.work:hover { border-color: #3a2e58; }
.work.is-hidden { display: none; }
.work-media { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: linear-gradient(150deg, var(--surface-2), #3b1d78); }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work:hover .work-media img { transform: scale(1.03); }
.work-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #d9c6ff; font-size: .925rem; }
.work h2 { font-size: 1.2rem; margin: 1.1rem .75rem 0; }
.work p { margin: .35rem .75rem 0; color: var(--muted); }

/* ---------- Einzelner Beitrag ---------- */
.article-head { padding: clamp(3rem, 9vh, 5rem) 0 2.5rem; max-width: var(--narrow); }
.article-head h1 { font-size: clamp(2.2rem, 5.5vw, 3.5rem); font-weight: 700; letter-spacing: -0.035em; margin-top: 1rem; }
.article-cover { border-radius: var(--radius); margin-bottom: 3rem; max-height: 70vh; width: 100%; object-fit: cover; }
.back { color: var(--muted); font-size: .95rem; }

/* ---------- Abschluss: Lass uns reden ---------- */
.cta { text-align: center; padding: clamp(3rem, 8vw, 5rem) 1.5rem; }
.cta h2 { font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -0.045em; }
.cta p { color: var(--muted); max-width: 44ch; margin: 1rem auto 2rem; font-size: 1.1rem; }
.cta .hero-actions { justify-content: center; opacity: 1; animation: none; margin-top: 0; }
.cta.card-glow::after { right: 10%; bottom: -90%; width: 80%; }

/* ---------- Fußzeile ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; margin-top: 5rem; color: var(--muted); font-size: .925rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Leise Einblendung beim Scrollen ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease), border-color .3s; }
.reveal.is-visible { opacity: 1; transform: none; }

.notice { color: var(--muted); padding: 2rem 0; }

/* Wer weniger Bewegung möchte, bekommt keine Animationen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .hero-name .line > span, .hero-sub, .hero-actions, .hero-role, .socials, .hero-photo, .hero-visual, .reveal { transform: none; opacity: 1; }
  .hero::after { opacity: .9; }
}
