/* Timeline horizontal: Alle Infos auf einer Linie */
.vita-timeline-horizontal {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    gap: 0;
}
.vita-timeline-horizontal .vita-timeline-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 180px;
    max-width: 220px;
    flex: 1 1 0;
    margin: 0 0.5vw;
    pointer-events: auto;
    z-index: 2;
    padding: 0;
    height: 100%;
    position: relative;
}
.vita-timeline-horizontal .vita-funktion {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    margin: 0;
    display: block;
    width: 100%;
    padding: 0 5px;
}
.vita-timeline-horizontal .vita-timeline-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vita-timeline-horizontal .vita-firma {
    position: absolute;
    top: calc(50% + 30px);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    margin: 0;
    display: block;
    width: 100%;
    padding: 0 5px;
    line-height: 1.3;
    white-space: normal;
}
.vita-timeline-horizontal .vita-timeline-year {
    position: absolute;
    top: calc(50% + 70px);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    margin: 0;
    display: block;
    width: 100%;
    padding: 0 5px;
}
@media (max-width: 900px) {
    .vita-timeline-horizontal .vita-timeline-point { min-width: 60px; }
}
@media (max-width: 600px) {
    /* Mehr Platz und besseres Scrolling für Timeline auf Mobile */
    .vita-timeline-horizontal {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 0 1rem;
        gap: 1rem;
        scroll-snap-type: x proximity;
    }
    
    /* Mehr Breite pro Punkt, damit Funktions-Titel nicht kollidieren */
    .vita-timeline-horizontal .vita-timeline-point { 
        min-width: 120px;
        max-width: 140px;
        flex-shrink: 0;
        scroll-snap-align: center;
    }
    
    /* Bessere Umbrüche für lange Begriffe (z.B. Forschungsunterstützung) */
    .vita-timeline-horizontal .vita-funktion {
        font-size: 0.72rem;
        line-height: 1.2;
        padding: 0 3px;
        hyphens: auto;
        overflow-wrap: anywhere;
        word-break: break-word;
        max-width: 100%;
    }
    
    .vita-timeline-horizontal .vita-firma {
        font-size: 0.7rem;
        line-height: 1.2;
        padding: 0 3px;
        word-break: break-word;
    }
    
    .vita-timeline-horizontal .vita-timeline-year {
        font-size: 0.68rem;
    }
}
/* ========================================
   VITA TIMELINE DETAIL (Firmenlogo, Funktion, Firma, Ort)
   ======================================== */
.vita-firmenlogo {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0;
    box-shadow: none;
    background: transparent;
    border: none;
}
.vita-funktion {
    font-size: 1.01rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.1em;
    text-align: center;
    display: block;
}
.vita-firma {
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-bottom: 0.1em;
    text-align: center;
    display: block;
}
.vita-timeline-year {
    font-size: 0.93rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    margin-bottom: 0.1em;
    text-align: center;
    display: block;
}
.vita-ort {
    font-size: 0.89rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
    text-align: center;
    display: block;
    margin-bottom: 0.1em;
}
@media (max-width: 900px) {
    .vita-firmenlogo { width: 30px; height: 30px; border-radius: 50%; }
    .vita-funktion, .vita-firma, .vita-timeline-year, .vita-ort { font-size: 0.89rem; }
}
@media (max-width: 600px) {
    .vita-firmenlogo { width: 22px; height: 22px; border-radius: 50%; }
    .vita-funktion, .vita-firma, .vita-timeline-year, .vita-ort { font-size: 0.8rem; }
}
/* ========================================
   COOKIE CONSENT BANNER
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, 92%);
    background: rgba(20,20,22,0.98);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 1.25rem 1.4rem 1rem;
    box-shadow: 0 12px 32px -8px rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    z-index: 4000;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.35;
}
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 0.9rem; }
.cookie-banner .cookie-text { margin: 0; }
.cookie-banner a.cookie-policy-link { color: #5fbaff; text-decoration: underline; }
.cookie-banner details { background: rgba(255,255,255,0.05); padding: 0.6rem 0.8rem; border-radius: 8px; }
.cookie-banner details summary { cursor: pointer; font-weight: 600; }
.cookie-banner .cookie-toggle { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; margin-top: 0.4rem; }
.cookie-banner .cookie-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.cookie-banner button { cursor: pointer; border-radius: 8px; padding: 0.55rem 1.1rem; font-weight: 600; font-size: 0.85rem; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff; }
.cookie-banner button.btn-primary { background: #0076ff; border-color: #0076ff; }
.cookie-banner button:hover { filter: brightness(1.15); }
@media (prefers-reduced-transparency: reduce) { .cookie-banner { backdrop-filter: none; } }
@media (max-width: 560px) { .cookie-banner { font-size: 0.82rem; padding: 1rem 1rem 0.85rem; } }

/* ========================================
   VITA SWITCHER (Akademisch/Beruflich)
   ======================================== */
.vita-switcher {
    width: 100%;
    max-width: 950px;
    margin: 3.5rem auto 2.5rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    position: relative; /* ensure on top of timeline */
    z-index: 20; /* timeline uses z-index:10 */
}
.vita-switcher-buttons {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 0.5rem;
}
.vita-switch-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.45em 1.5em;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: none;
    letter-spacing: 0.01em;
    pointer-events: auto; /* explicit tap target */
    min-height: 44px; /* comfortable tappable area */
    touch-action: manipulation; /* remove 300ms delay on iOS */
    -webkit-tap-highlight-color: transparent;
}
.vita-switch-btn.active,
.vita-switch-btn:focus {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.3);
}
.vita-switch-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.25);
}
@media (max-width: 900px) {
    .vita-switcher { max-width: 99vw; }
    .vita-switch-btn { font-size: 0.95rem; padding: 0.4em 1.1em; }
}
@media (max-width: 600px) {
    .vita-switcher { margin-top: 2.2rem; }
    .vita-switch-btn { font-size: 0.85rem; padding: 0.35em 0.7em; }
}

/* ========================================
   CV DOWNLOAD SECTION
   ----------------------------------------
   Download-Buttons für Lebenslauf (DE/EN)
   ======================================== */
.cv-download-section {
    margin-top: 4rem;
    text-align: center;
    width: 100%;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}

.cv-download-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.cv-download-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.cv-download-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 2rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.cv-download-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    color: rgba(255, 255, 255, 1);
}

.cv-download-btn:active {
    transform: translateY(0);
}

