@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary-bg: #f7f9fc;
    --secondary-bg: #ffffff;
    --sidebar-bg: #0f172a;
    --sidebar-bg: #111827;
    --sidebar-text-primary: #676b6e;   /* Fast Weiß für Namen/Überschriften */
    --sidebar-text-muted: #cbd5e1;      /* Hellgrau für normale Links/Texte */
    --light-blue: #60a5fa;             /* Frisches Blau für Icons */
    --border-color: #e2e8f0;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --text-inverse: #f8fafc;
    --text-hover: #1e40af;

    /* Accent Colors */
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #eff6ff;

    /* Spacing */
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* UI */
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-family: "Avenir Next", Avenir, "Calibri", "Inter", -apple-system, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

        /* Grundlayout fixieren */
        html, body {
            scroll-behavior: smooth;
            height: 100%;
            margin: 0;
            padding: 0;
            font-family: "Avenir Next", Avenir, "Calibri", "Inter", -apple-system, sans-serif;
            background-color: var(--primary-bg);
            color: var(--text-primary);
            line-height: 1.6;
            font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
            -webkit-font-smoothing: antialiased;
            font-variant-numeric: tabular-nums;
        }

        .app-container {
            display: flex;
            min-height: 100vh; /* Erzwingt volle Höhe für das gesamte Layout */
            align-items: stretch;
        }

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--text-hover);
}

h1 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-inverse);
    font-family: "Calibri", sans-serif;
}

h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    align-items: stretch;
}

/* Layout */
.container {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
    flex-direction: column;
}

.main-content-area {
    display: flex; /* Sidebar und Main Content nebeneinander */
    flex: 1;
}

.main-content {
    flex: 1;
    flex-grow: 1;
    padding: var(--space-10) var(--space-8);
    margin-left: var(--sidebar-width, 288px);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #ffffff;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    flex-grow: 1;
}

/* Floating Nav */
.floating-nav {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    padding: var(--space-6) var(--space-3);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
}

.floating-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.floating-nav a {
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    writing-mode: vertical-rl;
    position: relative;
    padding: var(--space-2) 0;
}

.floating-nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 3px;
    height: 0;
    background-color: var(--accent);
    border-radius: 2px;
    transition: var(--transition);
}

.floating-nav a:hover::after,
.floating-nav a.active::after {
    height: 100%;
    transform: translateX(50%);
}

        /* SIDEBAR STYLING */
        .sidebar {
            width: var(--sidebar-width, 288px); /* Flexiblere Breite */
            background-color: #111827;
            color: white;
            flex-shrink: 0;
            position: fixed; /* Geändert von sticky */
            top: 0;
            left: 0;
            height: 100%; /* Füllt die gesamte Höhe aus */
            padding: var(--space-8);
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            border-right: 1px solid rgba(255,255,255,0.1);
            z-index: 100; /* Stellt sicher, dass es über dem Inhalt liegt */
        }

        .sidebar h1 {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 0.25rem;
            color: var(--sidebar-text-muted);
            font-family: "Calibri", sans-serif;
        }

        .sidebar-subtitle {
            color: var(--sidebar-text-primary);
            font-size: 0.875rem;
            text-decoration: none;
            transition: opacity 0.2s;
        }

        .sidebar-subtitle:hover {
            opacity: 0.8;
            color: var(--sidebar-text-muted);
        }

        .sidebar-section-title {
            text-transform: uppercase;
            letter-spacing: 0.1em;
            font-size: 0.75rem;
            color: var(--sidebar-text-muted);
            font-weight: 700;
            margin-bottom: 1rem;
            margin-top: 2.5rem;
        }

        .sidebar-link {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            color: var(--sidebar-text-muted);
            font-weight: 400;
            text-decoration: none;
            font-size: 0.875rem;
            padding: 0.5rem 0;
            transition: all 0.2s;
        }

        .sidebar-link:hover {
            color: var(--light-blue);
            transform: translateX(4px);
        }

        .sidebar-link i {
            width: 1rem;
            height: 1rem;
        }

        /* MAIN CONTENT AREA */

/* Main Content: Section Base */
section {
    margin-bottom: var(--space-16);
    scroll-margin-top: var(--space-8);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.section-header .icon-wrapper {
    background-color: var(--accent-light);
    color: var(--accent);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

/* Entry Header (75/25 grid) */
.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-6);
    margin-bottom: var(--space-2);
}

.entry-header .title-area {
    flex: 1;
}

.entry-header .date-badge {
    flex-shrink: 0;
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}

.entry-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.entry-title a {
    position: relative;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.entry-title a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.entry-title a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.entry-title a:hover {
    color: var(--accent);
}

.entry-title a .external-link-icon {
    opacity: 0;
    transition: var(--transition);
    transform: translate(-3px, -3px);
}

.entry-title a:hover .external-link-icon {
    opacity: 0.5;
    transform: translate(0, 0);
}

.entry-subtitle {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    font-size: 0.95rem;
}

/* Task List for Experience */
.task-list {
    list-style: none;
    padding-left: 0;
    margin-top: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.task-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.task-list .fa-li {
    color: var(--accent);
    padding-top: 4px; /* Align icon better with text */
}

/* Generic Card Style */
.card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.experience-item, .publication-card {
    padding-left: 0; /* Override card padding if needed */
    padding-right: 0;
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.experience-item:hover, .publication-card:hover {
    transform: none;
    box-shadow: none;
    border-bottom-color: var(--accent);
}

.experience-item:last-child, .publication-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}


/* Specific Sections */

/* Profile */
.profile-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 65ch;
}

/* Personalien */
.personal-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}
.personal-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: var(--space-3);
    background: var(--secondary-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.personal-item i {
    color: var(--accent);
}
.personal-item:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}


