@font-face {
  font-family: "Source Code Pro Variable";
  font-weight: 100 900;
  font-style: normal;
  src: url("../fonts/SourceCodeVariable-Roman.otf.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Source Code Pro Variable";
  font-weight: 100 900;
  font-style: italic;
  src: url("../fonts/SourceCodeVariable-Italic.otf.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Source Sans Pro Variable";
  font-weight: 200 900;
  font-style: normal;
  src: url("../fonts/SourceSans3VF-Roman.otf.woff2"), url("../fonts/SourceSans3VF-Roman.ttf.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Source Sans Pro Variable";
  font-weight: 200 900;
  font-style: italic;
  src: url("../fonts/SourceSans3VF-Italic.otf.woff2") url("../fonts/SourceSans3VF-Italic.ttf.woff2") format("woff2-variations");
}
:root {
  --sans-serif-font: "Source Sans Pro Variable", sans-serif;
  --code-font: "Source Code Pro Variable", monospace;
}

:root {
  --background-color: rgb(246, 246, 246);
  --content-background: white;
  --content-text: rgb(48, 48, 48);
  --content-shadow: rgb(172, 172, 172);
  --content-link: rgb(0, 102, 154);
  --content-link-hover: rgb(145, 80, 21);
  --box-header: rgb(246, 246, 246);
  --nav-link: rgb(48, 48, 48);
  --nav-link-background-hover: white;
  --nav-background: white;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: rgb(48, 48, 48);
    --content-background: rgb(80, 80, 80);
    --content-text: rgb(246, 246, 246);
    --content-shadow: rgb(48, 48, 48);
    --content-link: rgb(48, 192, 255);
    --content-link-hover: rgb(238, 183, 132);
    --box-header: rgb(112, 112, 112);
    --nav-link: rgb(246, 246, 246);
    --nav-link-background-hover: rgb(48, 48, 48);
    --nav-background: rgb(112, 112, 112);
  }
}
body {
  font-family: var(--sans-serif-font);
  margin: 0;
  font-size: 18px;
  font-weight: 300;
  line-height: 125%;
  background-color: var(--background-color);
  overflow-y: scroll;
}

html, body {
  width: 100%;
  height: 100%;
}

header {
  height: 196px;
  background-color: var(--nav-background);
}
header .header-image {
  background-image: url("images/header.jpg");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  height: 160px;
}
header nav {
  position: absolute;
  top: 160px;
  height: 36px;
  display: block;
  width: 100%;
  border-bottom: 1px solid #CCC;
  z-index: 0;
  font-weight: normal;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.12) 100%);
}
header nav ul {
  padding: 0px;
  margin: 0px;
  max-width: 832px;
  margin: auto;
}
header nav ul:after {
  clear: both;
  content: " ";
  display: block;
  font-size: 0;
  height: 0;
  visibility: hidden;
}
header nav ul li {
  list-style: none;
  float: left;
  transition: background 0.3s ease-out 0s;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}
header nav ul li:last-child {
  border-right: none;
}
header nav ul li a {
  text-decoration: none;
  display: block;
  padding-top: 2px;
  line-height: 34px;
  padding-left: 16px;
  padding-right: 16px;
  color: var(--nav-link);
}
header nav ul li:hover {
  background-color: var(--nav-link-background-hover);
}

#content h1 {
  margin-bottom: 16px;
  font-weight: 400;
  margin-top: 12px;
}
#content h2 {
  margin-top: 8px;
  margin-bottom: 8px;
  font-weight: 400;
  line-height: 150%;
}
#content p {
  margin-top: 16px;
  margin-bottom: 16px;
}
#content h2 + p {
  margin-top: 0;
}
#content {
  padding-top: 4px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  color: var(--content-text);
}
#content a {
  color: var(--content-link);
}
#content a:hover {
  color: var(--content-link-hover);
}
#content ul li a {
  text-decoration: none;
}
#content ul li a:hover {
  text-decoration: underline;
}
#content ul.project-list {
  list-style-type: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 16px;
  grid-auto-flow: row dense;
  width: 100%;
  margin: 0;
  padding: 0;
}
#content ul.project-list li {
  display: flex;
  border: 1px solid #CCC;
}
#content ul.project-list li.featured {
  grid-column: span 2;
}
#content ul.project-list li .wrapper {
  margin: 0;
  padding: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
