@font-face {
  font-family: Struffoli;
  src: url("/font/struffoli-webfont.woff2") format("woff2"), url("/font/struffoli-webfont.woff") format("woff");
}
@font-face {
  font-family: CampingHoliday;
  src: url("/font/camping_holiday-webfont.woff2") format("woff2"), url("/font/camping_holiday-webfont.woff") format("woff");
}
* {
  padding: 0;
  margin: 0;
}

body {
  --yellow: 62deg;
  --green: 152deg;
  --blue: 186deg;
  --pink: 322deg;
  --saturation: 65%;
  --lightness-light: 85%;
  --lightness-dark: 50%;
  --lightness-darker: 30%;
  --lightness-text: 10%;
  --yellow-light: hsl(var(--yellow), var(--saturation), var(--lightness-light));
  --green-light: hsl(var(--green), var(--saturation), var(--lightness-light));
  --blue-light: hsl(var(--blue), var(--saturation), var(--lightness-light));
  --pink-light: hsl(var(--pink), var(--saturation), var(--lightness-light));
  --yellow-dark: hsl(var(--yellow), var(--saturation), var(--lightness-dark));
  --green-dark: hsl(var(--green), var(--saturation), var(--lightness-dark));
  --blue-dark: hsl(var(--blue), var(--saturation), var(--lightness-dark));
  --pink-dark: hsl(var(--pink), var(--saturation), var(--lightness-dark));
  --yellow-darker: hsl(var(--yellow), var(--saturation), var(--lightness-darker));
  --green-darker: hsl(var(--green), var(--saturation), var(--lightness-darker));
  --blue-darker: hsl(var(--blue), var(--saturation), var(--lightness-darker));
  --pink-darker: hsl(var(--pink), var(--saturation), var(--lightness-darker));
  --gradient-dark: repeating-linear-gradient(
                  83deg,
                  var(--yellow-dark),
                  var(--pink-dark),
                  var(--blue-dark),
                  var(--green-dark),
                  var(--yellow-dark) var(--content-width)
  );
  --gradient-light: repeating-linear-gradient(
                  83deg,
                  var(--yellow-light),
                  var(--pink-light),
                  var(--blue-light),
                  var(--green-light),
                  var(--yellow-light) var(--content-width)
  );
  --nav-size: calc(var(--size-logo) + var(--size-l) * 2);
  --margin-left: var(--nav-size);
  --content-width: 850px;
  --size-xs: 3px;
  --size-s: 7px;
  --size-m: 14px;
  --size-l: 21px;
  --size-xl: 49px;
  --size-logo: 100px;
  --block-border-radius: var(--size-l) var(--size-s) var(--size-l) var(--size-s);
  --font-header: Struffoli;
  --font-header-small: CampingHoliday;
  font-family: helvetica, arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
@media (prefers-color-scheme: dark) {
  body {
    --lightness-darker: 85%;
    --lightness-dark: 40%;
    --lightness-light: 30%;
    --lightness-text: 90%;
    --saturation: 75%;
  }
}

#bg-container {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: -1;
}

#bg-canvas, #bg-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
}

#bg-overlay {
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5333333333), rgba(255, 255, 255, 0.9333333333));
}
@media (prefers-color-scheme: dark) {
  #bg-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5333333333), rgba(0, 0, 0, 0.9333333333));
  }
}

a {
  text-decoration: none;
  color: var(--pink-dark);
}
a:hover, a:active {
  color: var(--pink-darker);
  text-decoration: underline;
}
a:visited {
  color: var(--yellow-darker);
}

nav#header {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3333333333)), var(--gradient-dark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-header);
  font-size: var(--size-xl);
  display: flex;
  align-items: center;
  min-height: var(--nav-size);
  border-image: var(--gradient-dark) 1/0 0 var(--size-xs) 0;
}
nav#header :not(:last-child) {
  margin-right: var(--size-l);
}
nav#header a#logo {
  width: var(--size-logo);
  height: var(--size-logo);
  margin-left: var(--size-l);
  mask-image: url("../images/logo.svg");
  -webkit-mask-image: url("../images/logo.svg");
  background: var(--gradient-dark);
}
nav#header a.text:hover {
  text-decoration: none;
  color: rgb(0, 0, 0, var(--lightness-darker));
  -webkit-text-fill-color: rgb(0, 0, 0, var(--lightness-darker));
}
@media (prefers-color-scheme: dark) {
  nav#header a.text:hover {
    color: rgb(255, 255, 255, var(--lightness-darker));
    -webkit-text-fill-color: rgb(255, 255, 255, var(--lightness-darker));
  }
}