.cv-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .cv-download-section {
        margin-top: 3rem;
    }
    
    .cv-download-title {
        font-size: 1.1rem;
    }
    
    .cv-download-buttons {
        gap: 1rem;
    }
    
    .cv-download-btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ========================================
   VITA TIMELINE (Lemma-Style)
   ----------------------------------------
   Minimalistische horizontale Timeline für die About-Section
   ======================================== */
.vita-timeline {
    position: relative;
    width: 100%;
    max-width: 950px;
    margin: 3.5rem auto 2.5rem auto;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.vita-timeline-line {
    position: absolute;
    top: 50%;
    left: 3%;
    right: 3%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    z-index: 1;
    opacity: 1;
}
.vita-timeline-points {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    gap: 0;
}
.vita-timeline-point {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    max-width: 220px;
    flex: 1 1 0;
    margin: 0 0.5vw;
    pointer-events: auto;
    z-index: 2;
    padding-top: 0;
}
.vita-timeline-year {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    padding: 2px 10px;
    border-radius: 8px;
    margin-bottom: 0.4rem;
    box-shadow: none;
    letter-spacing: 0.01em;
}
.vita-timeline-label {
    font-size: 0.92rem;
    color: var(--text-muted);
    background: var(--surface);
    padding: 2px 10px;
    border-radius: 8px;
    margin-top: 0.1rem;
    box-shadow: 0 1px 4px rgba(99,102,241,0.04);
    text-align: center;
    max-width: 120px;
    white-space: normal;
}
@media (max-width: 900px) {
    .vita-timeline { max-width: 99vw; height: 120px; }
    .vita-timeline-point { min-width: 60px; }
    .vita-timeline-label { font-size: 0.85rem; max-width: 90px; }
}
@media (max-width: 600px) {
    .vita-timeline { height: 170px; }
    .vita-timeline-point { min-width: 40px; }
    .vita-timeline-label { font-size: 0.8rem; max-width: 70px; }
    .vita-timeline-year { font-size: 0.8rem; }
}
/* Timeline-Dots für Firmenlogos auf der Timeline (ohne Umrandung/Schatten) */
.vita-timeline-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    z-index: 3;
    padding: 0;
    margin: 0;
}

.vita-timeline-dot img.vita-firmenlogo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    box-shadow: none;
    background: transparent;
    margin: 0;
}
.vita-timeline-point {
    padding-top: 0;
}
@media (max-width: 900px) {
    .vita-timeline-dot { width: 30px; height: 30px; }
    .vita-timeline-dot img.vita-firmenlogo { width: 30px; height: 30px; }
}
@media (max-width: 600px) {
    .vita-timeline-dot { width: 18px; height: 18px; }
    .vita-timeline-dot img.vita-firmenlogo { width: 18px; height: 18px; }
}
/* ========================================
    CSS CUSTOM PROPERTIES (DESIGN TOKENS)
    Lemma.studio inspiriertes Designsystem
    --------------------------------------
    Definiert Farbvariablen, Schatten, Typografie und Abstände für das gesamte Projekt.
    Alle Farben und Abstände werden als CSS-Variablen bereitgestellt.
    ======================================== */
:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --muted-surface: #1a1a1a;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --heading: #ffffff;
    --subheading: #d0d0d0;
    --muted-2: #808080;
    --muted-3: #606060;
    --muted-4: #404040;
    --placeholder: #707070;
    --danger: #ff4444;
    --danger-bg: #2a1a1a;
    --danger-border: #3a2020;
    --success: #44ff88;
    --success-bg: #1a2a1f;
    --success-border: #204030;
    --accent-border: rgba(255,255,255,0.1);
    --line: #2a2a2a;
    --border: #2a2a2a;
    --accent: #ffffff;
    --accent-secondary: #6366f1;
    --shadow-weak: rgba(0,0,0,0.2);
    --shadow-medium: rgba(0,0,0,0.4);
}

/* ========================================
    BASISSTILE
    ----------------------------------------
    Grundlegende Resets, Schriftarten, Container, Body-Layout.
    ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    padding-top: 0;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Speziell für Blog-Karte: minimales Padding */
    #blog .container {
        padding: 0 0.25rem;
    }
}


/* ========================================
    NAVIGATION
    ----------------------------------------
    Sticky Navigation Bar, Burger-Menü für Mobile, Brand-Logo.
    ======================================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 2rem 3rem;
    z-index: 1000;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 3rem;
    justify-content: flex-end;
    width: 100%;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

nav a:hover {
    color: var(--heading);
}

nav a.active-scroll {
    color: var(--heading);
}

/* Nav inner layout */
nav .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

/* Brand */
.nav-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--heading);
    letter-spacing: 0.05em;
}

.nav-brand img {
    display: block;
    border-radius: 4px;
}

/* Toggle (hidden on desktop) */
.nav-toggle { 
    display: none; 
    background: transparent; 
    border: none; 
    padding: 0.25rem; 
    cursor: pointer; 
}
.nav-toggle:focus { outline: 2px solid var(--border); outline-offset: 2px; }

.burger {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, background 0.3s ease;
}
.burger::before,
.burger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.burger::before { top: -7px; }
.burger::after  { top:  7px; }

/* When menu is open, animate into an X */
nav.open .burger { background: transparent; }
nav.open .burger::before { transform: translateY(7px) rotate(45deg); }
nav.open .burger::after  { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav behavior */
@media (max-width: 768px) {
    .nav-toggle { display: inline-block; }

    /* kompaktere Navbar auf Mobile, damit Höhe konsistent ist */
    nav { padding: 0.9rem 1rem; }

    nav ul.nav-links {
        display: none;
        position: absolute;
        /* direkt unterhalb der Nav-Bar einblenden, ohne Spalt */
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 16px var(--shadow-weak);
        padding: 0.75rem 1.25rem 1rem;
        justify-content: flex-start;
        align-items: flex-start;
        z-index: 999;
        margin: 0;
    }

    nav.open ul.nav-links { display: flex; }

    nav ul.nav-links li { width: 100%; }
    nav ul.nav-links a { display: block; width: 100%; padding: 0.75rem 0; }
}

/* ========================================
    HERO SECTION
    ----------------------------------------
    Startbereich mit animiertem Grid, Topologie, Social Links und Titel.
    ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 3rem 4rem;
    position: relative;
    isolation: isolate; /* create stacking context so negative z-index stays within hero */
    background: var(--bg);
    text-align: center;
    overflow: hidden;
}

/* Mathematischer 3D-Gitter-Hintergrund (animiert, Topologie) */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(0deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.4;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 0.7em;
    box-shadow: 0 2px 12px rgba(99,102,241,0.13);
    background: var(--surface);
    border: 2.5px solid var(--surface);
    display: block;
    transform: translate(-50%, -50%);
    filter: blur(60px);
    animation: pulse 8s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}
