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

/* --- TEXT FONT --- */
@font-face {
  font-family: "text";
  src: url("./text.woff2") format("woff2");
  font-display: swap;
  font-weight: 450 750;
}
@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-weight: 500;
}
@font-face {
  font-family: "code";
  src: url("./typewriter.woff2") format("woff2");
  font-display: swap;
  font-weight: 800;
}
@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-weight: 450;
}
@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: #022;
  background-repeat: repeat;
  padding: 1em 1em;
  background-position: 0, 0;
  animation: scroll-diagonal 150s linear infinite;

  /* For all fonts in the Recursive family */
  font-feature-settings:
    "ss01", "ss02", "ss03", "ss04", "ss05", "ss06", "ss08", "ss11", "ss12";
}
@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: clamp(1rem, 0.75rem + 1vw, 1.25rem);
  background: #eee;
  max-width: 60rem;
  padding: 2rem 2rem 1rem 2rem;
  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;
  font-weight: 650;
}
#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: 3%;
  padding: 0.15em 0.4em 0.15em 0.4em;
  margin: 0 0 0.5em 0;
  color: #133;
  background-color: #ddd;
  border-radius: 0.5rem;
  display: inline-block;
  max-width: calc(90% - 10rem);
  line-height: 1.3em;
}
/*
h1:before,
h2:before,
h3:before {
  content: "»";
  font-size: 1em;
  font-family: text;
  vertical-align: top;
  padding: 0 0.5em 0 0;
}*/
h1 {
  font-size: 1.95em;
}
h2 {
  font-size: 1.6em;
}
h3 {
  font-size: 1.25em;
}

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

/* --- BLOCKQUOTES --- */
.quote {
  font-family: emphasis, emphasis-fallback-lib, emphasis-fallback-prp, serif;
  font-style: normal;
  /* ^ we use <i> for blockquotes, as in raw HTML (w/o CSS) <i> tags look better than <blockquote>s */
  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.2em solid #dddddd;
  padding: 0.5em 1em 0.5em 1em;
  border-radius: 1em;
  background-color: #e6e6e6;
}

/* --- PARAGRAPHS --- */
span {
  display: inline-block;
  text-indent: 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;
}
