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

:root {
  --bg: #efefef;
  --text: #222222;
  --link: #012fd5;
  --highlight: #7f1909;
}

.dark {
  --bg:#222222; 
  --text:#efefef; 
  --link:#47daff; 
  --highlight:#ffb999;
}

.dark-mobile {
  --bg: black;
}

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

::-webkit-scrollbar {
  width: 25px;
}

::-webkit-scrollbar-track {
  background: var(--bg); 
}

::-webkit-scrollbar-track:vertical {
  border-left: 1px solid var(--text); 
}

::-webkit-scrollbar-track:horizontal {
  border-top: 1px solid var(--text);
}

::-webkit-scrollbar-corner {
  background: var(--bg); 
  border-top: 1px solid var(--text);
  border-left: 1px solid var(--text); 
}
 
::-webkit-scrollbar-thumb {
  background: var(--text);
  margin: -1px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg);
  border: 1px solid var(--text);
}

::-webkit-scrollbar-thumb:vertical:hover {
  border-right: none;
}

::-webkit-scrollbar-thumb:horizontal:hover {
  border-bottom: none;
}

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

body {
  -webkit-text-size-adjust: 100%;
}

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;
}

h1.title {
  font-size: 3.5rem;
}

h1.small-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

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, .comment h4 {
  font-family: 'Agrandir', 'Work Sans', sans-serif;
  font-size: 1.3em;
  font-weight: bold;
  margin-right: .5em
}

h5 {
  margin-bottom: 1.2rem
}

.series .text-subheading {
  font-weight: 900;
  font-size: 1.15rem;
}

.series h4 {
  margin-top: 25px;
}

.series .see-more {
  display: block;
  margin-top: 25px;
}

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

.toggle-code-container {
  display: block;
  overflow: visible;

  text-align: right;

  position: sticky;
  top: 90vh;
  z-index: 99;
}

.toggle-code {
  display: inline-block;
  border: 1px solid var(--text);
  background: var(--bg);

  transform: translateX(150%);
  
  padding: 14px;
}

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

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

p.no-mb {
  margin-bottom: 0;
}

.metadata p {
  margin-bottom: 0;
  margin-top: 2.5vh;
}

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;
}

.series {
  border: 1px solid var(--text);
  padding: 25px;
  margin-bottom: 25px;
}

.series h5.post-list-heading {
  margin-bottom: 0;
}

#recents, #comments {
  min-height: auto;
  margin: 0;
  margin-top: 10vh;
  margin-bottom: -10vh;
  padding-left: 5vw;
  padding-right: 5vw;
  padding-bottom: 10vh;
  border-top: 1px solid var(--text);
}

h5.post-list-heading {
  margin-bottom: 10vh;
  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: -1px;
  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;
}

.no-result {
  margin-bottom: 1.5rem;
}

.ordered-post {
  display: grid;
  grid-template-columns: 2ch 1fr;
  grid-gap: 10px;
  margin-top: 25px;
}

.ordered-post .short-blog-post {
  margin-top: 0;
}

.ordered-num {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ordered {
  margin-left: calc(2ch + 10px);
}

.post-ellipsis, .post-line {
  display: flex;
  justify-content: center;
  align-items: center;
}

.post-ellipsis {
  margin-top: 25px;
}

.post-line {
  position: relative;
}

.post-line:after {
  content: '';
  width: 1px;
  position: absolute;
  left: 50%;
  height: calc(100% + 25px);
  bottom: -25px;
  background: var(--text);
}

.current-post {
  display: block;
  height: 1em;
  background: var(--text);
}

.short-blog-post {
  display: block;
  padding: 25px;
  border: 1px solid var(--text);
  transition: 0.1s linear;
  margin-top: 25px;
}

.short-blog-post h4 {
  margin-top: 0;
}

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

.short-blog-post:hover {
  border: 1px solid var(--bg);
}

.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 img {
  width: 100%;
  margin-bottom: 1.2rem;
}

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

.blog-post .blog-title h3 {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 3px;
}

.blog-post .blog-title h4 {
  display: inline; 
}

.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);
}

.post-title h3 {
  font-size: 3rem;
  margin-bottom: 3px;
}

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

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

.img-right {
  float: right;
  width: 45ch;
  margin-left: 5%;
}

.img-left {
  float: left;
  width: 45ch;
  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;
}

