:root {
  color-scheme: dark;

  /* Colour: dark is the default look. */
  --bg: #000011;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.42);
  --line-soft: rgba(255, 255, 255, 0.16);
  --slot: #0c0c18;
  --row-hover: rgba(255, 255, 255, 0.045);
  --pill-bg: #0a0a1c;
  --pill-hover: #181833;
  --pill-line: rgba(255, 255, 255, 0.34);
  --tip-bg: rgba(12, 12, 16, 0.9);
  --tip-fg: #ffffff;
  --code-bg: rgba(255, 255, 255, 0.05);
  --overlay: rgba(0, 0, 17, 0.9);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  --neon-0: #ff4fd8;
  --neon-1: #d6ff4a;
  --neon-2: #4dfff0;
  --neon-3: #c77dff;
  --neon-4: #ffe14d;
  --neon-5: #4da6ff;
  --neon-6: #ff7a4d;
  --neon-7: #7dffc3;

  /* Type and space */
  --font: "Aeonik Soft", Inter, system-ui, sans-serif;
  --inset: clamp(1.25rem, 2.2vw, 2.125rem);
  --display: clamp(3.5rem, 12vw, 13.75rem);
  --hero-gap: clamp(6rem, 11vw, 10rem); /* name to statement, and statement to tiles */
  --name-size: clamp(1.5rem, 8.4vw, 9rem); /* home name: one line from phone to desktop */
  --section: clamp(2.5rem, 6vw, 6rem);
  --row: clamp(1.5rem, 2.4vw, 2.25rem);
  --body: clamp(1rem, 1.5vw, 1.5rem);
  --meta: clamp(0.875rem, 1.1vw, 1.125rem);
  --gap: clamp(1.5rem, 3vw, 3.5rem);

  /* Motion: three durations and one curve. */
  --dur-1: 150ms;
  --dur-2: 250ms;
  --dur-3: 500ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Homepage tile shape: one ratio, tuned per project with a focal point (focus in projects.json). */
  --tile-ratio: 5 / 4;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f2ec;
  --fg: #0b0b16;
  --muted: rgba(11, 11, 22, 0.68);
  --line: rgba(11, 11, 22, 0.36);
  --line-soft: rgba(11, 11, 22, 0.14);
  --slot: #e8e5dc;
  --row-hover: rgba(11, 11, 22, 0.04);
  --pill-bg: #fbfaf6;
  --pill-hover: #e9e6dd;
  --pill-line: rgba(11, 11, 22, 0.3);
  --tip-bg: rgba(11, 11, 22, 0.9);
  --tip-fg: #ffffff;
  --code-bg: rgba(11, 11, 22, 0.05);
  --overlay: rgba(244, 242, 236, 0.94);
  --shadow: 0 22px 60px rgba(11, 11, 22, 0.22);
  --neon-0: #c2189a;
  --neon-1: #5c7500;
  --neon-2: #00776f;
  --neon-3: #6a2bd0;
  --neon-4: #8a6200;
  --neon-5: #1d5cb8;
  --neon-6: #bd4510;
  --neon-7: #0a7048;
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(255, 255, 255, 0.75);
    --pill-line: rgba(255, 255, 255, 0.75);
  }

  :root[data-theme="light"] {
    --line: rgba(11, 11, 22, 0.75);
    --pill-line: rgba(11, 11, 22, 0.75);
  }
}