/* Computer Vision visualization animations */
@keyframes bboxPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Person walking animation - moves from left to right */
@keyframes personWalk {
    0% { 
        transform: translate(150px, 510px) scale(1);
    }
    25% { 
        transform: translate(400px, 500px) scale(1.1);
    }
    50% { 
        transform: translate(600px, 490px) scale(1.2);
    }
    75% { 
        transform: translate(850px, 500px) scale(1.1);
    }
    100% { 
        transform: translate(1050px, 510px) scale(1);
    }
}

/* Walking leg animation */
@keyframes walkLegLeft {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-25deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(25deg); }
}

@keyframes walkLegRight {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(25deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-25deg); }
}

/* Walking arm animation */
@keyframes walkArmLeft {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-15deg); }
}

@keyframes walkArmRight {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(15deg); }
}

/* Background people animation (slower, less distance) */
@keyframes bgPersonWalk1 {
    0% { transform: translate(300px, 350px) scale(0.6); }
    50% { transform: translate(500px, 345px) scale(0.6); }
    100% { transform: translate(700px, 350px) scale(0.6); }
}

@keyframes bgPersonWalk2 {
    0% { transform: translate(800px, 300px) scale(0.5); }
    50% { transform: translate(600px, 295px) scale(0.5); }
    100% { transform: translate(400px, 300px) scale(0.5); }
}