#content ul.project-list li .wrapper .main {
  flex-grow: 1;
}
#content ul.project-list li .meta {
  border-top: 1px solid #CCC;
  padding-top: 4px;
  margin-top: 4px;
  font-size: 80%;
  display: grid;
  grid-template-columns: max-content max-content;
}
#content ul.project-list li .meta .label:after {
  content: ":";
  padding-right: 0.5em;
}
#content ul.project-list li .meta {
  line-height: 125%;
}
#content ul.project-list li h3 {
  padding: 0;
  margin: -8px;
  margin-bottom: 4px;
  font-size: 100%;
  padding: 0.5em;
  color: var(--content-link);
  text-shadow: 1px 1px 0 var(--content-background);
  background-color: var(--box-header);
  background-image: repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.015), rgba(0, 0, 0, 0.015) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.015) 50%);
  background-size: 24px 24px;
  border-bottom: 1px solid #CCC;
}
#content ul.project-list li p {
  margin: 0;
  padding: 0;
}
#content ul.project-list li {
  transition: box-shadow 250ms;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}
#content ul.project-list li:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}
#content ul.project-list li a {
  color: var(--content-text);
}
#content ul.project-list li a:hover {
  text-decoration: none;
}
#content figure {
  max-width: 800px;
  margin: 0;
  padding: 0;
}
#content figure figcaption {
  padding: 2mm;
  text-align: center;
  font-style: italic;
}
#content figure.dark figcaption {
  border-top: 1px solid #EEE;
  background-color: #333;
  color: #DDD;
}
#content figure img {
  box-shadow: none;
}
#content figure, #content img {
  box-shadow: 0 2px 4px var(--content-shadow);
}
#content img {
  max-width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
#content img.gray-bg {
  background-color: #777;
}
#content .no-shadow {
  box-shadow: none;
}
#content pre {
  box-shadow: inset 0 0 4px 0 #CCC;
  background-color: #F0F0F0;
  padding: 2mm;
}
#content pre, #content code {
  font-family: var(--code-font);
  font-weight: 400;
  font-size: 17px;
  line-height: 125%;
}
#content h1 {
  color: white;
  line-height: 150%;
  padding-top: 2px;
  padding-left: 8px;
  background-color: rgb(225, 130, 43);
  background-image: repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.05) 50%);
  background-size: 24px 24px;
  text-shadow: 1px 1px 0 #666;
}

#container {
  padding-left: 16px;
  padding-right: 16px;
  background-color: var(--content-background);
  max-width: 800px;
  margin: auto;
  border-right: 1px solid #CCC;
  border-left: 1px solid #CCC;
  min-height: calc(100% - 195px);
  display: grid;
  grid-template-rows: 1fr auto;
  grid-template-columns: 100%;
}
#container footer {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 16px;
}
#container footer a, #container footer {
  color: rgb(172, 172, 172);
}
#container footer a:hover {
  color: black;
}

@media (max-width: 832px) {
  header .header-image {
    background-position: right -872px top;
  }
  #content ul.project-list {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  header .header-image {
    background-size: 1280px 80px;
    background-position: right -420px top;
    height: 80px;
  }
  header nav {
    top: 80px;
  }
  header {
    height: 116px;
  }
  #container {
    min-height: calc(100% - 195px + 80px);
  }
}
@media (max-width: 480px) {
  #content ul.project-list {
    grid-template-columns: 1fr;
  }
  #content ul.project-list li.featured {
    grid-column: span 1;
  }
}
