/* ==========================================================================
   Reward AI — rewardai.com
   Plain CSS, no build step. Loaded by every page.
   ========================================================================== */

:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.55);
  --hairline: rgba(255, 255, 255, 0.16);

  --pad: clamp(18px, 2.6vw, 44px);
  --space-section: clamp(40px, 5vw, 72px);
  --space-block: clamp(24px, 3vw, 40px);
  --title-size: clamp(2rem, 3.6vw, 3rem);
  --section-size: clamp(1.25rem, 2vw, 1.5rem);
  --reading-width: 44rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue",
    Helvetica, Arial, sans-serif;

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* The home page is exactly one viewport tall and never scrolls, which also
   guarantees no scrollbar — so the vw units used for video cover are exact. */
body.is-home { overflow: hidden; }

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

img, svg { display: block; max-width: 100%; }

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

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

/* ==========================================================================
   Hero — full-viewport looping video
   ========================================================================== */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

/* Every rendition fills its box and is cropped rather than letterboxed, so the
   page never shows black bands. The footage no longer carries burned-in
   branding, so cropping is free — the caption and wordmark are page elements
   now and stay put whatever the crop does. */

/* --- Slots ---------------------------------------------------------------- */

/* One slot in a landscape window, two stacked in a portrait one. A single 16:9
   frame in a phone-shaped window would have to throw away about three quarters
   of its width; two halves each throw away half that. */
.hero__media {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  user-select: none;
}

.hero__slot {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

/* Each slot stacks two videos: the one on screen, and the one already holding
   the next clip, decoded and parked on its first frame. Only the visibility
   changes at a handover, which is what keeps a black frame from landing between
   two clips. */
.hero__video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg);
  opacity: 0;
}

.hero__video.is-front { opacity: 1; }

/* --- Portrait: the second slot opens underneath --------------------------- */

.hero__slot--second { display: none; }

/* 5:4 is where the two layouts cross over. Below it, one 16:9 frame has to
   discard more of its width than two half-height frames each discard of theirs,
   so the pair genuinely shows more of the picture. A hairline keeps the two
   reading as a deliberate pair rather than a seam. */
@media (max-aspect-ratio: 5/4) {
  .hero__slot--second {
    display: block;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }
}

/* The bottom fade gives the headline contrast over bright footage while
   leaving the upper part of the action clear. */
.hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 26%),
    linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.42) 18%, rgba(0, 0, 0, 0) 52%);
}

/* --- Foreground chrome ---------------------------------------------------- */

.hero__chrome {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: var(--pad);
  padding-top: max(var(--pad), env(safe-area-inset-top));
  padding-bottom: max(var(--pad), env(safe-area-inset-bottom));
  pointer-events: none;
}

.hero__chrome a,
.hero__chrome button { pointer-events: auto; }

.hero__intro {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vh, 44px);
  margin-top: auto;
}

.hero__headline {
  margin: 0;
  font-size: clamp(1.875rem, 4.8vw, 4.875rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.hero__headline span { display: block; }

@media (max-height: 500px) and (min-aspect-ratio: 5/4) {
  .hero__headline { font-size: clamp(1.5rem, 7vh, 2.1875rem); }
  .hero__intro { gap: 18px; }
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 4vw, 48px);
}

.bar--bottom { align-items: flex-end; }

/* Foreground elements rise in together once, a beat apart. */
.caption,
.hero .logo,
.hero__headline,
.bar--bottom > * {
  animation: chrome-in 0.9s var(--ease) both;
}

.caption            { animation-delay: 0.10s; }
.hero .logo         { animation-delay: 0.18s; }
.hero__headline     { animation-delay: 0.22s; }
.bar--bottom > *    { animation-delay: 0.26s; }

@keyframes chrome-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.caption {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--fg);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

.hero .logo img {
  width: auto;
  height: 24px;
  filter: drop-shadow(0 1px 12px rgba(0, 0, 0, 0.5));
}

/* Nav */

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 40px);
}

