/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #02735E;
    --primary-dark: #024a3d;
    --primary-light: #02735E;
    --secondary-color: #02735E;
    --accent-teal: #02735E;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --portfolio-chevron-size: 56px;
    --portfolio-chevron-stroke: 3.25;
    --portfolio-modal-close-size: 34px;
    --portfolio-modal-close-stroke: 2.4;
    --carousel-card-h: 430px;
    /* Einheitliche Akzentfarben (Skills, Portfolio, Experience-Tags, …) */
    /* Links (Themen & Fachgebiete): fortlaufender Verlauf grün -> gelb, in Listenreihenfolge */
    --palette-uxresearch: #0a7b6c;
    --palette-default: #0b8e55;
    --palette-design: #0b8e55;
    --palette-agentic: #0da034;
    --palette-3dtech: #0d7109;
    --palette-twins: #3a970c;
    --palette-xr: #4b6808;
    --palette-comm: #aa900e;
    --palette-rpa: #844b0b;
    /* Rechts (Tools & Workflows): fortlaufender Verlauf blau -> rot, in Listenreihenfolge */
    --palette-uxui: #0b2e8e;
    --palette-aitools: #140971;
    --palette-xrtools: #520da0;
    --palette-viz: #680a7b;
    --palette-animation: #970c7b;
    --palette-software: #680832;
    --palette-data: #aa0e18;
    --palette-rpatools: #84230b;
    /* Navbar: fester Platz fur Name + Rolle, damit die Icon-Leiste nicht springt */
    --nav-brand-title-slot: max(19rem, min(32rem, 44vw));
    /* Mask-Icons (Nav + Sektionsheader): eine Farblogik, kein filter-Morph */
    --icon-mask-easing: cubic-bezier(0.22, 0.61, 0.36, 1);
    --icon-mask-color-duration: 0.5s;
    --icon-mask-fill-default: var(--text-secondary);
    --icon-mask-fill-nav-hover: var(--primary-color);
    --icon-mask-fill-accent: #D1530A;
}

html {
    height: 100%;
    scrollbar-color: #bbb transparent;
    transition: scrollbar-color 0.2s ease;
}

/* Index: Scroll liegt in #page-scroll unter der Navbar – Scrollbar startet dort. */
html:has(.page-scroll) {
    overflow: hidden;
}

/* Alle Sections gleich hoch: mindestens die Höhe des Scroll-Viewports,
   Inhalt startet oben. Sections mit mehr Inhalt wachsen bei Bedarf weiter.
   Kein scroll-snap mehr: normales, natives Scrollen statt Snap-Ruckeln. */
section[id] {
    /* Scroll-Viewport = Fensterhöhe abzüglich Navbar (~80px) */
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Kein eigenes Top-Padding: die Karten/Container innerhalb jeder Section
       bringen bereits genug Innenabstand mit - zusätzliches Section-Padding
       erzeugt sonst unnötigen Leerraum über der Überschrift. */
    padding-top: 0;
}

/* Experience-Karte ist hoch und scrollt selbst - die Karte soll vertikal
   zentriert im Viewport stehen. */
#experience {
    justify-content: center;
}

/* Links-Karte: keine Vollbild-Mindesthöhe – sonst großer Leerraum bis zum Footer */
#contact {
    min-height: 0;
}

html.scrollbar-dark {
    scrollbar-color: #555 transparent;
}

html.scrollbar-dark .page-scroll,
html.scrollbar-dark {
    scrollbar-color: #555 transparent;
}

html.scrollbar-dark .page-scroll::-webkit-scrollbar-thumb,
html.scrollbar-dark::-webkit-scrollbar-thumb {
    background-color: #555;
}

.page-scroll::-webkit-scrollbar,
html::-webkit-scrollbar {
    width: 12px;
    background: transparent;
}

.page-scroll::-webkit-scrollbar-track,
html::-webkit-scrollbar-track {
    background: transparent;
}

.page-scroll::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb {
    background-color: #bbb;
    border-radius: 6px;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    overflow-x: hidden;
    min-height: 100vh;
}

body:has(.page-scroll) {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.page-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #bbb transparent;
    transition: scrollbar-color 0.2s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation – außerhalb von #page-scroll, bleibt oben ohne Overlay */
.navbar {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 20px;
    flex-wrap: nowrap;
    min-height: 80px;
    gap: 1rem;
}

.nav-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 var(--nav-brand-title-slot);
    min-width: var(--nav-brand-title-slot);
    max-width: var(--nav-brand-title-slot);
    overflow: hidden;
    opacity: 0;
    transition: opacity 300ms ease;
}