.share-tooltip {
  position: absolute;
  left: 0px;
  top: 0px;
  background: var(--bg);
  border: 1px solid var(--text);
  fill: var(--text);
  opacity: 0;
  transform: translateY(1em);
  pointer-events: none;
  transition: 0.1s linear;
  transition-property: transform, opacity;

  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  place-content: center;
  grid-gap: 7px;
  padding: 7px;

  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

.share-tooltip.active {
  transform: translateY(0);
  pointer-events: all;
  opacity: 1;
}

.share-tooltip:after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  left: calc(50% - 5px);
  bottom: -4.5px;
  transform: rotate(315deg);
  border: 1px solid var(--text);
  background: var(--bg);
  clip-path: polygon(0 0, 0% 100%, 100% 100%);
}

.share-tooltip a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border: 1px solid var(--bg);
  transition: 0.1s linear;
  transition-property: border;
}

.share-tooltip a:hover {
  border: 1px solid var(--text);
  transition: 0.1s linear;
  transition-property: border;
}

.share-tooltip svg {
  fill: var(--text);
}

.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;
  padding-right: 10%;
  line-height: 2;
  overflow: auto;
  word-wrap: break-word;
  display: block;
}

code {
  position: relative;
  display: inline-block;
  font-family: 'Fraktion Mono', 'Space Mono', monospace;
  font-size: 1.2rem;
  font-variant-ligatures: none;
  margin: 0px 1ch;
}

code:before {
  content: '';
  position: absolute;
  width: calc(100% + 2ch);
  left: -1ch;
  height: 100%;
  top: 1px;
  border-radius: 2px;
  background: var(--text);
  opacity: 0.25;
  z-index: -1;
}

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

pre code:before {
  display: none;
}

#mc_embed_signup, #comment_form {
  display: block;
  position: relative;
  width: 100%;
  padding: calc(15px + 2vw);
  margin-top: 1.9em;
  margin-bottom: 1.8em;
  border: 1px solid var(--text);
  border-top-width: 5px;
  border-bottom-width: 5px;
}

.mc-info, .comment-info {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.asterisk {
  color: var(--highlight);
}

#mc_embed_signup_scroll, #comment_post_scroll {
  display: flex;
  flex-flow: column nowrap;
}

#mc_embed_signup_scroll input.button {
  position: relative;
  height: 100%;
  width: 100%;
  z-index: 2;
}

#mc_embed_signup_scroll h4, #comment_post_scroll h4, #comment-list h4 {
  width: 100%;
  margin-bottom: 1rem;
}

.mc-field-set {
  display: flex;
  flex-flow: column nowrap;
}

.comment-field-set {
  display: flex;
  flex-flow: column nowrap;
}

.mc-field-group, .comment-field-group {
  display: grid;
  grid-template-rows: 2em 1fr;
  margin-bottom: 1.5rem;
}

label {
  font-family: 'Agrandir', 'Work Sans', sans-serif;
  font-size: 1.15rem;
}

/* STRETCHING COMMENT BOX */

#comment-BODYGROUP textarea, #comment-BODYGROUP pre {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  background: none;
  outline: none;
  border: none;
}

#comment-BODYGROUP pre {
  position: relative;
  height: auto;
  display: block;
  visibility: hidden;
  margin-top: 0.89em;
  line-height: normal;
  padding-bottom: 0.84em;
  padding-left: 3px;
}

#comment-BODYGROUP pre span {
  display: inline-block;
  width: 100%;
}

#comment-BODYGROUP pre {
  white-space: pre-wrap;
  word-break: break-word;
}

/* --END-- */

input, textarea, #comment-BODYGROUP {
  position: relative;
  font-family: 'Telegraf', 'Work Sans', sans-serif;
  font-size: 1.2rem;
  padding: 1rem;
  outline: none;
  border: 1px solid var(--text);
  border-radius: 0;
  background: #00000000;
  color: var(--text);
  border-radius: 0;
}

input[type="search"] {
  -webkit-appearance: none;
}

input.button {
  font-family: 'Agrandir', 'Work Sans', sans-serif;
  font-size: 1.15rem;
  border-radius: 0;
}

input.button:hover {
  cursor: pointer;
}

textarea {
  resize: none;
}

.comment-field-set input, .comment-field-set textarea {
  width: 100%;
}

input.button {
  position: relative;
  height: 100%;
  width: 100%;
  z-index: 2;
}

#mc_embed_signup_scroll textarea {
  height: calc(4em + 2rem);
}

.clear {
  position: relative;
}

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

.clear:hover {
  cursor: pointer;
}