@font-face {
  font-family: "Aeonik Soft";
  src: url("fonts/AeonikSoft-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Soft";
  src: url("fonts/AeonikSoft-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@view-transition {
  navigation: auto;
}

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

html {
  background: var(--bg);
  scrollbar-width: none;
  scroll-padding-bottom: 6rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html:has(dialog[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  scrollbar-width: none;
  padding-bottom: 7rem;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--body);
  line-height: 1.35;
  font-weight: 400;
}

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

img {
  max-width: 100%;
  display: block;
  transition: opacity var(--dur-3) var(--ease);
}

img.is-loading {
  opacity: 0;
}

strong {
  font-weight: 700;
}

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

a:hover {
  text-decoration: none;
}

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

.skip {
  position: absolute;
  left: var(--inset);
  top: 0;
  transform: translateY(-120%);
  background: var(--fg);
  color: var(--bg);
  padding: 0.4rem 0.8rem;
}

.skip:focus {
  transform: none;
}

.wrap {
  width: auto;
  max-width: none;
  margin-inline: 25px;
}

.hero {
  padding: clamp(4rem, 10vw, 8rem) 0 max(1rem, calc(var(--hero-gap) - 2 * var(--gap) - 1.2 * var(--body) - 0.25rem)); /* statement sits as far above the tiles as it sits below the name */
  text-align: center;
}

.display {
  margin: 0;
  font-size: var(--display);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 42rem;
  margin: calc(var(--hero-gap) - 0.85rem) auto 0;
  font-size: var(--body);
}

/* Sticky name. Its box never changes size: the text is scaled with a transform, so scrolling causes no layout shifts.
   There is deliberately no background: behind a transparent mobile browser bar it looked broken. */
.name {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: clamp(2.5rem, 8vw, 5.5rem) 0 0;
  padding: 0.35rem 25px 0.85rem;
  text-align: center;
  font-size: var(--name-size);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
  pointer-events: none;
  view-transition-name: name;
}

.name-text {
  display: inline-block;
  white-space: nowrap;
  transform: scale(var(--s, 1));
  transform-origin: 50% 0;
  will-change: transform;
}

.hero {
  padding-top: 0;
}

/* Dock: neutral outlined pills, solid fill, filled pill for the current page. */
.dock {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  width: max-content;
  max-width: calc(100vw - 1rem);
  margin: 0;
  padding: 0;
  view-transition-name: dock;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.35rem 1.15rem;
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--fg);
  font: inherit;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}

.pill:hover {
  background: var(--pill-hover);
}

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

.pill[aria-current="page"] {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}

.pill:focus-visible {
  outline-offset: 2px;
}

.pill:has(.avatar) {
  padding-left: 0.3rem;
}

.pill-icon {
  width: 2.75rem;
  padding: 0;
}

.pill[hidden] {
  display: none;
}

.avatar {
  display: block;
  flex: none;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 50%;
  overflow: hidden;
  transform: translateZ(0);
}

.avatar img,
.avatar video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  border-radius: 50%;
  transform: translateZ(0);
}

.dock-short,
.dock-icon {
  display: none;
}

.dock-icon,
.theme-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.theme-icon {
  display: block;
}

:root[data-theme="light"] .theme-icon-sun,
:root:not([data-theme="light"]) .theme-icon-moon {
  display: none;
}

.section {
  padding: var(--gap) 0;
}

.section h2,
.page-title {
  margin: 0 0 1rem;
  font-size: var(--section);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.kicker {
  margin: 0 0 0.5rem;
  font-size: var(--body);
}

/* Homepage tiles. */
.shots {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: var(--gap) 0 0;
  padding: 0;
}

.shot-frame {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: var(--tile-ratio);
  margin: 0;
  overflow: hidden;
  background: var(--slot);
  outline: 1px solid var(--line-soft);
  outline-offset: -1px;
}

.shot-link {
  position: absolute;
  inset: 0;
  display: block;
}

.shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transform: scale(1);
  transform-origin: center;
  transition: transform var(--dur-3) var(--ease), opacity var(--dur-3) var(--ease);
}

@media (hover: hover) {
  .shot-frame:hover .shot {
    transform: scale(1.035);
  }
}

.shot-tip {
  position: fixed;
  z-index: 40;
  left: 0;
  top: 0;
  display: grid;
  gap: 0.05rem;
  width: max-content;
  max-width: 16rem;
  margin: 0;
  padding: 0.45rem 0.6rem 0.5rem;
  border: 0;
  background: var(--tip-bg);
  color: var(--tip-fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-1) var(--ease);
}

.shot-frame:hover .shot-tip {
  opacity: 1;
}

.shot-kicker {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.shot-tip strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.shot-tip span:not(.shot-kicker) {
  font-size: 0.78rem;
}

.project-index {
  display: grid;
  gap: 0.55rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.project-index a {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  font-size: var(--body);
  text-decoration: none;
}

.project-index-title {
  transition: transform var(--dur-2) var(--ease);
}

.project-index a:hover .project-index-title {
  transform: translateX(0.35rem);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Rows (CV, awards, lists). */
.rows {
  display: grid;
  grid-template-columns: minmax(14rem, 28%) minmax(0, 1fr) max-content;
  column-gap: 2.5rem;
  isolation: isolate;
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(14rem, 28%) minmax(0, 1fr) max-content;
  column-gap: 2.5rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.row::before {
  content: "";
  position: absolute;
  inset: 0 -0.75rem;
  z-index: -1;
  background: var(--row-hover);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease);
}

@media (hover: hover) {
  .row:hover::before,
  .row:focus-visible::before {
    opacity: 1;
  }
}

.rows > .row {
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
}

.row > span,
.row-stack:not(.row-end) {
  text-align: left;
  justify-self: start;
}

.row strong {
  font-size: var(--row);
  font-weight: 400;
}

.row-stack {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.row-end {
  text-align: right;
  white-space: nowrap;
}

.award-lines {
  grid-column: 2 / -1;
  display: grid;
  gap: 0.35rem;
}

.award-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1.5rem;
  align-items: baseline;
}

.award-line span:last-child {
  white-space: nowrap;
}

.row-label {
  min-width: 0;
}

.chrono {
  grid-template-columns: minmax(0, 1fr) auto;
}

.arrow {
  display: inline-block;
  margin-left: 0.75rem;
  transition: transform var(--dur-2) var(--ease);
}

a.row:hover {
  text-decoration: none;
}

a.row:hover .row-label,
a.row:hover strong {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

a.row:hover .arrow {
  transform: translate(0.2rem, -0.2rem);
}

.row span,
.meta {
  font-size: var(--meta);
}

/* A small photo-stack mark on rows that show a hover preview. It fans out when the row is hovered. */
.peek-glyph {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .peek-glyph {
    position: relative;
    display: inline-block;
    width: 1.05rem;
    height: 1.05rem;
    margin-left: 0.7rem;
    vertical-align: -0.1rem;
    color: var(--fg);
  }

  .peek-glyph i {
    position: absolute;
    inset: 0;
    border: 1px solid currentColor;
    border-radius: 0.26rem;
    background: var(--bg);
    opacity: 0.5;
    transform-origin: 20% 90%;
    transition: transform var(--dur-3) var(--spring), opacity var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
  }

  .peek-glyph i:nth-child(1) {
    transform: translate(0.22rem, -0.22rem);
  }

  .peek-glyph i:nth-child(2) {
    transform: translate(0.11rem, -0.11rem);
  }

  .peek-glyph i:nth-child(3) {
    opacity: 0.9;
    overflow: hidden;
  }

  .peek-glyph i:nth-child(3)::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--fg);
    clip-path: polygon(0 100%, 0 78%, 32% 46%, 52% 68%, 74% 36%, 100% 72%, 100% 100%);
    opacity: 0;
    transform: translateY(35%);
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease);
  }

  .peek-glyph i:nth-child(3)::after {
    content: "";
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    width: 0.2rem;
    height: 0.2rem;
    border-radius: 50%;
    background: var(--fg);
    transition: transform var(--dur-3) var(--spring), background-color var(--dur-2) var(--ease);
  }

  [data-peek]:hover .peek-glyph i:nth-child(1),
  [data-peek]:focus-visible .peek-glyph i:nth-child(1) {
    opacity: 0.8;
    transform: translate(0.62rem, -0.34rem) rotate(16deg);
  }

  [data-peek]:hover .peek-glyph i:nth-child(2),
  [data-peek]:focus-visible .peek-glyph i:nth-child(2) {
    opacity: 0.8;
    transform: translate(0.34rem, -0.12rem) rotate(8deg);
  }

  [data-peek]:hover .peek-glyph i:nth-child(3),
  [data-peek]:focus-visible .peek-glyph i:nth-child(3) {
    opacity: 1;
    border-color: var(--fg);
    background: var(--fg);
    transform: scale(1.22) translate(-0.04rem, 0.04rem);
  }

  [data-peek]:hover .peek-glyph i:nth-child(3)::before,
  [data-peek]:focus-visible .peek-glyph i:nth-child(3)::before {
    opacity: 0.92;
    transform: none;
    background: var(--bg);
  }

  [data-peek]:hover .peek-glyph i:nth-child(3)::after,
  [data-peek]:focus-visible .peek-glyph i:nth-child(3)::after {
    transform: scale(1.3);
    background: var(--bg);
  }
}

/* Hover preview card: bare image with a label strip below it. */
.peek {
  position: fixed;
  z-index: 60;
  left: 0;
  top: 0;
  width: min(21rem, 38vw);
  pointer-events: none;
  will-change: transform;
}

.peek-card {
  box-shadow: var(--shadow);
  opacity: 0;
  transform: rotate(var(--rot, 4deg)) scale(0.94);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease);
}

.peek.is-on .peek-card {
  opacity: 1;
  transform: rotate(var(--rot, 4deg)) scale(1);
}

.peek-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--slot);
}

