@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-var.woff2") format("woff2-variations"), url("assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-italic-var.woff2") format("woff2-variations"), url("assets/fonts/inter-italic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-scale: 1;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f2f2f2;
  --text: #111111;
  --muted: #555555;
  --faint: #999999;
  --border: #e5e5e5;
  --blue: #111111;
  --accent-red: #e63946;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --radius: 4px;
  --button-primary-bg: #111111;
  --button-primary-text: #ffffff;
  --button-secondary-bg: #ffffff;
  --button-secondary-text: #111111;
  --button-focus: rgba(0, 0, 0, 0.28);
}

/* Every font-size on the site is defined as calc(Npx * var(--font-scale)),
   so this single coefficient scales all type on mobile without a unit-by-unit pass. */
@media (max-width: 640px) {
  :root {
    --font-scale: 1.15;
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --surface: #1a1a1a;
  --surface-soft: #1a1a1a;
  --text: #eeeeee;
  --muted: #999999;
  --faint: #555555;
  --border: #222222;
  --blue: #1a1a1a;
  --accent-red: #ff6b6b;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --button-primary-bg: #eeeeee;
  --button-primary-text: #111111;
  --button-secondary-bg: #1a1a1a;
  --button-secondary-text: #eeeeee;
  --button-focus: rgba(255, 255, 255, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.00563rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body,
.site-header {
  transition: color 200ms ease, background 200ms ease, border-color 200ms ease;
}

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

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

main {
  overflow: hidden;
}

[id] {
  scroll-margin-top: 104px;
}

.page[hidden] {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 18px clamp(16px, 3vw, 56px);
  background: transparent;
  transition: background 250ms ease;
}
.site-header::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 100%);
  transition: background 250ms ease;
  z-index: 10;
}
.site-header.is-scrolled::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}
[data-theme="dark"] .site-header.is-scrolled::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
}

.cv-button {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 16px;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  font: inherit;
  font-size: calc(11px * var(--font-scale));
  font-weight: 500;
  transition: background 150ms ease, color 150ms ease;
  position: relative;
  z-index: 21;
  margin-right: 8px;
  white-space: nowrap;
}

.cv-button:hover {
  background: var(--border);
  color: var(--text);
}

.cv-button__label {
  letter-spacing: 0.5px;
}

.cv-button__icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  flex-shrink: 0;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.theme-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  font: inherit;
  transition: background 150ms ease, color 150ms ease;
  position: relative;
  z-index: 21;
}

.theme-toggle__icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.theme-toggle__icon--sun {
  display: none;
}

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

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

.theme-toggle:hover {
  background: var(--border);
  color: var(--text);
}

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

.theme-toggle:focus-visible {
  outline: 2px solid var(--button-focus);
  outline-offset: 4px;
}

.label {
  margin: 0 0 18px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.case-thesis {
  margin-top: 20px;
  padding: 16px 20px;
  border-left: 2px solid var(--muted);
  color: var(--text);
  font-size: calc(14px * var(--font-scale));
  line-height: 1.65;
  max-width: 600px;
  opacity: 0.75;
}

.site-footer {
  min-height: 40px;
  padding: 0 0 40px;
}

.content-case {
  color: var(--text);
  background: var(--bg);
}

.content-case h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: calc(16px * var(--font-scale));
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.00563rem;
}

.content-case p {
  color: var(--muted);
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
}

/* ─────────────────────────────────────────────
   HOME ARTICLE — Hamza-style layout
───────────────────────────────────────────── */
.home-article {
  width: 100% !important;
  max-width: 540px !important;
  margin: 0 auto !important;
  padding: 40px 16px 120px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.home-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  margin-bottom: -32px;
}