.nav-logo-link {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
    padding: 0.5rem 0.35rem;
    margin: -0.5rem -0.35rem;
    border-radius: 4px;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-logo-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: currentColor;
    transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-logo-link:hover::after,
.nav-logo-link:focus-visible::after {
    width: 28px;
    transition: width 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    opacity: 1;
    visibility: visible;
    display: block;
    transform: translateZ(0);
    /* Farbe steuert animations.js (schwarz wenn Name daneben sichtbar) */
    will-change: filter;
    transition: filter 0.3s ease;
}

/* Hover: Logo wie Markenname in Primary-Grün (#02735E), auch gegen Inline-Filter */
.nav-logo-link:hover .nav-logo,
.nav-logo-link:focus-visible .nav-logo {
    filter: brightness(0) saturate(100%) invert(28%) sepia(64%) saturate(720%) hue-rotate(134deg) brightness(92%) contrast(98%) !important;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
    white-space: nowrap;
}

.nav-role {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    width: 16ch;
    min-width: 16ch;
    opacity: 0;
    max-width: 0;
    overflow-y: auto;
    transition: opacity 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                max-width 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-role.visible {
    opacity: 1;
    max-width: 16ch;
}

.nav-role-always-visible {
    opacity: 1 !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex-shrink: 1 !important;
    overflow: hidden !important;
}

.nav-role-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    align-items: center;
    overflow: visible;
    flex: 0 0 auto;
    justify-content: flex-start;
    min-width: 0;
}

.nav-current-label {
    margin-left: 0.7rem;
    margin-right: 0.5rem;
    min-width: 120px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 1;
    transform: scale(1);
    transform-origin: left center;
    transition: opacity 120ms ease-out, transform 160ms ease-out;
}

.nav-current-label.is-fading {
    opacity: 0;
}

@media (max-width: 768px) {
    .nav-menu {
        justify-content: center;
    }
}

@media (min-width: 769px) {
    .nav-menu {
        margin-left: 2rem;
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-width: none;
        -ms-overflow-style: none;
        touch-action: pan-x;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-menu.is-panning {
        cursor: grabbing;
        user-select: none;
    }

    .nav-menu:not(.is-panning) {
        cursor: grab;
    }
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
                background 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
}

/* Gemeinsame Mask-Icon-Logik (Nav + Sektionsheader): nur background-color animieren */
.icon-mask {
    display: block;
    flex-shrink: 0;
    background-color: var(--icon-mask-fill-default);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    mask-mode: alpha;
    transition: transform 0.55s var(--icon-mask-easing),
                background-color var(--icon-mask-color-duration) var(--icon-mask-easing);
    filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
}

/* Inline (base64) SVG-Masken, damit die Icons auch ohne Server (file://) laden */
.icon-mask[data-nav="home"] {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYgMTlIOVYxM0gxNVYxOUgxOFYxMEwxMiA1LjVMNiAxMFYxOVpNNCAyMVY5TDEyIDNMMjAgOVYyMUgxM1YxNUgxMVYyMUg0WiIgZmlsbD0iIzFGMUYxRiIvPgo8L3N2Zz4K");
    mask-image: url("data:image/svg+xml;base64,PHN2ZyB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pZGRsZSIgZmlsbD0iIzFGMUYxRiIgZm9udC1zaXplPSIyMSIgZm9udC1mYW1pbHk9Ikdlb3JnaWEsICdUaW1lcyBOZXcgUm9tYW4nLCBUaW1lcywgc2VyaWYiIGZvbnQtd2VpZ2h0PSI3MDAiPsKnPC90ZXh0Pgo8L3N2Zz4K");
    mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8dGV4dCB4PSIxMiIgeT0iMTcuNSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzFGMUYxRiIgZm9udC1zaXplPSIyMSIgZm9udC1mYW1pbHk9Ikdlb3JnaWEsICdUaW1lcyBOZXcgUm9tYW4nLCBUaW1lcywgc2VyaWYiIGZvbnQtd2VpZ2h0PSI3MDAiPsKnPC90ZXh0Pgo8L3N2Zz4K");
}

.nav-link .nav-icon.icon-mask {
    width: 24px;
    height: 24px;
}

.nav-link .nav-text {
    display: none !important;
}

.nav-link:hover .nav-icon.icon-mask {
    transform: scale(1.16);
    background-color: var(--icon-mask-fill-nav-hover);
    filter: drop-shadow(0 0 6px rgba(2, 115, 94, 0.45));
}

.navbar .container:has(.nav-link:hover) .nav-current-label {
    transform: scale(1.06);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: currentColor;
    transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Icon-Nav: Tooltip unter dem Icon (nur Desktop; Mobil zeigt Text im Menü) */
@media (min-width: 769px) {
    .nav-link[data-tooltip]::before {
        content: attr(data-tooltip);
        position: absolute;
        left: 50%;
        top: calc(100% + 8px);
        transform: translateX(-50%) translateY(4px);
        padding: 0.4rem 0.65rem;
        background: rgba(20, 28, 32, 0.94);
        color: #f4f6f5;
        font-size: 0.75rem;
        font-weight: 500;
        line-height: 1.3;
        white-space: nowrap;
        border-radius: 6px;
        box-shadow: var(--shadow-md);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 1100;
        transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    }

    .nav-link[data-tooltip]:hover::before,
    .nav-link[data-tooltip]:focus-visible::before {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(2, 115, 94, 0.06);
}

.nav-link:hover::after {
    width: 28px;
    transition: width 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Aktiv (Scroll), Tastaturfokus auf Link; :has nur wenn Link auch .active (sonst bleibt Fokus in alter Sektion, v. a. Firefox) */
.nav-link.active .nav-icon.icon-mask,
.nav-link:focus-visible .nav-icon.icon-mask,
body:has(#home:focus-within) .nav-link[href$="#home"].active .nav-icon.icon-mask,
body:has(#experience:focus-within) .nav-link[href$="#experience"].active .nav-icon.icon-mask,
body:has(#education:focus-within) .nav-link[href$="#education"].active .nav-icon.icon-mask,
body:has(#skills:focus-within) .nav-link[href$="#skills"].active .nav-icon.icon-mask,
body:has(#portfolio:focus-within) .nav-link[href$="#portfolio"].active .nav-icon.icon-mask,
body:has(#contact:focus-within) .nav-link[href$="#contact"].active .nav-icon.icon-mask {
    transform: scale(1.06);
    background-color: var(--icon-mask-fill-accent);
    filter: drop-shadow(0 0 4px rgba(209, 83, 10, 0.35));
}

.nav-link.active::after,
.nav-link:focus-visible::after,
body:has(#home:focus-within) .nav-link[href$="#home"].active::after,
body:has(#experience:focus-within) .nav-link[href$="#experience"].active::after,
body:has(#education:focus-within) .nav-link[href$="#education"].active::after,
body:has(#skills:focus-within) .nav-link[href$="#skills"].active::after,
body:has(#portfolio:focus-within) .nav-link[href$="#portfolio"].active::after,
body:has(#contact:focus-within) .nav-link[href$="#contact"].active::after {
    width: 28px;
    transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-link.active,
.nav-link:focus-visible,
body:has(#home:focus-within) .nav-link[href$="#home"].active,
body:has(#experience:focus-within) .nav-link[href$="#experience"].active,
body:has(#education:focus-within) .nav-link[href$="#education"].active,
body:has(#skills:focus-within) .nav-link[href$="#skills"].active,
body:has(#portfolio:focus-within) .nav-link[href$="#portfolio"].active,
body:has(#contact:focus-within) .nav-link[href$="#contact"].active {
    color: var(--icon-mask-fill-accent);
}

.nav-link.active:hover {
    color: var(--icon-mask-fill-accent);
    background: rgba(209, 83, 10, 0.08);
}

@media (min-width: 769px) {
    .nav-link.hover-idle:hover::after {
        transition: width 1.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    }

    .nav-menu.nav-menu--collapse-fast .nav-link::after {
        transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Language Toggle Button - no border/background */
.nav-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    --nav-actions-circle: 28px;
}

.nav-action-circle {
    position: relative;
    z-index: 1002;
    width: var(--nav-actions-circle);
    height: var(--nav-actions-circle);
    margin: 0;
    padding: 0;
    border: 2px solid rgba(2, 115, 94, 0.35);
    border-radius: 50%;
    background: transparent;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: transform 160ms ease-out, border-color 160ms ease-out, background 160ms ease-out, color 160ms ease-out;
}

.nav-action-circle-mark {
    display: block;
    transform: translateY(0.5px);
}

.nav-legal-btn .nav-action-circle-mark {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    font-weight: 700;
    transform: translateY(0);
}

.nav-controls-help {
    cursor: help;
}

.nav-legal-btn {
    cursor: pointer;
}

/* Desktop: Rechtliches nur als Kreis-Button; Mobil: nur im Burger-Menü */
.nav-legal-menu-item {
    display: none;
}

@media (max-width: 768px) {
    .nav-legal-btn {
        display: none !important;
    }

    .nav-legal-menu-item {
        display: list-item;
    }
}

.nav-action-circle:hover,
.nav-action-circle:focus-visible,
.nav-legal-btn.is-active {
    transform: scale(1.06);
    border-color: var(--primary-dark);
    background: rgba(2, 115, 94, 0.08);
    color: var(--primary-dark);
}

.nav-legal-btn.is-active {
    transform: none;
}

.nav-action-circle:focus {
    outline: none;
}

.nav-action-circle:focus-visible {
    outline: 3px solid rgba(2, 115, 94, 0.55);
    outline-offset: 3px;
}

.nav-controls-help-tip {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 14rem;
    max-width: min(18rem, 70vw);
    padding: 0.65rem 0.75rem;
    border-radius: 6px;
    background: rgba(20, 28, 32, 0.94);
    color: #f4f6f5;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.45;
    white-space: pre-line;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    z-index: 1100;
}

.nav-controls-help:hover .nav-controls-help-tip,
.nav-controls-help:focus-visible .nav-controls-help-tip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1001;
    pointer-events: auto;
}

.lang-option {
    background: transparent;
    border: 2px solid transparent;
    width: var(--nav-actions-circle);
    height: var(--nav-actions-circle);
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out;
}

.lang-option img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lang-option.is-active {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 4px rgba(2, 115, 94, 0.42);
}

.lang-option:hover {
    transform: scale(1.06);
}

.lang-option:focus { outline: none; }
.lang-option:focus-visible {
    outline: 3px solid rgba(2, 115, 94, 0.55);
    outline-offset: 3px;
    border-radius: 50%;
}

/* Eng: nur aktive Flagge als Toggle (Klick wechselt DE ↔ EN) */
@media (max-width: 768px) {
    .lang-toggle {
        gap: 0;
    }

    .lang-toggle .lang-option:not(.is-active) {
        display: none;
    }

    .lang-toggle .lang-option.is-active {
        cursor: pointer;
    }
}

/* Language change transitions - smooth */
[data-i18n] {
    opacity: 1;
    transition: opacity 220ms ease-in-out;
}

body.lang-changing [data-i18n] {
    opacity: 0 !important;
    transition: opacity 220ms ease-in-out;
}

/* Rotierender Jobtitel (Hero + Nav): während Sprachwechsel sichtbar – Nav hat kein .role-rotating */
body.lang-changing #home .role[data-i18n="hero.role"],
body.lang-changing .nav-role[data-i18n="hero.role"] {
    opacity: 1 !important;
    visibility: visible !important;
}

.lang-toggle.changing .lang-option img {
    opacity: 0.35;
    transition: opacity 160ms ease-out;
}

/* Hero Section */
.hero {
    position: relative;
    /* Nicht vertikal zentrieren wie die anderen Sections: Banner liegt direkt
       unter der Navbar (Navbar ist außerhalb des Scroll-Roots). */
    justify-content: flex-start;
    padding-top: 0;
}

section:not(.experience) {
    position: relative;
}

.experience {
    position: relative;
}

.hero-banner {
    width: 100%;
    margin-top: 0;
    overflow: hidden;
    position: relative;
    margin-bottom: -100px;
    z-index: 1;
    display: flex;
    justify-content: center;
    max-height: min(78vh, 860px);
}

/* Gemeinsame sichtbare Fläche für BG + Person (beide werden hier begrenzt) */
.banner-stack {
    width: 100%;
    max-width: none;
    height: min(78vh, 860px);
    position: relative;
    overflow: hidden;
    background: var(--bg-white, #fff);
}

.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center 18%;
    will-change: transform;
    background: #fff;
    pointer-events: none;
    z-index: 0;
    display: block;
}

/* Wrapper skaliert bei Hover — die Keyframe-Animation auf dem img setzt eigenes transform und würde :hover sonst überschreiben */
.banner-person-wrap {
    position: absolute;
    /* Volle Stack-Höhe: Hemd nicht mehr unter dem Content-Overlap verstecken */
    top: 2%;
    right: 1%;
    bottom: 0;
    width: min(46vw, 720px);
    height: auto;
    max-width: none;
    pointer-events: auto;
    z-index: 1;
    transform-origin: right bottom;
    transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.banner-person-wrap:hover {
    transform: scale(1.025);
}

.banner-person {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: right bottom;
    box-sizing: border-box;
    display: block;
    opacity: 0;
    transform: translateX(42px);
    will-change: transform;
    /* Animation erst nach body.loaded – sonst oft schon „fertig“/mitten im Flug beim Reveal */
    animation: none;
    pointer-events: none;
}

body.loaded .banner-person {
    animation: bannerPersonIn 520ms cubic-bezier(0.22, 0.61, 0.36, 1) 80ms forwards;
}

/* Person.png ist vorab auf den sichtbaren Ausschnitt zugeschnitten (kein object-view-box → Chrome/Firefox/Safari gleich) */

/* Große Desktop-/Fullscreen-Viewports: Person deutlich präsenter */
@media (min-width: 1400px) {
    .hero-banner {
        max-height: min(82vh, 980px);
    }

    .banner-stack {
        height: min(82vh, 980px);
    }

    .banner-person-wrap {
        top: 0;
        width: min(48vw, 880px);
    }
}

@media (min-width: 1800px) {
    .hero-banner {
        max-height: min(84vh, 1080px);
    }

    .banner-stack {
        height: min(84vh, 1080px);
    }

    .banner-person-wrap {
        width: min(50vw, 980px);
    }
}

/* Firefox: leichte BG-Korrektur ohne Personen-Versatz nach oben */
@supports (-moz-appearance: none) {
    .banner-bg {
        top: 0;
        height: 100%;
    }
}

@keyframes bannerPersonIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero .container {
    display: block;
    position: relative;
    z-index: 1;
    padding: 0;
    max-width: 100%;
    width: 100%;
}

.hero-content-wrapper {
    width: 100%;
    /* Transparent: sonst deckt die weiße Fläche den unteren Hemd-Bereich der Person zu */
    background: transparent;
    padding: 0 4rem 2rem 4rem;
    box-shadow: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-left: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-left: 0;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.greeting-block {
    position: relative;
    display: inline-block;
    background: var(--accent-teal);
    padding: 2rem 2.5rem;
    margin-bottom: 1rem;
    margin-left: 3rem;
    margin-top: -100px;
    z-index: 10;
    width: auto;
    transition: opacity 200ms ease;
}

.greeting {
    font-size: 1.25rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    display: block;
    margin-bottom: 0;
    line-height: 1.2;
}

.name {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: white;
    margin: 0;
}

.hero-description {
    font-size: 1.125rem;
    margin: 0.75rem 0 1.5rem;
    padding: 1.75rem 0 0;
    color: var(--text-secondary);
    line-height: 1.8;
    background: transparent;
    box-shadow: none;
}

.hero-description p {
    margin-bottom: 1rem;
}

.hero-description .hero-lead {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.5;
}

.hero-description p:last-child {
    margin-bottom: 0;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0 1rem 0;
}

.hero-stats .stat-item {
    text-align: center;
    padding: 1rem 1.5rem;
    background: var(--bg-white);
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease, border-color 1s ease;
    border: 1px solid var(--border-color);
}

.hero-stats .stat-item:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.hero-stats .stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.hero-stats .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-teal);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-teal);
    border-color: var(--accent-teal);
}

.btn-secondary:hover {
    background: var(--accent-teal);
    color: white;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-placeholder {
    width: 400px;
    height: 500px;
    border-radius: 4px;
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.hero-photo {
    width: 100%;
    height: calc(100% - 120px);
    overflow: hidden;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-name-banner {
    width: 100%;
    height: 120px;
    background: var(--accent-teal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.hero-name-banner .name {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}


/* Section Styles */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    border-radius: 4px;
}

/* Hauptüberschriften: gleiche Icons wie Navbar, grüner Strich unter Icon + Text */
.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    position: relative;
    padding-bottom: 6px;
}

.section-heading-row::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--primary-color);
    border-radius: 4px;
}

.section-heading-row .section-title {
    margin-bottom: 0;
    text-decoration: none;
}

.section-heading-row .section-title::after {
    display: none;
}

.section-heading-icon.icon-mask {
    width: 40px;
    height: 40px;
}

/* Bereich mit Maus: Sektions-Header-Icon nutzt dieselbe Farb-Transition wie die Nav */
section:hover .section-heading-icon.icon-mask {
    background-color: var(--icon-mask-fill-accent);
}

/* About Section */
.about {
    background: var(--bg-light);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease;
}

.stat-item:hover {
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Skills Section */
.skills-main-card {
    background: white;
    padding: 3rem;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.skills-main-card .section-heading-row {
    margin-bottom: 3rem;
    margin-top: 0;
}

.skills-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 3rem;
    align-items: start;
    max-width: 100%;
}

.skills-column {
    min-width: 0;
}

.skills-column-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.875rem;
    padding: 0.35rem 0 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

.skills-column-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(32%) sepia(47%) saturate(1168%) hue-rotate(136deg) brightness(94%) contrast(97%);
}

.skills-column-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .skills-columns {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .skills-column-head {
        margin-bottom: 0.625rem;
    }

    .skills-column-title {
        font-size: 1.05rem;
    }
}

.skill-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem;
}

.skill-category {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: minmax(1.9rem, auto) auto;
    column-gap: 0.55rem;
    row-gap: 0.05rem;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Akzent pro Kategorie (Hover: Tags + Kopf nutzen dieselbe Farbe wie Cross-Highlight) */
.skill-category[data-skill-palette='default'],
.skill-category[data-skill-palette='design'] {
    --skill-category-accent: var(--palette-design);
}

.skill-category[data-skill-palette='agentic'] {
    --skill-category-accent: var(--palette-agentic);
}

.skill-category[data-skill-palette='aitools'] {
    --skill-category-accent: var(--palette-aitools);
}

.skill-category[data-skill-palette='twins'] {
    --skill-category-accent: var(--palette-twins);
}

.skill-category[data-skill-palette='xr'] {
    --skill-category-accent: var(--palette-xr);
}

.skill-category[data-skill-palette='3dtech'] {
    --skill-category-accent: var(--palette-3dtech);
}

.skill-category[data-skill-palette='comm'] {
    --skill-category-accent: var(--palette-comm);
}

.skill-category[data-skill-palette='uxresearch'] {
    --skill-category-accent: var(--palette-uxresearch);
}

.skill-category[data-skill-palette='viz'] {
    --skill-category-accent: var(--palette-viz);
}

.skill-category[data-skill-palette='animation'] {
    --skill-category-accent: var(--palette-animation);
}

.skill-category[data-skill-palette='uxui'] {
    --skill-category-accent: var(--palette-uxui);
}

.skill-category[data-skill-palette='software'] {
    --skill-category-accent: var(--palette-software);
}

.skill-category[data-skill-palette='data'] {
    --skill-category-accent: var(--palette-data);
}

.skill-category[data-skill-palette='xrtools'] {
    --skill-category-accent: var(--palette-xrtools);
}

.skill-category[data-skill-palette='rpa'] {
    --skill-category-accent: var(--palette-rpa);
}

.skill-category[data-skill-palette='rpatools'] {
    --skill-category-accent: var(--palette-rpatools);
}

/* Farbe pro Kategorie (data-highlight-palette setzt skillsCrossHighlight.js) */
#skills .skills-columns[data-highlight-palette='default'],
#skills .skills-columns[data-highlight-palette='design'] {
    --skill-highlight: var(--palette-design);
}

#skills .skills-columns[data-highlight-palette='agentic'] {
    --skill-highlight: var(--palette-agentic);
}

#skills .skills-columns[data-highlight-palette='aitools'] {
    --skill-highlight: var(--palette-aitools);
}

#skills .skills-columns[data-highlight-palette='twins'] {
    --skill-highlight: var(--palette-twins);
}

#skills .skills-columns[data-highlight-palette='xr'] {
    --skill-highlight: var(--palette-xr);
}

#skills .skills-columns[data-highlight-palette='3dtech'] {
    --skill-highlight: var(--palette-3dtech);
}

#skills .skills-columns[data-highlight-palette='comm'] {
    --skill-highlight: var(--palette-comm);
}

#skills .skills-columns[data-highlight-palette='uxresearch'] {
    --skill-highlight: var(--palette-uxresearch);
}

#skills .skills-columns[data-highlight-palette='viz'] {
    --skill-highlight: var(--palette-viz);
}

#skills .skills-columns[data-highlight-palette='animation'] {
    --skill-highlight: var(--palette-animation);
}

#skills .skills-columns[data-highlight-palette='uxui'] {
    --skill-highlight: var(--palette-uxui);
}

#skills .skills-columns[data-highlight-palette='software'] {
    --skill-highlight: var(--palette-software);
}

#skills .skills-columns[data-highlight-palette='data'] {
    --skill-highlight: var(--palette-data);
}

#skills .skills-columns[data-highlight-palette='xrtools'] {
    --skill-highlight: var(--palette-xrtools);
}

#skills .skills-columns[data-highlight-palette='rpa'] {
    --skill-highlight: var(--palette-rpa);
}

#skills .skills-columns[data-highlight-palette='rpatools'] {
    --skill-highlight: var(--palette-rpatools);
}

#skills .skills-columns[data-highlight-palette] .skill-tag--highlight-source,
#skills .skills-columns[data-highlight-palette] .skill-tag--highlight-source::after,
#skills .skills-columns[data-highlight-palette] .skill-tag--highlight-source:hover,
#skills .skills-columns[data-highlight-palette] .skill-tag--highlight-source:hover::after {
    color: var(--skill-highlight);
}

#skills .skills-columns[data-highlight-palette] .skill-tag--highlight-source {
    text-shadow: 0 0 14px color-mix(in srgb, var(--skill-highlight) 60%, transparent);
    filter: saturate(1.6) brightness(1.08);
    transition: color 0.45s cubic-bezier(0.16, 1, 0.3, 1), text-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Verlinkte Begriffe: Farbe als Mischung aus Quell-Kategorie und eigener Kategorie */
#skills .skills-columns[data-highlight-palette] .skill-tag--highlight-linked,
#skills .skills-columns[data-highlight-palette] .skill-tag--highlight-linked::after,
#skills .skills-columns[data-highlight-palette] .skill-tag--highlight-linked:hover,
#skills .skills-columns[data-highlight-palette] .skill-tag--highlight-linked:hover::after {
    color: color-mix(in srgb, var(--skill-highlight) 50%, var(--skill-category-accent, var(--skill-highlight)) 50%);
}

#skills .skills-columns[data-highlight-palette] .skill-tag--highlight-linked {
    text-shadow: 0 0 14px color-mix(in srgb, var(--skill-highlight) 30%, color-mix(in srgb, var(--skill-category-accent, var(--skill-highlight)) 30%, transparent));
    filter: saturate(1.6) brightness(1.08);
    transition: color 0.45s cubic-bezier(0.16, 1, 0.3, 1), text-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Löst die Kopfzeile auf: Icon und Titel werden direkte Grid-Kinder von .skill-category */
.skill-category-head {
    display: contents;
}

.skill-category-icon {
    grid-column: 1;
    grid-row: 1 / 3;
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 0;
    padding: 2px 0.2rem 0.2rem;
    width: 2.5rem;
    min-height: 100%;
    box-sizing: border-box;
    color: var(--primary-color);
    border: 1px solid color-mix(in srgb, var(--skill-category-accent, var(--primary-color)) 32%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--skill-category-accent, var(--primary-color)) 7%, transparent);
    transition:
        color 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
        background-color 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease;
}

.skill-category-icon--btn {
    cursor: default;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
}

/* Icons in Kategorie-Palette, beide Spalten */
.skills-column .skill-category-icon {
    color: var(--skill-category-accent, var(--primary-color));
}

.skill-category-icon-svg {
    display: block;
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
}

.skill-category-title {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding-top: 0.3rem;
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0;
    min-width: 0;
    color: var(--text-primary);
    transition: color 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.skill-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 1s ease;
}

.skill-tags {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    overflow: visible;
}

.skill-tag {
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.35;
    color: var(--text-secondary);
    border: none;
    transition: color 0.28s cubic-bezier(0.33, 1, 0.68, 1), text-shadow 0.28s cubic-bezier(0.33, 1, 0.68, 1), filter 0.28s cubic-bezier(0.33, 1, 0.68, 1);
    cursor: default;
}

.skill-tag[data-tooltip] {
    position: relative;
    z-index: 0;
    cursor: help;
}

.skill-tag[data-tooltip]:hover {
    z-index: 3;
}

.skill-tag[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%) translateY(4px) translateZ(0);
    padding: 0.45rem 0.65rem;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.35;
    white-space: normal;
    max-width: min(280px, 72vw);
    width: max-content;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.28s;
    text-align: left;
}

.skill-tag[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) translateZ(0);
}

