/* Haufschild – Gestaltung nach dem Muster von getartcraft.com: Papierton, feine Linien, Raster im Kopf,
   kleine Mono-Großbuchstaben als Beschriftung, große fette Überschriften mit kursivem Serifen-Akzent.
   Grün und Grau stammen aus dem Logo. Keine Webfonts, kein CDN: alles liegt auf der eigenen Seite. */

:root {
    --papier: #f3f2ee;
    --flaeche: #e9e7e1;
    --tinte: #121312;
    --tinte-weich: #3a3936;
    --gedaempft: #5c5a56;
    --linie: #d6d3cb;
    --akzent: #a3d71d;          /* Logo-Grün: nur Flächen/Linien, nicht für Text (zu wenig Kontrast) */
    --akzent-text: #3d6a00;     /* 5,7:1 auf Papier */
    --logo-grau: #8a8785;
    --logo-gruen: #a3d71d;
    --raster: #8a8785;
    --kopf-hoehe: 3.5rem;
    --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --schrift-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --schrift-serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-thema="hell"]) {
        --papier: #121311;
        --flaeche: #1c1d1a;
        --tinte: #ecebe6;
        --tinte-weich: #cfcdc7;
        --gedaempft: #a19e98;
        --linie: #2e2f2b;
        --akzent-text: #b6e34a;
        --logo-grau: #a9a6a3;
        --raster: #6d6b68;
        color-scheme: dark;
    }
}

:root[data-thema="dunkel"] {
    --papier: #121311;
    --flaeche: #1c1d1a;
    --tinte: #ecebe6;
    --tinte-weich: #cfcdc7;
    --gedaempft: #a19e98;
    --linie: #2e2f2b;
    --akzent-text: #b6e34a;
    --logo-grau: #a9a6a3;
    --raster: #6d6b68;
    color-scheme: dark;
}

/* ---------- Grundlagen ---------- */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--kopf-hoehe) + 1rem);
}

body {
    margin: 0;
    background: var(--papier);
    color: var(--tinte);
    font-family: var(--schrift);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; outline: none; }

img, svg { max-width: 100%; }
img { height: auto; }

a { color: var(--akzent-text); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--akzent-text); outline-offset: 3px; }

.sprunglink {
    position: absolute;
    left: -9999px;
    top: .75rem;
    z-index: 100;
    padding: .75rem 1rem;
    background: var(--tinte);
    color: var(--papier);
    font-family: var(--schrift-mono);
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.sprunglink:focus { left: .75rem; }

.marke {
    font-family: var(--schrift-mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gedaempft);
    margin: 0 0 .75rem;
}
.marke a { color: inherit; text-decoration: none; }
.marke a:hover { color: var(--tinte); text-decoration: underline; }

.icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Kopf ---------- */

.kopf {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: stretch;
    height: var(--kopf-hoehe);
    background: var(--papier);
    border-bottom: 1px solid var(--linie);
}

.kopf-logo {
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-right: 1px solid var(--linie);
}
.kopf-logo .logo { height: 2.25rem; width: auto; display: block; }
.logo-zeichen .lg-schrift { display: none; }

.logo .lg-grau { fill: var(--logo-grau); }
.logo .lg-gruen { fill: var(--logo-gruen); }
.logo .lg-linie { fill: none; stroke: var(--logo-gruen); stroke-width: .57; }

.kopf-nav ul {
    display: flex;
    align-items: center;
    gap: .2rem;
    height: 100%;
    margin: 0;
    padding: 0 1rem;
    list-style: none;
}
.kopf-nav a {
    display: block;
    padding: .4rem .6rem;
    font-family: var(--schrift-mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gedaempft);
    text-decoration: none;
}
.kopf-nav a:hover { color: var(--tinte); }
.kopf-nav a[aria-current] { background: var(--tinte); color: var(--papier); }

.kopf-knopf {
    display: grid;
    place-items: center;
    width: var(--kopf-hoehe);
    padding: 0;
    border: 0;
    border-left: 1px solid var(--linie);
    background: transparent;
    color: var(--tinte);
    cursor: pointer;
}
.kopf-knopf:hover { background: var(--flaeche); }
.kopf-knopf .icon-sonne, .kopf-knopf .icon-zu { display: none; }
:root[data-thema="dunkel"] .thema-knopf .icon-mond { display: none; }
:root[data-thema="dunkel"] .thema-knopf .icon-sonne { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-thema="hell"]) .thema-knopf .icon-mond { display: none; }
    :root:not([data-thema="hell"]) .thema-knopf .icon-sonne { display: block; }
}
.kopf-logo { grid-column: 1; }
.kopf-nav { grid-column: 2; }
.thema-knopf { grid-column: 3; }
.menue-knopf { grid-column: 4; display: none; }
.menue-knopf[aria-expanded="true"] .icon-menue { display: none; }
.menue-knopf[aria-expanded="true"] .icon-zu { display: block; }

