/* ============================================================
   saschathiesen.de: one file, no build step.
   Structure: tokens, base, layout, components, sections
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
    /* Dark scheme (default) */
    --bg:          #101014;
    --bg-elevated: #17171d;
    --line:        #26262e;
    --text:        #e9e7e2;
    --text-muted:  #a09da6;
    --accent:      #a78bfa;
    --accent-deep: #8b5cf6;
    --accent-glow: rgba(167, 139, 250, 0.12);
    --accent-contrast: #141414; /* text color ON the accent color */

    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas,
            "SF Mono", monospace;

    --width:  68rem;
    --radius: 10px;
    --speed:  0.25s ease;

    color-scheme: dark;
}

[data-theme="light"] {
    --bg:          #faf9f6;
    --bg-elevated: #ffffff;
    --line:        #e4e1da;
    --text:        #1c1b20;
    --text-muted:  #5f5c66;
    --accent:      #6d28d9;
    --accent-deep: #5b21b6;
    --accent-glow: rgba(109, 40, 217, 0.10);
    --accent-contrast: #ffffff;
    color-scheme: light;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        --bg:          #faf9f6;
        --bg-elevated: #ffffff;
        --line:        #e4e1da;
        --text:        #1c1b20;
        --text-muted:  #5f5c66;
        --accent:      #6d28d9;
        --accent-deep: #5b21b6;
        --accent-glow: rgba(109, 40, 217, 0.10);
        --accent-contrast: #ffffff;
        color-scheme: light;
    }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem; /* room for the sticky navigation */
    -webkit-text-size-adjust: 100%; /* phones in landscape must not inflate the text */
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    transition: background var(--speed), color var(--speed);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.75em; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a  { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

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

::selection { background: var(--accent); color: var(--bg); }

.container {
    max-width: var(--width);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.container--narrow { max-width: 46rem; }

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0.5rem;
    background: var(--accent);
    color: var(--bg);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    z-index: 100;
}
.skip-link:focus { left: 0.5rem; }

/* ---------- Navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav {
    max-width: var(--width);
    margin-inline: auto;
    padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav__logo {
    font-family: var(--mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.nav__logo:hover { text-decoration: none; }
.nav__logo-dot { color: var(--accent); }

.nav__right {
    display: flex;
    align-items: center;
    gap: clamp(0.9rem, 2vw, 1.5rem);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.75rem);
}

/* Top navbar: links to standalone pages */
.nav__link {
    color: var(--text-muted);
    font-size: 1.02rem;
    font-weight: 600;
    padding-block: 0.35rem;
    border-bottom: 2px solid transparent;
    transition: color var(--speed), border-color var(--speed);
}
.nav__link:hover, .nav__link:focus-visible { color: var(--text); text-decoration: none; }
.nav__link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Language switcher: flag + code button with a dropdown menu */
.lang { position: relative; }

.lang__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: color var(--speed), border-color var(--speed);
}
.lang__toggle:hover, .lang__toggle:focus-visible { color: var(--text); border-color: var(--accent); }

/* Thin ring so light flags (white/gold) stay visible on any background */
.lang__flag {
    width: 1.3rem;
    height: auto;
    flex: none;
    border-radius: 2px;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 14%, transparent);
}

.lang__chevron { transition: transform var(--speed); }
.lang__toggle[aria-expanded="true"] .lang__chevron { transform: rotate(180deg); }

.lang__menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    min-width: 10.5rem;
    padding: 0.35rem;
    flex-direction: column;
    gap: 0.15rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 20;
}
.lang__menu.open { display: flex; }

.lang__option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.55rem;
    border-radius: calc(var(--radius) - 4px);
    color: var(--text-muted);
    font-weight: 600;
    transition: color var(--speed), background var(--speed);
}
.lang__option:hover, .lang__option:focus-visible {
    color: var(--text);
    background: var(--accent-glow);
    text-decoration: none;
}
.lang__option.active { color: var(--accent); }
.lang__option.active::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    margin-left: auto;
    border-radius: 50%;
    background: var(--accent);
}

.theme-toggle {
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--speed), border-color var(--speed);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle__moon { display: none; }
[data-theme="light"] .theme-toggle__moon { display: block; }
[data-theme="light"] .theme-toggle__sun { display: none; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .theme-toggle__moon { display: block; }
    :root:not([data-theme]) .theme-toggle__sun { display: none; }
}

.nav__burger { display: none; }

@media (max-width: 44rem) {
    .nav__burger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        padding: 0.5rem;
        cursor: pointer;
    }
    .nav__burger span {
        width: 22px;
        height: 2px;
        background: var(--text);
        transition: transform var(--speed), opacity var(--speed);
    }
    .nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
    .nav__burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

    .nav__list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
    }
    .nav__list.open { display: flex; }
}

