/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #faf8f5;
  --bg-card: #ffffff;
  --text: #2c2c2c;
  --text-muted: #6b6b6b;
  --accent: #c96d3c;
  --accent-hover: #a8572e;
  --border: #e8e4df;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --max-width: 1140px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1816;
    --bg-card: #242120;
    --text: #e8e4df;
    --text-muted: #9a9490;
    --accent: #e0865a;
    --accent-hover: #c96d3c;
    --border: #3a3634;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

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

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header / Nav ---- */
header {
  padding: 32px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--text);
}

/* ---- Hero / Intro ---- */
.hero {
  padding: 96px 0 72px;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 80px;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.4rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.6;
}

.hero-photo {
  flex-shrink: 0;
  width: 360px;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-photo .placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--border);
  border-radius: var(--radius);
  font-size: 4rem;
  opacity: 0.4;
}

/* ---- Project Grid ---- */
.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
  counter-reset: project;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  counter-increment: project;
}

.project-card:hover,
.project-card.card-active{
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-card a {
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card .thumb {
  aspect-ratio: 16 / 10;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.project-card .thumb .placeholder-icon {
  font-size: 2.4rem;
  opacity: 0.5;
}

.project-card .thumb-matrix {
  background: #000;
  padding: 0;
}

.project-card .thumb-matrix canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.project-card .info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card .info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.project-card .info h3::before {
  content: counter(project, decimal-leading-zero);
  display: block;
  font-family: Georgia, ui-serif, serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.project-card .info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.project-card .info .platform {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 12px;
}

/* ---- Live Card Thumbnails ---- */

/* CouchWord — 5x4 grid, COUCH horizontal + WORD vertical sharing the O */
.project-card .thumb-couchword {
  background: #1d1a18;
  position: relative;
}
.thumb-couchword .cw-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 1fr;
  gap: 3px;
  width: 65%;
  aspect-ratio: 5 / 4;
}
.thumb-couchword .cw-tile {
  background: #2a2624;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, ui-serif, serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  position: relative;
}
.thumb-couchword .cw-tile.cw-blank {
  background: transparent;
  border-color: transparent;
}
.thumb-couchword .cw-tile::after {
  content: attr(data-letter);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.project-card:hover .thumb-couchword .cw-tile::after,
.project-card.card-active .thumb-couchword .cw-tile::after{ opacity: 1; transform: scale(1); }
.project-card:hover .thumb-couchword .cw-tile[data-step="1"]::after,
.project-card.card-active .thumb-couchword .cw-tile[data-step="1"]::after{ transition-delay: 0.05s; }
.project-card:hover .thumb-couchword .cw-tile[data-step="2"]::after,
.project-card.card-active .thumb-couchword .cw-tile[data-step="2"]::after{ transition-delay: 0.16s; }
.project-card:hover .thumb-couchword .cw-tile[data-step="3"]::after,
.project-card.card-active .thumb-couchword .cw-tile[data-step="3"]::after{ transition-delay: 0.27s; }
.project-card:hover .thumb-couchword .cw-tile[data-step="4"]::after,
.project-card.card-active .thumb-couchword .cw-tile[data-step="4"]::after{ transition-delay: 0.38s; }
.project-card:hover .thumb-couchword .cw-tile[data-step="5"]::after,
.project-card.card-active .thumb-couchword .cw-tile[data-step="5"]::after{ transition-delay: 0.49s; }
.project-card:hover .thumb-couchword .cw-tile[data-step="6"]::after,
.project-card.card-active .thumb-couchword .cw-tile[data-step="6"]::after{ transition-delay: 0.66s; }
.project-card:hover .thumb-couchword .cw-tile[data-step="7"]::after,
.project-card.card-active .thumb-couchword .cw-tile[data-step="7"]::after{ transition-delay: 0.77s; }
.project-card:hover .thumb-couchword .cw-tile[data-step="8"]::after,
.project-card.card-active .thumb-couchword .cw-tile[data-step="8"]::after{ transition-delay: 0.88s; }

/* AI Usage Meter — three bars + JS-driven percentage ticker */
.thumb-ai-meter {
  background: #1d1a18;
  padding: 22px 26px;
  align-items: stretch;
}
.thumb-ai-meter .meter {
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
}
.thumb-ai-meter .meter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.thumb-ai-meter .meter-label {
  width: 48px;
  text-align: right;
}
.live-hero .thumb-ai-meter .meter-label {
  width: 84px;
}
.thumb-ai-meter .meter-track {
  flex: 1;
  height: 7px;
  background: #2a2624;
  border-radius: 4px;
  overflow: hidden;
}
.thumb-ai-meter .meter-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(.2,.8,.2,1);
}
.thumb-ai-meter .meter-pct {
  width: 30px;
  text-align: right;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.project-card:hover .thumb-ai-meter .meter-fill,
.project-card.card-active .thumb-ai-meter .meter-fill{ width: var(--w); }

/* Jellie & Tuna — actual game art (Living Room level) */
.project-card .thumb-jellie {
  background: linear-gradient(180deg, #f5dfb3 0%, #e2bb84 70%, #d9a672 100%);
  position: relative;
  overflow: hidden;
}
.thumb-jellie .jt-floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22px;
  background: #8c5a32;
  border-top: 2px solid #5e3a1f;
  z-index: 1;
}
.thumb-jellie .jt-floor::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent 0, transparent 13px, rgba(94,58,31,0.5) 13px, rgba(94,58,31,0.5) 14px),
    repeating-linear-gradient(0deg, transparent 0, transparent 9px, rgba(94,58,31,0.5) 9px, rgba(94,58,31,0.5) 10px);
}
/* Catnip leaves bobbing in the air (high specificity to defeat global .thumb img rule) */
.project-card .thumb-jellie img.jt-catnip {
  position: absolute;
  width: 18px;
  height: 18px;
  object-fit: contain;
  image-rendering: pixelated;
  z-index: 2;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.18));
}
.thumb-jellie .jt-catnip-1 { left: 22%; bottom: 42%; }
.thumb-jellie .jt-catnip-2 { left: 50%; bottom: 56%; }
.thumb-jellie .jt-catnip-3 { left: 76%; bottom: 40%; }
@keyframes jt-catnip-bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-3px) rotate(3deg); }
}
.project-card:hover .thumb-jellie .jt-catnip,
.project-card.card-active .thumb-jellie .jt-catnip{ animation: jt-catnip-bob 1.5s ease-in-out infinite; }
.project-card:hover .thumb-jellie .jt-catnip-2,
.project-card.card-active .thumb-jellie .jt-catnip-2{ animation-delay: -0.5s; }
.project-card:hover .thumb-jellie .jt-catnip-3,
.project-card.card-active .thumb-jellie .jt-catnip-3{ animation-delay: -1s; }