.nav a {
  position: relative;
  font-size: 0.9375rem;
  letter-spacing: 0.005em;
  padding-block: 10px;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav a:hover::after,
.nav a:focus-visible::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Social icons */

.social {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -10px;
  color: var(--fg);
  opacity: 0.82;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.social a:hover,
.social a:focus-visible { opacity: 1; transform: translateY(-1px); }

.social svg {
  width: clamp(19px, 1.35vw, 24px);
  height: clamp(19px, 1.35vw, 24px);
  filter: drop-shadow(0 1px 12px rgba(0, 0, 0, 0.5));
}

/* Autoplay fallback / reduced-motion play button */

.playcue {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px 12px 18px;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: background 0.25s var(--ease);
}

.playcue:hover { background: rgba(0, 0, 0, 0.62); }
.playcue[hidden] { display: none; }
.playcue svg { width: 16px; height: 16px; }

/* Very narrow phones: let the bottom row breathe. */
@media (max-width: 340px) {
  .hero__headline { font-size: 1.75rem; }

  .bar--bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

/* ==========================================================================
   Interior pages (About, Blog, 404)
   ========================================================================== */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.page__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 4vw, 48px);
  padding: var(--pad);
  padding-top: max(var(--pad), env(safe-area-inset-top));
}

.page__head .logo img { width: auto; height: 24px; }

.page__body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--space-section) var(--pad);
}

/* ==========================================================================
   Past-work reel — full-bleed row of stills that drifts on its own
   ========================================================================== */

.reel {
  position: relative;
  padding: clamp(6px, 1.5vh, 18px) 0 clamp(2px, 1vh, 12px);
}

/* Full-bleed strip, faded out at both ends so tiles dissolve into the page
   instead of being clipped by a hard edge. */
.reel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.reel__viewport::-webkit-scrollbar { display: none; }
.reel__viewport:focus-visible { outline-offset: -2px; }
.reel__viewport.is-dragging { cursor: grabbing; }
.reel__viewport.is-dragging .reel__item { pointer-events: none; }

.reel__track {
  display: flex;
  align-items: stretch;
  gap: clamp(8px, 1vw, 16px);
  width: max-content;
  margin: 0;
  padding: 0 var(--pad);
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
}

/* JS duplicates the track for the seamless loop, so the leading pad would
   otherwise reappear mid-row and break the rhythm. */
.reel__track.is-looping { padding: 0; gap: 0; }
.reel__track.is-looping .reel__item { margin-right: clamp(8px, 1vw, 16px); }

.reel__item {
  position: relative;
  flex: none;
  height: clamp(150px, 19vw, 230px);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

/* Hairline sits above the image, which otherwise covers an inset shadow. */
.reel__item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--hairline);
  pointer-events: none;
}

.reel__item img {
  width: auto;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
  transform: scale(1.001); /* hides the seam between image and rounded corner */
}