.hero .wave {
    display: none;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 0.95;
    margin-bottom: 0;
    color: var(--heading);
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.hero-content h2 {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 300;
    margin-bottom: 0;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    max-width: 800px;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0;
    font-weight: 400;
    max-width: 600px;
    line-height: 1.7;
}

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

.social-links a {
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--heading);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.social-links a:active {
    transform: translateY(-1px) scale(1.02);
}

/* Mathematische 3D-Geometrien im Hintergrund (Kugel, Würfel, Torus) */
.math-geometry {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

/* Hero layering */
.hero { position: relative; }
.hero .hero-content { position: relative; z-index: 10; }

/* Computer Vision Visualization */
.cv-visualization {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.5;
    pointer-events: none;
}

/* Walking person and tracking bbox move together */
.cv-visualization .walking-person,
.cv-visualization .tracking-bbox {
    animation: personWalk 25s linear infinite;
}

/* Individual limb animations */
.cv-visualization .leg-left {
    transform-origin: 0 -10px;
    animation: walkLegLeft 1.5s ease-in-out infinite;
}

.cv-visualization .leg-right {
    transform-origin: 0 -10px;
    animation: walkLegRight 1.5s ease-in-out infinite;
}

.cv-visualization .arm-left {
    transform-origin: 0 -35px;
    animation: walkArmLeft 1.5s ease-in-out infinite;
}

.cv-visualization .arm-right {
    transform-origin: 0 -35px;
    animation: walkArmRight 1.5s ease-in-out infinite;
}

/* Background people */
.cv-visualization .bg-person-1 {
    animation: bgPersonWalk1 30s linear infinite;
}

.cv-visualization .bg-person-2 {
    animation: bgPersonWalk2 35s linear infinite reverse;
}

.cv-visualization .feature-points circle {
    animation: bboxPulse 2s ease-in-out infinite;
}

.cv-visualization .feature-points circle:nth-child(odd) {
    animation-delay: 0.3s;
}

.cv-visualization .feature-points circle:nth-child(even) {
    animation-delay: 0.6s;
}

/* Dense Wireframe Terrain Visualization */
.wireframe-terrain {
    position: absolute;
    width: 100%;
    /* push the grid down so the navbar doesn't cover the peak */
    top: 130px; /* approx navbar height incl. blur; adjust if needed */
    height: calc(100% - 30px);
    left: 0;
    z-index: -1; /* force behind all hero content */
    pointer-events: none;
    opacity: 0.2;
}

@media (max-width: 900px) {
    .wireframe-terrain {
        top: 70px;
        height: calc(100% - 70px);
        opacity: 0.5;
    }
}

@media (max-width: 600px) {
    .wireframe-terrain {
        top: 0;
        height: 100%;
        opacity: 0.2;
        /* Scale up the SVG to fill the entire mobile viewport */
        transform: scale(2.2);
        transform-origin: center center;
    }
}

/* Animate terrain rows - subtle wave motion */
.wireframe-terrain .terrain-rows polyline {
    animation: terrainWave 12s ease-in-out infinite;
}

.wireframe-terrain .row-1 { animation-delay: 0s; }
.wireframe-terrain .row-2 { animation-delay: 0.3s; }
.wireframe-terrain .row-3 { animation-delay: 0.6s; }
.wireframe-terrain .row-4 { animation-delay: 0.9s; }
.wireframe-terrain .row-5 { animation-delay: 1.2s; }
.wireframe-terrain .row-6 { animation-delay: 1.5s; }
.wireframe-terrain .row-7 { animation-delay: 1.8s; }
.wireframe-terrain .row-8 { animation-delay: 2.1s; }

/* Animate terrain columns - subtle pulse */
.wireframe-terrain .terrain-columns polyline {
    animation: columnPulse 10s ease-in-out infinite;
}

.wireframe-terrain .col-1 { animation-delay: 0s; }
.wireframe-terrain .col-2 { animation-delay: 0.5s; }
.wireframe-terrain .col-3 { animation-delay: 1s; }
.wireframe-terrain .col-4 { animation-delay: 1.5s; }
.wireframe-terrain .col-5 { animation-delay: 2s; }
.wireframe-terrain .col-6 { animation-delay: 2.5s; }
.wireframe-terrain .col-7 { animation-delay: 2s; }
.wireframe-terrain .col-8 { animation-delay: 1.5s; }
.wireframe-terrain .col-9 { animation-delay: 1s; }
.wireframe-terrain .col-10 { animation-delay: 0.5s; }

@keyframes terrainWave {
    0%, 100% { 
        transform: translateY(0);
        stroke-opacity: 0.9;
    }
    50% { 
        transform: translateY(-3px);
        stroke-opacity: 1;
    }
}

@keyframes columnPulse {
    0%, 100% { 
        stroke-opacity: 0.765;
    }
    50% { 
        stroke-opacity: 0.9;
    }
}

.geometry-sphere {
    position: absolute;
    width: 350px;
    height: 350px;
    top: 15%;
    right: 8%;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.geometry-sphere::before,
.geometry-sphere::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 50%;
    top: 0;
    left: 0;
}

.geometry-sphere::before {
    transform: rotateY(60deg);
}

.geometry-sphere::after {
    transform: rotateX(60deg);
}

.geometry-cube {
    position: absolute;
    width: 200px;
    height: 200px;
    bottom: 25%;
    left: 10%;
    transform-style: preserve-3d;
    animation: rotate3d 30s linear infinite;
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    background: rgba(99, 102, 241, 0.02);
}

.cube-front { transform: translateZ(100px); }
.cube-back { transform: translateZ(-100px) rotateY(180deg); }
.cube-right { transform: rotateY(90deg) translateZ(100px); }
.cube-left { transform: rotateY(-90deg) translateZ(100px); }
.cube-top { transform: rotateX(90deg) translateZ(100px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(100px); }

.geometry-torus {
    position: absolute;
    width: 300px;
    height: 300px;
    top: 50%;
    right: 20%;
    border: 2px solid rgba(99, 102, 241, 0.18);
    border-radius: 50%;
    animation: spin 25s linear infinite;
}

.geometry-torus::before {
    content: '';
    position: absolute;
    width: 65%;
    height: 65%;
    top: 17.5%;
    left: 17.5%;
    border: 2px solid rgba(139, 92, 246, 0.18);
    border-radius: 50%;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

@keyframes rotate3d {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

@keyframes gridFlow {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 0 -400px, -400px 0; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Topologie-Welle für Gradient Descent Effekt */
@keyframes topologyWave {
    0%, 100% { 
        transform: perspective(600px) rotateX(75deg) translateZ(0px);
    }
    20% { 
        transform: perspective(600px) rotateX(75deg) translateZ(40px) translateY(-25px);
    }
    40% { 
        transform: perspective(600px) rotateX(75deg) translateZ(-30px) translateY(15px);
    }
    60% { 
        transform: perspective(600px) rotateX(75deg) translateZ(50px) translateY(-35px);
    }
    80% { 
        transform: perspective(600px) rotateX(75deg) translateZ(-20px) translateY(10px);
    }
}

/* ========================================
    TIMELINE (ausgeblendet)
    ----------------------------------------
    Zeitstrahl-Elemente werden im Lemma-Design nicht angezeigt.
    ======================================== */
.timeline-container,
.timeline,
.timeline-point,
.timeline-date,
.timeline-arrow,
.timeline-today,
.timeline-card {
    display: none !important;
}

/* ========================================
    SECTIONS
    ----------------------------------------
    Grundstruktur für alle Hauptbereiche (About, Skills, Blog, Kontakt).
    ======================================== */
section {
    min-height: 100vh;
    padding: 8rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

section h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 3rem;
    color: var(--heading);
    text-align: left;
    font-weight: 800;
    letter-spacing: -0.02em;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 800px;
}

/* ========================================
    CV SECTION
    ----------------------------------------
    Werdegang-Bereich mit Timeline und CV-Downloads.
    ======================================== */
.cv-section {
    padding: 8rem 3rem;
    background: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 600px) {
    .cv-section {
        padding: 6rem 0.5rem;
        overflow-x: hidden;
    }
}

.cv-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* ========================================
    ABOUT SECTION
    ----------------------------------------
    Über-mich-Bereich mit Grid-Layout und Bild.
    ======================================== */
.about-section {
    padding: 8rem 3rem;
    background: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: center;
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

.about-text {
    color: var(--text);
    line-height: 1.6;
    text-align: left;
}

.about-text,
.about-text p {
    text-align: left;
    margin-left: 0;
    padding-left: 0;
}

.about-text h3 {
    color: var(--heading);
    margin-bottom: 0.5rem;
}

.about-text p {
    margin-bottom: 0.75rem;
}

.about-image .image-frame {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 400px;
    aspect-ratio: 4 / 5;
    margin: 0 auto;
}

.about-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: grayscale(15%) contrast(1.05) brightness(0.95);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.highlights-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-top: 1.25rem;
}

@media (min-width: 700px) {
    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.highlight-card {
    background: var(--surface);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(31,36,48,0.04);
}

.highlight-icon {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--heading);
}

.highlight-card h4 {
    margin: 0 0 0.25rem;
    color: var(--heading);
}

.highlight-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ========================================
   SKILLS SECTION
   ======================================== */
.skills-section {
    padding: 6rem 2.5rem; /* etwas kompaktere Abstände */
    min-height: auto; /* entferne 100vh, damit Bereich nicht zu groß wird */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.skills-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* konsistente Lücken zwischen Titel, Projekte und Grid */
}

/* Make the Skills heading follow the site's left-aligned heading style
   (the container is centered, but the heading text should align left).
   This keeps Skills visually consistent with other section headings. */
.skills-inner h2 {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}

.skills-grid {
    display: grid;
    gap: 1rem;
    /* responsive columns: fit as many 260px columns as possible */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Projects showcase under Skills */
.projects-showcase {
    margin-top: 0.6rem; /* direkt unter Überschrift */
    margin-bottom: 2rem; /* mehr Abstand zu den Skill-Karten darunter */
}

.projects-showcase h3 {
    margin: 1rem 0 1rem 0;
    color: var(--heading);
    text-align: left;
}

.project-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    justify-items: stretch; /* Karten füllen die Spaltenbreite auf Mobile */
}

@media (min-width: 700px) {
    .project-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.project-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    /* mobile: stretch to fill the available column width (like skill cards) */
    width: 100%;
    max-width: none;
    height: 100%;
}

@media (min-width: 700px) {
    /* on medium+ screens keep the narrower card width and center them */
    .project-card {
        width: min(86%, 420px);
        max-width: 420px;
        justify-self: center;
    }
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(20, 20, 20, 0.9);
}

.project-thumb {
    width: 100%;
    /* slightly taller default ratio to give images more vertical room */
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex: 0 0 auto; /* prevent thumb from collapsing when body grows */
}

.project-thumb img {
    width: 100%;
    height: 100%;
    /* Use cover so images fill the area without distortion */
    object-fit: cover;
    display: block;
}

/* Mobile: give more vertical space so images don't look squashed */
@media (max-width: 699px) {
    .project-thumb {
        aspect-ratio: 16 / 9;
        max-height: 320px;
    }
}

@media (min-width: 700px) and (max-width: 1099px) {
    /* Medium screens: keep a balanced, slightly taller thumbnail */
    .project-thumb {
        aspect-ratio: 16 / 9;
        max-height: 360px;
    }
}

@media (min-width: 1100px) {
    /* Desktop: allow larger thumbnails while keeping proportions */
    .project-thumb {
        aspect-ratio: 16 / 8;
        max-height: 420px; /* larger vertical area on desktop */
    }
    .project-thumb img {
        object-position: center center;
        width: 100%;
        height: 100%;
    }
    .project-card {
        max-height: none; /* allow taller cards to accommodate bigger thumbs */
        display: flex;
        flex-direction: column;
    }
}

.project-body {
    padding: 0.5rem 0.65rem 0.7rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1; /* füllt verbleibenden Raum, damit CTA unten ausgerichtet werden kann */
}

.project-title {
    margin: 0;
    color: var(--heading);
    /* Slightly larger to match site card titles (consistent with .card-title) */
    font-size: 1.05rem;
    font-weight: 700;
    text-align: left;
}

.project-desc {
    margin: 0;
    color: var(--text-muted);
    /* Use the site's body/card paragraph size for consistency */
    font-size: 1.05rem;
    line-height: 1.5;
    text-align: left;
}

.project-cta {
    margin-top: auto; /* drückt Button an das untere Ende für gleiche Höhe */
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.55rem;
    border-radius: 7px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--heading);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.45);
}

@media (min-width: 700px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    /* on very wide screens allow four columns for dense layouts */
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.skill-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    border-radius: 12px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: all 0.3s ease;
    height: 100%; /* sorgt dafür, dass Grid-Zellen gleiche Höhe annehmen */
}

.skill-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(20, 20, 20, 0.8);
    transform: translateY(-2px);
}

.skill-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--muted-surface);
    border-radius: 8px;
    color: var(--heading);
}

.skill-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--heading);
}

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    /* Keep badges at the top, not pushed to bottom */
    margin-top: 0;
}