/* Cats: pixel-art sprites running across */
.thumb-jellie .jt-cat {
  position: absolute;
  bottom: 22px;
  left: -25%;
  width: 56px;
  height: 38px;
  z-index: 3;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.2));
}
.thumb-jellie .jt-cat > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.thumb-jellie .jt-cat .jt-frame {
  opacity: 0;
}
@keyframes jt-runner-x {
  0%   { left: -25%; }
  100% { left: 110%; }
}
@keyframes jt-cat-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}
@keyframes jt-show-frame {
  0%, 24%   { opacity: 1; }
  25%, 100% { opacity: 0; }
}
.project-card:hover .thumb-jellie .jt-jellie,
.project-card.card-active .thumb-jellie .jt-jellie{
  animation: jt-runner-x 5s linear infinite, jt-cat-bob 0.32s ease-in-out infinite;
}
.project-card:hover .thumb-jellie .jt-tuna,
.project-card.card-active .thumb-jellie .jt-tuna{
  animation: jt-runner-x 5s linear -1.6s infinite, jt-cat-bob 0.36s ease-in-out infinite;
}
.project-card:hover .thumb-jellie .jt-frame,
.project-card.card-active .thumb-jellie .jt-frame{
  animation: jt-show-frame 0.32s step-end infinite;
}
.project-card:hover .thumb-jellie .jt-f1,
.project-card.card-active .thumb-jellie .jt-f1{ animation-delay: 0s; }
.project-card:hover .thumb-jellie .jt-f2,
.project-card.card-active .thumb-jellie .jt-f2{ animation-delay: -0.24s; }
.project-card:hover .thumb-jellie .jt-f3,
.project-card.card-active .thumb-jellie .jt-f3{ animation-delay: -0.16s; }
.project-card:hover .thumb-jellie .jt-f4,
.project-card.card-active .thumb-jellie .jt-f4{ animation-delay: -0.08s; }

