/* Design tokens. Light and dark follow the system setting. The look is "bento": rounded tiles on a soft glowing
   background (see Mockups/Website-Mockups/Runde-2/1_bento). */
:root {
    --accent: #5b4bff;
    --accent-contrast: #ffffff;
    --accent-text: #4338ca;
    --gradient-a: #4338ca;
    --gradient-b: #9b1a7e;
    --bg: #f3f4fb;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --text: #151826;
    --muted: #5a6075;
    --border: rgba(21, 24, 38, 0.1);
    --glow-1: rgba(110, 91, 255, 0.28);
    --glow-2: rgba(224, 80, 158, 0.18);
    --glow-3: rgba(25, 182, 217, 0.18);
    --shadow: 0 10px 30px rgba(30, 30, 80, 0.08);
    --radius: 1.5rem;
    --radius-small: 0.9rem;
    --content-width: 75rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --accent: #8f94ff;
        --accent-contrast: #0a0e1c;
        --accent-text: #8f94ff;
        --gradient-a: #aab0ff;
        --gradient-b: #f58ad2;
        --bg: #0a0e1c;
        --surface: rgba(24, 29, 50, 0.72);
        --surface-strong: #171c31;
        --text: #e9ebf5;
        --muted: #9aa1b8;
        --border: rgba(255, 255, 255, 0.09);
        --glow-1: rgba(96, 80, 235, 0.5);
        --glow-2: rgba(200, 60, 140, 0.3);
        --glow-3: rgba(20, 150, 180, 0.28);
        --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(60rem 40rem at 0% -10%, var(--glow-1), transparent 70%),
        radial-gradient(45rem 38rem at 105% 15%, var(--glow-2), transparent 70%),
        radial-gradient(50rem 30rem at 45% 115%, var(--glow-3), transparent 70%);
    background-attachment: fixed;
    /* System font stack: no web fonts, so nothing is loaded from third parties. */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

h1:focus {
    outline: none;
}

h1, h2, h3 {
    line-height: 1.2;
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover { text-decoration: underline; }

a:focus-visible, button:focus-visible, .journey-rail:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 0.5rem;
}

code {
    background: var(--surface);
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
}

.container {
    width: 100%;
    max-width: var(--content-width);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

main.container {
    flex: 1;
    padding-block: 1.5rem 3.5rem;
}

/* ---- Header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 80%, transparent), transparent);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding-block: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    color: var(--text);
}

.brand:hover { text-decoration: none; color: var(--accent); }

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.65rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #6d5bff, #d946a8);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
    padding: 0.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.main-nav a {
    color: var(--muted);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.95rem;
}

.main-nav a:hover { color: var(--text); text-decoration: none; }

.main-nav a.active {
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
}

.lang-switch {
    display: flex;
    gap: 0.25rem;
}

.lang-switch a {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}

.lang-switch a:hover { text-decoration: none; color: var(--text); }

.lang-switch a.active {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
}

/* ---- Footer ---- */
.site-footer {
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-block: 1.25rem;
}

/* The line stands exactly under the tiles. */
.footer-inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1.25rem;
    right: 1.25rem;
    border-top: 1px solid var(--border);
}

.footer-inner nav {
    display: flex;
    gap: 1.25rem;
}

.footer-inner a { color: var(--muted); }

/* ---- Text blocks ---- */
.eyebrow {
    color: var(--accent-text);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
}

.gradient-text {
    background: linear-gradient(90deg, var(--gradient-a), var(--gradient-b));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.section {
    margin-top: 2.5rem;
}

.page-head {
    padding-block: 1rem 1.5rem;
    max-width: 52rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    border: 1px solid var(--text);
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); }

.btn-primary {
    background: var(--text);
    color: var(--bg);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.badge {
    display: inline-block;
    padding: 0.1rem 0.6rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
}

.link { font-weight: 600; color: var(--accent); }

a:hover .link, .link:hover { text-decoration: underline; }

.status { color: var(--muted); }

.pill-label {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--a1, var(--accent)) 18%, transparent);
    color: var(--a1, var(--accent));
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.9rem;
}