.clear:hover:after {
  height: 3px;
  cursor: pointer;
  transition: 0.1s linear;
}

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

.clear:active:after {
  z-index: 1;
  height: 100%;
  cursor: pointer;
  transition: 0.1s linear;
}

/* COMMENTS */

#comment-container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-gap: 25px;
}

#comment_form {
  position: sticky;
  top: 85px;
  margin-top: 0;
}

#comment-list {
  border: 1px solid var(--text);
  padding: calc(15px + 2vw);
  margin-bottom: 25px;
}

.comment-padding {
  visibility: hidden;
  height: 95px;
  margin-top: -95px;
}

.comment:last-child {
  margin-bottom: 0;
}

.comment {
  border: 1px solid var(--text);
  padding: 25px;
  margin-bottom: 25px;
  transition: 0.1s linear;
}

.comment.active {
  border-bottom-width: 5px;
}

.comment .comment-title {
  margin-bottom: 1rem;
}

.comment .comment-author {
  margin-top: 1rem;
  margin-bottom: 0;
}

.comment .comment-author a {
  text-decoration: underline;
}

.comment .comment-body {
  margin-bottom: 0;
}

.comment-reply-to-container {
  max-height: 75px;
  overflow: hidden;
  transition: 0.1s linear;
}

.comment-reply-to-link {
  display: grid;
  margin-bottom: 0;
  padding: 15px 25px;
  background: var(--text);
  color: var(--bg);
  transition: 0.1s linear;
}

.comment-reply-to-container.slide-down {
  max-height: 0px;
  transition: 0.1s linear;
}

.comment-reply-to-link.slide-down {
  transform: translateY(100%);
  transition: 0.1s linear;
}

.comment-reply-to {
  width: 100%;
  overflow: hidden;
  margin-top: 1px;
  display: flex;
  align-items: center;
}

.truncate {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-reply-to-cancel {
  text-decoration: underline;
  text-align: right;
}

#comment_form .comment-reply-to-link {
  display: grid;
  grid-template-columns: 1fr 8ch;
}

.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;
  }
}

h1:not(.title) #textSpan {
  line-height: calc(1em + 10px);
}

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;
}

.backtotop.prose {
  padding: 20px 0px;
  margin: 0 auto;

  width: 65ch;
}

body.wide-content .backtotop.prose {
  width: 90vw;
}

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);
  width: 50px;
}

nav ul {
  display: grid;
  align-items: center;
  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:not(.active):active {
  fill: var(--bg);
}

nav a:not(.active):active:before {
  width: 50px;
  z-index: -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);
}

nav a.sailing:not(.active) {
  fill: var(--bg);
}

nav a.sailing:not(.active):before {
  width: 50px;
  z-index: -1;
}

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

section.prose {
  margin: 0 auto;

  max-width: 65ch;
}

body.wide-content section.prose {
  max-width: 90vw;
}

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;
  display: flex;
  align-items: flex-end;
}

h3 svg {
  margin-right: 0.25em;
  margin-bottom: 0.01em;
  fill: var(--text);
}

#top {
  min-height: 120px;
}

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

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

.intro span:before {
  content: '';
  display: block;
}

.outlinks {
  margin: 15px 0;
  display: grid;
  position: relative;
}

.outlinks ul {
  display: flex;
  flex-flow: row wrap;
  margin: 15px 0;
}

.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.05em;
  width: 100%;
  height: 0px;
  transition: 0.1s linear;
  background: var(--link);
  border-radius: 1px;
}

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

.text-link:before {
  content: "";
  display: inline-block;
  position: absolute;
  z-index: -1;
  left: -1px;
  bottom: 0.2em;
  width: 0%;
  height: 1px;
  transition-property: none;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.3,0.8,.01,.98);
  background: var(--link);
  border-radius: 1px;
}

.text-link:hover:before {
  width: calc(100% + 2px);
  transition-property: width;
}

.text-link:after {
  content: "";
  display: inline-block;
  position: absolute;
  z-index: -1;
  right: -1px;
  bottom: 0.2em;
  width: 0%;
  height: 1px;
  z-index: -1;
  transition-property: width opacity;
  background: var(--link);
  animation: exit 0.3s 1 forwards;
  border-radius: 1px;
}

.text-link:hover:after {
  animation: none;
}

@keyframes exit {
  0% {
    width: calc(100% + 2px);
  }

  100% {
    width: 0%;
  }
}

.text-link:not(:hover):after {
  visibility: hidden;
  transition: visibility 0.01s 0.3s;
}

