html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    color: #333;
    transition: background-color 0.3s ease;
    background: linear-gradient(to right, #e0e0e0, #ffffff 40%, #ffffff 60%, #e0e0e0);
    
}

body.dark-mode {
    background: linear-gradient(to right, #222, #333 40%, #333 60%, #222);
    color: #eee;
}

.header {
    background: linear-gradient(135deg, #030622, #394fd0);
    color: white;
    text-align: center;
    padding: 50px 0;
    margin-bottom: 20px;
}

.header-content h5 {
    font-family: 'Courier New', Courier, monospace;
    margin-top: 20px;
    margin-bottom: 20px;
}

.section {
    padding: 80px 50px;
}

body.dark-mode .projekte.section.bg-light {
    background-color: #222;
    color: #eee;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

body.dark-mode .project-card {
    background-color: #2b2b2b;
    color: #eee;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

body.dark-mode .project-card p {
    color: #ccc;
}

body.dark-mode .project-card h3 {
    color: #fff;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px 8px 0 0;
    padding: 20px;
    position: relative;
}

.project-card img:hover {
    text-decoration: underline;
}

.project-card img::after {
    content: attr(alt);
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -100%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-card img:hover::after {
    opacity: 1;
}

.project-card p {
    padding: 10px;
}

.project-card .project-heading {
    text-align: center;
    margin: 10px 0;
}

.project-card h3 {
    text-align: center;
    margin: 10px 0;
}

.project-card h4 {
    margin-top: auto;
    text-align: center;
    margin-bottom: 10px;
}

.dark-mode-switch {
    display: flex;
    align-items: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;

    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.main-content-wrapper {
    display: flex;
    gap: 20px; /* Space between main content and side div */
}

.side-div {
    flex: 1; /* Adjust width as needed */
    background-color: #f0f0f0; /* Default background color for normal mode */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .side-div {
    background-color: #444; /* Background color for dark mode */
}

.container-fluid {
    max-width: 1200px; /* Fixed width for the main content */
    margin: 0 auto; /* Center the content */
    background-color: #fff; /* Background color for the main content */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional shadow for better visibility */
    border-radius: 8px; /* Optional rounded corners */
    padding: 0 20px; /* Add left and right padding */
}

body.dark-mode .container-fluid {
    background-color: #444; /* Dark background for the main content in dark mode */
    color: #eee; /* Ensure text color contrasts with the dark background */
}

.separator {
    border: none;
    border-top: 1px solid #ccc; /* Light gray line for normal mode */
    margin: 20px 0; /* Add spacing around the line */
}

body.dark-mode .separator {
    border-top: 1px solid #555; /* Darker line for dark mode */
}

.technologies {
    text-align: center;
    margin-top: 40px;
}

.technology-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.technology-icons img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.technology-icons img:hover {
    transform: scale(1.2); /* Slight zoom effect on hover */
}

.project-technologies {
    display: flex;
    justify-content: center; /* Center the icons horizontally */
    flex-wrap: wrap; /* Allow wrapping if there are multiple icons */
    gap: 10px; /* Add spacing between icons */
    margin-top: 10px; /* Ensure the container has enough height to display the icons */
    min-height: 40px; /* Ensure the container has enough height to display the icons */
    overflow: visible; /* Ensure no clipping of child elements */
    position: relative; /* Establish a stacking context for z-index */
    background-color: transparent; /* Ensure no background is obscuring the image */
}

.project-technologies img {
    width: auto; /* Allow the image to scale naturally */
    height: auto; /* Maintain the image's aspect ratio */
    display: inline-block; /* Ensure the image is displayed */
    opacity: 1; /* Ensure the image is fully visible */
    visibility: visible; /* Ensure the image is not hidden */
    z-index: 10; /* Ensure the image is above other elements */
    position: relative; /* Allow z-index to take effect */
    transition: transform 0.3s ease; /* Retain hover effect */
}

.project-technologies svg {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    position: relative;
}

.project-technologies svg:hover {
    transform: scale(1.2); /* Pop-out effect */
    filter: brightness(1.2); /* Slightly brighten the SVG */
}

.project-technologies svg::after {
    content: attr(data-alt); /* Use the data-alt attribute for alternative text */
    position: absolute;
    bottom: -25px; /* Position below the SVG */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Prevent interaction with the tooltip */
}

.project-technologies svg:hover::after {
    opacity: 1; /* Show the alternative text on hover */
}

/* Invert SVG icons in dark mode */
body.dark-mode .project-technologies svg {
    filter: invert(1); /* Invert colors for dark mode */
    transition: filter 0.3s ease; /* Smooth transition */
}

body.dark-mode .project-technologies svg:hover {
    filter: invert(0.8) brightness(1.2); /* Slightly reduce inversion and brighten on hover */
}

.project-heading{
    text-align: center;
    display: flex;
}

.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: rgba(2, 9, 65, 0.9); /* Semi-transparent blue background */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transform: translateY(-100%); /* Initially hidden */
    transition: transform 0.3s ease-in-out;
    margin: 0; /* Ensure no margin is applied */
    padding: 0; /* Ensure no padding is applied */
    box-shadow: none; /* Remove any shadow that might appear as a white bar */
}

.sticky-header.visible {
    transform: translateY(0); /* Slide down when visible */
}

.sticky-header .scroll-to-top img {
    width: 30px;
    height: 30px;
    cursor: pointer;
    filter: invert(1); /* Invert the icon colors */
    transition: transform 0.3s ease, filter 0.3s ease;
}

.sticky-header .scroll-to-top img:hover {
    transform: scale(1.2); /* Slight zoom effect on hover */
    filter: invert(0.8); /* Slightly reduce inversion on hover */
}

/* Override Bootstrap's .bg-light class for dark mode */
body.dark-mode .projekte.section.bg-light {
    background-color: #222 !important; /* Ensure dark background overrides Bootstrap */
    color: #eee !important; /* Ensure light text color for readability */
}

/* Ensure text inside .bg-light adapts to dark mode */
body.dark-mode .projekte.section.bg-light h2,
body.dark-mode .projekte.section.bg-light p,
body.dark-mode .projekte.section.bg-light a {
    color: #eee !important; /* Override text color for dark mode */
}

/* Custom background for the "Projekte" section */
#projekte.section {
    background-color: #f8f9fa; /* Light grayish white tone for normal mode */
    color: #333; /* Dark text for readability */
}

body.dark-mode #projekte.section {
    background-color: #1e1e1e; /* Dark grayish black tone for dark mode */
    color: #eee; /* Light text for readability */
}

/* Custom background for the "Lebenslauf" section */
#lebenslauf.section {
    background-color: #ffffff; /* Pure white for normal mode */
    color: #333; /* Dark text for readability */
}

body.dark-mode #lebenslauf.section {
    background-color: #2b2b2b; /* Slightly lighter black tone for dark mode */
    color: #eee; /* Light text for readability */
}

.footer {
    background: linear-gradient(135deg, #030622, #394fd0); /* Same gradient as header */
    color: white;
    text-align: center;
    padding: 20px 0; /* Adjust padding for footer */
    margin-top: 20px; /* Add spacing above the footer */
}

.footer-content a {
    color: #add8e6; /* Light blue for links */
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline; /* Underline on hover */
}

.image-container {
    position: sticky; /* Behält die Position beim Scrollen */
    top: 20px; /* Abstand vom oberen Rand */
    height: 800px; /* Feste Höhe für den Bildcontainer */
    overflow: hidden; /* Verhindert, dass Bilder über den Container hinausragen */
}

.image-container img {
    position: absolute; /* Ermöglicht die Bewegung der Bilder innerhalb des Containers */
    top: 0;
    left: 0;
    width: 100%; /* Passt die Breite an den Container an */
    height: auto; /* Beibehaltung des Seitenverhältnisses */
    transition: opacity 0.5s ease-in-out; /* Sanfte Übergänge für die Sichtbarkeit */
}

.scrollable-content {
    position: relative; /* Stellt sicher, dass der Inhalt korrekt gestapelt wird */
    z-index: 1; /* Überlagert die Bilder */
    padding-top: 20px; /* Abstand zum oberen Rand */
}