#sidebar {
    text-align: center;
    padding: 2rem 1rem;
    background-color: #e2ecf4;
    font-family: e-ukraine, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 12px;
    cursor: pointer;
    border-right: thick double #000;
    color: black;
    /* border-right: 4mm ridge #e2ecf4; */
}

#sidebar h2 {
    text-align: left;
    margin-bottom: 0;
}

/* Hide the blurb on a small screen */
#blurb {
    display: none;
}

#sidebar-toggle {
    display: none;
}

#collapse *:first-child {
    /*margin-top: 1rem;*/
}

/* add the three horizontal bars icon for the toggle */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    /*background-image: none!important;*/
    background-color: var(--bs-gray-800);
    height: 3px;
    width: 25px;
    margin: 10px 0;
    position: relative;
    transition: all 0.35s ease-out;
    transform-origin: center;
}

.navbar-toggler-icon::before {
    display: block;
    background-color: var(--bs-gray-800);
    height: 3px;
    content: "";
    position: relative;
    top: -7px;
    transition: all 0.15s ease-out;
    /*taken down to hide quicker*/
    transform-origin: center;
}

.navbar-toggler-icon::after {
    display: block;
    background-color: var(--bs-gray-800);
    height: 3px;
    content: "";
    position: relative;
    top: 4px;
    transition: all 0.35s ease-out;
    transform-origin: center;
}


#page-content {
    /* padding: 2rem 1rem; */
}

@media (min-width: 1200px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 18rem;
        text-align: left;
        transition: margin 0.3s ease-in-out, padding 0.3s ease-in-out;
    }

    #sidebar-toggle {
        display: inline-block;
        position: relative;
        top: 0;
        transition: top 0.3s ease-in-out;
    }

    /* add negative margin to sidebar to achieve the collapse */
    #sidebar.collapsed {
        margin-left: -13.5rem;
        padding-right: 0.5rem;
    }

    /* move the sidebar toggle up to the top left corner */
    #sidebar.collapsed #sidebar-toggle {
        top: -2rem;
    }

    /* also adjust margin of page content */
    #sidebar.collapsed~#page-content {
        margin-left: 6.5rem;
    }

    /* move all contents of navbar other than header (containing toggle) further
     off-screen */
    #sidebar.collapsed>*:not(:first-child) {
        margin-left: -6rem;
        margin-right: 6rem;
    }

    /* reveal the blurb on a large screen */
    #blurb {
        display: block;
    }

    /* Hide the toggle on a large screen */
    #navbar-toggle {
        display: none;
    }

    #collapse {
        display: block;
    }

    /* set margins of the main content so that it doesn't overlap the sidebar */
    #page-content {
        margin-left: 20rem;
        /*margin-left: 6rem;*/
        margin-right: 2rem;
        transition: margin-left 0.3s ease-in-out;
    }

    /* set margins of the main content so that it doesn't overlap the sidebar */
}

#sidebar.collapsed>*:not(.collapsed) .navbar-toggler-icon {
    transform: rotate(45deg);
}

#sidebar.collapsed>*:not(.collapsed) .navbar-toggler-icon::before {
    opacity: 0;
}

#sidebar.collapsed>*:not(.collapsed) .navbar-toggler-icon::after {
    transform: rotate(-90deg) translateX(7px);
}