/*
 * RitteK.de – Designkonzept 01 (Klar & freundlich), Version 3
 * Weiß und Salbeigrün mit neongrünen (#B6FF3B) Akzenten, dunkle Schrift #173126.
 * Themes: hell (Standard), dunkel, hoher Kontrast; "auto" folgt der Systemeinstellung.
 * Nur Systemschriften, keine externen Ressourcen.
 */

:root {
    --bg: #FAFBFC;
    --surface: #FFFFFF;
    --surface-soft: #EEF7F0;
    --sage: rgba(206, 241, 214, 0.4);
    --accent: #B6FF3B;
    --on-accent: #173126;
    --text: #173126;
    --muted: #3D5E4D;
    --link: #173126;
    --border: #E5F0E8;
    --input-border: #6F8F7C;
    --error: #8A1C1C;
    --header-bg: rgba(250, 251, 252, 0.92);
    --portrait-ring: #F2FBF4;
    --art-line: #CFE5D6;
    --art-dark: #173126;
    --art-dark-line: #3F6B56;
    --placeholder-border: #5F8A70;
    --shadow: 0 6px 24px rgba(23, 49, 38, 0.05);
    --shadow-strong: 0 20px 50px rgba(23, 49, 38, 0.2);
    --padding-s: 16px;
    --padding-m: 32px;
    --radius: 20px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-readable: Verdana, Tahoma, "DejaVu Sans", "Segoe UI", sans-serif;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #0F1A15;
    --surface: #16241D;
    --surface-soft: #1D3027;
    --sage: rgba(120, 190, 140, 0.08);
    --accent: #B6FF3B;
    --on-accent: #10210F;
    --text: #E6F2EA;
    --muted: #B5CBBD;
    --link: #E6F2EA;
    --border: #2C4337;
    --input-border: #7A9A87;
    --error: #FF9B9B;
    --header-bg: rgba(15, 26, 21, 0.92);
    --portrait-ring: #1D3027;
    --art-line: #3F6B56;
    --art-dark: #0A120E;
    --art-dark-line: #3F6B56;
    --placeholder-border: #8FB39C;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    --shadow-strong: 0 20px 50px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg: #0F1A15;
        --surface: #16241D;
        --surface-soft: #1D3027;
        --sage: rgba(120, 190, 140, 0.08);
        --accent: #B6FF3B;
        --on-accent: #10210F;
        --text: #E6F2EA;
        --muted: #B5CBBD;
        --link: #E6F2EA;
        --border: #2C4337;
        --input-border: #7A9A87;
        --error: #FF9B9B;
        --header-bg: rgba(15, 26, 21, 0.92);
        --portrait-ring: #1D3027;
        --art-line: #3F6B56;
        --art-dark: #0A120E;
        --art-dark-line: #3F6B56;
        --placeholder-border: #8FB39C;
        --shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
        --shadow-strong: 0 20px 50px rgba(0, 0, 0, 0.5);
        color-scheme: dark;
    }
}

:root[data-theme="contrast"] {
    --bg: #000000;
    --surface: #000000;
    --surface-soft: #1A1A1A;
    --sage: transparent;
    --accent: #FFFF00;
    --on-accent: #000000;
    --text: #FFFFFF;
    --muted: #FFFFFF;
    --link: #FFFF00;
    --border: #FFFFFF;
    --input-border: #FFFFFF;
    --error: #FF8080;
    --header-bg: #000000;
    --portrait-ring: #000000;
    --art-line: #FFFFFF;
    --art-dark: #000000;
    --art-dark-line: #FFFFFF;
    --placeholder-border: #FFFF00;
    --shadow: none;
    --shadow-strong: none;
    color-scheme: dark;
}

/* Barrierefreiheit: Schriftgröße, Lesehilfen */
:root[data-fontsize="115"] { font-size: 115%; }
:root[data-fontsize="130"] { font-size: 130%; }
:root[data-fontsize="150"] { font-size: 150%; }

:root[data-readable] body {
    font-family: var(--font-readable);
}

:root[data-spacing] body {
    line-height: 1.8;
    letter-spacing: 0.05em;
    word-spacing: 0.12em;
}

:root[data-spacing] p,
:root[data-spacing] li {
    margin-bottom: 0.6em;
}

