*, *:before, *:after {
  box-sizing: border-box;
}

:root {
  --bg: white;
  --text: black;
  --link: blue;
  --highlight: #7f1909;
}

::selection {
  color: var(--bg);
  background: var(--text);
}

html {
  font-family: 'Telegraf', 'Work Sans', sans-serif;
  scroll-behavior: smooth;
  height: 100%;
  background: var(--bg);
  color: var(--text);
}

h1 {
  color: var(--text);
  font-family: 'Migra', 'Bagerich', 'Playfair Display', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 6.5rem;
  line-height: 0.9em;
  margin-bottom: 0.15em;
}

h2 {
  color: var(--text);
  font-family: 'Migra', 'Gilda Display', 'Times New Roman', display;
  font-weight: 300;
  font-size: 3.5rem;
  display: inline-block;
}

h3 {
  /* font-family: share tech mono, monospace;
  text-decoration: overline */
  font-family: 'Agrandir', 'Work Sans', sans-serif;
  font-weight: 900;
  font-size: 4rem;
}

h4 {
  font-family: 'Migra', 'Gilda Display', 'Times New Roman', display;
  font-weight: 300;
  font-size: 2.5rem;
}

.text-heading {
  margin-top: 2.4rem;
  margin-bottom: 1.2rem;
}

.filter h4, .skill-filter h4, #photo-label h5, .text-subheading {
  font-family: 'Agrandir', 'Work Sans', sans-serif;
  font-size: 1.3em;
  font-weight: bold;
  margin-right: .5em
}

h5 {
  margin-bottom: 1.2rem
}

.text-subheading {
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
  margin-right: auto;
  font-size: 1.15em;
}

p {
  font-family: 'Telegraf', 'Work Sans', sans-serif;
  font-size: 1.2em;
  line-height: 1.5;
  margin-bottom: 1.2em;
}

strong {
  font-weight: bold;
}

em {
  font-style: italic;
}

.hidden {
  display: none;
}

.mobile-only {
  display: none;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: 0.2s linear;
  position: relative;
}

a:hover {
  cursor: pointer;
  transition: 0.2s linear;
}

#recents {
  background: var(--text);
  color: var(--bg);
  min-height: auto;
  margin: 0;
  margin-top: 10vh;
  margin-bottom: -10vh;
  padding-left: 10vw;
  padding-right: 10vw;
  padding-bottom: 10vh;
}

#recents a {
  color: var(--bg);
}

#recents h5 {
  margin-bottom: calc(10vh - 15px);
  font-weight: bold;
  text-align: center;
}

.recent-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  grid-gap: 15px;
  max-width: 90vw;
}

.scroll-progress {
  position: absolute;
  height: 5px;
  left: 0px;
  bottom: -5px;
  width: 0px;
  background: var(--text);
  z-index: -1;
}

.blog-tiles {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  grid-gap: 15px;
}

.blog-post {
  display: block;
  width: 100%;
  border: 1px solid var(--text);
  overflow: hidden;
  padding: 8%;
  transition: 0.1s linear;
  margin-bottom: 15px;
  position: relative;
  overflow: visible;
  max-width: 90vw;
}

.blog-post:hover {
  cursor: pointer;
  transition: 0.1s linear;
  border: 1px solid var(--bg);
}

.blog-post:focus {
  outline: none;
  border: 1px solid var(--bg);
}

.blog-post img {
  width: 100%;
  margin-bottom: 1.2rem;
}

.blog-post h4 {
  margin-bottom: 1rem;
}

.blog-post p {
  margin-bottom: 0;
}

.blog-post .tags {
  margin: 0;
  margin-top: 1.2rem;
}

.new::after {
  content: 'New';
  position: absolute;
  top: -1px;
  right: -1px;
  padding: 5px 15px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--text);
}

.hero-img {
  width: 100%;
  max-height: 65vh;
  overflow: hidden;
  margin-bottom: 1.2rem;
}

.hero-img img {
  width: 100%;
}

.img-right {
  float: right;
  width: 35vw;
  margin-left: 5%;
}

.img-left {
  float: left;
  width: 35vw;
  margin-right: 5%;
}

.img-bordered {
  border: 1px solid var(--text);
}

.inline-img {
  font-size: 0.87em;
  margin-top: 1.2em;
}

.inline-img img {
  width: 100%;
  margin-bottom: 1.2em;
}

