:root {
  --bg: #f5f5f7;
  --ink: #121217;
  --muted: #5c5c62;
  --shot: #eaeaee;
  --line: #e1e1e5;
  --picture: #eaeaee;
  --display: clamp(2.25rem, 4vw, 2.75rem);
  --title: 1.5rem;
  --body: 1.0625rem;
  --meta: 0.875rem;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --measure: 70rem;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141416;
  --ink: #f2f2f4;
  --muted: #9a9aa2;
  --shot: #1a1a1e;
  --line: #2e2e34;
  --picture: #1a1a1e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--body);
  line-height: 1.45;
}

::selection {
  background: color-mix(in srgb, var(--ink) 16%, var(--bg));
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.identity,
main,
.site-footer {
  width: min(var(--measure), calc(100% - 3rem));
  margin-inline: auto;
}

.identity {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-top: 1.75rem;
}

.theme {
  margin-left: auto;
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.theme:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.theme svg {
  grid-area: 1 / 1;
  display: block;
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.theme .icon-sun,
html[data-theme="dark"] .theme .icon-moon {
  opacity: 0;
  transform: scale(0.96);
  filter: blur(2px);
}

html[data-theme="dark"] .theme .icon-sun {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

@media (prefers-reduced-motion: no-preference) {
  body,
  .place,
  .place a,
  .lede,
  .meta,
  blockquote footer,
  .credential-detail,
  .piece-copy > p,
  .prose p,
  .block p,
  .block a,
  .step p,
  .site-footer,
  .site-footer p,
  .email a,
  .back a,
  .compare-pane,
  .shot span {
    transition:
      background-color 200ms var(--ease),
      color 200ms var(--ease),
      border-color 200ms var(--ease);
  }

  .theme {
    transition: transform 160ms var(--ease-out);
  }

  .theme:active {
    transform: scale(0.97);
  }

  .theme svg {
    transition:
      opacity 160ms var(--ease),
      transform 160ms var(--ease-out),
      filter 160ms var(--ease);
  }
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.name,
.place {
  margin: 0;
}

.name {
  font-size: var(--body);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.place {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: var(--meta);
}

@media (max-width: 480px) {
  .place {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

.place a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.hero {
  padding-top: 5.5rem;
}

h1 {
  margin: 0;
  max-width: 16ch;
  font-size: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero h1 {
  max-width: none;
}

.lede {
  max-width: 38rem;
  margin: 1.15rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.credential {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: fit-content;
  max-width: 100%;
  margin-top: 1.75rem;
  color: inherit;
  text-decoration: none;
}

.credential img {
  width: 44px;
  height: 44px;
  flex: none;
  display: block;
}

.credential-title,
.credential-detail {
  display: block;
}

.credential-title {
  font-size: var(--body);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.credential-detail {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: var(--meta);
}

.credential:hover .credential-title {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.work {
  padding-top: 5.5rem;
}

.pieces {
  display: flex;
  flex-direction: column;
  gap: 6.5rem;
}

.piece {
  display: block;
  color: inherit;
  text-decoration: none;
}

.shot {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: var(--shot);
  overflow: hidden;
}

.shot.shot-schema img {
  inset: 108px 132px;
  width: calc(100% - 264px);
  height: calc(100% - 216px);
}

.shot img,
.shot video {
  position: absolute;
  inset: 64px;
  width: calc(100% - 128px);
  height: calc(100% - 128px);
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
}

.shot img {
  pointer-events: none;
}

.shot-modal img {
  inset: 96px 64px;
  width: calc(100% - 128px);
  height: calc(100% - 192px);
}

.shot span {
  position: absolute;
  left: 1.1rem;
  bottom: 0.9rem;
  color: var(--muted);
  font-size: var(--meta);
}

.shot:has(img)::after,
.compare-pane::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

.piece-copy {
  display: grid;
  grid-template-columns: minmax(14rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1.5rem 3rem;
  margin-top: 1.25rem;
  align-items: start;
}

h3 {
  margin: 0;
  font-size: var(--title);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.piece-copy > p {
  margin: 0.15rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  line-height: 1.5;
}

.meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: var(--meta);
}

.meta a,
.prose a {
  color: inherit;
}

.block a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.site-footer {
  margin-top: 6.5rem;
  padding-top: 2rem;
  padding-bottom: 5rem;
  border-top: 1px solid var(--line);
}

.site-footer p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
}

.site-footer p + p {
  margin-top: 0.45rem;
}

.email a {
  color: var(--ink);
  font-size: var(--title);
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.email a:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

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

.case {
  padding-top: 3.25rem;
  padding-bottom: 5rem;
}

.back {
  margin: 0 0 1.75rem;
  font-size: var(--meta);
}

.back a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  text-decoration: none;
}

.back svg {
  display: block;
}

.back a:hover span {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.case .lede {
  margin-top: 1rem;
}

.case-line {
  max-width: 38rem;
  margin: 3.5rem 0 0;
  font-size: var(--title);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.block-main {
  margin-top: 6.5rem;
}

.case .shot {
  margin-top: 2.25rem;
}

.block {
  margin-top: 4.75rem;
}

.prose p,
.block p,
.step p {
  max-width: 40rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.steps {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}

.step .shot {
  margin-top: 1.25rem;
}

.compare {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: 1.25rem;
  border-radius: 16px;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.compare-pane {
  position: absolute;
  inset: 0;
}

.compare-pane img {
  position: absolute;
  inset: 64px;
  width: calc(100% - 128px);
  height: calc(100% - 128px);
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

.compare-after {
  background: var(--picture);
}

.compare-before {
  background: var(--shot);
  clip-path: inset(0 calc((100 - var(--pos)) * 1%) 0 0);
}

.compare-pane span {
  position: absolute;
  left: 1.1rem;
  bottom: 0.9rem;
  color: var(--muted);
  font-size: var(--meta);
}

.compare-after span {
  left: auto;
  right: 1.1rem;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--pos) * 1%);
  z-index: 3;
  width: 1px;
  background: var(--ink);
  transform: translateX(-50%);
  pointer-events: none;
}

.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(18, 18, 23, 0.12);
  transform: translate(-50%, -50%);
}

.compare input {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
}

.quotes {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  margin-top: 4.75rem;
}

blockquote {
  margin: 0;
  max-width: 40rem;
}

blockquote p {
  margin: 0;
  font-size: var(--title);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

blockquote footer {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: var(--meta);
  font-weight: 400;
  line-height: 1.35;
}

.quote-photo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

@media (max-width: 900px) {
  .identity,
  main,
  .site-footer {
    width: min(var(--measure), calc(100% - 2rem));
  }

  .hero {
    padding-top: 2.75rem;
  }

  h1 {
    max-width: none;
  }

  .pieces {
    gap: 3.5rem;
  }

  .piece-copy {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .shot {
    aspect-ratio: 16 / 10;
  }

  .shot img,
  .shot video {
    inset: 32px;
    width: calc(100% - 64px);
    height: calc(100% - 64px);
  }

  .shot.shot-schema img {
    inset: 52px 64px;
    width: calc(100% - 128px);
    height: calc(100% - 104px);
  }

  .shot-modal img {
    inset: 44px 32px;
    width: calc(100% - 64px);
    height: calc(100% - 88px);
  }

  .site-footer {
    margin-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .steps {
    gap: 3rem;
  }

  .compare {
    aspect-ratio: 16 / 10;
  }

  .compare-pane img {
    inset: 32px;
    width: calc(100% - 64px);
    height: calc(100% - 64px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shot,
  .theme,
  .theme svg {
    transition: none;
  }
}
