:root {
  --paper: #faf6f2;
  --ink: #1c1c1c;
  --muted: #9f9f9f;
  --line: #e5e5e5;
  --accent: #85ebce;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-weight: 400;
  letter-spacing: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.site-header,
.works,
footer {
  width: 95%;
  margin-right: auto;
  margin-left: auto;
}

body.drawer-open .site-header,
body.drawer-open .works,
body.drawer-open footer {
  width: calc(40vw - 5vw);
  margin-right: 0;
  margin-left: 2.5vw;
}

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-top: 96px;
}

.logo {
  width: max-content;
  font-size: 32px;
  line-height: 1;
}

.site-header nav {
  display: flex;
  justify-content: flex-end;
  gap: 48px;
  font-size: 16px;
}

.site-header nav a {
  border-bottom: 1px solid transparent;
  transition: color .1s, border-color .2s;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--accent);
  border-color: transparent;
}

.works {
  padding-top: 240px;
  padding-bottom: 120px;
}

.works-layout,
.works-index {
  width: 100%;
}

.works-bar {
  display: flex;
  justify-content: flex-start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink);
}

.works-bar h2 {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 500 !important;
  line-height: 1.35;
  text-transform: none;
}

.project-list {
  transition: opacity .25s, transform .25s;
}

.project {
  position: relative;
}

.project-link {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: block;
}

.project-list[data-current-view="list"] .project {
  display: grid;
  grid-template-columns: minmax(220px, .46fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 32px;
  min-height: 0;
  padding: 16px 0;
  border: 0;
  cursor: pointer;
}

body.drawer-open .project-list[data-current-view="list"] .project {
  grid-template-columns: 1fr;
  gap: 4px;
}

.project-list[data-current-view="list"] .project:not(:first-child)::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.project-list[data-current-view="list"] .project:last-child::after {
  content: "";
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.project-meta,
.project-visual {
  display: none !important;
}

.project-list[data-current-view="list"] h3,
.project-list[data-current-view="list"] .project-caption {
  position: relative;
  z-index: 3;
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  transform: none !important;
  transition: color .18s;
}

.project-list[data-current-view="list"] h3 {
  color: var(--muted);
  font-size: 20px !important;
}

.project-list[data-current-view="list"] .project-caption {
  font-size: 16px !important;
}

.project-list[data-current-view="list"] .project:hover h3,
.project-list[data-current-view="list"] .project:focus h3,
.project-list[data-current-view="list"] .project:focus-within h3,
.project-list[data-current-view="list"] .project:hover .project-caption,
.project-list[data-current-view="list"] .project:focus .project-caption,
.project-list[data-current-view="list"] .project:focus-within .project-caption {
  color: var(--ink);
}

body.drawer-open .project-list[data-current-view="list"] .project.is-drawer-active h3,
body.drawer-open .project-list[data-current-view="list"] .project.is-drawer-active .project-caption {
  color: var(--ink);
}

.project-drawer {
  position: fixed;
  z-index: 140;
  top: 0;
  right: 0;
  width: 60vw;
  height: 100vh;
  padding: 32px 3vw 72px;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: rgba(250, 246, 242, .95);
  color: var(--ink);
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.project-drawer.is-open {
  transform: translateX(0);
}

.project-drawer__backdrop {
  position: fixed;
  z-index: 130;
  inset: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.project-drawer__backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-drawer__close {
  position: sticky;
  z-index: 2;
  top: 0;
  display: block;
  margin-left: auto;
  padding: 0 0 28px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
}

.project-drawer__close:hover,
.project-drawer__close:focus-visible {
  color: var(--accent);
}

.project-drawer__inner {
  display: grid;
  gap: 48px;
}

.project-drawer__image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #ededed;
}

.project-drawer__copy {
  display: grid;
  gap: 0;
}

.project-drawer__title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.project-drawer__subtitle {
  margin: 0;
  color: #777;
  font-size: 16px;
  line-height: 1.45;
}

.project-drawer__url {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  margin-top: 80px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: #b4b4b4;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color .1s, text-decoration-color .1s;
}

.project-drawer__url:hover,
.project-drawer__url:focus-visible {
  color: #7b7b7b;
  text-decoration-color: transparent;
}

.project-drawer__url[hidden] {
  display: none;
}

.project-drawer__meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 22px;
  row-gap: 0;
  margin: 56px 0 0;
  color: #777;
  font-size: 13px;
  line-height: 1.5;
}

.project-drawer__meta dt,
.project-drawer__meta dd {
  margin: 0;
}

.project-drawer__description,
.project-drawer__body {
  color: var(--ink);
  font-size: 14px;
  line-height: 2;
}

.project-drawer__description {
  margin: 40px 0 0;
}

.project-drawer__body {
  margin-top: 20px;
}

.project-drawer__body p {
  margin: 0 0 20px;
}

.project-drawer__body h3 {
  margin: 40px 0 16px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
}

.project-drawer__media {
  display: grid;
  gap: 16px;
  margin-top: 48px;
}

.project-drawer__media img {
  display: block;
  width: 100%;
  height: auto;
  background: #ededed;
}

footer {
  display: flex;
  justify-content: flex-start;
  padding-top: 22px;
  padding-bottom: 72px;
  border-top: 0;
  color: var(--ink);
  font-size: 16px;
}

@media (max-width: 900px) {
  .works {
    padding-top: 96px;
  }

  body.drawer-open .site-header,
  body.drawer-open .works,
  body.drawer-open footer {
    width: 95%;
    margin-right: auto;
    margin-left: auto;
  }

  .project-list[data-current-view="list"] .project {
    grid-template-columns: minmax(180px, .54fr) minmax(0, 1fr);
  }

  .project-drawer {
    width: min(92vw, 620px);
  }
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 48px;
  }

  .logo {
    font-size: 28px;
  }

  .site-header nav {
    justify-content: flex-start;
    gap: 28px;
  }

  .works {
    width: 95%;
    padding-top: 96px;
  }

  .project-list[data-current-view="list"] .project {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 16px 0;
  }

  .project-list[data-current-view="list"] h3,
  .project-list[data-current-view="list"] .project-caption {
    font-size: 16px !important;
  }

  .project-drawer {
    width: 100vw;
    padding: 24px 5vw 64px;
    background: rgba(250, 246, 242, .97);
  }

  .project-drawer__title {
    font-size: 24px;
  }

  .project-drawer__url {
    margin-top: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
