body {
  --page-background: #fff;
  background-color: var(--page-background);
  color: #343434;
  font: 400 16px/1.6 'Shoplift Gothic', system-ui, sans-serif;
  margin: 0;
  padding: clamp(32px, 4.45vw, 64px) clamp(20px, 4.45vw, 64px) clamp(48px, 8vw, 112px);
}

/* Type */

h2, p {
  margin: 0 0 8px;
}

h1, h2 {
  line-height: 1.4;
}

h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
}

h2 {
  font-size: 16px;
  font-weight: 500;
}

.caption {
  font-size: 13px;
  color: #6b665e;
}

a {
  color: inherit;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #1375b2;
}

.nav-link {
  text-decoration: none;
}

.nav-link:hover {
  text-decoration: underline;
}

/* Homepage */

.home {
  --section-space: 34px;
  max-width: 35rem;
}

.home, .home-intro {
  display: grid;
  gap: var(--section-space);
}

.home-intro > *, .home-work h2, .home footer p {
  margin: 0;
}

/* Selected work */

.selected-work {
  max-width: 96rem;
}

.selected-work > header {
  display: grid;
  gap: clamp(24px, 3vw, 44px);
  margin-bottom: clamp(28px, 3vw, 44px);
}

.selected-work > header h1 {
  font-size: clamp(28px, 3vw, 36px);
}

.selected-work article {
  display: grid;
  align-items: start;
  gap: 16px 24px;
}

.project-copy {
  display: grid;
  gap: 12px;
  max-width: 40rem;
}

.selected-work > header p, .project-copy p {
  margin: 0;
}

.selected-work article + article {
  margin-top: clamp(32px, 4vw, 48px);
}

@media (min-width: 54rem) {
  .selected-work article {
    grid-template-columns: minmax(0, 7fr) minmax(17rem, 3fr);
  }

  .project-copy {
    padding-top: 16px;
  }
}

.project-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
}

video.project-image {
  height: auto;
  object-fit: contain;
}

.project-image-placeholder {
  display: grid;
  place-items: center;
  background: #e8e8e8;
}

/* Password dialog */

.work-dialog {
  box-sizing: border-box;
  width: min(360px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: var(--page-background);
  color: inherit;
}

.work-dialog::backdrop {
  background: rgb(52 52 52 / 35%);
}

.work-dialog input, .work-dialog button {
  border: 1px solid #949494;
  border-radius: 4px;
  font: inherit;
  color: inherit;
}

.work-dialog input {
  box-sizing: border-box;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
}

.work-dialog [role='status'] {
  margin-top: 8px;
  color: #972e35;
}

.work-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.work-dialog button {
  padding: 7px 12px;
  background: transparent;
  cursor: pointer;
}

.work-dialog button[type='submit']:enabled {
  border-color: #1375b2;
  background: #1375b2;
  color: white;
}

.work-dialog button:disabled {
  opacity: 0.55;
  cursor: default;
}
