@font-face {
  font-family: "Young Serif";
  src: url("fonts/YoungSerif-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Terminal Grotesque";
  src: url("fonts/TerminalGrotesque-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "BDO Grotesk";
  src: url("fonts/BDOGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "BDO Grotesk";
  src: url("fonts/BDOGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --color-white: #ffffff;
  --color-white-80: rgba(255, 255, 255, 0.8);
  --color-white-75: rgba(255, 255, 255, 0.75);
  --color-white-50: rgba(255, 255, 255, 0.5);
  --color-white-10: rgba(255, 255, 255, 0.1);
  --color-white-05: rgba(255, 255, 255, 0.05);
  --color-black: #000000;
  --font-serif: "Young Serif", system-ui, sans-serif;
  --font-mono: "Terminal Grotesque", system-ui, sans-serif;
  --font-body: "BDO Grotesk", system-ui, sans-serif;
  --font-sans: system-ui, sans-serif;

  /* Typography scale: font-size/line-height pairs reused across components */
  --fs-display: 36px;
  --lh-display: 30px;
  --fs-lead: 18px;
  --lh-lead: 22px;
  --lh-lead-tight: 20px;
  --fs-body: 16px;
  --lh-body: 20px;
  --fs-meta: 14px;
  --lh-meta: 18px;

  /* Spacing scale: gap/padding values reused across components */
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-20: 20px;
  --space-40: 40px;
  --space-80: 80px;
  --space-120: 120px;
  --space-144: 144px;

  /* Fluid section gutters: shrink toward the viewport edge on small screens,
     hold their authored desktop value once there's room for it. */
  --gutter: clamp(20px, 6vw, 320px);
  --gutter-sm: clamp(20px, 6vw, 120px);

  /* Radius */
  --radius-full: 1000px;
  --radius-md: 12px;

  /* Motion */
  --transition-base: 0.4s ease;
  --transition-fast: 0.2s ease;
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hacks .project--activist-toolkit,
.works .job:first-of-type {
  scroll-margin-top: 192px;
}

.page {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  overflow: clip;
}

/* Shared: lead/sub copy block used by project, ghost, and job entries */
.copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  max-width: 765px;
}

.copy__lead {
  margin: 0;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  text-align: center;
  text-wrap: balance;
}

.copy__sub {
  margin: 0;
  color: var(--color-white-50);
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  text-align: center;
  text-wrap: balance;
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-80);
  /* Must be reachable by native scroll: hero-loop is the infinite-scroll
     boundary and sits last in the document, so if it's shorter than the
     viewport the browser has nowhere left to scroll to and the loop can
     never trigger. */
  min-height: max(1024px, 100vh);
  padding: var(--space-120) var(--gutter);
}

.hero__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-120);
  width: 100%;
}

.hero__portrait-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-20);
}

.hero__portrait {
  width: 100%;
  max-width: 574px;
  aspect-ratio: 574 / 240;
  height: auto;
  border-top-left-radius: 53px;
  border-top-right-radius: 53px;
  opacity: 0.5;
}

.hero__identity {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 133px;
  width: 100%;
  max-width: 574px;
  margin-top: -27px;
}

.hero__badge {
  width: 24px;
  height: 16px;
  flex-shrink: 0;
}

.hero__badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero__name {
  width: 200px;
  margin: 0;
  color: var(--color-white);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  text-align: center;
}

.hero__clock {
  width: max-content;
  min-width: 110px;
  height: 16px;
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  text-align: right;
  white-space: nowrap;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-20);
  width: 100%;
  max-width: 765px;
}

.hero__lead {
  margin: 0;
  width: 100%;
  max-width: 765px;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  text-align: center;
  text-wrap: balance;
}

.hero__sub {
  margin: 0;
  width: 100%;
  max-width: 765px;
  color: var(--color-white-50);
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  text-align: center;
  text-wrap: balance;
}

.hero__cta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) var(--space-40);
}

/* Hacks section */
.hacks {
  display: flex;
  flex-direction: column;
}

