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

/* Layout */

html {
  height: 100%;
}

body {
  font: 14px "Roboto Mono", monospace;
  color: #333;
  width: 100%;
  word-wrap: break-word;
  height: 100%;
  display: grid;
  grid-template:
    "logo container" 6em
    "menu container" auto
    ". container" auto "links container" 3em / 6em auto;
  grid-gap: 1.5em;
  padding: 1em;
  overflow: hidden;
}


#logo {
  grid-area: logo;
  background: url("/images/logo.png") no-repeat center center;
  background-size: cover;
  width: 5em;
  height: 5em;
  margin: 1em;
  text-indent: -5000px;
}

#menu {
  width: 100%;
  grid-area: menu;
  display: grid;
  grid-template: repeat(auto-fill, 1.15em)/ auto;
  grid-gap: 1em;
  padding-left: 1em;
  justify-items: left;
  align-items: center;

}

.menuItem {
  position: relative;
}


#container {
  height: 100%;
  grid-area: container;
  width: 100%;
  border: 1px #333 solid;
  overflow: auto;
}

#main {
  position: relative;
  min-height: 100%;
  max-width: 700px;
  margin: 1.5em 1.5em 3em 1.5em;
}

#links {
  grid-area: links;

}




/* Timeline */

#timelineContainer {
  position: relative;
  display: grid;
  width: calc(100%-3em);
  grid-template:
    "timelineTop ." auto "timelineDates timeline" auto "timelineDates . " auto / 4em auto;
  row-gap: 0;
  margin: 0em 1.5em;
}

#timelineFilter {
  margin-top:1em;
  grid-row: 1;
  grid-column: 1 / span 2;
  border: 1px solid #333;
  padding: 1em;
  background: white;
  width: min(100%,35.5em);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6em, 3fr));
  grid-auto-flow: row;
  grid-gap: 0.4em;
  text-align: center;
  //justify-items: center;
  justify-self: end;
  z-index: 3;
}

#timelineFilterShadow {
  
  width: min(100%,35.5em);
  grid-row: 1;
  grid-column: 1 / span 2 ;
  border-radius: 0px 1em;
  background: repeating-linear-gradient(45deg, black, black 1px, transparent 1px, transparent 3px);
  z-index: 2;
  justify-self: end;
  margin: 1em -0.5em -0.5em 0;
}


.tag {
  padding: 0.2em 0.5em;
  border-radius: 1em;

}

.tagFilter {
  line-height: 1em;
  padding: 0.2em 0.5em;
  border-radius: 1em;
  border: 1px solid transparent;
  cursor: pointer;
}

.filterTag:hover {

  border: 1px solid #333;

}

#timelineTop {
  grid-area: timelineTop;
  border-right: 3px solid #333;
  width: 3em;
  min-height: 100%;
  
}

#timeline {
  grid-area: timeline;
  display: grid;
  grid-auto-columns: min(4vw, 1.5em);
  row-gap: 0;
  column-gap: min(4vw, 1.5em);
  grid-auto-flow: dense;
  padding-bottom: 2em;
  padding-right: 2em;
  padding-top:3em;
}



#timelineDates {
  grid-area: timelineDates;
  border-right: 3px solid #333;
  width: 3em;
  display: grid;
  grid-auto-columns: repeat(2, 4em);
  row-gap: 0;
  grid-auto-flow: dense;
  min-height: 100%;
  padding-top:3em;
  padding-bottom: 2em;

}

.timelineDatesYear {
  color: #999;
  grid-row-start: span 12;
  border-bottom: 1px solid #333;
  text-align: left;
  line-height: 1.25em;
  font-size: smaller;
  align-self: end;
}

.timelineItem {
  --angle: 135deg;
  border: 0px solid #999;
  width: 100%;
  height: 100%;
  border-radius: min(2vw, 1.5em);
  animation: backgroundScroll 20s linear infinite;
  cursor: pointer;
  background-size: 200% 200%;
  // padding: 0.5em 0;
}


@media (hover: hover) {
  .timelineItem:hover {
    border: 1px solid #333 !important;
  }
}

.modal {

  position: absolute;

  display: none;
  width: calc(100% + 3em);
  height: calc(100% + 3em);
  background: transparent;
  z-index: 2;
  margin-left: -1.5em;
  margin-top: -1.5em;
  //backdrop-filter: blur(1px);
  //animation: fadeInFromNone 0.5s ease-out, fadeOutToNone 0.5s ease-out;
}

.modalInner {
  border-radius: 0px 1em;
  width: min(95%, 40em);
  position: absolute;
  left: 50%;
  padding: 0 0.5em 0.5em 0;
  transform: translateX(-50%);
  background: repeating-linear-gradient(45deg, black, black 1px, transparent 1px, transparent 3px);
  z-index: 3;
}

.modalContent {

  border: 1px solid #333;
  width: 100%;
  padding: 1em;
  background: white;

}

