/* --- Basis-Setup & Darkmode Variablen --- */
:root {
    /* Light Mode */
    --bg: #ffffff;
    --text-main: #1d1d1f; 
    --text-muted: #515154;
    --accent: #0071e3; 
    --glass-bg: rgba(255, 255, 255, 0.85);
    --card-bg: #f5f5f7;
    --border-color: rgba(0,0,0,0.1);
    --grid-color: rgba(0, 113, 227, 0.15); 
    --modal-bg: rgba(255, 255, 255, 0.85);
    --modal-shadow: 0 25px 50px rgba(0,0,0,0.15), 0 0 0 9999px rgba(0,0,0,0.6);
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg: #000000;
    --text-main: #f5f5f7;
    --text-muted: #a1a1a6;
    --accent: #2997ff; 
    --glass-bg: rgba(29, 29, 31, 0.72);
    --card-bg: #1c1c1e;
    --border-color: rgba(255,255,255,0.15);
    --grid-color: rgba(255, 255, 255, 0.1); 
    --modal-bg: #1c1c1e;
    --modal-shadow: 0 25px 50px rgba(0,0,0,0.5), 0 0 0 9999px rgba(0,0,0,0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.modal-open { overflow: hidden; }
a { text-decoration: none; color: inherit; }

/* --- Theme Toggle Icons --- */
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }

/* --- Der handgezeichnete Doodle-Vibe --- */
.doodle-text {
    font-family: 'Annie Use Your Telescope', 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive;
    font-weight: 400;
    font-size: 1.3em;
    color: var(--text-muted);
}

.doodle-svg, .header-doodle-svg, .project-doodle-svg {
    stroke: var(--text-main); 
    transition: transform 0.3s ease, stroke 0.3s ease;
}

/* --- Navigation --- */
.glass-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background-color: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 15px 24px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.lang-switch, .theme-toggle {
    border: 1px solid var(--border-color);
    background: transparent;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lang-switch:hover, .theme-toggle:hover { 
    background-color: var(--border-color); 
}

/* --- Layout --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 0 24px; 
}

/* --- Hero --- */
.hero-compact {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 180px 0 80px; 
    gap: 40px;
}

.hero-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 120%; 
    z-index: -1;
    background-size: 26px 26px; 
    background-image: 
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    -webkit-mask-image: radial-gradient(ellipse at top center, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 75%);
    mask-image: radial-gradient(ellipse at top center, rgba(0,0,0,1) 20%, rgba(0,0,0,0) 75%);
    transition: background-image 0.3s ease;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.05em;
    margin-bottom: 15px;
}

.hero-lead {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    color: var(--text-muted);
    font-weight: 400;
}

.hero-doodle {
    width: 150px;
    flex-shrink: 0;
}

.hero-doodle:hover .doodle-svg {
    transform: rotate(10deg) scale(1.1);
}

/* --- Sektions-Style --- */
.compact-section { padding: 80px 0; }

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.04em;
}

.header-doodle-svg { width: 50px; height: 50px; opacity: 0.5; }

/* --- Über Uns --- */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text-block p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.focus-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.focus-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.doodle-icon { font-size: 1.5rem; }
.focus-card h4 { font-size: 0.95rem; font-weight: 600; }

/* --- Projekte --- */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.project-item {
    display: flex;
    align-items: start;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
    transition: border-color 0.3s ease;
}

.project-item:last-child { border-bottom: none; }

.project-doodle-container {
    width: 60px;
    flex-shrink: 0;
    margin-top: 5px;
}

.project-doodle-svg { opacity: 0.7; }

.project-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-text p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.more-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.more-link:hover { text-decoration: underline; }

/* --- Rechtstexte (Impressum/Datenschutz) --- */
.legal-content { padding: 160px 24px 80px; max-width: 900px; margin: 0 auto; width: 100%; } 
.legal-content h1 { font-size: clamp(2rem, 5vw, 2.5rem); margin-bottom: 2rem; }
.legal-content h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.legal-content h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.legal-content p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.6; word-break: break-word; }
.legal-content a { color: var(--accent); }
.legal-content a:hover { text-decoration: underline; }

/* FIX: Listenpunkte richtig eingerückt, damit sie nicht über den Rand ragen */
.legal-content ul { 
    color: var(--text-muted); 
    margin-bottom: 1rem; 
    line-height: 1.6; 
    padding-left: 24px; 
    word-break: break-word;
}
.legal-content ul li { margin-bottom: 5px; }

/* --- Footer --- */
footer {
    background-color: var(--card-bg);
    padding: 40px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

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


/* --- Cookie Banner (Modal Overlay Style) --- */
.cookie-banner { 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -45%) scale(0.95); 
    max-width: 600px; 
    width: 90%; 
    background: var(--modal-bg); 
    border: 1px solid var(--border-color); 
    border-radius: 24px; 
    padding: 40px; 
    box-shadow: var(--modal-shadow); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    gap: 20px; 
    z-index: 9999; 
    opacity: 0; 
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); 
}

.cookie-banner.show { 
    transform: translate(-50%, -50%) scale(1); 
    opacity: 1; 
    visibility: visible;
}

.cookie-content h3 { 
    font-size: 1.5rem; 
    margin-bottom: 15px; 
    font-weight: 600;
    color: var(--text-main); 
}

.cookie-content p { 
    font-size: 1rem; 
    margin-bottom: 0; 
    line-height: 1.6; 
    color: var(--text-muted); 
}

.cookie-buttons { 
    display: flex; 
    gap: 15px; 
    width: 100%; 
    justify-content: center; 
    margin-top: 15px; 
}

.cookie-btn-outline { 
    background: transparent; 
    border: 2px solid var(--border-color); 
    color: var(--text-main); 
    padding: 14px 24px; 
    border-radius: 50px; 
    font-weight: 600; 
    font-size: 1rem; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    flex: 1; 
}

.cookie-btn-outline:hover { 
    border-color: var(--text-main); 
    background: var(--text-main); 
    color: var(--bg); 
}

.cookie-btn-primary { 
    background: var(--text-main); 
    color: var(--bg); 
    border: 2px solid var(--text-main); 
    padding: 14px 24px; 
    border-radius: 50px; 
    font-weight: 600; 
    font-size: 1rem; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    flex: 1; 
}

.cookie-btn-primary:hover { 
    transform: translateY(-3px); 
    opacity: 0.9; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); 
}

/* --- Mobile Anpassungen (Alle Abstände sicher!) --- */
@media (max-width: 768px) {
    .hero-compact {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
        gap: 30px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .section-header { 
        justify-content: center; 
        flex-direction: column; 
        text-align: center;
    }

    .project-item { 
        flex-direction: column; 
        align-items: center; 
        text-align: center; 
        gap: 20px;
    }
    
    .footer-content { 
        flex-direction: column; 
        gap: 20px; 
        text-align: center; 
    }
    
    .footer-links { 
        justify-content: center; 
    }

    .cookie-banner { 
        padding: 35px 24px; 
        width: 90%; 
    } 
    
    .cookie-buttons { 
        flex-direction: column; 
        width: 100%; 
    }
}

/* --- Sanfte Scroll-Animationen --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}