@media (max-width: 52rem) {
    .kopf { grid-template-columns: auto 1fr auto auto; }
    .menue-knopf { display: grid; }

    /* ohne JavaScript: Navigation als zweite Zeile unter dem Kopf */
    :root:not(.js) .kopf { height: auto; grid-template-rows: var(--kopf-hoehe) auto; }
    :root:not(.js) .menue-knopf { display: none; }
    :root:not(.js) .kopf-nav { grid-column: 1 / -1; border-top: 1px solid var(--linie); }
    :root:not(.js) .kopf-nav ul { flex-wrap: wrap; padding: .5rem 1rem; }

    /* mit JavaScript: Vollbild-Menü */
    .js .kopf-nav {
        display: none;
        position: fixed;
        inset: var(--kopf-hoehe) 0 0 0;
        z-index: 49;
        overflow-y: auto;
        background: var(--papier);
    }
    .js.menue-offen .kopf-nav { display: block; }
    .js.menue-offen body { overflow: hidden; }
    .js .kopf-nav ul { flex-direction: column; align-items: stretch; gap: 0; height: auto; padding: 0; }
    .js .kopf-nav li { border-bottom: 1px solid var(--linie); }
    .js .kopf-nav a { padding: 1.2rem 1.25rem; font-size: .95rem; letter-spacing: .16em; }
}

/* ---------- Knöpfe ---------- */

.knoepfe { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2.25rem; }

.knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 3rem;
    padding: 0 1.6rem;
    border: 1px solid var(--tinte);
    background: var(--tinte);
    color: var(--papier);
    font-family: var(--schrift-mono);
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}
.knopf:hover { background: transparent; color: var(--tinte); }
.knopf-rahmen { background: transparent; color: var(--tinte); }
.knopf-rahmen:hover { background: var(--tinte); color: var(--papier); }

/* ---------- Startseite: großer Auftakt ---------- */

