* { margin: 0; padding: 0; box-sizing: border-box;

  /* Color scheme */

  --textcolor: #ffffff;
  --bgcolor: #000000;
  --highlight: #00e681;

}

@media (prefers-color-scheme: dark) {
  * {
    --textcolor: #ffffff;
    --bgcolor: #000000;
    --highlight: #00e681;
  }
}

body {
  font-size: 18px;
  font-family: system-ui, sans-serif;
  line-height: 1.4;
  color: var(--textcolor);
  background: var(--bgcolor);
  position: relative;
  max-width: 64em;  /* remove this for a full-width layout */
  margin: 0 auto;  /* centers the layout */
}

/* --------- HEADER ----------*/
header {
  padding: 2vw 5vw 0 5vw;
  display: flex;
  flex-wrap: wrap;
  position: absolute;
  width: 100%;
  z-index: 2;
}

header h1 {
  font-size: 1.8em;
  flex: 1; /* pushes nav to the right */
  white-space: nowrap;
  padding: 0 5vw .2em 0;
}

h1:hover {
  text-decoration: underline;
}

h2 {
  font-size: 1.4em;
  flex: 1; /* pushes nav to the right */
  white-space: nowrap;
  padding: 0 5vw .2em 0;
}

nav a:not(:last-of-type) {
  margin-right: 1.5vw;
}

a {
  text-decoration: none;
  color: var(--textcolor);
}

a:hover {
  text-decoration: underline;
}

a code {
  opacity:1;
}

/* --------- SECTIONS ----------*/
section {
  padding: calc(6em + 2vw) 5vw 4vw 5vw;
  /* ! Everything below is needed ! */
  display: none;
  position: absolute;
  top: 0;
  min-height: 100vh;
  width: 100%;
  background: var(--bgcolor);
}

section:target {
    display: block;
}

section#home {
    display: block;
}
/* --------- ARTICLE ----------*/
article h2 {
  font-weight: 700;
  margin: 0 0 1em 0;
}

article time {
  margin-left: .6em;
  font-size: .8em;
  font-weight: 400;
  opacity: .7;
}

/* ------- IMAGES GRID ------- */
.grid {
  grid-gap: 1vmin;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* 150px = minimum image size */
  grid-auto-flow: dense;
  padding: 0.5em 0;
}

.grid .thumbnail {
  position: relative;
  border: 0;
  width: 100px;
  height: 100px;
  display: inline-block;
}

/* For a square ratio */
.grid .thumbnail:before {
  content: "";
  display: block;
  padding-top: 100%;
}

/* For a square ratio */
.grid img {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a .slides {display: none}
img {
  vertical-align: middle;
  padding-top: 0.5em;
}

/* Slideshow container */
.slideshow-container {
  display: none;
}

.slideshow-container {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  place-items: center;
  align-content: center;
  background: var(--bgcolor);
  border: 0;
  z-index: 3;
}
.slideshow-container .slides.fade img:before{
  content:"";
  height: 2em;
  width: 2em;
  animation: spin .8s infinite linear;
  border: 1px solid;
  border-right-color: transparent;
  border-radius: 50%;
  display: block;
  position: absolute;
  transform: translateX(-50%);
  opacity: .25;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.slideshow-container .slides.fade img{
  max-height: 100vh;
  z-index: 4;
}

.slideshow-container .slides.fade .text{
  left: 0;
}

/* Next & previous buttons */
.prev {
  cursor: pointer;
  position: absolute;
  top: 50%;
  left: 0;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  display: none;
}

/* Position the "next button" to the right */
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  user-select: none;
  display: none;
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.slideshow-container .slides.fade .text:hover{
  background-color: rgba(0,0,0,0.8);
}

/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

/* close button */
.close {
  color: #f2f2f2;
  font-size: 20px;
  padding: 8px 12px;
  position: absolute;
  right: 0;
  top: 0;
  padding-top: 0.5em;
  display: none;
}

.prev:hover, .next:hover, .close:hover {
  text-decoration: none;
  background-color: rgba(0,0,0,0.8);
}


/* Fading animation */
.fade {
  -webkit-animation-name: fade;
  -webkit-animation-duration: 1.5s;
  animation-name: fade;
  animation-duration: 1.5s;
}

@-webkit-keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/* On smaller screens, decrease text size */
@media only screen and (max-width: 600px) {
  .prev, .next,.text {font-size: 11px}
  .slideshow-container .slides.fade img{
    max-width: 50vh;
  }
}

