@font-face {
  font-family: 'NewEdge';
  src: url('/type/NewEdge666-RegularRounded.woff'),
    url('/type/NewEdge666-RegularRounded.woff2');
}

@font-face {
  font-family: 'SuisseIntl';
  font-weight: normal;
  font-style: normal;
  src: url('/type/SuisseIntl-Regular-WebM.woff'),
    url('/type/SuisseIntl-Regular-WebM.woff2');
}

@font-face {
  font-family: 'SuisseIntl';
  font-weight: bold;
  font-style: normal;
  src: url('/type/SuisseIntl-Bold-WebM.woff'),
    url('/type/SuisseIntl-Bold-WebM.woff2');
}

@font-face {
  font-family: 'SuisseIntl';
  font-weight: normal;
  font-style: italic;
  src: url('/type/SuisseIntl-RegularItalic-WebM.woff'),
    url('/type/SuisseIntl-RegularItalic-WebM.woff2');
}

:root {
  --darkColor: #171717;
  --lightColor: #dddbd5;
  --nodeColor: #cb9cf2;
  --resourceColor: #ff5757;
  --toggleRadius: 27px;
}

* {
  box-sizing: border-box
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: none;
  font-family: 'SuisseIntl', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--lightColor);
  color: var(--darkColor);
  overflow-y: auto;
}

body.menu-open {
  overflow: hidden;
}

body.research {
  background: var(--darkColor);
  color: var(--lightColor);
}

body.research:not(.scrolls) {
  overflow: hidden;
}

.project-view {
  display: none;
}

h1,
h2,
h3 {
  font-weight: normal;
  letter-spacing: -.2px;
  margin: 0 0 .5em;
  z-index: 0;
}

h1,
h2 {
  width: 100%;
  font-family: 'NewEdge', sans-serif;
  font-size: 2.2rem;
  margin: .25rem 0 .75rem;
}

h1 {
  margin: .45rem 0 .55rem;
}

h3 {
  display: inline-block;
  background-color: var(--darkColor);
  border: 1px solid var(--nodeColor);
  color: var(--nodeColor);
  text-align: center;
  padding: .2rem;
}

nav {
  position: relative;
  width: 100%;
  z-index: 4;
  font-family: 'NewEdge', sans-serif;
}

nav details ul {
  max-height: 100vh;
  overflow-y: auto;
  padding: 1.5rem 1.2rem;
}

nav summary {
  position: fixed;
  top: 0;
  right: 0;
  padding: 1.2rem;
  list-style: none;
  font-size: 1.5rem;
  letter-spacing: -.2px;
  cursor: pointer;
  z-index: 2;
}

.research nav summary {
  mix-blend-mode: difference;
}

nav summary::-webkit-details-marker {
  display: none;
}

nav ul {
  position: fixed;
  top: 0;
  left: 0;
  padding: 3rem 1rem;
  width: 100%;
  list-style: none;
  margin: 0;
  background-color: var(--lightColor);
  color: var(--darkColor);
  z-index: 1;
  border-bottom: 1px solid var(--darkColor);
}

nav li {
  padding: 0;
  font-size: 3.75rem;
  padding-left: 1em;
  text-indent: -1em;
  animation: lineDancer .5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes lineDancer {
  from {
    line-height: .5
  }

  to {
    line-height: 1
  }
}

nav li.project::before {
  font-family: 'SuisseIntl';
  content: '\2197\fe0e';
  padding-right: .2em;
}

nav li.project:hover::before,
nav li.project.active::before {
  content: '\2192';
}

nav a {
  color: #000;
  text-decoration: none;
  line-height: .6;
}

.meta {
  display: flex;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  padding: .5rem 7rem 0 1rem;
  z-index: 2;
  background-color: var(--lightColor);
  border-bottom: 1px solid var(--darkColor);
}

.research .meta {
  background-color: var(--darkColor);
  border-bottom-color: var(--lightColor);
}

#toggleEditor {
  display: none;
  vertical-align: middle;
  font-size: .8rem;
  padding: .15em .8em .2em;
  margin-left: .5rem;
  text-align: center;
  color: var(--lightColor);
  border: 1px solid var(--lightColor);
  border-radius: 3rem;
  cursor: pointer;
  transition: padding .3s;
}

#toggleEditor:hover {
  background-color: var(--lightColor);
  color: var(--darkColor);
}

.research #toggleEditor {
  display: inline-block;
}

.editing #toggleEditor {
  padding: .15em 1.2em .2em;
}

.toggle,
.toggle-inner {
  border-radius: var(--toggleRadius);
  user-select: none;
}

.toggle {
  background-color: var(--darkColor);
  border: 1px solid var(--darkColor);
  min-width: 11.5rem;
  height: 1.75rem;
  margin: .6rem 0 .7rem;
}

.research .toggle {
  border-color: var(--lightColor);
}