.skill-tag:not(:last-child)::after {
    content: ', ';
    margin-right: 0.25rem;
    transition: color 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Projects Section */
.projects {
    background: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease;
}

.project-card:hover {
    box-shadow: var(--shadow-xl);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tech span {
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.18s ease, border-color 0.18s ease;
}

.project-card[data-tag-palette='default'],
.project-card[data-tag-palette='design'] {
    --project-tech-accent: var(--palette-design);
}

.project-card[data-tag-palette='agentic'] {
    --project-tech-accent: var(--palette-agentic);
}

.project-card[data-tag-palette='twins'] {
    --project-tech-accent: var(--palette-twins);
}

.project-card[data-tag-palette='xr'] {
    --project-tech-accent: var(--palette-xr);
}

.project-card[data-tag-palette='3dtech'] {
    --project-tech-accent: var(--palette-3dtech);
}

.project-card[data-tag-palette='comm'] {
    --project-tech-accent: var(--palette-comm);
}

.project-card[data-tag-palette='uxresearch'] {
    --project-tech-accent: var(--palette-uxresearch);
}

.project-card[data-tag-palette='viz'] {
    --project-tech-accent: var(--palette-viz);
}

.project-card[data-tag-palette='animation'] {
    --project-tech-accent: var(--palette-animation);
}

.project-card[data-tag-palette='uxui'] {
    --project-tech-accent: var(--palette-uxui);
}

.project-card[data-tag-palette='software'] {
    --project-tech-accent: var(--palette-software);
}

.project-card[data-tag-palette='data'] {
    --project-tech-accent: var(--palette-data);
}

.project-card[data-tag-palette] .project-tech span:hover {
    color: var(--project-tech-accent, var(--primary-color));
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--primary-dark);
}

/* Portfolio Section */
.portfolio-section {
    padding: 6rem 0;
    background: var(--bg-light);
    overflow-x: hidden;
    max-width: 100%;
}

.portfolio-section .container {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.portfolio-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
    overflow: visible;
    position: relative;
    z-index: 5;
}

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.tech-tag[data-tooltip],
.portfolio-modal-tag[data-tooltip],
.timeline-tags .tag[data-tooltip] {
    position: relative;
    z-index: 0;
    cursor: help;
}

.tech-tag[data-tooltip]:hover,
.portfolio-modal-tag[data-tooltip]:hover,
.timeline-tags .tag[data-tooltip]:hover {
    z-index: 50;
}

/* Timeline behält CSS-::before; Portfolio/Modal nutzen .floating-data-tooltip (kein Clip) */
.timeline-tags .tag[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    transform: translateY(4px) translateZ(0);
    padding: 0.45rem 0.65rem;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.35;
    white-space: normal;
    max-width: min(280px, 72vw);
    width: max-content;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0.28s;
    text-align: left;
    z-index: 60;
}

.timeline-tags .tag[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateZ(0);
}

.tech-tag[data-tooltip]::before,
.portfolio-modal-tag[data-tooltip]::before,
.nav-link[data-tooltip]::before {
    content: none !important;
    display: none !important;
}

.floating-data-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10050;
    padding: 0.45rem 0.65rem;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.35;
    font-family: inherit;
    white-space: normal;
    max-width: min(280px, calc(100vw - 16px));
    width: max-content;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    text-align: left;
    pointer-events: none;
    will-change: transform;
}

.floating-data-tooltip[hidden] {
    display: none !important;
}

.portfolio-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.25rem;
}

.portfolio-category {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.18s ease;
}

.portfolio-date {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Projektkarten + Modal-Tags: Akzent aus Kategorie (data-category-palette) */
.portfolio-item[data-category-palette='default'],
.portfolio-modal-tags[data-category-palette='default'],
.portfolio-item[data-category-palette='design'],
.portfolio-modal-tags[data-category-palette='design'] {
    --project-category-accent: var(--palette-design);
}

.portfolio-item[data-category-palette='agentic'],
.portfolio-modal-tags[data-category-palette='agentic'] {
    --project-category-accent: var(--palette-agentic);
}

.portfolio-item[data-category-palette='twins'],
.portfolio-modal-tags[data-category-palette='twins'] {
    --project-category-accent: var(--palette-twins);
}

.portfolio-item[data-category-palette='xr'],
.portfolio-modal-tags[data-category-palette='xr'] {
    --project-category-accent: var(--palette-xr);
}

.portfolio-item[data-category-palette='3dtech'],
.portfolio-modal-tags[data-category-palette='3dtech'] {
    --project-category-accent: var(--palette-3dtech);
}

.portfolio-item[data-category-palette='comm'],
.portfolio-modal-tags[data-category-palette='comm'] {
    --project-category-accent: var(--palette-comm);
}

.portfolio-item[data-category-palette='uxresearch'],
.portfolio-modal-tags[data-category-palette='uxresearch'] {
    --project-category-accent: var(--palette-uxresearch);
}

.portfolio-item[data-category-palette='viz'],
.portfolio-modal-tags[data-category-palette='viz'] {
    --project-category-accent: var(--palette-viz);
}

.portfolio-item[data-category-palette='animation'],
.portfolio-modal-tags[data-category-palette='animation'] {
    --project-category-accent: var(--palette-animation);
}

.portfolio-item[data-category-palette='uxui'],
.portfolio-modal-tags[data-category-palette='uxui'] {
    --project-category-accent: var(--palette-uxui);
}

.portfolio-item[data-category-palette='software'],
.portfolio-modal-tags[data-category-palette='software'] {
    --project-category-accent: var(--palette-software);
}

.portfolio-item[data-category-palette='data'],
.portfolio-modal-tags[data-category-palette='data'] {
    --project-category-accent: var(--palette-data);
}

/* Berufserfahrung: Akzent pro Eintrag */
.experience .timeline-content[data-tag-palette='default'],
.experience .timeline-content[data-tag-palette='design'] {
    --timeline-tag-accent: var(--palette-design);
}

.experience .timeline-content[data-tag-palette='agentic'] {
    --timeline-tag-accent: var(--palette-agentic);
}

.experience .timeline-content[data-tag-palette='twins'] {
    --timeline-tag-accent: var(--palette-twins);
}

.experience .timeline-content[data-tag-palette='xr'] {
    --timeline-tag-accent: var(--palette-xr);
}

.experience .timeline-content[data-tag-palette='3dtech'] {
    --timeline-tag-accent: var(--palette-3dtech);
}

.experience .timeline-content[data-tag-palette='comm'] {
    --timeline-tag-accent: var(--palette-comm);
}

.experience .timeline-content[data-tag-palette='uxresearch'] {
    --timeline-tag-accent: var(--palette-uxresearch);
}

.experience .timeline-content[data-tag-palette='viz'] {
    --timeline-tag-accent: var(--palette-viz);
}

.experience .timeline-content[data-tag-palette='animation'] {
    --timeline-tag-accent: var(--palette-animation);
}

.experience .timeline-content[data-tag-palette='uxui'] {
    --timeline-tag-accent: var(--palette-uxui);
}

.experience .timeline-content[data-tag-palette='software'] {
    --timeline-tag-accent: var(--palette-software);
}

.experience .timeline-content[data-tag-palette='data'] {
    --timeline-tag-accent: var(--palette-data);
}

.portfolio-item .portfolio-category:hover {
    color: var(--project-category-accent, var(--primary-color));
}

.portfolio-item .tech-tag:hover {
    color: var(--project-category-accent, var(--primary-color));
    border-color: var(--project-category-accent, var(--primary-color));
    font-weight: 600;
}

.portfolio-carousel {
    margin-top: 3rem;
    position: relative;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.portfolio-modal-close-zone svg {
    display: block;
    width: var(--portfolio-modal-close-size);
    height: var(--portfolio-modal-close-size);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.portfolio-modal-close-zone svg line {
    stroke: currentColor;
    stroke-width: var(--portfolio-modal-close-stroke);
}

.portfolio-carousel-viewport {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: var(--carousel-card-h);
    overflow-x: hidden;
    overflow-y: visible;
    padding: 1.25rem 0.75rem 0.75rem;
    position: relative;
    box-sizing: border-box;
}

.portfolio-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    width: 100%;
    margin: 0;
    transition: transform 1.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-covers-wrap {
    margin-top: 12px;
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 0;
    box-sizing: border-box;
}

.portfolio-covers-wrap[hidden] {
    display: none !important;
}

.portfolio-covers {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: max-content;
    max-width: 100%;
    gap: 0.65rem;
    overflow-x: auto;
    padding: 16px 20px;
    scroll-behavior: smooth;
    scroll-padding-inline: 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.portfolio-covers::-webkit-scrollbar {
    height: 6px;
}

.portfolio-covers::-webkit-scrollbar-thumb {
    background: rgba(2, 115, 94, 0.28);
    border-radius: 4px;
}

.portfolio-cover {
    flex: 0 0 auto;
    width: 88px;
    height: 88px;
    padding: 0;
    margin: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-white, #fff);
    box-shadow: var(--shadow-sm);
    transition:
        border-color 0.45s cubic-bezier(0.33, 1, 0.68, 1),
        box-shadow 0.45s cubic-bezier(0.33, 1, 0.68, 1),
        opacity 0.35s ease;
}

.portfolio-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}

.portfolio-cover:hover {
    border-color: rgba(2, 115, 94, 0.35);
    box-shadow: var(--shadow-md);
}

.portfolio-cover:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.portfolio-cover.is-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(2, 115, 94, 0.15), var(--shadow-md);
    z-index: 1;
}


.portfolio-grid .portfolio-item {
    flex: 0 0 var(--portfolio-item-width, 100%);
    width: var(--portfolio-item-width, 100%);
    min-width: 0;
}

.portfolio-item {
    background: white;
    border-radius: 4px;
    /* visible: Tooltips der Tech-Tags dürfen über den Content hinausragen */
    overflow: visible;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: row;
    height: var(--carousel-card-h, 380px);
    flex-shrink: 0;
}

.portfolio-item .portfolio-image {
    border-radius: 4px 0 0 4px;
    overflow: hidden;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: white;
    z-index: 1;
    pointer-events: none;
    transform: translateX(-50%);
}

.portfolio-item:hover {
    box-shadow: var(--shadow-xl);
}

.portfolio-image {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    min-height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    z-index: 0;
    border-radius: 0;
}

/*
 * Rahmen: Opacity (Crossfade, 1.35s). Zoom: pro Slide .portfolio-slide-zoom (JS); Rampe-Dauer
 * in portfolioLoader.js (SLIDE_DISPLAY_MS + 2× Fade), damit Zoom im Fade noch weiterläuft.
 */
.portfolio-slide-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.35s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.portfolio-slide-frame.active {
    opacity: 1;
    z-index: 2;
}

.portfolio-slide-zoom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transform-origin: center center;
    backface-visibility: hidden;
}

.portfolio-slide-frame.active .portfolio-slide-zoom,
.portfolio-slide-frame--ken-pre .portfolio-slide-zoom {
    will-change: transform;
    transition: none;
}

.portfolio-slide-frame:not(.active):not(.portfolio-slide-frame--ken-pre) .portfolio-slide-zoom {
    will-change: auto;
    transform: scale(1);
}

.portfolio-slide-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
    background: transparent;
}