.home-avatar {
  width: 92px;
  height: 92px;
  border-radius: 10px;
  background-color: var(--muted);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.home-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
/* During the game the photo shows a health bar 4px below it,
   so it must not be clipped by overflow. */
.home-avatar.game-target {
  overflow: visible;
}
.home-name {
  font-family: "Inter", system-ui, sans-serif;
  font-size: calc(20px * var(--font-scale));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.home-role {
  font-size: calc(14px * var(--font-scale));
  color: var(--faint);
  line-height: 1.6;
  letter-spacing: -0.00563rem;
  margin: 4px 0 0;
}
.home-role span { color: var(--faint); margin: 0 2px; }

.home-bio {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-bio p {
  font-size: calc(14px * var(--font-scale));
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.00563rem;
  margin: 0;
}

.home-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.home-section-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.00563rem;
  line-height: 1;
  margin: 0;
}

/* Project list */
.proj-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  row-gap: 16px;
}
.proj-item {
  display: flex;
  flex-direction: row;
  column-gap: 32px;
  position: relative;
}

.proj-item:has(.proj-link) {
  cursor: pointer;
}

.proj-item:has(.proj-link):hover {
  opacity: 0.8;
}

.proj-item:has(.proj-link):hover .proj-link::after {
  transform: scaleX(1);
}

.proj-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.proj-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: calc(14px * var(--font-scale));
  color: var(--text);
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}
.proj-link {
  color: var(--text);
  text-decoration: none;
  position: relative;
}
.proj-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--muted);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 240ms ease;
}
.proj-arrow { color: var(--faint); font-size: calc(11px * var(--font-scale)); }
.proj-title-text { color: var(--text); }
.proj-status {
  font-size: calc(14px * var(--font-scale));
  color: var(--faint);
  font-weight: 400;
}
.proj-desc {
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  line-height: 1.5;
  letter-spacing: -0.00563rem;
  margin: 0;
}

/* ========== CASE PAGE STYLES ========== */
main.content-case { overflow: visible; }
body { position: relative; }

.case-aside {
  position: fixed;
  top: 80px;
  left: 40px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.case-aside-back {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: calc(14px * var(--font-scale));
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.00563rem;
  color: var(--faint);
  text-decoration: none;
  padding: 0;
  transition: color 0.14s ease;
}
.case-aside-back:hover { color: var(--text); }
.case-aside-nav { margin-top: 0; }
.case-aside-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.case-aside-nav li {
  list-style: none;
  padding: 0;
  margin: 0;
}
.case-aside-nav li::before {
  content: none !important;
}
.case-aside-nav li a {
  display: block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
  font-weight: 400;
  color: var(--faint);
  text-decoration: none;
  padding: 0;
  transition: color 0.1s ease;
  letter-spacing: -0.00563rem;
}
.case-aside-nav li a:hover { color: var(--text); }
.case-aside-nav li a.active {
  color: var(--text);
  font-weight: 400;
}

.case-mobile-back {
  display: none;
  align-items: baseline;
  gap: 6px;
  font-size: calc(14px * var(--font-scale));
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.00563rem;
  color: var(--faint);
  text-decoration: none;
  padding: 4px 16px 32px;
  max-width: 540px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .case-aside { display: none; }
  .case-mobile-back { display: flex; }
}

.content-case {
  max-width: 540px;
  margin: 0 auto;
  padding: 12px 16px 0;
}
@media (max-width: 900px) {
  .content-case { padding: 12px 20px 0; }
}

/* Typography for case pages */
.content-case h2 {
  font-size: calc(16px * var(--font-scale));
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: -0.00563rem;
  line-height: 1;
  color: var(--text);
  margin: 0 0 24px;
}

.content-case h1 {
  font-size: calc(16px * var(--font-scale));
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.00563rem;
  color: var(--text);
  margin: 12px 0 16px;
}
.content-case section#story > h1 {
  font-size: calc(20px * var(--font-scale));
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.content-case > p,
.content-case section > p {
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 24px;
}

/* Section spacing */
.content-case section {
  margin: 80px 0;
  padding: 0;
}
.content-case section:first-child,
.content-case section.case-hero {
  width: auto;
  margin-top: 0;
}

/* Hero section - IMPORTANT: label MUST be aligned with back-link "Index" */
/* Back-link is fixed at top: 80px, content-case padding-top: 80px keeps them aligned */
.case-hero {
  margin: 0 0 80px;
}
.case-hero .label {
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--faint);
  letter-spacing: -0.00563rem;
  line-height: 1.6;
  text-transform: none;
  margin: 0 0 12px;
}
.case-hero h1 {
  font-size: calc(20px * var(--font-scale));
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--text);
}
.case-hero > p {
  font-size: calc(14px * var(--font-scale));
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  letter-spacing: -0.00563rem;
  color: var(--muted);
  margin: 0 0 20px;
}
.case-hero .meta {
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  row-gap: 4px;
  padding: 0;
}
.case-hero .meta-item {
  display: flex;
  flex-direction: row;
  column-gap: 32px;
  align-items: baseline;
}
.case-hero .meta-label {
  font-size: calc(14px * var(--font-scale));
  letter-spacing: -0.00563rem;
  color: var(--faint);
  font-weight: 400;
  text-transform: none;
  width: 80px;
  flex-shrink: 0;
  line-height: 1.5;
}
.case-hero .meta-value {
  font-size: calc(14px * var(--font-scale));
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}
.case-hero .metrics {
  margin-top: 32px;
}

