:root {
  --accent: #009e0f;
  --grey: #444;
  --grey-dark: #212121;
  --white: #fffbff;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: Inter, sans-serif;
  line-height: 1.65;

  display: flex;
  flex-direction: column;
  min-height: 100vh;

  background-color: var(--white);
  /* margin: 0 24px; */
}

.nav-toggle {
  display: none;
}

.nav-toggle__label {
  display: none;
  z-index: 99;
  width: 32px;
  height: 24px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle__label span,
.nav-toggle__label span::before,
.nav-toggle__label span::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--grey-dark);
}

.nav-toggle__label span::before {
  transform: translateY(9px);
}

.nav-toggle__label span::after {
  transform: translateY(6px);
}

@media only screen and (max-width: 468px) {
  .nav-toggle__label {
    display: flex;
  }

  nav {
    display: none;
    width: 100%;
    margin-top: -48px !important;
    text-align: right;
    z-index: 99;
    border-radius: 8px;
    background-color: var(--white);
    padding: 12px 24px;
  }

  nav a {
    display: block;
    margin: 12px 0;
    line-height: 1.65;
  }

  .nav-toggle:checked ~ nav {
    display: block;
  }
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding: 0 24px;
  box-shadow: 0 4px 4px -2px #424242;
  -moz-box-shadow: 0 4px 4px -2px #424242;
  -webkit-box-shadow: 0 4px 4px -2px #424242;
  height: 72px;
}

.page-header__logo {
    z-index: 99;
}

.page-header nav a:not(:hover):not(:focus) {
  color: currentColor;
  text-decoration: none;
}

.page-header nav a:hover {
  color: var(--accent);
}

nav {
    margin-top: -24px;
}

nav a {
  margin: 0 12px;
  font-size: 1.25em;
}

main {
  background-image: url('/assets/background.jpg');
  background-size: cover;
  background-position: center;
  flex-grow: 1;
  width: 100%;
}

section {
  max-width: 60ch;
  margin: 24px auto;
  background-color: rgba(255, 255, 255, 0.38);
  padding: 24px 48px 48px 48px;
  border-radius: 8px;
}

.page-footer {
  text-align: center;
  margin-bottom: 8px;
}

a[href] {
  color: var(--accent);
  text-decoration: none;
}

a[href]:hover {
  color: var(--grey-dark);
  text-decoration: none;
}

a[href]:focus {
  /* outline: 2px solid var(--accent); */
  color: var(--accent);
  outline-offset: 4px;
}

.footnotes {
  font-size: 0.8em;
}

/* Typography */
p {
  margin-bottom: 1.15rem;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 2.75rem 0 1.05rem;
  font-weight: 400;
  line-height: 1.15;
}

h1 {
  font-size: 3.052em;
}

h2 {
  font-size: 2.441em;
}

h3 {
  font-size: 1.953em;
}

h4 {
  font-size: 1.563em;
}

h5,
.larger {
  font-size: 1.25em;
}

small {
  font-size: 0.7em;
}

/* backlinks */
.backlinks-title {
  margin-bottom: 0;
}

.backlinks-container {
  margin-top: 0;
}

.backlinks-default {
  margin-top: 0;
  margin-left: 16px;
  color: var(--grey);
}

.backlink__preview {
  display: none;

  position: absolute;
  bottom: 8px;
  left: 100%;
  background-color: #fff;
  border-radius: 4px;
  padding: 4px;
  box-shadow: 0 0 4px 2px rgba(0, 0, 0, 0.25);
  width: 348px;
  max-height: 148px;
  overflow: hidden;
}

.backlink__preview::after {
  content: '';
  position: absolute;
  bottom: 0;
  background: linear-gradient(transparent, white);
  width: 100%;
  height: 24px;
}

.backlink__preview h1 {
  font-size: 1.2rem;
  margin-top: 8px;
  font-weight: bold;
}

.backlink {
  width: fit-content;
  position: relative;
}

.backlink:hover {
  padding-right: 4px;
  /* Allow mouse to travel between link and modal */
}

.backlink:hover .backlink__preview {
  display: block;
}
