@import url('./fonts.css?v=6');
@import url('./reset.css?v=5');

:root {
  --white: #FFFFFF;
  --grey-lightest: #F7F5F5;
  --grey-light: #9D9D9E;
  --grey-medium: #78787A;
  --grey-dark: #525153;
  --grey-darkest: #3B3A3B;
}

body {
  min-width: 300px;
  margin: 0;
  font-family: 'Helvetica Now', sans-serif;
  font-size: 16px;
  font-weight: 400;
  font-optical-sizing: auto;
  font-size-adjust: from-font;
  line-height: 18px;
  color: var(--grey-medium);
  background-color: var(--white);
  overflow-y: scroll;
}

.upper {
  text-transform: uppercase;
}

[data-text]::before {
  content: attr(data-text);
}

h1,
.h1,
h2,
.h2,
h3,
.h3 {
  font-weight: 300;
}

h4,
.h4,
h5,
.h5,
h6,
.h6 {
  font-weight: 500;
}

h1,
.h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 36px;
}

h2,
.h2 {
  font-size: 28px;
  line-height: 32px;
}

h3,
.h3 {
  font-size: 24px;
  line-height: 28px;
}

h4,
.h4 {
  font-size: 20px;
  line-height: 22px;
}

h5,
.h5 {
  font-size: 16px;
  line-height: 18px;
}

h6,
.h6 {
  font-size: 14px;
  line-height: 16px;
}

em,
.italic {
  font-style: italic;
}

b,
.b,
.bold {
  font-weight: 800;
  font-style: normal;
}

strong,
.strong {
  font-weight: 500;
  font-style: normal;
}

.normal {
  font-weight: 400;
}

.light {
  font-weight: 300;
}

p {
  font-weight: 300;
}

p > a {
  font-weight: 500;
  font-style: normal;
}

a,
img {
  -webkit-user-drag: none;
}

a:hover,
a:focus-visible,
button:hover,
button:focus-visible,
label[for='nav']:hover {
  color: var(--grey-darkest);
}

#tab,
#nav {
  display: none;
}

#name {
  display: flex;
  position: fixed;
  top: max(160px, 24vh);
  left: 0;
  margin-left: -280px;
  animation: tab 1s ease;
  transition: margin-left 0.8s ease;
  z-index: 20;
}

#tab:checked ~ #name {
  margin-left: 0;
}

#name dfn {
  min-width: 280px;
  padding: 22px 0 22px 44px;
  text-transform: uppercase;
  white-space: nowrap;
  background-color: var(--grey-darkest);
}

#name dfn > h2 {
  color: var(--white);
}

#name dfn > h4 {
  color: var(--grey-light);
}

#name svg {
  max-height: 98px;
  flex-shrink: 0;
}

label[for='nav']::before {
  content: 'Open ';
}

#nav:checked ~ #site {
  max-height: 24px;
}

#nav:checked ~ menu > label[for='nav']::before {
  content: 'Close ';
}

main {
  position: relative;
  padding: max(32px, 4vh) max(64px, 8vh);
  padding-left: max(240px, 32vh);
}

main menu {
  display: flex;
}

main menu > *:last-child {
  margin-left: auto;
}

main header {
  position: relative;
  z-index: 10;
  background-color: var(--white);
}

main header menu {
  padding-bottom: max(16px, 2vh);
  text-transform: uppercase;
}

#site {
  display: flex;
  max-height: 0;
  text-align: right;
  transition: max-height 0.4s ease;
  justify-content: flex-end;
  flex-wrap: wrap;
  overflow: hidden;
}

#site a {
  margin-bottom: 6px;
  margin-left: max(16px, 2vh);
}

main section {
  padding: max(16px, 2vh) 0;
}

main figure,
main figure > img,
main video,
main p > img {
  border-radius: 6px;
  overflow: hidden;
  text-wrap: nowrap;
}

main aside > figure,
main aside > video {
  position: relative;
  background-color: var(--grey-lightest);
  z-index: 0;
}

main aside > figure a,
main aside > video a {
  display: block;
}

main aside > video {
  display: block;
  height: 100%;
  margin-bottom: -9px;
  border: 10px solid var(--grey-lightest);
}

main aside > figure figcaption {
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: -1;
}

main aside > figure::before {
  position: absolute;
  top: 50%;
  left: 50%;
  font-weight: 600;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

main aside > [data-text] > img {
  filter: blur(5px);
  opacity: 50%;
}

#projects,
#examples,
#details {
  margin-top: max(32px, 4vh);
}

#projects,
#examples,
.split {
  display: grid;
  gap: 1vw;
}

#projects {
  grid-template-columns: repeat(auto-fit, minmax(16vw, 1fr));
}

#examples,
.split {
  grid-template-columns: 1fr 1fr;
}

#details > * {
  margin-top: max(16px, 2vh);
}

#details ul,
#details ol {
  padding-left: 24px;
}

#projects h3,
#details h1 {
  color: var(--grey-darkest);
}

#projects h5,
#details h3 {
  display: flex;
  justify-content: space-between;
}

#projects p,
#details p,
#details li {
  font-size: 20px;
  font-weight: 300;
  line-height: 24px;
  color: var(--grey-dark);
}

#family {
  width: 30%;
  margin-bottom: max(8px, 1vh);
  margin-left: max(16px, 2vh);
  float: right;
}

main footer menu {
  padding-top: max(16px, 2vh);
}

@keyframes tab {
  0% {
    margin-left: -280px;
  }

  50% {
    margin-left: -232px;
  }

  100% {
    margin-left: -280px;
  }
}

@media (max-width: 1240px) {
  #projects,
  #examples,
  .split {
    gap: 12px;
  }

  #examples {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  #name {
    top: 32px;
  }

  main {
    padding: 32px;
    padding-top: 164px;
  }

  main header menu {
    padding-bottom: 16px;
  }

  main section {
    padding: 16px 0;
  }

  #projects {
    grid-template-columns: repeat(auto-fit, minmax(24vw, 1fr));
  }

  #family {
    width: 100%;
  }

  main footer menu {
    padding-top: 16px;
  }
}

@media (max-width: 640px) {
  #projects {
    grid-template-columns: repeat(auto-fit, minmax(40vw, 1fr));
  }
}

@media (max-width: 440px) {
  #projects,
  .split {
    grid-template-columns: 1fr;
  }
}
