/* ------- MAIN PAGE ------- */

* { margin: 0; padding: 0; box-sizing: border-box;
  
  /* Color scheme */
  
  --textcolor: #FFFAE8;
  --bgcolor2: #131313;
  --bgcolor: #191919;
  --highlight: #8194b8;
  --linkcolor2: #443F41;
  --linkcolor: #4C6087;
}

body {
  font-size: 18px;
  font-family: system-ui, monospace;
  line-height: 1.4;
  color: var(--textcolor);
  background: var(--bgcolor);
  position: relative;
  max-width: 64em;  /* remove this for a full-width layout */
  margin: 0 auto;  /* centers the layout */
}

/* ------- SECTIONS ------- */

section, section:target ~ section:last-of-type {
  padding: calc(6em + 5vw) 5vw 8vw 5vw;
  display: none;
  flex-wrap: wrap;
  justify-content: space-between;
  position: absolute;
  top: 0;
  min-height: 100vh;
  width: 100%;
  background: var(--testcolor);
}

section:target, section:last-of-type {
  display: block;
  flex-wrap: wrap;
  justify-content: space-between;
  scroll-margin-top: 100vh;
}

/* tabindex="0" */

section:focus {
  outline: 0;
}

/* Vertical spacing */

section * + * {
  margin-top: .9em;
}

section h1 {
  color: var(--highlight);
  font-size: 1.4em;
  margin-bottom: 1em;
}

/* ------- HEADER ------- */

header {
  padding: 5vw 5vw 0 5vw;
  display: flex;
  flex-wrap: wrap;
  position: absolute;
  width: 100%;
  z-index: 2;
}

header h1 {
  font-size: 1em;
  flex: 1; /* pushes nav to the right */
  white-space: nowrap;
  padding: 0 5vw .5em 0;
  background: var(--bgcolor2);
}

header h1 a {
  font-size: 2em;
}

nav a {
  margin-right: 1.5vw;
}

nav a:hover {
  border-bottom: 1px solid;
}

/* --------- GENERAL --------- */

a {
  text-decoration: none;
  color: var(--linkcolor);
}

a:hover {
  border-bottom: 1px solid;
  color: var(--highlight);
}

a[href*="//"]:after {
  font-weight: 300;
  font-size: .85em;
  content: "\2197"; /* top right arrow: â†— */
  color: var(--textcolor);
  opacity: .25;
}

a[href*="//"]:hover:after {
  color: var(--highlight);
  opacity: 1;
}

a:before {
  font-size: .7em;
  margin-right: .4em;
}

a[href$=".pdf"]:before { content: "PDF"; }
a[href$=".txt"]:before { content: "TXT"; }
a[href$=".mp3"]:before { content: "MP3"; }
a[href$=".zip"]:before { content: "ZIP"; }
a[href$=".rar"]:before { content: "RAR"; }
a[href$=".jpeg"]:before,
a[href$=".jpg"]:before,
a[href$=".gif"]:before,
a[href$=".png"]:before { content: "IMG"; }

h2, h3, h4 {
  color: var(--highlight);
  font-size: 1.1em;
  font-weight: 1.1em;
  margin: 1.6em 0 .6em 0;
}

p, ul, ol, article {
  margin-left: 1em;
  margin-right: 2em;
  margin-bottom: .6em;
}

figure.video iframe, figure.video object, figure.video embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  visibility: hidden; /* so loading="lazy" should work? */
}

hr {
  border: 0;
  height: 0;
  border-bottom: 1px solid;
  opacity: .2;
  margin: 1.4em 0;
}

/* ------- TOC's ------- */

ul.toc {
  overflow: hidden;
}

ul.toc * + * {
  margin: 0;
}

ul.toc li {
  color: var(--textcolor);
  position: relative;
  display: flex;
  align-items: flex-end;
  margin: 0;
}

ul.toc li + li {
  margin: .25em 0 0 0;
}

ul.toc li a {
  color: var(--textcolor);
  flex: 1;
}