/* ---------- Side nav (page sections, vertical bar) ---------- */
.side-nav {
    display: none;
    position: fixed;
    left: clamp(1rem, 2.5vw, 2.5rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
}
@media (min-width: 88rem) { .side-nav { display: block; } }

.side-nav ul { display: grid; gap: 0.9rem; }

.side-nav__link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    transition: color var(--speed);
}
.side-nav__link::before {
    content: "";
    width: 1.1rem;
    height: 1px;
    background: var(--line);
    transition: width var(--speed), background var(--speed);
}
.side-nav__link:hover { color: var(--text); text-decoration: none; }
.side-nav__link.active { color: var(--accent); }
.side-nav__link.active::before { width: 2rem; background: var(--accent); }

.side-nav__number {
    font-size: 0.68rem;
    opacity: 0.7;
}

/* ---------- Buttons & tags ---------- */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.98rem;
    transition: transform var(--speed), background var(--speed),
                color var(--speed), border-color var(--speed);
}
.button:hover { text-decoration: none; transform: translateY(-2px); }

.button--primary {
    background: var(--accent);
    color: var(--accent-contrast);
    border: 1px solid var(--accent);
}
.button--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.button--ghost {
    border: 1px solid var(--line);
    color: var(--text);
    background: transparent;
    cursor: pointer;
}
.button--ghost:hover { border-color: var(--accent); color: var(--accent); }

.button--small {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    align-self: flex-start;
}

.tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-muted);
    transition: border-color var(--speed), color var(--speed);
}
.tag:hover { border-color: var(--accent); color: var(--text); }
.tag--small { font-size: 0.78rem; padding: 0.15rem 0.6rem; }

/* ---------- Hero ---------- */
.hero {
    padding: clamp(5rem, 14vh, 9rem) 0 clamp(4rem, 10vh, 7rem);
    background:
        radial-gradient(ellipse 60% 45% at 70% 8%, var(--accent-glow), transparent 70%);
}
/* Tablet sizes and below: tighten the gap between sticky header and hero */
@media (max-width: 69rem) {
    .hero { padding-top: clamp(2.5rem, 6vh, 4.5rem); }
}
/* Phone sizes: tighten it further and make the layout denser */
@media (max-width: 31.25rem) {
    .hero { padding-top: 1.75rem; padding-bottom: 3rem; }
    .hero__cta .button { flex: 1 1 auto; text-align: center; }
    .hero-note { padding: 1.35rem; }
    .section { padding: 2.75rem 0; }
    .card { padding: 1.35rem; }
    .skills__group, .about__facts { padding: 1.25rem; }
}

.hero__kicker {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--accent);
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
}

