/* === FONT FACES === */

/* --- TEXT FONT --- */
@font-face {
  font-family: 'text';
  src: url("./text.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: 'text-fallback-lib';
  src: local("Liberation Sans");
  size-adjust: calc(100% * 28 / 24);
}
@font-face {
  font-family: 'text-fallback-win';
  src: local("Arial");
  size-adjust: calc(100% * 28 / 24);
}
@font-face {
  font-family: 'text-fallback-mac';
  src: local("Helvetica");
  size-adjust: calc(100% * 28 / 24);
}

/* --- CODE FONT --- */
@font-face {
  font-family: 'code';
  src: url("./code.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: 'code-fallback-lib';
  src: local("Liberation Mono");
}
@font-face {
  font-family: 'code-fallback-win';
  src: local("Consolas");
  size-adjust: calc(100% * 26 / 24);
}
@font-face {
  font-family: 'code-fallback-mac';
  src: local("Monaco");
}

/* --- EMPHASIS FONT --- */
@font-face {
  font-family: 'emphasis';
  src: url("./heading.woff2") format("woff2");
  /*   ^ this is not necessairly used for headings, but I don't want to put another patch to gemtexter (the site generator). */
  font-display: swap;
}
@font-face {
  font-family: 'emphasis-fallback-lib';
  src: local("New Century Schoolbook");
  size-adjust: calc(100% * 28 / 24);
  font-style: italic;
}
@font-face {
  font-family: 'emphasis-fallback-prp';
  src: local("Georgia");
  size-adjust: calc(100% * 28 / 24);
  font-style: italic;
}

/* === ROOT STYLING === */
html {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40"><style>rect,path{fill:%23bcc;}</style><rect width="32" height="4" x="0" y="0" class="hors" /><rect width="4" height="32" x="14" y="0" class="vert" /><rect width="16" height="4" x="14" y="14" class="fbar short" /><path d="M 29,1 32,1 32,4 18,18 15,18 15,15 z" class="orth qt1 long" /><path d="M 29,32 32,32 32,29 17,14 14,14 14,17 z" class="orth qt4 long" /></svg>');
  background-size: 5em 5em;
  background-color: #000000;
  background-repeat: repeat;
  padding: 1em 1em;
  background-position: 0, 0;
  animation: scroll-diagonal 120s linear infinite;
}
@keyframes scroll-diagonal {
  from {
    background-position: 0vw 0vh;
  }
  to {
    background-position: 100vw 100vh;
  }
}

body {
  font-family: text, text-fallback-lib, text-fallback-mac, text-fallback-win, sans-serif;
  font-size: 1.3rem;
  background: #eeeeee;
  max-width: 60rem;
  padding: 2rem 3rem 1rem 3rem;
  margin: auto;
  border: 0.5rem solid #377;
  border-radius: 1rem;
  word-wrap: break-word;
  line-height: 140%;
}

/* --- HEADER & FOOTER --- */
p#footer, p#header {
  font-family: code, code-fallback-lib, code-fallback-mac, code-fallback-win, monospace;
}
p#header {
  font-weight: 600;
}
#header {
  float: right;
  align-content: center;
  text-align: center;
  margin-top: 0.5em;
}
#header-home {
  font-size: 1.6em;
}
p#footer {
  text-align: center;
}
hr {
  height: 0.2em;
  background-color: #668888;
  border: 0;
  margin: 1em -1em 1em -1em;
}


/* === ELEMENT STYLING === */
/* --- HEADINGS --- */
h1, h2, h3 {
  letter-spacing: 0.03em;
  padding: 0 0.5em 0em 1.5em;
  margin: 0 0 0.5em 0;
  color: #244;
  background-color: #ddd;
  border-radius: 0.5rem;
  display: inline-block;
  max-width: calc(90% - 12rem);
  text-indent: -1em;
}
h1:before,h2:before,h3:before {
  content: ">";
  font-size: 0.7em;
  font-family: code;
  vertical-align: middle;
  padding: 0 0.5em 0 0;
}
h1 {
  font-size: 1.9em;
  line-height: 2em;
}
h2 {
  font-size: 1.5em;
  line-height: 2em;
}
h3 {
  font-size: 1.2em;
  line-height: 2em;
}

/* --- LINKS (ANCHORS) --- */
a {
  font-family: code, code-fallback-lib, code-fallback-mac, code-fallback-win, monospace;
  text-decoration: none;
  color: #377;
  padding: 0;
}
a:hover {
  text-decoration: underline;
  font-weight: 900;
}
a.textlink:before {
  content: "⟹ ";
  font-weight: 900;
}

/* --- BLOCKQUOTES --- */
.quote {
  font-family: emphasis, emphasis-fallback-lib, emphasis-fallback-prp, serif;
  font-style: normal;
  /* ^ we use <i> for blockquotes, as in pure HTML <i> looks better than <blockquote> */
  border-left: 0.3em solid #688;
  margin: 0em 0.2em;
  padding: 0.3em 0.7em;
  display: inline-block;
}

/* --- LISTS --- */
ul {
  list-style: inside;
  margin: 0em 0 0em 0;
  padding: 0;
}
li:before {
  content: " ";
}

/* --- IMAGES --- */
img {
  max-width: 90%;
}

/* --- PREFORMATTED BLOCKS --- */
pre {
  font-family: code, code-fallback-lib, code-fallback-mac, code-fallback-win, monospace;
  border: 0.1em solid #dddddd;
  padding: 0.5em 1em 0.5em 1em;
  border-radius: 1em;
}

/* --- PARAGRAPHS --- */
span {
  display: inline-block;
  text-indent: 1em;
  font-size: 1em;
}
span.inlinecode {
  font-family: code, code-fallback-lib, code-fallback-mac, code-fallback-win, monospace;
  text-indent: 0;
  display: inline;
  background-color: #ddd;
  border-radius: 0.3em;
}

