/* Reset and Variables */
:root {
    --primary-color: #2563eb;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
}

.lang-btn {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Hero Section */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(to right, #e0e7ff, #ffffff);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.highlight {
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: #1d4ed8;
}

/* Sections */
.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

/* Skills Tags */
.skills {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tag {
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Experience Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    border-left: 2px solid var(--primary-color);
    padding-left: 20px;
}

.timeline-item {
    margin-bottom: 30px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.timeline-toggle h3 {
    margin-bottom: 5px;
    color: var(--text-dark);
    transition: color 0.3s;
}

.timeline-toggle:hover h3 {
    color: var(--primary-color);
}

.timeline-item .role {
    font-weight: bold;
    color: var(--text-dark);
}

.timeline-item .date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.click-hint {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-top: 5px;
    font-style: italic;
}

/* Hidden Details for Timeline */
.timeline-details {
    margin-top: 15px;
    padding-left: 20px;
    list-style-type: disc;
    color: var(--text-dark);
}

.timeline-details li {
    margin-bottom: 5px;
}

/* Project Details */
.project-full {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
}

.project-full h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.robot-img {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Kontakt-Sektion */
#contact {
    text-align: center;
}

#contact .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Collapsible Sub-sections for Projects */
.project-sub-sections {
    margin-top: 20px;
}

.sub-section {
    margin-bottom: 10px;
}

.sub-toggle {
    cursor: pointer;
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: 5px;
    border-left: 4px solid var(--primary-color);
    font-weight: bold;
    color: var(--text-dark);
    transition: background 0.3s;
    user-select: none;
}

.sub-toggle:hover {
    background: #e5e7eb;
}

.sub-content {
    padding: 15px;
    background: #fafafa;
    border: 1px solid #eee;
    border-top: none;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* CAD-Bilder */
.sub-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

.sub-images img {
    width: 100%;
    max-width: 350px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Inline Code Block */
.inline-code {
    background: #2d2d2d;
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* =========================================
   Mobile Responsiveness & Hamburger Menü
   ========================================= */

/* Grund-Styling für den Button (auf dem PC versteckt) */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* For Tablets and smaller screens (up to 768px) */
@media (max-width: 768px) {
    .navbar .container {
        display: flex;
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        height: 60px; 
    }

    /* Zeige den Hamburger-Button */
    .menu-toggle {
        display: block; 
    }

    /* Verstecke die Links standardmäßig und positioniere sie unter der Leiste */
    .nav-links {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 60px; 
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        padding: 20px 0;
        gap: 15px;
    }

    /* Diese Klasse wird per JavaScript hinzugefügt, wenn man klickt */
    .nav-links.active {
        display: flex; 
    }

    .nav-links li {
        text-align: center;
        width: 100%;
    }

    /* Hero section adjustments */
    .hero h1 {
        font-size: 2rem; 
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    /* Section padding reductions */
    .section {
        padding: 50px 0; 
    }

    .project-full {
        padding: 20px; 
    }

    /* Image adjustments */
    .sub-images img {
        max-width: 100%; 
    }
}

/* For Mobile Phones (up to 480px) */
@media (max-width: 480px) {
    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        display: block;
        padding: 8px 0;
    }

    /* Smaller timeline adjustments */
    .timeline {
        padding-left: 15px;
    }
    
    .timeline-item::before {
        left: -21px; 
    }
}