/* Section nav: fixed 3-row stack, hidden above the viewport during hero,
   slides in once the works section reaches the very top. */
.section-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform var(--transition-base);
}

.section-nav.is-visible {
  transform: translateY(0);
}

/* Collapsed by default: only the current section's row shows.
   Clicking/hovering (aria-expanded="true") reveals all three rows.
   `order` keeps the current row permanently first (never shifts under the
   cursor) and lays out the rest in scroll order from there (page order is
   About -> Works -> Hacks, looping back to About): while in works, HACKS
   (what's next) sits right below it and ABOUT (already passed) drops to the
   bottom; while in hacks, ABOUT (next, via the loop) follows and WORKS
   (already passed) drops to the bottom. */
.section-nav__row {
  display: none;
  order: 3;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-20) var(--space-40);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.section-nav[data-current="hacks"] .section-nav__row--about {
  order: 1;
}

.section-nav[data-current="hacks"] .section-nav__row--works {
  order: 2;
}

.section-nav[data-current="works"] .section-nav__row--hacks {
  order: 1;
}

.section-nav[data-current="works"] .section-nav__row--about {
  order: 2;
}

.section-nav__row.is-current {
  display: flex;
  order: 0;
}

.section-nav[aria-expanded="true"] .section-nav__row {
  display: flex;
  background: rgba(0, 0, 0, 0.8);
}

.section-nav__row.is-pressed {
  background: rgba(0, 0, 0, 1);
}

.section-nav__row-label {
  margin-left: auto;
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  opacity: 0.4;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.section-nav__row:hover .section-nav__row-label {
  color: rgba(255, 255, 255, 0.6);
}

.section-nav__row.is-current .section-nav__row-label {
  opacity: 1;
}

/* Hamburger only shows on the collapsed handle row; expanded rows go bare.
   There's no dedicated close affordance — closing happens via hover-out on
   desktop, or by tapping outside the nav on touch (see script.js). */
.section-nav__hamburger-icon {
  display: none;
  flex-shrink: 0;
}

.section-nav[aria-expanded="false"] .section-nav__row.is-current .section-nav__hamburger-icon {
  display: block;
}

/* Spacer reserves room at the top of the hacks section so its content
   isn't hidden under the fixed nav ("pulls the page down" as it slides in / expands). */
.nav-spacer {
  height: 0;
  transition: height var(--transition-base);
}

/* On narrower/touch viewports the nav docks to the bottom edge instead of the
   top (thumb-reachable, matches native app tab bars). It still only grows
   upward off the bottom edge as rows expand, so no top-side spacer is needed
   to keep content clear of it. */
@media (max-width: 1023px) {
  .section-nav {
    top: auto;
    bottom: 0;
    transform: translateY(100%);
  }

  .section-nav.is-visible {
    transform: translateY(0);
  }

  .nav-spacer {
    height: 0 !important;
  }

  .hacks .project--activist-toolkit,
  .works .job:first-of-type {
    scroll-margin-top: 0;
  }

  /* On mobile the desktop hero's 120px padding + 1024px min-height forces
     the CTA well below the fold. Shrink both so the portrait, copy and
     button all land within the first viewport. */
  .hero {
    gap: var(--space-80);
    min-height: 100svh;
    padding: var(--space-40) var(--gutter);
  }

  .hero__top {
    gap: var(--space-80);
  }

  .hero__portrait-wrap {
    padding: var(--space-8) var(--space-8) 0;
  }

  /* Zero out the vertical padding here so the space above the button is
     governed entirely by .hero's gap, matching the portrait-to-copy gap
     (governed by .hero__top's gap) instead of stacking on top of it. */
  .hero__cta-wrap {
    padding: 0 var(--space-40);
  }
}

.project {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-40);
  padding: var(--space-80) var(--gutter);
}

.project--mandinga {
  border-top: 1px solid var(--color-white-10);
}

.project__title-image {
  width: 168px;
  height: auto;
}

.project__tags {
  display: flex;
  align-items: center;
  gap: var(--space-20);
}

