/* ==========================================================================
   P de Pablo
   Helvetica Now Display, in Medium only. Small type for the interface, big type for the work.
   ========================================================================== */

@font-face {
  font-family: "Helvetica Now";
  src: url("/fonts/HelveticaNowDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #767676;
  --line: #ededed;
  --surface: #f2f2f2;
  --surface-hover: #e8e8e8;
  --placeholder: #efefef;
  --glass: rgba(255, 255, 255, 0.72);

  /* The hand that says hi, everywhere it appears. */
  --hand-stroke: 1.5;

  --font: "Helvetica Now", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Type scale */
  --t-xs: 12px;
  --t-sm: 14px;
  --t-body: 15px;
  --t-lg: clamp(17px, 1.25vw, 19px);
  --t-lg-strong: clamp(20px, 1.7vw, 26px);
  --t-xl: clamp(24px, 2.2vw, 32px);
  --t-display: clamp(44px, 6.4vw, 104px);

  /* Layout */
  --max: 1600px;
  --gutter: 24px;
  --gap: 20px;
  --r-post: 48px;
  --r-panel: 28px;
  --section: clamp(112px, 11vw, 176px);
  --header: 84px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  background: var(--bg);
  /* Opening a project hides the page's scrollbar; keep its space so nothing jumps sideways. */
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--t-body);
  line-height: 1.45;
  /* Helvetica Now Display is spaced for big sizes; at text sizes it wants a little air. */
  letter-spacing: 0.01em;
  /* Only Medium is loaded: never let the browser fake a bold or an italic from it. Kerning always
     on, even where a browser would skip it on small text. */
  font-synthesis: none;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; padding: 0; }