.toggle-inner {
  display: flex;
  background-color: var(--lightColor);
  color: var(--darkColor);
  height: 100%;
  margin: 0 1.5rem 0 0;
  padding: 0 1rem;
  font-size: .8rem;
  align-items: center;
  justify-content: center;
  letter-spacing: -.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: margin .3s;
}

@media (pointer: fine) {
  .toggle:hover:not(.no-hover) .toggle-inner {
    margin: 0 1.25rem 0 .25rem;
  }

  .research .toggle:hover:not(.no-hover) .toggle-inner {
    margin: 0 .25rem 0 1.25rem;
  }
}

.toggle-inner::before {
  font-family: 'SuisseIntl';
  content: '\2197\fe0e';
  margin-right: .25rem;
}

.research .toggle-inner {
  margin: 0 0 0 1.5rem;
}

.research .toggle-inner::before {
  font-family: 'NewEdge';
  content: '\2716';
  padding-top: .15em;
}

.project-view {
  width: 100%;
  min-height: 100%;
  display: flex;
  position: relative;
}

.project-view .column {
  width: 100%;
  padding: 1.5rem;
}

.project-view img {
  width: 100%;
  margin-bottom: 1rem;
}

.project-view time {
  display: block;
  width: 100%;
  text-transform: uppercase;
  text-align: center;
  font-size: .8em;
}

.research .project-view {
  display: none;
}

.project-description {
  padding: 2rem 1rem 1rem;
  border-left: 1px solid var(--darkColor);
}

.project-description a {
  border: 1px solid var(--darkColor);
  color: var(--darkColor);
  background-color: var(--lightColor);
  text-decoration: none;
  padding: .1em .2rem;
  transition: .2s background, .2s color;
}

.project-description a.resource {
  border-radius: 3rem;
  padding: .075em .5em;
}

.project-description a:hover,
.project-description a.resource:hover {
  background-color: var(--darkColor);
  color: var(--lightColor);
}

.image-column {
  min-height: 100%;
}

.image-column .project-description {
  display: none;
}

#main {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transform-origin: 0 0;
  cursor: grab;
  user-select: none;
  padding-top: 5rem;
  min-width: 100vw;
  min-height: 100vh;
  overflow: visible;
  border: 1px solid transparent;
  background: var(--darkColor);
  transition: .3s border;
}

.research #main {
  display: block;
}

.editing #main {
  border: 1px dashed #aaa9a4;
  background-size: 1rem 1rem;
  background-image:
    linear-gradient(to right, #252525 1px, transparent 1px),
    linear-gradient(to bottom, #252525 1px, transparent 1px);
}

#main.moving {
  transition: .5s transform;
}

#main svg {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  z-index: 0;
  opacity: 0;
  animation: 1s fadeIn forwards .1s;
  margin: 0;
}

#main svg line {
  transition: opacity 1s cubic-bezier(0.19, 1, 0.22, 1);
}

#main:not(.moving) svg:has(line.hover) line:not(.hover) {
  opacity: .075;
}

.node {
  position: relative;
  display: table;
  cursor: pointer;
  width: auto;
  max-width: 16rem;
  opacity: 0;
  animation: grow .3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards .1s;
  text-align: center;
  border: 1px solid transparent;
  transform-style: preserve-3d;
}

.editing .node {
  cursor: default;
}

.selectionLocked .node {
  cursor: grab;
}

.node.selected {
  border: 1px solid #0f0;
}

.node.resource {
  font-size: .8rem;
}

.node img {
  max-width: 100%;
  pointer-events: none;
}

.editing .node a {
  pointer-events: none;
}

.node>h3 {
  display: inline-block;
  width: max-content;
  margin: 0;
}

.research a.external,
.research a.resource,
.node.resource>h3 {
  display: inline-block;
  background-color: var(--darkColor);
  color: var(--resourceColor);
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--resourceColor);
  border-radius: 3rem;
  letter-spacing: -.5px;
  font-size: 1em;
  padding: .15em .8em .2em;
}

.node:not(.resource):hover>h3 {
  background: var(--nodeColor);
  color: var(--darkColor);
}

a.external::before {
  font-family: 'SuisseIntl';
  content: '\2197\fe0e';
  padding-right: .2em;
}

.research a.external:hover,
a.resource:hover,
.node.resource>h3:hover,
.node.resource.active>h3,
.node.resource.active>a.external {
  background: var(--resourceColor);
  color: var(--darkColor);
}

.node.active>h3,
.node.active>img,
.node.active>a {
  background: var(--nodeColor);
  color: var(--darkColor);
}

.description {
  display: none;
  position: fixed;
  bottom: 0;
  right: 0;
  width: 80%;
  height: 100%;
  max-width: 30rem;
  padding: 1rem;
  background: var(--darkColor);
  border-left: 1px solid var(--lightColor);
  z-index: 1;
  line-height: 1.4;
  overflow-y: auto;
}

