/* Body formatting */
body {
    color: #181818;
    padding: 20px;
    line-height: 1.5;
    /* https://github.com/system-fonts/modern-font-stacks#transitional */
    font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    max-width: 850px;
    margin: auto;
}

img {
    max-width: 100%; /* Ensures images don't exceed the container width */
    height: auto; /* Maintains the aspect ratio of the image */
    display: block; /* Ensures the image behaves as a block element */
    margin: 0 auto; /* Centers the image horizontally */
}

blockquote {
    margin: 20px 0 30px;
    padding-left: 10px;
    border-left: 5px solid #ccc;
}

/* Paragraph formatting */
p {
    text-align: left;
    text-justify: inter-word;
}

/* Footer formatting */
footer {
    margin-top: 5%;
    position: float;
    text-align: center;
}

/* Add a dot after section numbers */
.header-section-number::after {
    content: ".";
}

.darkmode {
    background-color: #282828;
    color: white;
}

/* Pairs of style for light and dark modes */
a:link {
    color: #000000;
}
a:visited {
    color: #000000;
}
a:active {
    color: #000000;
}

.darkmode a:link {
    color: #ffffff;
}
.darkmode a:visited {
    color: #ffffff;
}
.darkmode a:active {
    color: #ffffff;
    text-decoration: none;
    font-weight: normal;
}

/* Style for footnote pop ups for script included in header */
.popup {
    position: absolute;
    background-color: #fff;
    border: 3px solid #aaa;
    padding-left: 15px;
    padding-right: 15px;
    width: 300px;
    overflow-wrap: break-word;
    z-index: 9999;
}

.darkmode .popup {
    background-color: #282828;
    color: #ffffff;
    border: 3px solid #cccccc;
}

/* Code block */
.sourceCode,
code {
    background-color: #e8e8e8;
}

.darkmode .sourceCode,
.darkmode code {
    background-color: #606060;
}
