:root {
  --bg: #fff;
  --ink: #000;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --tile: #efefef;
  --gutter: 32px;
  --max: 1280px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, video { max-width: 100%; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
#app:focus { outline: none; }

.noscript { padding: 24px var(--gutter); }

/* Header ------------------------------------------------------------- */
.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 0;
}
.bar { flex-wrap: wrap; row-gap: 10px; }
.brand {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.bar nav { display: flex; gap: 28px; font-size: 15px; }
.bar nav a { text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.bar nav a:hover { border-bottom-color: currentColor; }
.bar nav a[aria-current="page"] { border-bottom-color: currentColor; }

/* Page shell --------------------------------------------------------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter) 96px;
}

h1 {
  margin: 0 0 14px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
h3 { margin: 10px 0 0; font-size: 15px; font-weight: 500; line-height: 1.35; }

main p { margin: 0 0 14px; max-width: 62ch; }

.muted { color: var(--muted); }

/* Work grid ---------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 24px;
  margin-top: 44px;
}

.card { display: block; text-decoration: none; }
.thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--tile);
  overflow: hidden;
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.15s; }
.card:hover .thumb img { opacity: 0.82; }
.card-title { display: block; margin-top: 10px; font-size: 15px; font-weight: 500; line-height: 1.35; }
.card:hover .card-title { text-decoration: underline; text-underline-offset: 3px; }

/* Project page ------------------------------------------------------- */
.project { max-width: 1100px; }
.credits { margin: 0 0 28px; color: var(--muted); font-size: 15px; }
.frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
video { display: block; width: 100%; background: #000; }
.frame-empty {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: var(--tile);
  color: var(--muted);
  font-size: 15px;
}
.project .text { margin-top: 24px; }
.links { margin: 18px 0 0; font-size: 15px; }
.links a { text-underline-offset: 3px; }
.gallery { margin: 32px 0 0; }
.gallery figure { margin: 0 0 24px; }
.gallery img { display: block; width: 100%; height: auto; }
.gallery figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.pager a { text-underline-offset: 3px; }

/* Finishing ---------------------------------------------------------- */
.section { margin-top: 72px; }
.section:first-of-type { margin-top: 48px; }
.items, .ba-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 24px;
  margin-top: 28px;
}
.item { margin: 0; }
.item p { margin: 6px 0 0; font-size: 15px; color: var(--muted); }

.article { display: block; text-decoration: none; }
.article .thumb { display: grid; place-items: center; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.article:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.article .go { display: inline-block; margin-top: 8px; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }

/* Before / after slider --------------------------------------------- */
.ba { margin: 0; --pos: 50%; }
.ba-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--tile); user-select: none; -webkit-user-select: none; }
.ba-stage:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); pointer-events: none; }
.ba-handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.ba-handle::before, .ba-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -5px;
  border: 5px solid transparent;
}
.ba-handle::before { left: 6px; border-right-color: #000; }
.ba-handle::after { right: 6px; border-left-color: #000; }
.ba-tag {
  position: absolute;
  bottom: 12px;
  padding: 3px 9px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
}
.ba-tag-l { left: 12px; }
.ba-tag-r { right: 12px; }
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}
.ba figcaption { margin-top: 10px; font-size: 15px; font-weight: 500; }

.reel-link { margin-top: 28px; font-size: 15px; }
.reel-link a { text-underline-offset: 3px; }

/* Footer ------------------------------------------------------------- */
.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 40px;
  color: var(--muted);
  font-size: 14px;
}

/* Smaller screens ---------------------------------------------------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .bar { padding-top: 20px; }
  .bar nav { gap: 18px; font-size: 14px; }
  main { padding-top: 40px; padding-bottom: 72px; }
  h1 { font-size: 26px; }
  .grid, .items, .ba-grid { grid-template-columns: minmax(0, 1fr); }
  .grid { margin-top: 32px; gap: 28px; }
  .section { margin-top: 56px; }
}