.peek-cap {
  padding: 0.65rem 0.85rem 0.7rem;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.stack {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.stack h3 {
  margin: 0;
  font-size: var(--row);
  font-weight: 400;
}

.stack ul,
.prose ul,
.prose ol {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.prose {
  display: grid;
  gap: 1rem;
  max-width: 62rem;
  min-width: 0;
}

.prose h2 {
  margin: 1.5rem 0 0;
  font-size: var(--row);
  font-weight: 400;
}

.prose h3 {
  margin: 0.5rem 0 0;
  font-size: var(--body);
  font-weight: 400;
}

.prose p,
.prose li {
  margin: 0;
}

.prose pre {
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  padding: 0.9rem 1rem;
  background: var(--code-bg);
  font-size: 0.82rem;
  line-height: 1.45;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.prose pre code {
  white-space: pre;
}

.prose hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.5rem 0;
}

.figure {
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.figure img {
  width: 100%;
  height: auto;
  background: var(--slot);
  outline: 1px solid var(--line-soft);
  outline-offset: -1px;
}

.figure figcaption {
  font-size: var(--meta);
  color: var(--muted);
}

/* Pills for video links and tags. */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: var(--meta);
  line-height: 1.1;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}

.reels {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.reel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(100%, 13rem);
  color: var(--muted);
  font-size: var(--meta);
  line-height: 1.3;
  border: 0;
}

.reel img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--pill-hover);
  transition: opacity var(--dur-1) var(--ease);
}

.reel:hover img {
  opacity: 0.85;
}

.chip:hover {
  background: var(--pill-hover);
}

.chip:active {
  transform: scale(0.98);
}

.chip-icon {
  flex: none;
  width: 0.7em;
  height: 0.7em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.15rem 0.7rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: calc(var(--meta) - 2px);
}

/* Dialogs: video and lightbox share one fade. */
dialog.overlay {
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease), overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete;
}

