/* Basic reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  font-size: 100%;
  vertical-align: baseline;
}

/* Elements that should keep margin spacing */
address, area, article, aside, audio, blockquote, datalist, details,
dl, fieldset, figure, form, input, iframe, img, meter, nav, ol,
optgroup, option, output, p, pre, progress, ruby, section, table,
textarea, ul, video {
  margin-bottom: 1rem;
}

/* block-level elements */
article, aside, details, figcaption, figure, footer, header,
hgroup, menu, nav, section {
  display: block;
}

/* page layout */
html {
  background: var(--bg-color);
  font-family: var(--font-sans, system-ui);
}

body {
  margin: 0 auto;
  max-width: 750px;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  color: var(--fg-color);
  font-size: 2rem;   
  line-height: 1.5;
}

/* content container */
div#content {
  margin: 5em auto 14em;
}

/* selection */
::selection {
  background: var(--color2);
  color: var(--color5);
}

/* heads */
h1, h2, h3, b {
  font-family: var(--font-sans, system-ui);
}
h1 { font-size: 1.8rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: .875rem; }

p, blockquote, ul, li, th, td {
  color: var(--fg-color);
}
p {
  font-size: 16px;
  line-height: 1.5em;
}

blockquote {
  font-size: 0.9em;
  line-height: 1.5em;
  margin: 0 3em 1em;
}

/* lists */
ul { 
  padding-left: 1em;
  list-style-type: square;
  font-size: 16px;
}
ul.nav {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  gap: 0.5rem;
}
ul.nav li { display: inline; line-height: 1.5em; font-size: 18px; margin: 0; padding: 1px 15px; }
ul.index { margin-top: 1em; list-style: none; padding-left: 0; text-align: center; }
li { font-size: 16px; list-style-position: outside; padding: 0 15px; }

/* ordered lists */
ol { font-size: 14px; }

/* links */
a {
  text-decoration: none;
  color: #8da101;
  border-bottom: 0.1px inset #777;
}
a:hover, a:active, a:focus {
  color: var(--color1);
  border-bottom: 0.5px inset var(--color7);
}

/* images */
img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

/* code blocks and inline code */
code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 16px;
  background: #323232;
  padding: 0 5px;
  color: #eee;
}
pre code {
  display: block;
  background: #323232;
  color: #eee;
  overflow-x: auto;
  max-width: 100%;
  padding: 15px 25px;
  border-left: 3px solid #efefef;
}

/* article styling */
article {
  border-left: 3px solid #efefef;
  padding-left: 25px;
  clear: both;
}

/* footer */
footer {
  margin-top: 5em;
  border-top: 1px solid #8da101;
  padding-top: 1em;
  width: 100%;
  text-align: left;
}
.footerimage a { text-decoration: none; border-bottom: 0; }
.footerimage img {
  max-height: 1.5rem;
  max-width: 1.5rem;
  display: inline;
  vertical-align: middle;
  filter: invert(.5) grayscale(1);
}

/* Superscript */
sup { vertical-align: top; }

/* not sure responsive rules */
@media (max-width: 680px) {
  div#content {
    width: 90%;
    padding: 0 5%;
    font-size: 83.333%;
  }
}
@media (min-width: 681px) {
  div#content { width: 38em; }
}