.badge {
    background: var(--muted-surface);
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 1.01rem;
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 0.1em;
    text-align: center;
    display: block;
    line-height: 1.2;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
}

/* Skills: Tags an Lemma-Thema angleichen (monochrom, dezent, wie Blog-Tags) */
.skills-section .skill-badges .badge,
.skills-section .expertise-list .badge {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.skills-section .skill-badges .badge:hover,
.skills-section .expertise-list .badge:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.expertise-box {
    margin-top: 1.25rem;
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
    text-align: center;
}

.expertise-box h3 {
    margin-bottom: 0.75rem;
    color: var(--heading);
}

.expertise-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* ========================================
   BLOG SECTION
   ======================================== */
#blog {
    background: transparent;
    position: relative;
    padding: 8rem 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-inner {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* Remove padding from container inside blog section */
#blog .container {
    padding: 0;
    max-width: none;
}

/* ========================================
   BLOG PAGE (separate page)
   ======================================== */
#blog-page {
    padding: 0;
}

.blog-section {
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12rem 3rem 8rem;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.blog-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.blog-header {
    margin-bottom: 3rem;
}

.blog-header h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1rem;
    color: var(--heading);
    font-weight: 800;
    letter-spacing: -0.02em;
    padding-left: 0;
    margin-left: 0;
}

.blog-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 720px;
    padding-left: 0;
    margin-left: 0;
}

/* Back button - versteckt auf Blog-Seite, nicht benötigt */
#blog-page .back-btn {
    display: none;
}

.blog-filter {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    align-items: center;
    max-width: 600px;
}

.blog-filter input[type=search] {
    flex: 1;
    max-width: 300px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--heading);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.blog-filter input[type=search]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.blog-filter input[type=search]::placeholder {
    color: var(--text-muted);
}

.blog-filter select {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--heading);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-filter select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.blog-filter button {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--heading);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.blog-filter button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Mobile layout adjustments for blog header + filter */
@media (max-width: 768px) {
    .blog-section {
        padding: 8rem 1.25rem 4rem; /* less top padding to bring search into view */
    }

    .blog-header { margin-bottom: 1.5rem; }
    .blog-header h2 { font-size: clamp(2rem, 9vw, 3rem); }

    .blog-filter {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
        gap: 0.6rem;
    }

    .blog-filter input[type=search],
    .blog-filter select,
    .blog-filter button {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .blog-section {
        padding: 8rem 0.75rem 4rem; /* minimal side padding on small mobile */
    }
}

/* ========================================
   BLOG CARDS
   ======================================== */
.grid-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    align-items: stretch;
}

@media (min-width: 720px) {
    .grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Pagination */
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
}

.pagination-list li {
    margin: 0;
}

.pagination-link {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--heading);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.pagination-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.pagination-list li strong {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--heading);
    border-radius: 8px;
    font-size: 0.95rem;
    display: inline-block;
}

.pagination-list li a:not(.pagination-link) {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--heading);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.pagination-list li a:not(.pagination-link):hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(20, 20, 20, 0.9);
    transform: translateY(-2px);
}

#blog .card.blog-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--surface);
    transition: all 0.3s ease;
}

/* Stronger, visible hover elevation specifically for blog cards (overrides generic .card:hover) */
#blog .card.blog-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(20, 20, 20, 0.9);
    transform: translateY(-4px);
}

#blog .card {
    min-height: 320px;
}

.card-image,
#blog .card-image {
    height: 220px;
    overflow: hidden;
    min-height: 120px;
}

#blog .card-image {
    height: 170px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.card-img,
#blog .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.card:hover .card-img {
    transform: scale(1.06); /* slightly more pronounced image movement */
}

.card-thumb {
    height: 220px;
    background-size: cover;
    background-position: center;
}

#blog .blog-thumb {
    display: block;
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center center;
    border-radius: 12px;
}

.card-content,
#blog .card-content {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    align-items: flex-start; /* align text/content to left edge */
}

#blog .card-content {
    padding: 1rem 1.1rem 1.1rem 1rem;
    gap: 0.45rem;
    font-size: 15px;
    line-height: 1.55;
    background: transparent;
    align-items: flex-start;
}

/* Ensure identical left padding on the real /blog page as on the onepager teaser */
#blog-page .card-content {
    padding: 1rem 1.1rem 1.1rem 1rem; /* L=1rem matches .card-footer */
    gap: 0.45rem;
    font-size: 15px;
    line-height: 1.55;
    background: transparent;
    align-items: flex-start;
}

.card-body {
    padding: 0; /* align excerpt flush under the title (uses parent .card-content padding) */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start; /* ensure inner text aligns left */
    width: 100%;
    flex: 1; /* grow to fill space so tag row can anchor at bottom */
}

.meta-row,
#blog .meta-row {
    display: flex;
    gap: 1rem;
    color: var(--muted-4);
    font-size: 0.9rem;
    align-items: center;
}

#blog .meta-row {
    color: var(--muted-3);
    font-size: 12px;
    gap: 0.9rem;
}

/* Add breathing room between meta (date/time) and the title,
   and a bit below the title before the excerpt starts */
#blog .card-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* space between meta and title */
    margin-bottom: 0.8rem; /* space below the title before excerpt */
}

