/* Layout: Terminal-Doku im Stil des Lebenslaufs – Navy-Grund, Mono-Prompts als Überschriften-Zeile,
   Kupfer als einziger Akzent (Leiterbahn), Grün nur als Status „ok". Dark-first, Light als Alternative. */
:root {
  --bg: #0f1a2b;
  --bg-2: #16263d;            /* Navy aus dem Lebenslauf */
  --surface: #182a44;
  --surface-2: #1e3352;
  --fg: #e6edf5;
  --muted: #9aabc2;
  --faint: #6f829c;
  --line: #28406a;
  --accent: #f0a15e;          /* Kupfer */
  --accent-ink: #1a1206;
  --accent-soft: #3a2a1c;
  --prompt: #7fd1a8;          /* Terminal-Prompt */
  --ok: #6fd39c;  --ok-bg: #12301f;
  --bad: #ff8f86; --bad-bg: #3a1a1c;
  --code-bg: #0a1220; --code-fg: #dbe6f3;
  --shadow: 0 1px 0 #ffffff08 inset, 0 10px 30px -18px #000000cc;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --radius: 10px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f6fa; --bg-2: #16263d; --surface: #ffffff; --surface-2: #eef2f8; --fg: #13213a; --muted: #52627a; --faint: #7a889d;
    --line: #d7dfeb; --accent: #b6621f; --accent-ink: #ffffff; --accent-soft: #f7e7d9; --prompt: #1f7a52;
    --ok: #237a4b; --ok-bg: #e5f4eb; --bad: #b3372e; --bad-bg: #fbeae8; --code-bg: #0f1a2b; --code-fg: #dbe6f3;
    --shadow: 0 10px 30px -22px #13213a55; color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f6fa; --bg-2: #16263d; --surface: #ffffff; --surface-2: #eef2f8; --fg: #13213a; --muted: #52627a; --faint: #7a889d;
  --line: #d7dfeb; --accent: #b6621f; --accent-ink: #ffffff; --accent-soft: #f7e7d9; --prompt: #1f7a52;
  --ok: #237a4b; --ok-bg: #e5f4eb; --bad: #b3372e; --bad-bg: #fbeae8; --code-bg: #0f1a2b; --code-fg: #dbe6f3;
  --shadow: 0 10px 30px -22px #13213a55; color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.65 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }
.mono { font-family: var(--font-mono); }

/* ---------- Kopfzeile ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand b { font-family: var(--font-display); font-size: 17px; letter-spacing: .01em; }
.brand span { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.topnav { display: flex; gap: 4px; font-size: 14px; flex-wrap: wrap; }
.topnav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.topnav a:hover { color: var(--fg); background: var(--surface); }
.topnav a[aria-current="page"] { color: var(--fg); background: var(--surface); }

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; padding-block: 40px 80px; }
.crumbs { font-family: var(--font-mono); font-size: 13px; color: var(--faint); margin-bottom: 22px; overflow-wrap: anywhere; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .p { color: var(--prompt); }

/* ---------- Startseite ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; margin-bottom: 56px; }
@media (max-width: 880px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.prompt-line { font-family: var(--font-mono); font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.prompt-line .u { color: var(--prompt); }
.prompt-line .cursor { display: inline-block; width: 8px; height: 1.05em; background: var(--accent); vertical-align: -2px; margin-left: 3px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .prompt-line .cursor { animation: none; } }
.hero h1 { font-family: var(--font-display); font-size: clamp(34px, 5.2vw, 56px); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 18px; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 12px; max-width: 60ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 14.5px var(--font-body); padding: 10px 16px; border-radius: 8px; text-decoration: none; border: 1px solid var(--line); color: var(--fg); background: var(--surface); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }

.term { background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-bottom: 1px solid #ffffff12; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a4a63; }
.term-bar span { margin-left: 8px; font: 12px var(--font-mono); color: #8497b3; }
.term pre { margin: 0; padding: 16px 18px; font: 13.5px/1.75 var(--font-mono); color: var(--code-fg); overflow-x: auto; }
.term .u { color: #7fd1a8; } .term .d { color: #7fa6e0; } .term .o { color: #f0a15e; } .term .c { color: #6f829c; }

.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 26px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.stats b { display: block; font-family: var(--font-display); font-size: 24px; color: var(--fg); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; }
.section-head h2 { font-family: var(--font-display); font-size: 26px; margin: 0; letter-spacing: -.01em; }
.section-head .prompt-line { margin: 0 0 4px; }

.featured { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center; background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%); border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px; margin-bottom: 56px; box-shadow: var(--shadow); }
@media (max-width: 720px) { .featured { grid-template-columns: minmax(0, 1fr); } }
.featured .kicker { font: 12px var(--font-mono); color: var(--accent); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.featured h3 { font-family: var(--font-display); font-size: 24px; margin: 0 0 8px; line-height: 1.2; }
.featured p { margin: 0; color: var(--muted); max-width: 62ch; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; min-width: 0; }
.search span { font-family: var(--font-mono); color: var(--prompt); font-size: 14px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: 14.5px var(--font-body); padding: 10px 0; outline: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: 500 13px var(--font-body); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.chip:hover { color: var(--fg); }
.chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--fg); min-width: 0; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-cat { font: 12px var(--font-mono); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card-cat svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.status { font: 600 11px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; white-space: nowrap; }
.status.live { color: var(--ok); background: var(--ok-bg); }
.status.wip { color: var(--accent); background: var(--accent-soft); }
.status.plan { color: var(--muted); background: var(--surface-2); }
.card h3 { font-family: var(--font-display); font-size: 18.5px; line-height: 1.3; margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .tags { margin-top: auto; padding-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font: 12px var(--font-mono); color: var(--muted); background: var(--surface-2); border-radius: 5px; padding: 2px 8px; }
.empty { display: none; color: var(--muted); padding: 30px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.about h3 { font-family: var(--font-display); font-size: 16px; margin: 0 0 6px; }
.about h3 span { color: var(--accent); font-family: var(--font-mono); font-size: 13px; margin-right: 8px; }
.about p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- Artikel ---------- */
.article-head { max-width: 780px; margin-bottom: 34px; }
.tagrow { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.article-head h1 { font-family: var(--font-display); font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; margin: 0 0 14px; letter-spacing: -.018em; text-wrap: balance; }
.article-head h1 .sub { display: block; color: var(--muted); font-weight: 500; font-size: .5em; letter-spacing: 0; margin-top: 10px; }
.lede { font-size: 18px; color: var(--muted); margin: 0; max-width: 66ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 26px 0 0; }
.facts div { background: var(--surface); padding: 12px 14px; min-width: 0; }
.facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); margin-bottom: 3px; }
.facts dd { margin: 0; font: 13.5px var(--font-mono); overflow-wrap: anywhere; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 56px; align-items: start; }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.content { max-width: 780px; min-width: 0; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 86px); font-size: 14px; }
.toc h2 { font: 12px var(--font-mono); color: var(--faint); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--fg); }
.toc a.active { color: var(--fg); border-left-color: var(--accent); }
.toc .switch { margin-top: 22px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.toc .switch p { margin: 0 0 6px; color: var(--muted); font-size: 13px; }

.content h2 { font-family: var(--font-display); font-size: 25px; line-height: 1.25; margin: 52px 0 14px; scroll-margin-top: 90px; letter-spacing: -.01em; }
.content h2::before { content: "## "; font-family: var(--font-mono); color: var(--accent); font-size: .7em; vertical-align: 2px; }
.content > h2:first-child { margin-top: 0; }
.content p { margin: 0 0 14px; }
.content ul { margin: 0 0 16px; padding-left: 20px; }
.content li { margin-bottom: 7px; }
.content li::marker { color: var(--accent); }
code { font-family: var(--font-mono); font-size: .86em; background: var(--surface-2); color: var(--fg); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }

.step { margin: 38px 0; scroll-margin-top: 90px; padding-left: 22px; border-left: 2px solid var(--line); }
.step-head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px -35px; }
.step-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); color: var(--accent); font: 700 12px var(--font-mono); flex: none; }
.step-head h3 { font-family: var(--font-display); font-size: 20px; margin: 0; line-height: 1.3; }
.step > p { margin: 0 0 12px; }