.hero__headline {
    font-size: clamp(2.4rem, 6.5vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero__sub {
    max-width: 38rem;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 2.25rem;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* Home page hero: business card on the left, "currently" card on the right */
.hero__layout {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
@media (max-width: 56rem) { .hero__layout { grid-template-columns: 1fr; } }

/* ---------- "Currently" card (next to the hero) ---------- */
.hero-note {
    padding: 1.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px -20px var(--accent-glow);
}

.hero-note__kicker {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}
.hero-note__kicker::before {
    content: "";
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: var(--accent);
    animation: hero-note-pulse 2.2s ease-in-out infinite;
}
@keyframes hero-note-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); opacity: 1; }
    50%      { box-shadow: 0 0 0 6px var(--accent-glow); opacity: 0.6; }
}

.hero-note__title {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

.hero-note__text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
}

.hero-note__links {
    display: grid;
    gap: 0.4rem;
}
.hero-note__link {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 9vh, 6rem) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section__heading {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.section__number {
    font-family: var(--mono);
    font-size: 0.55em;
    font-weight: 400;
    color: var(--accent);
    vertical-align: 0.5em;
    margin-right: 0.9em;
}
.section__number::after { content: " —"; color: var(--line); }

.section__intro {
    color: var(--text-muted);
    max-width: 40rem;
    margin-bottom: 2.5rem;
}

/* ---------- Error page (404) ---------- */
.error { text-align: center; }
.error__inner { margin-inline: auto; }

.error__code {
    font-family: var(--mono);
    font-size: clamp(4.5rem, 18vw, 9rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    margin: 0 0 0.5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error__heading {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.error__text {
    max-width: 34rem;
    margin: 0 auto 2.25rem;
    color: var(--text-muted);
    font-size: clamp(1.02rem, 1.4vw, 1.15rem);
}

.error__cta { justify-content: center; }

/* ---------- About ---------- */
.about {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
@media (max-width: 50rem) { .about { grid-template-columns: 1fr; } }

.about__facts {
    display: grid;
    gap: 1.25rem;
    margin: 0;
    padding: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.about__fact dt {
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.15rem;
}
.about__fact dd { margin: 0; }

/* ---------- Skills ---------- */
.skills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.25rem;
}

.skills__group {
    padding: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.skills__title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}
.skills__title::before {
    content: "";
    display: inline-block;
    width: 0.55em;
    height: 0.55em;
    margin-right: 0.6em;
    border-radius: 2px;
    background: var(--accent);
}

.skills__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Projects ---------- */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1.25rem;
}

.card {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform var(--speed), border-color var(--speed), box-shadow var(--speed);
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 32px -16px var(--accent-glow),
                0 12px 32px -20px rgba(0, 0, 0, 0.4);
}

/* Whole card as a link (quick links on the home page) */
.card--clickable { color: inherit; }
.card--clickable:hover, .card--clickable:focus-visible { text-decoration: none; }
.card--clickable .card__link { color: var(--accent); }

.card__title { font-size: 1.15rem; margin-bottom: 0.6rem; }
.card__desc  { color: var(--text-muted); font-size: 0.97rem; flex-grow: 1; }
.card__tech  { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.card__link  { font-weight: 600; font-size: 0.95rem; }

/* ---------- Career ---------- */
.timeline {
    position: relative;
    padding-left: 1.75rem;
    max-width: 42rem;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--line);
}

.timeline__item { position: relative; padding-bottom: 2.25rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
    content: "";
    position: absolute;
    left: -1.75rem;
    top: 0.5em;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
}

.timeline__period {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--accent);
    margin-bottom: 0.2rem;
}
.timeline__role { font-size: 1.1rem; margin-bottom: 0.35rem; }
.timeline__company { font-weight: 400; color: var(--text-muted); }
.timeline__desc { color: var(--text-muted); font-size: 0.97rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-links { display: grid; gap: 0.6rem; }
.contact-links li { display: flex; gap: 1rem; align-items: baseline; }
.contact-links__label {
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    min-width: 5.5rem;
}

/* ---------- PGP page ---------- */
.section--top { padding-top: clamp(4rem, 12vh, 7rem); }

.pgp__subtitle {
    font-size: 1.1rem;
    margin: 2.5rem 0 0.9rem;
}
.pgp__subtitle::before {
    content: "";
    display: inline-block;
    width: 0.55em;
    height: 0.55em;
    margin-right: 0.6em;
    border-radius: 2px;
    background: var(--accent);
}

.pgp__block {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.pgp__block--column {
    flex-direction: column;
    align-items: stretch;
}

.pgp__fingerprint {
    font-family: var(--mono);
    font-size: clamp(0.82rem, 1.6vw, 1rem);
    letter-spacing: 0.06em;
    padding: 0.8rem 1.1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    /* Wrap the fingerprint on narrow screens instead of forcing a scroll;
       min-width:0 lets this flex item shrink below its content width. */
    white-space: pre-wrap;
    word-break: break-word;
    min-width: 0;
    max-width: 100%;
}

.pgp__key {
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.55;
    margin: 0;
    padding: 1.1rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    /* The armored key is one long base64 block: wrap it so it never overflows
       the viewport. Copying uses the element's text, so the real line breaks
       are preserved regardless of how it wraps on screen. */
    white-space: pre-wrap;
    word-break: break-all;
    min-width: 0;
}
.pgp__key--short { color: var(--text-muted); }

.pgp__note {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}
.pgp__subtitle + .pgp__note { margin-bottom: 1.1rem; }

/* ---------- Legal pages (Impressum, Datenschutz) ---------- */
.legal { margin-top: 2.25rem; }
.legal__title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.legal__text {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 44rem;
}
.legal__text:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--accent); }
.site-footer__sep { color: var(--line); margin-inline: 0.2rem; }
.site-footer__note {
    margin-top: 0.4rem;
    font-size: 0.82rem;
    opacity: 0.85;
}

/* ---------- Scroll effect: content pulls in towards the viewer ----------
   No parallax, the background stays still. Instead, elements start slightly
   scaled down and blurred ("further away") and scale up to full size as they
   enter the viewport ("pulled in"). */
.reveal {
    transform-origin: 50% 65%;
    transition: opacity 0.7s ease,
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.7s ease;
}
/* Only the "still distant" state is styled. The visible state stays
   undefined so hover transforms (e.g. card lift) are not overridden. */
.reveal:not(.visible) {
    opacity: 0;
    transform: scale(0.9);
    filter: blur(2px);
}

/* Without JavaScript and with reduced motion: everything visible right away */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal, .reveal:not(.visible) { opacity: 1; transform: none; filter: none; transition: none; }
    .button:hover, .card:hover { transform: none; }
    .hero-note__kicker::before { animation: none; }
}
.no-js .reveal:not(.visible) { opacity: 1; transform: none; filter: none; }

/* The print masthead is a paper-only element; keep it out of the screen flow. */
.print-masthead { display: none; }

/* ---------- Print: recruiters print application pages ----------
   Goal: a clean, ink-friendly A4 document that identifies the applicant,
   never clips content at page edges, and keeps related blocks together. */
@media print {
    /* 1. Paper geometry: fixed A4 with comfortable, even margins.
          The header/footer area of the page box stays empty (no browser
          date/URL stamps are added here; those are a browser setting). */
    @page {
        size: A4 portrait;
        margin: 18mm 16mm;
    }

    /* 2. Repaint the design tokens in ink-friendly values. Every component
          reads its colors from these variables, so overriding them here
          re-themes the whole page for paper in one place. */
    :root, [data-theme="dark"], [data-theme="light"] {
        --bg:          #ffffff;
        --bg-elevated: #ffffff;
        --line:        #cccccc;
        --text:        #000000;
        --text-muted:  #333333;
        --accent:      #5b21b6;
        --accent-glow: transparent;
        /* On screen the canvas is dark (color-scheme: dark). On paper we
           want a light canvas, otherwise transparent areas print black. */
        color-scheme: light;
    }

    /* 3. Force our chosen colors to actually print. Browsers strip
          backgrounds/colors by default to save ink; this opts back in so
          borders and the accent stay visible. */
    *, *::before, *::after {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* 4. Hide everything interactive or screen-only: it is either useless
          on paper (nav, theme toggle) or noise (call-to-action buttons). */
    .site-header, .side-nav, .site-footer, .skip-link,
    .hero__cta, .hero-note__links, .lang, .theme-toggle,
    .nav__burger { display: none; }

    /* 5. Show the paper-only masthead so the printout carries a name. */
    .print-masthead {
        display: block;
        margin-bottom: 1rem;
        padding-bottom: 0.6rem;
        border-bottom: 1.5pt solid var(--accent);
    }
    .print-masthead__name { font-size: 16pt; font-weight: 800; margin: 0; }
    .print-masthead__contact {
        font-size: 9pt;
        color: var(--text-muted);
        margin: 0.25rem 0 0;
    }

    /* 6. Print typography in point units so it is independent of the
          screen viewport and reliably sized on paper. Keep an explicit
          white fill so no dark page canvas shows through. */
    html, body { background: #ffffff; }
    body { font-size: 10.5pt; line-height: 1.5; }

    /* 7. Reclaim vertical space that only made sense on screen. */
    .hero    { padding: 0 0 1rem; background: none; }
    .section { padding: 1rem 0; }

    /* 8. The scroll-reveal animation must not leave content invisible on
          paper: pin everything to its final, fully-visible state. */
    .reveal, .reveal:not(.visible) {
        opacity: 1; transform: none; filter: none; transition: none;
    }
    .card:hover { transform: none; box-shadow: none; }

    /* 9. Page-break control — the heart of a proper print layout.
          Keep self-contained blocks from being split across two pages, */
    .card, .skills__group, .about__facts,
    .timeline__item, .hero-note { break-inside: avoid; }
    /*    keep a heading glued to the content it introduces, */
    .section__heading, .skills__title, .card__title,
    .timeline__role { break-after: avoid; }
    /*    and never strand a lone line at the top/bottom of a page. */
    p, li { orphans: 3; widows: 3; }

    /* 10. Links: on screen a color says "clickable"; on paper a link is
           dead unless its destination is written out. So print the target
           URL for every navigational link (the home tiles are whole-card
           links, the project links sit at the card foot).
           External links carry their full URL; internal ones store only a
           root-relative path (e.g. /de/dual-study/), so we prepend the
           canonical domain. */
    a { color: inherit; text-decoration: none; }
    a.card__link[href^="http"]::after,
    a.card--clickable[href^="http"]::after {
        content: " (" attr(href) ")";
    }
    a.card--clickable[href^="/"]::after {
        content: " (saschathiesen.de" attr(href) ")";
    }
    a.card__link[href^="http"]::after,
    a.card--clickable[href^="http"]::after,
    a.card--clickable[href^="/"]::after {
        display: block;
        margin-top: 0.4rem;
        font-family: var(--mono);
        font-size: 8.5pt;
        font-weight: 400;
        color: var(--text-muted);
        word-break: break-all;
    }
}