:root[data-links] a,
:root[data-theme="contrast"] a {
    text-decoration: underline !important;
    text-underline-offset: 0.18em;
}

:root[data-focus] :focus-visible,
:root[data-theme="contrast"] :focus-visible {
    outline: 4px solid var(--accent);
    outline-offset: 3px;
    box-shadow: 0 0 0 8px var(--text);
}

:root[data-motion] {
    scroll-behavior: auto;
}

:root[data-motion] *,
:root[data-motion] *::before,
:root[data-motion] *::after {
    animation: none !important;
    transition: none !important;
}

:root[data-theme="contrast"] .floating-circles {
    display: none;
}

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

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3 {
    line-height: 1.15;
}

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

ul, ol {
    list-style: none;
}

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: var(--padding-s);
    top: -100px;
    z-index: 100;
    background: var(--accent);
    color: var(--on-accent);
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
}

.skip-link:focus {
    top: var(--padding-s);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--padding-s);
}

main,
.site-header,
.site-footer {
    position: relative;
    z-index: 1;
}

/* Hintergrundkreise */
.floating-circles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: var(--sage);
}

.circle-1 { width: 520px; height: 520px; top: -160px; right: -140px; }
.circle-2 { width: 300px; height: 300px; top: 38%; left: -120px; }
.circle-3 { width: 180px; height: 180px; bottom: 6%; right: 8%; }