.modalClose {
  padding-top: 2em;
  cursor: pointer;
  display: block;
  text-align: center;
  font-weight: bold;
}

.pointerLine {
  opacity: 0;
  display: none;
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #333;
  stroke-width: 1;
  //animation: fadeInFromNone 0.5s ease-out, fadeOutToNone 0.5s ease-out;
}

.tags {
  padding: 1.5em 0;
  display: grid;
  grid-template-columns: repeat(6, auto);
  grid-gap: 0.4em;
  align-items: end;
  align-self: middle;
  text-align: center;

}


/* Projects */

#projectGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 1vmin);
  grid-auto-columns: 1vmin;
  grid-auto-rows: 1vmin;
  grid-gap: 1vmin;
  grid-auto-flow: dense;
  min-height: 100%;

}

.projectItem {
  border: 1px solid #999;

  width: 100%;
  height: 100%;
}

.projectInfo {
  background-size: cover !important;
  text-align: center;
  width: 100%;
  height: 100%;

}

/* Scrollbar */

::-webkit-scrollbar,
-moz-scrollbar {
  width: 2px;
  height: 2px;
}

::-webkit-scrollbar-track,
-moz-scrollbar-track {
  background: transparent;
  border-right: 2px white solid;
  border-bottom: 2px white solid;
}

::-webkit-scrollbar-thumb,
-moz-scrollbar-thumb {
  background: transparent;
  border-right: 2px #333 solid;
  border-bottom: 2px #333 solid;
  //border-radius: 5px 0 0 5px;

}

::-webkit-scrollbar-button,
-moz-scrollbar-button {
  display: none;
}



/* Content */


h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 1em;
  margin: 1.25em 0 1.25em 0;
  line-height: 1;
  color: #333;
}

h1 {
  margin: 0 0 1.25em 0;
}



date {
  padding-right: 1em;
  color: #999;
}

a {
  color: #999;
  text-decoration: none;
}

a:focus,
a:active {
  color: #666;
}

a:hover {
  /*  needed for firefox to have a valid output */
  --angle: 45deg;
  /**/
  background: repeating-linear-gradient(90deg in oklab, #ff5555, #ff88bb, #8855cc, #22aaff, #22ccdd, #44aa44, #ffee00, #ffaa22, #ff5555);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: backgroundScroll90 10s linear infinite;
  background-size: 200% 100%;
}

#projectGrid a:hover {
  background: unset;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}



#menu a,
#timelineFilter a {
  color: #333;
  text-decoration: none;
  border-bottom: none;
}

#menu a.active {
  font-weight: bold;
}

#menu a:hover,
#timelineFilter a {
  background: unset;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #333;
}

#menu a:before {
  content: "";
  position: absolute;
  left: -15px;
}

#menu a:hover:before {
  
  position: absolute;
  left: -15px;
  bottom: 1px;
  background: unset;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #333;
}

#menu a.active::before,
#menu a.ancestor::before {

  content: "\25b6 \0020";
  position: absolute;
  left: -15px;
  bottom: 1px;
}

p {
  margin: 1em 0;
  line-height: 1.5;

}


img {
  max-width: 100%;
  display: block;
  margin: 0 auto 3em auto;
}

figcaption {
  margin-top:-3em;
  text-align:right;
  font-size:smaller;
  color: #999;
}

blockquote {
  padding-left: 1em;
  font-style: italic;
  border-left: solid 2px;
  border-image: linear-gradient(180deg, #ef5350, #f48fb1, #7e57c2, #2196f3, #26c6da, #43a047, #eeff41, #f9a825, #ff5722) 1;
}


/* Animation */

@keyframes backgroundScroll {

  0% {
    background-position: 0% 0%
  }

  100% {
    background-position: 0% 100%
  }

}

@keyframes backgroundScroll90 {

  0% {
    background-position: 0% 0%
  }

  100% {
    background-position: 200% 0%
  }

}


@keyframes fadeInFromNone {
  0% {
    display: none;
    opacity: 0;
  }

  0.001% {
    display: block;
    opacity: 0;
  }

  100% {
    display: block;
    opacity: 1;
  }
}

@keyframes fadeOutToNone {
  0% {
    display: block;
    opacity: 1;
  }

  0.001% {
    display: none;
    opacity: 0;
  }

  100% {
    display: none;
    opacity: 0;
  }
}

@media (orientation: portrait) and (max-width: 768px) {

  body {
    grid-template:
      "logo menu links" 6em
      "container container  container" auto / 6em auto 2em;
  }

  #menu {
    grid-template: 5em / repeat(auto-fill, 6em);
    grid-gap: 0em;
    justify-items: bottom;
    align-items: end;
    align-self: end;
    text-align: center;
  }

  .tag.filter {}

  #timelineFilter {}

  #timelineFilterShadow {}

}