/* Ruhig und aufgeräumt: klare Abstände, Karten, keine Effekte. */

:root {
    --bg: #f7f7f5;
    --surface: #ffffff;
    --text: #1d1d1f;
    --muted: #64646a;
    --line: #e4e4e0;
    --accent: #2f6fdf;
    --accent-soft: #e8f0fd;
    --blue: #2f6fdf;
    --blue-soft: #e8f0fd;
    --green: #23885a;
    --green-soft: #e3f4ea;
    --ok: #23885a;
    --err: #c0392b;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #141416;
        --surface: #1c1c1f;
        --text: #ececee;
        --muted: #9a9aa2;
        --line: #2c2c31;
        --accent: #6b9cff;
        --accent-soft: #1e2a44;
        --blue: #6b9cff;
        --blue-soft: #1e2a44;
        --green: #4fc48a;
        --green-soft: #17322a;
        --ok: #4fc48a;
        --err: #ff7b6b;
        --shadow: none;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16.5px/1.65 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

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

h1, h2, h3 {
    font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    line-height: 1.2;
    letter-spacing: -.015em;
    margin: 0 0 .5rem;
}
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); font-weight: 700; }
h2 { font-size: 1.6rem; font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1rem; }

img { max-width: 100%; height: auto; display: block; }
ul { padding-left: 1.2rem; }
li { margin: .25rem 0; }
code { font-size: .9em; background: var(--bg); border: 1px solid var(--line); padding: 0 .3em; border-radius: 4px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.accent-blue { --accent: var(--blue); --accent-soft: var(--blue-soft); }
.accent-green { --accent: var(--green); --accent-soft: var(--green-soft); }

/* ==== Kopf ==== */
.banner {
    margin: 0;
    padding: .5rem 20px;
    text-align: center;
    font-size: .92rem;
    background: var(--accent-soft);
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    min-height: 64px;
    padding-top: .5rem;
    padding-bottom: .5rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }

.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.site-header nav a {
    color: var(--muted);
    padding: .35rem .7rem;
    border-radius: 8px;
    font-size: .95rem;
}
.site-header nav a:hover { color: var(--text); background: var(--bg); text-decoration: none; }
.site-header nav a[aria-current] { color: var(--text); background: var(--bg); font-weight: 600; }

/* ==== Abschnitte ==== */
.section { padding: 56px 0; }
.section + .section { padding-top: 0; }
.section-head { margin-bottom: 1.5rem; }
.section-head p { color: var(--muted); margin: 0; }
.section-head-row { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }

.intro { padding: 64px 0 40px; }
.intro .lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.kicker { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--accent); margin-bottom: .5rem; }

/* ==== Knöpfe ==== */
.buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1.1rem;
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    border-radius: 9px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn[aria-busy=true] { opacity: .6; cursor: progress; }

/* ==== Karten ==== */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.app-card { display: flex; flex-direction: column; }
.app-card-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.app-card-head img { width: 52px; height: 52px; border-radius: 12px; }
.app-card-head h3 { margin: 0; font-size: 1.25rem; }
.app-card-head p { margin: 0; font-size: .9rem; color: var(--muted); }
.app-card > p { color: var(--muted); flex: 1; }
.app-card .buttons { margin-top: .5rem; }

.badge {
    display: inline-block;
    padding: .1rem .55rem;
    font-size: .8rem;
    font-weight: 600;
    border-radius: 999px;
    color: var(--accent);
    background: var(--accent-soft);
    vertical-align: middle;
}

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.tags li {
    margin: 0;
    padding: .15rem .6rem;
    font-size: .85rem;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.screenshot {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
    overflow: hidden;
    background: var(--surface);
}

.feature h3 { display: flex; align-items: center; gap: .6rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.icon {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
}
.icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ==== Projektseite ==== */
.project-intro { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 880px) { .project-intro.has-shot { grid-template-columns: 5fr 6fr; } }
.project-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.project-title img { width: 64px; height: 64px; border-radius: 14px; }
.project-title h1 { margin: 0; }
.back { display: inline-block; font-size: .9rem; color: var(--muted); margin-bottom: 1.5rem; }

.story {
    font-size: 1.15rem;
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
    margin: 0;
}

/* ==== Listen mit Datum (Changelog, Neuigkeiten) ==== */
.entries { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.entries > li { margin: 0; }
.entries h3 { margin-bottom: .35rem; }
.entries ul { margin: .25rem 0 0; color: var(--muted); }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: .88rem; color: var(--muted); margin-bottom: .4rem; }
.entry-title { display: flex; align-items: center; gap: .55rem; }
.entry-title img { width: 22px; height: 22px; border-radius: 5px; }

.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    padding: .8rem 0;
    border-bottom: 1px solid var(--line);
    margin: 0;
}
.news-list li:last-child { border-bottom: 0; }
.news-list time { flex: none; width: 9rem; color: var(--muted); font-size: .9rem; }

.filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; }
.filter a {
    padding: .3rem .85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: .9rem;
    background: var(--surface);
}
.filter a:hover { text-decoration: none; color: var(--text); }
.filter a[aria-current] { color: var(--bg); background: var(--text); border-color: var(--text); }

/* ==== Über mich ==== */
.about-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
}

/* ==== Kontakt ==== */
.contact { display: grid; gap: 32px; align-items: start; }
@media (min-width: 880px) { .contact { grid-template-columns: 2fr 3fr; } }
.contact dl { margin: 1.5rem 0 0; }
.contact dt { font-weight: 600; }
.contact dd { margin: 0 0 1rem; color: var(--muted); }

.form label { display: block; margin: 0 0 1rem; }
.form label > span, .form legend { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; padding: 0; }
.form .row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .form .row { grid-template-columns: 1fr 1fr; } }

.form input[type=text], .form input[type=email], .form textarea {
    width: 100%;
    padding: .6rem .75rem;
    font: inherit;
    color: inherit;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.form textarea { resize: vertical; min-height: 9rem; }

.form fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.topics { display: flex; flex-wrap: wrap; gap: .5rem; }
.form .topics label { margin: 0; position: relative; }
.topics input { position: absolute; opacity: 0; }
.form .topics label > span {
    display: inline-block;
    margin: 0;
    padding: .35rem .85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .92rem;
    font-weight: 400;
    cursor: pointer;
    background: var(--bg);
}
.form .topics input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.topics input:focus-visible + span { outline: 2px solid var(--accent); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.flash { padding: .7rem .9rem; margin-bottom: 1rem; border-radius: 8px; background: var(--green-soft); border-left: 3px solid var(--ok); }
.flash-error { background: transparent; border: 1px solid var(--err); border-left-width: 3px; }
.flash-warn { background: transparent; border: 1px solid #d9a33a; border-left-width: 3px; }

/* ==== Fuss ==== */
.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    font-size: .92rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 24px;
    padding: 40px 0 24px;
}
.footer-grid h4 { margin: 0 0 .5rem; font-size: .9rem; }
.footer-grid a { display: block; color: var(--muted); padding: .1rem 0; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: 16px 0 32px; border-top: 1px solid var(--line); color: var(--muted); }

.not-found { text-align: center; padding: 96px 0; }
.not-found .buttons { justify-content: center; }

@media (max-width: 560px) {
    .news-list li { flex-direction: column; gap: .1rem; }
    .news-list time { width: auto; }
}