ul.toc li a span {
  background: var(--bgcolor);
  padding-inline-end: .3em;
}

ul.toc li time {
  order: 1;
  white-space:nowrap;
  z-index: 1;
  padding-inline-start:.3em;
  background: var(--bgcolor);
}

ul.toc li a:after {
  width: 100%;
  font-size: .55em;
  position: absolute;
  bottom: .4em;
  white-space: nowrap;
  content:
  ' . . . . . . . . . . . . . . . . . . . . . .'
  ' . . . . . . . . . . . . . . . . . . . . . .'
  ' . . . . . . . . . . . . . . . . . . . . . .'
  ' . . . . . . . . . . . . . . . . . . . . . .'
  ' . . . . . . . . . . . . . . . . . . . . . .'
  ' . . . . . . . . . . . . . . . . . . . . . .';
}

/* ------- LISTS's ------- */

li, dd {
  margin-inline-start: 1.25em;
}

li + li, li ol, li ul {
  margin-top: .2em;
}

.footnotes li {
  margin-top:.5em;
  max-width:95%;
}

/* Images */

img {
  display: block;
  max-width: 100%;
  min-height:4em;
  height: auto;
  position: relative;
  margin: 0 auto;
  box-shadow: 0 .05em .4em var(--textcolor);
  background: rgba(0,0,0,.025);
}

img:after { /* style offline images */
  content: attr(alt);
  display: grid;
  align-content:center;
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: .865em;
  text-align: center;
  border:1px dashed var(--textcolor);
  background-color: var(--bgcolor);
}

figure {
  padding: 1.5em 1.2em;
}

figcaption {
  color: var(--textcolor);
  text-align: center;
}

figcaption a {
  color: var(--textcolor);
  text-decoration: underline;
}

figcaption, small, .footnotes {
  font-size: .800em;
}

/* Other elements */

blockquote {
  font-family: "Iowan Old Style", Constantia, Georgia, serif;
  font-size: 1.025em;
  font-variant-numeric: oldstyle-nums;
  background: var(--bgcolor2);
  opacity: .2;
  padding: .4em 1.2em;
}

abbr[title] {
  text-decoration: none;
  cursor: help;
}

a abbr[title] {
  cursor: pointer;
  color: inherit;
}

hr {
  border: 0;
  height: 0;
  border-bottom: 1px solid;
  opacity: .1;
  margin: 1.4em 0;
}

sup {
  line-height: 1;
  font-size: .75em;
}

code, kbd {
  font-family: ui-monospace, SFMono-Regular, 'Cascadia Code', Menlo, monospace;
  overflow-wrap: break-word;
  font-size:.95em;
  color: var(--textcolor);
}

kbd {
  box-shadow:0 .5px 1px;
  border-radius:2px;
  padding:.1em .325em .075em;
  margin: 0 .1em;
}

pre {
  overflow: auto;
  padding: .5em .85em .6em;
  background: rgba(0,0,0,.025);
  border-radius: 4px;
  margin: 1em 0;
}

pre code {
  position: relative;
  display:block;
  overflow-wrap: normal;
}

pre code:after {
  content: attr(class);
  position: absolute;
  right: -.6em;
  top: -.3em;
  text-transform: uppercase;
  font-size: .7em;
  color: var(--textcolor);
}

/* Tables */

table {
  border-collapse: collapse;
  font-size: .9em;
  width: 100%;
  margin: 1.5em 0;
}

thead th {
  text-align: start;
  border-bottom: 1px solid;
}

th, td {
  padding: .4em .6em;
  border: 1px dotted var(--text-color-pale);
}

/* Disable footnotes #links */

sup a {
  color: currentColor;
  pointer-events: none;
}

.footnotes {
  font-size: .865em;
}

.footnotes li {
  margin-top:.5em;
  max-width:95%;
  opacity: 60%;
}

a.footnote-backref {
  display: none;
}

/* ------- Footer ------- */

div#footer {
  font-size: 14px;
  text-align: center;
  color: var(--textcolor);
  opacity: .5;
}