/* Preview IFrame */
.preview-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.preview-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Education */
#education .card {
    padding: var(--space-8);
}
.description-list {
    margin-top: var(--space-4);
    color: var(--text-secondary);
    padding-left: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* Certifications */
.cert-section {
    margin-bottom: var(--space-10);
}
.cert-category-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-color);
}
.certification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-6);
}
.certification-item .entry-subtitle {
    margin-bottom: var(--space-2);
}
.details {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: auto; /* Pushes details to the bottom */
    padding-top: var(--space-3);
}


/* Publications */
.year-divider {
    position: relative;
    text-align: center;
    margin: var(--space-12) 0;
}
.year-divider h3 {
    display: inline-block;
    background-color: var(--primary-bg);
    padding: 0 var(--space-4);
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.year-divider::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    top: 50%;
    left: 0;
    z-index: -1;
}

.pub-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Appointment / Calendly */
.calendly-container {
    margin-top: var(--space-6);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}


    /* FOOTER & IMPRESSUM Der Footer-Fix */
    .footer-optimized {
        width: 100%;
        position: relative;
        z-index: 10;
        color: var(--text-light);
        background-color: var(--sidebar-bg); /* Dark background */ /* Oder deine Hintergrundfarbe */
        border-top: 1px solid #e2e8f0;
        margin-top: 4rem;
        position: relative;
        padding: var(--space-4) var(--space-2);
        clear: both; /* Verhindert das Umfließen von Elementen */
    }
        
    .footer-grid {
        display: grid;
        align-items: left;
        text-align: center;
        /* Erzeugt exakt zwei gleich breite Spalten */
        grid-template-columns: repeat(3, 1fr); 
        /* Vertikaler Abstand 4rem, Horizontaler Abstand 2rem */
        gap: var(--space-3) 2rem;
        
        /* Zentriert das gesamte Grid-System auf der Seite */
        max-width: 900px;
        margin: 0 auto;
        padding: 2rem;
    }

    .footer-section {
        /* Zentriert den Inhalt innerhalb der jeweiligen Grid-Zelle */
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Alle Inhalte linksbündig ausrichten */
        text-align: center;
    }

    /* Zusätzlicher Kontrast-Refinement für High-Tech Look */
    .footer-section h4 {
        color: #60a5fa; /* Leuchtendes Tech-Blau */
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.2em;
        margin-bottom: 1.5rem;
        
        /* Linksbündige Ausrichtung */
        display: flex;
        justify-content: flex-start; /* Horizontal nach links */
        text-align: left;            /* Textfluss nach links */
        width: 100%;                 /* Nimmt volle Breite ein, um links zu starten */
    }

    .footer-links-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Richtet Links nach rechts aus */
        gap: 0.75rem;
    }

    .footer-link-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--text-light) !important; /* Lighter text for links */
        text-decoration: none;
        transition: color 0.2s ease-in-out;
        font-size: 0.9375rem;
    }

    .footer-link-item:hover {
        color: var(--text-hover) !important;
        transform: translateY(-2px);
    }

    .footer-bottom {
        margin-top: 4rem;
        padding-top: 2rem;
        border-top: 1px solid #f1f5f9; /* Dezente Trennlinie */
        
        /* Zentrierung */
        display: flex;
        justify-content: left; 
        align-items: left;
        width: 100%; /* Wichtig, damit justify-content greift */
    }

    .footer-bottom-text {
        display: inline-flex;
        align-items: left;
        gap: 0.5rem;
        
        /* Typografie & Farbe (optimiert für Lesbarkeit) */
        color: var(--text-light); /* Slate-400 für dezente Optik */
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        text-decoration: none;
        
        transition: all 0.2s ease-in-out;
    }

    .footer-bottom-text:hover {
        color: var(--text-hover); /* Primär-Blau beim Hover */
        transform: translateY(-1px);
    }

/* Responsive */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-sidebar {
        display: none; /* Hide sidebar content in footer on smaller screens */
    }
}

@media (max-width: 1024px) {
    .footer-optimized {
        /* Falls dein Hauptinhalt einen Margin-Left hat, muss der Footer ihn auch haben */
        margin-left: 300px; 
        width: calc(100% - 300px);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .main-content {
        padding: var(--space-8) var(--space-4);
    }
    .entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-3);
    }
    .date-badge {
        align-self: flex-start;
    }
    .certification-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
            grid-template-columns: 1fr;
            gap: 3rem;
            text-align: center; /* Auf Mobile wirkt Zentrierung harmonischer */
        }
        
    .footer-links-container {
        display: flex;
        flex-direction: column;
        align-items: center; /* Icons und Text mittig untereinander auf Mobile */
    }
    
    .footer-main {
         padding: 0 var(--space-4);
    }
    .footer-contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

/* Responsive: Auf kleinen Screens zu einer Spalte wechseln */
@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Lucide Icons */
[data-lucide] {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 1.75px;
}

/* Styling für den Datenschutz-Bereich */
.legal-content {
    padding: 3rem 1.5rem;
    color: var(--text-inverse); /* Leicht abgesetztes Grau für rechtliche Texte */
    font-size: 0.85rem;
    color: #475569;
}

.legal-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light); 
    margin-bottom: 1.5rem;
}

.legal-content h5 {
    margin-top: 1.5rem;
    color: #1e293b;
}
