/* Schrift lokal eingebunden, keine Verbindung zu externen Servern */
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin.woff2") format("woff2-variations"),
         url("../fonts/inter-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: linear-gradient(135deg, #e0f7fa 0%, #f3e5f5 100%);
    --paper: #e0f7fa;
    --ink: #1d1d1f;
    --muted: #55565c;
    --line: rgba(29, 29, 31, 0.16);
    --placeholder: rgba(29, 29, 31, 0.08);
    --shadow: 0 20px 40px rgba(29, 29, 31, 0.15);
    --chroma: #1f45d6;
    --chroma-ink: #ffffff;
    --chroma-hover: #1736ae;
    --gutter: clamp(1rem, 4vw, 3rem);
    --measure: 76rem;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        --paper: #1a1a2e;
        --ink: #f5f5f7;
        --muted: #a9adbd;
        --line: rgba(255, 255, 255, 0.2);
        --placeholder: rgba(255, 255, 255, 0.08);
        --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
        --chroma: #8ea2ff;
        --chroma-ink: #1a1a2e;
        --chroma-hover: #b3c0ff;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --paper: #1a1a2e;
    --ink: #f5f5f7;
    --muted: #a9adbd;
    --line: rgba(255, 255, 255, 0.2);
    --placeholder: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    --chroma: #8ea2ff;
    --chroma-ink: #1a1a2e;
    --chroma-hover: #b3c0ff;
    color-scheme: dark;
}

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    background: var(--bg);
    color: var(--ink);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; }

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

/* Kopfzeile */
.site-header {
    width: 100%;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 1.25rem var(--gutter);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.home-link {
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.home-link:hover {
    text-decoration: underline;
    text-decoration-color: var(--chroma);
    text-underline-offset: 0.25em;
}

.theme-toggle {
    margin-left: auto;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 1.125rem; height: 1.125rem; }

/* Fußzeile */
.site-footer {
    width: 100%;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 2rem var(--gutter) 2.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.site-footer a {
    color: var(--muted);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] { color: var(--ink); }

/* Startseite */
.hero {
    flex: 1;
    width: 100%;
    max-width: calc(68.75rem + 2 * var(--gutter));
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 4rem) var(--gutter);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "text photo";
    gap: 4rem;
    align-items: center;
    align-content: center;
}

.hero-text { grid-area: text; }

.hero-name {
    margin: 0 0 1.5rem;
    font-size: clamp(2.5rem, 4.5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

/* Doppelname nicht am Bindestrich umbrechen */
.nowrap { white-space: nowrap; }

.hero-role {
    margin: 0 0 2rem;
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    line-height: 1.5;
    color: var(--muted);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    min-height: 3.25rem;
    padding: 0 1.75rem;
    border: 2px solid var(--chroma);
    border-radius: 999px;
    background: var(--chroma);
    color: var(--chroma-ink);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
    background: var(--chroma-hover);
    border-color: var(--chroma-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--chroma);
}

.btn-secondary:hover { color: var(--chroma-ink); }

/* Porträt */
.frame {
    grid-area: photo;
    margin: 0;
}

.frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: top center;
    border-radius: 24px;
    background: var(--placeholder);
    box-shadow: var(--shadow);
}

@media (max-width: 48rem) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "photo"
            "text";
        /* optisch gleich zum Abstand zwischen Überschrift und Unterzeile */
        gap: 2rem;
        align-content: start;
    }

    .hero-text { text-align: center; }

    .hero-name { font-size: min(2.5rem, 11.5vw); }

    .actions {
        justify-content: center;
        gap: 0.75rem;
    }

    .btn {
        padding: 0 1.25rem;
        font-size: 1rem;
    }

    .frame {
        justify-self: center;
        width: 100%;
        max-width: 26rem;
    }
}

/* Rechtstexte */
.legal {
    flex: 1;
    width: 100%;
    max-width: var(--measure);
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 5rem) var(--gutter) 3rem;
}

.legal h1 {
    margin: 0 0 clamp(2rem, 5vw, 3.5rem);
    font-size: clamp(2.5rem, 8vw, 4.75rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

.prose { max-width: none; }

.prose h2 {
    margin: 2.75rem 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.prose p,
.prose ul,
.prose address { margin: 0 0 1rem; }

.prose address { font-style: normal; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35rem; }

.prose a {
    text-decoration-color: var(--chroma);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.2em;
    overflow-wrap: anywhere;
}

.prose a:hover { color: var(--chroma); }

.prose .lead {
    font-size: 1.25rem;
    line-height: 1.5;
    padding-left: 1.25rem;
    border-left: 2px solid var(--chroma);
}

.prose .meta {
    margin-top: 3rem;
    font-size: 0.9375rem;
    color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