/* Quadratische Bilder: Horizontal spalten (oben/unten) statt vertikal (links/rechts) */
.portfolio-slide-image.square {
    object-fit: cover;
    object-position: center center;
}

/* Horizontales Layout entfernt - alle Bilder werden als Karussell mit sanftem Wechsel angezeigt */

.portfolio-image .portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.portfolio-placeholder {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.portfolio-content {
    padding: 1.5rem 1.75rem;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* visible: sonst werden Tag-Tooltips am Content-Rand abgeschnitten */
    overflow: visible;
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 0;
    order: 1;
    box-sizing: border-box;
}

.portfolio-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.portfolio-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.portfolio-link {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.portfolio-link:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.portfolio-content-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.35;
}

.portfolio-content-footer-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    color: var(--primary-color);
    opacity: 0.92;
}

.portfolio-content-footer-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.portfolio-content-footer-text {
    flex: 1 1 auto;
    min-width: 0;
}

.portfolio-loading,
.portfolio-empty,
.portfolio-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.portfolio-loading p,
.portfolio-empty p,
.portfolio-error p {
    font-size: 1.125rem;
    margin: 0;
}

@media (max-width: 960px) {
    .portfolio-section .section-heading-row {
        max-width: calc(100% - 1rem);
    }

    .portfolio-item {
        flex-direction: column;
        height: auto;
        min-height: 0;
        align-items: stretch;
        max-width: 100%;
    }

    .portfolio-item::before {
        display: none;
    }

    .portfolio-item .portfolio-image {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 200px;
        max-height: min(72vw, 400px);
        aspect-ratio: 16 / 10;
        border-radius: 4px 4px 0 0;
    }

    .portfolio-image .portfolio-slide-image {
        object-fit: contain;
        object-position: center;
    }

    .portfolio-content {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        width: 100%;
        padding: 1.25rem 1.5rem 1.5rem;
        overflow: visible;
    }
}

/* Portfolio Modal */
.portfolio-modal {
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    --pm-enter-dur: 0.64s;
    --pm-enter-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --pm-enter-short: 0.5s;
    transition:
        opacity 0.42s var(--pm-enter-ease),
        visibility 0.42s var(--pm-enter-ease);
    pointer-events: none;
}

/* Kinder dürfen geschlossenes Modal nicht abfangen (Transition/Opacity-Bug in Browsern) */
.portfolio-modal:not(.active) *,
.portfolio-modal:not(.active) {
    pointer-events: none !important;
}

.portfolio-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal öffnen: gestaffeltes Einblenden (Zustände ohne .active sofort zurücksetzen) */
.portfolio-modal:not(.active) .portfolio-modal-close-zone,
.portfolio-modal:not(.active) .portfolio-modal-content,
.portfolio-modal:not(.active) .portfolio-modal-image,
.portfolio-modal:not(.active) .portfolio-modal-project-accordion-item,
.portfolio-modal:not(.active) .portfolio-modal-info-heading-row,
.portfolio-modal:not(.active) .portfolio-modal-info-body,
.portfolio-modal:not(.active) .portfolio-modal-image .portfolio-modal-zoom-note,
.portfolio-modal:not(.active) .portfolio-modal-info-thumb {
    opacity: 0;
    transition: none !important;
}

.portfolio-modal:not(.active) .portfolio-modal-close-zone {
    transform: translateY(-14px);
}

.portfolio-modal:not(.active) .portfolio-modal-content {
    transform: translateY(24px) scale(0.965);
}

.portfolio-modal:not(.active) .portfolio-modal-main-split {
    transform: translateY(18px);
}

.portfolio-modal:not(.active) .portfolio-modal-project-accordion-item {
    transform: translateX(-18px);
}

.portfolio-modal:not(.active) .portfolio-modal-info-heading-row,
.portfolio-modal:not(.active) .portfolio-modal-info-body {
    transform: translateY(14px);
}

.portfolio-modal:not(.active) .portfolio-modal-image .portfolio-modal-zoom-note {
    transform: translateY(10px);
}

.portfolio-modal.active .portfolio-modal-close-zone {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity var(--pm-enter-short) var(--pm-enter-ease),
        transform var(--pm-enter-short) var(--pm-enter-ease),
        background-color 0.25s ease,
        box-shadow 0.25s ease !important;
    transition-delay: 0.03s;
}

.portfolio-modal.active .portfolio-modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity var(--pm-enter-dur) var(--pm-enter-ease),
        transform var(--pm-enter-dur) var(--pm-enter-ease);
    transition-delay: 0.07s;
}

.portfolio-modal.active .portfolio-modal-image {
    opacity: 1;
    transition: opacity 0.72s var(--pm-enter-ease);
    transition-delay: 0.09s;
}

.portfolio-modal.active .portfolio-modal-main-split {
    transform: translateY(0);
    transition: transform 0.62s var(--pm-enter-ease);
    transition-delay: 0.12s;
}

.portfolio-modal.active .portfolio-modal-project-accordion-item {
    opacity: 1;
    transform: translateX(0);
    transition:
        opacity 0.48s var(--pm-enter-ease),
        transform 0.55s var(--pm-enter-ease);
}

