/*
 * Bewerbungsseite - eigenes Aussehen, bewusst ohne das Behoerden-Design
 * der uebrigen Seiten. Zwei Farbwelten:
 *
 *   hell   - weisser Grund, keine Verlaeufe, leichte Schatten, gruener Akzent
 *   dunkel - gruen/gelber Verlauf als Grund, Karten dunkel darueber
 *
 * Umgeschaltet wird ueber data-theme am <html>; die Wahl liegt im
 * localStorage. Ohne gespeicherte Wahl entscheidet die Systemeinstellung.
 */

:root {
    --akzent: #1f6b39;
    --akzent-hell: #3da05a;
    --grund: #f2f5f2;
    --grund-bild: none;
    --karte: #ffffff;
    --karte-rand: #d3dcd6;
    --text: #1b2420;
    --text-leise: #4b5952;
    --schatten: 0 1px 2px rgba(20, 35, 25, .06), 0 6px 18px rgba(20, 35, 25, .07);
    --schatten-hover: 0 2px 4px rgba(20, 35, 25, .08), 0 14px 30px rgba(20, 35, 25, .12);
    --flaeche: #eaf1eb;
    --radius: 8px;
}

html[data-theme="dunkel"] {
    /*
     * Der Verlauf bleibt gruen/gelb, aber deutlich dunkler als zuvor:
     * heller Text auf einem hellen Gelbgruen war nicht zu lesen. Die
     * Karten sind jetzt blickdicht, nicht durchscheinend.
     */
    --akzent: #a8e06a;
    --akzent-hell: #c6ee96;
    --grund: #0d2417;
    --grund-bild: linear-gradient(150deg, #0b2416 0%, #123a21 48%, #2f3a12 100%);
    --karte: #132a1d;
    --karte-rand: rgba(200, 235, 180, .22);
    --text: #f2f8ec;
    --text-leise: #bccfb2;
    --schatten: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .3);
    --schatten-hover: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 40px rgba(0, 0, 0, .38);
    --flaeche: #1b3524;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--grund);
    background-image: var(--grund-bild);
    background-attachment: fixed;
    color: var(--text);
    font: 16px/1.62 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--akzent); }

.wrap {
    width: min(1420px, 100% - 40px);
    margin: 0 auto;
}

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

.kopf {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 22px;
    padding: 60px 0 46px;
}

.kopf-bild {
    width: 190px;
    height: 190px;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--karte);
    box-shadow: var(--schatten);
}

.kopf-text { max-width: 60ch; }

.kopf h1 {
    margin: 0 0 6px;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -.02em;
}

.kopf .rolle {
    margin: 0 0 14px;
    color: var(--akzent);
    font-weight: 600;
    letter-spacing: .01em;
}

.kopf p.lead {
    margin: 0 auto;
    max-width: 56ch;
    color: var(--text-leise);
}

.schalter {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid var(--karte-rand);
    border-radius: 999px;
    background: var(--karte);
    color: var(--text);
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
    box-shadow: var(--schatten);
    transition: box-shadow .18s, transform .18s;
}

.schalter:hover { box-shadow: var(--schatten-hover); transform: translateY(-1px); }

/* ---------- Karten ---------- */

.karte {
    background: var(--karte);
    border: 1px solid var(--karte-rand);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 26px 28px;
}

html[data-theme="dunkel"] .karte { background-image: none; }

h2.abschnitt {
    margin: 52px 0 18px;
    font-size: 1.4rem;
    letter-spacing: -.01em;
}

h2.abschnitt::after {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    margin-top: 10px;
    border-radius: 2px;
    background: var(--akzent);
}

/* ---------- Anmeldung / Formulare ---------- */

/* Anmeldung: eine Zeile. Mehr braucht es nicht, und der Lebenslauf
   ist nicht der Grund, warum jemand die Seite aufruft. */

.anmeldezeile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
}

.anmeldezeile form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.anmeldezeile input {
    width: 170px;
    margin: 0;
    padding: 8px 11px;
    font-size: .93rem;
}

.anmeldezeile .knopf {
    margin: 0;
    padding: 8px 16px;
    font-size: .93rem;
}

.anmeldezeile .trenner {
    margin-left: auto;
    color: var(--text-leise);
    font-size: .9rem;
}

.anmeldezeile .trenner a { font-weight: 600; }