dialog.overlay[open] {
  opacity: 1;
}

@starting-style {
  dialog.overlay[open] {
    opacity: 0;
  }
}

dialog.overlay::backdrop {
  background: var(--overlay);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease), overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete;
}

dialog.overlay[open]::backdrop {
  opacity: 1;
}

@starting-style {
  dialog.overlay[open]::backdrop {
    opacity: 0;
  }
}

.video-modal {
  position: fixed;
  width: min(92vw, 1200px);
  aspect-ratio: 16 / 9;
  max-height: 92vh;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

.video-frame,
.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.dialog-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--pill-line);
  border-radius: 50%;
  background: var(--pill-bg);
  color: var(--fg);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}

.dialog-close:hover {
  background: var(--pill-hover);
}

.dialog-close:active {
  transform: scale(0.95);
}

/* Gallery strip. */
.gallery {
  margin-top: var(--gap);
}

.gallery-head {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: var(--meta);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.gallery.is-live .gallery-head {
  display: flex;
}

.gallery-nav {
  display: flex;
  gap: 0.4rem;
}

.gallery-btn {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--pill-line);
  border-radius: 50%;
  background: var(--pill-bg);
  color: var(--fg);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease);
}

.gallery-btn:hover:not(:disabled) {
  background: var(--pill-hover);
}

.gallery-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.gallery-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.gallery-track {
  position: relative;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  --gh: clamp(240px, 54vh, 560px);
  flex: none;
  width: min(calc(var(--gh) * var(--arn, 1.5)), 88vw);
  aspect-ratio: var(--ar, 3 / 2);
  scroll-snap-align: start;
  background: var(--slot);
  outline: 1px solid var(--line-soft);
  outline-offset: -1px;
}

.gallery-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

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

/* Lightbox. */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
}

.lightbox-stage {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: 4rem 4.5rem 4.5rem;
}

/* The definite grid track lets percentage caps resolve, so tall images fit the viewport. */
.lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: -1.375rem;
  border: 1px solid var(--pill-line);
  border-radius: 50%;
  background: var(--pill-bg);
  color: var(--fg);
  font: inherit;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}

.lightbox-nav:hover {
  background: var(--pill-hover);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-count {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 1.25rem;
  margin: 0;
  text-align: center;
  font-size: var(--meta);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.page-head {
  padding: clamp(3rem, 8vw, 6rem) 0 1rem;
}

.page-head .page-title {
  max-width: 16ch;
}

.subhead {
  margin: 0.5rem 0 0;
  font-size: var(--row);
  font-weight: 400;
}

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

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

.prose.after-gallery {
  margin-top: var(--gap);
}

.placeholder,
.cal-slot {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.4rem;
  min-height: clamp(14rem, 32vw, 32rem);
  background: var(--slot);
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  padding: 1.5rem;
}

.placeholder p,
.cal-slot p {
  margin: 0;
  font-size: var(--meta);
}

.cal-slot {
  display: block;
  place-items: stretch;
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  text-align: left;
}

#my-cal-inline-call-with-andres,
#my-cal-inline-call-with-andres iframe {
  width: 100%;
  max-width: none;
  min-height: 40rem;
}

blockquote {
  margin: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--fg);
}