.description h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--lightColor);
  margin: 0 0 1rem;
  padding-bottom: .25em;
  padding-right: 1.5rem;
  line-height: 1;
}

.description h3 {
  display: block;
  border: none;
  color: var(--lightColor);
  font-family: 'NewEdge';
  font-size: 1.5rem;
  padding: 0;
  margin-top: 3rem;
  margin-bottom: -.25rem;
  text-align: left;
}

.description a,
.description a.resource {
  display: inline;
  break-inside: avoid;
  transition: .2s background, .2s color;
}

.description a.resource {
  padding: .15em .5em .2em;
}

.description .connections a,
.description .connections a.resource {
  display: inline-block;
  margin: .15rem 0;
}

.description a:not(.external):not(.resource) {
  background-color: var(--darkColor);
  color: var(--nodeColor);
  border: 1px solid var(--nodeColor);
  padding: .15em .3em .2em;
  text-decoration: none;
}

.description a:not(.external):not(.resource):hover {
  background: var(--nodeColor);
  color: var(--darkColor);
}

.description a.external.ofResource {
  background: var(--darkColor);
  color: var(--lightColor);
  border-color: var(--lightColor);
}

.description a.external.ofResource:hover {
  background: var(--lightColor);
  color: var(--darkColor);
}

.description img {
  width: 100%;
}

#description-close {
  position: absolute;
  top: 0;
  right: 0;
  padding: .5rem 1rem;
  font-family: 'NewEdge';
  font-size: 1.5rem;
  cursor: pointer;
}

@keyframes grow {
  from {
    opacity: 0;
    transform: scale(0);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.about {
  display: flex;
  flex-wrap: wrap;
  max-width: 80rem;
}

.about .resume,
.about .bio {
  flex: 1;
  padding: 2rem;
}

.about .resume {
  font-size: .8em;
}

.about .bio {
  font-size: 1.2em;
}

.about a {
  color: var(--darkColor);
}

.about .bio a {
  display: inline-block;
  padding: .15em 2em .2em;
  border: 1px solid var(--darkColor);
  border-radius: 1000px;
  margin: 1.5em .5em 0 0;
  text-decoration: none;
  text-transform: uppercase;
}

.about .resume a.external::before {
  padding-right: 0;
}

.about p {
  margin: 0;
}

.projects .project {
  display: flex;
  border-bottom: 1px solid var(--darkColor);
}

.research .projects .project {
  border-bottom-color: var(--lightColor);
}

.projects .project a {
  color: var(--darkColor);
  text-decoration: none;
}

.project h2 {
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0;
}

.project .column {
  flex: 1;
  padding: 1rem;
}

.project .project-image {
  display: block;
  text-align: right;
}

.project .project-image img {
  width: 100%;
  max-width: 40vw;
}

.project .nodes {
  display: none;
}

.project .nodes .node {
  display: inline-block;
  max-width: unset;
  margin-bottom: .5rem;
}

.research .project .nodes {
  display: block;
  padding-top: 1rem;
}

.project .nodes h3 {
  font-size: 1em;
  padding: .2rem 1rem .3rem;
}

.research .projects .project,
.research .projects .project a,
.research .projects h2 {
  color: var(--lightColor);
}

@media (max-width: 800px) {
  #home {
    font-size: 1rem;
  }

  .meta {
    top: 0;
    padding: .65rem 5rem 0 .5rem;
  }

  .toggle {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
  }

  .project-view {
    display: block;
    padding-top: 2rem;
  }

  h1 {
    font-size: 1.5rem;
    margin-left: .5rem;
  }

  nav summary {
    font-size: 1rem;
  }

  nav li {
    font-size: 2rem;
  }

  .description {
    width: 100%;
    max-width: 100%;
    height: 45%;
    border-top: 1px solid var(--lightColor);
    border-left: none;
    padding-top: 1rem;
  }

  .description h2 {
    font-size: 1.5rem;
  }

  #description-close {
    top: 0;
  }

  .projects {
    padding-top: 2rem;
  }

  .about {
    flex-direction: column;
  }
  
  .about .bio,
  .about .resume {
    padding: 1rem;
  }
  
  .about .resume {
    padding-top: 2rem;
  }
  
  .project {
    flex-direction: column-reverse;
  }
  
  .project-view {
    overflow-x: hidden;
  }

  .image-column .project-description {
    display: block;
    border-left: 0;
    border-top: 1px solid var(--darkColor);
    border-bottom: 1px solid var(--darkColor);
    margin: 0.5rem -1.5rem 1.5rem;
    padding: 1rem 1.5rem 1rem;
  }

  .project-description.column {
    display: none;
  }

  .image-column {
    padding-bottom: 0;
  }

  .project .project-image img {
    max-width: 100%;
  }

  .project h2 {
    font-size: 1rem;
  }
}