@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@400;700;800&display=swap');

:root {
    --bg: #ffffff;
    --text: #000000;
    --line: rgba(0,0,0,0.1);
    
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* --- Page Transitions & Entrance --- */
.page-curtain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9990; /* Behind Nav Pill (9999) */
    pointer-events: none;
    transition: opacity 1.0s cubic-bezier(0.19, 1, 0.22, 1);
}

.page-curtain.hidden {
    opacity: 0;
}

.reveal-content {
    opacity: 0;
    transform: translateY(15px);
}

/* --- Floating Bottom Navigation --- */
nav {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 24px;
    border: 1px solid #000;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 9999;
    
    /* Animation: IMMER aktiv auf diesem Element - Jetzt deutlich langsamer (2s) */
    transition: min-width 2.0s cubic-bezier(0.19, 1, 0.22, 1), 
                padding 2.0s cubic-bezier(0.19, 1, 0.22, 1);
    
    width: auto;
    min-width: 220px;
}

/* Zustände ändern NUR die Werte, nicht die Animation selbst */
.nav-snap {
    min-width: 300px; 
}

.nav-exit {
    min-width: 220px;
}

.pdf-item {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 1.5s cubic-bezier(0.19, 1, 0.22, 1), 
                transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    transition-delay: 0.4s;
    font-weight: 700;
    color: #ff0000 !important;
}

.nav-snap .pdf-item {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.8s; /* Erscheint erst wenn die Pill deutlich gewachsen ist */
}

.nav-exit .pdf-item {
    opacity: 0 !important;
    transform: translateY(5px) !important;
    transition-delay: 0s !important;
}

nav .menu-item {
    text-decoration: none;
    color: #000 !important;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
    transition: opacity 0.2s;
    border: none !important;
}

nav .menu-item:hover { opacity: 1; }

/* --- Chapter System --- */
.chapter {
    display: flex;
    min-height: 90vh;
    border-bottom: 1px solid var(--line);
    padding: 10vh 40px;
}

main {
    padding-bottom: 120px;
}

.chapter-title-container {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-start;
    position: sticky;
    top: 10vh;
    height: 80vh; /* Match the sticky window height */
    z-index: 10;
    background: var(--bg);
}

.chapter-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(40px, 6vw, 80px);
    letter-spacing: -2px;
    line-height: 1;
    transform: rotate(180deg);
}

.chapter-content {
    flex-grow: 1;
    max-width: 800px;
    padding-left: 60px;
}

/* --- Block Elements --- */
.text-block {
    margin-bottom: 60px;
}

.mono-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 15px;
}

.callout {
    padding: 30px;
    border: 1px solid var(--text);
    background: #f9f9f9;
    font-style: italic;
    margin: 30px 0;
}

/* --- Typography --- */
h1 {
    font-size: clamp(60px, 10vw, 140px);
    font-weight: 800;
    letter-spacing: -4px;
    line-height: 0.85;
    margin-bottom: 40px;
}

h2 { font-size: 32px; margin-bottom: 20px; font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }

ul { list-style: none; }
ul li { position: relative; padding-left: 20px; margin-bottom: 12px; }
ul li::before { content: "→"; position: absolute; left: 0; opacity: 0.5; }

/* --- Links & Interactive --- */
a, a:visited {
    color: var(--text) !important;
    text-decoration: none !important;
    border-bottom: 2px solid var(--text);
    font-weight: 700;
    transition: all 0.2s ease;
    padding: 0 2px;
}

/* --- Resume & List Utilities --- */
.resume-entry {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--line);
}

.resume-entry:last-child { border-bottom: none; }
.resume-entry h3 { margin-bottom: 10px; }
.resume-entry p { font-style: italic; opacity: 0.8; }

.skill-tag {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--text);
    font-family: var(--font-mono);
    font-size: 11px;
    margin: 4px;
}

/* --- Gallery Utilities --- */
.gallery-stack {
    display: flex;
    flex-direction: column;
    gap: 8vh;
    margin-top: 40px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    cursor: zoom-in;
}

a:hover {
    background: var(--text) !important;
    color: var(--bg) !important;
}

/* Specific style for large CTA links */
.cta-link, .cta-link:visited {
    display: inline-block;
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -1.5px;
    border-bottom: 4px solid var(--text);
    margin-top: 40px;
    padding-bottom: 5px;
    color: var(--text) !important;
}

.cta-link:hover {
    background: var(--text) !important;
    color: var(--bg) !important;
    padding-left: 10px;
    padding-right: 10px;
}

/* --- Modal --- */
#img-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 2000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

#img-modal img {
    max-width: 90%;
    max-height: 80vh;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    cursor: pointer;
    font-size: 40px;
}

@media (max-width: 1000px) {
    .chapter { flex-direction: column; padding: 60px 20px; min-height: auto; }
    .chapter-title-container { width: 100%; height: auto; margin-bottom: 30px; }
    .chapter-title { 
        writing-mode: horizontal-tb; 
        transform: rotate(0); 
        font-size: clamp(32px, 8vw, 42px); 
    }
    .chapter-content { padding-left: 0; }
    h1 { font-size: clamp(36px, 10vw, 54px); letter-spacing: -2px; }
    .cta-link { font-size: 24px; }
    
    nav {
        width: calc(100% - 40px);
        max-width: 400px;
        bottom: 20px;
        padding: 8px 16px;
        gap: 12px;
        justify-content: center;
    }
    
    nav .menu-item {
        font-size: 10px;
    }

    /* --- Mappe: Vertikale Touch-Galerie --- */
    .slider {
        height: auto;
        overflow: visible;
    }
    .slider-wrapper {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 40px;
        padding: 10vh 20px 120px;
        width: 100% !important;
        transform: none !important;
    }
    .slide {
        width: 90%;
        max-width: 500px;
        transform: none !important;
        scale: 1 !important;
    }
    .slide .mono-label {
        position: relative;
        bottom: 0;
        opacity: 1;
        margin-top: 12px;
        text-align: center;
    }
    .fixed-sidebar { display: none; }
}
