/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

body {
    line-height: 1;
}

ol,
ul {
    list-style: none;
}

blockquote,
q {
    quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* end reset */

:root {
    --mobile-breakpoint: 768px;
    --page-bg: #fefefe;
    --text: #171717;
    --muted: #6a665e;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 18px;
}



body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text);
    font-family: "Palatino Linotype", "Book Antiqua", Palatino,
        "Times New Roman", serif;
    font-optical-sizing: auto;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

article {
    min-width: 0;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding: 2em;
    margin-bottom: 18em;
}

/* rule for article content -- use margin bottom to create space between paragraphs */

article h1 {
    font-size: clamp(3rem, 4vw, 5.8rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 4rem 0 2rem 0;
    grid-column: 1 / -1;
    text-wrap: balance;
}

article h2 {
    font-size: .8em;
    letter-spacing: 0.04em;
    font-family: sans-serif;
    text-transform: uppercase;
    margin: 2em 0 .25em 0;
    font-variant: small-caps;
    font-weight: normal;
}

article>p,
article li>p {
    line-height: 1.45;
    text-justify: inter-word;
    text-align: justify;
}

article aside {
    margin-top: .35em;
    /* align baseline with main text */
    line-height: 1.35;
    color: var(--muted);
    font-size: 0.78em;
}

@media screen and (max-width: 768px) {
    article>p:has(+ aside) {
        margin-bottom: 1em;
    }

    article aside {
        margin: 0 0 1em 0;
    }
}

article a {
    color: inherit;
    text-decoration-color: var(--text);
    text-underline-offset: 0.15em;
}

article a:hover {
    text-decoration-color: currentColor;
    opacity: 0.5;
}

article sup {
    font-size: 0.7em;
    vertical-align: super;
}

article pre {
    overflow-x: auto;
    padding: .5em 1em;
    border: 1px solid #6B665E;
    border-radius: 2px;
    overscroll-behavior-x: none;
    background: var(--code-bg);
    font-size: 0.86rem;
    line-height: 1.55;
    scrollbar-width: none;

    margin: 1.5em 0;
}

article code { 
    font-family: monospace;
}

article p code {
    /* for inline code -- resize to match x-height of main text */
    font-size: .81em;
}

article pre>code {
    font-size: .8em;
}

article ol,
article ul {
    margin: .5em 0 1em 1em;
    padding: 0;
    line-height: 1.5;
}

article ol {
    list-style-type: decimal;
}

article ul {
    list-style-type: disc;
}

article li {
    margin-bottom: 1em;
    padding-left: 0.3em;
}

article li p {
    margin-bottom: .5em !important;
}

@media (min-width: 769px) {
    .shift-vertically {
        margin-top: var(--shift-vertically);
    }
}

/* since we are using a grid layout, we need to define margins this way */

article p:has(+ p), article p:has(+ aside + p) {
    margin-bottom: 1em;
}