.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(1) {
    transition-delay: 0.15s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(2) {
    transition-delay: 0.19s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(3) {
    transition-delay: 0.23s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(4) {
    transition-delay: 0.27s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(5) {
    transition-delay: 0.31s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(6) {
    transition-delay: 0.35s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(7) {
    transition-delay: 0.39s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(8) {
    transition-delay: 0.43s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(9) {
    transition-delay: 0.47s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(10) {
    transition-delay: 0.51s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(11) {
    transition-delay: 0.55s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(12) {
    transition-delay: 0.59s;
}
.portfolio-modal.active .portfolio-modal-project-accordion-item:nth-child(n + 13) {
    transition-delay: 0.63s;
}

.portfolio-modal.active .portfolio-modal-info-heading-row {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.56s var(--pm-enter-ease),
        transform 0.58s var(--pm-enter-ease);
    transition-delay: 0.18s;
}

.portfolio-modal.active .portfolio-modal-info-body {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.56s var(--pm-enter-ease),
        transform 0.58s var(--pm-enter-ease);
    transition-delay: 0.26s;
}

.portfolio-modal.active .portfolio-modal-info-thumb {
    opacity: 1;
    transition:
        opacity 0.45s var(--pm-enter-ease),
        border-color 0.15s ease,
        transform 0.15s ease;
}

.portfolio-modal.active .portfolio-modal-info-thumb:nth-child(1) {
    transition-delay: 0.3s;
}
.portfolio-modal.active .portfolio-modal-info-thumb:nth-child(2) {
    transition-delay: 0.34s;
}
.portfolio-modal.active .portfolio-modal-info-thumb:nth-child(3) {
    transition-delay: 0.38s;
}
.portfolio-modal.active .portfolio-modal-info-thumb:nth-child(4) {
    transition-delay: 0.42s;
}
.portfolio-modal.active .portfolio-modal-info-thumb:nth-child(5) {
    transition-delay: 0.46s;
}
.portfolio-modal.active .portfolio-modal-info-thumb:nth-child(6) {
    transition-delay: 0.5s;
}
.portfolio-modal.active .portfolio-modal-info-thumb:nth-child(7) {
    transition-delay: 0.54s;
}
.portfolio-modal.active .portfolio-modal-info-thumb:nth-child(8) {
    transition-delay: 0.58s;
}
.portfolio-modal.active .portfolio-modal-info-thumb:nth-child(n + 9) {
    transition-delay: 0.62s;
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-modal {
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .portfolio-modal:not(.active) .portfolio-modal-close-zone,
    .portfolio-modal:not(.active) .portfolio-modal-content,
    .portfolio-modal:not(.active) .portfolio-modal-image,
    .portfolio-modal:not(.active) .portfolio-modal-main-split,
    .portfolio-modal:not(.active) .portfolio-modal-project-accordion-item,
    .portfolio-modal:not(.active) .portfolio-modal-info-heading-row,
    .portfolio-modal:not(.active) .portfolio-modal-info-body,
    .portfolio-modal:not(.active) .portfolio-modal-image .portfolio-modal-zoom-note,
    .portfolio-modal:not(.active) .portfolio-modal-info-thumb {
        opacity: 1;
        transform: none;
    }

    .portfolio-modal.active .portfolio-modal-close-zone,
    .portfolio-modal.active .portfolio-modal-content,
    .portfolio-modal.active .portfolio-modal-image,
    .portfolio-modal.active .portfolio-modal-main-split,
    .portfolio-modal.active .portfolio-modal-project-accordion-item,
    .portfolio-modal.active .portfolio-modal-info-heading-row,
    .portfolio-modal.active .portfolio-modal-info-body,
    .portfolio-modal.active .portfolio-modal-image .portfolio-modal-zoom-note,
    .portfolio-modal.active .portfolio-modal-info-thumb {
        opacity: 1;
        transform: none;
        transition: none !important;
        transition-delay: 0s !important;
    }
}

.portfolio-modal-overlay {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.portfolio-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    z-index: 2001;
    box-sizing: border-box;
}

.experience-modal .portfolio-modal-container {
    padding-bottom: max(2rem, calc(env(safe-area-inset-bottom, 0px) + 1.5rem));
}

.portfolio-modal-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    min-height: 0;
    width: 100%;
    max-width: min(96vw, 1200px);
    max-height: min(96vh, calc(100vh - 1.5rem));
    max-height: min(96vh, calc(100dvh - 1.5rem));
    flex: 0 1 auto;
}

.portfolio-modal-content {
    --portfolio-modal-radius: 4px;
    background: var(--bg-white);
    border-radius: var(--portfolio-modal-radius);
    min-width: 0;
    min-height: 0;
    max-width: min(96vw, 1200px);
    flex: 1 1 auto;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Experience-Modal: gleiche Modal-Hülle/Animation wie das Portfolio-Fenster
   (.portfolio-modal*), aber eigenes, einfaches Text-Layout statt Bildergalerie. */
.experience-modal-content {
    /* Nutzt den verfügbaren Viewport, bleibt aber unter dem Portfolio-Stack-Limit */
    max-width: min(94vw, 1100px);
    width: 100%;
    /* Feste Höhe statt max-height: die Karte soll bei jeder Station gleich
       groß bleiben, auch wenn der Inhalt (Beschreibung) kürzer ist - der
       Scroll-Body füllt den Rest dann einfach mit Weißraum.
       Unten bewusst Luft zum Viewport-Rand (außen), nicht nur Innen-Padding. */
    height: min(78vh, calc(100dvh - 7.5rem));
    max-height: min(78vh, calc(100dvh - 7.5rem));
    /* .portfolio-modal-stack ist per align-items:stretch bis zu 1200px breit -
       ohne eigene Zentrierung landet die schmalere Experience-Box links. */
    align-self: center;
    margin: 0 auto;
}

.experience-click-hint {
    margin: 0.85rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.experience-modal-scroll .timeline-role {
    padding: 0.35rem 0.55rem;
    margin: 0 -0.55rem;
}

.experience-modal-scroll .timeline-role.is-focused {
    scroll-margin-top: 0.75rem;
    border-radius: 4px;
    animation: experienceRoleFocus 1.35s ease-out;
}

.experience-modal-scroll .timeline-role.is-focused > .timeline-role-title {
    color: var(--text-primary);
}

@keyframes experienceRoleFocus {
    0% {
        background-color: color-mix(in srgb, var(--primary-color) 22%, transparent);
        box-shadow: inset 3px 0 0 var(--primary-color);
    }
    70% {
        background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
        box-shadow: inset 3px 0 0 color-mix(in srgb, var(--primary-color) 70%, transparent);
    }
    100% {
        background-color: transparent;
        box-shadow: inset 3px 0 0 transparent;
    }
}

/* Kopf/Titel/Firma jeder Section liegen jetzt als sticky Überschrift im
   Body selbst (siehe .timeline-modal-sticky-heading), nicht mehr in einem
   permanent sichtbaren äußeren Kopf - sonst stehen zwei Überschriften
   gleichzeitig da, sobald man in die nächste Section scrollt. Der äußere
   Kopf bleibt leer und damit ausgeblendet. */
.experience-modal-header {
    display: none;
}

.experience-modal-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    box-sizing: border-box;
    padding-top: 1rem;
    padding-bottom: clamp(4.5rem, 8vh, 7rem);
    padding-left: clamp(2rem, 5vw, 3.5rem);
    padding-right: clamp(2rem, 5vw, 3.5rem);
    /* Die Karte hat eine feste Höhe - mittendrin abgeschnittener Text lag
       bisher direkt an der Kante. Stattdessen unten weich ausblenden, statt
       hart am Rand zu kappen. */
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 4rem), transparent 100%);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 4rem), transparent 100%);
}

.experience-modal-scroll .timeline-content {
    margin-left: 0;
    padding: 0;
    cursor: default;
}

.experience-modal-scroll .timeline-description {
    display: block;
    font-size: 0.875rem;
}

.timeline-modal-sticky-heading,
h3.timeline-modal-more-heading {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-white);
    margin: 0 calc(-1 * clamp(2rem, 5vw, 3.5rem)) 1rem;
    padding: 0 clamp(2rem, 5vw, 3.5rem) 0.75rem;
    border-bottom: 1px solid var(--border-color);
    /* Deckt während schneller/animierter Scrolls (smooth-scroll zur
       fokussierten Rolle) zuverlässig alles ab, was kurz über dem sticky
       Kopf durchscheinen könnte. */
    box-shadow: 0 -40px 0 0 var(--bg-white);
}

h3.timeline-modal-more-heading {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 1.85rem !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

/* .timeline wird im Modal nicht mitgeklont - --timeline-date-mb ist dort
   also nicht gesetzt, das Datum fällt sonst auf den 0.5rem-Fallback zurück. */
.timeline-modal-sticky-heading .timeline-date {
    margin-bottom: 0.2rem;
}

.timeline-modal-sticky-heading .timeline-title {
    font-size: 1.85rem !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.2rem;
}

.timeline-modal-sticky-heading .timeline-company {
    margin-bottom: 0;
}

.portfolio-modal-content-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
}

.portfolio-modal-main-split {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    border-top: none;
    background: var(--bg-white);
}

.portfolio-modal-sidebar {
    flex: 0 0 clamp(168px, 26vw, 248px);
    max-width: 40%;
    min-width: 0;
    border-right: 1px solid var(--border-color);
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.portfolio-modal-close-zone {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 0 0 auto;
    margin: 0 0 0.35rem;
    min-height: clamp(3.25rem, 10vw, 5.75rem);
    width: 100%;
    max-width: 100%;
    padding: 0.4rem 0 0.2rem;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    cursor: pointer;
    color: var(--primary-color);
    background: transparent;
    line-height: 0;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    z-index: 2003;
    box-sizing: border-box;
}

.portfolio-modal-close-zone:hover {
    background: rgba(2, 115, 94, 0.1);
    box-shadow: inset 0 0 0 1px rgba(2, 115, 94, 0.12);
}

.portfolio-modal-close-zone:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.portfolio-modal-close-zone:hover svg {
    opacity: 0.85;
    transform: scale(1.08);
}

.portfolio-modal-image {
    --modal-project-dim-ms: 200ms;
    --modal-project-dim-ease: cubic-bezier(0.33, 0, 0.2, 1);
    --modal-zoom-note-fade-ms: 320ms;
    width: 100%;
    height: min(52vh, 560px);
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: var(--portfolio-modal-radius) var(--portfolio-modal-radius) 0 0;
    isolation: isolate;
}

.portfolio-modal-image-preview {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    overflow: hidden;
}

.portfolio-modal-image-slide-chamber {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

.portfolio-modal--project-slide-busy .portfolio-modal-image-slide-chamber {
    will-change: transform, opacity;
}

.portfolio-modal--project-slide-busy .portfolio-modal-image {
    --modal-project-dim-ms: 400ms;
}

/* Keine zweite Transform/Opacity-Transition auf den Slides während Chamber-Slide (Compositor) */
.portfolio-modal--project-slide-busy .portfolio-modal-slide-image {
    transition: none !important;
    will-change: auto;
}

.portfolio-modal-image-bg-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.portfolio-modal-image-bg-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: inherit;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--modal-project-dim-ms) var(--modal-project-dim-ease);
}

.portfolio-modal-image-bg-wrap.portfolio-modal-image-bg-wrap--project-dim::after {
    opacity: 1;
}

.portfolio-modal-slides-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.portfolio-modal-image-bg-wrap .portfolio-modal-image-bg {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 118%;
    height: 118%;
    max-width: none;
    object-fit: cover;
    transform: translate(-50%, -50%);
    filter: blur(18px) saturate(1.05);
    opacity: 0;
    transition: opacity 0.95s ease;
    z-index: 1;
}

.portfolio-modal-image-bg-wrap .portfolio-modal-image-bg.portfolio-modal-image-bg--on {
    opacity: 1;
    z-index: 2;
}

.portfolio-modal-slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transform: scale(1);
    transform-origin: 50% 50%;
    z-index: 2;
    pointer-events: auto;
    transition: opacity 0.55s cubic-bezier(0.33, 1, 0.68, 1), transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), transform-origin 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform, transform-origin;
}

.portfolio-modal-main-slide[data-main-layer="1"] {
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    visibility: hidden;
}

.portfolio-modal-image.is-zoom-panning .portfolio-modal-slide-image {
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Beim Bildwechsel per Klick: kein Transform-Sprung durch Hover-Zoom */
.portfolio-modal-image--slide-changing .portfolio-modal-slide-image,
.portfolio-modal-image--slide-changing.is-zoom-panning .portfolio-modal-slide-image {
    transition: opacity 0.55s cubic-bezier(0.33, 1, 0.68, 1) !important;
}

.portfolio-modal-placeholder {
    position: relative;
    z-index: 1;
    color: white;
    font-size: 2rem;
    font-weight: 600;
}

.portfolio-modal-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: visible;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.portfolio-modal-info-main {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    padding: 1rem 1.75rem 1.25rem 1.5rem;
}

.portfolio-modal-info-text {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    opacity: 1;
    overflow: visible;
    transition: opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-modal-info-scroll {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.portfolio-modal-info-body {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    column-gap: 1.5rem;
    align-items: start;
    width: 100%;
    min-width: 0;
    min-height: 0;
    position: relative;
    z-index: 0;
}

.portfolio-modal-info-col--media {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.portfolio-modal-info-col--meta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    padding-top: 0.15rem;
}

.portfolio-modal-info-heading-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem 1.25rem;
    width: 100%;
    min-width: 0;
    flex-shrink: 0;
    margin: 0 0 0.85rem;
    position: relative;
    z-index: 4;
    overflow: visible;
}

.portfolio-modal-info-heading-copy {
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
}

.portfolio-modal-thumbnails-slide-chamber {
    flex: 0 0 auto;
    display: none;
    align-items: flex-start;
    justify-content: flex-start;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    backface-visibility: hidden;
}

.portfolio-modal-info-thumbnails {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.portfolio-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
}

.portfolio-modal-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

.portfolio-modal-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: visible;
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    justify-content: flex-start;
}

.portfolio-modal-tags[hidden] {
    display: none !important;
}

.portfolio-modal-tag {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    gap: 0.35rem;
    padding: 0.32rem 0.65rem 0.32rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.portfolio-modal-tags .portfolio-modal-tag:hover {
    color: var(--project-category-accent, var(--primary-color));
    border-color: var(--project-category-accent, var(--primary-color));
}

.portfolio-modal-tags .portfolio-modal-tag:hover .portfolio-modal-tag-icon {
    color: var(--project-category-accent, var(--primary-color));
}

.portfolio-modal-tag-icon {
    display: flex;
    flex-shrink: 0;
    width: 0.9rem;
    height: 0.9rem;
    color: var(--primary-color);
    opacity: 0.9;
    transition: color 0.18s ease;
}

.portfolio-modal-tag-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.portfolio-modal-tag-text {
    min-width: 0;
    line-height: 1.25;
}

.portfolio-modal-project-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding: 0;
    border-top: none;
    background: transparent;
    position: static;
    z-index: auto;
    overflow: visible;
}

.portfolio-modal-bar-section {
    width: 100%;
    min-width: 0;
}

.portfolio-modal-bar-section--projects {
    padding-bottom: 0;
    border-bottom: 1px solid var(--border-color);
}

.portfolio-modal-zoom-note {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    margin: 0;
    padding: 0.35rem 0.65rem;
    font-size: 0.8125rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.35;
    text-align: left;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
}

.portfolio-modal-image .portfolio-modal-zoom-note {
    position: absolute;
    right: 0.65rem;
    bottom: 0.55rem;
    z-index: 12;
    max-width: min(96%, 26rem);
    border: none;
    border-radius: 4px;
    background: rgba(10, 10, 10, 0.58);
    color: rgba(248, 250, 252, 0.96);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity var(--modal-zoom-note-fade-ms) var(--modal-project-dim-ease);
}

.portfolio-modal.active .portfolio-modal-image .portfolio-modal-zoom-note {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.52s var(--pm-enter-ease),
        transform 0.52s var(--pm-enter-ease);
    transition-delay: 0.38s;
}

.portfolio-modal.active .portfolio-modal-image-preview:hover ~ .portfolio-modal-zoom-note {
    opacity: 0;
    transition: opacity var(--modal-zoom-note-fade-ms) var(--modal-project-dim-ease);
}

.portfolio-modal-zoom-note-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    color: rgba(248, 250, 252, 0.92);
    opacity: 0.95;
}

.portfolio-modal-zoom-note-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.portfolio-modal-zoom-note-text {
    font-style: italic;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-modal-project-bar-start {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-top: 0;
    padding-bottom: 0;
}

.portfolio-modal-project-bar-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
}

.portfolio-modal-project-accordion {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    row-gap: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    background: var(--bg-white);
}

.portfolio-modal-project-accordion-item {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: var(--bg-white);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.45s cubic-bezier(0.33, 0.02, 0.25, 1);
}

.portfolio-modal-project-accordion-item.is-active-project {
    box-shadow: inset 0 0 0 1px rgba(2, 115, 94, 0.42);
    position: relative;
    z-index: 1;
}

.portfolio-modal-project-accordion-item > .portfolio-modal-project-head {
    flex: 1 1 auto;
    width: 100%;
}

.portfolio-modal-project-head {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: var(--text-primary);
    background-color: var(--bg-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 3.75rem;
    overflow: hidden;
    transition:
        box-shadow 0.35s cubic-bezier(0.33, 0.02, 0.25, 1),
        background-color 0.45s cubic-bezier(0.33, 0.02, 0.25, 1),
        color 0.45s cubic-bezier(0.33, 0.02, 0.25, 1);
}

.portfolio-modal-project-head--has-bg {
    color: #f8fafc;
    transition:
        background-color 0.45s cubic-bezier(0.33, 0.02, 0.25, 1),
        color 0.45s cubic-bezier(0.33, 0.02, 0.25, 1),
        box-shadow 0.35s cubic-bezier(0.33, 0.02, 0.25, 1);
}

/* Graue BG-Kopie: opacity animiert zuverlässig (filter+var auf ::before wird oft nicht mittransitioniert) */
.portfolio-modal-project-head--has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: inherit;
    background-size: inherit;
    background-position: inherit;
    background-repeat: inherit;
    filter: saturate(0);
    opacity: 1;
    transition: opacity 0.95s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.portfolio-modal-project-accordion-item.is-active-project .portfolio-modal-project-head--has-bg::before {
    opacity: 0;
}

.portfolio-modal-project-head--has-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.58) 0%,
        rgba(0, 0, 0, 0.38) 55%,
        rgba(0, 0, 0, 0.22) 100%
    );
    transition: background 0.55s cubic-bezier(0.33, 0.02, 0.25, 1);
}

.portfolio-modal-project-head--has-bg:hover::after {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.45) 55%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

.portfolio-modal-project-accordion-item.is-active-project .portfolio-modal-project-head--has-bg::after {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.34) 0%,
        rgba(0, 0, 0, 0.2) 52%,
        rgba(0, 0, 0, 0.12) 100%
    );
}

.portfolio-modal-project-accordion-item.is-active-project .portfolio-modal-project-head--has-bg:hover::after {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.26) 52%,
        rgba(0, 0, 0, 0.16) 100%
    );
}

