* { margin: 0; padding: 0; box-sizing: border-box;
  
  /* Color scheme */
  
  --textcolor: #121212;
  --bgcolor: #fff;
  --highlight: #121212;

}

@media (prefers-color-scheme: dark) {
  * {
    --textcolor: #dadada;
    --bgcolor: #141414;
    --highlight: #ffc400;
  }
}

html {font-size: 18px; scroll-behavior: smooth;}

body {
  font-family: system-ui, sans-serif;
  line-height: 1.4;
  color: var(--textcolor);
  background: var(--bgcolor);
  position: relative;
  margin: 0 auto;  /* centers the layout */
  padding: 0 4vw;
}
body > * {
  max-width: 54rem; margin-left: auto; margin-right: auto; /* remove this for a full-width layout */
}


/* ------- Sections ------- */

section {
  padding: 15rem 0 13em;
  display: none;
  top: 0;
  width: 100%;
  min-height: 40rem;
  background: var(--bgcolor);
}


section:target { /* Show section */
  display: block;
}

/* ------- Header ------- */

header {
  padding: 5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  position: absolute;
  width: 92vw;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
}
footer {
  position: absolute;
  display: flex;
  justify-content: space-between; 
  font-size: 80%; 
  padding: 0 0 1rem;
  bottom: 0;
  width: 92vw;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
}

header h1 {
  font-size: 1em;
  flex: 1; /* pushes nav to the right */
  white-space: nowrap;
  padding: 0 5vw .5em 0;
}
header h1 a {border: 0!important; color: var(--highlight); text-decoration: none;}

nav a:not(:last-of-type) {
  margin-right: 1rem;
}

/* ------- General ------- */

nav a:hover, nav a {
  text-decoration: none;
  color: var(--highlight);
  border: 0;
  cursor: pointer;
}

section a {text-decoration: underline; color: var(--highlight);}
section a:hover {text-decoration: none;}

nav a:hover, nav a.active {
  border-bottom: 1px solid;
}

section h1 {
  font-size: 1em;
  margin: 0 0 1em 0;
}

h2, h3, h4 {
  font-size: 1em;
  font-weight: 600;
  margin: 1.6em 0 .6em 0;
}

p, ul, ol, article {
  max-width: 60ch; /* Limit line-length to 60 characters */
  margin-bottom: .6em;
}

ul {
  list-style-type: none;
}

ul li::marker {
  content: "\2022   ";
}

li {
  margin-bottom: .2em;
}

ul, ol {
  padding-left: 2ch;
}

b, strong {
  font-weight: 600;
}

small {
  font-size: .85em;
}

hr {
  height: 1px;
  border: 0;
  background: currentColor;
  opacity: .1;
  margin: 1.2em 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  fill: currentColor;
}

/* ------- Images Grid ------- */

.grid {
  display: grid;
  grid-gap: 4rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* 150px = minimum image size */
  grid-auto-flow: dense;
}

.grid a {
  position: relative;
  border: 0;
}

.grid a:hover {
  transform: scale(.975);
}

.grid a img {
  top: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1.5;
}

@media only screen and (max-width: 680px) {
  body { font-size: 16px; }
  header {padding-top: 2rem;}
  section {padding-top: 11rem; min-height: 0;}
  footer {padding-bottom: 2rem;}
  main {min-height: 100vh;}
}

@media only screen and (max-width: 540px) {
  nav { width: 100%; } /* Fix for older webkit versions */
}

/* ------- Print ------- */

@media print {
  
  article, figure, img {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
