/* ==========================================================================
   Web-Port — Designsystem
   Dunkel & technisch. Anker ist das ursprüngliche Footer-Blau #0d1117.
   Aufbau: Tokens → Reset → Layout → Komponenten → Breakpoints
   ========================================================================== */

:root {
  /* Flächen */
  --bg:            #0d1117;
  --bg-elevated:   #161b22;
  --bg-inset:      #010409;
  --border:        #30363d;
  --border-muted:  #21262d;

  /* Text */
  --text:          #e6edf3;
  --text-muted:    #8b949e;
  --text-faint:    #6e7681;

  /* Akzente */
  --accent:        #58a6ff;
  --accent-hover:  #79c0ff;
  --accent-dim:    rgba(88, 166, 255, 0.12);

  /* Projektarten — Farbcode zieht sich durch Karten, Filter und Detailseite */
  --kind-beruflich:         #58a6ff;
  --kind-semiprofessionell: #d2a8ff;
  --kind-hobby:             #7ee787;

  /* Typografie */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Maße */
  --measure:      1100px;
  --measure-text: 68ch;
  --radius:       10px;
  --radius-sm:    6px;

  --ease: cubic-bezier(0.2, 0, 0.2, 1);
}

/* ========== Reset ========== */

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 600; }

code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Tastatur-Sprungmarke — nur bei Fokus sichtbar */
.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--bg-inset);
  padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; }

/* ========== Layout ========== */

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }

main { flex: 1 0 auto; padding: 3.5rem 0 5rem; }

.prose { max-width: var(--measure-text); }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2em; }

.lead { font-size: 1.15rem; color: var(--text-muted); max-width: var(--measure-text); }

.section { margin-top: 4rem; }
.section > h2 { display: flex; align-items: baseline; gap: 0.75rem; }
.section > h2::after { content: ""; flex: 1; height: 1px; background: var(--border-muted); }

/* ========== Header / Navigation ========== */

.site-header {
  border-bottom: 1px solid var(--border-muted);
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-top: 1rem; padding-bottom: 1rem;
}

.site-logo a {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
  color: var(--text); text-decoration: none; letter-spacing: -0.02em;
}
.site-logo a::before { content: "> "; color: var(--accent); }
.site-logo a:hover { color: var(--accent); text-decoration: none; }

.site-nav { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.site-nav a {
  color: var(--text-muted); text-decoration: none;
  padding: 0.4rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--bg-elevated); text-decoration: none; }
.site-nav a.is-active { color: var(--text); background: var(--accent-dim); }

/* ========== Hero (Startseite) ========== */

.hero { padding: 2rem 0 1rem; }
.hero h1 { margin-bottom: 0.3em; }
.hero-kicker {
  font-family: var(--font-mono); color: var(--accent);
  font-size: 0.9rem; letter-spacing: 0.04em; margin-bottom: 1rem;
}

/* ========== Projektkarten ========== */

.card-grid {
  display: grid; gap: 1.25rem; margin-top: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
  display: flex; flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover { border-color: var(--border); transform: translateY(-2px); }

.card-media { aspect-ratio: 16 / 9; background: var(--bg-inset); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }

.card-title { margin: 0 0 0.4rem; font-size: 1.1rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); text-decoration: none; }

.card-summary { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 1rem; flex: 1; }

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint);
}

/* ========== Meta: Art-Badge, Tags ========== */

.kind {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.2rem 0.5rem; border-radius: 999px;
  border: 1px solid currentColor; white-space: nowrap;
}
.kind--beruflich         { color: var(--kind-beruflich); }
.kind--semiprofessionell { color: var(--kind-semiprofessionell); }
.kind--hobby             { color: var(--kind-hobby); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; list-style: none; }
.tags li {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted);
  background: var(--bg-inset); border: 1px solid var(--border-muted);
  padding: 0.15rem 0.5rem; border-radius: var(--radius-sm);
}

/* ========== Projekt-Detailseite ========== */

.project-head {
  border-bottom: 1px solid var(--border-muted);
  padding-bottom: 1.75rem; margin-bottom: 2rem;
}

.project-meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem;
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted);
  margin: 1rem 0 0;
}
.project-meta > div { display: flex; align-items: baseline; gap: 0.4rem; }
.project-meta dt { color: var(--text-faint); }
.project-meta dd { margin: 0; color: var(--text); }

.backlink { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); }
.backlink::before { content: "← "; }
.backlink:hover { color: var(--accent); }

/* ========== Filterleiste ========== */

.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.5rem 0 0; }
.filter {
  font-family: var(--font-mono); font-size: 0.82rem;
  background: var(--bg-elevated); color: var(--text-muted);
  border: 1px solid var(--border-muted); border-radius: 999px;
  padding: 0.3rem 0.85rem; cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--border); }
.filter[aria-pressed="true"] {
  color: var(--bg-inset); background: var(--accent); border-color: var(--accent);
}

/* ========== Lebenslauf-Timeline ========== */

.timeline {
  list-style: none; margin: 2rem 0 0; padding: 0 0 0 1.5rem;
  border-left: 1px solid var(--border);
}

.timeline > li { position: relative; padding-bottom: 2rem; }
.timeline > li::before {
  content: ""; position: absolute; left: calc(-1.5rem - 4px); top: 0.55rem;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}

.tl-when {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-faint);
  display: block; margin-bottom: 0.15rem;
}
.tl-what  { font-weight: 600; color: var(--text); }
.tl-where { color: var(--text-muted); }
.timeline p { margin: 0.4rem 0 0; color: var(--text-muted); }

/* ========== Skill-Gruppen ========== */

.skills {
  display: grid; gap: 1.25rem; margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.skill-group {
  background: var(--bg-elevated); border: 1px solid var(--border-muted);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
}
.skill-group h3 {
  font-family: var(--font-mono); font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 0.75rem;
}

/* ========== Footer ========== */

.site-footer {
  background-color: var(--bg-inset);
  border-top: 1px solid var(--border-muted);
  color: var(--text-muted);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  flex-shrink: 0;
}

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

.footer-content a { color: var(--text-muted); text-decoration: none; }
.footer-content a:hover { color: var(--text); text-decoration: underline; }

.footer-left   { font-family: var(--font-mono); font-size: 0.85rem; }
.footer-center { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-right  { display: flex; gap: 0.85rem; align-items: center; }

.footer-right a { display: inline-flex; }
.footer-right svg { width: 20px; height: 20px; fill: currentColor; transition: transform 0.2s var(--ease); }
.footer-right a:hover svg { transform: scale(1.12); }

/* ========== Hilfsklassen ========== */

.is-hidden { display: none !important; }

.empty-note {
  color: var(--text-faint); font-family: var(--font-mono); font-size: 0.9rem;
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; margin-top: 2rem;
}

/* ========== Breakpoints ========== */

@media (max-width: 768px) {
  main { padding: 2.5rem 0 3.5rem; }

  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .site-nav { gap: 0.15rem; margin-left: -0.75rem; }

  .footer-content { flex-direction: column; text-align: center; }
  .footer-right  { order: 1; }
  .footer-left   { order: 2; }
  .footer-center { order: 3; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover { transform: none; }
}
