/* ============================================================
   Reno Zhao — Portfolio
   1:1 reproduction of the Figma design (node 1:13)
   ============================================================ */

/* ---------- Fonts (self-hosted Inter) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/inter-600.woff2") format("woff2");
}

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

html,
body {
  margin: 0;
  padding: 0;
}

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

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

/* ---------- Theme tokens ---------- */
:root {
  /* layout */
  --content-width: 768px;
  --col-gap: 56px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --bg: #ffffff;

  --text-name: #0a0a0a;
  --text-role: #a1a1a1;
  --text-lead: #737373;
  --text-link: #5a5a5a;
  --text-strong: #303030;
  --text-muted: #767676;
  --text-section: #a1a1a1;
  --text-item-title: #0a0a0a;
  --text-item-desc: #737373;

  --divider: #e5e5e5;
  --thumb-projects: #fafafa;
  --thumb-playground: #f5f5f5;

  --icon-filter: none;
  --toggle-color: #4b4b4b;
  --sherlock-ink: #2f3a45;
  --recovery-ink: #2f3a45;
  --aca-ink: #2f3a45;
  --thesis-rule: #d4d4d4;
  --thesis-ink: #525252;
  --select-bg: #171717;
  --select-fg: #ffffff;
  --num-from: #f0f0f0;
  --num-to: #3d3d3d;

  /* cat companion */
  --ink: #171717;
  --flash: #ff4d00;
  --gold: #e8b024;
  --hair: #e5e5e5;
  --ink-soft: #a1a1a1;
  --panel: #f5f5f5;
  --star: #d9a520;
  --sick: #8fbf6e;

  /* case study */
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;

  --text-name: #fafafa;
  --text-role: #6b6b6b;
  --text-lead: #a1a1a1;
  --text-link: #c9c9c9;
  --text-strong: #ededed;
  --text-muted: #8a8a8a;
  --text-section: #6b6b6b;
  --text-item-title: #fafafa;
  --text-item-desc: #a1a1a1;

  --divider: #262626;
  --thumb-projects: #1a1a1a;
  --thumb-playground: #171717;

  --icon-filter: invert(1) brightness(1.6);
  --toggle-color: #b5b5b5;
  --sherlock-ink: #d3dae1;
  --recovery-ink: #d3dae1;
  --aca-ink: #d3dae1;
  --thesis-rule: #4a4a4a;
  --thesis-ink: #c9c9c9;
  --select-bg: #f5f5f5;
  --select-fg: #0a0a0a;
  --num-from: #1f1f1f;
  --num-to: #d0d0d0;

  /* cat companion */
  --ink: #ededed;
  --flash: #ff4d00;
  --gold: #ffc94a;
  --hair: #262626;
  --ink-soft: #6b6b6b;
  --panel: #171717;
  --star: #fff2cc;
  --sick: #7aa85e;

  /* case study */
}

/* ---------- Selection ---------- */
::selection {
  background: var(--select-bg);
  color: var(--select-fg);
}

/* ---------- Base ---------- */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-strong);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  min-height: 100vh;
  background: var(--bg);
}

/* The 900px content zone (Figma: px-255 on a 1410 frame) */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   Header
   ============================================================ */
.header {
  padding-top: 48px;
}

.header-row {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
  width: var(--content-width);
  max-width: 100%;
  margin: 0 auto;
}

.header-left {
  flex-shrink: 0;
  padding-bottom: 32.75px;
}

.identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.name {
  font-size: 14px;
  font-weight: 600;
  line-height: 19.25px;
  letter-spacing: -0.16px;
  color: var(--text-name);
}

.role-row {
  height: 20px;
  display: flex;
  align-items: flex-start;
}

.role {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.16px;
  color: var(--text-role);
}

