@import url('https://fonts.googleapis.com/css2?family=Lato:wght@700&family=Montserrat:wght@300&display=swap');

* {
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

:root {
  --grid-width: max(200px,min(20vw,400px));
  --grid-height: max(125px,min(12.5vw,250px));
}

html, body {
  display: flex;
  flex-direction: column;

  height: 100%;
  width: 100%;
  min-width: 500px;

  background: #222228;
  color: #E8E8EA;

  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.3;
}

header {
  flex-grow: 1;
  height: 320px;

  text-align: center;
}

  header img {
    height: 100%;
  }

footer {
  line-height: 3;
  text-align: center;
}

ul {
  list-style: none;
  display: grid;
  flex-grow: 2;

  grid: auto-flow dense var(--grid-height) / repeat(auto-fill, var(--grid-width));
  justify-content: center;
  gap: 10px;

  width: 1800px;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 2em;
}

li {
  list-style: none;
  position: relative;
}

a {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  color: inherit;
  text-decoration: none;

  border-radius: 5px;
  background:rgba(255,255,255,.05);
  background-size: cover;
  background-position: 50% 30%;

  transition: box-shadow 0.25s;
  box-shadow:
    1px 4px 3px -1px #00000044;
}

a:hover {
  box-shadow:
    1px 4px 3px -1px #00000000,
    0 2px 0 0 #EAA,
    0 -2px 0 0 #EAA,
    inset 0 -5px 1px -3px #EAA,
    inset 0 5px 1px -3px #EAA;
}

  a > .label {
    position: absolute;
    background: black;
    bottom: 5px;
    left: 5px;
    padding: 5px;
  }

  a > time {
    position: absolute;
    bottom: 5px;
    right: 5px;
    padding: 5px;
    background: #33333B;
  }

a[href="snowflakes"] {
  background-image: url(images/snowflakes_zoom.jpg);
}

a[href="cards"] {
  background-image: url(images/cards.jpg);
}

a[href="hexshirt"] {
  background-image: url(images/shirts.jpg);
}

a[href="sweep"] {
  background-image: url(images/sweep.png);
  background-position: 50% 50%;
}

a[href$="backgrounds"] {
  background-image: url(https://markegli.com/blog/media/sx2-004.png);
}

a[href$="genuary"] {
  background-image: url(images/trees.png);
}

a[href="pi"] {
  background-image: url(images/pi_build.jpg);
}

a[href$="poetry"] {
  background-image: url(images/poet_censored.jpg);
}

#sweep {
  grid-column-start: span 2;
  grid-column-end: -1;
  grid-row-end: span 2;
}