.tag-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-6) 8px;
  border-radius: var(--radius-full);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.tag-pill__text {
  font-family: var(--font-body);
  font-weight: 400;
}

.tag-pill--github {
  text-decoration: none;
  transition: transform 0.2s ease;
}

.tag-pill--github:hover {
  transform: scale(1.08);
}

.tag-pill__label {
  position: relative;
  display: inline-grid;
  justify-items: end;
}

.tag-pill__label-text {
  grid-area: 1 / 1;
  text-align: right;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.tag-pill__label-text:first-child {
  opacity: 1;
}

.tag-pill__avatars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.avatar {
  position: relative;
  display: inline-flex;
}

.avatar__thumb {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  object-fit: cover;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.avatar:hover .avatar__thumb,
.avatar:focus-within .avatar__thumb {
  transform: scale(1.3);
  box-shadow: 0 0 0 2px var(--color-black);
}

.tag-pill:has(.avatar:nth-child(1):hover) .tag-pill__label-text:nth-child(2),
.tag-pill:has(.avatar:nth-child(1):focus-within) .tag-pill__label-text:nth-child(2),
.tag-pill:has(.avatar:nth-child(2):hover) .tag-pill__label-text:nth-child(3),
.tag-pill:has(.avatar:nth-child(2):focus-within) .tag-pill__label-text:nth-child(3),
.tag-pill:has(.avatar:nth-child(3):hover) .tag-pill__label-text:nth-child(4),
.tag-pill:has(.avatar:nth-child(3):focus-within) .tag-pill__label-text:nth-child(4) {
  opacity: 1;
}

.tag-pill:has(.avatar:hover) .tag-pill__label-text:first-child,
.tag-pill:has(.avatar:focus-within) .tag-pill__label-text:first-child {
  opacity: 0;
}

.tag-pill__github {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.project__gallery {
  display: flex;
  align-items: center;
  gap: var(--space-20);
  max-width: 100%;
}

.project__gallery img {
  height: 394px;
  width: auto;
  object-fit: cover;
}

.project__award {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  width: 214px;
}

.project__award-badge {
  width: 83px;
  height: 83px;
  mix-blend-mode: plus-lighter;
}

.project__award-badge--sm {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.project__award-title {
  margin: 0;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  line-height: 16px;
  text-align: center;
}

.project__award-year {
  margin: 0;
  color: var(--color-white-50);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.project__awards-row {
  display: flex;
  align-items: center;
  gap: var(--space-20);
}

.project__award--compact {
  width: 126px;
}

.project__logo-image {
  width: 161px;
  height: 85px;
  object-fit: contain;
}

.project__frame {
  position: relative;
  width: 799px;
  max-width: 100%;
  aspect-ratio: 799 / 428;
  height: auto;
  border-radius: var(--radius-md);
  outline: 1px solid #efefef;
  overflow: hidden;
}

.project__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0% 30%;
}

/* Transition */
.transition {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-120);
  padding: clamp(60px, 12vw, 160px) var(--gutter-sm);
  border-top: 1px solid var(--color-white-10);
}

.transition__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-120);
}

.transition__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.transition__lead {
  margin: 0;
  max-width: 765px;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  text-align: center;
  text-wrap: balance;
}

.speed-jitter {
  display: inline-block;
  overflow: visible;
  padding-right: 0.15em;
  font-style: italic;
  animation: speed-jitter 0.18s steps(2, end) infinite;
}

@keyframes speed-jitter {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-1.5px);
  }
  40% {
    transform: translateX(1.5px);
  }
  60% {
    transform: translateX(-1px);
  }
  80% {
    transform: translateX(1px);
  }
  100% {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .speed-jitter {
    animation: none;
  }
}

.transition__sub {
  margin: 0;
  max-width: 765px;
  color: var(--color-white-50);
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  text-align: center;
  text-wrap: balance;
}

.transition__strip {
  display: flex;
  align-items: center;
  gap: var(--space-20);
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  transition: transform var(--transition-spring);
}