.header-right {
  flex-shrink: 0;
  padding-top: 20px;
  padding-bottom: 32px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.theme-toggle {
  border: none;
  background: transparent;
  padding: 6px;
  margin: -6px;
  cursor: pointer;
  line-height: 0;
  color: var(--toggle-color);
  border-radius: 8px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.theme-toggle:hover {
  opacity: 0.7;
}

.theme-toggle .icon {
  width: 18px;
  height: 18px;
  display: block;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* ============================================================
   Main
   ============================================================ */
.main {
  padding-bottom: 64px;
}

.main-inner {
  display: flex;
  gap: var(--col-gap);
  align-items: flex-start;
  width: var(--content-width);
  max-width: 100%;
  margin: 0 auto;
}

.left-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---------- Intro ---------- */
.intro-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.intro-lead {
  margin: 0;
  font-size: 13.9px;
  font-weight: 500;
  line-height: 22.75px;
  letter-spacing: -0.16px;
  color: var(--text-lead);
}

.dotted-link {
  color: var(--text-link);
  text-decoration: underline dotted;
  text-underline-position: from-font;
  text-decoration-skip-ink: none;
}

.intro-statement {
  font-size: 14px;
  font-weight: 500;
  line-height: 22.75px;
  letter-spacing: -0.16px;
}

.statement-strong {
  margin: 0;
  color: var(--text-strong);
}

.statement-muted {
  margin: 0;
  color: var(--text-muted);
}

.resume-line {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 22.75px;
  letter-spacing: -0.16px;
}

/* plain link — it underlines and darkens on hover, and the arrow
   marks that it leaves the page */
.resume-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-lead);
  text-decoration: none;
  transition: color 0.18s ease;
}

.resume-link svg {
  flex-shrink: 0;
  transition: transform 0.22s var(--ease);
}

.resume-link:hover {
  color: var(--text-name);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.resume-link:hover svg {
  transform: translate(2px, -2px);
}

.find-me {
  display: flex;
  align-items: center;
  gap: 12px;
}

.find-me-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 22.75px;
  letter-spacing: -0.16px;
  color: var(--text-lead);
  white-space: nowrap;
}

.social-icon {
  display: block;
  width: 16px;
  height: 16px;
}

.social-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: var(--icon-filter);
}

/* drawn inline, so it takes the theme colour directly rather than
   being inverted like the bitmap marks */
.ig-mark {
  width: 16px;
  height: 16px;
  display: block;
  color: var(--text-name);
}

/* ---------- Sections (Projects / Playground) ---------- */
.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.section-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: -0.16px;
  color: var(--text-section);
  white-space: nowrap;
}

