html {
  scroll-behavior: smooth;
}

* {
  padding: 0;
  margin: 0;
}

:root {
  --dark: black;
  --bright: cornsilk;
}

a {
  color: inherit;
}

@font-face {
  font-family: "Inter var experimental";
  font-weight: 100 900;
  font-display: swap;
  font-style: oblique 0deg 10deg;
  src: url("Inter.var.woff2") format("woff2");
}

footer {
  min-height: 30vh;
  display: grid;
}

footer a {
  display: block;
  padding: 1em;
}

body {
  font-family: "Inter var experimental";
  background: var(--dark);
  color: var(--bright);
}

header > h1 {
  font-size: 1.5em;
  line-height: 1.3;
  padding: 1rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
}

nav > a {
  display: flex;
  padding: 1em;
  text-decoration: none;
}

nav.events {
  display: flex;
  flex-direction: column;
}

nav.events > a {
  font-weight: 800;
  border: 1px solid;
  margin: 3px;
  margin-bottom: 0;
  transition: background-color 2s ease, color 2s ease;
  padding: 0;
  display: grid;
  grid-template-areas:
    "time location"
    "title title";
  grid-template-columns: 2fr 1fr;
  border-top: 1px solid;
}

nav.events > a:hover {
  background: var(--bright);
  color: var(--dark);
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav.events > a:last-child {
  min-height: 50vh;
}
nav.events ul.tags > li,
nav.events > a time,
nav.events > a h3 {
  font-size: 0.7em;
  padding: 0.5rem 1rem;
  display: flex;
}

nav.events > a > time {
  background: var(--bright);
  color: var(--dark);
}

nav.events > a.over > time {
  background: var(--dark);
  color: var(--bright);
}

nav.events > a > time {
  border-right: 1px dotted;
}

nav.events > a > h3 {
  grid-area: location;
  font-weight: inherit;
}

nav.events > a > * {
  padding: 1rem;
}

header {
  min-height: 30vh;
  display: flex;
  justify-content: space-between;
}

header a {
  text-decoration: none;
  display: flex;
  padding: 1em 2em 1em 1em;
}

nav.events > a.over:not(.today) {
  background: var(--bright);
  color: var(--dark);
  font-weight: 100;
}

nav.events > a {
  position: relative;
  z-index: 0;
  overflow: hidden;
}

/*
body:after {
  content: "";
  display: inline-block;
  left: 50%;
  width: 50%;
  right: 0;
  bottom: 0;
  height: 100%;
  background-color: lightblue;
  mix-blend-mode: multiply;
  position: fixed;
  pointer-events: none;
  z-index: 9999999;
}
*/

nav.events > a:before {
  content: " ";
  display: inline-block;
  background: white;
  /*  background-image: linear-gradient(90deg, #0000ee, white);*/
  position: absolute;
  z-index: -1;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  height: 100%;
  width: 100%;
  animation: flow 1.5s linear 0s both infinite;
  animation-play-state: paused;
  transform-origin: 0 0;
}

@keyframes flow {
  0% {
    transform: translateY(0) scaleY(0);
  }
  30% {
    transform: translateY(0) scaleY(1);
  }
  60% {
    transform: translateY(0) scaleY(1);
  }
  100% {
    transform: translateY(100%) scaleY(0);
  }
}

nav.events > a:hover ~ a:before,
nav.events > a:hover:before {
  animation-play-state: initial;
}

/*
nav.events > a.over:not(.today):hover {
  background: var(--dark);
  color: var(--bright);
}
*/

nav.events > a.today {
  z-index: 99999;
  font-weight: 800;
  border-top: 3px solid;
  border-bottom: 3px solid;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  bottom: 0;
  background: var(--bright);
  color: var(--dark);
}

article time {
  padding: 1em;
  display: block;
}

article h2 {
  padding: 1em;
}
article h3 {
  font-size: 1em;
  padding: 1em;
}
article ul {
  padding: 2em 0;
}
article ul > li {
  padding: 0 1em 1em 1em;
  display: flex;
  align-items: flex-start;
}
article ul > li:before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  margin-top: 0.5em;
  background: currentColor;
  border-radius: 100%;
  margin-right: 1em;
}
article img {
  max-width: 50ch;
}

article li,
article p {
  padding: 1em;
  line-height: 1.4;
  max-width: 70ch;
  hyphens: auto;
}
article blockquote {
  font-style: italic;
  border: 2px solid;
}

nav.events > a > h2 {
  grid-area: title;
  border-top: 1px dotted;
  font-weight: inherit;
}

nav.events ul.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  grid-area: tags;
  padding: 0;
}

nav.events ul.tags > li {
  display: flex;
  align-self: flex-start;
  border-radius: 2px;
  padding: 0.5rem 1rem;
  margin: 0;
}

@keyframes slidein {
  from {
    max-height: 0vh;
  }
  to {
    max-height: 50vh;
  }
}

@media (min-width: 50em) {
  footer,
  article {
    display: grid;
    grid-template-areas: "sidebar content";
    grid-template-columns: 22em 4fr;
  }

  header > h1 {
    font-size: 2em;
    line-height: 1;
    padding: 3rem;
    min-height: 20vh;
  }

  footer aside {
    border-right: 1px dotted;
  }

  article {
    min-height: 90vh;
    border-top: 1px solid;
    padding: 0;
  }

  article h1 {
    font-size: 5em;
    padding: 3rem;
  }
  article > section {
    grid-area: content;
    border-left: 1px dotted;
  }

  article > section {
    padding-bottom: 30vh;
  }

  article > aside {
    grid-area: sidebar;
    border-left: 1px solid;
  }
  article > aside > div {
    position: sticky;
    top: 0;
  }

  article > aside > div > * {
    padding: 1em;
    display: block;
  }

  article > aside > div > h3 {
    font-weight: 400;
    border-top: 1px dotted;
    grid-column: 1;
    grid-row: 2;
  }

  article li,
  article p {
    padding: 0.5em 2em;
    line-height: 1.5;
    max-width: 70ch;
    font-size: 1.8em;
  }

  nav.events > a {
    border-left: 1px solid;
    border-right: 1px solid;
    margin: 0;
    border-bottom: none;
    padding: 0;
    grid-template-areas:
      "time title"
      "location title";
    grid-template-rows: auto 1fr;
    grid-template-columns: 22em 4fr;
    border-top: 1px solid;
  }

  nav.events > a h3 {
    border-top: 1px dotted;
  }

  nav.events > a > time,
  nav.events > a > h3 {
    font-size: 1em;
    padding: 1.5rem;
  }

  nav.events > a > time {
    border-right: none;
  }

  nav.events > a > h2 {
    border-bottom: 1px dotted;
  }

  nav.events > a:after {
    background: currentColor;
    display: inline-block;
    height: 2px;
    width: 37%;
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
  }

  nav.events > a > h2 {
    border: none;
    border-right: 1px dotted;
    border-left: 1px dotted;
    font-size: 3em;
    line-height: 1;
  }

  nav.events > a.today h2 {
    font-size: 5em;
  }
}
/*
nav.events > a > h2:after {
  content: "";
  height: 1em;
  border-right: 2px solid;
  animation: blink 0.3s ease 0s both infinite;
}
@keyframes blink {
  to {
    opacity: 0;
  }
}
*/

nav.events > a > h2:after {
  content: "";
  position: absolute;
  left: 10%;
  bottom: 0px;
  height: 1px;
  width: 15rem;
  display: inline-block;
  background: currentColor;
}