.transition__strip img {
  object-fit: cover;
  flex-shrink: 0;
}

.transition-item {
  position: relative;
  margin: 0;
  line-height: 0;
  transition: opacity var(--transition-spring), transform var(--transition-spring);
}

/* Hovering any thumbnail dims its siblings; the hovered one stays put. */
.transition__strip:has(.transition-item:hover) .transition-item:not(:hover),
.closing__collage:has(.transition-item:hover) .transition-item:not(:hover) {
  opacity: 0.05;
}

/* Opt-in per item: the same <img> scales up in place (no second image),
   revealing a details panel anchored to its own right edge. --scale-x/-y
   and --details-offset are set inline per item, derived from the target
   enlarged size vs. the thumbnail's own base size. */
.transition-item--expand img.mockup {
  position: relative;
  transform-origin: left center;
  transition: transform var(--transition-spring);
}

.transition-item--expand:hover {
  z-index: 2;
}

.transition-item--expand:hover img.mockup {
  transform: scale(var(--scale-x), var(--scale-y));
}

.transition-item__details {
  position: absolute;
  left: 100%;
  top: 50%;
  width: 280px;
  box-sizing: border-box;
  margin-left: var(--details-offset);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity var(--transition-spring);
}

.transition-item--expand:hover .transition-item__details {
  opacity: 1;
}

/* Variant used by projects without an Open Source badge: title+meta grouped
   as a header, description below, instead of Hopline's flat stacked order. */
.transition-item__details--stacked {
  gap: var(--space-20);
}

.transition-item__details-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  gap: var(--space-8);
}

.transition-item__details-head .transition-item__meta {
  margin-top: 0;
}

.transition-item__title {
  margin: 0;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 24px;
}

.transition-item__wordmark {
  display: block;
  height: 24px;
  width: auto;
}

.transition-item__desc {
  margin: 0;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  color: var(--color-white-75);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 24px;
}

.transition-item__meta {
  margin: var(--space-8) 0 0;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  color: var(--color-white-50);
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
}

.transition__caption {
  margin: 0;
  width: 244px;
  color: var(--color-white-75);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-align: center;
}

/* Shared: career/project entry meta used by ghost and job articles */
.entry__role {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 200px;
}

.entry__role-title {
  margin: 0;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-align: center;
}

.entry__role-sub {
  margin: 0;
  color: var(--color-white-50);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-align: center;
}

.entry__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-20);
  color: var(--color-white-75);
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
}

.entry__block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-20);
  width: 100%;
  max-width: 608px;
}

.entry__block-label {
  margin: 0;
  color: var(--color-white-50);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.entry__block-text {
  margin: 0;
  color: var(--color-white-80);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.entry__did-grid {
  display: flex;
  align-items: flex-start;
  gap: var(--space-20);
  width: 100%;
}

.entry__did-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-8);
  flex: 1;
}