/* Animation beim Laden */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main > section,
main > article {
    animation: fadeInUp 0.8s ease both;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
    backdrop-filter: blur(6px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-square {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 3px;
    flex-shrink: 0;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
}

.site-nav {
    margin-left: auto;
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
}

.nav-link {
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 0;
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    border-bottom-color: var(--accent);
}

.header-tools {
    order: 3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-button,
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.tool-button:hover,
.menu-toggle:hover {
    border-color: var(--text);
}

.menu-toggle {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid var(--text);
    background: transparent;
    color: var(--text);
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.btn-outline {
    background: transparent;
}

.btn[disabled] {
    opacity: 0.6;
    cursor: progress;
}

/* Hero */
.hero {
    padding: 56px 0 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: center;
}

.eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
    overflow-wrap: anywhere;
}

.lead {
    font-size: 1.15rem;
    margin-bottom: 30px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.portrait {
    text-align: center;
}

.portrait-circle {
    width: min(340px, 80vw);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--sage);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 0 46px var(--portrait-ring);
    overflow: hidden;
}

.portrait-circle.has-image {
    box-shadow: 0 0 0 10px var(--portrait-ring);
}

.portrait-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portrait-circle span {
    font-size: 3rem;
    font-weight: 500;
}

.portrait figcaption {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Karten allgemein */
.card,
.sector-grid,
.cert {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tag {
    font-size: 0.85rem;
    color: var(--muted);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.section-head h2 {
    font-size: 1.7rem;
}

.link-accent {
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 88%/100% 6px;
}

/* Aufgabenbereiche */
.sectors {
    margin: 24px auto 0;
}

.sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    padding: 8px;
}

.sector {
    display: flex;
    gap: 18px;
    padding: 24px;
    align-items: flex-start;
}

.sector svg {
    flex-shrink: 0;
}

.sector h3 {
    font-size: 1.15rem;
    margin-bottom: 2px;
}

.sector p:not(.tag) {
    font-size: 0.95rem;
    margin-top: 6px;
}

/* Projekte */
.projects {
    padding: 64px 16px 16px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px;
}

.project-art {
    width: 170px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-img {
    padding: 0;
    object-fit: cover;
}

.project-art span {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: var(--art-line);
}

.project-art-light {
    background: var(--surface-soft);
}

.project-art-dark {
    background: var(--art-dark);
    border: 1px solid var(--border);
}

.project-art-dark span {
    background: var(--art-dark-line);
}

.project-body h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.project-body p {
    font-size: 0.92rem;
}

.round-arrow {
    margin-left: auto;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.round-arrow:hover {
    background: var(--accent);
    color: var(--on-accent);
}

/* Zwei Spalten: Weg und Zertifikate */
.split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    margin-top: 40px;
}

.panel {
    padding: 28px;
}

.timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    padding-top: 26px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    top: 9px;
    height: 2px;
    background: var(--border);
}

.timeline li {
    position: relative;
    padding-right: 8px;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: 0;
    top: -21px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
}

.year {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
}

.timeline h3 {
    font-size: 1.05rem;
    margin: 4px 0;
}

.timeline p {
    font-size: 0.9rem;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.cert-grid-wide {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.cert {
    padding: 20px;
}

.cert h2,
.cert h3 {
    font-size: 1rem;
    margin: 12px 0 4px;
}

.cert-grid-wide .cert h2 {
    font-size: 1.15rem;
}

.cert p {
    font-size: 0.88rem;
}

.cert-image {
    max-height: 120px;
    width: auto;
    border-radius: 8px;
}

.cert dl,
.facts,
.project-page-card dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin-top: 12px;
    font-size: 0.9rem;
}

.cert dt,
.facts dt,
.project-page-card dt {
    font-weight: 700;
}

.cert dd a + a {
    margin-left: 12px;
}

/* Kontakt-Aufruf */
.contact {
    margin-top: 40px;
    padding: 40px 16px 24px;
    text-align: center;
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.contact p {
    margin-bottom: 22px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 28px;
    padding: 22px 0 48px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-inner .logo {
    font-size: 1rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 0.9rem;
}

.footer-links a {
    text-decoration: none;
}

.footer-links a:hover,
.footer-links a[aria-current] {
    text-decoration: underline;
}

.footer-note {
    width: 100%;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Rechtliche Unterseiten */
.legal {
    max-width: 820px;
    padding: 40px var(--padding-s) 32px;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    font-weight: 700;
}

.legal h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 8px;
}

.legal .meta {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 24px;
}

.legal h2 {
    font-size: 1.2rem;
    margin: 30px 0 10px;
}

.legal h3 {
    font-size: 1.05rem;
    margin: 20px 0 8px;
}

.legal p {
    margin-bottom: 10px;
}

.notice {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 6px solid var(--accent);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.preview-notice {
    margin: 16px 0 0;
}

.placeholder {
    background: var(--surface-soft);
    border: 1px dashed var(--placeholder-border);
    border-radius: 6px;
    padding: 0 6px;
    font-style: italic;
}

/* Fließtext aus dem Redaktionssystem */
.rich ul,
.rich ol {
    padding-left: 1.4em;
    margin: 0 0 12px;
}

.rich ul {
    list-style: disc;
}

.rich ol {
    list-style: decimal;
}

.rich li {
    margin-bottom: 4px;
}

.rich p {
    margin-bottom: 10px;
}

.rich h2,
.rich h3,
.rich h4 {
    margin: 24px 0 10px;
}

.rich > :first-child {
    margin-top: 0;
}

.prose {
    max-width: 760px;
    margin-top: 24px;
}

.page-image,
.project-hero {
    display: block;
    border-radius: var(--radius);
    margin: 8px 0 24px;
}

/* Unterseiten: Inhalt, Formular, Filter, FAQ, Lebenslauf */
.page-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.page-section h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 12px;
    overflow-wrap: anywhere;
}

.lead-text {
    font-size: 1.1rem;
    margin-bottom: 28px;
    max-width: 680px;
}

.sub-heading {
    font-size: 1.4rem;
    margin: 40px 0 16px;
}

.page-note {
    font-size: 0.92rem;
    color: var(--muted);
    margin: 12px 0 20px;
}

.chip {
    display: inline-block;
    background: var(--surface-soft);
    color: var(--text);
    border-radius: 999px;
    padding: 2px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.child-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.child-list h3 {
    margin-bottom: 6px;
}

/* Kontakt */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 24px;
    align-items: start;
}

.contact-grid h2 {
    font-size: 1.3rem;
    margin-bottom: 14px;
}

.contact-grid p {
    margin-bottom: 10px;
}

.form-hint {
    font-size: 0.9rem;
    color: var(--muted);
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.optional {
    font-weight: 400;
    color: var(--muted);
}

.field input,
.field textarea {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 12px 14px;
}

.field textarea {
    resize: vertical;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
    border: 2px solid var(--error);
}

.field-error {
    color: var(--error);
    font-size: 0.9rem;
    font-weight: 700;
    min-height: 1.2em;
    margin-top: 4px;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.privacy-note {
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.contact-form .btn {
    width: 100%;
}

.form-status {
    margin-top: 16px;
    font-size: 0.95rem;
}

.form-status:empty {
    display: none;
}

.form-status.info,
.form-status.success {
    background: var(--surface-soft);
    border-left: 6px solid var(--accent);
    padding: 12px 14px;
    border-radius: 10px;
}

.form-status.success {
    font-weight: 700;
}

.form-status.error {
    color: var(--error);
    font-weight: 700;
}

/* Portfolio */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-bar button {
    font: inherit;
    font-weight: 700;
    min-height: 44px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 2px solid var(--text);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.filter-bar button[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.project-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-page-card {
    padding: 24px;
}

.project-page-card h2 {
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.project-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 14px;
}

.more-link {
    margin-top: 14px;
}

.project-detail .facts {
    margin: 0 0 24px;
}

/* Über mich */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 24px;
}

.about-grid .card + .card {
    margin-top: 16px;
}

.about-portrait .portrait-circle {
    width: min(280px, 70vw);
}

.split-text {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.split-text h2 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.page-sectors {
    margin-top: 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.skills-grid h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.skills-grid .panel {
    padding: 22px;
}

.cv {
    border-left: 2px solid var(--border);
    margin-left: 8px;
    padding-left: 28px;
}

.cv li {
    position: relative;
    padding-bottom: 28px;
}

.cv li::before {
    content: "";
    position: absolute;
    left: -36px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
}

.cv-date {
    font-size: 0.9rem;
    color: var(--muted);
}

.cv h3 {
    font-size: 1.1rem;
    margin: 4px 0;
}

.cv-result {
    font-size: 0.92rem;
}

/* FAQ */
.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    padding: 16px 52px 16px 20px;
    position: relative;
    min-height: 48px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 500;
}

.faq-item[open] summary::after {
    content: "–";
}

.faq-answer {
    padding: 0 20px 18px;
}

/* Dialog: Darstellung & Barrierefreiheit */
.prefs-dialog {
    margin: auto;
    width: min(520px, calc(100% - 2 * var(--padding-s)));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    padding: 24px;
}

.prefs-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.prefs-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.prefs-head h2 {
    font-size: 1.3rem;
}

.prefs-hint {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.prefs-form fieldset {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px 14px;
    margin-bottom: 14px;
}

.prefs-form legend {
    font-weight: 700;
    padding: 0 6px;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 12px;
}

.choice-list {
    display: grid;
    gap: 6px;
}

.prefs-form label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    cursor: pointer;
}

.prefs-form input[type="radio"],
.prefs-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.prefs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

/* Tablet */
@media (max-width: 968px) {
    .hero-grid,
    .split,
    .contact-grid,
    .about-grid,
    .project-list {
        grid-template-columns: 1fr;
    }

    .portrait {
        order: -1;
    }

    .sector-grid {
        grid-template-columns: 1fr;
    }

    .sector + .sector {
        border-top: 1px solid var(--border);
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobil (auch bei großer Schrift, da die Navigation sonst umbricht) */
@media (max-width: 1100px) {
    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        padding: 12px var(--padding-s) 20px;
    }

    .site-nav.open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .nav-link {
        display: block;
        padding: 12px 0;
        font-size: 1.05rem;
    }

    .header-content {
        position: relative;
    }
}

@media (max-width: 768px) {
    .tool-label {
        display: none;
    }

    .hero {
        padding-top: 32px;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .actions .btn {
        flex: 1 1 100%;
    }

    .timeline {
        grid-template-columns: 1fr;
        padding: 0 0 0 28px;
        gap: 22px;
    }

    .timeline::before {
        left: 6px;
        right: auto;
        top: 0;
        bottom: 0;
        width: 2px;
        height: auto;
    }

    .timeline li::before {
        top: 4px;
        left: -28px;
    }

    .cert-grid,
    .choice-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        flex-wrap: wrap;
    }

    .project-art {
        width: 100%;
    }

    .round-arrow {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media print {
    .site-header,
    .site-footer,
    .floating-circles,
    .skip-link,
    .back-link {
        display: none;
    }
}
