body {
    font-family: "Segoe UI", Roboto, sans-serif;
    scroll-behavior: smooth;
    /* smooth scrolling */
}

p {
    text-align: justify;
    text-justify: inter-word;
}

#main {
    padding: 3rem;
}

.rule {
    padding-bottom: 1rem;
}

#sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background-color: var(--background);
    border-right: 1px solid #ddd;
    padding-top: 1rem;
}

#sidebar-content {
    height: 100vh;
    overflow-y: auto;
}

#sidebar a {
    display: block;
    padding: 0.25rem 0.5rem;
    color: var(--text);
    text-decoration: none;
}

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

/* Hide sidebar toggle button on large screens */
#sidebarToggle {
    background-color: var(--background);
    display: none;
}

.highlight-flash {
  animation: flash-bg 1.5s ease-out;
}

@keyframes flash-bg {
  0%   { background-color: var(--hover-highlight); }
  100% { background-color: transparent; }
}

@media (max-width: 767.98px) {
    #sidebar {
        position: fixed;
        /* left: calc(.2rem - 100vw); */
        left: -100vw;
        width: 100vw;
        transition: left 0.3s;
        z-index: 1030;
    }

    #sidebar.show {
        left: 0.1rem;
    }

    #sidebar h3 {
        text-align: center;
    }
    #sidebar a {
        text-align: center;
    }

    #sidebarToggle {
        display: block;
        position: absolute;
        width: 2.5rem;
        top: 1rem;
        right: -2.6rem;
        z-index: 1040;
        border-left: none;
        border-radius: 0px 5px 5px 0px;
    }
}