.divider {
  flex: 1 1 0;
  min-width: 0;
  height: 1px;
  border-top: 1px dashed var(--divider);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 344px;
  max-width: 100%;
  padding: 6px 16px 6px 12px;
  /* Outset the left padding so the icon/title align with the section
     subheader while the hover background bleeds outward to the left. */
  margin-left: -12px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.list-item:hover {
  background-color: var(--thumb-projects);
}

.item-thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-thumb--projects {
  background: var(--thumb-projects);
}

.item-thumb--playground {
  background: var(--thumb-playground);
}

.item-thumb-icon {
  width: 27px;
  height: 24px;
  object-fit: contain;
}

/* 2-bit detective mark — solid blocks, no anti-aliased edges */
.thumb-sherlock {
  width: 24px;
  height: 21px;
  shape-rendering: crispEdges;
}

/* ============================================================
   Entry-row icon hover — each mark gets its own small gesture
   ============================================================ */

/* every icon lifts a little; the thumb tile warms up under it */
.item-thumb-icon,
.thumb-fish,
.thumb-mailbox {
  overflow: visible;
  transition: scale 0.28s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.list-item:hover .item-thumb-icon,
.list-item:hover .thumb-fish,
.list-item:hover .thumb-mailbox {
  scale: 1.12;
}

/* ---------- Sherlock: the lens lifts and tilts, the glint flashes ---------- */
.sh-lens {
  transform-origin: 7.5px 8.5px;
  transition: transform 0.32s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.list-item:hover .sh-lens {
  transform: translate(0.6px, -1.2px) rotate(-12deg);
}

.sh-glint {
  transition: opacity 0.2s ease;
}

.list-item:hover .sh-glint {
  animation: sh-flash 0.7s ease-in-out;
}

/* ---------- RecoveryAI: the bubble pops, the sparkles twinkle ---------- */
.thumb-aca {
  width: 24px;
  height: 21px;
  shape-rendering: crispEdges;
}

.thumb-recovery {
  width: 24px;
  height: 21px;
  shape-rendering: crispEdges;
}

/* the bot leans in when you look at it */
.rc-bot,
.rc-eyes {
  transform-origin: 6px 12px;
  transition: transform 0.3s var(--ease);
}

.list-item:hover .rc-bot,
.list-item:hover .rc-eyes {
  animation: rc-tilt 0.7s ease-in-out;
}

@keyframes rc-tilt {
  0%, 100% { transform: rotate(0deg); }
  35% { transform: rotate(-6deg); }
  70% { transform: rotate(4deg); }
}

/* and its bubble pops up as it starts talking */
.rc-bubble,
.rc-dots {
  transform-origin: 10px 5px;
  transition: transform 0.3s var(--ease);
}

.list-item:hover .rc-bubble,
.list-item:hover .rc-dots {
  animation: rc-pop 0.5s cubic-bezier(0.3, 1.5, 0.5, 1);
}

@keyframes rc-pop {
  0% { transform: scale(0.82) translateY(1px); }
  100% { transform: scale(1) translateY(0); }
}

/* the middle dot blinks — it is still typing */
.list-item:hover .rc-dot-mid {
  animation: rc-typing 0.9s ease-in-out infinite;
}

@keyframes rc-typing {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* ---------- ACA: the cloud drifts up, the check draws itself ---------- */
.ac-cloud {
  transition: transform 0.35s var(--ease);
}

.list-item:hover .ac-cloud {
  transform: translateY(-0.8px);
}

/* the status light breathes — the cloud is live */
.list-item:hover .ac-light {
  animation: ac-pulse 1.2s ease-in-out infinite;
}

@keyframes ac-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* the check redraws itself, block by block, left to right */
.list-item:hover .ac-check rect {
  animation: ac-tick 0.5s ease-out backwards;
}

.list-item:hover .ac-check rect:nth-child(1) { animation-delay: 0s; }
.list-item:hover .ac-check rect:nth-child(2) { animation-delay: 0.07s; }
.list-item:hover .ac-check rect:nth-child(3) { animation-delay: 0.14s; }
.list-item:hover .ac-check rect:nth-child(4) { animation-delay: 0.21s; }

@keyframes ac-tick {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes sh-flash {
  0%, 100% { opacity: 1; }
  35% { opacity: 0.25; }
  60% { opacity: 1; }
}

/* ---------- Gone Fishing: the fish swims — body glides, tail flicks ---------- */
.fs-body,
.fs-eye {
  transition: transform 0.3s var(--ease);
}

.list-item:hover .fs-body,
.list-item:hover .fs-eye {
  animation: fs-swim 0.9s ease-in-out;
}

.fs-tail {
  transform-origin: 11px 4px;
  transition: transform 0.3s var(--ease);
}

.list-item:hover .fs-tail {
  animation: fs-flick 0.45s ease-in-out 2;
}

@keyframes fs-swim {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-1.2px); }
  70% { transform: translateX(0.8px); }
}

@keyframes fs-flick {
  0%, 100% { transform: rotate(0deg); }
  40% { transform: rotate(16deg); }
  75% { transform: rotate(-10deg); }
}

/* ---------- Postman Cat: a letter pops out, the box rocks ---------- */
.mb-letter {
  transform: translateY(3.4px);
  opacity: 0;
  transition: transform 0.34s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.2s ease;
}

.list-item:hover .mb-letter {
  transform: translateY(0);
  opacity: 1;
}

.mb-box {
  transform-origin: 5px 11px;
  transition: transform 0.3s var(--ease);
}

.list-item:hover .mb-box {
  animation: mb-rock 0.6s ease-in-out;
}

@keyframes mb-rock {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(-4deg); }
  65% { transform: rotate(3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .list-item:hover .item-thumb-icon,
  .list-item:hover .thumb-fish,
  .list-item:hover .thumb-mailbox,
  .list-item:hover .sh-lens,
  .list-item:hover .rc-bubble,
  .list-item:hover .rc-bot,
  .list-item:hover .rc-dot-mid,
  .list-item:hover .ac-light,
  .list-item:hover .ac-cloud,
  .list-item:hover .mb-letter {
    scale: 1;
    transform: none;
    animation: none;
  }
}

.item-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.item-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.16px;
  color: var(--text-item-title);
  white-space: nowrap;
}

.item-desc {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.16px;
  color: var(--text-item-desc);
  white-space: nowrap;
}

/* dim sibling project rows while one is hovered */
.list.hot .work:not(.on) {
  opacity: 0.5;
}

.work {
  transition: background-color 0.15s ease, opacity 0.25s var(--ease);
}

/* ============================================================
   Right column — Cat Companion
   ============================================================ */
.right-col {
  flex: 1 1 0;
  min-width: 0;
  height: 538px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cat-den {
  position: relative;
  height: 400px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}

/* ---------- cat ---------- */
.cat {
  position: relative;
  cursor: pointer;
  z-index: 2;
}
.cat-svg {
  display: block;
  overflow: visible;
  shape-rendering: crispEdges;
  height: 96px;
  width: auto;
}

/* breathing — faster when awake */
.body-g {
  transform-origin: 50% 100%;
  animation: breathe 3.6s ease-in-out infinite;
}
.cat.awake .body-g {
  animation-duration: 2.4s;
}
@keyframes breathe {
  0%, 100% { scale: 1 1; }
  50% { scale: 1 0.97; }
}

/* eyes: closed asleep → open awake → 35% squint when petted */
.eye {
  transform-origin: center;
  transition: transform 0.28s var(--ease);
  transform: scaleY(0.1);
}
.cat.awake .eye { transform: scaleY(1); }
.cat.blink .eye { transform: scaleY(0.1); }
.cat.pet .eye { transform: scaleY(0.35); }

/* ears: perk when awake, flatten back when petted */
.ear {
  transform-origin: 50% 100%;
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.cat.awake .ear-l { transform: rotate(-7deg); }
.cat.awake .ear-r { transform: rotate(7deg); }
.cat.pet .ear-l { transform: rotate(-16deg); }
.cat.pet .ear-r { transform: rotate(16deg); }

/* tail */
.tail {
  transform-origin: 100% 100%;
  animation: flick 6s ease-in-out infinite;
}
.cat.awake .tail { animation-duration: 2.6s; }
.cat.pet .tail { animation-duration: 1.6s; }
@keyframes flick {
  0%, 100% { rotate: 0deg; }
  35% { rotate: -10deg; }
  70% { rotate: 7deg; }
}

/* purr: high-frequency micro-vibration */
.cat.pet .purr {
  animation: purr 0.07s linear infinite;
}
@keyframes purr {
  0%, 100% { translate: 0 0; }
  50% { translate: 0.5px -0.4px; }
}

/* zzz */
.zzz {
  opacity: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 8px;
  fill: var(--ink-soft);
}
.cat:not(.awake) .zzz {
  animation: zf 3s ease-in-out infinite;
}
.cat:not(.awake) .zzz:nth-of-type(2) {
  animation-delay: 1.1s;
}
@keyframes zf {
  0% { opacity: 0; translate: 0 0; }
  30% { opacity: 1; }
  100% { opacity: 0; translate: 0 -11px; }
}

/* purr label */
.say {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translate(-50%, 4px);
  white-space: nowrap;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.say.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- shooting star ---------- */
.shooting-star {
  position: absolute;
  top: 34px;
  left: 280px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--star);
  box-shadow: 0 0 8px 1px var(--star);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
/* the trailing tail streams out behind the head */
.shooting-star::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 64px;
  height: 1.5px;
  transform: translateY(-50%);
  background: linear-gradient(to right, var(--star), transparent);
  border-radius: 2px;
}
.shooting-star.shoot {
  animation: shoot 1.5s cubic-bezier(0.25, 0.6, 0.4, 1) forwards;
}
@keyframes shoot {
  0%   { opacity: 0; transform: translate(0, 0) rotate(-26deg); }
  12%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-300px, 150px) rotate(-26deg); }
}

/* ---------- thought bubble ---------- */
.dream {
  position: absolute;
  bottom: 96px;
  left: 50%;
  width: 330px;
  margin-left: -165px;
  pointer-events: none;
}

.cloud {
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 14px;
  transform-origin: 50% 118%;
  opacity: 0;
  transform: scale(0.82);
  filter: blur(6px);
  transition: opacity 0.38s var(--ease),
    transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1),
    filter 0.38s var(--ease);
}
.dream.on .cloud {
  opacity: 1;
  transform: scale(1);
  filter: none;
  transition-delay: 0.26s;
  animation: float 4s ease-in-out 0.8s infinite;
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

/* puffs rise from the cat's head, THEN the cloud opens */
.puffs {
  position: absolute;
  bottom: -30px;
  left: 50%;
}
.puff {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.3);
  transition: opacity 0.25s var(--ease), transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.puff.a { width: 7px;  height: 7px;  bottom: 0;   left: -2px; }
.puff.b { width: 11px; height: 11px; bottom: 9px; left: 2px; }
.puff.c { width: 15px; height: 15px; bottom: 20px; left: 8px; }
.dream.on .puff { opacity: 1; transform: scale(1); }
.dream.on .puff.a { transition-delay: 0.02s; }
.dream.on .puff.b { transition-delay: 0.10s; }
.dream.on .puff.c { transition-delay: 0.18s; }

.d-head {
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.d-box {
  background: var(--panel);
  border-radius: 8px;
  height: 140px;
  padding: 10px;
  overflow: hidden;
}
.demo { display: none; }
.demo.on { display: block; }

/* ---------- micro-demo placeholders (skeletons; swap for real UI later) ---------- */
.skl {
  background: var(--hair);
  border-radius: 4px;
  margin-bottom: 8px;
  animation: shimmer 1.8s ease-in-out infinite;
}
.skl-title { width: 55%; height: 10px; }
.skl-line { width: 100%; height: 7px; }
.skl-line.short { width: 70%; }
.skl-block { width: 100%; height: 56px; margin-top: 4px; }
.skl-row { width: 100%; height: 12px; }
.skl-row.short { width: 60%; }
.skl-bubble { height: 16px; border-radius: 8px; }
.skl-bubble.left { width: 65%; }
.skl-bubble.right { width: 55%; margin-left: auto; }
.skl-bubble.short { width: 45%; }
@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ============================================================
   Gone Fishing — play with the cat
   ============================================================ */

/* the den fills the column so the arena has room to play in */
.cat-den {
  width: 100%;
}

/* entry row thumb */
.thumb-fish {
  width: 26px;
  height: 15px;
  shape-rendering: crispEdges;
}

.thumb-mailbox {
  width: 18px;
  height: 22px;
  shape-rendering: crispEdges;
}
.list-item.playing {
  background-color: var(--thumb-projects);
}

/* ---------- cat game states ---------- */
/* heart eyes: replace the eyes for a beat after every fish */
.heart {
  opacity: 0;
  transform-origin: center;
  scale: 0.3;
  transition: opacity 0.15s var(--ease), scale 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.cat.love .heart {
  opacity: 1;
  scale: 1;
}
.cat.love .eye {
  opacity: 0;
}

/* star eyes — hovering "Postman Cat", the cat is keen to head out */
.star-eye {
  opacity: 0;
  shape-rendering: auto;
  transform-origin: center;
  transform-box: fill-box;
  scale: 0.3;
  transition: opacity 0.15s var(--ease), scale 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.cat.star .star-eye {
  opacity: 1;
  scale: 1;
  /* pops in first, then keeps twinkling */
  animation: star-twinkle 1.5s ease-in-out 0.3s infinite;
}

/* the small one runs out of phase, so the pair never pulses in lockstep */
.cat.star .star-eye-sm {
  animation-delay: 1.05s;
}

@keyframes star-twinkle {
  0%, 100% { scale: 1; }
  50% { scale: 0.7; }
}

.cat.star .eye {
  opacity: 0;
}

/* happy hop on a catch */
.cat.yum .purr {
  animation: hop 0.32s var(--ease);
}
@keyframes hop {
  0%, 100% { translate: 0 0; }
  40% { translate: 0 -9px; }
}

/* sick: ears flat, eyes shut tight, green dribble */
.vom {
  opacity: 0;
}
.cat.sick .vom {
  opacity: 1;
  animation: dribble 0.5s var(--ease);
}
@keyframes dribble {
  0% { opacity: 0; translate: 0 -3px; }
  100% { opacity: 1; translate: 0 0; }
}
.cat.sick .eye { transform: scaleY(0.1); }
.cat.sick .ear-l { transform: rotate(-16deg); }
.cat.sick .ear-r { transform: rotate(16deg); }
.cat.sick .purr {
  animation: shudder 0.09s linear 6;
}
@keyframes shudder {
  0%, 100% { translate: 0 0; }
  50% { translate: -1px 0; }
}

/* the cat leaves its rug behind while playing; the arena has a floor */
.cat.game .ledge {
  opacity: 0;
}
.cat.game {
  cursor: default;
}

/* ---------- arena ---------- */
.cat-den.arena::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 9px;
  height: 1.4px;
  background: var(--hair);
}

/* falling drops: a thin line reels each item down from the sky */
.drop {
  position: absolute;
  top: 0;
  width: 0;
  pointer-events: none;
  z-index: 1;
}
.drop::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.5px;
  width: 1px;
  background: var(--hair);
}
.drop svg {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  shape-rendering: crispEdges;
  transition: opacity 0.2s var(--ease), scale 0.25s var(--ease);
}
.drop.caught::before,
.drop.missed::before {
  opacity: 0;
  transition: opacity 0.18s var(--ease);
}
.drop.caught svg {
  opacity: 0;
  scale: 1.6;
}
.drop.missed svg {
  opacity: 0;
}

/* ============================================================
   Postman Cat — fullscreen 3D modal
   ============================================================ */
.pc-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}

.pc-modal.on {
  opacity: 1;
}

.pc-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: scale(1.035);
  transition: transform 0.5s var(--ease);
}

.pc-modal.on .pc-frame {
  transform: scale(1);
}

.pc-3d {
  display: block;
  width: 100%;
  height: 100%;
}

.pc-splash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.1rem;
  letter-spacing: 0.4em;
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  background: rgba(23, 23, 23, 0.28);
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}

.pc-splash.off {
  opacity: 0;
}

/* minimap — top-left, north-up */
.pc-map {
  position: absolute;
  top: 20px;
  left: 24px;
  width: 150px;
  height: 150px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

/* postcard collection — indicator row under the minimap */
.pc-cards {
  position: absolute;
  top: 182px;
  left: 24px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.pc-card-slot {
  position: relative;
  width: 36px;
  height: 26px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px dashed rgba(59, 54, 48, 0.35);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

/* collected: a filled postcard with a little red stamp */
.pc-card-slot.on {
  background: #fffdf6;
  border: 1.5px solid #d9a520;
  animation: pc-slot-pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.pc-card-slot.on::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 8px;
  border-radius: 1.5px;
  background: #c8402f;
}

.pc-card-slot.on::before {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 5px;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: rgba(59, 54, 48, 0.35);
  box-shadow: 0 4px 0 rgba(59, 54, 48, 0.22);
}

@keyframes pc-slot-pop {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.pc-quest {
  position: absolute;
  top: 20px;
  left: 190px;
  max-width: 300px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: #3b3630;
  z-index: 2;
}

.pc-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 8px 13px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  color: #3b3630;
  cursor: pointer;
}

.pc-close:hover {
  background: rgba(255, 255, 255, 1);
}

.pc-keys {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 9px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: #3b3630;
  z-index: 2;
}

.pc-hint {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translate(-50%, 6px);
  padding: 8px 13px;
  border-radius: 10px;
  background: #c8402f;
  color: #fff;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 2;
}

.pc-hint.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* the letter card */
.pc-letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 23, 23, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
  z-index: 4;
}

.pc-letter.on {
  opacity: 1;
  pointer-events: auto;
}

.pc-letter-card {
  width: min(400px, calc(100vw - 64px));
  background: #fffdf6;
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  transform: translateY(10px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.pc-letter.on .pc-letter-card {
  transform: translateY(0) scale(1);
}

.pc-letter-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: #a1907a;
  margin-bottom: 10px;
}

.pc-letter-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #171717;
  margin-bottom: 8px;
}

.pc-letter-body {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: -0.16px;
  color: #6b6155;
}

.pc-letter-close {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid #e5dcc9;
  background: #f5efe2;
  color: #3b3630;
  cursor: pointer;
}

.pc-letter-close:hover {
  opacity: 0.8;
}

/* ---------- HUD ---------- */
.game-hud {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  display: none;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  z-index: 3;
  pointer-events: none;
}
.cat-den.arena .game-hud {
  display: flex;
}
.game-hud b {
  font-weight: 600;
  color: var(--text-strong);
}
.g-hint {
  opacity: 0.6;
}

/* ---------- end-of-round card ---------- */
.game-over {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.game-over.on {
  opacity: 1;
  pointer-events: auto;
}
.go-card {
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: 16px;
  padding: 20px 24px;
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.game-over.on .go-card {
  transform: scale(1);
}
.go-title {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--text-strong);
  margin-bottom: 12px;
}
.go-title.gold {
  color: var(--flash);
}
.go-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.go-lines b {
  font-weight: 600;
  color: var(--text-strong);
}
.go-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.go-btn {
  font-family: inherit;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--hair);
  background: var(--panel);
  color: var(--text-strong);
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.go-btn:hover {
  opacity: 0.75;
}
.go-btn.ghost {
  background: transparent;
  color: var(--ink-soft);
}

/* ============================================================
   Case study — shared template (case-study.html and per-project pages)
   ============================================================ */

/* ---------- floating bar ----------
   Hidden at rest — the page opens with the plain homepage-style header.
   Once the hero title scrolls away it fades in, sitting on a glassy
   white-to-transparent gradient (solid at top, dissolving downward). */
.cs-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding-bottom: 18px; /* the fade tail below the content */
  background: linear-gradient(to bottom, var(--bg) 55%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(to bottom, black 55%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent);
  opacity: 0;
  translate: 0 -8px;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), translate 0.3s var(--ease);
}

.cs-bar.on {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}

/* same 768px row as the homepage header */
.cs-bar-inner {
  max-width: 832px;
  margin: 0 auto;
  padding: 24px 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* back tile + brand travel together, same spacing as the static header */
.cs-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* back — a rounded tile outlined in a hairline, no fill */
.cs-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--divider);
  border-radius: 9px;
  background: none;
  color: var(--toggle-color);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.cs-back:hover {
  border-color: var(--text-section);
  color: var(--text-name);
}

.cs-back-icon {
  display: block;
  transition: scale 0.28s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.cs-back:hover .cs-back-icon {
  scale: 1.12;
}

/* on the case-study page the header is a single row — brand and toggle
   sit on the same centerline (the homepage offsets are for the two-line
   name/role block) */
.cs-page .header-row {
  align-items: center;
}

.cs-page .header-left {
  padding-bottom: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.cs-page .header-right {
  padding-top: 0;
  padding-bottom: 0;
}

/* ---------- container header: back link + 2-bit mark + project ---------- */
.cs-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-brand-mark {
  width: 20px;
  height: 17.5px;
  shape-rendering: crispEdges;
}

.cs-brand-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: -0.16px;
  color: var(--text-name);
}

/* ---------- hero text — same 576px column as the body sections ---------- */
.cs-hero {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: -0.24px;
  color: var(--text-name);
}

.cs-subtitle {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.16px;
  color: var(--text-lead);
}

/* thesis line under the subtitle — quieter, sets up the story */
.cs-thesis {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.16px;
  color: var(--text-section);
}

/* hero tag line — quiet metadata under the subtitle */
/* ---------- meta under the hero ----------
   Columns size to their own content rather than splitting the width
   evenly, so a long contribution stays on one line instead of wrapping
   while the short fields sit in dead space. */
.cs-meta {
  margin: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 4px 32px;
  justify-content: start;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cs-meta-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: -0.1px;
  color: var(--text-section);
  white-space: nowrap;
}

.cs-meta-value {
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.16px;
  color: var(--text-item-title);
  white-space: nowrap;
}

/* ---------- page column ---------- */
.cs {
  /* one shared 780px measure — text, media and meta share the same edges */
  max-width: 844px;
  margin: 0 auto;
  padding: 48px 32px 72px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* ---------- media frame ----------
   Media runs wider than the 640 text measure, bleeding evenly on both
   sides so the column stays optically centered. */
.cs-media {
  margin: 0;
  width: 100%;
}

.cs-media > img,
.cs-media > video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--thumb-playground);
  border: 1px solid var(--thumb-playground);
  border-radius: 4px;
}

/* placeholder — replace with the real <video>/<img> per project */
.cs-media-ph {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--thumb-playground);
  border: 1px solid var(--thumb-playground);
  border-radius: 4px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  animation: shimmer 1.8s ease-in-out infinite;
}

/* ---------- text column — one shared measure with the hero ---------- */
/* ---------- a shot and its note ----------
   Three consecutive moves in Challenge 01, stacked. Each is one unit:
   the name and the reasoning first, then the video it argues for, all
   on the page's shared measure. */
.cs-shot {
  margin: 0;
  width: 100%;
}

.cs-shot .cs-shot-name {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.16px;
  color: var(--text-name);
}

.cs-shot .cs-shot-note {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.16px;
  color: var(--text-lead);
}

.cs-shot video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: var(--thumb-playground);
  border: 1px solid var(--thumb-playground);
}

.cs-text {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cs-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
}

.cs-header span:first-child {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.02em;
  color: var(--text-section);
  white-space: nowrap;
}

.cs-header-rule {
  flex: 1 1 0;
  min-width: 0;
  height: 1px;
  border-top: 1px dashed var(--divider);
}

.cs-p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.16px;
  color: var(--text-lead);
}