/* Codeblock – Kopier-Knopf wie im Chat */
.code { margin: 14px 0 18px; border-radius: var(--radius); background: var(--code-bg); border: 1px solid var(--line); overflow: hidden; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 14px; background: #ffffff08; border-bottom: 1px solid #ffffff10; }
.code-lang { font: 12px var(--font-mono); color: #8fa3bf; }
.copy { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px var(--font-body); color: #d5e1f0; background: transparent; border: 1px solid #ffffff26; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.copy svg { width: 14px; height: 14px; }
.copy:hover { background: #ffffff14; border-color: #ffffff44; }
.copy.done { color: #7fd1a8; border-color: #7fd1a866; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: var(--code-fg); font: 13.2px/1.65 var(--font-mono); }

.shot { margin: 16px 0; }
.label { font: 600 11px var(--font-mono); text-transform: uppercase; letter-spacing: .09em; color: var(--faint); margin-bottom: 6px; }
.shot figure { margin: 0; }
.shot img { border: 1px solid var(--line); border-radius: 8px; background: #000; cursor: zoom-in; }
.shot img.photo { background: transparent; }
.shot figcaption { font-size: 13.5px; color: var(--muted); margin-top: 7px; }
.verdict { border-radius: 8px; padding: 12px 14px 12px 16px; margin: 12px 0; border-left: 3px solid; font-size: 15px; }
.verdict p { margin: 0; }
.verdict .label { margin-bottom: 3px; }
.verdict.ok { background: var(--ok-bg); border-color: var(--ok); } .verdict.ok .label { color: var(--ok); }
.verdict.bad { background: var(--bad-bg); border-color: var(--bad); } .verdict.bad .label { color: var(--bad); }

.table-wrap { overflow-x: auto; margin: 14px 0 20px; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 520px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font: 600 11.5px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td code { background: transparent; padding: 0; }
td.bad code { color: var(--bad); } td.ok code { color: var(--ok); }

/* Problemseite: Verlauf der Versuche */
.timeline { list-style: none; margin: 18px 0 8px; padding: 0; }
.timeline li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 0 0 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 14px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--font-mono); }
.timeline .x .dot { background: var(--bad-bg); color: var(--bad); }
.timeline .v .dot { background: var(--ok-bg); color: var(--ok); }
.timeline .i .dot { background: var(--surface-2); color: var(--muted); }
.timeline h4 { margin: 3px 0 2px; font-size: 15.5px; }
.timeline p { margin: 0; color: var(--muted); font-size: 14.5px; }

.choose { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 18px 0 8px; }
.choice { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--fg); transition: border-color .15s, transform .15s; box-shadow: var(--shadow); }
.choice:hover { border-color: var(--accent); transform: translateY(-2px); }
.choice svg { width: 34px; height: 34px; color: var(--accent); }
.choice h3 { margin: 0; font-family: var(--font-display); font-size: 21px; }
.choice p { margin: 0; color: var(--muted); font-size: 14.5px; }
.choice .go { margin-top: auto; padding-top: 6px; font: 600 14px var(--font-body); color: var(--accent); }

.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.note h3 { margin: 0 0 6px; font-size: 16px; font-family: var(--font-display); }
.note p:last-child { margin: 0; }
.source { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 44px; }

footer.site { border-top: 1px solid var(--line); background: var(--bg); }
footer.site .inner { max-width: 1180px; margin: 0 auto; padding: 22px 20px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
footer.site .mono { color: var(--faint); }

.lightbox { position: fixed; inset: 0; background: #000000e0; display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; cursor: zoom-out; }
.lightbox img { max-height: 92vh; max-width: 96vw; border-radius: 6px; }

/* Über mich */
.me { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin-top: 64px; padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.me-text { flex: 1 1 420px; min-width: 0; }
.me h2 { font-family: var(--font-display); font-size: 24px; margin: 0 0 8px; }
.me p { margin: 0; color: var(--muted); max-width: 70ch; }
.me .prompt-line { margin-bottom: 8px; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent); }