.author {
  display: block;
}

.text-code {
  background: var(--bg);
  border: 1px solid var(--text);
  color: var(--text);
  page-break-inside: avoid;
  margin-top: 1.75em;
  margin-bottom: 1.44em;
  margin-right: 10%;
  padding-right: 10%;
  line-height: 2;
  overflow: auto;
  word-wrap: break-word;
  display: block;
}

code {
  font-family: 'Fraktion Mono', 'Space Mono', monospace;
  font-size: 1.2rem;
  font-variant-ligatures: none;
}

pre code {
  border-bottom: 1px solid #88888850;
  padding-bottom: 0.3rem;
}

.switch {
  /* text-shadow:
    -2px -2px white,
    -2px 2px white,
    2px -2px white,
    2px 2px white; */
  box-shadow:
    inset 0 -0.175em var(--bg),
    inset 0 -0.2em var(--text);
  display: inline;
  margin-left: -0.08em;
  border-right: .05em solid var(--text);
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  50% {
    border-color: transparent;
  }
}

header {
  width: 100vw;
  height: 60px;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--text);
  z-index: 100;
  display: grid;
}

.backtotop {
  /* font-family: share tech mono, monospace; */
  font-family: 'Telegraf', 'Work Sans', sans-serif;
  padding: 20px 10vw;
}

nav {
  display: grid;
  justify-content: flex-end;
  text-align: right;
  position: fixed;
  right: 0px;
  transition: 0.2s linear;
  background: var(--bg);
  /* border-left: 5px solid white; */
  border-left: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
}

nav ul {
  display: grid;
  align-items: center;
  /* height: calc(100vh - 56px); */
  height: calc(100 * var(vh));
  width: 50px;
}

nav ul li {
  height: 100%;
  display: grid;
  align-items: center;
  justify-content: center;
  /* border-left: 2px solid #00000000; */
  /* border-left: 0px solid #00000000; */
  /* border-bottom: 2px solid #00000000; */
  transition: 0.2s linear;
}

nav a {
  padding: 35% 5px;
  fill: var(--text);
  /* border-left: 2px solid #00000000; */
  transition: 0.2s linear;
  font-size: 30px;
}

.darkmode {
  background: var(--text);
  color: var(--bg);
  fill: var(--bg);
  display: grid;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--text);
  position: absolute;
  right: 5px;
  bottom: -60px;
}

.darkmode:hover {
  cursor: pointer;
}

.darkmode.active {
  background: var(--text);
  color: var(--bg);
}

.ext {
  color: grey;
  fill: grey;
}

.ext:before {
  background: grey;
  left: -3px;
  width: 3px;
  top: unset;
  bottom: -1px;
  height: calc(100% + 1px);
}

.ext:hover:before {
  width: 6px;
}

nav ul li {
  position: relative;
}

nav a:hover {
  /* border-left: 2px solid black; */
  /* border-left: 0px solid black; */
  /* border-bottom: 2px solid black; */
  transition: 0.1s ease-in;
  /* background: #bdbdbd;
  color: #474747; */
  /* box-shadow: inset 2px 0px 10px -6px; */
}

nav a:before {
  content: "";
  display: inline-block;
  position: absolute;
  left: 0px;
  top: 0;
  width: 0px;
  height: 100%;
  transition: 0.1s ease-in;
  background: var(--text);
}

nav a:after {
  content: attr(data-dest);
  position: absolute;
  right: 50px;
  font-size: 0.5em;
  top: calc(50% - 0.5em - 8px);
  border: 1px solid var(--text);
  padding: 8px;
  transition: 0.1s linear;
  opacity: 0;
  background: var(--bg);
  pointer-events: none;
}

nav a:hover:before {
  width: 3px;
}

nav a:hover:after {
  right: 63px;
  transition: 0.1s linear;
  opacity: 1;
}

nav a.active {
  /* border-left: 2px solid black; */
  color: var(--bg);
  fill: var(--bg);
  background: var(--text);
  transition: 0.2s linear;
}

nav a.active:before {
  background: var(--bg);
}

nav a.active:after {
  color: var(--text);
}

section {
  margin: 0 10vw;
  padding-top: 10vh;
}

section:not(#top):not(#landing) {
  min-height: 100vh;
}

#landing {
  padding-top: 0;
  min-height: calc(100vh - 120px);
  display: grid;
  justify-content: center;
  align-items: center
}

