/* General site styling */

@import url('vars.css');

@font-face {
  font-family: Libertine;
  src: url('../fonts/linux_libertine/LinLibertine_R.ttf');
}

@font-face {
  font-family: Effloresce;
  src: url('../fonts/effloresce/Effloresce.otf');
}

body {
  background-image: linear-gradient(0deg, #141414 25%, #000000 25%, #000000 50%, #141414 50%, #141414 75%, #000000 75%, #000000 100%);
  background-size: 12.00px 12.00px;
  background-attachment: fixed;
  color: var(--text);
  font-family: Libertine, serif;
  font-size:20px;
}

#title, h1, h2, h3 {
  font-family: Effloresce, serif;
  font-feature-settings: "liga" 0, "dlig" 0;
  font-variant-ligatures: none;
}

h1 {
  font-size:1.7em;
}

h2 {
  font-size: 1.5em;
}

h3 {
  font-size: 1.2em;
}

hr {
  border: 0;
  height: 1px;
  background: #ccc;
  background-image: linear-gradient(to right, #333, #ccc, #333);
}

#background-image {
  background-image: url('../img/flowers.svg');
  filter: invert(50%);
  opacity:50%;
  background-repeat:no-repeat;
  content: '';

  position: fixed;
  bottom:-200px;
  left:-50px;
  height:90vh;
  width:50vw;
  pointer-events:none;
}

p.caption {
  font-size:0.9em;
  opacity:0.9;
  text-align:center;
  text-wrap:balance;
}

p a, main article a, main footer a, main header a {
  color: var(--primary);
  text-decoration: none;
  background-position-y: -0%;
  background: linear-gradient( #00000000 50%, #303130 50%);
  transition: background 300ms ease, color 300ms;
  background-size: 2px;
  background-size: auto 175%;
}

p > a:hover, a:focus, main article a:hover, main article a:focus,
main footer a:hover, main footer a:focus,
main header a:hover, main footer a:focus {
  background-position-y: 100%;
  color: var(--highlight);
}

/*p a[href^="http"]::after, main article a[href^="http"]::after,
main header a[href^="http"]::after,
main footer a[href^="http"]::after*/a[href^="http"]:not(:has(img))::after {
  content: '';
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.10em;
  background-size:100%;
  background-image: url("../img/external-link.svg");
}

nav ul {
  list-style: none;
}

nav li {
  margin-top:10px;
}

nav li:first-child {
  margin-top:0px;
}

nav a {
  color: var(--primary);
}

#footnotes li:nth-child(n + 2) {
  margin-top:10px;
}

/* https://codepen.io/ibrahimjabbari/pen/nmlbt */

nav a::before {
  display: inline-block;
  opacity: 0;
  transition: transform 0.3s, opacity 0.2s;
}

nav a::before {
  margin-right: 5px;
  content: '>';
  transform: translateX(20px);
}

nav a:hover::before,
nav a:focus::before {
  opacity: 1;
  transform: translateX(0px);
}

.hide {
  display:none;
}

/* tooltip hint */
*[title] {
  border-bottom: dotted gray 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation: none !important;
    transition: none !important;
  }
}

/* stop superscript from changing line height */
sup { vertical-align: top; position:relative; top:-0.5em; font-size:0.7em; }