.held {
    position: relative;
    display: grid;
    place-content: center;
    min-height: min(48rem, calc(100svh - var(--kopf-hoehe)));
    padding: clamp(3rem, 8vw, 6rem) 1.25rem;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--linie);
}
.held > * { position: relative; }
.held-raster {
    position: absolute !important;
    inset: -10%;
    background-image: radial-gradient(circle, var(--raster) 1.4px, transparent 1.8px);
    background-size: 28px 28px;
    transform: skewX(-10deg);           /* schräg wie das Punkteraster im Logo */
    opacity: .3;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 65%);
    mask-image: radial-gradient(ellipse at center, #000 10%, transparent 65%);
    pointer-events: none;
}
.held-logo { width: min(26rem, 78vw); height: auto; margin: 0 auto 2.75rem; display: block; }
.held-titel {
    margin: 0 auto;
    max-width: 20ch;
    font-size: clamp(2.1rem, 6.2vw, 4.4rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.035em;
}
.held-titel em, .seitenkopf h1 em {
    font-family: var(--schrift-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -.01em;
    color: var(--tinte-weich);
}
.held-text {
    max-width: 36rem;
    margin: 1.5rem auto 0;
    font-size: clamp(1.1rem, 2.1vw, 1.35rem);
    line-height: 1.55;
    color: var(--gedaempft);
}
.held-meta {
    margin: 2.75rem 0 0;
    font-family: var(--schrift-mono);
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gedaempft);
}

/* ---------- Abschnitte (Startseite) ---------- */

.abschnitt {
    padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid var(--linie);
}
.abschnitt > * { max-width: 80rem; margin-inline: auto; }
.abschnitt-kopf {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 0 2rem;
    margin-bottom: 2.5rem;
}
.abschnitt-kopf .marke { grid-column: 1 / -1; }
.abschnitt-kopf h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.mehr {
    font-family: var(--schrift-mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--tinte);
    text-decoration: none;
    white-space: nowrap;
}
.mehr:hover { text-decoration: underline; }

.abschnitte {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 10;
    display: none;
}
.abschnitte ul { margin: 0; padding: 0; list-style: none; text-align: right; }
.abschnitte a {
    font-family: var(--schrift-mono);
    font-size: .7rem;
    line-height: 2;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gedaempft);
    text-decoration: none;
}
.abschnitte a:hover, .abschnitte a.aktiv { color: var(--tinte); }
@media (min-width: 80rem) { .abschnitte { display: block; } }

/* Karten (Blog) */
.karten {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
    border-top: 1px solid var(--linie);
    border-left: 1px solid var(--linie);
}
.karte {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-right: 1px solid var(--linie);
    border-bottom: 1px solid var(--linie);
    transition: background-color .15s;
}
.karte:hover { background: var(--flaeche); }
.karte-bild { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: cover; margin-bottom: 1.25rem; }
.karte-titel { margin: 0 0 .5rem; font-size: 1.3rem; line-height: 1.25; letter-spacing: -.015em; }
.karte-titel a { color: var(--tinte); text-decoration: none; }
.karte-titel a::after { content: ""; position: absolute; inset: 0; }
.karte-text { margin: 0; color: var(--gedaempft); }

/* Kacheln (Alben) */
.kacheln {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    gap: 2rem 1.25rem;
}
.kachel { position: relative; }
.kachel img, .kachel-leer { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.kachel-leer {
    background-color: var(--flaeche);
    background-image: radial-gradient(circle, var(--raster) 1.2px, transparent 1.6px);
    background-size: 18px 18px;
}
.kachel img { transition: opacity .2s; }
.kachel:hover img { opacity: .85; }
.kachel-titel { margin: .9rem 0 .25rem; font-size: 1.1rem; line-height: 1.3; }
.kachel-titel a { color: var(--tinte); text-decoration: none; }
.kachel-titel a::after { content: ""; position: absolute; inset: 0; }
.kachel .marke { margin: 0; }

/* Zeilen (Blog-Liste, Projekte, Lebenslauf) */
.zeilen { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--linie); }
.zeile {
    position: relative;
    display: grid;
    grid-template-columns: 8.5rem 1fr auto;
    gap: .25rem 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--linie);
}
.zeile .marke { margin: 0; padding-top: .4rem; }
.zeile-titel { margin: 0 0 .35rem; font-size: 1.3rem; line-height: 1.3; letter-spacing: -.015em; }
.zeile-titel a { color: var(--tinte); text-decoration: none; }
.zeile-titel a::after { content: ""; position: absolute; inset: 0; }
.zeile-titel a:hover { text-decoration: underline; }
.zeile-mitte > p { margin: 0; color: var(--gedaempft); }
.zeile-ort { font-weight: 600; color: var(--tinte-weich) !important; }
@media (max-width: 40rem) {
    .zeile { grid-template-columns: 1fr; }
    .zeile .marke { padding-top: 0; }
}