/* Moment styling */
.moment {
  margin: 0 0 80px;
  padding: 0;
  border: none;
}
.moment + .moment {
  border-top: 1px solid var(--border);
  padding-top: 80px;
}
.moment > h2 {
  margin: 0 0 20px;
}
.moment-video-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0 16px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

.moment video {
  width: auto;
  height: 100%;
  display: block;
  object-fit: contain;
}
.moment blockquote {
  font-size: calc(14px * var(--font-scale));
  font-style: normal;
  color: var(--muted);
  margin: 0 0 24px;
  padding: 0 0 0 16px;
  border-left: 1px solid var(--border);
  line-height: 1.6;
}

/* Moment facts grid */
.moment h3 {
  font-size: calc(16px * var(--font-scale));
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.00563rem;
  margin: 0 0 16px;
}

.moment-facts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 24px;
  padding: 0;
}
.moment-facts > div {
  display: block;
}
.moment-fact-label,
.result-label {
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.00563rem;
  text-transform: none;
  margin: 0 0 6px;
  font-family: "Inter", system-ui, sans-serif;
}
.moment-fact-text {
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Moment paragraphs and links */
.moment p {
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 24px;
}

/* Metrics grid */
.content-case .metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0 32px !important;
}
.content-case .metric {
  text-align: left;
  padding: 20px 16px;
  border: none;
  border-radius: 4px;
  background: var(--surface-soft);
}
.content-case .metrics .metric:only-child {
  grid-column: 1 / -1;
}
.content-case .metric-value {
  font-size: calc(20px * var(--font-scale));
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 6px;
}
.content-case .metric-label {
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  line-height: 1.5;
}

/* Bullet list style for case pages */
.content-case ul, .moment ul {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.content-case ul li, .moment ul li {
  font-size: calc(14px * var(--font-scale));
  line-height: 1.6;
  color: var(--muted);
  padding-left: 12px;
  position: relative;
}
.content-case ul li::before, .moment ul li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--faint);
  line-height: 1.6;
}
.content-case ul li:only-child::before, .moment ul li:only-child::before {
  content: '';
}
.content-case ul li:only-child, .moment ul li:only-child {
  padding-left: 0;
}
.moment a {
  color: var(--text);
  text-decoration: none;
}
.moment a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .content-case .metrics {
    grid-template-columns: 1fr;
  }
}

/* Experience + Practice lists — shared layout */
.exp-list,
.practice-list {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  margin: 16px 0 0;
}
.exp-item,
.practice-item {
  display: flex;
  flex-direction: row;
  column-gap: 32px;
  align-items: flex-start;
}

/* Shared time/label column — 100px faint fixed column */
.exp-time,
.practice-time,
.proj-year,
.contact-label {
  font-size: calc(14px * var(--font-scale));
  color: var(--faint);
  flex-shrink: 0;
  white-space: nowrap;
  width: 100px;
  line-height: 1.5;
  font-weight: 400;
}
.contact-label { pointer-events: none; }

