/* Home: project cards, re-laid out as "poster" cards.
   The work fills the card; the card's own colour washes in from the left
   so the question sits on it; the two numbers float over the picture as
   frosted glass chips. */
@media (min-width: 641px) {
  .proj-stack .project { display: block; min-height: 22rem; padding: 0; overflow: hidden; border-radius: 1.5rem; background: var(--card); }
  /* The picture: the right two thirds, full height, edge to edge. */
  .proj-stack .project-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 64%; margin: 0; border-radius: 0; }
  .proj-stack .project-shot { height: 100%; min-height: 0; border-radius: 0; }
  .proj-stack .project-shot :is(img, video) { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1); }
  /* The card colour washes over the picture's left edge. */
  .proj-stack .project-panel::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, var(--card) 0%, color-mix(in srgb, var(--card) 70%, transparent) 14%, transparent 42%); }
  .proj-stack .shot-lock { z-index: 2; }
  /* The words, on the colour. */
  .proj-stack .project-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; width: 46%; min-height: 22rem; padding: 2.25rem 2rem 2.25rem 2.25rem; }
  .proj-stack .project-title.is-hook { max-width: 18ch; font-size: clamp(1.5rem, 2.3vw, 1.875rem); }
  .proj-stack .project-desc { max-width: 30ch; }
  /* The numbers: frosted chips over the picture, bottom right. */
  .proj-stack .project-foot { position: absolute; right: 1.25rem; bottom: 1.25rem; z-index: 3; margin: 0; }
  .proj-stack .project-foot .metrics > div { max-width: 15rem; padding: 0.625rem 0.875rem; background: color-mix(in srgb, var(--bg) 72%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent), 0 0.75rem 1.75rem -0.75rem rgba(13, 13, 13, 0.35); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }
  .proj-stack .project:hover .project-shot :is(img, video) { transform: scale(1.035); }
}

/* Shared: the words. */
.proj-stack .project-tag { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-tag); }
.proj-stack .project-title.is-hook { margin-top: 0.875rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance; color: var(--ink); }
.proj-stack .project-desc { margin-top: 0.875rem; font-size: 0.9375rem; line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }
/* Shared: the numbers as chips. */
.proj-stack .project-foot { padding: 0; border: 0; }
.proj-stack .project-foot .metrics { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.proj-stack .project-foot .metrics > div { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 0.5rem; border-radius: 0.875rem; }
.proj-stack .project-foot .metrics > div + div { border-left: 0; }
.proj-stack .project-foot .metrics dd { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.proj-stack .project-foot .metrics dt { max-width: 10rem; margin: 0; font-size: 0.75rem; line-height: 1.3; color: var(--ink-soft); }
.proj-stack .project-cue, .proj-stack .project-go { display: none; }

/* Phones: picture on top with the colour rising from below, then the words,
   then the numbers as chips. */
@media (max-width: 640px) {
  .proj-stack .project { padding: 0; overflow: hidden; border-radius: 1.25rem; gap: 0; }
  .proj-stack .project-panel { position: relative; margin: 0; border-radius: 0; }
  .proj-stack .project-panel::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, var(--card)); pointer-events: none; }
  .proj-stack .project-copy { padding: 0.25rem 1.25rem 1.375rem; }
  .proj-stack .project-title.is-hook { margin-top: 0.625rem; font-size: 1.375rem; line-height: 1.2; }
  .proj-stack .project-desc { margin-top: 0.625rem; }
  .proj-stack .project-foot { margin-top: 1rem; }
  .proj-stack .project-foot .metrics > div { padding: 0.5rem 0.75rem; border-radius: 0.75rem; background: color-mix(in srgb, var(--bg) 65%, transparent); }
  .proj-stack .project-foot .metrics dd { font-size: 1.125rem; }
}
@media (min-width: 641px) {
  /* The chips sit against the card, not the words column. */
  .proj-stack .project-copy { position: static; }
  .proj-stack .project-copy > :not(.project-foot) { position: relative; z-index: 2; }
  .proj-stack .project-foot { width: max-content; }
  .proj-stack .project-foot .metrics { flex-wrap: nowrap; }
}
@media (min-width: 641px) {
  /* Words stay on solid colour; the picture fades in after them. */
  .proj-stack .project-copy { width: 42%; padding-right: 1.5rem; }
  .proj-stack .project-panel { width: 62%; }
  .proj-stack .project-panel::after { background: linear-gradient(90deg, var(--card) 0%, var(--card) 10%, color-mix(in srgb, var(--card) 55%, transparent) 26%, transparent 48%); }
}
/* No wash over the picture: a clean edge between the words and the work. */
.proj-stack .project-panel::after { display: none !important; }
@media (min-width: 641px) {
  .proj-stack .project-panel { top: 0.5rem; right: 0.5rem; bottom: 0.5rem; width: calc(58% - 0.5rem); border-radius: 1.125rem; overflow: hidden; }
  .proj-stack .project-copy { width: 42%; }
}
@media (max-width: 640px) { .proj-stack .project-panel { margin: 0.375rem 0.375rem 0.75rem; border-radius: 1rem; overflow: hidden; } }
/* Solid metric chips, no glass. */
.proj-stack .project-foot .metrics > div { background: var(--bg) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: 0 0.5rem 1.25rem -0.75rem rgba(13, 13, 13, 0.3) !important; }
/* Numbers straight on the picture, over a dark gradient rising from its
   bottom edge: no chips. */