article.main {
  flex: 1;
  position: relative;
  margin: var(--size-l) var(--size-l) var(--size-l) var(--margin-left);
  max-width: var(--content-width);
  color: hsl(var(--pink), var(--saturation), var(--lightness-text));
  font-size: 1.1em;
  line-height: 1.3;
}
article.main.paper p, article.main.paper ul, article.main.paper ol, article.main.paper h1, article.main.paper h2, article.main.paper h3, article.main.paper h4, article.main.paper h5, article.main.paper h6, article.main.paper strong, article.main.paper em, article.main.paper a {
  font-family: "bookman old style", "georgia", "serif";
  color: rgb(var(--lightness-text), var(--lightness-text), var(--lightness-text));
  background: transparent;
  background-clip: unset;
  -webkit-text-fill-color: unset;
}
article.main.paper a {
  text-decoration: underline;
  opacity: 50%;
}
article.main.paper a:hover, article.main.paper a:visited {
  opacity: 40%;
}
article.main.paper a:hover:visited {
  opacity: 10%;
}
article.main.long-form p, article.main.long-form ul, article.main.long-form ol {
  font-family: "bookman old style", "georgia", "serif";
}
article.main > * {
  margin-top: var(--size-m);
  clear: both;
}
article.main hr {
  background: var(--gradient-dark) fixed;
  height: var(--size-xs);
  border: none;
}
article.main.paper hr {
  background: rgb(var(--lightness-text), var(--lightness-text), var(--lightness-text));
}
article.main h1 {
  font-family: var(--font-header);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3333333333)), var(--gradient-dark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 5em;
  /* Allow header to be full width instead of content-width
     100vw includes scrollbar if present so that causes horizontal
     scrolling to occur, so subtract 30px; that should be enough
  */
  width: calc(100vw - 30px);
  /* Make the background line out to the left side of the viewport so it starts
      with the same colour as the other gradients on the page
      Using background-position to do this causes an ugly hard edge in the gradient
  */
  margin-left: calc(0px - var(--margin-left));
  padding-left: var(--margin-left);
  box-sizing: border-box;
}
article.main h2 {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6666666667)) local, var(--gradient-dark) fixed;
  font-family: var(--font-header-small);
  font-weight: lighter;
  color: rgb(255, 255, 255, calc(100% - var(--lightness-text)));
  margin-top: var(--size-l);
  font-size: 2.3em;
  padding: 0.4em;
  border-radius: var(--block-border-radius);
}
@media (prefers-color-scheme: dark) {
  article.main h2 {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6666666667)), var(--gradient-dark) fixed;
    color: rgb(0, 0, 0, var(--lightness-text));
  }
}
article.main.now h2 {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3333333333)), var(--gradient-dark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  /* Make the background line out to the left side of the viewport so it starts
      with the same colour as the other gradients on the page
      Using background-position to do this causes an ugly hard edge in the gradient
  */
  margin-left: calc(0px - var(--margin-left));
  padding-left: var(--margin-left);
  box-sizing: border-box;
  padding: 0 0 0 var(--margin-left);
  color: rgb(0, 0, 0, var(--lightness-darker));
  -webkit-text-fill-color: rgb(0, 0, 0, var(--lightness-darker));
  border-radius: 0;
  font-size: 1.8em;
}
@media (prefers-color-scheme: dark) {
  article.main.now h2 {
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}
article.main.paper h2 {
  border-radius: 0;
  padding: 0;
}
article.main h3 {
  font-family: var(--font-header-small);
  font-weight: lighter;
  font-size: 1.5em;
}
article.main h4 {
  font-family: var(--font-header-small);
  font-weight: lighter;
  padding-top: var(--size-s);
  font-size: 1.3em;
}
article.main h5 {
  padding-top: var(--size-xs);
  font-size: 1.1em;
}
article.main h6 {
  padding-top: var(--size-xs);
  font-size: 1em;
}
article.main ul li, article.main ol li {
  margin-top: var(--size-s);
  margin-left: var(--size-l);
}
article.main strong {
  color: var(--blue-darker);
}
article.main em {
  color: var(--green-darker);
}
article.main a[id^=footnote-referer-] {
  text-decoration: none;
  margin-left: 0.2em;
}
article.main code {
  background: var(--gradient-light) fixed;
  border: 1px solid var(--blue-darker);
  color: var(--blue-darker);
  border-radius: 0.4em;
  padding: 0.15em 0.3em;
  margin-right: 0.1em;
}
article.main pre {
  background: var(--gradient-light) fixed;
  border: 1px solid var(--blue-darker);
  border-radius: var(--block-border-radius);
  padding: var(--size-s);
  overflow-x: scroll;
}
article.main pre code { /* code tag within <pre> */
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
}
article.main blockquote {
  margin-top: var(--size-m);
  padding-left: var(--size-s);
  border-left: var(--size-xs) solid var(--pink-dark);
}
article.main blockquote p {
  margin-bottom: var(--size-s);
}
article.main.paper blockquote {
  border-left: var(--size-xs) solid rgb(var(--lightness-text), var(--lightness-text), var(--lightness-text));
}
article.main p {
  overflow: hidden;
  padding-bottom: 0.15em;
}
article.main p.images {
  display: flex;
  margin-bottom: var(--size-m);
  border-radius: var(--block-border-radius);
  flex-wrap: wrap;
  /* 1 image full width */
  /* 2 images 2x1 */
  /* 3 images 3x1 */
  /* 4 images 2x2 */
}
article.main p.images img:first-child:nth-last-child(1) {
  width: 100%;
}
article.main p.images img:first-child:nth-last-child(2),
article.main p.images img:first-child:nth-last-child(2) ~ img {
  width: 50%;
}
article.main p.images img:first-child:nth-last-child(3),
article.main p.images img:first-child:nth-last-child(3) ~ img {
  width: 33.3333%;
}
article.main p.images img:first-child:nth-last-child(4),
article.main p.images img:first-child:nth-last-child(4) ~ img {
  width: 50%;
}
article.main p:not(.images) img {
  float: left;
  border-radius: var(--block-border-radius);
  margin-right: var(--size-m);
}

footer {
  padding-left: var(--margin-left);
  margin-top: var(--size-l);
  height: var(--size-xl);
  line-height: var(--size-xl);
  border-image: var(--gradient-dark) 1/var(--size-xs) 0 0 0;
  color: hsl(var(--pink), var(--saturation), var(--lightness-text));
}