.exp-role {
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}
.exp-role a {
  color: inherit;
  text-decoration: none;
  position: relative;
}
.exp-role a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--muted);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 240ms ease;
}
.exp-role a:hover { color: var(--muted); }
.exp-role a:hover::after { transform: scaleX(1); }
.exp-meta {
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  margin: 2px 0 0;
  line-height: 1.5;
  letter-spacing: -0.00563rem;
}
.practice-label {
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}
.practice-meta {
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  margin: 2px 0 0;
  line-height: 1.5;
}

/* Contact list */
.contact-list {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.contact-item {
  display: flex;
  flex-direction: row;
  column-gap: 32px;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
}
.contact-value {
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  text-decoration: none;
  line-height: 1.5;
  margin: 0;
  cursor: pointer;
  position: relative;
}
.contact-value::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 240ms ease;
}
.contact-item:hover .contact-value { color: var(--text); }
.contact-item:hover .contact-value::after { transform: scaleX(1); }

/* Skip link — visible only on keyboard focus */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 4px;
  background: var(--text);
  color: var(--bg);
  font-size: calc(13px * var(--font-scale));
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* ─────────────────────────────────────────────
   LIGHTBOX
───────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
  overflow: hidden;
}

.lightbox-bg {
  display: none;
}

.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  z-index: 1;
  width: min(80vh, 80vw);
  height: min(80vh, 80vw);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.96);
  transition: transform 240ms ease;
  background: var(--surface-soft);
  border-radius: 6px;
}

.lightbox-overlay.is-open .lightbox-inner {
  transform: scale(1);
}

.lightbox-inner img,
.lightbox-inner video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* Lightbox UI — follows theme */
.lightbox-close {
  position: fixed;
  top: 18px;
  right: clamp(16px, 3vw, 56px);
  z-index: 1002;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  padding: 0;
}
.lightbox-close:hover {
  background: var(--border);
  color: var(--text);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1002;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, opacity 150ms ease;
  padding: 0;
  opacity: 0.7;
}
.lightbox-prev { left: clamp(16px, 3vw, 56px); }
.lightbox-next { right: clamp(16px, 3vw, 56px); }
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--border);
  color: var(--text);
  opacity: 1;
}

.lightbox-dots {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  display: flex;
  gap: 6px;
  align-items: center;
}
.lightbox-dot {
  width: 5px;
  height: 5px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}
.lightbox-dot.is-active {
  background: var(--text);
  transform: scale(1.3);
}

/* Make gallery figures clickable */
.cs-photo-grid figure,
.cs-media-block {
  cursor: zoom-in;
}

/* ── Image placeholders ───────────────────────────────────────────── */
.cs-placeholder {
  width: 100%;
  height: 280px;
  background: var(--surface-soft);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
  color: var(--faint);
  font-size: calc(11px * var(--font-scale));
  text-align: center;
  padding: 24px;
  box-sizing: border-box;
  border: 1px dashed var(--border);
}
.cs-placeholder::before {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23aaa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ========== CONTENT SHOOTS — photo blocks ========== */
.cs-media-block,
figure.cs-media-block {
  margin: 24px 0;
  border-radius: 6px;
  overflow: hidden;
}
.cs-media-block img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: zoom-in;
}
.case-hero .cs-media-block {
  margin: 24px 0;
}
.case-hero .cs-media-block img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.case-hero + .cs-media-block img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
@media (min-width: 1000px) {
  .case-hero + .cs-media-block {
    width: calc(100% + 80px);
    margin-left: -40px;
    margin-right: -40px;
  }
}

/* Unified photo gallery wrapper — equal row/col gap, no child margins */
.cs-photo-gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0;
}
.cs-photo-gallery .cs-photo-grid,
.cs-photo-gallery .cs-media-block,
.cs-photo-gallery figure.cs-media-block,
.cs-photo-gallery .cs-video-block {
  margin: 0;
}

.cs-photo-grid {
  display: grid;
  gap: 8px;
  margin: 24px 0;
  grid-template-columns: repeat(2, 1fr);
}
.cs-photo-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cs-photo-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cs-photo-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
}
.cs-photo-grid figure img,
.cs-photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  cursor: zoom-in;
}
.cs-photo-grid--3 figure img,
.cs-photo-grid--3 img {
  aspect-ratio: 9 / 16;
}

