body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f9;
    color: #333;
}

.topbar {
    background-color: #ffffff;
    padding: 1rem 2rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.topbar .nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    padding: 0.5rem 0;
    transition: color 0.3s, border-bottom-color 0.3s;
    border-bottom: 2px solid transparent;
}

.topbar .nav-link:hover {
    color: #007bff;
}

.topbar .nav-link.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

main {
    /* Auf Mobilgeräten entfernen wir jeglichen Abstand und Breitenbeschränkung */
    padding: 0;
    margin: 0;
    max-width: none;
}

/* Die Animation wird jetzt dem Container zugewiesen, wenn Inhalt geladen wird */
#content-container {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------- FÜR BIOGRAPHY.HTML --------- */
.biography-container {
    padding: 1rem;
}

.biography-container h1 {
    font-size: 2.5rem;
    color: #333;
    border-bottom: 3px solid #007bff;
    padding-bottom: 0.5rem;
    margin-bottom: 2.5rem;
}

/* Mobile-First-Ansatz: Standardmäßig alles untereinander */
.timeline {
    display: grid;
    /* Auf Mobilgeräten nur eine Spalte */
    grid-template-columns: 1fr;
    gap: 0.5rem;
    /* Ein kleiner Abstand zwischen Jahr und Text */
}

.timeline dt {
    font-weight: 700;
    color: #555;
    font-size: 1.1rem;
    /* Auf Mobilgeräten linksbündig und kein extra Abstand oben */
    text-align: left;
    padding-top: 0;
}

.timeline dd {
    margin: 0;
    /* Auf Mobilgeräten keine Linie und kein linker Einzug */
    border-left: none;
    padding-left: 0;
    padding-bottom: 2rem;
}

.timeline dd:last-of-type {
    padding-bottom: 0;
}

/* --------- FÜR CONTACT.HTML --------- */
.contact-container {
    padding: 1rem;
}

.contact-container h1 {
    font-size: 2.5rem;
    color: #333;
    border-bottom: 3px solid #007bff;
    padding-bottom: 0.5rem;
    margin-bottom: 2.5rem;
}

.contact-details {
    margin-bottom: 2.5rem;
    line-height: 1.7;
    font-size: 1.1rem;
}

.contact-details a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.contact-details a:hover {
    text-decoration: underline;
}

.social-links h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #555;
    font-weight: 600;
}

.social-links a {
    margin-right: 1rem;
    display: inline-block;
    transition: transform 0.2s ease-in-out, opacity 0.2s;
}

.social-links a:last-child {
    margin-right: 0;
}

.social-links a:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* --------- FÜR FRANK_DRESIG.HTML --------- */
.image-grid-container {
    display: grid;
    /* Basis-Einstellung für Mobile: Eine Spalte, die sich anpasst */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
}

.grid-item {
    position: relative;
    display: block;
    overflow: hidden;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

.image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 1rem;
    font-size: 1.2rem;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    box-sizing: border-box;
}

/* --------- NEU: MEDIA QUERY FÜR DESKTOP-ANSICHT --------- */
@media (min-width: 768px) {

    main {
        padding: 2rem;
        margin: 0.5rem auto;
        max-width: 1200px;
    }

    .image-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 1rem;
    }

    /* Stellt den Rahmen/Schatten auf dem Desktop wieder her */
    .grid-item {
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .grid-item:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }

    .timeline {
        grid-template-columns: 120px 1fr;
        gap: 1rem 2rem;
    }

    .timeline dt {
        text-align: right;
        padding-top: 0.2rem;
    }

    .timeline dd {
        padding-left: 2rem;
        border-left: 2px solid #e0e0e0;
    }

    .grid-item {
        position: relative;
        display: block;
        overflow: hidden;
        transition: transform 0.3s ease;
    }

    .grid-item:hover {
        transform: translateY(-5px);
    }
}