.entry__did-title {
  margin: 0;
  color: var(--color-white-80);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.entry__did-text {
  margin: 0;
  color: var(--color-white-80);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* Ghost */
.ghost {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-80);
  padding: var(--space-80) var(--gutter-sm);
  border-top: 1px solid var(--color-white-10);
}

.ghost__logo {
  width: 68px;
  height: 68px;
}

.ghost__hero-shot {
  width: 684px;
  max-width: 100%;
  aspect-ratio: 684 / 408;
  height: auto;
  object-fit: cover;
}

.ghost__pair {
  display: flex;
  align-items: center;
  gap: var(--space-20);
  max-width: 100%;
}

.ghost__pair img {
  width: 524px;
  max-width: 100%;
  aspect-ratio: 524 / 372;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.ghost__banner {
  width: 100%;
  max-width: 1440px;
  aspect-ratio: 1440 / 763;
  height: auto;
  overflow: clip;
  position: relative;
}

.ghost__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Works / Job */
.works {
  display: flex;
  flex-direction: column;
}

.job {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-80);
  padding: var(--space-80) 26px;
}

.job__logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.job__gallery {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}

.job__gallery img {
  width: 181px;
  height: 392px;
  object-fit: cover;
}

.job__gallery--wide {
  gap: var(--space-20);
}

.job__narrative {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
  width: 608px;
  max-width: 100%;
}

.job__did-table {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  width: 608px;
  max-width: 100%;
}

.job__did-table .job__did-table-col-title {
  margin: 0;
  color: var(--color-white-50);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.job__did-table-body {
  display: flex;
  gap: var(--space-20);
}

.job__did-table-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  flex: 1;
}

.job__did-table-col p {
  margin: 0;
  color: var(--color-white-80);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.job--lego {
  padding: var(--space-80) var(--gutter-sm);
  border-top: 1px solid var(--color-white-10);
}

.job__logo--square {
  width: 66px;
  height: 66px;
  border-radius: 0;
}

.job__hero-shot {
  width: 681px;
  max-width: 100%;
  aspect-ratio: 480 / 317;
  height: auto;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.job__pair {
  display: flex;
  align-items: center;
  gap: var(--space-20);
  max-width: 100%;
}

.job__pair-card {
  width: 633px;
  max-width: 100%;
  aspect-ratio: 480 / 317;
  height: auto;
  border-radius: 10px;
  overflow: clip;
  position: relative;
}

.job__pair-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Closing */
.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-144);
  padding: var(--space-144) var(--gutter-sm);
  border-top: 1px solid var(--color-white-10);
}

.closing__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: 896px;
  max-width: 100%;
}

.closing__lead {
  margin: 0;
  color: var(--color-white);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead-tight);
  text-align: center;
  text-wrap: balance;
  width: 896px;
  max-width: 100%;
}

.closing__sub {
  margin: 0;
  color: var(--color-white-50);
  font-size: var(--fs-lead);
  line-height: var(--lh-lead-tight);
  text-align: center;
  text-wrap: balance;
  width: 896px;
  max-width: 100%;
}

/* Hidden by default; shown only on mobile, where the closing CTA line
   should break after "work" instead of wherever text-wrap: balance lands. */
.mobile-break {
  display: none;
}

.closing__collage {
  display: flex;
  align-items: center;
  gap: var(--space-20);
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  transition: transform var(--transition-spring);
}

.closing__collage img {
  object-fit: cover;
  flex-shrink: 0;
}

.closing__row-break {
  display: none;
}