.vertical-landing {
  margin-bottom: 90px
}

#content {
  padding-top: 0px;
}

#code {
  min-height: 100vh;
}

.main {
  padding-top: 100px;
}

section h3 {
  margin-bottom: 4vh;
}

#top {
  height: 120px;
}

#top a {
  color: var(--bg);
  transition: 0s linear;
}

.intro {
  color: var(--text);
}

.outlinks {
  margin-top: 7px;
  min-height: 17vh;
  max-height: 17vh;
  display: grid;
  position: relative;
}

.outlinks ul {
  position: absolute;
  top: 10px;
  left: 0;
  display: flex;
}

.outlinks li {
  display: grid;
  margin-right: 15px;
  min-width: 45px;
  min-height: 45px;
  max-width: 45px;
  max-height: 45px;
}

.outlinks a {
  display: grid;
  position: relative;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  margin-right: 25px;
  margin-top: 2px;
  padding: 10px;
  min-width: 45px;
  min-height: 45px;
  max-width: 45px;
  max-height: 45px;
}

.outlinks a svg {
  fill: var(--text);
  transition: 0.2s linear;
  transition-property: all;
  transition-duration: 0.2s;
  transition-timing-function: linear;
  transition-delay: 0s;
}

.outlinks a:after {
  content: '';
  position: absolute;
  background: var(--text);
  bottom: 0px;
  left: 0px;
  width: 100%;
  height: 0px;
  transition: 0.1s linear;
}

.outlinks a:hover:after {
  height: 3px;
  transition: 0.1s linear;
}

.outlinks a:active {
  color: var(--bg);
}

.outlinks a:active svg {
  filter: invert();
}

.outlinks a:active:after {
  height: 100%;
  z-index: -1;
  transition: 0.1s linear;
}

.copy {
  padding-top: 0;
}

.menu-btn {
  display: none;
}

.text-link {
  position: relative;
  display: inline-block;
  color: var(--link);
  transition: 0.1s ease-in;
}

.text-link:before {
  content: "";
  display: inline-block;
  position: absolute;
  z-index: -1;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0px;
  transition: 0.1s linear;
  background: var(--text);
}

.text-link:hover:before {
  height: 3px;
  transition: 0.1s linear;
}

.text-link:active {
  color: var(--bg);
}

.text-link:active:before {
  height: 100%;
}

.portfolio {
  margin-top: 5vh;
  padding-bottom: 5vh;
}

.portfolio.projects, .portfolio.experimental {
  margin-top: 0;
}

.portfolio li {
  width: 100%;
  margin-bottom: 2rem;
}

.portfolio .card {
  display: grid;
  grid-template-columns: 3fr 10% 7fr;
  grid-template-rows: 1fr;
  justify-content: center;
  align-items: center;
  width: 80vw;
}

.portfolio .divider {
  height: 80%;
  width: 50%;
  margin: 0;
  margin-left: 50%;
  border: none;
  border-left: 1px solid var(--text);
}

.card-container h4 {
  margin: 0.9rem 0;
}

.portfolio img {
  width: 100%;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.44em;
}

.tag {
  position: relative;
  border: 1px solid var(--text);
  padding: 0.5em;
  margin: 0.2em;
  transition: 0.1s linear;
}

.tag:after {
  content: '';
  position: absolute;
  background: var(--text);
  opacity: 1;
  z-index: -1;
  bottom: 0px;
  left: 0px;
  width: 100%;
  height: 0px;
  transition: none;
}

.tag:before {
  content: '';
  position: absolute;
  background: var(--text);
  opacity: 0;
  z-index: -1;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 0px;
  transition: none;
}

.tag:hover {
  cursor: pointer;
  transition: 0.1s linear;
}

.tag:not(.active):hover:after {
  height: 3px;
  opacity: 1;
  transition: 0.1s linear;
}

.tag:not(.active):hover:before {
  height: 100%;
  opacity: 0;
  transition: none;
}

.tag:active {
  color: var(--bg);
  transition: 0.1s linear;
}

.tag:not(.active):active:after {
  height: 100%;
  opacity: 1;
  transition: 0.1s linear;
}

.tag:not(.active):active:before {
  height: 100%;
  opacity: 0;
  transition: none;
}

.tag.active {
  color: var(--bg)
}

