/* LymbIT — one stylesheet, no framework, no build step. */

:root {
    color-scheme: light dark;
    --paper: #f6f3ec;
    --paper-2: #ede8dc;
    --card: #fffdf8;
    --ink: #15161d;
    --ink-2: #4a4c58;
    --muted: #7a7c86;
    --line: #d9d3c4;
    --accent: #ff4f2e;      /* signal orange */
    --accent-ink: #ffffff;
    --marker: #d4f74a;      /* lime highlighter */
    --code-bg: #15161d;
    --code-ink: #e9e6dc;
    --shadow: 4px 4px 0 var(--ink);
    --radius: 14px;
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* Dark: follows the system unless the footer switch forced a theme. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
            --paper: #121319;
            --paper-2: #181a22;
            --card: #1d1f28;
            --ink: #f1eee6;
            --ink-2: #c3c1ba;
            --muted: #8d8f99;
            --line: #2e313d;
            --accent: #ff6a4d;
            --marker: #b9e02c;
            --code-bg: #0b0c10;
            --shadow: 4px 4px 0 var(--accent);
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #121319;
    --paper-2: #181a22;
    --card: #1d1f28;
    --ink: #f1eee6;
    --ink-2: #c3c1ba;
    --muted: #8d8f99;
    --line: #2e313d;
    --accent: #ff6a4d;
    --marker: #b9e02c;
    --code-bg: #0b0c10;
    --shadow: 4px 4px 0 var(--accent);
}
:root[data-theme="light"] { color-scheme: light; }

/* Hidden until main.js has swapped in the visitor's language (set by boot.js). */
.i18n-pending body { visibility: hidden; }

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 17px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--marker); color: #15161d; }

a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 28px; } }

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

/* ---------- top bar ---------- */

.topbar {
    position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--paper) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }

.logo { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.logo__mark { font-weight: 900; font-size: 1.5rem; letter-spacing: -0.04em; }
.logo__mark em {
    font-style: normal; color: var(--accent-ink); background: var(--accent);
    padding: 0 0.18em; margin-left: 0.04em; border-radius: 4px;
    display: inline-block; transform: rotate(-4deg);
}
.logo__mark--light { color: #f1eee6; }
.logo__sub { font: 500 0.72rem var(--mono); color: var(--muted); }

.nav { display: none; gap: 28px; font: 500 0.88rem var(--mono); }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--accent); }
@media (min-width: 820px) { .nav { display: flex; } }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 22px;
    font-weight: 700; text-decoration: none;
    color: var(--accent-ink); background: var(--accent);
    border: 2px solid var(--ink); border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--ghost { background: var(--card); color: var(--ink); }
/* The yuppie-apps "testing phase" sticker as a button: lime pill, mono capitals, tilted. */
.btn--sticker {
    background: var(--marker); color: #15161d; border-color: #15161d; border-radius: 999px;
    font: 700 0.85rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
    box-shadow: 4px 4px 0 var(--accent); transform: rotate(-2deg);
}
.btn--sticker:hover { transform: rotate(0) translate(-2px, -2px); box-shadow: 6px 6px 0 var(--accent); }
.btn--sticker:active { transform: rotate(0) translate(2px, 2px); box-shadow: 1px 1px 0 var(--accent); }
.btn--small { min-height: 40px; padding: 0 14px; font-size: 0.88rem; box-shadow: 3px 3px 0 var(--ink); }

/* ---------- hero ---------- */

.hero {
    padding: 64px 0 80px;
    background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px);
    background-size: 22px 22px;
    border-bottom: 2px solid var(--ink);
}
.hero__inner { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.35fr 1fr; container-type: inline-size; } }

.hero__text { display: grid; gap: 24px; }

.tag {
    justify-self: start; display: inline-flex; align-items: center; gap: 10px;
    font: 600 0.8rem var(--mono); padding: 6px 12px;
    background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #2bc46b; box-shadow: 0 0 0 0 #2bc46b88; animation: pulse 2s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 10px #2bc46b00; } }

h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 900; }
mark {
    color: var(--ink);
    background: linear-gradient(transparent 55%, var(--marker) 55% 92%, transparent 92%);
    padding: 0 0.05em;
}