.pill-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-6) 12px;
  background: var(--color-white-05);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-white-10);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.pill-button::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(60px 40px at 50% 0%, var(--color-white-80), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.pill-button:hover {
  transform: scale(1.08);
  background: var(--color-white-10);
}

.pill-button:hover::before {
  opacity: 1;
}

/* Responsive: mockup galleries turn into horizontal scroll-snap strips (with
   the native scrollbar hidden) once the desktop gutters no longer fit the
   viewport. The transition strip and closing collage go the other way —
   they wrap into a small-tile "honeycomb" grid instead of scrolling. */
@media (max-width: 1023px) {
  .project__gallery,
  .job__gallery,
  .job__pair,
  .ghost__pair {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .project__gallery::-webkit-scrollbar,
  .job__gallery::-webkit-scrollbar,
  .job__pair::-webkit-scrollbar,
  .ghost__pair::-webkit-scrollbar {
    display: none;
  }

  .project__gallery img,
  .job__gallery img {
    scroll-snap-align: center;
  }

  /* Big hero-sized pair images: let the next one peek in from the edge
     instead of exactly filling the viewport, as a visual cue there's more
     to scroll — matching the small-thumbnail galleries' scroll affordance. */
  .job__pair-card,
  .ghost__pair img {
    flex-shrink: 0;
    width: 88%;
    scroll-snap-align: start;
  }

  /* Shrink thumbnails so the strip wraps into a dense grid instead of
     needing to scroll. Sizes are set inline per item, so !important is
     required to override them here. */
  .transition-item--expand img.mockup {
    height: 48px !important;
    width: auto !important;
  }

  /* Hover-to-expand only makes sense with a mouse; on touch, leaving these
     active risks a stuck expanded state after a tap. */
  .transition-item--expand:hover img.mockup {
    transform: none;
  }

  .transition-item--expand:hover .transition-item__details {
    opacity: 0;
  }

  .closing__collage {
    gap: var(--space-8);
  }

  .mobile-break {
    display: inline;
  }

  /* Force the closing collage into exactly 3 rows (2 items, then 4, then 3)
     instead of letting flex-wrap break wherever items happen to fit. */
  .closing__row-break {
    display: block;
    flex-basis: 100%;
    width: 0;
    height: 0;
  }

  /* Desktop-only forced line breaks read as awkward orphan lines once the
     container is narrower than the width they were balanced for. */
  .hard-break {
    display: none;
  }
}

@media (max-width: 599px) {
  .hero__identity {
    gap: var(--space-20);
  }

  .entry__did-grid,
  .job__did-table-body {
    flex-direction: column;
  }
}

/* Lightbox: focus mode for mockup screenshots */
.mockup {
  cursor: zoom-in;
}

/* Transition-strip mockups already reveal detail on hover at desktop sizes,
   so the lightbox is only wired up for them below 1024px (see script.js). */
@media (min-width: 1024px) {
  .transition-item .mockup {
    cursor: default;
  }
}

/* No opacity/visibility here on purpose: this container (and anything
   parented inside it, including the real mockup <img> mid-transition — see
   script.js) must never fade. Only .lightbox__backdrop fades, as a separate
   layer behind .lightbox__content, so the image itself is continuously
   visible the whole time and only ever animates via transform. */
.lightbox {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-20);
  padding: var(--space-40);
  pointer-events: none;
}

.lightbox.is-open {
  pointer-events: auto;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.lightbox.is-open .lightbox__backdrop {
  opacity: 1;
}

.lightbox__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-20);
  max-width: 100%;
}

.lightbox__image {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  transition: transform var(--transition-base);
}

/* Held back until the image's FLIP transition finishes opening (and hidden
   the instant closing starts), via JS toggling .is-visible — see script.js. */
.lightbox__caption {
  margin: 0;
  max-width: 560px;
  color: var(--color-white-80);
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  line-height: 20px;
  text-align: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.lightbox__caption.is-visible {
  opacity: 1;
}

.lightbox__caption-dim {
  opacity: 0.5;
}

/* Transition-item lightbox variant: mirrors the desktop hover panel's
   content (wordmark, meta, description) around the image instead of
   floating beside it — the desktop layout has no equivalent on touch since
   it depends on :hover. Wordmark+meta sit above the image, description
   below, and the close button drops into normal flow at the very bottom
   (see .lightbox__content--transition .lightbox__close). Held back the
   same way as the caption above. */
.lightbox__info-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  max-width: 400px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.lightbox__info-head.is-visible {
  opacity: 1;
}

.lightbox__info-wordmark {
  display: block;
  height: 24px;
  width: auto;
}

.lightbox__info-title {
  margin: 0;
  width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 24px;
  text-align: center;
}

.lightbox__info-meta {
  margin: 0;
  color: var(--color-white-50);
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  text-align: center;
}

.lightbox__info-desc {
  margin: 0;
  max-width: 400px;
  color: var(--color-white-75);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  text-align: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.lightbox__info-desc.is-visible {
  opacity: 1;
}

.lightbox__close {
  position: absolute;
  left: 50%;
  bottom: 100%;
  margin-bottom: var(--space-20);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--color-white-05);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: background 0.2s ease, opacity var(--transition-fast);
}

/* Transition-item variant: the close button leaves the floating overlay
   position (which assumes the image is the topmost element) and joins
   the flow at the very bottom, below the description. */
.lightbox__content--transition .lightbox__close {
  position: static;
  margin-top: var(--space-20);
  margin-bottom: 0;
  transform: none;
}

.lightbox__close.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__close:hover {
  background: var(--color-white-10);
}

body.lightbox-open {
  overflow: hidden;
}