.tag.active:after {
  height: 0px;
  opacity: 0;
  transition: none;
}

.tag.active:before {
  height: 100%;
  opacity: 1;
  transition: none;
}

.tag.active:hover:after {
  height: 0px;
  opacity: 0;
  transition: none;
}

.tag.active:hover:before {
  height: calc(100% - 3px);
  opacity: 1;
  transition: 0.1s linear;
  transition-property: height;
}

.tag.active:active {
  color: var(--text);
}

.tag.active:active:after {
  height: 0px;
  opacity: 1;
  transition: none;
}

.tag.active:active:before {
  height: 0px;
  opacity: 1;
  transition: 0.1s linear;
}

.gallery {
  position: relative;
  margin-top: 6vh;
  margin-bottom: 1.2rem;
  height: 77vh;
  overflow: hidden;
}

.gallery-ctrl {
  position: absolute;
  height: 100%;
  width: 8%;
  background: #00000000;
  transition: 0.2s linear;
  display: grid;
  justify-content: center;
  align-items: center;
}

.gallery-ctrl:hover {
  cursor: pointer;
  background: #00000070;
  transition: 0.2s linear;
}

.gallery-ctrl i {
  color: white;
}

.gallery-prev {
  left: 0;
}

.gallery-next {
  right: 0;
}

.gallery-slider {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  transition: transform 0.1s linear;
}

.img-container {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  justify-content: center;
  align-items: center;
  will-change: transform;
  transition: 0.2s ease-in;
}

.img-container.right {
  transform: translate3d(100%,0,0);
}

.img-container.center {
  transform: translate3d(0,0,0);
}

.img-container.left {
  transform: translate3d(-100%,0,0);
}

.img-container img {
  width: 100%;
  min-height: 100%;
  object-fit: cover;
}

#photo-label h5 {
  margin-bottom: 0;
}

.design-el {
  margin-top: 4vh;
  margin-bottom: calc(4vh + 1.2em);
  max-height: 80vh;
  max-width: 100%;
}

svg.design-el {
  fill: var(--text);
}

.subd-spacer {
  height: 3.5vh;
}

iframe {
  margin-bottom: calc(4vh + 1.2em);
}

.slider {
  margin-top: 1em;
  margin-bottom: 2em;
  position: relative;
  width: 100%;
  height: 25px;
  border: 1px solid var(--text);
}

.drag-me {
  position: absolute;
  left: 40px;
  height: 100%;
  display: grid;
  align-items: center;
  color: var(--text);
}

.drag-me.cover {
  background: var(--bg);
  color: var(--bg);
  overflow: hidden;
  width: 0px;
}

.slider .button {
  width: 23px;
  height: 23px;
  background: var(--text);
}

.slider .button:hover {
  cursor: grab;
}

.skill-filter-select {
  display: none;
}

.skills-list {
  margin-top: 3vh;
  /* display: grid;
  grid-template-columns: 6fr 4fr 6fr 4fr;
  grid-gap: 20px;
  justify-content: center;
  align-items: center; */
}

.skill-category {
  display: grid;
  grid-template-columns: 1fr;
  align-content: flex-start;
  width: 100%;
  margin-top: 3vh;
  margin-bottom: calc(1.2rem + 20px);
  position: relative;
  padding-top: 4.5rem;
}

.skill-category h4 {
  position: absolute;
  top: 0;
  width: 100%;
}

.skill-category .grid-label {
  position: absolute;
  top: 3rem;
  width: 80%;
  right: 0;
  display: flex;
  justify-content: space-between;
}

.start-year:not(.dragging) {
  transition: 0.1s linear;
}

.start-year:hover {
  cursor: grab;
}

.grid-label-reset {
  padding: 0 15px;
}

.grid-label-reset:hover {
  cursor: pointer;
  text-decoration: underline;
}

.grid-label-line {
  position: absolute;
  right: -6px;
  width: 1px;
  z-index: 4;
  backdrop-filter: invert();
}

.skill {
  display: grid;
  grid-template-columns: 2fr 8fr;
  grid-template-rows: 1fr;
  width: 100%;
  padding-bottom: 0;
  margin-right: 15%;
  border-bottom: 1px solid var(--text);
  position: relative;
  overflow: hidden;
}

.skill label {
  padding: 15px 0;
}