/* Budgeteer — voice transcript types in, then amount pops up */
.project-card .thumb-budgeteer {
  background: #1d1a18;
}
.thumb-budgeteer .bg-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 14px;
}
.thumb-budgeteer .bg-amount {
  font-family: Georgia, ui-serif, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(6px) scale(0.85);
  transition: opacity 0.4s cubic-bezier(.2,.8,.2,1) 1.6s, transform 0.4s cubic-bezier(.2,.8,.2,1) 1.6s;
}
.thumb-budgeteer .bg-transcript {
  font-family: Georgia, ui-serif, serif;
  font-style: italic;
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  transition: width 1.4s steps(34, end) 0.2s;
}
.project-card:hover .thumb-budgeteer .bg-amount,
.project-card.card-active .thumb-budgeteer .bg-amount{ opacity: 1; transform: translateY(0) scale(1); }
.project-card:hover .thumb-budgeteer .bg-transcript,
.project-card.card-active .thumb-budgeteer .bg-transcript{ width: 100%; }
.thumb-budgeteer .eq {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 32px;
}
.thumb-budgeteer .eq-bar {
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
  height: 30%;
  opacity: 0.85;
}
.thumb-budgeteer .eq-bar:nth-child(2) { height: 56%; }
.thumb-budgeteer .eq-bar:nth-child(3) { height: 78%; }
.thumb-budgeteer .eq-bar:nth-child(4) { height: 92%; }
.thumb-budgeteer .eq-bar:nth-child(5) { height: 64%; }
.thumb-budgeteer .eq-bar:nth-child(6) { height: 40%; }
.thumb-budgeteer .eq-bar:nth-child(7) { height: 22%; }
.thumb-budgeteer .eq-bar { transform-origin: bottom; }
@keyframes eq-pulse { 0%, 100% { transform: scaleY(0.55); } 50% { transform: scaleY(1); } }
.project-card:hover .thumb-budgeteer .eq-bar,
.project-card.card-active .thumb-budgeteer .eq-bar{ animation: eq-pulse 0.7s ease-in-out infinite; }
.project-card:hover .thumb-budgeteer .eq-bar:nth-child(2),
.project-card.card-active .thumb-budgeteer .eq-bar:nth-child(2){ animation-delay: 0.08s; }
.project-card:hover .thumb-budgeteer .eq-bar:nth-child(3),
.project-card.card-active .thumb-budgeteer .eq-bar:nth-child(3){ animation-delay: 0.16s; }
.project-card:hover .thumb-budgeteer .eq-bar:nth-child(4),
.project-card.card-active .thumb-budgeteer .eq-bar:nth-child(4){ animation-delay: 0.24s; }
.project-card:hover .thumb-budgeteer .eq-bar:nth-child(5),
.project-card.card-active .thumb-budgeteer .eq-bar:nth-child(5){ animation-delay: 0.32s; }
.project-card:hover .thumb-budgeteer .eq-bar:nth-child(6),
.project-card.card-active .thumb-budgeteer .eq-bar:nth-child(6){ animation-delay: 0.40s; }
.project-card:hover .thumb-budgeteer .eq-bar:nth-child(7),
.project-card.card-active .thumb-budgeteer .eq-bar:nth-child(7){ animation-delay: 0.48s; }