/* thesis sentences — same weight as the body, one shade darker,
   with a faint dashed rule underneath. Subtle on purpose. */
.cs-p strong {
  font-weight: 500;
  color: var(--thesis-ink);
  text-decoration: underline dashed var(--thesis-rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-skip-ink: none;
}

/* ---------- the four breakages ----------
   Four numbered columns, wider than the text measure so each one has
   room. The numeral fades from near-invisible to solid, which puts the
   emphasis on the finding rather than the counter. */
.cs-steps {
  /* content, not an exhibit — stays on the text measure */
  margin: 10px 0 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.cs-step {
  padding: 30px 26px 34px;
  border-left: 1px solid var(--divider);
}

.cs-step-num {
  display: block;
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 26px;
  background: linear-gradient(145deg, var(--num-from) 8%, var(--num-to) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cs-step-q {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: -0.14px;
  color: var(--text-name);
}

.cs-step-note {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: -0.12px;
  color: var(--text-lead);
}

/* two up, then one, as the columns get too narrow to read */
@media (max-width: 520px) {
  .cs-steps {
    grid-template-columns: 1fr;
  }

  .cs-step {
    padding: 24px 0 26px 20px;
  }

  .cs-step-num {
    font-size: 44px;
    margin-bottom: 20px;
  }
}

/* the turn that led to the decision — quieter than the lede it sets up */
.cs-kicker {
  margin: 0 0 -2px;
  font-size: 15px;
  font-weight: 500;
  font-style: italic;
  line-height: 24px;
  letter-spacing: -0.16px;
  color: var(--text-section);
}

.cs-lede {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: -0.24px;
  color: var(--text-strong);
}

/* big standalone impact statement */
.cs-callout {
  margin: 0;
  width: 100%;
  font-size: 17px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: -0.2px;
  color: var(--text-strong);
}

/* two-column mapping table (analyst behavior → product capability) */
.cs-table {
  display: flex;
  flex-direction: column;
}

.cs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--divider);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.16px;
}

.cs-row:first-child {
  border-top: 1px dashed var(--divider);
}

.cs-row span:first-child {
  color: var(--text-lead);
}

.cs-row span:last-child {
  color: var(--text-strong);
}

.cs-row.cs-row-head span {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-section);
}

.cs-link {
  color: var(--text-link);
  text-decoration: underline dotted;
  text-underline-position: from-font;
  text-decoration-skip-ink: none;
}

/* sub-labelled block (Context / Principles / Audience) */
.cs-sub {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-sub + .cs-sub {
  margin-top: 8px; /* 24px total between sub-blocks */
}

.cs-sub-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: -0.16px;
  color: var(--text-section);
}

.cs-list {
  margin: 0;
  padding-left: 21px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.16px;
  color: var(--text-lead);
}

.cs-rule {
  height: 1px;
  border-top: 1px dashed var(--divider);
}

.cs-caption {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: -0.16px;
  color: var(--text-section);
}

/* ============================================================
   Footer — shared by both pages
   ============================================================ */
.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 72px;
  border-top: 1px solid var(--divider);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.16px;
  color: var(--text-section);
}

