body {
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    max-width: none;
}

#content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2em;
}

#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    overflow-y: auto;
    padding: 1em;
    background-color: var(--background-alt);
    border-right: 1px solid var(--border);
    z-index: 100;
}

#sidebar a {
    color: var(--links);
    text-decoration: none;
}

#sidebar a:hover {
    text-decoration: underline;
}

#button-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

#topBtn,
#toggle-theme {
    background-color: var(--background-alt);
    border: none;
    padding: 10px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    cursor: pointer;
}

#toggleSidebarBtn {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2000;
    background-color: var(--background-alt);
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#sidebar-wrapper.open {
    transform: translateX(0);
}

#sidebar-wrapper {
    display: block;
    position: static;
    height: auto;
    transform: none;
    padding: 0;
    box-shadow: none;
}

.intro-section img {
    float: left;
    width: 38%;
    padding:  0 2rem 0 0;
}

@media (max-width: 800px) {
    .intro-section img {
        float: none;
        display: block;
        margin: 0;
        width: 100%;
        padding: 0;
    }
}

@media (max-width: 1550px) {
    body {
        flex-direction: column;
    }

    #toggleSidebarBtn {
        display: block;
    }

    #sidebar {
        position: relative;
        height: auto;
        width: 100%;
        border-right: none;
        border-bottom: none;
    }

    #sidebar-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 80%;
        max-width: 300px;
        background-color: var(--background-alt);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
        z-index: 1500;
        overflow-y: auto;
        padding: 1em;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        display: block;
    }

    #sidebar-wrapper.open {
        transform: translateX(0);
    }

    #content {
        padding: 1.5em;
    }
}