/* Cat Play — ball runs from cursor (JS) + watching cat eye */
.project-card .thumb-catplay {
  background: linear-gradient(180deg, #1f1d1c 0%, #2a2624 100%);
  position: relative;
  overflow: hidden;
}
.thumb-catplay .ball,
.thumb-catplay .ball-trail {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.thumb-catplay .ball {
  background: radial-gradient(circle at 30% 30%, #fff5b8 0%, #d4d018 60%, #8a8800 100%);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset -3px -3px 6px rgba(0,0,0,0.2);
  z-index: 3;
}
.thumb-catplay .ball-trail {
  background: radial-gradient(circle, color-mix(in srgb, #d4d018 70%, transparent) 0%, transparent 70%);
  pointer-events: none;
  transition: left 0.18s ease, top 0.18s ease;
}
.thumb-catplay .ball-trail.t1 { transition-duration: 0.22s; opacity: 0.55; transform: translate(-50%, -50%) scale(0.85); }
.thumb-catplay .ball-trail.t2 { transition-duration: 0.32s; opacity: 0.32; transform: translate(-50%, -50%) scale(0.7); }
.thumb-catplay .ball-trail.t3 { transition-duration: 0.45s; opacity: 0.16; transform: translate(-50%, -50%) scale(0.55); }
/* Cat face */
.thumb-catplay .cat-face {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 52px;
  background: #2a2624;
  border: 1.5px solid var(--accent);
  border-radius: 50% 50% 44% 44% / 58% 58% 42% 42%;
  z-index: 2;
}
/* Ears */
.thumb-catplay .cf-ear {
  position: absolute;
  top: -15px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 9px 16px 9px;
  border-color: transparent transparent var(--accent) transparent;
}
.thumb-catplay .cf-ear::after {
  content: '';
  position: absolute;
  top: 5px;
  left: -4px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 4px 9px 4px;
  border-color: transparent transparent color-mix(in srgb, var(--accent) 28%, #2a2624) transparent;
}
.thumb-catplay .cf-ear-l { left: 5px; }
.thumb-catplay .cf-ear-r { right: 5px; }
/* Eyes — yellow-green iris, vertical slit pupil */
.thumb-catplay .cf-eye {
  position: absolute;
  top: 13px;
  width: 14px;
  height: 16px;
  background: #b8cc30;
  border-radius: 50%;
  overflow: hidden;
}
.thumb-catplay .cf-eye-l { left: 10px; }
.thumb-catplay .cf-eye-r { right: 10px; }
.thumb-catplay .cf-eye::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 12px;
  background: #111;
  border-radius: 50%;
  transform: translate(calc(-50% + var(--ex, 0px)), calc(-50% + var(--ey, 0px)));
  transition: transform 0.08s ease;
}
/* Nose */
.thumb-catplay .cf-nose {
  position: absolute;
  bottom: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 4px 0 4px;
  border-color: #d06070 transparent transparent transparent;
}

/* Resurfacer — pile of saved links; one rises ("resurfaces") at a time */
.project-card .thumb-resurfacer {
  background: radial-gradient(120% 80% at 50% 110%, #2a201c 0%, #1d1a18 60%, #14110f 100%);
  position: relative;
  padding: 18px 16px 22px;
  overflow: hidden;
}
.thumb-resurfacer .rs-pile {
  position: relative;
  width: 86%;
  height: 78%;
  margin: auto;
}
.thumb-resurfacer .rs-card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, #2e2724 0%, #261f1c 100%);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 14px rgba(0,0,0,0.55);
  padding: 7px 9px 8px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
}
.thumb-resurfacer .rs-fav {
  position: absolute;
  left: 9px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--rs-c, #999);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
  transform: translateY(-50%);
}
.thumb-resurfacer .rs-title {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  font-size: 0.72rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #ece6df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumb-resurfacer .rs-why {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  font-size: 0.6rem;
  line-height: 1.1;
  color: color-mix(in srgb, var(--text-muted) 85%, transparent);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumb-resurfacer .rs-c-pink   { --rs-c: #e07a8f; }
.thumb-resurfacer .rs-c-blue   { --rs-c: #6aa3d6; }
.thumb-resurfacer .rs-c-orange { --rs-c: #d68b5a; }
.thumb-resurfacer .rs-c-green  { --rs-c: #7fb088; }
.thumb-resurfacer .rs-c-yellow { --rs-c: #d6c25a; }
.thumb-resurfacer .rs-c-purple { --rs-c: #a888d6; }

/* Pile resting positions — bottom-up stack with gentle fan.
   Each card stores its rest transform in --rs-rest so the keyframe can return to it. */
.thumb-resurfacer .rs-card { transform: var(--rs-rest); }
.thumb-resurfacer .rs-card:nth-child(1) { --rs-rest: translate(0, 0)      rotate(0deg);    z-index: 6; }
.thumb-resurfacer .rs-card:nth-child(2) { --rs-rest: translate(-3px, -7px)  rotate(-1.2deg); z-index: 5; }
.thumb-resurfacer .rs-card:nth-child(3) { --rs-rest: translate(4px, -14px)  rotate(1.4deg);  z-index: 4; }
.thumb-resurfacer .rs-card:nth-child(4) { --rs-rest: translate(-5px, -21px) rotate(-1.6deg); z-index: 3; }
.thumb-resurfacer .rs-card:nth-child(5) { --rs-rest: translate(3px, -28px)  rotate(1deg);    z-index: 2; }
.thumb-resurfacer .rs-card:nth-child(6) { --rs-rest: translate(-2px, -35px) rotate(-0.8deg); z-index: 1; }
/* Depth fade on the back of the pile via overlay */
.thumb-resurfacer .rs-card:nth-child(2)::before,
.thumb-resurfacer .rs-card:nth-child(3)::before,
.thumb-resurfacer .rs-card:nth-child(4)::before,
.thumb-resurfacer .rs-card:nth-child(5)::before,
.thumb-resurfacer .rs-card:nth-child(6)::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: rgba(20,17,15,0.18);
  pointer-events: none;
}
.thumb-resurfacer .rs-card:nth-child(3)::before { background: rgba(20,17,15,0.34); }
.thumb-resurfacer .rs-card:nth-child(4)::before { background: rgba(20,17,15,0.48); }
.thumb-resurfacer .rs-card:nth-child(5)::before { background: rgba(20,17,15,0.60); }
.thumb-resurfacer .rs-card:nth-child(6)::before { background: rgba(20,17,15,0.70); }

/* "now" pill — sits in corner, pulses while a card is up */
.thumb-resurfacer .rs-now {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  padding: 3px 7px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Animate when card is active (hover or scroll-into-view autoplay) */
.project-card:hover .thumb-resurfacer .rs-card,
.project-card.card-active .thumb-resurfacer .rs-card {
  animation: rs-resurface 9s cubic-bezier(.4,.05,.3,1) infinite;
}
.project-card:hover .thumb-resurfacer .rs-card:nth-child(1),
.project-card.card-active .thumb-resurfacer .rs-card:nth-child(1) { animation-delay: 0s; }
.project-card:hover .thumb-resurfacer .rs-card:nth-child(2),
.project-card.card-active .thumb-resurfacer .rs-card:nth-child(2) { animation-delay: -1.5s; }
.project-card:hover .thumb-resurfacer .rs-card:nth-child(3),
.project-card.card-active .thumb-resurfacer .rs-card:nth-child(3) { animation-delay: -3s; }
.project-card:hover .thumb-resurfacer .rs-card:nth-child(4),
.project-card.card-active .thumb-resurfacer .rs-card:nth-child(4) { animation-delay: -4.5s; }
.project-card:hover .thumb-resurfacer .rs-card:nth-child(5),
.project-card.card-active .thumb-resurfacer .rs-card:nth-child(5) { animation-delay: -6s; }
.project-card:hover .thumb-resurfacer .rs-card:nth-child(6),
.project-card.card-active .thumb-resurfacer .rs-card:nth-child(6) { animation-delay: -7.5s; }

.project-card:hover .thumb-resurfacer .rs-now,
.project-card.card-active .thumb-resurfacer .rs-now {
  animation: rs-now-pulse 1.5s ease-in-out infinite;
}

/* Each card's own cycle: rest → rise + glow → hold → drop back into pile */
@keyframes rs-resurface {
  0%   { transform: var(--rs-rest); z-index: auto; box-shadow: 0 4px 14px rgba(0,0,0,0.55); border-color: rgba(255,255,255,0.06); }
  4%   { transform: translate(0, -68px) rotate(0deg) scale(1.06); z-index: 30;
         box-shadow: 0 14px 30px rgba(0,0,0,0.7), 0 0 0 1px var(--rs-c), 0 0 22px color-mix(in srgb, var(--rs-c) 45%, transparent);
         border-color: color-mix(in srgb, var(--rs-c) 70%, transparent); }
  18%  { transform: translate(0, -68px) rotate(0deg) scale(1.06); z-index: 30;
         box-shadow: 0 14px 30px rgba(0,0,0,0.7), 0 0 0 1px var(--rs-c), 0 0 22px color-mix(in srgb, var(--rs-c) 45%, transparent);
         border-color: color-mix(in srgb, var(--rs-c) 70%, transparent); }
  23%  { transform: var(--rs-rest); z-index: 30;
         box-shadow: 0 4px 14px rgba(0,0,0,0.55); border-color: rgba(255,255,255,0.06); }
  24%, 100% { transform: var(--rs-rest); z-index: auto;
         box-shadow: 0 4px 14px rgba(0,0,0,0.55); border-color: rgba(255,255,255,0.06); }
}
/* Pill pulses once per card surfacing — aligned to the 1.5s stagger */
@keyframes rs-now-pulse {
  0%, 24%   { opacity: 0; transform: translateY(-3px); }
  35%, 88%  { opacity: 1; transform: translateY(0); }
  100%      { opacity: 0; transform: translateY(-3px); }
}

/* Desk Quotes — editorial pull-quote: decorative open-quote, italic text, byline below */
.project-card .thumb-deskquotes {
  background: #faf7f0;
  font-family: Georgia, ui-serif, serif;
  position: relative;
  overflow: hidden;
  padding: 0;
}
.thumb-deskquotes .dq-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 28px 26px 22px;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.thumb-deskquotes .dq-slide::before {
  content: '\201C';
  position: absolute;
  top: 2px;
  left: 18px;
  font-family: Georgia, ui-serif, serif;
  font-weight: 700;
  font-size: 3.4rem;
  line-height: 1;
  color: rgba(60, 40, 20, 0.14);
  pointer-events: none;
}
.thumb-deskquotes .dq-line {
  font-family: Georgia, ui-serif, serif;
  font-size: 0.95rem;
  line-height: 1.42;
  font-style: italic;
  letter-spacing: -0.005em;
  color: #1a1815;
  margin: 0;
  position: relative;
  z-index: 1;
}
.thumb-deskquotes .dq-byline {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  z-index: 1;
}
.thumb-deskquotes .dq-byline::before {
  content: '';
  width: 22px;
  height: 1px;
  background: rgba(60, 40, 20, 0.32);
  flex-shrink: 0;
}
.thumb-deskquotes .dq-portrait {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #4a4640;
  background-size: cover;
  background-position: center 20%;
  filter: grayscale(1) contrast(1.05);
  border: 1px solid rgba(0,0,0,0.2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.thumb-deskquotes .dq-s1 .dq-portrait { background-image: url('/images/quotes/einstein.jpg'); }
.thumb-deskquotes .dq-s2 .dq-portrait { background-image: url('/images/quotes/socrates.jpg'); background-position: center 25%; }
.thumb-deskquotes .dq-s3 .dq-portrait { background-image: url('/images/quotes/turing.jpg'); }
.thumb-deskquotes .dq-attr {
  font-family: Georgia, ui-serif, serif;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 600;
  color: #5a4f42;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.thumb-deskquotes .dq-s1 { opacity: 1; }
@keyframes dq-fade-1 { 0%, 30% { opacity: 1; } 33%, 100% { opacity: 0; } }
@keyframes dq-fade-2 { 0%, 30% { opacity: 0; } 33%, 63% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes dq-fade-3 { 0%, 63% { opacity: 0; } 66%, 96% { opacity: 1; } 100% { opacity: 0; } }
.project-card:hover .thumb-deskquotes .dq-s1,
.project-card.card-active .thumb-deskquotes .dq-s1{ animation: dq-fade-1 6s ease-in-out infinite; }
.project-card:hover .thumb-deskquotes .dq-s2,
.project-card.card-active .thumb-deskquotes .dq-s2{ animation: dq-fade-2 6s ease-in-out infinite; }
.project-card:hover .thumb-deskquotes .dq-s3,
.project-card.card-active .thumb-deskquotes .dq-s3{ animation: dq-fade-3 6s ease-in-out infinite; }

/* Names & Faces — flashcard deck: name slides up, card swipes away, next face waiting */
.project-card .thumb-namesfaces {
  background: linear-gradient(160deg, #eef1f5 0%, #dfe4ea 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-card .thumb-namesfaces img {
  width: auto;
  height: 82%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

/* The tile clip is already cropped to the card, so it fills the tile the way
   the other ten do. */
.project-card .thumb-namesfaces video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-namesfaces .nf-deck {
  position: relative;
  width: 104px;
  height: 132px;
  margin-top: -8px;
}
.thumb-namesfaces .nf-card {
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(20, 30, 50, 0.08);
  box-shadow: 0 4px 14px rgba(20, 30, 50, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}
.thumb-namesfaces .nf-c3 { transform: rotate(6deg) translate(7px, 2px); }
.thumb-namesfaces .nf-c2 { transform: rotate(-5deg) translate(-6px, 1px); }
.thumb-namesfaces .nf-face {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e6eaf1;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.thumb-namesfaces .nf-face::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #97a1b4;
}
.thumb-namesfaces .nf-face::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 25px;
  border-radius: 50% 50% 0 0;
  background: #97a1b4;
}
.thumb-namesfaces .nf-c2 .nf-face::before,
.thumb-namesfaces .nf-c2 .nf-face::after { background: #a9b3c4; }
.thumb-namesfaces .nf-c3 .nf-face::before,
.thumb-namesfaces .nf-c3 .nf-face::after { background: #bcc4d2; }
.thumb-namesfaces .nf-name {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: #1c2333;
  background: #e2e7ef;
  border-radius: 5px;
  padding: 4px 9px;
  transform: translateY(0);
}
.thumb-namesfaces .nf-progress {
  position: absolute;
  bottom: 9px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a8496;
}
@keyframes nf-swipe {
  0%, 50%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  58%       { transform: translate(130%, -8px) rotate(14deg); opacity: 0; }
  58.01%    { transform: translate(0, 6px) scale(0.94); opacity: 0; }
  66%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes nf-reveal {
  0%, 55%   { transform: translateY(0); opacity: 1; }
  56%, 82%  { transform: translateY(160%); opacity: 0; }
  90%, 100% { transform: translateY(0); opacity: 1; }
}
@keyframes nf-promote {
  0%, 54%   { scale: 1; }
  60%       { scale: 1.06; }
  66%, 100% { scale: 1; }
}
.project-card:hover .thumb-namesfaces .nf-c1,
.project-card.card-active .thumb-namesfaces .nf-c1 { animation: nf-swipe 5.5s ease-in-out infinite; }
.project-card:hover .thumb-namesfaces .nf-c1 .nf-name,
.project-card.card-active .thumb-namesfaces .nf-c1 .nf-name { animation: nf-reveal 5.5s ease-in-out infinite; }
.project-card:hover .thumb-namesfaces .nf-c2,
.project-card.card-active .thumb-namesfaces .nf-c2 { animation: nf-promote 5.5s ease-in-out infinite; }

/* Brickbreaker — JS-driven mini game with crossfade reset */
.project-card .thumb-brickbreaker {
  background: #1d1a18;
  position: relative;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px 22px 10px;
  overflow: hidden;
  transition: opacity 0.3s ease;
}
.thumb-brickbreaker .brick-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  width: 100%;
  margin-bottom: auto;
}
.thumb-brickbreaker .brick {
  height: 11px;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.thumb-brickbreaker .brick:nth-child(n+13) { background: var(--text-muted); opacity: 0.5; }
.thumb-brickbreaker .brick:nth-child(n+7):nth-child(-n+12) { opacity: 0.7; }
.thumb-brickbreaker .bb-paddle {
  position: absolute;
  bottom: 12px;
  left: 50%;
  width: 38px;
  height: 5px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%);
}
.thumb-brickbreaker .bb-ball {
  position: absolute;
  top: calc(100% - 26px);
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(255,255,255,0.4);
}
.thumb-brickbreaker .bb-score {
  position: absolute;
  top: 6px;
  right: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
  z-index: 5;
  background: rgba(29, 26, 24, 0.85);
  padding: 1px 4px;
  border-radius: 2px;
}
.project-card:hover .thumb-brickbreaker .bb-score,
.project-card.card-active .thumb-brickbreaker .bb-score{ opacity: 1; }

/* Reduced motion: stop card animations and hold final state */
@media (prefers-reduced-motion: reduce) {
  .project-card:hover .thumb-jellie .jt-jellie,
.project-card.card-active .thumb-jellie .jt-jellie,
  .project-card:hover .thumb-jellie .jt-tuna,
.project-card.card-active .thumb-jellie .jt-tuna,
  .project-card:hover .thumb-jellie .jt-frame,
.project-card.card-active .thumb-jellie .jt-frame,
  .project-card:hover .thumb-jellie .jt-catnip,
.project-card.card-active .thumb-jellie .jt-catnip,
  .project-card:hover .thumb-budgeteer .eq-bar,
.project-card.card-active .thumb-budgeteer .eq-bar,
  .project-card:hover .thumb-deskquotes .dq-s1,
.project-card.card-active .thumb-deskquotes .dq-s1,
  .project-card:hover .thumb-deskquotes .dq-s2,
.project-card.card-active .thumb-deskquotes .dq-s2,
  .project-card:hover .thumb-deskquotes .dq-s3,
.project-card.card-active .thumb-deskquotes .dq-s3,
  .project-card:hover .thumb-namesfaces .nf-c1,
.project-card.card-active .thumb-namesfaces .nf-c1,
  .project-card:hover .thumb-namesfaces .nf-c1 .nf-name,
.project-card.card-active .thumb-namesfaces .nf-c1 .nf-name,
  .project-card:hover .thumb-namesfaces .nf-c2,
.project-card.card-active .thumb-namesfaces .nf-c2{
    animation: none;
  }
  .thumb-couchword .cw-tile::after { opacity: 1; transform: scale(1); }
  .thumb-ai-meter .meter-fill { width: var(--w); transition: none; }
  .thumb-budgeteer .bg-transcript { width: 100%; transition: none; }
}

/* Real app screenshot inside a project description */
.project-detail .app-shot {
  display: block;
  width: min(300px, 80%);
  height: auto;
  margin: 28px auto;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

/* ---- Screen recording of the real app ---- */
.project-detail .app-clip {
  margin: 8px 0 34px;
  text-align: center;
}

.project-detail .app-clip video {
  width: min(300px, 72%);
  height: auto;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  display: block;
  margin: 0 auto;
}

.project-detail .app-clip-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 14px 0 0;
}

/* ---- Screenshot row (real app shots, side by side) ---- */
.project-detail .shot-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 30px 0 10px;
}

.project-detail .shot-row img {
  width: 200px;
  max-width: 42%;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.project-detail .shot-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 30px;
}

/* ---- CTA Section ---- */
.cta {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  margin-bottom: 40px;
}

.cta h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta p {
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 480px;
}

.cta .btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.cta .btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ---- Project Detail Page ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-weight: 500;
}

.back-link:hover {
  color: var(--text);
}

.project-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}

.project-hero .hero-img {
  aspect-ratio: 16 / 9;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.project-hero .hero-img .placeholder-icon {
  font-size: 4rem;
  opacity: 0.4;
}

.project-hero .hero-img.matrix-rain-frame {
  background: #080a08;
  padding: 0;
}

.project-hero .hero-img.matrix-rain-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Live-hero: a project-card used as the detail-page hero (no info panel,
   no hover lift, retains the framed-card look + animated thumb).
   Capped width so the inner animations stay proportional — they're
   calibrated for grid-tile size, not full-width pages. */
.project-detail .project-card.live-hero {
  max-width: 540px;
  margin: 0 auto 40px;
  cursor: default;
}
.project-detail .project-card.live-hero:hover,
.project-detail .project-card.live-hero.card-active {
  transform: none;
  box-shadow: var(--shadow);
}

.project-detail {
  padding-bottom: 80px;
}

.project-detail h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.project-detail .meta {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.project-detail .meta .tag {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 4px 12px;
  border-radius: 20px;
}

.project-detail .description {
  max-width: 640px;
}

.project-detail .description p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ---- Contact ---- */
/* ---- /now page ---- */
.now {
  padding: 64px 0 80px;
}

.now h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.now-body {
  max-width: 600px;
}

.now-block {
  margin-bottom: 36px;
}

.now-block h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.now-block p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}

.now-footer {
  margin-top: 48px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.now-footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

.now-footer a:hover {
  color: var(--text);
}

/* ---- contact ---- */
.contact {
  padding: 64px 0;
}

.contact h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.contact p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.contact .email {
  font-size: 1.2rem;
  font-weight: 600;
}

/* ---- 404 / Brickbreaker ---- */
.not-found {
  padding: 56px 0 64px;
  text-align: center;
}

.not-found h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.not-found .lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.game-frame {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.game-frame canvas {
  width: 100%;
  max-width: 720px;
  height: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.not-found .game-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
}

/* ---- Footer ---- */
footer {
  margin-top: auto;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

footer nav {
  gap: 16px;
}

footer nav a {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-content {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 32px;
  }

  .hero-photo {
    width: 220px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 40px 0 32px;
  }

  .hero-content {
    gap: 28px;
  }

  .hero-photo {
    width: 160px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-card .info h3::before {
    font-size: 1.2rem;
  }

  .cta h2 {
    font-size: 1.3rem;
  }

  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  footer .container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .project-detail h1 {
    font-size: 1.5rem;
  }
}

/* ---- Burpee Counter — live rep counter, black screen, giant number ---- */
.project-card .thumb-burpee {
  background: #000;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  position: relative;
  overflow: hidden;
}
.thumb-burpee .bp-day {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 999px;
  padding: 2px 9px 2px 11px;
}
.thumb-burpee .bp-num {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  will-change: transform;
}
.thumb-burpee .bp-num.bp-land {
  animation: bp-jelly 0.42s cubic-bezier(.2,.8,.2,1);
}
.thumb-burpee .bp-num.bp-gold {
  color: #d4af37;
  text-shadow: 0 0 26px rgba(212, 175, 55, 0.75);
}
@keyframes bp-jelly {
  0%   { transform: scale(1, 1); }
  30%  { transform: scale(1.22, 0.82); }
  55%  { transform: scale(0.92, 1.12); }
  75%  { transform: scale(1.06, 0.96); }
  100% { transform: scale(1, 1); }
}
.thumb-burpee .bp-clock {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.thumb-burpee .bp-mic {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e04040;
  opacity: 0;
}
.project-card:hover .thumb-burpee .bp-mic,
.project-card.card-active .thumb-burpee .bp-mic{
  animation: bp-mic-blink 1.6s ease-in-out infinite;
}
@keyframes bp-mic-blink {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .project-card:hover .thumb-burpee .bp-mic,
  .project-card.card-active .thumb-burpee .bp-mic{ animation: none; opacity: 0.6; }
  .thumb-burpee .bp-num.bp-land { animation: none; }
}

/* ---- Hero photo — pixelate-on-hover treatment ---- */
.hero-photo {
  position: relative;
}
.hero-photo .hp-pixel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.hero-photo.hp-on .hp-pixel {
  opacity: 1;
}
.hero-photo .hp-tag {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%) translateY(6px);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #baf5c0;
  background: rgba(0, 0, 0, 0.72);
  padding: 4px 10px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.35s ease 0.15s, transform 0.35s ease 0.15s;
  pointer-events: none;
  white-space: nowrap;
}
.hero-photo.hp-on .hp-tag {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Guided tour ---- */
.tour-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.tour-start:hover {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-color: var(--accent);
  color: var(--accent);
}
.tour-start .tour-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.tour-start.tour-fresh .tour-dot {
  animation: tour-pulse 2s ease-in-out infinite;
}
@keyframes tour-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-start.tour-fresh .tour-dot { animation: none; }
}

.tour-hole {
  position: absolute;
  z-index: 998;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(12, 10, 9, 0.62);
  pointer-events: none;
  transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
}
.tour-card {
  position: absolute;
  z-index: 999;
  width: min(340px, calc(100vw - 40px));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  padding: 18px 20px 14px;
  transition: top 0.35s ease, left 0.35s ease;
}
.tour-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.tour-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}
.tour-card .tour-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tour-card .tour-dots {
  display: flex;
  gap: 5px;
}
.tour-card .tour-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
}
.tour-card .tour-dots span.on {
  background: var(--accent);
}
.tour-card .tour-btns {
  display: flex;
  gap: 8px;
}
.tour-card button {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.tour-card button:hover { color: var(--text); }
.tour-card button.tour-next {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.tour-card button.tour-next:hover { background: var(--accent-hover); }
.tour-card .tour-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  padding: 4px 8px;
  font-size: 1rem;
  line-height: 1;
}

/* ---- AI page ---- */
.ai {
  padding: 64px 0 80px;
}
.ai h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.ai .ai-intro {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 56px;
}
.ai .ai-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.ai section {
  margin-bottom: 64px;
}

.ai-system {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px 20px;
  margin-bottom: 20px;
  max-width: 760px;
}
.ai-system h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.ai-system .ai-one-liner {
  font-size: 0.92rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 14px;
}
.ai-system .ai-pipe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--border) 40%, transparent);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 14px;
}
.ai-system .ai-pipe .p {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
  white-space: nowrap;
}
.ai-system .ai-pipe .a {
  color: var(--accent);
  font-weight: 700;
}
.ai-system p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.ai-system p strong { color: var(--text); font-weight: 600; }
.ai-system .ai-links {
  font-size: 0.88rem;
  font-weight: 500;
}
.ai-system .ai-links a { margin-right: 18px; }

.ai-tools {
  max-width: 760px;
}
.ai-tool {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1.6;
}
.ai-tool:last-child { border-bottom: none; }
.ai-tool .t-name {
  font-weight: 600;
  color: var(--text);
}
.ai-tool .t-take {
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .ai-tool {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.ai-beliefs {
  max-width: 680px;
  counter-reset: belief;
  list-style: none;
}
.ai-beliefs li {
  counter-increment: belief;
  position: relative;
  padding: 0 0 22px 52px;
}
.ai-beliefs li::before {
  content: counter(belief, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: Georgia, ui-serif, serif;
  font-size: 1.3rem;
  color: var(--text-muted);
  opacity: 0.75;
}
.ai-beliefs li strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}
.ai-beliefs li p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.ai-grave {
  max-width: 680px;
}
.ai-grave .grave {
  border-left: 3px solid var(--border);
  padding: 2px 0 2px 18px;
  margin-bottom: 24px;
}
.ai-grave .grave h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 3px;
}
.ai-grave .grave .g-dates {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.ai-grave .grave p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 6px;
}
.ai-grave .grave p em { color: var(--text); font-style: normal; font-weight: 600; }

.ai-close {
  max-width: 680px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.ai-close p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-muted);
}