.portfolio-modal-project-head--no-bg:hover {
    background-color: #eef2f6;
}

.portfolio-modal-project-accordion-item.is-active-project .portfolio-modal-project-head--no-bg {
    background-color: rgba(2, 115, 94, 0.22);
    color: var(--primary-color);
}

.portfolio-modal-project-head-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    width: 100%;
    min-height: 3.75rem;
    padding: 0.5rem 0 0.5rem 16px;
    box-sizing: border-box;
    transition: padding-left 0.35s cubic-bezier(0.33, 0.02, 0.25, 1);
}

.portfolio-modal-project-accordion-item.is-active-project .portfolio-modal-project-head-inner {
    padding-left: 1.75rem;
}

.portfolio-modal-project-head-name {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    color: inherit;
    letter-spacing: 0.004em;
    transform: scale(1);
    transform-origin: left center;
    transition:
        color 0.95s cubic-bezier(0.22, 0.61, 0.36, 1),
        text-shadow 0.95s cubic-bezier(0.22, 0.61, 0.36, 1),
        font-weight 0.65s cubic-bezier(0.33, 0.02, 0.25, 1),
        letter-spacing 0.95s cubic-bezier(0.22, 0.61, 0.36, 1),
        font-size 0.45s cubic-bezier(0.33, 0.02, 0.25, 1),
        transform 0.42s cubic-bezier(0.33, 1, 0.68, 1);
}

.portfolio-modal.active.portfolio-modal--head-zoom-ready
    .portfolio-modal-project-head:hover
    .portfolio-modal-project-head-name {
    transform: scale(1.18);
}

.portfolio-modal.active.portfolio-modal--head-zoom-ready
    .portfolio-modal-project-accordion-item.is-active-project
    .portfolio-modal-project-head:hover
    .portfolio-modal-project-head-name {
    transform: scale(1.12);
}

.portfolio-modal-project-head--has-bg .portfolio-modal-project-head-name {
    color: #f8fafc;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.portfolio-modal-project-accordion-item.is-active-project .portfolio-modal-project-head-name {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.22;
}

.portfolio-modal-project-accordion-item.is-active-project .portfolio-modal-project-head--has-bg .portfolio-modal-project-head-name {
    color: #ffffff;
    text-shadow:
        0 0 1px rgba(0, 0, 0, 0.9),
        0 1px 3px rgba(0, 0, 0, 0.85),
        0 2px 14px rgba(0, 0, 0, 0.5);
}

.portfolio-modal-project-accordion-item.is-active-project .portfolio-modal-project-head--no-bg .portfolio-modal-project-head-name {
    color: var(--primary-dark);
}

.portfolio-modal-info-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    box-sizing: border-box;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
    transition: border-color 0.15s ease, opacity 0.15s ease;
}

.portfolio-modal-info-thumb:hover {
    opacity: 0.9;
}

.portfolio-modal-info-thumb.active {
    border-color: var(--primary-color);
}

.portfolio-modal-info-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .portfolio-modal-container {
        padding: 0.5rem;
    }

    .portfolio-modal-stack {
        max-height: min(98vh, calc(100vh - 1rem));
        max-height: min(98vh, calc(100dvh - 1rem));
    }
    
    .portfolio-modal-content {
        max-width: 100%;
    }

    .portfolio-modal-main-split {
        flex-direction: column;
    }

    .portfolio-modal-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        overflow-y: visible;
    }

    .portfolio-modal-info {
        flex: 0 1 auto;
        overflow: visible;
    }
    
    .portfolio-modal-image {
        height: min(42vh, 320px);
    }

    .portfolio-modal-project-bar {
        padding: 0;
    }

    .portfolio-modal-bar-section--projects {
        padding-bottom: 0;
    }

    .portfolio-modal-image .portfolio-modal-zoom-note {
        right: 0.45rem;
        bottom: 0.45rem;
        padding: 0.3rem 0.55rem;
        font-size: 0.72rem;
        max-width: calc(100% - 0.9rem);
    }

    .portfolio-modal-project-head,
    .portfolio-modal-project-head-inner,
    .portfolio-modal-project-accordion-item > .portfolio-modal-project-head {
        min-height: 3.5rem;
    }

    .portfolio-modal-info-thumb {
        width: 64px;
        height: 64px;
    }
    
    .portfolio-modal-info-main {
        padding: 0.85rem 1.25rem 1rem;
    }

    .portfolio-modal-info-body {
        grid-template-columns: 1fr;
        row-gap: 1rem;
    }

    .portfolio-modal-info-col--media {
        width: 100%;
    }

    .portfolio-modal-info-heading-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
    }

    .portfolio-modal-info-heading-row .portfolio-modal-tags {
        max-width: 100%;
        justify-content: flex-start;
    }

    .portfolio-modal-thumbnails-slide-chamber {
        max-width: 100%;
        justify-content: flex-start;
    }
    
    .portfolio-modal-title {
        font-size: 1.5rem;
    }

    .portfolio-modal-close-zone {
        margin-bottom: 0.3rem;
        min-height: clamp(2.85rem, 12vw, 5rem);
        padding: 0.32rem 0 0.15rem;
    }
}

/* Contact Section */
.contact-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.contact-card .section-heading-row {
    margin-bottom: 2rem;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.contact-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.contact-buttons .btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: block;
}