.proj-stack .project-panel::after { display: block !important; content: ""; position: absolute; inset: auto 0 0 0; height: 55%; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(10, 10, 14, 0.82), rgba(10, 10, 14, 0.45) 45%, transparent); }
.proj-stack .project-foot .metrics > div { background: none !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; flex-direction: column-reverse !important; align-items: flex-start !important; gap: 0.25rem !important; }
.proj-stack .project-foot .metrics { gap: 2rem !important; }
.proj-stack .project-foot .metrics dd { font-size: 1.75rem !important; color: #fff !important; }
.proj-stack .project-foot .metrics dt { color: rgba(255, 255, 255, 0.78) !important; max-width: 11rem !important; }
@media (min-width: 641px) { .proj-stack .project-foot { right: auto; left: calc(42% + 1.75rem); bottom: 1.75rem; } }
/* Phones: numbers back under the words in the card colours. */
@media (max-width: 640px) {
  .proj-stack .project-panel::after { display: none !important; }
  .proj-stack .project-foot .metrics dd { color: var(--ink) !important; font-size: 1.375rem !important; }
  .proj-stack .project-foot .metrics dt { color: var(--ink-soft) !important; }
  .proj-stack .project-foot .metrics { gap: 1.5rem !important; flex-wrap: nowrap; }
}
@media (min-width: 641px) {
  .proj-stack .project-foot { right: 1.75rem; width: auto; }
  .proj-stack .project-foot .metrics { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem !important; }
  .proj-stack .project-foot .metrics dt { max-width: 14rem !important; }
}
/* Darker rise behind the numbers. */
.proj-stack .project-panel::after { height: 65% !important; background: linear-gradient(to top, rgba(6, 6, 9, 0.95), rgba(6, 6, 9, 0.7) 40%, rgba(6, 6, 9, 0.25) 75%, transparent) !important; }
/* Each card stops at the same spot and covers the one before it fully;
   the last one holds. */
@media (min-width: 641px) { .proj-stack .project { --strip: 0rem; } }
/* Larger, readable answer and metric labels. */
.proj-stack .project-desc { font-size: 1.0625rem !important; line-height: 1.55; color: var(--ink-soft); max-width: 32ch; }
.proj-stack .project-tag { font-size: 0.9375rem !important; }
.proj-stack .project-foot .metrics dd { font-size: 2rem !important; }
.proj-stack .project-foot .metrics dt { font-size: 0.9375rem !important; line-height: 1.35 !important; color: rgba(255, 255, 255, 0.9) !important; max-width: 15rem !important; }
@media (max-width: 640px) {
  .proj-stack .project-desc { font-size: 1rem !important; max-width: none; }
  .proj-stack .project-foot .metrics dd { font-size: 1.5rem !important; }
  .proj-stack .project-foot .metrics dt { font-size: 0.875rem !important; color: var(--ink-soft) !important; }
}

/* The field as a tinted chip. */
.proj-stack .project-tag { align-self: flex-start; display: inline-flex; padding: 0.3125rem 0.75rem; border-radius: 99px; background: color-mix(in srgb, var(--ink-tag) 10%, transparent); font-size: 0.875rem !important; font-weight: 600; line-height: 1.2; }

/* The field sits on the screenshot, top left, colour-coded. */
.proj-stack .project-tag.is-on-shot { position: absolute; top: 0.75rem; left: 0.75rem; z-index: 2; display: inline-flex; margin: 0; padding: 0.25rem 0.625rem; border-radius: 999px; background: var(--tag-bg) !important; color: var(--tag-ink); font-size: var(--fs-small) !important; font-weight: 600; line-height: 1.3; box-shadow: 0 0.25rem 0.75rem rgba(13, 13, 13, 0.14); }
:root[data-theme="dark"] .proj-stack .project-tag.is-on-shot { background: color-mix(in srgb, var(--tag-ink) 85%, #000) !important; color: #fff; }
.proj-stack .project-title.is-hook { margin-top: 0; }

/* The question on each card, a weight heavier. */
.proj-stack .project-title.is-hook { font-weight: 600 !important; letter-spacing: -0.035em; }

/* The question on each card in its card's own deep colour. */
.proj-stack .project-title.is-hook { color: var(--ink-tag) !important; }

/* Readability pass: a wider text column so the question wraps in two or
   three even lines, calmer tracking and line height, and a darker answer
   line with a comfortable measure. */
@media (min-width: 641px) {
  .proj-stack .project-copy { width: 44%; padding: 2rem 2rem 2rem 2.25rem; }
  .proj-stack .project-panel { width: calc(56% - 0.5rem); }
  .proj-stack .project-foot { left: calc(44% + 1.75rem); }
}
.proj-stack .project-title.is-hook { max-width: 22ch; font-size: clamp(1.375rem, 2vw, 1.6875rem) !important; font-weight: 600 !important; letter-spacing: -0.02em !important; line-height: 1.25; text-wrap: balance; }
.proj-stack .project-desc { margin-top: 1rem; max-width: 36ch; font-size: 1rem !important; line-height: 1.6; color: color-mix(in srgb, var(--ink) 72%, transparent) !important; text-wrap: pretty; }
@media (max-width: 640px) {
  .proj-stack .project-title.is-hook { max-width: none; font-size: 1.3125rem !important; }
  .proj-stack .project-desc { max-width: none; }
}
.proj-stack .project-tag.is-on-shot { box-shadow: none !important; }

/* Screenshot a little narrower so the title gets more room. */
@media (min-width: 641px) {
  .proj-stack .project-copy { width: 51%; }
  .proj-stack .project-panel { width: calc(49% - 0.5rem); }
  .proj-stack .project-foot { left: calc(51% + 1.5rem); right: 1.5rem; }
  .proj-stack .project-title.is-hook { max-width: none; text-wrap: balance; }
  .proj-stack .project-desc { max-width: 40ch; }
}