.text-link:active:before, .text-link:active:after {
  transition-property: opacity;
  transition-duration: 0.3s;
  opacity: 0.5
}

.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%;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
  margin-top: 1.5rem;
}

.bottom-container {
  margin-top: 0.5rem;
}

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

.flex-item:not(.disabled):hover {
  text-decoration: underline;

  cursor: pointer;
}

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

.flex-item.disabled {
  background: grey;
}

.flex-container h4 {
  font-family: 'Agrandir', 'Work Sans', sans-serif;
  font-size: 1.3em;
  font-weight: bold;
  margin-right: .5em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
}

.tags.small-margin {
  margin-bottom: 1rem;
}

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

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

.tag:before {
  content: '';
  position: absolute;
  background: var(--text);
  opacity: 0;
  z-index: -1;
  top: -1px;
  left: -1px;
  width: calc(100% + 2px);
  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: calc(100% + 2px);
  opacity: 0;
  transition: none;
}

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

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

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

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

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

.tag.active:before {
  height: calc(100% + 2px);
  opacity: 1;
  transition: none;
}

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

.tag.active:hover:before {
  height: calc(100% - 1px);
  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 {
  font-size: 0.9rem;
}

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

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

.design-el {
  display: block;
  margin: 0 auto;
  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% 5vw;
  margin-top: 10vh;
  border-top: 1px solid var(--text);
}

footer h4 {
  padding-bottom: 1.2rem;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 1000px) {
  h1 {
    font-size: 5rem;
  }

  h1.title {
    font-size: 3rem;
  }

  h1.small-title {
    font-size: 2rem;
  }

  .intro {
    min-height: 12rem;
  }

  .intro span:before {
    content: '';
    display: none;
  }

  h2 {
    font-size: 3rem;
  }

  h3 {
    font-size: 2.6rem;
  }

  h3 svg {
    margin-bottom: 0.01em;
  }

  .mobile-only {
    display: block;
  }

  #recents {
    padding-left: 5vw;
    padding-right: 5vw;
  }
  
  h5.post-list-heading {
    margin-bottom: 10vh;
  }

  .toggle-code-container {
    top: 10vh;
  }

  .toggle-code {
    transform: none;
  }

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

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

  .clear:after, .clear:before {
    display: none;
  }

  header {
    height: 50px;
  }

  .backtotop, .backtotop.prose {
    padding: 20px 5vw;
    width: 100%;
  }

  section, section.prose {
    margin: 0 5vw;
  }

  .outlinks {
    margin: 0;
  }

  .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;
  }

  .menu-btn[style="right: 0px;"] svg path {
    transition: 0.3s ease-in-out;
  }

  .menu-btn[style="right: 50px;"] svg path:nth-child(1) {
    d: path("M68.75,47.5c5,0,5,5,0,5h-10c-5,0-5-5,0-5Z");
    transition: 0.3s ease-in-out;
  }

  .menu-btn[style="right: 50px;"] svg path:nth-child(2) {
    d: path("M68.75,37.5c5,0,5,5,0,5h-30c-5,0-5-5,0-5Z");
    transition: 0.3s ease-in-out;
  }

  .menu-btn[style="right: 50px;"] svg path:nth-child(3) {
    d: path("M68.75,67.5c5,0,5,5,0,5h-20c-5,0-5-5,0-5Z");
    transition: 0.3s ease-in-out;
  }

  .menu-btn[style="right: 50px;"] svg path:nth-child(4) {
    d: path("M68.75,27.5c5,0,5,5,0,5h-25c-5,0-5-5,0-5Z");
    transition: 0.3s ease-in-out;
  }

  .menu-btn[style="right: 50px;"] svg path:nth-child(5) {
    d: path("M68.75,57.5c5,0,5,5,0,5h-40c-5,0-5-5,0-5Z");
    transition: 0.3s ease-in-out;
  }

  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;
  }

  .short-blog-post p {
    display: none;
  }

  .post-title h3 {
    font-size: 2rem;
  }

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

  #mc_embed_signup_scroll input {
    width: 100%;
    max-height: 40px;
  }

  #mc_embed_signup_scroll input.button {
    width: 100%;
    max-height: 65px;
  }
  
  #comment-container {
    display: flex;
    flex-flow: column nowrap;
    grid-gap: 0px;
  }

  #comment_form {
    position: relative;
    top: auto;
  }

  footer {
    padding: 5% 5vw;
  }
}