@media (max-width: 640px) {
    .anmeldezeile input { width: 100%; }
    .anmeldezeile form { width: 100%; }
    .anmeldezeile .trenner { margin-left: 0; }
}

.anfrage-karte { margin-top: 18px; }

/* Schmale Spalte fuer Werdegang und Anmeldung. */
.mittelteil {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

label {
    display: block;
    margin: 14px 0 6px;
    font-size: .88rem;
    font-weight: 600;
}

input[type=text], input[type=email], input[type=password], textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--karte-rand);
    border-radius: 9px;
    background: var(--flaeche);
    color: var(--text);
    font: inherit;
    transition: border-color .15s, box-shadow .15s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--akzent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 22%, transparent);
}

textarea { resize: vertical; min-height: 130px; }

.knopf {
    display: inline-block;
    margin-top: 18px;
    padding: 11px 22px;
    border: 0;
    border-radius: 9px;
    background: var(--akzent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--schatten);
    transition: background .16s, box-shadow .18s, transform .18s;
}

html[data-theme="dunkel"] .knopf { color: #0f2a19; }

.knopf:hover {
    background: var(--akzent-hell);
    box-shadow: var(--schatten-hover);
    transform: translateY(-1px);
}

.knopf.leise {
    background: transparent;
    color: var(--akzent);
    border: 1px solid var(--karte-rand);
    box-shadow: none;
}

.hinweis { color: var(--text-leise); font-size: .9rem; }
.honigtopf { position: absolute; left: -9999px; }

.meldung {
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: 9px;
    border-left: 3px solid var(--akzent);
    background: var(--flaeche);
    font-size: .93rem;
}

.meldung.fehler { border-left-color: #c0392b; }
html[data-theme="dunkel"] .meldung.fehler { border-left-color: #ff9c8f; }

/* ---------- Lebenslauf ---------- */

.lebenslauf { margin-bottom: 10px; }

.anmeldehinweis { margin: 0 0 14px; }

.lebenslauf-kopf { padding: 18px 24px; }
.lebenslauf-kopf .person { margin: 0; font-weight: 600; }
.lebenslauf-kopf .anschrift { margin: 4px 0 0; color: var(--text-leise); }

.ll-kopfzeile {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0 20px;
    scroll-margin-top: 20px;
}

.ll-kopfzeile h3 {
    margin: 0;
    font-size: clamp(1.25rem, 2.6vw, 1.6rem);
    letter-spacing: -.02em;
}

.ll-kopfzeile p { margin: 0; color: var(--text-leise); font-size: .92rem; }

/* Zeitstrahl: eine Linie links, je Station ein Punkt darauf. */

.zeitstrahl {
    position: relative;
    padding-left: 60px;
}

.zeitstrahl::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    border-radius: 2px;
    background: var(--akzent);
    opacity: .45;
}

/*
 * Frueher standen die Stationen auf opacity:0 und wurden per
 * IntersectionObserver eingeblendet. Wenn das aus irgendeinem Grund
 * nicht lief, war der halbe Lebenslauf unsichtbar - weisse Karte,
 * kein Text. Der Inhalt ist jetzt von sich aus da; die Animation ist
 * nur noch eine Zugabe, die JavaScript oben drauflegt.
 */

.posten {
    position: relative;
    margin-bottom: 16px;
    padding: 20px 24px;
    transition: box-shadow .2s, border-color .2s;
}

html.js-einblenden .posten {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .45s ease, transform .45s ease,
                box-shadow .2s, border-color .2s;
}

html.js-einblenden .posten.sichtbar { opacity: 1; transform: translateY(0); }

.posten:hover {
    box-shadow: var(--schatten-hover);
    border-color: color-mix(in srgb, var(--akzent) 45%, var(--karte-rand));
}

/* Statt eines blossen Punktes sitzt je Station ein Symbol auf der Linie. */

.posten .marke {
    position: absolute;
    left: -60px;
    top: 18px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--karte);
    border: 2px solid var(--akzent);
    color: var(--akzent);
    box-shadow: 0 0 0 4px var(--grund);
    transition: background .2s, color .2s, transform .2s;
}

.posten .marke svg { width: 21px; height: 21px; }

.posten:hover .marke {
    background: var(--akzent);
    color: var(--karte);
    transform: scale(1.06);
}

.posten .datum {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--akzent);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.posten h4 { margin: 0 0 6px; font-size: 1.08rem; }
.posten p { margin: 0; color: var(--text-leise); line-height: 1.6; }
.posten .hervor { margin-top: 7px; color: var(--text); font-weight: 600; }

@media (max-width: 640px) {
    .zeitstrahl { padding-left: 46px; }
    .zeitstrahl::before { left: 15px; }
    .posten { padding: 18px 20px; }
    .posten .marke { left: -46px; top: 16px; width: 32px; height: 32px; }
    .posten .marke svg { width: 17px; height: 17px; }
    .ll-kopfzeile { flex-direction: column; gap: 4px; }
}

/* ---------- Boxen ---------- */

/* Vier Boxen je Reihe, sobald der Bildschirm es hergibt - darunter
   stufenweise drei, zwei, eine. */

.boxen {
    display: grid;
    gap: 22px;
    grid-template-columns: 1fr;
    margin-bottom: 60px;
}

@media (min-width: 620px)  { .boxen { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .boxen { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .boxen { grid-template-columns: repeat(4, 1fr); } }

.box {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}

.box:hover {
    transform: translateY(-3px);
    box-shadow: var(--schatten-hover);
    border-color: color-mix(in srgb, var(--akzent) 45%, var(--karte-rand));
}

.box-bild {
    padding: 14px 18px 0;
    color: var(--text-leise);
}

.box-bild svg { display: block; width: 100%; height: auto; }
.box-bild .flaeche { fill: var(--flaeche); }
.box-bild .punkt { fill: currentColor; }
.box-bild .akzent { stroke: var(--akzent); }
.box-bild .akzentfuell { fill: var(--akzent); }

.box:hover .box-bild { color: var(--akzent); }

.box-inhalt { padding: 14px 20px 22px; }
.box h3 { margin: 0 0 10px; font-size: 1.08rem; }

.box ul { margin: 0; padding-left: 18px; }
.box li { margin: 5px 0; color: var(--text-leise); font-size: .9rem; }

/* ---------- Fuss ---------- */

.fuss {
    padding: 26px 0 40px;
    border-top: 1px solid var(--karte-rand);
    color: var(--text-leise);
    font-size: .9rem;
}

.fuss a { margin-right: 16px; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
    html.js-einblenden .posten { opacity: 1; transform: none; }
}


/* ---------- Profil und Nebenfaecher ---------- */

/* "Was ich mitbringe" steht direkt unter dem Kopf, in der schmalen
   Mittelspalte, und stimmt auf den Rest ein. */

.profil {
    margin-bottom: 8px;
    border-left: 3px solid var(--akzent);
}

.profil h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    letter-spacing: -.01em;
}

.profil p { margin: 0; color: var(--text-leise); }
.profil .fuehrerschein { margin-top: 10px; color: var(--text); font-weight: 600; }

/* "Sonstiges / Minor Skills" - eine breite Karte unter den Boxen. */

.sonstiges { margin: 0 0 34px; }

.sonstiges h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
}

.sonstiges h2::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    margin-top: 10px;
    border-radius: 2px;
    background: var(--akzent);
}

/*
 * Stichwort und Inhalt gehoeren zusammen, also liegt jedes Paar in
 * einem eigenen Kaestchen. Laegen dt und dd direkt im Raster, wuerde
 * jedes von beiden eine eigene Spalte belegen - und das Stichwort
 * stuende neben dem falschen Inhalt.
 */

.sonstiges dl {
    display: grid;
    gap: 18px 30px;
    grid-template-columns: 1fr;
    margin: 20px 0 0;
}

.sonstiges .paar {
    padding-left: 13px;
    border-left: 2px solid var(--karte-rand);
}

@media (min-width: 720px)  { .sonstiges dl { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .sonstiges dl { grid-template-columns: repeat(3, 1fr); } }

.sonstiges dt {
    margin-top: 0;
    color: var(--akzent);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.sonstiges dd {
    margin: 3px 0 0;
    color: var(--text-leise);
    font-size: .94rem;
    line-height: 1.55;
}

/* Ersatz fuer style-Attribute, die die Content-Security-Policy
   ebenfalls verwerfen kann. */
.oben-bündig { margin-top: 0; }
.unten-bündig { margin-bottom: 0; }