h1, h2, h3 { font-weight: 500; font-size: inherit; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { letter-spacing: inherit; }
img, video { display: block; max-width: 100%; }

::selection { background: var(--fg); color: var(--bg); }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Type ---------------------------------------------------------------- */

.t-lg {
  font-size: var(--t-lg);
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.t-lg-strong {
  font-size: var(--t-lg-strong);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.t-xl {
  font-size: var(--t-xl);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.t-display {
  font-size: var(--t-display);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

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

/* --- Pills --------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--t-sm);
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.pill--flat {
  height: 32px;
  padding: 0 14px;
  font-size: var(--t-xs);
}

.pill--dark {
  background: rgba(10, 10, 10, 0.92);
  color: #fff;
}

.pill--glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  color: var(--fg);
}

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

@media (hover: hover) {
  a.pill:hover { background: var(--surface-hover); }
  a.pill--dark:hover { background: var(--fg); }

  /* Footer links go black, like the Contact button. */
  a.pill--invert:hover,
  a.pill--invert:hover .muted {
    background: var(--fg);
    color: #fff;
  }
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pills--center { justify-content: center; }

/* --- Segmented control (nav, view toggle) -------------------------------- */

.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(242, 242, 242, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
}

.seg__item {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.seg__item[aria-current="page"],
.seg__item[aria-pressed="true"] {
  background: #fff;
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}

.seg--small .seg__item {
  height: 28px;
  padding: 0 14px;
  font-size: var(--t-xs);
}

@media (hover: hover) {
  .seg__item:hover { color: var(--fg); }
}

/* --- Panels -------------------------------------------------------------- */

.panel {
  background: var(--surface);
  border-radius: var(--r-panel);
  padding: 20px 24px;
}

.panel h2 {
  font-size: var(--t-sm);
  margin-bottom: 12px;
}

.panel a { transition: color 0.2s ease; }

@media (hover: hover) {
  .panel a:hover { color: var(--fg); }
}

/* --- Media --------------------------------------------------------------- */

.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-post);
  background: var(--placeholder);
  aspect-ratio: var(--ratio, auto);
  /* Keeps the rounded clip on Safari while children transform. */
  isolation: isolate;
}

/* ?n: the piece's number in its corner (focus.js). */
.show-n :is(.e-proj__media, .proj-body, .proj-hero) .media[data-n]::after {
  content: attr(data-n);
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  color: #0a0a0a;
  font-size: var(--t-sm);
  letter-spacing: 0.01em;
  pointer-events: none;
}

.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Header -------------------------------------------------------------- */

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: #fff;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  max-width: var(--max);
  margin-inline: auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.site-header__logo {
  font-size: 20px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.site-header__nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.site-header__contact {
  height: 44px;
  padding: 0 20px;
  font-weight: 500;
}

/* --- Home: profile on the left, work on the right ------------------------ */

.home {
  max-width: var(--max);
  margin-inline: auto;
  padding: calc(var(--header) + 24px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.profile {
  position: sticky;
  top: calc(var(--header) + 24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile__photo {
  width: 120px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 60% 30%;
  border-radius: 24px;
}

.profile__name h1 { font-size: var(--t-lg); line-height: 1.3; }
.profile__name p { font-size: var(--t-sm); }

.profile__now {
  align-self: flex-start;
  height: auto;
  min-height: 32px;
  padding-block: 8px;
  white-space: normal;
  text-align: left;
  line-height: 1.3;
}
.profile__now a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(0, 0, 0, 0.25); }

.dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1fb35a;
  box-shadow: 0 0 0 3px rgba(31, 179, 90, 0.18);
}

.profile__bio {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-wrap: pretty;
}

.profile__bio a,
.profile__bio span,
.about__text span {
  color: var(--muted);
  transition: color 0.2s ease;
}

@media (hover: hover) {
  .profile__bio a:hover { color: var(--fg); }
}

.home__work {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.reel { aspect-ratio: 16 / 9; }

/* --- Work: grid or list -------------------------------------------------- */

.work-page {
  max-width: var(--max);
  margin-inline: auto;
  padding: calc(var(--header) + 56px) var(--gutter) 0;
}

.work-view__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px 20px;
  font-size: var(--t-sm);
}

.work-page .work-view__head h2 { font-size: var(--t-xl); letter-spacing: -0.025em; }

.work-view[data-view="grid"] .list,
.work-view[data-view="list"] .tiles { display: none; }

/* Grid: one shape per grid, so rows line up. */
.tiles {
  display: grid;
  gap: var(--gap);
  align-items: start;
}
.tiles--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.tile {
  position: relative;
  display: block;
}

.tile__media img,
.tile__media video {
  transition: transform 0.9s var(--ease-out);
}

/* On desktop the work speaks for itself; title and year appear on hover. */
.tile__hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.35s var(--ease-out);
}

.tile__caption { display: none; }

.tile:focus-visible { outline-offset: 4px; border-radius: var(--r-post); }
.tile:focus-visible .tile__hover { opacity: 1; transform: none; }

@media (hover: hover) {
  .tile:hover .tile__hover { opacity: 1; transform: none; }
  .tile:hover .tile__media img,
  .tile:hover .tile__media video { transform: scale(1.03); }
}

/* List: small titles, preview follows the cursor. */
.list-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px 4px;
  border-top: 1px solid var(--line);
}

.list li:last-child .list-row { border-bottom: 1px solid var(--line); }

.list-row__title {
  font-size: var(--t-lg);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: transform 0.45s var(--ease-out);
}

.list-row__desc { transition: color 0.2s ease; }

.list-row__meta {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.list-row__thumb {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  width: clamp(200px, 18vw, 280px);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  pointer-events: none;
  opacity: 0;
  transform: translate(calc(var(--x, -999px) + 24px), calc(var(--y, -999px) - 50%)) scale(0.9) rotate(-2deg);
  transition: opacity 0.2s ease, transform 0.5s var(--ease-out);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

@media (hover: hover) {
  .list-row:hover .list-row__title { transform: translateX(8px); }
  .list-row:hover .list-row__desc { color: var(--fg); }
  .list-row:hover .list-row__thumb {
    opacity: 1;
    transform: translate(calc(var(--x, -999px) + 24px), calc(var(--y, -999px) - 50%)) scale(1) rotate(0deg);
  }
}

@media (hover: none) {
  .list-row__thumb { display: none; }
}

/* --- Page heads ---------------------------------------------------------- */

.page-head {
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(140px, 20vh, 220px) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.page-head--end { padding-top: var(--section); gap: 16px; }
.page-head--tall { min-height: 60vh; justify-content: center; padding-top: 0; }

/* --- About --------------------------------------------------------------- */

.about-intro { max-width: 760px; }

.about {
  max-width: 1120px;
  margin: 72px auto 0;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.about__photo { position: relative; }

.about__photo figcaption {
  position: absolute;
  left: 20px;
  bottom: 20px;
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 8px 0 24px;
}

.panels {
  max-width: 1120px;
  margin: var(--section) auto 0;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}

.panel--wide { grid-column: 1 / -1; }

.rows li {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  gap: 12px;
  padding-block: 4px;
}
.rows li > :last-child { text-align: right; }

/* --- Project page -------------------------------------------------------- */

.proj-head {
  max-width: 1280px;
  gap: 24px;
}

.proj-hero {
  position: relative;
  max-width: var(--max);
  margin: 64px auto 0;
  padding-inline: var(--gutter);
}

.proj-hero__media { aspect-ratio: 16 / 9; }

.has-player { position: relative; container-type: inline-size; }
/* A video with sound: a bar like Safari's along its foot, on glass. Icons from Central, filled.
   It stays until the video is touched; after that it shows on hover, while paused, and goes again
   when the mouse rests (data-idle). Full screen is the piece itself, the film fitted on black. */
.player {
  position: absolute;
  inset: auto 12px 12px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: opacity .3s ease;
}
.player__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 720px;
  height: 48px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--fg);
}
.player__btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: inherit;
  transition: transform .15s ease, background-color .15s ease;
}
.player__btn[hidden] { display: none; }
.player__btn:active { transform: scale(.9); }
@media (hover: hover) {
  .player__btn:hover { background: rgba(10, 10, 10, .06); }
}
.player__btn svg { width: 18px; height: 18px; fill: currentColor; }
/* Apple's arrows run top left to bottom right; Central's the other way. */
.player__expand,
.player__shrink { transform: scaleX(-1); }
.player__play,
.player__off,
.player__half,
.player__on,
.player__shrink,
.player[data-paused] .player__pause,
.player:is([data-full], [data-zoomed]) .player__expand { display: none; }
.player[data-paused] .player__play,
.player[data-level="off"] .player__off,
.player[data-level="half"] .player__half,
.player[data-level="on"] .player__on,
.player:is([data-full], [data-zoomed]) .player__shrink { display: block; }

.player__time {
  flex: none;
  min-width: 4.2ch;
  padding-inline: 4px;
  font-size: var(--t-sm);
  letter-spacing: .01em;
  white-space: nowrap;
}
.player__time--left { color: var(--muted); text-align: right; }
.player:not([data-ready]) .player__time { visibility: hidden; }

/* The scrubber and the volume: a thin line that fills black, with a dot to hold. */
.player__scrub,
.player__level {
  --p: 0%;
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  margin: 0 4px;
  background: transparent;
  cursor: pointer;
}
.player__scrub { flex: 1; min-width: 0; }
.player__scrub::-webkit-slider-runnable-track,
.player__level::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--fg) var(--p), rgba(10, 10, 10, .16) var(--p));
}
.player__scrub::-moz-range-track,
.player__level::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--fg) var(--p), rgba(10, 10, 10, .16) var(--p));
}
.player__scrub::-webkit-slider-thumb,
.player__level::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--fg);
}
.player__scrub::-moz-range-thumb,
.player__level::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--fg);
}
.player__scrub:focus-visible,
.player__level:focus-visible { outline-offset: 2px; }