#blog-page .card-header {
    gap: 1.5rem;
}

#blog .meta-row svg {
    opacity: 0.9;
    width: 12px; /* match font size */
    height: 12px;
    margin-right: 0; /* spacing handled by gap on .meta */
}

#blog-page .meta-row svg {
    width: 12px;
    height: 12px;
}

#blog .meta-row .meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem; /* consistent spacing between icon and text */
    line-height: 1; /* align baseline neatly */
}

.card-meta {
    color: var(--text-muted);
    font-size: 1.01rem;
    color: var(--surface);
    font-weight: 700;
    background: var(--accent-secondary);
    border-radius: 14px;
    padding: 0.18em 1.1em;
    margin-bottom: 0.2em;
    margin-top: 0.2em;
    text-align: center;
    display: inline-block;
    box-shadow: 0 2px 12px rgba(99,102,241,0.10);
    letter-spacing: 0.01em;
    font-size: 18px;
    margin-top: 0.15rem;
    font-weight: 700;
    color: var(--heading);
    line-height: 1.25;
    /* Fix title height to 2 lines so the excerpt starts at the same level across cards */
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 45px; /* 18px * 1.25 * 2 = 45px */
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.93rem;
    color: var(--muted-3);
    font-weight: 400;
    text-align: left;
    display: block;
    margin-bottom: 0.1em;
    margin-top: 0.1em;
    color: var(--muted-2);
    font-size: 14px;
    margin-top: 0.15rem;
    line-height: 1.6;
    /* Clamp to 3 lines with ellipsis to keep cards compact */
    display: -webkit-box;
    /* Standard property for future compatibility */
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-height: 4.8em; /* 3 lines * 1.6 line-height */
}

#blog-page .card-excerpt {
    text-align: left;
}

.tag-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    margin-top: 0.5rem;
    align-items: center;
    min-height: 32px;
    margin-top: auto;
    margin-bottom: 0.25rem;
    overflow: hidden;
}

#blog .tag-row {
    margin-top: 0.4rem;
    width: 100%;
    flex-wrap: nowrap;
}

#blog .tag-row .badge {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

#blog-page .tag-row .badge {
    padding: 2px 6px;
    font-size: 0.75rem;
}

#blog .tag-row .badge:hover,
#blog-page .tag-row .badge:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.tag {
    background: var(--muted-surface);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.card-footer,
#blog .card-footer {
    padding: 0.75rem 1.1rem 1rem 1rem;
    margin: 0;
    background: transparent;
    border-top: 0;
    display: flex;
    align-items: center;
    margin-top: auto;
    justify-content: flex-start;
}

/* On the real /blog page the footer sits inside .card-content which already has left padding.
   Remove the inner left/right padding so the Read More aligns flush with title, excerpt and tags. */
#blog-page .card-footer {
    padding-left: 0;
    padding-right: 0;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin-top: auto;
    background: transparent;
    color: var(--heading);
    border-radius: 0;
    border: none;
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
}

#blog .card .read-more {
    color: var(--heading);
    padding: 0;
    border: none;
    border-radius: 0;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    text-decoration: none;
    margin-top: auto;
    /* align flush with title/excerpt/tags (use same left padding as .card-content) */
}

/* Do not animate gap; only arrow moves */

.card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    background: transparent;
    color: var(--heading);
    border-radius: 0;
    text-decoration: none;
    font-weight: 600;
    border: none;
}

#blog .card .read-more .arrow-icon {
    width: 16px;
    height: 16px;
    stroke: var(--heading);
    transition: transform 0.3s ease;
}

/* Move arrow when hovering the link or the entire card */
#blog .card .read-more:hover .arrow-icon,
#blog .card:hover .read-more .arrow-icon,
#blog-page .card .read-more:hover .arrow-icon,
#blog-page .card:hover .read-more .arrow-icon {
    transform: translateX(4px);
}

.card .read-more svg.icon {
    width: 18px;
    height: 18px;
}

.icon,
svg.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    fill: currentColor;
    stroke: currentColor;
}

.icon.small {
    width: 16px;
    height: 16px;
}

/* ========================================
   FEATURED BLOG CARD
   ======================================== */
.blog-featured-card {
    display: flex;
    align-items: stretch;
    max-width: 1100px; /* gleiche Breite wie Skills-Section */
    width: 100%;
    height: 320px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

.blog-featured-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(20, 20, 20, 0.9);
}

.blog-featured-image {
    flex: 0 0 50%;
    overflow: hidden;
    position: relative;
    height: 320px;
}

.blog-featured-image .featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-featured-card:hover .blog-featured-image .featured-img {
    transform: scale(1.1);
}

.blog-featured-content {
    flex: 1;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.featured-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.featured-label {
    font-size: 14px; /* slightly larger for optical parity with 20px icon */
    line-height: 1;  /* tight line height to align with icon */
    font-weight: 600;
    color: var(--muted-2);
    margin: 0 0 0.25rem 0;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    text-align: left;
}

.featured-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    text-align: left;
}

.featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--heading);
    transition: gap 0.3s ease;
}

.blog-featured-card:hover .featured-cta {
    gap: 1.25rem;
}

.cta-arrow {
    transition: transform 0.3s ease;
}

.blog-featured-card:hover .cta-arrow {
    transform: translateX(5px);
}

@media (max-width: 899px) {
    .blog-featured-card {
        flex-direction: column;
        max-width: 95%; /* breiter auf Mobile */
        height: auto; /* allow content below the image to be visible */
        margin: 0 auto;
    }

    .blog-featured-image {
        flex: none;
        height: 280px;
        width: 100%;
    }

    .blog-featured-content {
        padding: 2rem 1.5rem;
    }

    .featured-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .blog-featured-card {
        max-width: 98%; /* noch breiter auf kleinen Mobiles */
        margin: 0 auto;
    }

    .blog-featured-image {
        height: 220px;
    }

    .blog-featured-content {
        padding: 1.5rem 1.25rem;
    }

    .featured-title {
        font-size: 1.3rem;
    }

    .featured-excerpt {
        font-size: 0.85rem;
    }
}

/* ========================================
   ONEPAGER BLOG TEASER
   ======================================== */
.onepager-card {
    max-width: 440px;
    margin: 2rem auto;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: block;
}

.onepager-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 70px rgba(22,28,37,0.12);
}

.onepager-image {
    height: 320px;
    background-size: cover;
    background-position: center;
}

.onepager-content {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: flex-start;
    text-align: left;
}

.onepager-content .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-2);
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.onepager-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--heading);
    margin: 0 0 0.4rem;
}