@media (max-width: 560px) {
  .reel__viewport {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  }
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 clamp(14px, 2vh, 22px);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Overlaid labels share one fixed line, so changing scripts never moves the essay. */
.eyebrow--multilingual { height: 1.8em; line-height: 1.8; }
.eyebrow__languages { display: inline-grid; height: 100%; align-items: center; }
.eyebrow__language {
  grid-area: 1 / 1;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 600ms var(--ease);
}
.eyebrow__language.is-visible { opacity: 1; }
.eyebrow__language[lang="zh"],
.eyebrow__language[lang="ko"],
.eyebrow__language[lang="ja"] { letter-spacing: 0.06em; }
.eyebrow__language[lang="hi"] { letter-spacing: 0; text-transform: none; }


h1 {
  margin: 0 0 var(--space-block);
  font-size: var(--title-size);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 clamp(14px, 2vh, 20px);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.45;
  color: var(--fg);
  max-width: 34ch;
}

/* --measure and --copy-size are the knobs pages turn to retype their body copy;
   overriding them beats fighting the specificity of this selector. */
.page__body p:not(.lede):not(.eyebrow) {
  margin: 0 0 1em;
  font-size: var(--copy-size, 1rem);
  color: var(--muted);
  max-width: var(--measure, 56ch);
}

/* --- Long-form copy — the About essay ------------------------------------ */

/* Short pages centre their block in the viewport; an essay is taller than one,
   so it has to start at the top or the opening scrolls out of reach. */
/* Long-form copy runs larger than the one-paragraph pages, which is what lets
   the column be wider without the line running past a comfortable ~75
   characters. Width lives on the wrap alone, so the rule, headings and text all
   share one edge. */
.page__body--essay {
  align-items: flex-start;
  --measure: 100%;
  --copy-size: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
}

.page__body--essay .wrap { max-width: var(--reading-width); }

.prose { line-height: 1.65; }

.page__body--essay .wrap:has(.article-bookmarks) {
  display: grid;
  grid-template-columns: 11rem minmax(0, var(--reading-width));
  align-items: start;
  column-gap: clamp(28px, 5vw, 72px);
  max-width: 62rem;
}

.page__body--essay .wrap:has(.article-bookmarks) > :not(.article-bookmarks) {
  grid-column: 2;
}

.article-bookmarks {
  position: sticky;
  top: max(var(--pad), env(safe-area-inset-top));
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  padding-top: 2px;
  color: var(--faint);
}

.article-bookmarks summary {
  padding: 10px 0;
  font-size: 0.875rem;
  color: var(--fg);
  cursor: pointer;
}

.article-header { margin-bottom: var(--space-block); }
.page__body--essay .article-header h1 { margin-bottom: 0; }
.article-header + .article-bookmarks + .prose > figure:first-child { margin-top: 0; }

.article-bookmarks ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.article-bookmarks:not([open]) > ol { display: none; }

.article-bookmarks a {
  position: relative;
  display: block;
  padding: 5px 0 5px 12px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.article-bookmarks a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 1px;
  background: var(--fg);
  opacity: 0;
  transform: scaleY(0.4);
  transform-origin: center;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.article-bookmarks a:hover,
.article-bookmarks a:focus-visible,
.article-bookmarks a.is-active {
  color: var(--fg);
}

.article-bookmarks a:hover,
.article-bookmarks a:focus-visible {
  transform: translateX(3px);
}

.article-bookmarks a.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

/* Essays share the interior title scale and wrap naturally at every width. */
.page__body--essay h1 {
  margin-bottom: var(--space-block);
  font-size: var(--title-size);
  line-height: 1.12;
  max-width: none;
}

.prose h2,
.prose p[id] {
  scroll-margin-top: clamp(30px, 8vh, 80px);
}

.prose h2 {
  margin: var(--space-section) 0 16px;
  padding-top: var(--space-block);
  border-top: 1px solid var(--hairline);
  font-size: var(--section-size);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.prose h2 .num {
  margin-right: 0.5em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.page__body .prose p.article-meta {
  margin-top: calc(clamp(20px, 3vh, 34px) * -0.65);
  margin-bottom: clamp(22px, 3vh, 34px);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.prose code {
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.cite-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2em;
  min-height: 1.55em;
  margin-inline: 0.12em 0;
  padding: 0 0.45em;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  color: var(--fg);
  font-size: 0.78em;
  line-height: 1;
  vertical-align: 0.16em;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

/* Only the leading side carries margin, so a chip sits tight against the
   sentence's period. Two chips in a row still need air between them. */
.cite-ref + .cite-ref { margin-left: 0.28em; }

.cite-ref:hover,
.cite-ref:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.42);
}

.citation-popover {
  position: relative;
  display: inline-block;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  cursor: help;
}

.citation-popover:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 3px;
}

.citation-popover__card {
  position: absolute;
  z-index: 5;
  left: calc(100% + 12px);
  top: 50%;
  width: min(320px, calc(100vw - 40px));
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: rgba(12, 12, 12, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-4px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.citation-popover__card em {
  color: var(--fg);
}

.citation-popover:hover .citation-popover__card,
.citation-popover:focus-within .citation-popover__card {
  opacity: 1;
  transform: translateY(-50%);
}

.prose figure {
  margin: var(--space-block) 0;
}

.prose figure img,
.prose figure video {
  display: block;
  width: 100%;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

/* A <video> with no controls attribute still offers Chrome's "Show all
   controls" on right-click, which drops a scrub bar onto a figure that is
   meant to read as a picture. The hero never shows that menu because its scrim
   and chrome layers sit over the element and take the click; interior figures
   get the same protection from a transparent shield of their own. */
.prose .video-frame {
  display: block;
  position: relative;
  line-height: 0;
}

.prose .video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
}

.prose figcaption {
  margin-top: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--faint);
}

.prose em { color: var(--fg); }

.prose strong {
  color: var(--fg);
  font-weight: 600;
}

.references {
  margin-top: clamp(42px, 7vh, 72px);
  padding-top: clamp(24px, 4vh, 42px);
  border-top: 1px solid var(--hairline);
}

.references h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.references ol {
  margin: 0;
  padding-left: 1.4em;
  color: var(--muted);
}

.references li {
  padding-left: 0.25em;
  font-size: var(--copy-size, 1rem);
  line-height: 1.55;
}

.references a {
  color: var(--fg);
  border-bottom: 1px solid var(--hairline);
  transition: border-color 0.25s var(--ease);
}

.references a:hover { border-bottom-color: var(--fg); }

.post-citation {
  margin-top: clamp(42px, 7vh, 72px);
  padding-top: clamp(24px, 4vh, 42px);
  border-top: 1px solid var(--hairline);
}

.post-citation h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.page__body .prose .post-citation p {
  max-width: 100%;
}

.citation-box {
  position: relative;
  margin: 0 0 1em;
  padding: clamp(14px, 2vw, 18px);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.page__body .prose .post-citation .citation-text {
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.post-citation pre {
  overflow-x: auto;
  margin: 0;
  padding: 0;
  padding-left: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.post-citation pre code {
  color: inherit;
}

.copy-citation {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.copy-citation:hover,
.copy-citation:focus-visible {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.42);
}

.copy-citation svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page__body .prose p.signature {
  margin-top: clamp(20px, 3vh, 30px);
  color: var(--faint);
}

/* Contact addresses below the rule. Kept at interface size rather than the
   body-copy size, since this is navigation, not prose. The row wraps to one
   address per line when there isn't width for both. */
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px clamp(20px, 3vw, 40px);
  margin: 0 0 clamp(18px, 2.5vh, 26px);
  padding: 0;
  list-style: none;
  font-size: 1rem;
  color: var(--muted);
}

.contact a {
  color: var(--fg);
  border-bottom: 1px solid var(--hairline);
  transition: border-color 0.25s var(--ease);
}

.contact a:hover { border-bottom-color: var(--fg); }

.rule {
  height: 1px;
  margin: var(--space-block) 0;
  background: var(--hairline);
  border: 0;
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.backlink:hover { color: var(--fg); }
.backlink span[aria-hidden] { transition: transform 0.25s var(--ease); }
.backlink:hover span[aria-hidden] { transform: translateX(-3px); }

/* Empty state used by the blog index until the first post ships. */
.empty {
  padding: clamp(28px, 5vh, 44px);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  color: var(--muted);
  font-size: 1rem;
}

.empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--fg);
  font-weight: 500;
}

/* --- Blog index ----------------------------------------------------------
   The list needs more width than a one-paragraph page so a card can hold a
   16:9 still beside its text without either half getting cramped. The heading
   block above it keeps its own measure, so only the column grows. */
.page__body--list { align-items: flex-start; }
.page__body--list .wrap { max-width: 68rem; }
.page__body--list h1 { font-size: clamp(1.75rem, 2.8vw, 2.25rem); margin-bottom: 16px; }
.page__body--list .lede { max-width: 48ch; }

/* Post list — one card per entry: cover still on the left, text on the right,
   divided by the same hairlines the rest of the page rules with. The card is a
   single link, so everything inside it responds to one hover. */
.posts {
  /* The list's own top and bottom hairlines stand in for the <hr class="rule">
     that separates blocks elsewhere, so it carries that rule's margin too. */
  margin: var(--space-block) 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.posts li { border-bottom: 1px solid var(--hairline); }

.posts a {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: center;
  padding: clamp(22px, 3.4vh, 34px) 0;
}

/* Same wash, radius and hairline the essay puts behind its figures, so a card
   still and an in-post figure sit at the same depth off the black. */
.posts__thumb {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s var(--ease);
}

.posts__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: transform 0.5s var(--ease), opacity 0.25s var(--ease);
}

.posts a:hover .posts__thumb { border-color: rgba(255, 255, 255, 0.34); }

.posts a:hover .posts__thumb img {
  opacity: 1;
  transform: scale(1.04);
}

.posts time {
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  color: var(--faint);
}

.posts h2 {
  margin: 8px 0 6px;
  font-size: clamp(1.375rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

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

/* Reuses the backlink's arrow idiom so the two affordances read as one family. */
.posts__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(12px, 1.8vh, 18px);
  font-size: 0.9375rem;
  color: var(--fg);
  transition: color 0.25s var(--ease);
}

.posts a:hover .posts__more { color: var(--fg); }
.posts__more span[aria-hidden] { transition: transform 0.25s var(--ease); }
.posts a:hover .posts__more span[aria-hidden] { transform: translateX(3px); }

@media (max-width: 700px) {
  .posts a {
    grid-template-columns: 1fr;
    gap: clamp(14px, 2vh, 18px);
  }
}

.page__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: var(--pad);
  padding-bottom: max(var(--pad), env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--faint);
}

.page__foot .social a { color: var(--muted); }
.page__foot .social a:hover { color: var(--fg); }

@media (max-width: 560px) {
  .page__head { padding-bottom: 8px; }
  .page__foot { flex-direction: column; align-items: flex-start; gap: 18px; }

  .citation-popover__card {
    left: 0;
    top: calc(100% + 8px);
    transform: translateY(4px);
  }

  .citation-popover:hover .citation-popover__card,
  .citation-popover:focus-within .citation-popover__card {
    transform: none;
  }
}

@media (max-width: 1180px) {
  .page__body--essay .wrap:has(.article-bookmarks) {
    display: block;
    max-width: var(--reading-width);
  }

  .article-bookmarks {
    position: static;
    width: auto;
    margin: 0 0 var(--space-block);
    border-block: 1px solid var(--hairline);
  }

  .article-bookmarks summary { padding-block: 14px; }
  .article-bookmarks a { min-height: 44px; padding-block: 12px; }
  .article-bookmarks ol { gap: 0; }
}


/* Homepage framing and shared contact footer. */
.hero .page__head { padding: 0; }
.hero__status { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.hero__cta { display: inline-flex; align-items: center; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--fg); font-size: 1rem; }
.hero__cta span { transition: transform .2s var(--ease); }
.hero__cta:hover span { transform: translateX(4px); }
.reel__label { margin: 0 0 14px; padding-inline: var(--pad); color: var(--faint); font-size: .875rem; }
.page__foot p { margin: 0; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-left: auto; color: var(--muted); }
.footer-links a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-block: 8px;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.footer-links__label { color: var(--faint); font-size: 0.8125rem; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 560px) {
  .footer-links { margin-left: 0; }
  .hero__intro { gap: 20px; }
}
@media (max-height: 500px) and (min-aspect-ratio: 5/4) {
  .hero__status { margin-top: 0; }
  .hero__intro { gap: 10px; }
}

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