
/* custom CSS stylesheet for roadtosysadmin.net */

/* #TODO: move the links out of the file; humans.txt might be a better choice */
/* https://stackoverflow.com/questions/609517/why-em-instead-of-px#609561 */

html {
  background: #121212;;
  filter: brightness(0.95) contrast(1.1);
}

/**
 * === body ===
 */

body {
  color: #000;
  background-color: #fff;
  font-size: medium;
  font-family: Helvetica, Verdana, Arial, sans-serif;
  text-align: justify;
  line-height: 1.5em;
  overflow-y: scroll;
  overflow-x: hidden;
  text-wrap: wrap;
  word-break: break-word;
  margin: 0 auto;
  max-width: 75ch;
  min-height: 100vh;
}

body#index > main, body#error > main {
  text-align: center;
}

body#error > main > p:not(.exclusions) {
  padding: 2em 0 0;
}

body#error > main > a {
  display: block;
  padding: 0.5em;
}

/**
 * === anchors ===
 */

/* https://dev.to/chiboy_001/how-to-create-and-style-links-anchor-tags-using-css-n53
 * https://www.sitepoint.com/quick-tip-fixing-font-weight-problem-hover-states/
 * https://css-tricks.com/bold-on-hover-without-the-layout-shift/
 * https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_text/Styling_links
 */

a {
  letter-spacing: 0.075em;
  transition: text-shadow 0s;
  text-decoration: none;
}

a:link {
  color: #0000EE;
}

a:visited {
  color: #551A8B;
}

a:hover {
  text-shadow: 0 0 0.05em;
}

/**
 * === main ===
 */

/* actual overwrite for markdown.css values */
main.md code, main.md pre {
  word-break: break-all;
  white-space: normal;
  font-size: 1em;
}

main.md > details > pre > code {
  white-space: pre-wrap;
}
/* end overwrite */

main {
  padding: 1em 2em 5em;
}

main > nav > a {
  /* https://www.w3.org/Style/Examples/007/center.en.html */
  margin: auto;
  display: table;
  line-height: 2.5em;
}

main > nav > a:last-child {
  padding-bottom: 1em;
}

main.md > sup {
  font-size: unset;
  font-weight: bold;
  line-height: unset;
  position: unset;
  display: block;
  overflow-x: hidden;
  word-break: normal;
  padding-bottom: 1em;
}

main hr {
  border-top: 0.125em solid #2f4f4f;
  max-width: 16em;
  margin: 1em auto;
}

.md ol ul {
  list-style-type: disc;
}

main.md > ul > li > ul > li {
  margin: 1em 0;
  list-style-type: disc;
} /* #TODO: use paragraphs for margins, then turn
   * selector to '.md ul ul' & merge with the above */

/**
 * === common ===
 */

 header, footer {
  background-color: #e0e0e0;
  text-align: center;
}

/**
 * === header ===
 */

header {
  /* https://stackoverflow.com/questions/6431881/css-layout-for-fixed-header-and-100-content-height#6432052 */
  top: 0;
  position: sticky;
  padding: 1em 1em 0.01em;
}

header > h3 {
  margin-top: 0;
}

header > p {
  line-height: 1em;
}

/* #TODO: move dates (published, updated) to the head element */
header > p#updated {
  display: none;
  font-family: monospace;
}

/**
 * === footer ===
 */

footer {
  /* https://stackoverflow.com/questions/13609006/floating-footer-always-on-the-bottom-and-visible#13609095 */
  bottom: -5em;
  left: 0;
  right: 0;
  margin: 0 auto;
  height: 3.5em;
  padding: 0.5em 0 5em;
  position: fixed;
  max-width: 75ch;
} /*http://jsfiddle.net/ZsnuZ/*/

footer > nav > ul {
  padding: 0;
  margin: 0;
}

footer > nav > ul > li {
  display: inline;
}

footer > nav > ul > li > a, footer > nav > ul > li > s {
  padding: 0.5em;
  letter-spacing: 0.15em;
}

.current-page {
  text-decoration-line: underline;
  text-decoration-style: double;
  text-decoration-thickness: 0.1em;
}

footer hr {
  border-top: 0.125em solid #8c8b8b;
  border-bottom: 0.125em solid #e0e0e0;
  border-color: #8c8b8b;
  max-width: 16em;
}
