/* ══════════════════════════════════════════════════════════════════
   TOKENS
   ══════════════════════════════════════════════════════════════════ */
:root {
  --background: #020202;
  --foreground: #e4e4e4;
  --card: #040404;
  --muted: #121212;
  /* Kontrast auf #020202 bzw. #040404 (Section-Card) gerechnet.
     Das alte #717171 lag bei 4,25:1 und riss damit AA (4,5) knapp -
     genau wie die halbtransparenten Abstufungen davon, die bis auf
     2,15:1 runtergingen. Zwei feste Stufen statt sechs Alpha-Werte:
     die Hierarchie ist flacher, dafuer ist alles lesbar. */
  --muted-foreground: #7d7d7d;   /* 4,98:1 - erste Stufe   */
  --muted-2: #787878;            /* 4,64:1 - leisere Stufe */
  --border: #161616;
  --ring: #484848;
  --focus: #e4e4e4;              /* Fokusring, klar sichtbar auf dunkel */
  --radius: 0.25rem;

  --shell: 64rem;      /* max-w-5xl */
  --shell-sm: 56rem;   /* max-w-4xl */

  --font-sans: ui-sans-serif, "Geist", "Inter", system-ui, -apple-system,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Geist Mono", "SFMono-Regular", "JetBrains Mono",
               Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3 { margin: 0; font-weight: 300; letter-spacing: -0.02em; }
p  { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

/* ── Fokus ────────────────────────────────────────────────────────
   Vorher hatte KEIN einziges Element einen sichtbaren Fokus - mit
   text-decoration: none auf Links war fuer Tastaturnutzer damit gar
   nicht erkennbar, wo sie gerade stehen. :focus-visible statt :focus,
   damit Mausklicks weiter ohne Ring bleiben.
   :where() haelt die Spezifitaet bei 0, so gewinnt jede spaetere
   Komponentenregel - der Ring selbst kommt trotzdem durch. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* Sprungziele (nur <main>) bekommen keinen Ring - eine Umrandung um
   den halben Viewport hilft niemandem, der Sprung ist die Rueckmeldung. */
[tabindex="-1"]:focus-visible { outline: none; }

.skip-link {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 200;
  padding: 0.65rem 1rem;
  background: var(--muted);
  color: var(--foreground);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  /* Aus dem Bild geschoben statt display:none - so bleibt er in der
     Tab-Reihenfolge und taucht beim ersten Tab auf. */
  transform: translateY(-250%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

::selection { background: rgba(228, 228, 228, 0.16); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: #1e1e1e; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #2c2c2c; }

/* ══════════════════════════════════════════════════════════════════
   LAYOUT PRIMITIVES
   ══════════════════════════════════════════════════════════════════ */
.shell    { width: 100%; max-width: var(--shell);    margin-inline: auto; }
.shell-sm { width: 100%; max-width: var(--shell-sm); margin-inline: auto; }

.section { padding: 8rem 1.5rem; }
.section-card { background: var(--card); }

.section-label {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.section-label.small { margin-bottom: 1.5rem; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 3rem;
}

.meta { font-size: 0.75rem; color: var(--muted-foreground); }

.inline-link {
  color: var(--foreground);
  border-bottom: 1px solid rgba(228, 228, 228, 0.25);
  transition: border-color 0.25s;
}
.inline-link:hover { border-color: var(--foreground); }

/* ══════════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 1.5rem;
  transition: background 0.5s var(--ease), backdrop-filter 0.5s, padding 0.4s var(--ease),
              border-color 0.5s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  padding-block: 0.9rem;
  background: rgba(2, 2, 2, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(22, 22, 22, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: opacity 0.25s;
}
.brand:hover { opacity: 0.7; }

.nav-desktop { display: none; gap: 2rem; }

.nav-link {
  position: relative;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--muted-foreground);
  transition: color 0.25s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover { color: var(--foreground); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.header-right { display: flex; align-items: center; gap: 0.75rem; }

.kbd-btn {
  display: none;
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
}
.kbd {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(11, 11, 11, 0.6);
  transition: color 0.25s, border-color 0.25s;
}
.kbd-btn:hover .kbd { color: var(--foreground); border-color: var(--ring); }

.status-pill {
  display: none;
  align-items: center; gap: 0.45rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #3ecf8e;
  box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.5);
  animation: pulse 2.4s infinite;
}
.status-pill.offline .status-dot { background: var(--muted-foreground); animation: none; box-shadow: none; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(62, 207, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); }
}

.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--muted-foreground);
  transition: color 0.25s;
}
.menu-btn:hover { color: var(--foreground); }
.menu-btn svg { width: 1.15rem; height: 1.15rem; }

.nav-mobile {
  display: grid;
  gap: 0.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease), opacity 0.3s;
  opacity: 0;
}
.nav-mobile.open { max-height: 16rem; opacity: 1; padding-top: 1.25rem; }
.nav-mobile .nav-link { padding: 0.6rem 0; }

/* ══════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 1.5rem;
}

.hero-spot {
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at var(--mouse-x, 50%) var(--mouse-y, 50%),
    transparent 0%,
    rgba(0, 0, 0, 0.4) 70%
  );
  transition: background 0.2s linear;
}

.noise {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-content { position: relative; z-index: 10; text-align: center; }

.eyebrow {
  font-size: 0.625rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.hero-title {
  font-size: clamp(3rem, 11vw, 7rem);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.hero-tagline {
  max-width: 32rem;
  margin: 0 auto 3rem;
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

.hero-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  font-size: 0.625rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.scroll-cue {
  position: absolute;
  bottom: 3rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  font-size: 0.5625rem;
  letter-spacing: 0.3em;
  color: var(--muted-foreground);
  transition: color 0.25s;
}
.scroll-cue:hover { color: var(--foreground); }
.scroll-line {
  position: relative;
  width: 1px; height: 3rem;
  background: rgba(113, 113, 113, 0.25);
  overflow: hidden;
}
.scroll-line i {
  position: absolute; left: 0; top: -50%;
  width: 1px; height: 50%;
  background: var(--foreground);
  animation: scrolldown 2.2s var(--ease) infinite;
}
@keyframes scrolldown {
  0%   { top: -50%; }
  100% { top: 100%; }
}

/* ══════════════════════════════════════════════════════════════════
   FEATURED (sticky cross-fade)
   ══════════════════════════════════════════════════════════════════ */
.featured-track { position: relative; height: 200vh; }

.featured-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  padding: 3rem 1.5rem;
}

.featured-progress { display: none; align-items: center; gap: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); }
.fp-label { opacity: 0.4; transition: opacity 0.3s; }
.fp-label.is-active { opacity: 1; }
.fp-bar {
  position: relative;
  width: 2.5rem; height: 3px;
  border-radius: 99px;
  background: rgba(22, 22, 22, 1);
  overflow: hidden;
}
.fp-bar i {
  position: absolute; inset: 0 auto 0 0;
  width: 0%;
  background: rgba(228, 228, 228, 0.45);
  border-radius: 99px;
  transition: width 0.12s linear;
}

.featured-stack { position: relative; min-height: 400px; }

.feature-card {
  display: block;
  position: relative;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(22, 22, 22, 0.9);
  border-radius: var(--radius);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.3s, background 0.3s;
}
.feature-card:hover { border-color: rgba(228, 228, 228, 0.25); }

/* Grosse Nummer im Hintergrund der Spotlight-Karte - greift die
   Nummerierung der Projektliste weiter unten auf. */
.feature-num {
  position: absolute;
  top: 1rem; right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 4.5rem;
  font-weight: 300;
  line-height: 1;
  color: rgba(113, 113, 113, 0.1);
  user-select: none;
  pointer-events: none;
}

.repo-path {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-row .js-updated,
.meta-row .js-stars { white-space: nowrap; }
.meta-row [hidden] { display: none; }

.feature-body { position: relative; z-index: 10; }

.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; }

.tag-solid {
  padding: 0.25rem 0.75rem;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(228, 228, 228, 0.1);
  color: var(--foreground);
  border-radius: 2px;
}
.tag-outline {
  padding: 0.25rem 0.75rem;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  border-radius: 2px;
}

.feature-title {
  font-size: clamp(1.35rem, 3.6vw, 2.25rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.feature-text {
  max-width: 42rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}

.feature-foot {
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 1rem;
}

.author { display: flex; align-items: center; gap: 1rem; }
.avatar {
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c1c1c, #0a0a0a);
  border: 1px solid var(--border);
  flex: none;
}
.author-name { font-size: 0.875rem; font-weight: 500; }
.author-role { font-size: 0.75rem; color: var(--muted-foreground); }

.cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.3s, gap 0.3s;
}
.cta svg { width: 1rem; height: 1rem; }
.feature-card:hover .cta { color: var(--foreground); gap: 0.85rem; }

/* ══════════════════════════════════════════════════════════════════
   PROJECTS
   ══════════════════════════════════════════════════════════════════ */
.project-list { border-top: 1px solid rgba(22, 22, 22, 0.9); }

.project { border-bottom: 1px solid rgba(22, 22, 22, 0.9); }

.project > a {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 0.75rem;
  transition: background 0.35s var(--ease), padding-inline 0.35s var(--ease);
}
.project > a:hover { background: rgba(18, 18, 18, 0.55); padding-inline: 1.25rem; }

.p-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-2);
  transition: color 0.3s;
}
.project > a:hover .p-num { color: var(--foreground); }

.p-title {
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: transform 0.35s var(--ease);
}
.project > a:hover .p-title { transform: translateX(2px); }

.p-desc {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  max-width: 34rem;
}

.p-meta { display: flex; align-items: center; gap: 1.25rem; }
.p-tag {
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.p-stars {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-2);
}

.p-arrow {
  width: 1rem; height: 1rem;
  color: var(--muted-foreground);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.project > a:hover .p-arrow { opacity: 1; transform: none; }

.work-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
}

.ghost-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--foreground);
  transition: gap 0.3s, opacity 0.25s;
}
.ghost-link svg { width: 0.9rem; height: 0.9rem; }
.ghost-link:hover { gap: 0.85rem; }
.ghost-link.muted { color: var(--muted-foreground); }
.ghost-link.muted:hover { color: var(--foreground); }
.ghost-link.pgp { margin-top: 3rem; font-size: 0.75rem; }

/* ══════════════════════════════════════════════════════════════════
   ABOUT
   ══════════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  gap: 3rem;
  margin: 2.5rem 0 4rem;
}

.about-copy { display: grid; gap: 1.25rem; max-width: 40rem; }
.about-copy p { color: var(--muted-foreground); font-size: 0.9375rem; }
.about-copy .lead { color: var(--foreground); font-size: 1.0625rem; }

.facts dl { display: grid; gap: 1.25rem; }
.facts dt {
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}
.facts dd { font-size: 0.9375rem; }

.knowledge { margin-bottom: 4rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li {
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(11, 11, 11, 0.5);
  transition: color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.chips li:hover { color: var(--foreground); border-color: var(--ring); transform: translateY(-1px); }

.funfact {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--muted-foreground);
}

.timeline { position: relative; padding-left: 0; }
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 5.5rem 1.5rem 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0;
}
.tl-year {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.tl-dot {
  position: relative;
  justify-self: center;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2a2a2a;
  transition: background 0.3s, box-shadow 0.3s;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(5.5rem + 0.75rem - 0.5px + 0.25rem);
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(22, 22, 22, 1);
  z-index: -1;
}
.timeline li:hover .tl-dot { background: var(--foreground); box-shadow: 0 0 0 4px rgba(228, 228, 228, 0.08); }
.tl-text { font-size: 0.9375rem; color: var(--muted-foreground); transition: color 0.25s; }
.timeline li:hover .tl-text { color: var(--foreground); }

/* ══════════════════════════════════════════════════════════════════
   CONTACT
   ══════════════════════════════════════════════════════════════════ */
.contact-head {
  margin: 2rem 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 28rem;
  line-height: 1.15;
}
.contact-sub { font-size: 0.8125rem; color: var(--muted-foreground); margin-bottom: 3rem; }

.contact-grid { display: grid; gap: 1px; background: rgba(22, 22, 22, 0.9); border: 1px solid rgba(22, 22, 22, 0.9); }

.contact-card {
  position: relative;
  display: block;
  padding: 2rem 1.5rem;
  background: var(--background);
  transition: background 0.35s var(--ease);
}
.contact-card:hover { background: rgba(18, 18, 18, 0.6); }
.cc-title { display: block; font-size: 1rem; margin-bottom: 0.35rem; }
.cc-desc  { display: block; font-size: 0.8125rem; color: var(--muted-foreground); }
.contact-card svg {
  position: absolute;
  top: 2rem; right: 1.5rem;
  width: 1rem; height: 1rem;
  color: var(--muted-foreground);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.contact-card:hover svg { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════════════════════════
   LIVE-KARTEN (Discord-Presence + GitHub-Profil)
   ══════════════════════════════════════════════════════════════════ */
.live-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.live-grid:empty { display: none; }

.live-card {
  display: block;
  /* Grid-Items haben min-width: auto, koennen also breiter werden als
     ihre Spalte. Ein langer Songtitel oder Custom-Status hat die Karte
     sonst aufgeblasen und die ganze Seite quer scrollen lassen. */
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid rgba(22, 22, 22, 0.9);
  border-radius: var(--radius);
  background: rgba(11, 11, 11, 0.35);
  transition: border-color 0.3s, background 0.3s;
}
.live-card[hidden] { display: none; }
a.live-card:hover { border-color: rgba(228, 228, 228, 0.25); background: rgba(18, 18, 18, 0.6); }

.live-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.live-label {
  font-size: 0.625rem;
  letter-spacing: 0.25em;
  color: var(--muted-foreground);
}
.live-meta {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
}

.live-body { display: flex; align-items: center; gap: 1rem; }

.dc-avatar, .gh-avatar { position: relative; flex: none; }
.dc-avatar img, .gh-avatar img {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--muted);
  object-fit: cover;
  display: block;
}
.gh-avatar img { border-radius: var(--radius); }

.dc-dot {
  position: absolute;
  right: -1px; bottom: -1px;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 3px solid var(--background);
  background: var(--muted-foreground);
}
.dc-dot.online  { background: #3ecf8e; }
.dc-dot.idle    { background: #f0b232; }
.dc-dot.dnd     { background: #f23f43; }
.dc-dot.offline { background: #80848e; }

.dc-info { min-width: 0; }
.dc-name {
  font-size: 0.9375rem;
  margin-bottom: 0.15rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dc-activity {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- Spotify-Track in der Discord-Karte ------------------------- */
.dc-track {
  display: flex; align-items: center; gap: 0.75rem;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid rgba(22, 22, 22, 0.9);
}
.dc-track[hidden] { display: none; }

.dc-cover {
  width: 40px; height: 40px;
  border-radius: 6px;
  background: var(--muted);
  object-fit: cover;
  flex: none;
  display: block;
}
.dc-cover[hidden] { display: none; }

/* min-width: 0 laesst das Flex-Kind ueberhaupt erst schrumpfen -
   ohne das greift text-overflow: ellipsis unten nicht. */
.dc-track-info { min-width: 0; flex: 1; }

.dc-song {
  font-size: 0.8125rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dc-artist {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.4rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dc-progress { display: flex; align-items: center; gap: 0.6rem; }
.dc-progress[hidden] { display: none; }

.dc-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(113, 113, 113, 0.25);
  overflow: hidden;
}
.dc-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: #3ecf8e;
  /* linear ueber genau die eine Sekunde bis zum naechsten Tick,
     sonst wirkt der Balken ruckelig statt fliessend. */
  transition: width 1s linear;
}
.dc-times {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .dc-bar i { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════
   MEMBERS ONLINE
   ══════════════════════════════════════════════════════════════════ */
.members { margin-top: 3rem; }
.members[hidden] { display: none; }
.members-head { margin-bottom: 1.25rem; align-items: baseline; }

.member-count {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: var(--foreground);
}

.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 15rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.member-list li {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.28rem 0.6rem 0.28rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: rgba(11, 11, 11, 0.5);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  max-width: 14rem;
  transition: color 0.2s, border-color 0.2s;
}
.member-list li:hover { color: var(--foreground); border-color: var(--ring); }
.member-list img {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.member-list .m-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.member-list .m-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--muted-foreground);
}
.member-list .m-dot.online { background: #3ecf8e; }
.member-list .m-dot.idle   { background: #f0b232; }
.member-list .m-dot.dnd    { background: #f23f43; }

.member-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted-2);
}
.member-note[hidden] { display: none; }

/* Sterne aus der GitHub-API bekommen ein kleines Icon davor */
.p-stars.has-stars::before {
  content: "★";
  margin-right: 0.3rem;
  color: var(--muted-2);
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER + TO TOP
   ══════════════════════════════════════════════════════════════════ */
.site-footer { padding: 2rem 1.5rem; border-top: 1px solid rgba(22, 22, 22, 0.6); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.foot-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-2);
  transition: color 0.25s;
}
.foot-link:hover { color: var(--muted-foreground); }

/* Footer-Status: gruen pulsierend ist der Default aus .status-dot.
   Die beiden Zustaende hier setzen die Animation bewusst aus - ein
   pulsierender Punkt neben "Degraded" liest sich wie ein Widerspruch. */
.foot-link.status.degraded .status-dot {
  background: #f0b232;
  animation: none;
  box-shadow: none;
}
.foot-link.status.down .status-dot {
  background: #f23f43;
  animation: none;
  box-shadow: none;
}

.to-top {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  z-index: 50;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem;
  color: var(--muted-foreground);
  background: rgba(2, 2, 2, 0.8);
  border: 1px solid rgba(22, 22, 22, 0.9);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s var(--ease), color 0.25s, border-color 0.25s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: var(--foreground); border-color: var(--ring); }
.to-top svg { width: 1rem; height: 1rem; }

/* ══════════════════════════════════════════════════════════════════
   COMMAND PALETTE
   ══════════════════════════════════════════════════════════════════ */
.palette { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; }
.palette[hidden] { display: none; }
.palette-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fade 0.2s ease;
}
.palette-box {
  position: relative;
  width: min(38rem, calc(100vw - 2rem));
  margin-top: 12vh;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: pop 0.22s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }

.palette-input {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}
.palette-input svg { width: 1rem; height: 1rem; color: var(--muted-foreground); flex: none; }
.palette-input input {
  flex: 1;
  /* Kein outline: none mehr - das Feld ist das einzige fokussierbare
     Element im Dialog, ein Ring darf hier ruhig sichtbar sein. */
  background: none; border: 0;
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.9375rem;
}
.palette-input input::placeholder { color: var(--muted-foreground); }

.palette-results { max-height: 22rem; overflow-y: auto; padding: 0.4rem; }
.palette-results li { }
.palette-results .group {
  padding: 0.6rem 0.75rem 0.35rem;
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.palette-results .item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.palette-results .item .hint { font-size: 0.6875rem; color: var(--muted-2); }
.palette-results .item[aria-selected="true"] { background: rgba(18, 18, 18, 1); color: var(--foreground); }
.palette-results .empty { padding: 1.5rem 0.75rem; text-align: center; font-size: 0.8125rem; color: var(--muted-foreground); }

/* ══════════════════════════════════════════════════════════════════
   REVEAL ON SCROLL
   ══════════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .feature-card { padding: 3rem; }
  .feature-foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  /* minmax(0, 1fr) statt 1fr - siehe min-width-Kommentar bei .live-card. */
  .live-grid    { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .section { padding-inline: 2rem; }
  .site-header { padding-inline: 2rem; }
  .nav-desktop { display: flex; }
  .kbd-btn { display: inline-flex; }
  .status-pill { display: inline-flex; }
  .menu-btn { display: none; }
  .nav-mobile { display: none; }
  .featured-progress { display: flex; }
  .featured-sticky { padding-block: 0; }
  .about-grid { grid-template-columns: 1.6fr 1fr; gap: 4rem; }
  .facts dl { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .project > a { grid-template-columns: 2rem 1fr; }
  .p-meta { grid-column: 2; }
  .p-arrow { display: none; }
  .timeline li { grid-template-columns: 4.5rem 1rem 1fr; }
  .timeline li::before { left: calc(4.5rem + 0.5rem); }
}

/* Der 200vh-Sticky-Trick braucht viel Scrollweg und die Cards werden auf
   schmalen Screens hoch — dort stapeln wir sie lieber untereinander.
   Die JS-Logik erkennt das an `position !== sticky` und hält sich raus. */
@media (max-width: 767px) {
  .featured-track { height: auto; }
  .featured-sticky { position: static; height: auto; padding: 6rem 1.5rem; }
  .featured-stack { min-height: 0; display: grid; gap: 1.5rem; }
  .feature-card { position: static !important; opacity: 1 !important; transform: none !important; }
}

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