:root {
  --ink: #151515;
  --muted: #55565a;
  --line: #d9d9d9;
  --paper: #fbfbfa;
  --panel: #f1f1ef;
  --nav-height: 52px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

button {
  font: inherit;
}

.site-header,
.page {
  width: min(100% - 48px, 1440px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 0 28px;
}

.brand {
  display: grid;
  gap: 3px;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: none;
}

.brand span {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: .02em;
}

.brand small,
.subtitle,
.section h2,
.number {
  text-transform: uppercase;
  letter-spacing: .28em;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 26px;
  padding-top: 13px;
  font-size: 16px;
}

.nav-is-fixed nav {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--nav-height);
  align-items: center;
  padding: 16px max(24px, calc((100vw - 1440px) / 2)) 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.baseline {
  color: #323338;
  font-size: clamp(17px, 2vw, 21px);
}

.section {
  scroll-margin-top: calc(var(--nav-height) + 18px);
  padding: 30px 0 34px;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: 14px;
  margin-bottom: 14px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  background: #202020;
  aspect-ratio: 16 / 9;
}

.video-frame.is-vertical {
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  justify-self: center;
}

.video-frame iframe,
.video-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-frame img {
  display: block;
  object-fit: cover;
}

.video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .45));
  pointer-events: none;
}

.video-frame.is-playing::after,
.video-frame.is-playing img,
.video-frame.is-playing .play-button,
.video-frame.is-playing .duration {
  opacity: 0;
  pointer-events: none;
}

.video-frame iframe {
  opacity: 0;
  pointer-events: none;
}

.video-frame.is-playing iframe {
  opacity: 1;
  pointer-events: auto;
}

.play-button {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 66px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .72);
  color: white;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform .2s ease, background .2s ease;
}

.play-button::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto 0 20px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid currentColor;
}

.play-button:hover,
.play-button:focus-visible {
  background: #111;
  transform: translate(-50%, -50%) scale(1.05);
}

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 3px 7px;
  background: rgba(0, 0, 0, .76);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.projects {
  display: grid;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 38px;
  padding: 0 0 34px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

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

.project-copy {
  align-self: start;
}

.number {
  font-size: 13px;
  margin-bottom: 4px;
}

h3 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.05;
  margin-bottom: 4px;
}

.meta {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 16px;
}

.project-copy > p:not(.number):not(.meta) {
  max-width: 58ch;
  margin-bottom: 18px;
}

h4 {
  font-size: 15px;
  margin: 18px 0 3px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
  gap: 52px;
  padding-bottom: 70px;
  padding-top: 0;
  border-top: none;
}

.about-content {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: start;
}

.about-content p + p {
  margin-top: 16px;
}

.portrait {
  display: block;
  width: 140px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
}

.contact {
  border-left: 1px solid var(--line);
  padding-left: 52px;
}

.contact p + p {
  margin-top: 18px;
}

@media (max-width: 820px) {
  :root {
    --nav-height: 58px;
  }

  .site-header,
  .page {
    width: min(100% - 32px, 1440px);
  }

  .site-header,
  .project,
  .bottom-grid,
  .about-content {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
    padding: 20px 0 22px;
  }

  nav {
    justify-content: flex-start;
    gap: 14px 20px;
    padding-top: 0;
  }

  nav a {
    white-space: nowrap;
  }

  .nav-is-fixed nav {
    flex-wrap: nowrap;
    gap: 16px;
    min-height: var(--nav-height);
    max-width: 100vw;
    padding: 15px 16px;
    overflow-x: auto;
    font-size: 16px;
    scrollbar-width: none;
  }

  .nav-is-fixed nav::-webkit-scrollbar {
    display: none;
  }

  .section {
    padding: 24px 0 30px;
  }

  .project {
    gap: 18px;
    padding-bottom: 30px;
    margin-bottom: 30px;
  }

  .video-frame.is-vertical {
    width: min(78vw, 340px);
  }

  .bottom-grid {
    gap: 34px;
  }

  .about-content {
    gap: 18px;
  }

  .portrait {
    width: 116px;
  }

  .contact {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 28px 0 0;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  .brand span {
    font-size: 30px;
  }

  nav {
    font-size: 16px;
  }

  .play-button {
    width: 56px;
    height: 56px;
  }

  .play-button::before {
    margin-left: 16px;
    border-top-width: 12px;
    border-bottom-width: 12px;
    border-left-width: 18px;
  }
}
