* {
  margin: 0;
  padding: 0;
}

*, *:before, *:after {
  box-sizing: border-box;
}

:root {
  --padding: 1.5rem;
  --color-black: #000;
  --color-white: #fff;
  --color-dark-grey: #343434;
  --color-grey: #777;
  --color-light: #efefef;
  --color-text: var(--color-grey);
  --color-text-grey: var(--color-grey);
  --color-background: #F3F3F3;
  --color-bg-overviews: #bed3d3;
  --color-bg-projects: #bdc6d6;
  --color-code-light-grey:  #cacbd1;
  --color-code-comment:     #a9aaad;
  --color-code-white:       #c5c9c6;
  --color-code-red:         #d16464;
  --color-code-orange:      #de935f;
  --color-code-yellow:      #f0c674;
  --color-code-green:       #a7bd68;
  --color-code-aqua:        #8abeb7;
  --color-code-blue:        #7e9abf;
  --color-code-purple:      #b294bb;
  --font-family-sans: "DejaVu Sans Condensed", "Trebuchet MS", Times, sans-serif;
  --font-family-sans2: "Lucida Grande", Verdana, Helvetica, sans-serif;
  --font-family-sans3: "Trebuchet MS", Arial, Helvetica, sans-serif;
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  --animation-time: 500ms;

  @media screen and (min-width: 60rem) {
    --padding: 3rem;
  }
}

html {
  font-family: var(--font-family-sans);
  color: var(--color-text);
}
img {
  width: 100%;
  height: auto;
}
body {
  background: var(--color-background);
  transition: background-color 700ms ease-in-out;

  &.bg-overviews {
    background: var(--color-bg-overviews);
  }

  &.bg-projects {
    background: var(--color-bg-projects);
  }
}
li {
  list-style: none;
}
a,
.link {
  color: currentColor;
  text-decoration: none;

  &:hover,
  &:focus,
  &[aria-current]{
    text-decoration: underline;
  }
}
button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}
strong, b {
  font-weight: 600;
}
small {
  font-size: inherit;
  color: var(--color-text-grey);
}

.bg-light {
  background-color: var(--color-light);
}
.color-grey {
  color: var(--color-text-grey);
}
.header {
  position: relative;
  padding: 0 var(--padding);
  margin-bottom: 1rem;
}

.logo {
  display: inline-block;
  margin-top: 1rem;
  max-width: 100px;
  font-weight: 600;
  cursor: pointer;
}

.section {
  padding: 3rem 0;
}

.grid {
  --columns: 12;
  --gutter: 3rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: 1fr;
}
.grid > .column {
  margin-bottom: var(--gutter);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-sans2);
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.text {
  line-height: 1.5em;
  font-size: .8rem;
}
.text--alt {
  font-family: var(--font-family-sans3);
}
.text a,
.text .link {
  text-decoration: underline;
}
.text :first-child {
  margin-top: 0;
}
.text :last-child {
  margin-bottom: 0;
}
.text p,
.text ul,
.text ol {
  margin-bottom: 1.5rem;
}
.text ul,
.text ol {
  margin-left: 1.5rem;
}
.text ul p,
.text ol p {
  margin-bottom: 0;
}
.text ul > li {
  list-style: disc;
}
.text ol > li {
  list-style: decimal;
}
.text ul ol,
.text ul ul,
.text ol ul,
.text ol ol {
  margin-bottom: 0;
}
h1,
.h1,
.intro {
  font-size: 1.2rem;
  line-height: 1.25em;
}
h2,
.h2 {
  font-size: 1rem;
}
h3,
.h3 {
  font-size: .9rem;
}
.text .codeblock {
  display: grid;
}
.text code {
  font-family: var(--font-family-mono);
  font-size: 1em;
  background: var(--color-light);
  padding: 0 .5rem;
  display: inline-block;
  color: var(--color-black);
}
.text pre {
  margin: 3rem 0;
  background: var(--color-black);
  color: var(--color-white);
  padding: 1.5rem;
  overflow-x: scroll;
  overflow-y: hidden;
  line-height: 1.5rem;
}
.text pre code {
  padding: 0;
  background: none;
  color: inherit;
}
.text hr {
  margin: 6rem 0;
}
.text dt {
  font-weight: 600;
}
.text blockquote {
  font-size: 1.25rem;
  line-height: 1.325em;
  border-left: 2px solid var(--color-black);
  padding-left: 1rem;
  margin: 3rem 0;
  max-width: 25rem;
}
.text blockquote footer {
  font-size: .875rem;
  font-style: italic;
}
.text figure {
  margin: 3rem 0;
}
.text figcaption {
  padding-top: .75rem;
  color: var(--color-text-grey);
}
.text figure ul {
  line-height: 0;
  display: grid;
  gap: 1.5rem;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
.text figure ul li {
  list-style: none;
}

hr {
  border: 0;
  background: currentColor;
  height: 2px;
  width: 1.5rem;
  margin: 3rem auto;
}

.align-center {
  text-align: center;
}

.intro {
  max-width: 40rem;
}
.intro *:not(:last-child) {
  margin-bottom: 1em;
}

.cta {
  background: var(--color-black);
  color: var(--color-white);
  display: inline-flex;
  justify-content: center;
  padding: .75rem 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-black);
}

.box {
  background: var(--color-light);
  padding: 1.5rem;
  border: 4px solid var(--color-white);
  outline: 2px solid var(--color-light);
}

.img-caption,
.video-caption {
  padding-top: .75rem;
  line-height: 1.5em;
}

.main {
  &.fader {
    transition: padding 300ms ease-in-out;
    opacity: 0;

    & + .spinner {
      display: block;
    }
  }
}

.container {
  padding: 0 var(--padding);
}

.horizontal-nav {
  position: fixed;
  top: .5rem;
  right: .2rem;
  display: flex;
  gap: 1rem;
  align-items: end;

  .horizontal-nav-scroll {
    width: 1.6rem;
    height: 0.8rem;
    background-color: #cccFca;
    border: 1px solid #ddd;

    &:hover,
    &:focus {
      background-color: #c9cacb;
      box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    }
  }
}

.spinner {
  display: none;
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  &::after {
    content: '';
    display: block;
    width: 150vmax;
    height: 150vmax;
    background-color: var(--color-grey);
    background-image: radial-gradient(circle closest-side, var(--color-dark-grey), var(--color-grey));
    border-radius: 100%;
    opacity: 0;
    animation: kf-blowup 3s infinite ease-in;
  }
}

@keyframes kf-blowup {
  0% {
    transform: scale(0);
  }

  50% {
    transform: scale(1);
    opacity: .6;
  }

  100% {
    transform: scale(0);
    opacity: 0;
  }
}


.footer {
  padding: 9rem var(--padding) 6rem;
  line-height: 1.5em;
}
.footer:before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--color-black);
  margin-bottom: 1.5rem;
}

.footer h2 {
  font-weight: 600;
  margin-bottom: .75rem;
}
.footer ul,
.footer p {
  color: var(--color-text-grey);
}
.footer p {
  max-width: 15rem;
}
.footer a:hover {
  color: var(--color-text);
}


.map {
  --w: 2;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  position: relative;
  overflow: hidden;
  background: var(--color-black);
}
.map iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.margin-s {
  margin-bottom: .75rem;
}
.margin-m {
  margin-bottom: 1.5rem;
}
.margin-l {
  margin-bottom: 3rem;
}
.margin-xl {
  margin-bottom: 4.5rem;
}
.margin-xxl {
  margin-bottom: 6rem;
}


@media screen and (min-width: 60rem) {
  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .grid > .column {
    grid-column: span var(--columns);
  }

}