/* Volume: the speaker, and with a mouse its level slides out beside it. A phone sets the volume
   with its own buttons. */
.player__vol { flex: none; display: flex; align-items: center; }
.player__level { width: 0; margin: 0; opacity: 0; transition: width .25s ease, margin .25s ease, opacity .2s ease; }
@media (hover: hover) {
  .player__vol:is(:hover, :focus-within) .player__level { width: 64px; margin: 0 8px 0 2px; opacity: 1; }
}
@media (hover: none) {
  .player__level { display: none; }
}

/* Expanded: the film out of its place, filling the window over black (site.js). */
.player-zoom {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  background: transparent;
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  transition: background-color .35s ease, backdrop-filter .35s ease, -webkit-backdrop-filter .35s ease;
}
.player-zoom.is-in {
  background: rgba(0, 0, 0, .92);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.player-zoom > .has-player { flex: none; margin: 0; }

/* A narrow piece keeps the buttons and the scrubber; the time goes. */
@container (max-width: 420px) {
  .player__time { display: none; }
  .player { inset: auto 8px 8px; }
  .player__bar { height: 40px; padding: 0 4px; gap: 0; }
  .player__btn { width: 32px; height: 32px; }
  .player__btn svg { width: 16px; height: 16px; }
}

@media (hover: hover) {
  .has-player:has(.player[data-touched]:not([data-paused])):is(:not(:hover), [data-idle]) .player { opacity: 0; }
  .has-player:has(.player[data-touched]:not([data-paused]))[data-idle] { cursor: none; }
}

.has-player:fullscreen { border-radius: 0; background: #000; }
.has-player:-webkit-full-screen { border-radius: 0; background: #000; }
.has-player:fullscreen video { object-fit: contain; }
.has-player:-webkit-full-screen video { object-fit: contain; }
.has-player:fullscreen .player { inset: auto 24px 24px; }
.has-player:-webkit-full-screen .player { inset: auto 24px 24px; }

.row {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  gap: var(--gap);
}

.row + .row { margin-top: var(--gap); }

/* Items in a row share one height: each grows in proportion to its aspect ratio. */
.row > .media { flex: calc(var(--ratio)) 1 0%; }

.statement {
  max-width: 760px;
  margin-inline: auto;
  padding: var(--section) var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.statement p {
  max-width: 560px;
  text-wrap: pretty;
}

.divider {
  max-width: 1400px;
  margin-inline: auto;
  padding: var(--section) var(--gutter);
  text-align: center;
}

.proj-about {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--section) var(--gutter) 0;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.proj-about__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: 48px;
}

.proj-about__credits {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.proj-about__credits dt { font-size: var(--t-xs); }

.next {
  max-width: var(--max);
  margin: var(--section) auto 0;
  padding-inline: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.next__tile { width: 100%; }
.next__tile .tile__hover { opacity: 1; transform: none; }

/* --- Footer: one row of pills ------------------------------------------- */

.site-footer {
  max-width: var(--max);
  margin: var(--section) auto 0;
  padding: 0 var(--gutter) var(--gutter);
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.site-footer .pill {
  justify-content: space-between;
  gap: 12px;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1100px) {
  .home { grid-template-columns: 1fr; gap: 56px; }
  .profile { position: static; max-width: 560px; }
  .tiles--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__tagline { grid-column: 1 / -1; }
  .list-row { grid-template-columns: minmax(0, 1fr) auto; }
  .list-row__desc { display: none; }
}

@media (max-width: 760px) {
  :root {
    --gutter: 12px;
    --gap: 12px;
    --r-post: 28px;
    --r-panel: 22px;
    --header: 68px;
  }

  body { padding-bottom: 88px; }

  /* Contact stays top right; Work and About float at the bottom. */
  .site-header { padding: 14px 16px; }
  .site-header__nav {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  }
  .site-header__contact { height: 40px; padding: 0 18px; }

  .home { padding-inline: 16px; }
  .home__work { margin-inline: -4px; gap: 40px; }
  .profile__photo { width: 96px; }

  /* On phones there is no hover, so the title sits under each tile. */
  .tiles--2,
  .tiles--3 { grid-template-columns: 1fr; row-gap: 28px; }
  .tile__hover { display: none; }
  .tile__caption {
    display: block;
    padding: 10px 6px 0;
    font-weight: 500;
  }

  .list-row { gap: 4px 12px; padding: 14px 4px; }
  .list-row__desc { display: block; grid-column: 1 / -1; grid-row: 2; font-size: var(--t-sm); }
  .list-row__meta .pill:first-child { display: none; }

  .work-page { padding-top: calc(var(--header) + 32px); }

  .page-head { padding-top: 120px; }

  .about { grid-template-columns: 1fr; margin-top: 48px; }
  .about__photo { max-width: 360px; }
  .about__text { padding: 8px 4px 0; }

  .panels { grid-template-columns: 1fr; }
  .rows li { grid-template-columns: 1fr auto; row-gap: 0; }
  .rows li > :nth-child(2) { grid-row: 2; }
  .rows li > :nth-child(3) { grid-row: 1; grid-column: 2; }

  .row { flex-direction: column; }
  .row > .media { flex: none; width: 100%; }

  .proj-hero { margin-top: 40px; }
  .proj-about { grid-template-columns: 1fr; }
  .proj-about__text { padding-right: 0; }

  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer .pill:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}

/* --- Contact (direction A) ---------------------------------------------- */

.contact__photo {
  width: 96px;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 60% 30%;
  border-radius: 50%;
}

.contact-panels {
  max-width: 1120px;
  margin: 96px auto 0;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.contact-panels .panel { padding: 28px; }
.contact-panels h2 { margin-bottom: 16px; }

.row-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #e3e3e3;
}
.row-list li:last-child { border-bottom: 1px solid #e3e3e3; }
.row-list li p:first-child { font-weight: 500; }

@media (max-width: 760px) {
  .contact-panels { grid-template-columns: 1fr; margin-top: 56px; }
  .contact-panels .panel { padding: 20px; }
}

/* --- Direction switcher (preview only) ----------------------------------- */

.switcher {
  position: fixed;
  left: 16px;
  bottom: 16px;
  max-width: calc(100vw - 32px);
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 250;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.88);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
}

.switcher a {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: var(--t-xs);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.switcher a[aria-current="page"] { background: #fff; color: var(--fg); }

@media (hover: hover) {
  .switcher a:not([aria-current="page"]):hover { color: #fff; }
}

@media (max-width: 760px) {
  .switcher { left: 50%; bottom: 72px; transform: translateX(-50%); }
}

@media print {
  .switcher { display: none; }
}

/* On touch, every small control gets a 44px tall hit area, whatever it looks like. */
@media (pointer: coarse) {
  .pill,
  .h-pill,
  .seg__item,
  .e-intro__nav a,
  .e-intro__nav button,
  .n-nav a,
  .n-nav button,
  .f-corner > * {
    position: relative;
  }

  .pill::before,
  .h-pill::before,
  .seg__item::before,
  .e-intro__nav a::before,
  .e-intro__nav button::before,
  .n-nav a::before,
  .n-nav button::before,
  .f-corner > *::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    min-height: 44px;
    height: 100%;
    transform: translateY(-50%);
  }
}