/* Design Leadership whiteboard photos are square (1200x1200) — keep 1:1 instead of the 3:4 editorial crop */
#craft .cs-photo-grid--2 figure img,
#craft .cs-photo-grid--2 img {
  aspect-ratio: 1 / 1;
}

/* PSG app screenshots are 528x1040 (framed device mockups) — match their real ratio so object-fit: cover never crops them */
#app .cs-photo-grid--2 figure img,
#app .cs-photo-grid--2 img {
  aspect-ratio: 33 / 65;
}

/* Full-width square field-research video */
.cs-video-block {
  margin: 24px 0;
  border-radius: 6px;
  overflow: hidden;
}
.cs-video-block video {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Churn breakdown chart — data-driven bar chart, themeable */
.churn-chart {
  margin: 24px 0;
  padding: 22px 24px 20px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.churn-chart figcaption {
  font-size: calc(11px * var(--font-scale));
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--faint);
  margin-bottom: 18px;
}
.churn-row {
  display: grid;
  grid-template-columns: 1fr 46px;
  align-items: center;
  column-gap: 12px;
  margin-bottom: 14px;
}
.churn-row:last-child { margin-bottom: 0; }
.churn-label {
  grid-column: 1 / -1;
  font-size: calc(14px * var(--font-scale));
  color: var(--text);
  margin-bottom: 6px;
}
.churn-track {
  height: 10px;
  border-radius: 5px;
  background: var(--border);
  overflow: hidden;
}
.churn-bar {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--accent-red);
}
.churn-bar--muted { background: var(--faint); }
.churn-val {
  font-size: calc(14px * var(--font-scale));
  font-weight: 600;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Zing Lab field-research photos are 3:4 portrait — keep their real ratio instead of the 9:16 editorial crop */
#zing-lab .cs-photo-grid--3 figure img,
#zing-lab .cs-photo-grid--3 img {
  aspect-ratio: 3 / 4;
}