.onepager-excerpt {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 0.8rem;
    max-width: 50ch;
}

.onepager-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.2rem 0;
    border-radius: 6px;
    background: transparent;
    color: var(--heading);
    font-weight: 700;
}

.onepager-cta .arrow {
    transition: transform 0.25s ease;
}

.onepager-card:hover .onepager-cta .arrow {
    transform: translateX(10px);
}

@media (max-width: 900px) {
    .vita-timeline { max-width: 99vw; height: 170px; }
    .vita-timeline-point { min-width: 120px; max-width: 160px; }
    .vita-firmenlogo { width: 36px; height: 36px; }
    .vita-funktion, .vita-firma, .vita-timeline-year, .vita-ort { font-size: 0.93rem; }
}
@media (max-width: 600px) {
    .vita-timeline { height: 260px; }
    .vita-timeline-point { min-width: 80px; max-width: 110px; }
    .vita-firmenlogo { width: 24px; height: 24px; }
    .vita-funktion, .vita-firma, .vita-timeline-year, .vita-ort { font-size: 0.8rem; }
}
@media (min-width: 900px) {
    .onepager-card { display: flex; }
    .onepager-image {
        flex: 0 0 58%;
        height: 100%;
        overflow: hidden;
    }

    .onepager-image .card-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top left;
        display: block;
        transition: transform 0.5s ease;
    }

    .onepager-card:hover .onepager-image .card-img {
        transform: scale(1.07);
    }

    .onepager-content {
        flex: 1 1 42%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: left;
        padding: 2rem 1.5rem;
    }

    .onepager-content h3,
    .onepager-content p {
        text-align: left;
    }

    .onepager-cta {
        margin-top: 1.25rem;
        align-self: flex-start;
        display: inline-flex;
        gap: 0.6rem;
        text-decoration: none;
        cursor: pointer;
    }

    .onepager-cta:hover {
        text-decoration: none;
    }

    .onepager-image img {
        border-top-left-radius: 14px;
        border-bottom-left-radius: 14px;
    }
}

@media (max-width: 899px) {
    .onepager-card {
        max-width: 720px;
        margin: 1.5rem auto;
    }

    .onepager-image {
        height: 320px;
        width: 100%;
        overflow: hidden;
    }

    .onepager-image .card-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top left;
        display: block;
    }

    .onepager-image img {
        border-top-left-radius: 14px;
        border-top-right-radius: 14px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .onepager-content {
        padding: 1.5rem 1.25rem;
    }
}

/* ========================================
   POST DETAIL PAGE
   ======================================== */
.post-detail {
    /* Offset for fixed navbar so the hero/title aren’t hidden */
    padding-top: 8rem;
}

@media (max-width: 768px) {
    .post-detail {
        /* Mobile navbar is shorter but still fixed */
        padding-top: 5.5rem;
    }
}

.post-detail .post {
    background: transparent;
    max-width: 820px;
    margin: 2.25rem auto;
}

/* Make entire blog cards clickable with a stretched-link pattern */
.stretched-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-indent: -9999px; /* hide text; screen-reader text provided inside */
    overflow: hidden;
}

/* Visually hidden utility for accessible-only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Ensure interactive elements inside the card can still sit above if needed */
.card .read-more,
.card .read-more .arrow-icon {
    position: relative;
    z-index: 2;
}

/* Focus visibility for accessibility */
.card:focus-within {
    box-shadow: 0 0 0 3px rgba(59,130,246,0.3), 0 12px 40px rgba(22,28,37,0.12);
}
.card a:focus-visible {
    outline: 2px solid rgba(59,130,246,0.6);
    outline-offset: 2px;
    border-radius: 8px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
    margin-top: 2rem; /* Abstand zur fixen Navbar */
    margin-bottom: 1.5rem;
    color: var(--heading);
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    /* Keep label static; do not animate gap for back button */
    transition: color 0.2s ease;
}

/* On hover, only the arrow moves; text remains in place */

.back-btn .arrow-icon {
    width: 20px;
    height: 20px;
    stroke: var(--heading);
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.back-btn:hover .arrow-icon {
    transform: translateX(-5px);
}

.post-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem; /* mehr Luft zum Titel */
    color: var(--heading);
}

.post-header .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem; /* etwas grösserer Abstand */
    color: var(--muted-2);
    font-size: 0.95rem;
    margin: 0.75rem 0 1rem 0; /* mehr Luft um die Meta-Zeile */
}

.post-header .meta-row .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.post-header .meta-row svg {
    width: 18px;
    height: 18px;
    color: var(--muted-3);
}

.post-header .lead {
    color: var(--muted-2);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 0.5rem; /* etwas mehr Abstand zum Untertitel */
}

/* Mehr Abstand vom Header (Titel/Meta/Lead) zum folgenden Inhalt */
.post-header {
    margin-bottom: 1.2rem;
}

.post-body {
    line-height: 1.8;
    color: var(--text);
    font-size: 1.05rem;
}

.post-body h2, .post-body h3, .post-body h4 {
    color: var(--heading);
    margin-top: 1.6rem;
    margin-bottom: 0.6rem;
}

.post-body p { margin: 0.9rem 0; }

.post-body ul, .post-body ol { padding-left: 1.25rem; margin: 0.75rem 0; }
.post-body li { margin: 0.3rem 0; }

.post-body blockquote {
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border-left: 3px solid rgba(31,36,48,0.15);
    background: rgba(31,36,48,0.03);
    color: var(--muted-1);
    border-radius: 6px;
}