blockquote p {
  margin: 0;
  font-size: var(--row);
  line-height: 1.15;
}

blockquote footer {
  margin-top: 0.75rem;
  font-size: var(--meta);
  color: var(--muted);
}

details {
  border-top: 1px solid var(--line);
  padding: 0.8rem 0;
}

details summary {
  cursor: pointer;
  font-size: var(--body);
}

.sources {
  padding-left: 1.1rem;
}

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

.post-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list a {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

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

.post-list strong {
  font-size: var(--row);
  font-weight: 400;
}

.site-footer {
  padding: 4.5rem 0 8rem;
  font-size: var(--meta);
  color: var(--fg);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 1.3fr) minmax(10rem, 1.4fr) auto;
  gap: 2rem 3rem;
  align-items: start;
}

.site-footer .footer-label {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: calc(var(--meta) - 4px);
}

.site-footer a,
.site-footer p {
  display: block;
  margin: 0;
  color: inherit;
  text-decoration: none;
}

.footer-end {
  text-align: right;
}

.prose.about-copy {
  max-width: 69rem;
  margin-inline: auto;
  text-align: center;
  font-size: clamp(1.53rem, 2.7vw, 2.4rem);
  line-height: 1.28;
  letter-spacing: -0.03em;
  gap: 1.75rem;
}

.prose.about-copy p {
  margin: 0;
}

.about-head {
  text-align: center;
}

.about-head .page-title {
  max-width: none;
}

.about-bubble {
  width: 250px;
  height: 250px;
  margin: 1.5rem auto 0;
  border-radius: 50%;
  overflow: hidden;
  transform: translateZ(0);
}

.about-bubble img,
.about-bubble video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  transform: translateZ(0);
}

/* Rows and footer animate in and out of view. */
html.motion .row,
html.motion .site-footer {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}

html.motion .row.is-in,
html.motion .site-footer.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.75s var(--ease);
}

.lede.is-typing::after,
.about-copy p.is-typing::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.9em;
  margin-left: 0.15em;
  background: currentColor;
  vertical-align: text-bottom;
}

.social-link {
  transition: color var(--dur-1) var(--ease);
}

.social-link:hover {
  color: var(--neon, var(--fg));
}

@media (max-width: 800px) {
  :root {
    --tile-ratio: 4 / 3;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-end {
    text-align: left;
  }

  .shots,
  .rows,
  .row,
  .rows > .row,
  .chrono {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 0.35rem;
  }

  .row-end,
  .row > span,
  .row-stack {
    white-space: normal;
    text-align: left;
    justify-self: stretch;
    min-width: 0;
  }

  .award-lines {
    grid-column: 1;
  }

  .row strong {
    font-size: 1.2rem;
  }

  .project-index a {
    grid-template-columns: 2.2rem 1fr;
  }

  .prose.about-copy {
    font-size: 1.08rem;
    line-height: 1.4;
    letter-spacing: -0.02em;
    gap: 1.05rem;
    padding-inline: 0.35rem;
  }

  .about-bubble {
    width: 180px;
    height: 180px;
  }

  .dock {
    flex-wrap: nowrap;
    gap: 0.3rem;
    max-width: calc(100vw - 0.5rem);
  }

  .pill {
    min-height: 2.75rem;
    padding: 0.2rem 0.55rem;
    gap: 0;
    font-size: 0.85rem;
  }

  .pill-home {
    padding: 0.18rem 0.7rem 0.18rem 0.18rem;
    gap: 0.4rem;
  }

  .pill-icon {
    width: 2.75rem;
    padding: 0;
  }

  .dock-label {
    display: none;
  }

  .pill-home .dock-label {
    display: inline;
  }

  .dock-short,
  .dock-icon {
    display: inline-flex;
  }

  .lede {
    font-size: 0.95rem;
  }

  .gallery-item {
    --gh: clamp(220px, 46vh, 420px);
  }

  .lightbox-stage {
    padding: 4rem 0.5rem 4.5rem;
  }

  .lightbox-prev {
    left: 0.4rem;
  }

  .lightbox-next {
    right: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html.motion .row,
  html.motion .site-footer {
    opacity: 1;
    transform: none;
  }
}