.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 38em; }
.lead strong { color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 6px; }
/* The second button starts where the About text column (.split) starts. */
@media (min-width: 900px) {
    .actions { display: grid; grid-template-columns: calc((100cqi - 64px) / 2.4 + 64px) auto; gap: 0; justify-items: start; }
}

.hero__art { position: relative; }
.code {
    margin: 0; padding: 26px 24px; overflow-x: auto;
    font: 0.9rem/1.7 var(--mono);
    color: var(--code-ink); background: var(--code-bg);
    border: 2px solid var(--ink); border-radius: var(--radius);
    box-shadow: 8px 8px 0 var(--accent);
    transform: rotate(1.5deg);
}
.code .c { color: #8a8c98; }
.code .k { color: #ff8a70; }
.code .s { color: var(--marker); }
.code .n { color: #7cc6ff; }

.sticker {
    position: absolute; top: -34px; right: -6px; z-index: 1;
    width: 112px; height: 112px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    text-align: center; font: 700 0.74rem/1.15 var(--mono); text-transform: uppercase;
    background: var(--marker); color: #15161d;
    border: 2px solid var(--ink);
    transform: rotate(12deg);
    animation: wobble 6s ease-in-out infinite;
}
.sticker b { font: 900 1.7rem/0.9 var(--sans); }
.sticker span { white-space: nowrap; }
@keyframes wobble { 50% { transform: rotate(4deg) scale(1.04); } }

/* ---------- sections ---------- */

.section { padding: 88px 0; border-bottom: 2px solid var(--ink); }
.section--alt { background: var(--paper-2); }
.section__head { display: grid; gap: 10px; margin-bottom: 40px; max-width: 40em; }
.section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 850; }

.eyebrow { font: 600 0.8rem var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }

.split { display: grid; gap: 8px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.4fr; gap: 64px; } }

.prose { display: grid; gap: 18px; color: var(--ink-2); }

.facts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.facts li {
    display: grid; gap: 2px; padding: 16px;
    background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
}
.facts b { font-size: 1.9rem; font-weight: 900; color: var(--accent); line-height: 1; }
.facts span { font-size: 0.86rem; }

/* ---------- service cards ---------- */

.cards { display: grid; gap: 20px; }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card {
    display: grid; gap: 10px; align-content: start; padding: 26px;
    background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
    box-shadow: var(--shadow);
}
/* Portrait cards, taller than wide: 4:5 in two columns, a tall min-height in four. */
@media (min-width: 560px) { .card { aspect-ratio: 4 / 5; } }
@media (min-width: 980px) { .card { aspect-ratio: auto; min-height: 360px; } }  /* equal heights in one row */
.card h3 { font-size: 1.2rem; margin-top: 8px; }
.card p { color: var(--ink-2); font-size: 0.95rem; }
.card__icon {
    width: 44px; height: 44px; display: grid; place-content: center;
    font-size: 1.3rem; background: var(--marker); color: #15161d;
    border: 2px solid var(--ink); border-radius: 10px;
}
.card__icon--code { font: 700 0.85rem var(--mono); }

/* ---------- tech tiles ---------- */

.tiles { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

.tile {
    --c: var(--accent);
    display: grid; gap: 4px; align-content: end;
    min-height: 130px; padding: 18px; text-align: left; cursor: pointer;
    font: inherit; color: var(--ink);
    background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
    box-shadow: 4px 4px 0 var(--c);
    position: relative; overflow: hidden;
    transition: transform .18s, box-shadow .18s;
}
.tile:nth-child(odd)  { transform: rotate(-1deg); }
.tile:nth-child(even) { transform: rotate(1deg); }
.tile:hover, .tile:focus-visible { transform: rotate(0) translate(-3px, -3px); box-shadow: 7px 7px 0 var(--c); outline: none; }
.tile::before {
    content: ""; position: absolute; top: -26px; right: -26px;
    width: 70px; height: 70px; border-radius: 50%; background: var(--c); opacity: .9;
}
.tile--wide { grid-column: 1 / -1; min-height: 100px; }
.tile--wide:nth-child(n) { transform: rotate(-0.4deg); }
.tile--wide:hover, .tile--wide:focus-visible { transform: rotate(0) translate(-3px, -3px); }
.tile__name { font-weight: 850; font-size: 1.15rem; letter-spacing: -0.02em; }
.tile__sub { font: 0.75rem var(--mono); color: var(--muted); }
.tile__more { font: 600 0.72rem var(--mono); color: var(--c); margin-top: 6px; }

/* ---------- projects ---------- */

.projects { display: grid; gap: 24px; }
.project {
    display: grid; gap: 20px; padding: 26px;
    background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius);
}
@media (min-width: 820px) { .project { grid-template-columns: 1fr 2fr; gap: 36px; padding: 32px; } }
.project__meta { display: grid; gap: 6px; align-content: start; }
.project__when { font: 600 0.75rem var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.project h3 { font-size: 1.35rem; }
.project h3 a { text-decoration-color: var(--accent); text-underline-offset: 4px; }
.project__body { display: grid; gap: 12px; color: var(--ink-2); font-size: 0.97rem; }
.project__body strong { color: var(--ink); }

.chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font: 0.75rem var(--mono); padding: 3px 9px; border: 1.5px solid var(--ink); border-radius: 999px; }

/* ---------- contact ---------- */

.contact { background: var(--accent); color: #15161d; text-align: center; }
.contact__inner { display: grid; gap: 18px; justify-items: center; max-width: 820px; }
.contact .eyebrow { color: #15161d; }
.contact .lead { color: #15161d; opacity: .85; max-width: none; }
.contact .muted { color: #15161d; opacity: .75; }
.pin { width: 1em; height: 1em; vertical-align: -0.12em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
/* Hand-set line breaks only where there is room for them; the space before each <br> keeps the words apart. */
@media (max-width: 899px) { .contact br { display: none; } }
.mail {
    font: 800 clamp(1.3rem, 4.5vw, 2.2rem) var(--sans); letter-spacing: -0.02em;
    color: #15161d; text-decoration: none; word-break: break-all;
    padding: 10px 22px; background: #fffdf8; border: 2px solid #15161d; border-radius: 12px;
    box-shadow: 5px 5px 0 #15161d;
    transition: transform .15s, box-shadow .15s;
}
.mail:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 #15161d; }

/* ---------- footer ---------- */

.footer { background: #15161d; color: #a9abb5; padding: 64px 0; font-size: 0.86rem; }
.footer__grid { display: grid; gap: 40px; }
@media (min-width: 820px) { .footer__grid { grid-template-columns: 1fr 1.1fr 1.4fr; } }
.footer section, .footer__grid > div { display: grid; gap: 12px; align-content: start; }
.footer h4 { color: #f1eee6; font: 600 0.78rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.footer b { color: #f1eee6; }
.footer__claim { color: #f1eee6; }
.footer__small { font-size: 0.75rem; color: #7a7c86; }
/* Paragraph labels in the privacy column: light, underlined like the "show number" link. */
#datenschutz p > b, .footer__note > b { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #5a5d6a; }
.reveal { font: inherit; color: #f1eee6; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Language + theme switch. The footer is always dark, so fixed colours here. */
.prefs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1.5px solid #3a3d4a; border-radius: 10px; }
.seg button {
    min-width: 36px; height: 34px; padding: 0 7px; cursor: pointer;
    display: grid; place-content: center;
    font: 600 0.78rem var(--mono); color: #a9abb5;
    background: none; border: 0; border-radius: 7px;
}
.seg button:hover { color: #f1eee6; }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg button[aria-pressed="true"] { background: #f1eee6; color: #15161d; }
.seg svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.seg svg .fill { fill: currentColor; stroke: none; }

/* ---------- dialog ---------- */

.dialog {
    width: min(560px, calc(100vw - 32px)); padding: 30px 28px;
    color: var(--ink); background: var(--card);
    border: 2px solid var(--ink); border-radius: var(--radius);
    box-shadow: 8px 8px 0 var(--dialog-c, var(--accent));
}
.dialog::backdrop { background: rgb(21 22 29 / 0.55); backdrop-filter: blur(3px); }
.dialog h3 { font-size: 1.8rem; font-weight: 900; margin: 4px 0 18px; }
.dialog__close-form { position: absolute; top: 12px; right: 12px; }
.dialog__close {
    width: 40px; height: 40px; cursor: pointer; font-size: 1rem;
    background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px;
}
.dialog__list { margin: 0; display: grid; gap: 6px; }
.dialog__list dt { font: 600 0.75rem var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 10px; }
.dialog__list dd { margin: 0; color: var(--ink-2); }

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