.contact-buttons .btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.contact-buttons .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.contact-buttons .btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.contact-buttons .btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Contact Section */
.contact {
    background: var(--bg-light);
    position: relative;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-item svg {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Experience Section */
.experience {
    background: var(--bg-white);
}

.experience > .container {
    width: 100%;
    max-width: min(1200px, 92vw);
    padding-left: clamp(1rem, 3vw, 1.75rem);
    padding-right: clamp(1rem, 3vw, 1.75rem);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.experience-stack {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.experience-main-card {
    width: 100%;
    background: var(--bg-light);
    padding: 2.5rem 2.5rem 2rem;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
}

.experience-main-card:hover {
    box-shadow: var(--shadow-xl);
}

/* Kein overflow-y-Toggle per Hover mehr: das Umschalten zwischen hidden/auto
   ließ die Scrollbar-Gutter-Reservierung in manchen Browsern erst beim Hover
   greifen und die Karte dadurch horizontal "springen". overflow-y bleibt nun
   immer auto - gescrollt wird ohnehin nur, wenn die Maus über der Box steht,
   das Mausrad feuert sonst gar nicht dort. */

.education-scroll-area,
.skills-scroll-area {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -0.35rem;
    padding: 0 0.35rem 0.15rem;
    /* Kein eigenes scroll-snap-type hier: verschachtelt mit dem Snap auf <html>
       blockiert das in Chromium das Scrollen komplett, sobald die Maus über
       dieser Box steht. */
}

/* Experience-Timeline scrollt nicht mehr selbst - der ganze Inhalt wird
   einfach komplett vertikal angezeigt, die Karte wächst entsprechend
   mit (die Seite scrollt dann ganz normal weiter). */
.experience-timeline-scroll {
    overflow: visible;
}

.education-scroll-area {
    max-height: min(68vh, 34rem);
}

.experience-timeline-scroll {
    position: relative;
}

.skills-scroll-area {
    /* Kompetenzen: mehr sichtbare Höhe, weniger Abschneiden */
    max-height: min(78vh, 48rem);
}

.education-scroll-area::-webkit-scrollbar,
.skills-scroll-area::-webkit-scrollbar {
    display: none;
}

.experience-tag-filter-toolbar {
    margin-bottom: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: relative;
    z-index: 4;
    background: var(--bg-light);
    padding-bottom: 0.15rem;
    min-height: 2.35rem;
}

.experience-tool-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.experience-tool-filter-sep {
    width: 1px;
    align-self: stretch;
    min-height: 1.5rem;
    margin: 0 0.2rem;
    background: rgba(2, 115, 94, 0.18);
}

.experience-tool-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin: 0;
    padding: 0.35rem 0.45rem;
    border: 1px solid rgba(2, 115, 94, 0.18);
    border-radius: 6px;
    background: color-mix(in srgb, var(--bg-white) 88%, var(--bg-light));
    color: var(--text-secondary);
    pointer-events: auto;
    user-select: none;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        opacity 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.experience-tool-btn--icon {
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: 0.35rem;
}

.experience-tool-btn[data-tooltip] {
    cursor: help;
}

.experience-tool-btn--icon .experience-tool-btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.experience-tool-btn--text {
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.experience-tool-btn-icon {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    color: currentColor;
    flex-shrink: 0;
}

.experience-tool-filter-bar.has-station-focus .experience-tool-btn.is-dimmed {
    opacity: 0.28;
    filter: grayscale(0.7);
}

.experience-tool-filter-bar.has-station-focus .experience-tool-btn.is-related {
    opacity: 1;
    filter: none;
    color: var(--timeline-tag-accent, var(--primary-color));
    border-color: color-mix(in srgb, var(--timeline-tag-accent, var(--primary-color)) 55%, transparent);
    background: color-mix(in srgb, var(--timeline-tag-accent, var(--primary-color)) 12%, var(--bg-white));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--timeline-tag-accent, var(--primary-color)) 22%, transparent);
}


/* Palette der aktiven Station auf die Filterbar übernehmen */
.experience-tool-filter-bar[data-active-palette='default'],
.experience-tool-filter-bar[data-active-palette='design'] {
    --timeline-tag-accent: var(--palette-design);
}
.experience-tool-filter-bar[data-active-palette='agentic'] {
    --timeline-tag-accent: var(--palette-agentic);
}
.experience-tool-filter-bar[data-active-palette='twins'] {
    --timeline-tag-accent: var(--palette-twins);
}
.experience-tool-filter-bar[data-active-palette='xr'] {
    --timeline-tag-accent: var(--palette-xr);
}
.experience-tool-filter-bar[data-active-palette='3dtech'] {
    --timeline-tag-accent: var(--palette-3dtech);
}
.experience-tool-filter-bar[data-active-palette='comm'] {
    --timeline-tag-accent: var(--palette-comm);
}
.experience-tool-filter-bar[data-active-palette='uxresearch'] {
    --timeline-tag-accent: var(--palette-uxresearch);
}
.experience-tool-filter-bar[data-active-palette='viz'] {
    --timeline-tag-accent: var(--palette-viz);
}
.experience-tool-filter-bar[data-active-palette='animation'] {
    --timeline-tag-accent: var(--palette-animation);
}
.experience-tool-filter-bar[data-active-palette='uxui'] {
    --timeline-tag-accent: var(--palette-uxui);
}
.experience-tool-filter-bar[data-active-palette='software'] {
    --timeline-tag-accent: var(--palette-software);
}
.experience-tool-filter-bar[data-active-palette='data'] {
    --timeline-tag-accent: var(--palette-data);
}

.experience-tag-filter-clear {
    padding: 0.35rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    background: var(--bg-white);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.experience-tag-filter-clear:hover {
    background: rgba(2, 115, 94, 0.08);
}

.experience-tag-filter-active-row {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0;
    z-index: 2;
}

.experience-tag-filter-active-row[hidden] {
    display: none !important;
}

.experience-tag-filter-selection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
    row-gap: 0.375rem;
}

.experience-tag-filter-selection:not(:empty) {
    padding-left: 0.75rem;
    margin-left: 0.5rem;
    border-left: 1px solid rgba(2, 115, 94, 0.2);
}

.experience-tag-filter-chip-wrap {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

/* Chip = Button: ganzes Tag inkl. × entfernt diesen Filtereintrag. */
.experience .experience-tag-filter-selection .experience-tag-filter-chip {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    padding: 0.32rem 0.62rem 0.32rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.2;
    color: var(--primary-color);
    background: var(--bg-white);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    user-select: none;
    white-space: nowrap;
    text-align: left;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.experience .experience-tag-filter-selection .experience-tag-filter-chip:hover {
    background: rgba(2, 115, 94, 0.08);
}

.experience .experience-tag-filter-selection .experience-tag-filter-chip:focus {
    outline: none;
}

.experience .experience-tag-filter-selection .experience-tag-filter-chip:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.experience .experience-tag-filter-selection .experience-tag-filter-chip .tag-tool-icon {
    width: 0.9375rem;
    height: 0.9375rem;
    flex-shrink: 0;
    display: block;
    color: var(--primary-color);
}

.experience .experience-tag-filter-selection .experience-tag-filter-chip .tag-tool-label {
    line-height: 1.2;
}

.experience .experience-tag-filter-selection .experience-tag-filter-chip-x {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.15rem;
    padding: 0 0.05rem;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1;
    color: var(--primary-color);
    pointer-events: none;
}

.experience-tag-filter-empty {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.4;
    text-align: center;
    background: color-mix(in srgb, var(--bg-light) 88%, transparent);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: none;
}

.experience-tag-filter-empty.experience-tag-filter-empty--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.timeline-item.experience-timeline-item--hidden {
    display: none !important;
}

.experience .timeline-tags .tag {
    cursor: pointer;
    font-weight: 600;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.experience .timeline-content[data-tag-palette] .timeline-tags .tag:hover {
    color: var(--timeline-tag-accent, var(--primary-color));
    border-color: var(--timeline-tag-accent, var(--primary-color));
}

.experience .timeline-content[data-tag-palette] .timeline-tags .tag:hover .tag-tool-icon {
    color: var(--timeline-tag-accent, var(--primary-color));
}

.experience .timeline-content[data-tag-palette] .timeline-tags .tag.tag--filter-active {
    color: var(--timeline-tag-accent, var(--primary-color));
    border-color: var(--timeline-tag-accent, var(--primary-color));
    background: var(--bg-light);
    box-shadow: inset 0 0 0 1.5px var(--timeline-tag-accent, var(--primary-color));
}

.experience .timeline-content[data-tag-palette] .timeline-tags .tag.tag--filter-active .tag-tool-icon {
    color: var(--timeline-tag-accent, var(--primary-color));
}

.experience .timeline-tags .tag:hover {
    color: var(--primary-color);
    border-color: rgba(2, 115, 94, 0.4);
}

.experience .timeline-tags .tag.tag--filter-active {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(2, 115, 94, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline {
    position: relative;
    max-width: none;
    margin: 0;
    padding: 0.35rem 0 1rem;
    /* Schmale Spur ganz links für Linie + Punkt, keine Datumsspalte mehr daneben */
    --timeline-year-col: 0.25rem;
    --timeline-gap: 1.25rem;
    --timeline-line-x: calc(var(--timeline-year-col) + var(--timeline-gap) * 0.5);
    --timeline-card-pad-x: 1.25rem;
    --timeline-title-fs: 1.05rem;
    --timeline-title-lh: 1.35;
    /* Höhe der Datumszeile (Schrift + Zeilenhöhe) über dem Titel */
    --timeline-date-fs: 0.875rem;
    --timeline-date-lh: 1.35;
    --timeline-date-mb: 0.15rem;
    /* Vertikale Mitte der Titelzeile ab Eintragsoberkante - dort sitzt der Punkt auf der Linie */
    --timeline-dot-offset-top: calc(
        (var(--timeline-date-fs) * var(--timeline-date-lh)) + var(--timeline-date-mb) +
            (var(--timeline-title-fs) * var(--timeline-title-lh) * 0.5)
    );
    /* Karte bis links an die Linie, Inhalt rechts davon */
    --timeline-content-inset-left: calc(var(--timeline-line-x) + 2.25rem);
    /* heller als Vollton-Primary, wirkt „hinter“ dem Inhalt */
    --timeline-line-color-top: color-mix(in srgb, var(--primary-color) 48%, var(--bg-light));
    --timeline-line-color-bottom: color-mix(in srgb, var(--primary-color) 38%, var(--bg-light));
    /* Unterkante der Rail weich ausblenden (letzte Karte) */
    --timeline-rail-fade-height: 3.25rem;
}

.timeline-section-heading {
    position: relative;
    z-index: 1;
    margin: 0 0 0.9rem;
    padding: 0.1rem 0 0.1rem var(--timeline-content-inset-left);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: var(--timeline-year-col) minmax(0, 1fr);
    gap: var(--timeline-gap);
    /* Kein scroll-snap-align: sonst wird jeder Eintrag zum Seiten-Snap-Punkt
       und das Scrollen springt zu schnell zur nächsten Station/Section. */
    align-items: start;
    margin-bottom: 1.1rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    scroll-snap-align: none;
}

.timeline-item:last-child {
    margin-bottom: 0;
    padding-bottom: 1rem;
    border-bottom: none;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: var(--timeline-line-x);
    top: calc(var(--timeline-dot-offset-top) - 6px);
    width: 12px;
    height: 12px;
    transform: translate(-50%, 0);
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--bg-light);
    box-shadow: 0 0 0 2px var(--primary-color);
    z-index: 6;
    transition:
        width 0.22s ease,
        height 0.22s ease,
        top 0.22s ease,
        box-shadow 0.22s ease,
        background-color var(--icon-mask-color-duration) var(--icon-mask-easing);
}

.timeline-item:has(.timeline-content:hover)::before {
    width: 17px;
    height: 17px;
    top: calc(var(--timeline-dot-offset-top) - 8.5px);
    background: var(--icon-mask-fill-accent);
    box-shadow: 0 0 0 3px var(--icon-mask-fill-accent);
}

/*
 * Eine durchgehende Linie als erstes Kind von .timeline (liegt unter allen Einträgen).
 * Folge-Karten liegen im DOM danach und würden eine pro-Eintrag-Linie komplett übermalen —
 * daher Schlitz im Karten-Weiß (linear-gradient), damit die Rail durch alle Karten sichtbar bleibt.
 */
.timeline-gutter-rail {
    position: absolute;
    left: calc(var(--timeline-line-x) - 1.5px);
    top: 0;
    width: 3px;
    bottom: 0.25rem;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--timeline-line-color-top), var(--timeline-line-color-bottom));
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 calc(100% - var(--timeline-rail-fade-height)),
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 calc(100% - var(--timeline-rail-fade-height)),
        transparent 100%
    );
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.timeline-marker {
    display: none;
}

.timeline-content {
    position: relative;
    z-index: 1;
    /* .timeline-year ist position:absolute und damit aus dem Grid-Fluss raus -
       .timeline-content ist dadurch das einzige fließende Grid-Item und muss
       explizit über beide Spuren gespannt werden, sonst landet es nur in der
       schmalen ersten Spur (year-col). */
    grid-column: 1 / -1;
    margin-left: var(--timeline-content-inset-left);
    padding: 0 var(--timeline-card-pad-x) 0 var(--timeline-card-pad-x);
    min-width: 0;
    background-color: transparent;
    cursor: pointer;
}

/* In der Karten-Übersicht keine Beschreibungstexte zeigen - Details gibt es
   im Experience-Modal (Klick auf eine Station, siehe js/experienceModal.js).
   Die Projekt+Datum-Liste eines Clusters (.timeline-roles) bleibt sichtbar. */
.experience-timeline-scroll .timeline-description {
    display: none;
}

/* Firma als Oberkategorie direkt hinter dem Datum zeigen (gleiche Zeile),
   Titel darunter auf eigener Zeile. */
.experience-timeline-scroll .timeline-content {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.experience-timeline-scroll .timeline-date {
    order: 1;
    flex: 0 0 auto;
}

.experience-timeline-scroll .timeline-company {
    order: 2;
    flex: 0 0 auto;
    margin-bottom: var(--timeline-date-mb, 0.5rem);
    font-size: var(--timeline-date-fs, 0.875rem);
    font-weight: 600;
    color: var(--text-secondary);
}

.experience-timeline-scroll .timeline-company::before {
    content: '· ';
    color: var(--border-color);
}

.experience-timeline-scroll .timeline-title {
    order: 3;
    flex: 1 0 100%;
}

.experience-timeline-scroll .timeline-description {
    order: 4;
}

/* Cluster-Projektliste kompakt direkt in der Karte zeigen (Datum + Titel je
   Projekt), ohne Beschreibungstexte - die gibt es erst im Modal. */
.experience-timeline-scroll .timeline-roles {
    order: 4;
    flex: 1 0 100%;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    margin-top: 0.35rem;
    padding-top: 0;
    border-top: none;
}

.experience-timeline-scroll .timeline-role {
    display: grid;
    grid-template-columns: 9.75rem minmax(0, 1fr);
    column-gap: 0.65rem;
    align-items: baseline;
    padding: 0.08rem 0.45rem;
    margin: 0 -0.45rem;
    border-radius: 4px;
    border-bottom: none;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.experience-timeline-scroll .timeline-role:hover {
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
    box-shadow: inset 2px 0 0 var(--primary-color);
}

.experience-timeline-scroll .timeline-role:hover .timeline-date,
.experience-timeline-scroll .timeline-role:hover .timeline-role-title {
    color: var(--text-primary);
}

.experience-timeline-scroll .timeline-item[data-experience-group="more"] > .timeline-content:hover,
.experience-timeline-scroll .timeline-item[data-experience-group="cgi"] > .timeline-content:hover {
    background-color: color-mix(in srgb, var(--primary-color) 8%, transparent);
    box-shadow: inset 2px 0 0 var(--primary-color);
}

.experience-timeline-scroll .timeline-item[data-experience-group="cgi"] > .timeline-content:has(.timeline-role:hover) {
    background-color: transparent;
    box-shadow: none;
}

.experience-timeline-scroll .timeline-role--heading {
    margin-top: 0.2rem;
    margin-bottom: 0.05rem;
}

.experience-timeline-scroll .timeline-role--heading .timeline-role-heading,
.experience-timeline-scroll .timeline-role--heading .timeline-role-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Kurzform in der Kartenliste, Langform nur im Experience-Modal */
.experience-timeline-scroll .role-heading-full {
    display: none;
}

.experience-modal .role-heading-short {
    display: none;
}

.timeline-role--heading .timeline-role-heading,
.timeline-role-heading {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-role--heading {
    margin: 0.75rem 0 0.35rem;
}

.experience-timeline-scroll .timeline-role .timeline-date {
    /* Überschreibt .experience-timeline-scroll .timeline-date { order: 1 },
       sonst landet das Datum hinter dem Titel (order: 0). */
    order: 0;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-secondary);
    margin-bottom: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.experience-timeline-scroll .timeline-role-title {
    order: 1;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
    min-width: 0;
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: var(--timeline-date-fs, 0.875rem);
    line-height: var(--timeline-date-lh, 1.35);
    margin-bottom: var(--timeline-date-mb, 0.5rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-title {
    font-size: var(--timeline-title-fs);
    line-height: var(--timeline-title-lh);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.timeline-company {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 0.75rem;
    list-style: none;
    padding-left: 0;
}

.timeline-description li {
    margin-bottom: 0.2rem;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-description li::before {
    content: '';
    position: absolute;
    left: 0.125rem;
    top: 0.72em;
    transform: translateY(-50%);
    width: 0.5em;
    height: 0.5em;
    min-width: 7px;
    min-height: 7px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: background-color var(--icon-mask-color-duration) var(--icon-mask-easing);
}

/* Orange Bullets nur für die gehoverte Station – nicht für alle Rollen
   unter demselben .timeline-content (z. B. CGI-Cluster im Modal). */
.timeline-role:hover .timeline-description li::before {
    background: var(--icon-mask-fill-accent);
}

.timeline-content:not(:has(.timeline-role)):hover .timeline-description li::before {
    background: var(--icon-mask-fill-accent);
}

.timeline-description li:not(:first-child)::before {
    top: calc(0.72em + 2px);
}

/* Geclusterte Station (z. B. mehrere Rollen bei einem Arbeitgeber): nur im
   Experience-Modal sichtbar, siehe .experience-timeline-scroll .timeline-roles. */
.timeline-roles {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.timeline-role {
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.timeline-role:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

/* .timeline wird im Modal nicht mitgeklont - --timeline-date-mb ist dort
   also nicht gesetzt, das Datum fällt sonst auf den 0.5rem-Fallback zurück. */
.timeline-role .timeline-date {
    margin-bottom: 0.15rem;
}

.timeline-role-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
}

/* Nur bei "Weitere Erfahrungen" im Modal: dort hat jede Rolle eine andere
   Firma, die (anders als beim CGI-Cluster) mit in die Rolle gehört. */
.timeline-role .timeline-company {
    font-size: 0.8125rem;
    font-weight: 500;
    margin: 0 0 0.5rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.timeline-tags .tag {
    padding: 0.375rem 0.875rem;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.timeline-tags .tag.tag--tool {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.timeline-tags .tag .tag-tool-icon {
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
    color: var(--primary-color);
    transition: color 0.15s ease;
}

/* Education Section */
.education {
    background: var(--bg-light);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.education-card {
    background: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease;
    display: flex;
    gap: 1.5rem;
    min-width: 0;
}

.education-card:hover {
    box-shadow: var(--shadow-lg);
}

.education-icon {
    position: relative;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.education-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--icon-mask-fill-accent);
    opacity: 0;
    transition: opacity 0.72s var(--icon-mask-easing);
    pointer-events: none;
}

.education-card:hover .education-icon::before {
    opacity: 1;
}

.education-icon > svg {
    position: relative;
    z-index: 1;
}

.education-content {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.education-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.education-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.education-institution {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.education-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.education-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.education-detail {
    padding: 0.375rem 0.875rem;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.education-heading-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.education-heading-icon--svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--primary-color);
    transition: color var(--icon-mask-color-duration) var(--icon-mask-easing);
}

section#education:hover .education-heading-icon--svg {
    color: var(--icon-mask-fill-accent);
}

.education-heading-icon--svg svg {
    display: block;
}

.education-heading-row--subtitle {
    margin: 4rem 0 2rem 0;
}

.education-heading-row--subtitle .education-section-subtitle {
    margin: 0;
    text-align: left;
}

.education-section-subtitle {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 4rem 0 2rem 0;
    text-align: center;
}

/* Footer */
.footer {
    background: #02735E;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer-links {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.footer-links a:hover,
.footer-links a:focus-visible {
    text-decoration: underline;
}

.footer-legal-link {
    color: #ffffff;
    text-decoration: underline;
}

.footer-legal-link:hover,
.footer-legal-link:focus-visible {
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Navigation - Reduziere Gap bei kleineren Desktop-Bildschirmen */
    .nav-menu {
        gap: 0.5rem;
    }

    /* Der feste Brand-Slot (bis zu 44vw) drängt nav-actions (Sprachflaggen
       etc.) auf diesen Breiten über den Viewport hinaus hinaus - rechts
       wurde dadurch abgeschnitten (body hat overflow-x: hidden). Slot hier
       schon verkleinern statt erst ab 768px. */
    .nav-brand-wrapper {
        flex: 0 1 auto;
        min-width: 0;
        max-width: min(18rem, 32vw);
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 28px;
    }

    .timeline-description {
        padding-left: 0;
    }

    .timeline-description li::before {
        left: 0.125rem;
    }
}

@media (max-width: 768px) {
    :root {
        --portfolio-chevron-size: 46px;
        --portfolio-chevron-stroke: 3;
        --portfolio-modal-close-size: 28px;
        --portfolio-modal-close-stroke: 2.2;
    }

    .nav-brand-wrapper {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }

    .nav-menu {
        position: fixed !important;
        transform: none !important;
        left: -100% !important;
        top: 80px !important;
        display: flex !important;
        flex-direction: column !important;
        background: white !important;
        width: 100% !important;
        text-align: center !important;
        transition: left 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
        box-shadow: var(--shadow-lg) !important;
        padding: 2rem 0 !important;
        z-index: 1001 !important;
        max-height: calc(100vh - 80px) !important;
        overflow-y: hidden !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin: 0 !important;
        gap: 0 !important;
        height: auto !important;
    }

    .nav-menu.active {
        left: 0 !important;
    }

    .nav-menu li {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .nav-menu .nav-link {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
    }

    .nav-menu .nav-link::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-menu .nav-link:hover::after,
    .nav-menu .nav-link.active::after,
    .nav-menu .nav-link:focus-visible::after,
    body:has(#home:focus-within) .nav-menu .nav-link[href$="#home"].active::after,
    body:has(#experience:focus-within) .nav-menu .nav-link[href$="#experience"].active::after,
    body:has(#education:focus-within) .nav-menu .nav-link[href$="#education"].active::after,
    body:has(#skills:focus-within) .nav-menu .nav-link[href$="#skills"].active::after,
    body:has(#portfolio:focus-within) .nav-menu .nav-link[href$="#portfolio"].active::after,
    body:has(#contact:focus-within) .nav-menu .nav-link[href$="#contact"].active::after {
        width: calc(100% - 4rem);
    }

    /* Im mobilen Menü: Namen neben den Icons */
    .nav-menu .nav-link .nav-text {
        display: inline-block !important;
    }

    .nav-toggle {
        display: flex !important;
        z-index: 1002 !important;
        position: relative !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    
    .nav-toggle span {
        pointer-events: none;
    }

    .nav-actions {
        margin-left: auto;
        margin-right: 0.5rem;
    }

    .nav-current-label {
        display: none;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .name {
        font-size: clamp(1.65rem, 7vw, 2rem);
        line-height: 1.15;
    }

    .greeting {
        font-size: 1rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .hero-banner {
        margin-top: 70px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        padding: 2rem 20px;
    }

    .banner-stack {
        height: 300px;
    }

    .banner-person-wrap {
        top: 4%;
        bottom: 0;
        left: auto;
        right: 0;
        width: min(72vw, 320px);
        max-width: 85%;
        height: auto;
        transform: none;
        transform-origin: right bottom;
    }

    .banner-person-wrap:hover {
        transform: scale(1.025);
    }

    .banner-person {
        transform: translateX(0);
        object-fit: contain;
        object-position: right bottom;
    }

    .greeting-block {
        padding: 0.85rem 1.15rem 1rem;
        margin-left: 0;
        margin-right: 0;
        max-width: calc(100% - 0.5rem);
        box-sizing: border-box;
        overflow: visible;
    }
    
    .hero-content-wrapper {
        padding: 4rem 2rem 2rem 2rem;
    }

    .hero-title {
        margin-left: 0;
        gap: 0.2rem;
        width: 100%;
    }

    .hero .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin: 1.1rem 0;
        text-align: left;
    }

    .hero .hero-description .hero-lead {
        font-size: 1.05rem;
        line-height: 1.4;
    }

    .hero .hero-content {
        text-align: left;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .skills-main-card {
        padding: 2rem 1.5rem;
    }

    .skill-categories {
        grid-template-columns: 1fr;
    }

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

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

    .portfolio-grid .portfolio-item {
        flex: 0 0 var(--portfolio-item-width, 100%);
        width: var(--portfolio-item-width, 100%);
        max-width: 100%;
        min-width: 0;
    }

    .portfolio-carousel-viewport {
        padding: 1rem 0.35rem 0.5rem;
    }

    .portfolio-content {
        padding: 1rem 1.1rem 1.25rem;
    }

    .portfolio-title {
        font-size: 1.2rem;
    }

    .portfolio-technologies {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .experience-main-card {
        padding: 1.75rem 1.25rem 1.25rem;
    }

    .timeline {
        --timeline-year-col: 1fr;
        --timeline-card-pad-x: 1.5rem;
        padding-top: 0;
    }

    .timeline-gutter-rail,
    .timeline-item::before {
        display: none;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding-top: 0;
    }

    .timeline-description {
        padding-left: 0;
    }

    .timeline-description li::before {
        left: 0.125rem;
    }

    .timeline-content {
        margin-left: 0;
        padding: 0 var(--timeline-card-pad-x);
    }

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

    .education-card {
        flex-direction: column;
    }

    .experience-timeline-scroll .timeline-roles {
        gap: 0.9rem;
    }

    .skill-category {
        grid-template-columns: 1.8rem 1fr;
        column-gap: 0.3rem;
    }

    .skill-category-icon {
        width: 1.8rem;
        padding: 0;
        border-color: transparent;
        background: transparent;
    }

    .skill-category-title,
    .skill-tags {
        text-align: left;
    }

    .skill-tags {
        grid-column: 1 / 3;
        margin-top: 0.3rem;
    }

    .skill-tag {
        font-size: 0.9rem;
    }

    .skills-scroll-area {
        max-height: none !important;
        overflow-y: visible !important;
        overflow-x: visible !important;
    }

    .experience-timeline-scroll .timeline-role {
        grid-template-columns: 1fr;
        row-gap: 0.1rem;
    }

    .experience-timeline-scroll .timeline-role .timeline-date {
        order: 0;
    }

    .experience-timeline-scroll .timeline-role-title {
        order: 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .name {
        font-size: 1.65rem;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .hero-description .hero-lead {
        font-size: 1.05rem;
    }

    .experience-main-card {
        padding: 1.5rem 1rem 1rem;
    }

    .timeline {
        --timeline-card-pad-x: 1.25rem;
    }

    .timeline-description {
        padding-left: 0;
    }

    .timeline-description li::before {
        left: 0.125rem;
    }

    .timeline-content {
        padding: 0 var(--timeline-card-pad-x);
    }
}

/* Legal Pages */
.legal-page {
    background: var(--bg-light);
    color: var(--text-primary);
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.32s ease-in;
}

.legal-page.loaded {
    opacity: 1;
}

.legal-page .navbar {
    position: sticky;
}

/* Ohne Hero-Parallax sonst opacity:0 — Marke + Logo immer sichtbar */
.legal-page .nav-brand-wrapper {
    opacity: 1;
}

.legal-page .nav-logo {
    /* Name immer sichtbar → Logo schwarz */
    filter: brightness(0);
}

.legal-nav .container {
    justify-content: space-between;
}

.legal-nav-menu {
    flex: 0 0 auto;
    margin-left: auto;
    gap: 0.5rem;
}

.legal-nav-link {
    padding: 0.5rem 0.9rem;
}

.legal-nav-link::after {
    display: none;
}

.legal-nav-actions {
    margin-left: 0.75rem;
}

.legal-main {
    padding: 2rem 0 3rem;
}

.legal-page-header {
    margin-bottom: 1.35rem;
}

.legal-page-heading {
    font-size: clamp(2rem, 4.2vw, 2.65rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.legal-card {
    background: var(--bg-white);
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.legal-title {
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.legal-updated {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.legal-section {
    margin-bottom: 1.25rem;
    padding: 0;
}

.legal-card section {
    padding: 0;
}

.legal-section h2,
.legal-section h3 {
    font-size: 1.3rem;
    margin-bottom: 0.35rem;
}

.legal-section p,
.legal-section li,
.legal-address {
    color: var(--text-secondary);
}

.legal-section ul {
    margin: 0.6rem 0 0;
    padding-left: 1.3rem;
}

.legal-home-link {
    display: inline-block;
    margin-top: 0.5rem;
}

.legal-combined-section {
    scroll-margin-top: 6rem;
}

.legal-combined-section + .legal-combined-section {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
}

.legal-home-link-combined {
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .legal-nav .nav-menu {
        position: static !important;
        left: 0 !important;
        top: auto !important;
        width: auto !important;
        max-height: none !important;
        flex-direction: row !important;
        box-shadow: none !important;
        padding: 0 !important;
        overflow: visible !important;
        gap: 0.35rem !important;
    }

    .legal-nav .nav-link {
        width: auto;
        justify-content: center;
        padding: 0.45rem 0.75rem;
    }

    .legal-nav-actions {
        margin-left: 0.35rem;
    }

    .legal-main {
        padding: 1.5rem 0 2.5rem;
    }

    .legal-card {
        padding: 1.25rem;
    }

    .legal-section {
        margin-bottom: 1rem;
    }
}


/* Statische Projekt-Detailseiten (SEO) */
.project-page-body {
    background: var(--bg-white);
    color: var(--text-primary);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.project-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.project-page-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-page-header .nav-logo {
    height: 32px;
    width: auto;
}

.project-page-main {
    padding: 2rem 0 4rem;
    max-width: 900px;
}

.project-page-main h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0.75rem;
}

.project-page-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-page-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1rem;
    margin-bottom: 2rem;
}

.project-page-meta dt {
    font-weight: 600;
    color: var(--text-secondary);
}

.project-page-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-page-tech-list li {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.project-page-gallery {
    display: grid;
    gap: 1rem;
}

.project-page-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.project-page-related {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.project-page-related ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-page-related a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.project-page-related a:hover {
    text-decoration: underline;
}
