html {
    height: 100vh;
    background-color: #AEB9FF;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

body {
    display: flex;
    height: auto;
    margin: 0;
    font-family: "Varela Round", sans-serif;
    align-items: flex-start;
}

#sidebar {
    position: fixed;
    width: 16%;
    padding: 20px;
    padding-bottom: 0;
    border: 2px solid black;
    border-radius: 15px;
    overflow: auto;
    margin-left: 2%;
    margin-top: 2%;
    margin-right: 6%;
    box-sizing: border-box;  
    background-color: white;  
    height: auto;
}

#main-content {
    width: 78%;
    padding: 60px;
    padding-top: 0;
    padding-bottom: 0;
    border: 2px solid black;
    border-radius: 15px;
    margin-top: 2%;
    margin-left: 20%;
    margin-bottom: 20px;
    box-sizing: border-box;  
    background-color: white;  
    height: auto;
    line-height: 1.7;
}
#main-title-container {
    text-align: center; 
}

#main-title {
    font-size: 70px;
    margin-bottom: 20px; 
}

#date {
    font-size: 28px;
    font-weight: 600;
    font-style: italic;
    color: #000000;
    text-align: justify; 
    margin-top: 50px;
    margin-bottom: 0px;
}

#essay-content {
    font-size: 28px;
    font-weight: 500;
    color: #000000;
    text-align: justify;  
    margin-top: 30px;
    margin-bottom: 50px;
}

#footnotes {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%; /* Adjust as needed */
    padding: 0px; /* Adjust as needed */
    margin: auto; /* This centers the div if the width is less than 100% */
    font-size: 20px; /* Adjust as needed */
    line-height: 1.7; /* Adjust as needed */
}

.sidebar-item {
    display: block;
    margin-bottom: 20px;
    color: #000;
    text-decoration: none;
    font-size: 26px;
    font-weight: 600;
}

.sidebar-item:hover {
    color: #8C90FA;
}


@media only screen and (max-width: 768px) {
    /* Change background color for mobile */
    body {
        background-color: #AEB9FF; /* New background color for mobile */
    }
}

@media only screen and (max-width: 980px) {

    body {
        /* Adjust the body's layout for mobile */
        display: block;
        /* Stacking elements vertically */
        align-items: stretch;
        padding-bottom: 10px;
    }

    #main-content {
        width: 95%;
        /* adjust as needed */
        padding: 25px;
        padding-bottom: 10px;
        margin-top: 20px;
        margin-left: auto;
        /* Centering the sidebar */
        margin-right: auto;
        /* Centering the sidebar */
        margin-bottom: 0px;
    }

    #date {
        font-size: 28px;
        font-weight: 600;
        font-style: italic;
        color: #000000;
        text-align: left; 
        margin-top: 50px;
        margin-bottom: 0px;
    }    

    #essay-content {
        font-size: 22px;
        font-weight: 500;
        color: #000000;
        text-align: justify;  
        margin-top: 30px;
        margin-bottom: 10px;
        line-height: 1.8;
        font-family: 'Varela Round', sans-serif;
        -webkit-hyphens: auto; /* for Safari */
        -moz-hyphens: auto;    /* for Firefox */
        -ms-hyphens: auto;     /* for IE/Edge */
        hyphens: auto;         /* standard syntax */
        text-align: justify;
    }

    #sidebar {
        /* Adjust the sidebar for a mobile-friendly layout */
        position: relative;
        /* No longer fixed to the side */
        width: 95%;
        /* Take the full width of the screen */
        margin-left: auto;
        /* Centering the sidebar */
        margin-right: auto;
        /* Centering the sidebar */
        padding: 10px;
        margin-top: 10px;
        margin-bottom: 10px;
        border-top: 2px solid black;
        /* Make top border the same size as the bottom */
        border-bottom: 2px solid black;
        /* Adjust bottom border to match the top border */
    }

    #main-description {
        font-size: 25px;
        font-weight: 500;
        color: #000000;
        text-align: justify;
        margin-top: 5px;
        margin-bottom: 25px;
    }

    #main-title {
        font-size: 35px;
        margin-top: 0px;
        margin-bottom: 35px;
        line-height: normal;
    }

    .essay-title {
        /* Increase the size of the essay title for better readability on mobile */
        font-size: 24px;
        margin-bottom: 25px;
    }

    .essay-title:last-child{
        margin-bottom: 0px;
    }

    .sidebar-item {
        display: block;
        margin-bottom: 20px;
        color: #000;
        text-decoration: none;
        font-size: 26px;
        font-weight: 600;
    }

    .sidebar-item:last-child {
        margin-bottom: 0;
    }

    .essay {
        margin-bottom: 20px;
    }
}