.post-body pre, .post-body code, .post-body .codehilite pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.post-body pre, .post-body .codehilite pre {
    background: #0b1220;
    color: #e6edf3;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    overflow: auto;
    line-height: 1.6;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.post-body code:not(pre code) {
    background: rgba(31,36,48,0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Links im Blogpost: behalten Textfarbe, sind unterstrichen */
.post-body a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.post-body a:hover {
    opacity: 0.7;
}

.post-hero img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Abstand zwischen Hero-Bild und Titel */
.post-hero {
    margin-bottom: 1.5rem;
}

.post-footer {
    background: transparent; /* sicherstellen, dass kein graues Rechteck erscheint */
    margin-top: 2.5rem; /* etwas mehr Abstand nach dem Inhalt */
    padding-top: 1.25rem;
    border-top: 1px solid rgba(31,36,48,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.post-footer .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem; /* minimal mehr Abstand zwischen den Tags */
}

.post-footer .badge {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.post-footer .badge:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.post-footer .back-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.post-footer .back-link:hover {
    background: transparent;
    text-decoration: none;
}

/* Hover-Animation wie beim "Zurück"-Button: nur der Pfeil bewegt sich */
.post-footer .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.post-footer .back-link .arrow-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}
.post-footer .back-link:hover .arrow-icon {
    transform: translateX(-4px);
}

.blog-meta {
    padding: 0;
}

.blog-meta .eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 600;
}

.blog-meta h3 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    color: var(--text);
}

.blog-meta p {
    color: var(--text-muted);
    line-height: 1.6;
}

.blog-meta a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-link {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.blog-card-link .blog-thumb {
    flex: 0 0 45%;
}

.blog-card-link .blog-meta {
    flex: 1;
}

.blog-card-link:hover {
    text-decoration: none;
}

.blog-card .cta {
    font-weight: 700;
}

@media (max-width: 800px) {
    .blog-card {
        flex-direction: column;
    }

    .blog-thumb {
        flex: 0 0 auto;
        height: 180px;
    }
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-section {
    min-height: 100vh;
    max-width: 1400px;
    background: transparent;
    padding: 8rem 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
}

.contact-inner {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.contact-section > h2 {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

.contact-inner > h2 {
    margin-bottom: 3rem;
}

.contact-section::before,
.contact-section::after {
    display: none;
}

.contact-info {
    margin-top: 2rem;
    text-align: center;
}

.contact-info p {
    text-align: center;
}

.contact-info a {
    color: var(--heading);
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(31,36,48,0.06);
    transition: opacity 0.2s;
}

.contact-info a:hover {
    opacity: 0.7;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    width: 100%;
    max-width: 1100px;
    margin: 2rem auto 0; /* center the grid within the section */
}

.contact-left h3,
.contact-right h3 {
    font-size: 1.3rem;
    color: var(--heading);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: left;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--surface);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.contact-card:hover {
       border-color: rgba(255, 255, 255, 0.15);
    background: rgba(20, 20, 20, 0.8);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--muted-surface);
    border-radius: 8px;
    display: flex;
             align-items: center;
    justify-content: center;
    color: var(--heading);
    flex-shrink: 0;
}

.contact-text {
    text-align: left;
    flex: 1;
    min-width: 0; /* allow text to shrink */
}

.contact-text h4 {
    font-size: 0.95rem;
    color: var(--heading);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.contact-text p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all; /* break long email addresses */
}

.availability-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 1.5rem;
    box-shadow: 0 6px 18px rgba(31,36,48,0.04);
}

.availability-card h4 {
    font-size: 1rem;
    color: var(--heading);
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-align: left;
}

.availability-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: left;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    color: var(--heading);
    font-weight: 600;
    text-align: left;
}

.form-group input,
.form-group textarea {
    background: rgb(243, 243, 245);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem;
    color: #1a1a1a; /* dunkle, lesbare Farbe für hellen Hintergrund */
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(59,130,246,0.3);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #707070; /* lesbare Placeholder-Farbe */
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}



.submit-btn {
    background: var(--surface);
    color: var(--heading);
    border: 1.5px solid rgba(255,255,255,0.18);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    letter-spacing: 0.01em;
}

.submit-btn:hover, .submit-btn:focus {
    background: linear-gradient(90deg, rgba(127,90,240,0.18) 0%, rgba(0,224,198,0.18) 100%);
    color: #fff;
    border-color: #7f5af0;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    outline: none;
}

/* ========================================
   FOOTER
   ======================================== */
footer.site-footer {
    background: var(--muted-surface);
    border-top: 1px solid var(--border);
    padding: 3rem 4rem 1.5rem;
    position: relative;
    color: var(--muted-4);
}

footer.site-footer::before {
    display: none;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    align-items: start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo-box {
    width: 40px;
    height: 40px;
    background: var(--heading);
    color: var(--surface);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.footer-logo span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 420px;
}

.footer-middle h4,
.footer-right h4 {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.6rem;
}

.quick-links a {
    color: var(--muted-3);
    text-decoration: none;
    font-size: 1.05rem;
    transition: color 0.2s;
}

.quick-links a:hover {
    color: var(--muted-4);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(31,36,48,0.06);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.2s;
}

.footer-social a:hover {
    background: rgba(31,36,48,0.04);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(31,36,48,0.06);
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    color: var(--muted-2);
    font-size: 0.95rem;
    margin: 0;
}

.heart {
    color: var(--danger);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--muted-3);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text);
}

/* ========================================
   LEGAL PAGES (Impressum, Datenschutz)
   ======================================== */
#legal-page {
    padding: 0;
}

.legal-section {
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 12rem 3rem 8rem;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .legal-section {
        padding: 10rem 1.5rem 6rem;
    }
}

@media (max-width: 480px) {
    .legal-section {
        padding: 8rem 1rem 4rem;
    }
}

.legal-inner {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.legal-section h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 3rem;
    font-weight: 800;
    color: var(--heading);
    letter-spacing: -0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.legal-section h3 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--heading);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.legal-section p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.2rem;
    font-size: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.legal-section a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}

.legal-section a:hover {
    opacity: 0.7;
}

/* ========================================
   MESSAGES
   ======================================== */
.messages {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
}

.message {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 300px;
}

.message.success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.message.error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

/* Back to Top Button removed */

/* ========================================
   RESPONSIVE MEDIA QUERIES
   ======================================== */
@media (max-width: 768px) {
    nav {
        padding: 0.8rem 0; /* use inner .container gutter */
    }

    nav ul {
        gap: 1rem;
    }

    .hero {
        padding: 2rem 1.25rem 6rem;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .timeline-container {
        left: 1.25rem;
        right: 1.25rem; /* match mobile gutter */
        overflow: visible; /* ensure labels aren't clipped */
    }

    section {
        padding: 2rem 1.25rem;
    }

    /* Contact: remove max-width constraint and use symmetric padding */
    .contact-section {
        max-width: none;
        width: 100%;
        padding: 2rem 1rem 4rem 1rem;
        margin: 0;
    }
    
    .contact-inner {
        max-width: 100%;
        padding: 0;
        margin: 0 auto;
    }

    section h2 {
        font-size: 2rem;
    }

    /* Keep the 'Heute' label and arrow within the viewport */
    .timeline-today { right: 0; }
    .timeline-arrow { right: 0; }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* ensure core wrappers are centered and full-width on small screens */
    .hero-content,
    .cv-container,
    .about-container,
    .skills-inner,
    #blog > .container,
    .contact-container {
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
    
    /* Contact elements: prevent overflow and ensure proper sizing */
    .contact-card,
    .availability-card,
    .contact-form,
    .form-group input,
    .form-group textarea {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-left,
    .contact-right {
        max-width: 100%;
        overflow: hidden;
    }
}