/* 3-video gallery — varied heights, bottom-aligned */
.cs-video-gallery {
  display: flex;
  gap: 6px;
  margin: 24px 0;
  align-items: flex-end;
}
.cs-video-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  flex: 1;
}
.cs-video-gallery figure { height: 320px; }
.cs-video-gallery video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 16:9 video block — stays within content-case column */
.cs-video-block--16x9 {
  margin: 24px 0;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.cs-video-block--16x9 video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ================================================
   UXR Research Case — component styles
   ================================================ */

/* System section — structured list */
.system-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 24px 0 0;
}
.system-item h3 {
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.00563rem;
  margin: 0 0 6px;
}
.system-item p {
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Lab meta — key/value pairs */
.lab-meta {
  display: grid;
  grid-template-columns: 120px 1fr;
  row-gap: 8px;
  column-gap: 32px;
  margin: 20px 0;
  align-items: baseline;
}
.lab-meta-label {
  font-size: calc(14px * var(--font-scale));
  color: var(--faint);
  line-height: 1.5;
}
.lab-meta-value {
  font-size: calc(14px * var(--font-scale));
  color: var(--text);
  line-height: 1.5;
}

/* Field findings — in-gym research items */
.field-findings {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 24px 0 0;
}
.field-finding {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.field-finding-area {
  font-size: calc(14px * var(--font-scale));
  color: var(--faint);
  letter-spacing: -0.00563rem;
  line-height: 1.4;
  margin: 0 0 6px;
}
.field-finding h3 {
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.00563rem;
  margin: 0 0 8px;
}
.field-finding p {
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Finding articles — key findings with facts + blockquotes */
.finding-article {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.finding-article:first-child {
  border-top: none;
  padding-top: 0;
}
.finding-article h2,
.finding-article h3 {
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.00563rem;
  margin: 0 0 16px;
}
.finding-facts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 24px;
}
.finding-facts > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fact-label {
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.00563rem;
}
.fact-text {
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  line-height: 1.6;
}
.finding-article blockquote {
  border-left: 2px solid var(--border);
  padding: 0 0 0 16px;
  margin: 0 0 16px;
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
}
.finding-article ul {
  margin: 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}
.finding-article ul li {
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}
.finding-article ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--faint);
}
.finding-article .result-label {
  display: block;
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.00563rem;
  margin: 0 0 6px;
}

/* Impact items */
.impact-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 20px 0 0;
}
.impact-area {
  font-size: calc(14px * var(--font-scale));
  color: var(--faint);
  letter-spacing: -0.00563rem;
  line-height: 1.4;
  margin: 0 0 4px;
}
.impact-item h3 {
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.00563rem;
  margin: 0 0 8px;
}
.impact-item p {
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* ── Testimonial / peer quote ───────────────────────── */
.case-quote {
  margin: 28px 0;
  padding: 24px 28px;
  background: var(--surface-soft);
  border-radius: 8px;
}
.case-quote blockquote {
  margin: 0;
  font-size: calc(16px * var(--font-scale));
  line-height: 1.6;
  color: var(--text);
  font-style: normal;
}
.case-quote figcaption {
  margin-top: 14px;
  font-size: calc(14px * var(--font-scale));
  color: var(--muted);
  line-height: 1.5;
}
.case-quote figcaption strong {
  color: var(--text);
  font-weight: 500;
}

/* ── Retention chart ────────────────────────────────── */
.retention-chart { margin: 24px 0; width: 100%; background: var(--surface-soft); border-radius: 8px; padding: 28px clamp(8px, 2vw, 24px); }
.retention-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.rc-grid line { stroke: var(--border); stroke-width: 1; }
.rc-area-zing { fill: var(--accent-red); opacity: 0.05; }
.rc-area-industry { fill: var(--muted); opacity: 0.06; }
.rc-line-zing { fill: none; stroke: var(--accent-red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rc-line-industry { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; stroke-linecap: round; }
.rc-dot { fill: var(--bg); stroke: var(--text); stroke-width: 2; }
.rc-label-axis { font-size: calc(11px * var(--font-scale)); fill: var(--faint); font-family: inherit; }
.rc-annotation-line { stroke: var(--muted); stroke-width: 1; }
.rc-dashed-line { stroke: var(--accent-red); stroke-width: 2; opacity: 0.5; stroke-dasharray: 3 3; }
.rc-annotation-text { font-size: calc(11px * var(--font-scale)); fill: var(--text); font-family: inherit; font-weight: 500; }
.rc-annotation-sub { font-size: calc(10px * var(--font-scale)); fill: var(--faint); font-family: inherit; }
.rc-end-label { font-size: calc(11px * var(--font-scale)); font-family: inherit; font-weight: 500; fill: var(--text); }
.rc-end-label-industry { font-size: calc(11px * var(--font-scale)); font-family: inherit; fill: var(--muted); }
.retention-chart-legend { display: flex; gap: 24px; margin-top: 14px; font-size: calc(12px * var(--font-scale)); color: var(--faint); align-items: center; }
.retention-legend-zing::before { content: ''; display: inline-block; width: 16px; height: 2px; background: var(--accent-red); border-radius: 1px; vertical-align: middle; margin-right: 6px; }
.retention-legend-industry::before { content: ''; display: inline-block; width: 16px; height: 0; border-top: 1.5px dashed var(--muted); vertical-align: middle; margin-right: 6px; }
.retention-chart-note { margin-top: 10px; font-size: calc(11px * var(--font-scale)); color: var(--faint); opacity: 0.75; }

/* Chart entrance animation — lines wipe in left-to-right, labels fade up */
@media (prefers-reduced-motion: no-preference) {
  .rc-reveal-rect {
    transform: scaleX(0);
    transform-origin: 52px 0;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
  }
  .rc-anno,
  .rc-ends {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .rc-anno { transition-delay: 1.15s; }
  .rc-ends { transition-delay: 1.5s; }

  .retention-chart.rc-visible .rc-reveal-rect { transform: scaleX(1); }
  .retention-chart.rc-visible .rc-anno,
  .retention-chart.rc-visible .rc-ends { opacity: 1; transform: translateY(0); }
}

/* ── Case diagram caption (shared by the process-flow diagrams) ── */
.case-diagram-note { margin: 12px 0 0; font-size: calc(11px * var(--font-scale)); color: var(--faint); line-height: 1.6; }

/* ── Process flow diagram ───────────────────────────── */
.process-flow { margin: 32px 0 8px; width: 100%; background: var(--surface-soft); border-radius: 8px; padding: 28px clamp(8px, 2vw, 24px); }
.process-flow svg { width: 100%; height: auto; display: block; overflow: visible; }
.pf-track { stroke: var(--faint); stroke-width: 1.5; }
.pf-node circle { fill: var(--bg); stroke: var(--faint); stroke-width: 1.5; }
.pf-title { font-size: calc(11px * var(--font-scale)); font-family: inherit; font-weight: 500; fill: var(--text); }
.pf-sub { font-size: calc(11px * var(--font-scale)); font-family: inherit; fill: var(--faint); }
.pf-loop-arc { fill: none; stroke: var(--faint); stroke-width: 1.5; }
.pf-loop-label { font-size: calc(11px * var(--font-scale)); font-family: inherit; fill: var(--faint); }
.pf-signal { opacity: 0; }
.pf-comet-seg { fill: none; stroke: var(--accent-red); stroke-width: 1.6; stroke-dasharray: 3 97; stroke-linecap: butt; }
.pf-node-flash { fill: var(--bg); stroke: var(--accent-red); stroke-width: 1.5; opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .pf-reveal-rect {
    transform: scaleX(0);
    transform-origin: 60px 0;
    transition: transform 1.3s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
  }
  .pf-node {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .pf-loop {
    opacity: 0;
    transition: opacity 0.6s ease;
    transition-delay: 1.6s;
  }
  .process-flow.pf-visible .pf-reveal-rect { transform: scaleX(1); }
  .process-flow.pf-visible .pf-node { opacity: 1; transform: translateY(0); }
  .process-flow.pf-visible .pf-loop { opacity: 1; }
  .process-flow.pf-visible .pf-signal { opacity: 1; transition: opacity 0.5s ease 1.5s; }
}

/* ── Project preview on hover ──────────────────────── */
.proj-preview {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  max-width: min(40vw, 280px);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: opacity, transform;
}

.proj-preview.is-visible {
  opacity: 1;
  transform: scale(1);
}

.proj-preview__img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- Page-shooter easter egg ---------- */
.game-controls {
  position: fixed;
  right: 56px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 768px) {
  .game-controls {
    display: none;
  }
}
.game-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 16px;
  color: var(--muted);
  background: var(--surface-soft);
  font: inherit;
  font-size: calc(11px * var(--font-scale));
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.game-start:hover {
  background: var(--border);
  color: var(--text);
}
.game-start:active {
  opacity: 0.7;
}
.game-start svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.6;
  flex-shrink: 0;
}
.game-start__label {
  font-size: calc(11px * var(--font-scale));
  white-space: nowrap;
}
.game-start.is-active .game-start__label span {
  display: none;
}
.game-start.is-active .game-start__label::after {
  content: "Exit";
}
.game-start.is-active {
  color: var(--text);
  background: var(--surface-soft);
}
.game-start.is-active:hover {
  background: var(--border);
}

.game-layer {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}
.game-score {
  font-size: calc(14px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.game-score--win {
  color: var(--accent-red);
}
.game-player {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text);
}
.game-player svg {
  display: block;
  width: 28px;
  height: 24px;
  fill: currentColor;
  shape-rendering: crispEdges;
  image-rendering: pixelated;
}
.game-legend {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: calc(11px * var(--font-scale));
  color: var(--faint);
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  z-index: 56;
}
.game-countdown {
  position: fixed;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: calc(72px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  z-index: 58;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.game-countdown--pop {
  animation: game-countdown-pop 0.5s ease-out;
}
@keyframes game-countdown-pop {
  0%   { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
  40%  { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}
.game-bullet {
  position: fixed;
  width: 4px;
  height: 16px;
  margin-left: -2px;
  border-radius: 2px;
  background-color: #ff5e5e;
  border-bottom: 4px solid #ffe100;
}

/* Targets = real page elements (no frames; they just get destroyed) */
.game-target {
  transition: opacity 0.3s ease-out;
}
.game-target--flash {
  animation: game-hit 0.3s ease-in-out;
}
@keyframes game-hit {
  0%   { transform: scale(1);   opacity: 1;   filter: invert(0); }
  50%  { transform: scale(1.1); opacity: 0.5; filter: invert(1); }
  100% { transform: scale(1);   opacity: 1;   filter: invert(0); }
}
.game-target--bar {
  position: relative;
}
.game-target--bar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: var(--bar-width, 100%);
  height: 2px;
  border-radius: 1px;
  transform-origin: left;
  transform: scaleX(var(--game-health, 1));
  background: var(--game-health-color, #4caf50);
  transition: transform 0.15s ease, background 0.15s ease;
}
/* Destruction bar for headings is defined above */
.game-target--hit {
  pointer-events: none;
  transform-origin: left center;
  animation: game-vanish 0.3s ease-in-out forwards;
}
@keyframes game-vanish {
  0%   { transform: scale(1);   opacity: 1;   filter: invert(0); }
  50%  { transform: scale(1.1); opacity: 0.5; filter: invert(1); }
  100% { transform: scale(1);   opacity: 0;   filter: invert(0); }
}
.game-burst {
  position: fixed;
  width: 0;
  height: 0;
  transform: rotate(45deg);
  z-index: 1002;
}
.game-burst__px {
  position: absolute;
  left: -3px;
  top: -3px;
  width: 6px;
  height: 6px;
  background: var(--accent-red);
  image-rendering: pixelated;
  animation: game-burst-fly 0.45s ease-out forwards;
}
@keyframes game-burst-fly {
  from { transform: translate(0, 0); opacity: 1; }
  to   { transform: translate(calc(var(--dx) * 22px), calc(var(--dy) * 22px)); opacity: 0; }
}
.game-confetti {
  position: fixed;
  top: -12px;
  width: 8px;
  height: 8px;
  image-rendering: pixelated;
  z-index: 1020;
  animation-name: game-confetti-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}
@keyframes game-confetti-fall {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate(var(--drift, 0), 100vh) rotate(540deg); opacity: 0.9; }
}
body.game-on {
  user-select: none;
  scrollbar-width: none;
}
body.game-on::-webkit-scrollbar {
  display: none;
}
body.game-on main {
  padding-bottom: 45vh;
}
body.game-on .proj-preview {
  display: none !important;
}
.game-result {
  position: fixed;
  inset: 0;
  z-index: 1010;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  pointer-events: none;
}
.game-result__title {
  font-size: calc(48px * var(--font-scale));
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
}
.game-result__sub {
  font-size: calc(20px * var(--font-scale));
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
}
.game-burst--ship .game-burst__px {
  width: 7px;
  height: 7px;
  animation: game-ship-fly 0.55s ease-out forwards;
}
@keyframes game-ship-fly {
  from { transform: translate(0, 0); opacity: 1; }
  to   { transform: translate(calc(var(--dx) * 38px), calc(var(--dy) * 38px)); opacity: 0; }
}

/* Mobile: project items with preview and restructured layout */
@media (max-width: 640px) {
  .proj-list {
    row-gap: 48px;
  }

  /* Floating hover preview isn't needed — images are embedded inline */
  .proj-preview {
    display: none;
  }

  .proj-item {
    flex-direction: column;
    column-gap: 0;
    row-gap: 4px;
  }

  /* Embedded preview image on mobile - at top */
  .proj-item .proj-preview-img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 4px;
    order: -3;
    margin-bottom: 12px;
  }

  .proj-item .proj-year {
    order: -2;
    font-size: calc(12px * var(--font-scale));
    color: var(--muted);
  }

  .proj-item .proj-body {
    order: -1;
  }
}