.pills, .tags, .checklist, .contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pills, .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pills li, .tags li {
    background: color-mix(in srgb, var(--text) 7%, transparent);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.2rem 0.8rem;
    font-size: 0.88rem;
}

.checklist li, .contact-list li {
    display: flex;
    gap: 0.6rem;
    padding: 0.3rem 0;
}

.checklist .bi, .contact-list .bi { color: var(--accent); }

.notice {
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

.muted { color: var(--muted); }

.steps { padding-left: 1.25rem; }
.steps li { margin-bottom: 0.4rem; }
.checksum code { word-break: break-all; font-size: 0.8rem; }

.app-title { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.app-icon { width: 56px; height: 56px; border-radius: 14px; }

/* ---- Tiles and the bento grid ---- */
.accent-violet { --a1: #7a66ff; --a2: #d04fd0; }
.accent-cyan   { --a1: #19b6d9; --a2: #6a7bff; }
.accent-pink   { --a1: #e5509f; --a2: #ff9f4a; }
.accent-amber  { --a1: #ffb43a; --a2: #ff6a5b; }
.accent-green  { --a1: #3ddc97; --a2: #19b6d9; }
.accent-blue   { --a1: #4f7cff; --a2: #8f5bff; }

.bento {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.tile {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    color: var(--text);
    min-width: 0;
}

a.tile:hover { text-decoration: none; border-color: color-mix(in srgb, var(--a1, var(--accent)) 60%, var(--border)); }

.tile h2:not(.tile-title) { font-size: 1.6rem; }
.tile > :last-child { margin-bottom: 0; }

.tile-title {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* start page */
.tile-hero { grid-column: span 8; padding: 2.25rem; background: linear-gradient(135deg, color-mix(in srgb, #6d5bff 30%, var(--surface)), var(--surface) 70%); }
.tile-about { grid-column: span 6; }
.tile-featured { grid-column: span 7; display: flex; gap: 1.25rem; align-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 22%, var(--surface)), var(--surface) 75%); }
.tile-journey { grid-column: span 5; background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 22%, var(--surface)), var(--surface) 75%); }
.tile-stack { grid-column: span 6; }
.tile-link { grid-column: span 3; display: flex; flex-direction: column; justify-content: space-between; font-weight: 600; color: var(--text); }
.tile-link .bi { font-size: 1.8rem; }
.tile-contact { grid-column: span 3; display: flex; flex-direction: column; justify-content: space-between; }
.tile-stack + .tile-contact { grid-column: span 6; }
.featured-icon { width: 4rem; height: 4rem; border-radius: 1rem; flex: none; }

/* detail pages */
.breadcrumb { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span[aria-hidden] { margin-inline: 0.25rem; }

.bento > .tile { grid-column: span 6; }
.bento > .tile-media { grid-column: span 8; padding: 0.75rem; overflow: hidden; }
.bento > .tile-facts { grid-column: span 4; }
.bento > .tile-wide { grid-column: span 12; }
.bento > .tile-image { grid-column: span 6; padding: 0.75rem; }
.bento > .home-bento-only { grid-column: auto; }

.home-bento > .tile { grid-column: span 6; }
.home-bento > .tile-hero { grid-column: span 12; }
.home-bento > .tile-featured { grid-column: span 7; }
.home-bento > .tile-journey { grid-column: span 5; }
.home-bento > .tile-stack { grid-column: span 6; }
.home-bento > .tile-link { grid-column: span 3; }
.home-bento > .tile-contact { grid-column: span 3; }
.home-bento > .tile-stack + .tile-contact { grid-column: span 6; }

.tile-media img, .tile-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 0.5rem);
    border: 1px solid var(--border);
}

.media-placeholder {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.4rem;
    min-height: 20rem;
    border-radius: calc(var(--radius) - 0.5rem);
    text-align: center;
    padding: 1rem;
    background:
        radial-gradient(18rem 12rem at 25% 30%, color-mix(in srgb, var(--a1, #7a66ff) 75%, transparent), transparent 70%),
        radial-gradient(18rem 14rem at 80% 75%, color-mix(in srgb, var(--a2, #d04fd0) 70%, transparent), transparent 70%),
        var(--surface-strong);
}

.media-placeholder span { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 800; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4); }
.media-placeholder small { color: rgba(255, 255, 255, 0.8); }

.facts { margin: 0 0 1.25rem; }
.facts div { display: flex; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--muted); min-width: 4.5rem; }
.facts dd { margin: 0; font-weight: 600; }


.step-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.step { display: flex; flex-direction: column; gap: 0.25rem; color: var(--text); }
.step.next { grid-column: 2; text-align: right; }
.step.prev { grid-column: 1; }
.step-label { color: var(--muted); font-size: 0.85rem; }
.step-name { font-size: 1.3rem; font-weight: 700; }

/* ---- Projects page (large projects) ---- */
.card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.card-head h2, .card-head h3 { margin: 0; }

/* ---- The path: connected stops you scroll through, a preview below ---- */
.journey { margin-top: 0.5rem; }

.journey-rail {
    --stop-width: 14.5rem;
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 1.5rem max(1.25rem, calc(50% - var(--stop-width) / 2));
    scrollbar-width: none;
    cursor: grab;
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.journey-rail::-webkit-scrollbar { display: none; }
.journey-rail.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.journey-stop { -webkit-user-drag: none; }

.journey-controls { display: flex; justify-content: flex-end; gap: 0.5rem; }
.rail-button {
    width: 2.4rem; height: 2.4rem; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.rail-button:hover:not(:disabled) { border-color: var(--a1, currentColor); }
.rail-button:disabled { opacity: 0.35; cursor: default; }

.journey-stop {
    position: relative;
    flex: none;
    width: var(--stop-width);
    margin-right: 2.5rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-small);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    scroll-snap-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    opacity: 0.72;
    user-select: none;
}

.journey-stop:last-child { margin-right: 0; }

/* The line between two stops, in the colors of the stop it leaves. */
.journey-stop:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    width: 2.5rem;
    height: 3px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, var(--a1), var(--a2));
    border-radius: 2px;
}

.journey-stop:hover { text-decoration: none; opacity: 1; }

.journey-stop.active {
    opacity: 1;
    transform: translateY(-4px) scale(1.04);
    border-color: var(--a1);
    box-shadow: 0 0 0 1px var(--a1), 0 12px 34px color-mix(in srgb, var(--a1) 40%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 22%, var(--surface-strong)), var(--surface-strong) 80%);
}

.stop-number {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--a1);
}

.stop-name { font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.stop-tech { font-size: 0.8rem; color: var(--muted); }

.journey-preview {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
    margin-top: 0.5rem;
    padding: 1.1rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 14%, var(--surface)), var(--surface) 70%);
    border: 1px solid color-mix(in srgb, var(--a1) 35%, var(--border));
    box-shadow: var(--shadow);
    color: var(--text);
}

.journey-preview:hover { text-decoration: none; border-color: var(--a1); }

.preview-media img {
    display: block;
    width: 100%;
    max-height: 22rem;
    object-fit: cover;
    object-position: top;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.preview-media.placeholder {
    display: grid;
    place-items: center;
    min-height: 15rem;
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    background:
        radial-gradient(16rem 11rem at 25% 30%, color-mix(in srgb, var(--a1) 75%, transparent), transparent 70%),
        radial-gradient(16rem 12rem at 80% 75%, color-mix(in srgb, var(--a2) 70%, transparent), transparent 70%),
        var(--surface-strong);
}

.preview-media.placeholder span { font-size: 1.6rem; font-weight: 800; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4); }

.preview-body { padding: 0.5rem 0.75rem 0.5rem 0; }
.preview-body h2 { font-size: 1.9rem; }
.preview-kind { color: var(--a1); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.4rem; }
.preview-body .pills { margin: 0.5rem 0 1rem; }

/* ---- Small screens ---- */
@media (max-width: 62rem) {
    .tile-hero, .tile-about, .tile-featured, .tile-journey, .tile-stack, .tile-contact, .tile-link,
    .home-bento > .tile-hero, .home-bento > .tile-about, .home-bento > .tile-featured,
    .home-bento > .tile-journey, .home-bento > .tile-stack, .home-bento > .tile-contact, .home-bento > .tile-link,
    .home-bento > .tile-stack + .tile-contact,
    .bento > .tile-media, .bento > .tile-facts { grid-column: span 12; }
    .bento > .tile, .bento > .tile-image { grid-column: span 12; }
    .journey-preview { grid-template-columns: 1fr; }
    .preview-body { padding: 0.25rem 0.5rem 0.5rem; }
}

@media (max-width: 36rem) {
    .header-inner { justify-content: center; }
    .main-nav { order: 3; width: 100%; justify-content: center; flex-wrap: nowrap; overflow-x: auto; }
    .main-nav a { padding: 0.4rem 0.55rem; font-size: 0.9rem; white-space: nowrap; }
    .tile { padding: 1.15rem; }
    .tile-hero { padding: 1.5rem; }
    .step-nav { grid-template-columns: 1fr; }
    .step.next, .step.prev { grid-column: 1; text-align: left; }
}

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

/* ---- code snippets on the detail pages: always a dark box, like a terminal ---- */
.code-title { font-weight: 700; margin-bottom: 0.75rem; }
.code-note { color: var(--muted); margin-top: 0.85rem; }

.code-box {
    --code-bg: #0f111a;
    --code-text: #d7dbe8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: calc(var(--radius) - 0.5rem);
    background: var(--code-bg);
    overflow: hidden;
}

.code-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0.9rem;
    background: #191c29;
    color: #9aa0b8;
    font-size: 0.85rem;
}

.code-file { font-family: Consolas, "Cascadia Mono", Menlo, monospace; }

.code-copy {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: #d7dbe8;
    border-radius: 999px;
    padding: 0.15rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.code-copy:hover { border-color: var(--a1, #7a66ff); }

.code-box pre {
    margin: 0;
    padding: 1rem 1.15rem;
    overflow-x: auto;
    max-height: 32rem;
    color: var(--code-text);
    font: 0.88rem/1.55 Consolas, "Cascadia Mono", Menlo, monospace;
    tab-size: 4;
}

.code-box code { font: inherit; background: none; padding: 0; color: inherit; }

.hljs-comment, .hljs-quote { color: #7d8aa8; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-doctag, .hljs-literal, .hljs-built_in { color: #c4a8ff; }
.hljs-string, .hljs-regexp, .hljs-attr, .hljs-meta .hljs-string { color: #8fe3a8; }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-attribute { color: #ffc27a; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-name, .hljs-selector-class, .hljs-selector-id { color: #7ec8ff; }
.hljs-type, .hljs-class .hljs-title, .hljs-title.class_ { color: #ffd479; }
.hljs-variable, .hljs-params, .hljs-property { color: #e6e9f5; }
.hljs-tag, .hljs-meta { color: #8a93b2; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* ---- contact page: the form and a note on the side ---- */
.contact-bento > .contact-form-tile { grid-column: span 8; }
.contact-bento > .contact-direct { grid-column: span 4; align-self: start; }
.contact-direct .contact-list li { padding: 0.4rem 0; overflow-wrap: anywhere; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.field input, .field textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-small);
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #e5484d; }
.field-error { color: #e5484d; margin: 0.35rem 0 0; font-size: 0.9rem; }
.field-count { color: var(--muted); font-size: 0.8rem; text-align: right; margin: 0.25rem 0 0; }

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

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.form-actions .muted { margin: 0; font-size: 0.85rem; flex: 1 1 14rem; }

.contact-done { text-align: center; padding: 2rem 1rem; }
.contact-done .bi { font-size: 3rem; color: #3ecf8e; }

@media (max-width: 800px) {
    .contact-bento > .contact-form-tile, .contact-bento > .contact-direct { grid-column: span 12; }
}

/* ---- more content: now tile, work list, projects, outro ---- */
.home-bento > .tile-stack { grid-column: span 6; }
.home-bento > .tile-link { grid-column: span 4; }
.home-bento > .tile-contact { grid-column: span 12; }
.home-bento > .tile-stack + .tile-contact { grid-column: span 12; }
.home-bento > .tile-link + .tile-contact { grid-column: span 8; }
.tile-contact p { margin: 0.25rem 0 0.75rem; }

.work-list li { align-items: flex-start; }
.work-list .bi { margin-top: 0.25rem; }
.skills-group { font-size: 1rem; color: var(--muted); margin: 1.25rem 0 0.6rem; font-weight: 700; }
.pills-quiet li { opacity: 0.85; }
.about-cta { margin-top: 2rem; font-size: 1.1rem; }

.projects-bento > .project-main { grid-column: span 12; display: flex; gap: 1.5rem; align-items: flex-start; }
.projects-bento > .tile:not(.project-main) { grid-column: span 6; }

.journey-outro { text-align: center; color: var(--muted); max-width: 40rem; margin: 1.5rem auto 0; }

.contact-side { grid-column: span 4; display: flex; flex-direction: column; gap: 1rem; align-self: start; }
.contact-bento > .contact-side { grid-column: span 4; }

.footer-note { color: var(--muted); font-size: 0.85rem; margin: 0.75rem auto 0; }

@media (max-width: 800px) {
    .home-bento > .tile-stack, .home-bento > .tile-link,
    .home-bento > .tile-contact, .home-bento > .tile-link + .tile-contact,
    .projects-bento > .tile:not(.project-main), .contact-bento > .contact-side { grid-column: span 12; }
    .projects-bento > .project-main { flex-direction: column; }
}
.project-main .pills { margin: 0.75rem 0 0.9rem; }
.footer-note { padding-bottom: 1.5rem; }

/* ---- the language menu (used when there are more languages than buttons) ---- */
.lang-menu { position: relative; display: block; }
.lang-menu > summary {
    list-style: none;
    cursor: pointer;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary::after { content: " ▾"; font-size: 0.8em; }
.lang-menu[open] > summary::after { content: " ▴"; }
.lang-menu > summary:hover { border-color: var(--muted); }
.lang-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lang-menu > ul {
    position: absolute;
    right: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.1rem;
    width: 30rem;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    margin: 0.4rem 0 0;
    padding: 0.35rem;
    list-style: none;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow);
    z-index: 20;
}
.lang-menu li a {
    display: block;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    padding: 0.45rem 0.7rem;
    color: var(--text);
    white-space: nowrap;
}
.lang-menu li a:hover { background: var(--surface); text-decoration: none; }
.lang-menu li a.active { background: var(--text); color: var(--bg); }
@media (max-width: 40rem) {
    /* On a phone the button sits in the middle of the header: the menu spans the screen instead of hanging off it. */
    .lang-menu > ul {
        position: fixed;
        left: 1rem;
        right: 1rem;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 7rem);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---- start page: fact sheet, working principles, grouped stack (these rules come last, they win over the older ones above) ---- */
.traits-quote { color: var(--muted); font-style: italic; margin: 0.9rem 0 0; }
.home-bento > .tile-glance { grid-column: span 12; }
.home-bento > .tile-featured { grid-column: span 7; }
.home-bento > .tile-journey { grid-column: span 5; }
.home-bento > .tile-work { grid-column: span 12; }
.home-bento > .tile-about { grid-column: span 5; align-self: start; }
.home-bento > .tile-stack { grid-column: span 7; }
.home-bento > .tile-link { grid-column: span 4; }
.home-bento > .tile-contact { grid-column: span 12; display: block; }
.home-bento > .tile-link + .tile-contact { grid-column: span 8; }

.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.glance > div { display: grid; grid-template-columns: auto 1fr; column-gap: 0.85rem; align-items: start; align-content: start; }
.glance .bi { grid-row: span 2; font-size: 1.5rem; color: var(--accent); line-height: 1.2; }
.glance dt { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.glance dd { margin: 0; font-weight: 600; }

.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.tile-work h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.tile-work p { margin: 0; color: var(--muted); }

.stack-groups { margin: 0; display: grid; gap: 0.9rem; }
.stack-groups dt { color: var(--muted); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.35rem; }
.stack-groups dd { margin: 0; }
.stack-groups .pills { margin: 0; }

@media (max-width: 62rem) {
    .home-bento > .tile-featured, .home-bento > .tile-journey, .home-bento > .tile-about, .home-bento > .tile-stack,
    .home-bento > .tile-link, .home-bento > .tile-contact, .home-bento > .tile-link + .tile-contact { grid-column: span 12; }
}

/* ---- privacy statement ---- */
.table-wrap { overflow-x: auto; margin: 0.75rem 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--muted); font-weight: 600; }
/* The objection notice must stand apart from the other information (Art. 21 (4) GDPR). */
.objection {
    border: 2px solid var(--accent);
    background: var(--surface-strong);
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-small);
    margin: 1.25rem 0 0;
}
.objection h3 { margin-top: 0; }
mark.todo { background: #ffe58a; color: #3a2a00; padding: 0 0.2rem; border-radius: 0.25rem; }

/* ---- review of the start, projects and PameliaChat pages (Nov 2026) ---- */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 30;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }
main:focus { outline: none; }

/* On the tinted tiles the light accent stays below 4.5:1; the darker one does not (in dark mode both are the same). */
.link, .badge { color: var(--accent-text); }

/* Jump targets stay clear of the sticky header. */
[id] { scroll-margin-top: 7.5rem; }
a.tile:focus-visible { border-radius: var(--radius); }

.eyebrow-open::before {
    content: "";
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: #3ddc97;
    vertical-align: 0.1em;
}
.tile-hero > p { max-width: 42rem; }

.home-bento > .tile-about { align-self: stretch; display: flex; flex-direction: column; }
.tile-about .link { margin-top: auto; align-self: flex-start; }

.projects-bento > .tile.project-highlight { grid-column: span 4; display: flex; flex-direction: column; }
.projects-bento > .tile.project-journey { grid-column: span 12; }
.project-highlight img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 14rem;
    object-fit: cover;
    object-position: top;
    border-radius: calc(var(--radius) - 0.5rem);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}
.project-highlight h2 { margin-bottom: 0.5rem; }
.project-highlight .pills { margin: 0 0 1rem; }
.project-highlight .link { margin-top: auto; }

.pamelia-bento > .tile.pamelia-features { grid-column: span 7; }
.pamelia-bento > .tile.pamelia-tech { grid-column: span 5; }
/* Two download cards share the width instead of leaving a third column empty. */
.card-grid.downloads { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); align-items: start; }
.card > h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; }
.card .checksum { margin-top: 1rem; }

@media (max-width: 62rem) {
    .glance, .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .projects-bento > .tile.project-highlight,
    .pamelia-bento > .tile.pamelia-features, .pamelia-bento > .tile.pamelia-tech { grid-column: span 12; }
}

@media (max-width: 36rem) {
    .glance, .work-grid { grid-template-columns: 1fr; }
    .tile-featured { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .tile-featured .featured-icon { width: 3rem; height: 3rem; }
}

/* ---- about page: finished courses ---- */
.course-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
    gap: 1rem;
}
.course-list li {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface);
}
.course-list p { margin: 0 0 0.35rem; }
.course-name { font-weight: 700; }
.course-used { font-size: 0.95rem; }
.about-courses { font-size: 0.95rem; }

/* ---- start page: the portrait next to the name ---- */
.hero-with-photo {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 2.25rem;
    align-items: center;
}
.hero-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-small);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.hero-text > p { max-width: 42rem; }
.hero-text > :last-child { margin-bottom: 0; }

@media (max-width: 48rem) {
    .hero-with-photo { grid-template-columns: 1fr; gap: 1.25rem; }
    .hero-photo { width: 10rem; }
}

/* ---- PameliaChat page: how it works, who can read what ---- */
.how-steps {
    list-style: none;
    counter-reset: how;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.how-steps li { counter-increment: how; }
.how-steps h3::before {
    content: counter(how);
    display: inline-grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    margin-right: 0.6rem;
    border-radius: 50%;
    background: var(--text);
    color: var(--bg);
    font-size: 0.9rem;
}
.how-steps p { margin: 0; color: var(--muted); }
.data-table tbody th { font-weight: 600; color: var(--text); }
.platform { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.6rem; font-weight: 600; }
@media (max-width: 62rem) { .how-steps { grid-template-columns: 1fr; } }

/* ---- PameliaChat page: screenshots ---- */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.shot { margin: 0; padding: 0.75rem; }
.shot:first-child { grid-column: span 3; }
.shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 0.5rem);
    border: 1px solid var(--border);
}
.shot figcaption { color: var(--muted); font-size: 0.9rem; padding: 0.6rem 0.25rem 0.1rem; }
@media (max-width: 48rem) { .shots { grid-template-columns: 1fr; } .shot:first-child { grid-column: auto; } }

/* ---- footer: websites of friends, a menu that opens upwards ---- */
.footer-inner nav { align-items: center; }
.friends { position: relative; }
.friends > summary { list-style: none; cursor: pointer; }
.friends > summary::-webkit-details-marker { display: none; }
.friends > summary::after { content: " ▴"; font-size: 0.8em; }
.friends[open] > summary::after { content: " ▾"; }
.friends > summary:hover { color: var(--text); }
.friends > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 0.5rem; }
.friends > ul {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    /* Starts at the left edge of "Freunde": on phones the word stands at the left of the screen. */
    left: 0;
    margin: 0;
    padding: 0.35rem;
    min-width: 12rem;
    list-style: none;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow);
    z-index: 20;
}
.friends li a { display: block; padding: 0.45rem 0.7rem; border-radius: 0.5rem; color: var(--text); white-space: nowrap; text-align: center; }
.friends li a:hover { background: color-mix(in srgb, var(--text) 7%, transparent); text-decoration: none; }

/* ---- about page: skills written like a configuration file, always a dark box like the code on the path ---- */
.skills-code {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.35rem 1rem;
    margin: 0;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: calc(var(--radius) - 0.5rem);
    background: #0f111a;
    font: 0.92rem/1.6 Consolas, "Cascadia Mono", Menlo, monospace;
}
.skills-code dt { color: #c4a8ff; }
.skills-colon { color: #8a93b2; }
.skills-code dd { margin: 0; color: #8fe3a8; }
@media (max-width: 36rem) {
    .skills-code { grid-template-columns: 1fr; gap: 0 0; }
    .skills-code dd { margin-bottom: 0.6rem; padding-left: 1.5rem; }
    .skills-code dd:last-child { margin-bottom: 0; }
}

/* ---- download page: the password form ---- */
.download-unlock { max-width: 30rem; }
.download-unlock form { margin: 1rem 0; }
.download-unlock .muted { margin: 0; }

/* ---- download page: own server, commands to copy ---- */
.server-install { margin-top: 2.5rem; }
.server-install h3 { margin-top: 1.5rem; }
.command {
    margin: 0.4rem 0 0.2rem;
    padding: 0.55rem 0.8rem;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface-strong);
    font-size: 0.85rem;
}
.command code { font-family: Consolas, "Cascadia Mono", Menlo, monospace; white-space: pre; }
.command.wrap code { white-space: pre-wrap; }