/* ---------- Fließtext-Seiten (Raster mit Text-, Breit- und Vollbreite) ---------- */

.fliesstext {
    display: grid;
    grid-template-columns:
        [voll-start] minmax(1rem, 1fr)
        [breit-start] minmax(0, 8rem)
        [text-start] min(44rem, calc(100% - 2rem))
        [text-end] minmax(0, 8rem)
        [breit-end] minmax(1rem, 1fr)
        [voll-end];
    padding-bottom: clamp(3rem, 8vw, 6rem);
}
.fliesstext > * { grid-column: text; }
.fliesstext > .breite-breit { grid-column: breit; }
.fliesstext > .breite-voll { grid-column: voll; }
.abschnitt.fliesstext > * { max-width: none; }

.seitenkopf {
    padding: clamp(3rem, 9vw, 6.5rem) 0 2.25rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--linie);
}
.seitenkopf h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.035em;
    text-wrap: balance;
}
.einleitung { margin: 1.25rem 0 0; font-size: 1.25rem; line-height: 1.55; color: var(--gedaempft); }
.einleitung p { margin: 0 0 .75rem; }
.seitenkopf .knopf { margin-top: 1.25rem; }

.fliesstext p, .fliesstext ul, .fliesstext ol { margin: 0 0 1.2rem; }
.fliesstext h2 { margin: 2.75rem 0 1rem; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.02em; }
.fliesstext h3 { margin: 2rem 0 .75rem; font-size: 1.3rem; line-height: 1.3; }
.fliesstext h4 { margin: 1.75rem 0 .5rem; font-size: 1.05rem; }
.fliesstext li + li { margin-top: .3rem; }
.fliesstext blockquote {
    margin: 2rem 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--akzent);
    font-family: var(--schrift-serif);
    font-style: italic;
    font-size: 1.25rem;
}
.fliesstext hr { margin: 3rem 0; border: 0; border-top: 1px solid var(--linie); }
.fliesstext code { font-family: var(--schrift-mono); font-size: .88em; background: var(--flaeche); padding: .1em .35em; }

.bild { margin: 2.5rem 0; }
.bild img { display: block; width: 100%; }
.bild figcaption { margin-top: .75rem; font-size: .88rem; color: var(--gedaempft); }

.zitat { margin: 3rem 0; }
.zitat blockquote { margin: 0; padding: 0; border: 0; font-size: inherit; }
.zitat blockquote p {
    margin: 0;
    font-family: var(--schrift-serif);
    font-style: italic;
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.3;
}
.zitat figcaption { margin-top: 1rem; font-family: var(--schrift-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gedaempft); }

.code { margin: 2rem 0; }
.code pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    font-family: var(--schrift-mono);
    font-size: .86rem;
    line-height: 1.55;
}
.code pre code { background: none; padding: 0; font-size: inherit; }
.code figcaption { margin-bottom: .5rem; }

.lebenslauf { margin: 2.5rem 0; }
.lebenslauf h2 { margin-top: 0; }
.lebenslauf .zeile-mitte p { color: var(--gedaempft); }

.linkliste { margin: 2rem 0; padding: 0; list-style: none; border-top: 1px solid var(--linie); }
.linkliste li { padding: 1rem 0; border-bottom: 1px solid var(--linie); margin: 0 !important; }
.linkliste a { font-weight: 700; font-size: 1.15rem; color: var(--tinte); text-decoration: none; }
.linkliste a:hover .linkliste-titel { text-decoration: underline; }
.linkliste p { margin: .25rem 0 0 !important; color: var(--gedaempft); }

.unterseiten { margin-top: 3rem; }
.unterseiten ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--linie); }
.unterseiten li { margin: 0 !important; border-bottom: 1px solid var(--linie); }
.unterseiten a { display: flex; justify-content: space-between; padding: 1rem 0; font-weight: 700; color: var(--tinte); text-decoration: none; }
.unterseiten a:hover { color: var(--akzent-text); }