.skill-length {
  position: absolute;
  display: block;
  height: 100%;
  display: grid;
  justify-content: left;
  align-items: center;
  right: 15px;
  min-width: 100px;
  text-align: left;
}

.over+.skill-length {
  color: var(--bg);
  right: auto;
  left: calc(20% + 15px);
}

.working {
  color: var(--highlight);
  border-color: var(--highlight);
}

progress {
  /* Reset the default appearance */
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 2px 0;
  transition: 0.2s linear;
}

progress::-webkit-progress-bar {
  background-color: var(--bg);
  border: 1px solid var(--text);
  transition: 0.2s linear;
}

.working progress::-webkit-progress-bar {
  background-color: var(--bg);
  border: 1px solid var(--highlight);
  transition: 0.2s linear;
}

progress[value]::-webkit-progress-value {
  background-color: var(--text);
  transition: 0.2s linear;
}

.working progress[value]::-webkit-progress-value {
  background-color: var(--highlight);
  transition: 0.2s linear;
}

footer {
  padding: 5% 10vw;
  margin-top: 10vh;
  border-top: 1px solid var(--text);
}

footer h4 {
  padding-bottom: 1.2rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 1000px) {
  html {
    font-size: 12px;
  }

  h1 {
    font-size: 5rem;
  }

  h2 {
    font-size: 3rem;
  }

  h3 {
    font-size: 2.6rem;
  }

  .mobile-only {
    display: block;
  }

  #recents {
    padding-left: 5vw;
    padding-right: 5vw;
  }
  
  #recents h5 {
    margin-bottom: calc(10vh - 8%);
  }

  header {
    height: 50px;
  }

  .backtotop {
    padding: 20px 5vw;
  }

  section {
    margin: 0 5vw;
  }

  .outlinks {
    margin-top: 2px;
  }

  .outlinks a {
    font-size: 20px;
  }

  .menu-btn {
    font-size: 30px;
    fill: var(--text);
    width: 50px;
    height: 50px;
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    justify-content: center;
    align-items: center;
    transition: 0.2s linear;
  }

  .menu-btn:hover {
    cursor: pointer;
  }

  nav {
    max-width: 50px;
    background: var(--bg);
    right: -50px;
    overflow: visible;
  }

  .portfolio .card {
    width: 90vw;
    grid-template-columns: 1fr;
    /* grid-template-rows: 4fr 1% 6fr; */
    grid-gap: 0px;
    margin: 40px 0;
  }

  .portfolio .divider {
    height: 10px;
    width: 100%;
    margin: 5px auto;
    border: none;
    border-bottom: 1px solid var(--text);
  }
  
  .tag {
    position: relative;
    border: 1px solid var(--text);
    padding: 0.5em;
    margin: 0.2em;
    transition: 0.1s linear;
  }
  
  .tag:after {
    display: none;
  }
  
  .tag:before {
    display: none;
  }

  .tag:hover {
    background: #bdbdbd;
    color: #474747;
  }

  .tag.active {
    background: var(--text);
    color: var(--bg);
  }

  .slider {
    display: none;
  }

  .skill-filter-bar {
    display: none;
  }

  .skill-filter-select {
    display: inline-block;
    padding: 5px;
    background: var(--bg);
    outline: none;
    border: 1px solid var(--text);
    color: var(--text);
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    vertical-align: baseline;
  }

  .skills-list {
    margin-top: 0;
  }

  progress {
    display: none;
  }

  .skill-category {
    margin-top: 0;
    margin-bottom: 0;
  }

  .skill-category .grid-label {
    display: none;
  }

  .skill-category h4 {
    position: relative;
    margin-bottom: 0.5rem;
  }

  .skill {
    display: grid;
    grid-template-columns: 7fr 3fr;
    width: 100%;
  }

  .skill-length {
    position: relative;
    right: 0px;
  }

  .gallery {
    height: 30vh;
  }

  .gallery-ctrl {
    width: 50%;
  }

  .gallery-ctrl i {
    color: #00000000;
  }

  .gallery-ctrl:hover {
    background: #00000000;
  }

  .gallery-slider {
    transition: none;
  }

  .img-container img {
    min-height: 100%;
  }

  .blog-tiles {
    grid-template-columns: 1fr;
    grid-gap: 0px;
  }

  .inline-img {
    width: 100%;
    margin-top: 0;
  }

  footer {
    padding: 5% 5vw;
  }
}