/* on the homepage it lines up with the header row and the columns */
.page .site-footer {
  width: var(--content-width);
  max-width: 100%;
  margin: 0 auto;
}

@media (max-width: 520px) {
  .site-footer {
    flex-direction: column;
    gap: 6px;
  }
}

/* ============================================================
   Responsive fallback (design is desktop-first, 1410w)
   ============================================================ */

/* No hover on small screens → hide the cat, left column goes full width */
@media (max-width: 980px) {
  .header-row,
  .main-inner {
    width: 100%;
  }

  .right-col,
  .section-game {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-game {
    display: none;
  }
}

@media (max-width: 520px) {
  .item-desc,
  .item-title {
    white-space: normal;
  }
}

/* ---------- case study on narrower screens ----------
   The four meta columns need about 640px plus page padding. Below that
   they stop fitting, so each field becomes its own row: label left,
   value right, hairline between. Long values then have the whole width
   and never need to wrap awkwardly. */
@media (max-width: 768px) {
  .cs-meta {
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--divider);
  }

  .cs-meta-item {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid var(--divider);
  }

  .cs-meta-label {
    font-size: 13px;
    letter-spacing: -0.1px;
    text-transform: none;
  }

  .cs-meta-value {
    white-space: normal;
    text-align: right;
  }

  /* the 70px bleed would run off the screen once the page is this narrow */
  .cs-media {
    margin: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .right-col {
    display: none;
  }
  * {
    animation: none !important;
  }
}