.schlagworte ul, ul.schlagworte { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2.5rem; padding: 0; list-style: none; }
ul.schlagworte-klein { margin: 1.5rem 0 0; }
.schlagworte li { margin: 0 !important; }
.schlagworte a {
    display: inline-block;
    padding: .45rem .7rem;
    border: 1px solid var(--linie);
    font-family: var(--schrift-mono);
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--tinte);
    text-decoration: none;
}
.schlagworte a:hover { border-color: var(--tinte); }
.schlagworte a[aria-current] { background: var(--tinte); border-color: var(--tinte); color: var(--papier); }

.blaettern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--linie);
}
.blaettern a { display: flex; flex-direction: column; gap: .35rem; font-weight: 700; color: var(--tinte); text-decoration: none; }
.blaettern a:hover { color: var(--akzent-text); }
.blaettern .marke { margin: 0; }
.blaettern-vor { text-align: right; align-items: flex-end; }

.album {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(46%, 12rem), 1fr));
    gap: .5rem;
    margin: 1.5rem 0 0;
    padding: 0 clamp(1rem, 3vw, 2rem);
    list-style: none;
}
.album-klein { padding: 0; margin: 2.5rem 0; }
.album li { margin: 0 !important; }
.album a { display: block; }
.album img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: opacity .2s; }
.album a:hover img { opacity: .85; }
.album-zahl { margin-top: 1.25rem; }

.leer { padding: 1.5rem 0; font-family: var(--schrift-serif); font-style: italic; font-size: 1.2rem; color: var(--gedaempft); }

/* ---------- Leuchtkasten (große Bilder) ---------- */

.leuchtkasten {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(10, 10, 10, .95);
    color: #f3f2ee;
}
.leuchtkasten::backdrop { background: transparent; }
.leuchtkasten figure {
    display: grid;
    grid-template-rows: 1fr auto;
    place-items: center;
    height: 100%;
    margin: 0;
    padding: 4rem 4.5rem 1.25rem;
}
.leuchtkasten img { max-width: 100%; max-height: calc(100dvh - 7.5rem); object-fit: contain; }
.leuchtkasten figcaption {
    font-family: var(--schrift-mono);
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: center;
    padding-top: 1rem;
}
.leuchtkasten button {
    position: absolute;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid rgba(243, 242, 238, .3);
    background: rgba(10, 10, 10, .4);
    color: inherit;
    cursor: pointer;
}
.leuchtkasten button:hover { background: rgba(243, 242, 238, .12); }
.leuchtkasten .lk-zu { top: .75rem; right: .75rem; }
.leuchtkasten .lk-zurueck { left: .75rem; top: 50%; transform: translateY(-50%); }
.leuchtkasten .lk-vor { right: .75rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 40rem) {
    .leuchtkasten figure { padding: 4rem .5rem 1rem; }
    .leuchtkasten .lk-zurueck, .leuchtkasten .lk-vor { top: auto; bottom: .75rem; transform: none; }
}

/* ---------- Fuß ---------- */

.fuss {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1rem 2rem;
    padding: 1.75rem clamp(1rem, 4vw, 3rem);
    border-top: 1px solid var(--linie);
    font-family: var(--schrift-mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gedaempft);
}
.fuss p { margin: 0; }
.fuss a { color: inherit; text-decoration: none; }
.fuss a:hover { color: var(--tinte); text-decoration: underline; }
.fuss-zeichen img { display: block; width: 2.5rem; height: 2.5rem; }
.fuss-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
@media (max-width: 40rem) {
    .fuss { grid-template-columns: auto 1fr; }
    .fuss-links, .fuss-feed { grid-column: 1 / -1; }
}

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
    .kopf, .fuss, .abschnitte, .held-raster { display: none !important; }
    body { background: #fff; color: #000; }
}
