/* ===================================================================
   Denise Ngo — Portfolio Design System  ·  "Dango Dark" (from mockup 17)
   Reusable across all pages. Tokens → components.
   =================================================================== */

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

:root {
  /* Warm dark backgrounds */
  --bg-deep:     #17150F;
  --bg-base:     #1D1B1A;
  --bg-surface:  #252321;
  --bg-card:     #2C2A27;
  --bg-card-hi:  #333029;
  --bg-border:   #3A3730;

  /* Text */
  --text-primary:  #ECE7DD;
  --text-secondary:#B8B0A3;
  --text-muted:    #7A7368;
  --text-faint:    #4A4540;

  /* Dango accents — warm glow edition */
  --matcha:      #A8C3A0;
  --matcha-deep: #6B8E5A;
  --matcha-glow: rgba(168,195,160,0.15);
  --matcha-glow2:rgba(168,195,160,0.08);
  --sakura:      #FF9EC4;
  --sakura-soft: #F3A5C0;
  --sakura-glow: rgba(255,158,196,0.12);
  --butter:      #FFD66B;
  --butter-glow: rgba(255,214,107,0.10);

  /* Optional Y2K extenders */
  --lilac:  #C9B8FF;
  --sky:    #8FD3FF;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 40px;
  --sp-2xl: 64px;
  --sp-3xl: 96px;

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
}

html { scroll-behavior: smooth; scroll-padding-top: 57px; }

body {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  /* Dot grid background */
  background-image: radial-gradient(circle, rgba(168,195,160,0.12) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--matcha-deep); }

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--matcha);
  outline-offset: 3px;
}

/* ── Skip link (a11y) ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--matcha);
  color: var(--bg-deep);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(23,21,15,0.88);
  border-bottom: 1px solid var(--bg-border);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--sp-xl);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  text-decoration: none;
}
/* Pixel dango sprite in nav */
.dango-sprite {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dango-sprite .stick {
  width: 2px;
  height: 10px;
  background: #8B5E3C;
  border-radius: 1px;
}
.dango-sprite .balls {
  display: flex;
  flex-direction: column;
  gap: 1.5px;
}
.dango-sprite .ball {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.dango-sprite .ball-1 { background: var(--sakura); box-shadow: 0 0 4px var(--sakura); }
.dango-sprite .ball-2 { background: #ECE7DD; }
.dango-sprite .ball-3 { background: var(--matcha); box-shadow: 0 0 4px var(--matcha); }

.nav-logo-text {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.nav-logo-text span {
  color: var(--matcha);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  list-style: none;
}
.nav-links a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--matcha); }
.nav-links a.active { color: var(--matcha); }
.nav-cta {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--bg-deep) !important;
  background: var(--matcha);
  padding: 6px 14px;
  border-radius: var(--r-sm);
  transition: background 0.2s, box-shadow 0.2s !important;
}
.nav-cta:hover {
  color: var(--bg-deep) !important;
  background: #BDD6B5 !important;
  box-shadow: 0 0 12px var(--matcha-glow) !important;
}
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--bg-border);
  color: var(--text-secondary);
  padding: 6px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-base);
  border-bottom: 1px solid var(--bg-border);
  padding: var(--sp-md) var(--sp-xl);
  gap: var(--sp-md);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
}
.mobile-menu a:hover { color: var(--matcha); }

/* ── Hero ── */
.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--sp-3xl) var(--sp-xl) 0;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--sp-2xl);
  align-items: start;
}

.hero-prompt-line {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.hero-prompt-line .prompt-prefix {
  color: var(--matcha);
  font-weight: 600;
}
.hero-prompt-line .cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--matcha);
  border-radius: 1px;
  animation: blink 1.1s step-end infinite;
  box-shadow: 0 0 6px var(--matcha);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-name {
  font-family: 'Fraunces', serif;
  font-size: clamp(52px, 7vw, 80px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--sp-md);
}
.hero-name .accent { color: var(--matcha); font-style: normal; }

.hero-role {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sakura);
  margin-bottom: var(--sp-md);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.hero-role::before {
  content: '▸';
  color: var(--sakura);
  font-size: 10px;
}

.hero-tagline {
  font-family: 'Fraunces', serif;
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--sp-lg);
  max-width: 560px;
}

.hero-location {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-xl);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-location .dot { color: var(--matcha); }

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--matcha);
  border: none;
  padding: 10px 22px;
  border-radius: var(--r-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-primary:hover {
  background: #BDD6B5;
  box-shadow: 0 0 20px rgba(168,195,160,0.35);
  transform: translateY(-1px);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--bg-border);
  padding: 10px 22px;
  border-radius: var(--r-sm);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-secondary:hover {
  border-color: var(--matcha);
  color: var(--matcha);
  box-shadow: 0 0 10px var(--matcha-glow);
}
.icon-links {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-left: var(--sp-sm);
}
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--bg-border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.icon-link:hover {
  border-color: var(--sakura);
  color: var(--sakura);
  box-shadow: 0 0 10px var(--sakura-glow);
}

.hero-ai-note {
  margin-top: var(--sp-lg);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  border-left: 2px solid var(--matcha-deep);
  padding-left: var(--sp-md);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Hero right: Agent Panel ── */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.agent-panel {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}
.agent-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--matcha) 0%, var(--sakura) 60%, transparent 100%);
}
.agent-panel-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--sp-md);
  border-bottom: 1px solid var(--bg-border);
  background: var(--bg-surface);
}
.agent-panel-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--matcha);
}
.agent-panel-badge {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--bg-deep);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--bg-border);
}
.agent-steps {
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.agent-step {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--sp-sm);
  align-items: start;
}
.step-status {
  font-size: 12px;
  line-height: 1.6;
  flex-shrink: 0;
}
.step-status.done   { color: var(--matcha); text-shadow: 0 0 6px var(--matcha); }
.step-status.active { color: var(--sakura); text-shadow: 0 0 6px var(--sakura); }
.step-status.queued { color: var(--text-faint); }
.step-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}
.step-label.muted { color: var(--text-muted); }
.step-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.confidence-bar {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.confidence-label {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  width: 52px;
  flex-shrink: 0;
}
.bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-deep);
  border-radius: 2px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}
.bar-fill.matcha { background: linear-gradient(90deg, var(--matcha-deep), var(--matcha)); box-shadow: 0 0 4px var(--matcha-glow); }
.bar-fill.sakura { background: linear-gradient(90deg, #E87AA0, var(--sakura)); box-shadow: 0 0 4px var(--sakura-glow); }
.bar-fill.butter { background: linear-gradient(90deg, #D4A030, var(--butter)); }
.bar-pct {
  font-size: 9px;
  color: var(--text-muted);
  width: 28px;
  text-align: right;
}

/* Career log (hero panel): one line per role, each links to its case study */
.career-log {
  padding: var(--sp-sm);
  display: flex;
  flex-direction: column;
}
.log-row {
  display: grid;
  grid-template-columns: 14px 56px 124px 1fr;
  align-items: baseline;
  gap: var(--sp-sm);
  padding: 7px var(--sp-sm);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
.log-row:hover,
.log-row:focus-visible { background: var(--bg-card-hi); }
.log-row .step-status { font-size: 9px; line-height: 1; }
.log-when {
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.log-what {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  transition: color 0.2s;
}
.log-row:hover .log-what,
.log-row:focus-visible .log-what { color: var(--matcha); }
.log-role {
  font-size: 10px;
  color: var(--text-secondary);
}

/* Portrait card */
.portrait-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  position: relative;
}
.portrait-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--matcha-deep) 0%, var(--matcha) 50%, var(--sakura-soft) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--bg-border);
  box-shadow: 0 0 16px rgba(168,195,160,0.2);
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--bg-deep);
  overflow: hidden;
  /* swap in real photo: set background-image + remove monogram text */
}
.portrait-avatar img { width: 100%; height: 100%; object-fit: cover; }
.portrait-name {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
}
.portrait-role-line {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.portrait-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.tag-chip {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.07em;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid;
}
.tag-chip.matcha { color: var(--matcha); border-color: rgba(168,195,160,0.3); }
.tag-chip.sakura { color: var(--sakura-soft); border-color: rgba(243,165,192,0.3); }
.tag-chip.butter { color: var(--butter); border-color: rgba(255,214,107,0.3); }
.tag-chip.lilac  { color: var(--lilac); border-color: rgba(201,184,255,0.3); }
.tag-chip.sky    { color: var(--sky); border-color: rgba(143,211,255,0.3); }
.tag-chip.muted  { color: var(--text-muted); border-color: var(--bg-border); }

/* ── Section headers ── */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}
.section-prefix {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}
.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--matcha);
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--bg-border) 0%, transparent 100%);
}
.section-count {
  font-size: 10px;
  color: var(--text-faint);
  font-weight: 400;
}

/* ── Work section ── */
.work-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--sp-3xl) var(--sp-xl);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
  position: relative;
  cursor: pointer;
  color: inherit;
}
.project-card:hover {
  border-color: var(--matcha);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px var(--matcha-glow2);
}
.project-card.featured:hover {
  border-color: var(--sakura-soft);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px var(--sakura-glow);
}
.project-card.wide {
  grid-column: span 2;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}
.project-thumb svg { width: 100%; height: 100%; }

/* Gradient thumbnails */
.thumb-rotation { background: linear-gradient(135deg, #2A2320 0%, #3E3530 50%, #E8C4A0 100%); }
.thumb-regibee { background: linear-gradient(135deg, #2D1A28 0%, #3D2040 50%, #FF9EC4 100%); }
.thumb-kessel  { background: linear-gradient(135deg, #0D1B2A 0%, #1A3050 50%, #8FD3FF 100%); }
.thumb-truffle { background: linear-gradient(135deg, #1A2820 0%, #2B4A3A 50%, #A8C3A0 100%); }
.thumb-route   { background: linear-gradient(135deg, #1A1A2E 0%, #2A2A4A 50%, #C9B8FF 100%); }
.thumb-purrfect{ background: linear-gradient(135deg, #2A1A1A 0%, #4A2A2A 50%, #FFD66B 100%); }
.thumb-paper   { background: linear-gradient(135deg, #2A2218 0%, #3A3020 50%, #FFD66B 100%); }
.thumb-disney  { background: linear-gradient(135deg, #1A1A2C 0%, #2C2A52 55%, #F3A5C0 120%); }

.project-badge {
  position: absolute;
  top: var(--sp-sm);
  right: var(--sp-sm);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
}
.badge-case {
  background: rgba(255,158,196,0.15);
  color: var(--sakura);
  border: 1px solid rgba(255,158,196,0.3);
}
.badge-progress {
  background: rgba(255,214,107,0.12);
  color: var(--butter);
  border: 1px solid rgba(255,214,107,0.3);
}
.badge-concept {
  background: rgba(201,184,255,0.12);
  color: var(--lilac);
  border: 1px solid rgba(201,184,255,0.3);
}

/* Thumb art */
.thumb-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.project-body {
  padding: var(--sp-md) var(--sp-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}
.project-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-md);
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: var(--sp-sm);
}
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--bg-border);
}
.project-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-dot.shipped  { background: var(--matcha); box-shadow: 0 0 4px var(--matcha); }
.status-dot.progress { background: var(--butter); }
.status-dot.concept  { background: var(--text-faint); }
.project-arrow {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-faint);
  transition: color 0.2s, transform 0.2s;
}
.project-card:hover .project-arrow {
  color: var(--matcha);
  transform: translate(2px, -1px);
}

/* ── About section ── */
.about-section {
  border-top: 1px solid var(--bg-border);
  background: var(--bg-surface);
}
.about-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--sp-3xl) var(--sp-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl);
  align-items: center;
}
.about-tagline {
  font-family: 'Fraunces', serif;
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 300;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-lg);
}
.about-tagline em { color: var(--matcha); font-style: normal; }
.about-bio {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--sp-lg);
}
.about-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--matcha);
  text-decoration: none;
  border-bottom: 1px solid rgba(168,195,160,0.3);
  padding-bottom: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.about-link:hover {
  color: #BDD6B5;
  border-color: var(--matcha);
}

/* Skills terminal card */
.skills-terminal {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px var(--sp-md);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--bg-border);
}
.t-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.t-dot-r { background: #FF6B6B; }
.t-dot-y { background: #FFD66B; }
.t-dot-g { background: var(--matcha); }
.terminal-title {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-left: auto;
}
.terminal-body {
  padding: var(--sp-md);
  font-size: 11px;
  line-height: 1.9;
}
.t-line { display: flex; gap: var(--sp-sm); }
.t-prompt { color: var(--matcha); flex-shrink: 0; }
.t-cmd    { color: var(--text-primary); }
.t-out    { color: var(--text-secondary); padding-left: 20px; }
.t-comment{ color: var(--text-faint); font-style: italic; }
.t-highlight-m { color: var(--matcha); }
.t-highlight-s { color: var(--sakura-soft); }
.t-highlight-b { color: var(--butter); }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--bg-border);
  background: var(--bg-deep);
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--sp-2xl) var(--sp-xl);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-xl);
  align-items: start;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
  text-decoration: none;
}
.footer-name {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-primary);
}
.footer-tagline {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--sp-md);
}
.footer-closing {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.footer-col-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--matcha);
  margin-bottom: var(--sp-md);
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--matcha); }
.footer-email {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.footer-email:hover { color: var(--matcha); }
.footer-email-icon { color: var(--matcha); }
.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--sp-lg) var(--sp-xl);
  border-top: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}
.footer-copy {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.footer-sparkles {
  display: flex;
  gap: var(--sp-md);
}
.sparkle {
  font-size: 12px;
  opacity: 0.4;
  animation: twinkle 2.5s ease-in-out infinite;
}
.sparkle:nth-child(2) { animation-delay: 0.8s; }
.sparkle:nth-child(3) { animation-delay: 1.6s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

/* ── Kbd chips ── */
kbd {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border: 1px solid var(--bg-border);
  border-bottom: 2px solid var(--bg-border);
  border-radius: 3px;
  background: var(--bg-surface);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Sparkle decorations ── */
.sparkle-star {
  display: inline-block;
  color: var(--butter);
  font-size: 14px;
  opacity: 0.55;
  animation: twinkle 3s ease-in-out infinite;
}
.sparkle-star.s { font-size: 10px; color: var(--sakura); animation-delay: 1.2s; }
.sparkle-star.m { font-size: 12px; color: var(--matcha); animation-delay: 0.5s; }

/* ── Pixel dango big sprite (hero decoration) ── */
.big-dango {
  position: absolute;
  right: -18px;
  bottom: -10px;
  width: 52px;
  height: 70px;
  opacity: 0.7;
  pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: var(--sp-2xl) var(--sp-lg) 0;
  }
  .hero-right { display: none; }
  .work-section { padding-top: var(--sp-2xl); }
  .work-grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-card.wide { grid-column: span 1; }
  .about-inner {
    grid-template-columns: 1fr;
    padding: var(--sp-2xl) var(--sp-lg);
  }
  .footer-inner {
    grid-template-columns: 1fr;
    padding: var(--sp-xl) var(--sp-lg);
  }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-inner { padding: 0 var(--sp-md); }
  .hero { padding: var(--sp-xl) var(--sp-md) 0; }
  .hero-name { font-size: 42px; }
  .work-section { padding: var(--sp-xl) var(--sp-md) var(--sp-2xl); }
  .work-grid { grid-template-columns: 1fr; }
  .project-card.wide { grid-column: span 1; }
  .about-inner { padding: var(--sp-2xl) var(--sp-md); }
  .footer-inner { padding: var(--sp-xl) var(--sp-md); }
  .footer-bottom { padding: var(--sp-md); }
}

/* ===================================================================
   INNER PAGE COMPONENTS  (About · Contact · Case studies)
   =================================================================== */

/* Page container */
.page-wrap { max-width: 1040px; margin: 0 auto; padding: var(--sp-3xl) var(--sp-xl); }
.page-wrap.narrow { max-width: 780px; }

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); text-decoration: none;
  margin-bottom: var(--sp-xl); transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--matcha); gap: 10px; }

/* Generic prompt eyebrow (reusable on inner pages) */
.page-prompt {
  font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em;
  margin-bottom: var(--sp-lg); display: flex; align-items: center; gap: var(--sp-sm);
}
.page-prompt .prompt-prefix { color: var(--matcha); font-weight: 600; }

/* ---- Image placeholder slots (for dropping in real screens) ---- */
.img-slot {
  width: 100%;
  border: 1px dashed var(--bg-border);
  border-radius: var(--r-lg);
  background-color: var(--bg-surface);
  background-image:
    radial-gradient(circle at 50% 40%, var(--matcha-glow2), transparent 60%);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 8px; text-align: center; padding: var(--sp-xl);
  aspect-ratio: 16 / 9; margin: var(--sp-lg) 0;
}
.img-slot .slot-icon { font-size: 24px; color: var(--matcha-deep); opacity: 0.7; }
.img-slot .slot-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.img-slot .slot-hint { font-size: 9px; color: var(--text-faint); letter-spacing: 0.04em; }
.img-slot.tall   { aspect-ratio: 4 / 5; }
.img-slot.square { aspect-ratio: 1 / 1; }
.img-slot.short  { aspect-ratio: 21 / 9; }
.img-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-lg); }

/* ---- Case study media (real screens that replaced .img-slot placeholders) ---- */
/* body column: text, headings, visuals and stats share one 700px measure, left-aligned;
   .wide (the hero) spans the full page width like the title block */
.cs-media { margin: var(--sp-lg) 0; max-width: 700px; }
.cs-media.wide { max-width: none; }
.cs-media img,
.cs-media video { display: block; width: 100%; height: auto; }
/* mockups are transparent PNG/WebP, so they sit directly on the page with no frame */
.cs-media.tall picture { max-width: 320px; margin: 0 auto; }
.cs-media.tall figcaption { text-align: center; }
.cs-media picture { display: block; }
.cs-media figcaption {
  margin-top: var(--sp-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.04em; color: var(--text-muted);
}
.cs-media figcaption::before { content: '// '; color: var(--matcha-deep); }

/* ---- Case study header ---- */
.cs-eyebrow {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sakura); margin-bottom: var(--sp-md);
  display: flex; align-items: center; gap: 8px;
}
.cs-title {
  font-family: 'Fraunces', serif; font-weight: 300;
  font-size: clamp(36px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.02em;
  color: var(--text-primary); margin-bottom: var(--sp-md);
}
.cs-title .accent { color: var(--matcha); }
.cs-subtitle {
  font-family: 'Fraunces', serif; font-weight: 300;
  font-size: clamp(16px, 2.2vw, 22px); color: var(--text-secondary);
  line-height: 1.5; max-width: 660px; margin-bottom: var(--sp-xl);
}

/* Meta grid */
.cs-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-lg);
  padding: var(--sp-lg) 0; border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border); margin-bottom: var(--sp-2xl);
}
.cs-meta-label { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.cs-meta-value { font-size: 12px; color: var(--text-primary); line-height: 1.5; }

/* Sections */
.cs-section { margin: var(--sp-2xl) 0; }
.cs-section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--matcha); margin-bottom: var(--sp-md); display: flex; align-items: center; gap: 10px;
}
.cs-section-label::before { content: '//'; color: var(--text-faint); }
.cs-h {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(22px, 3vw, 30px); color: var(--text-primary); line-height: 1.25; margin-bottom: var(--sp-md); max-width: 700px;
}
.cs-body { font-size: 14px; color: var(--text-secondary); line-height: 1.8; max-width: 700px; margin-bottom: var(--sp-md); }
.cs-body strong { color: var(--text-primary); font-weight: 600; }
.cs-body a { color: var(--matcha); text-decoration: underline; text-underline-offset: 2px; }
.cs-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2xl); align-items: start; }

/* Lists */
.cs-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-sm); max-width: 700px; }
.cs-list li { font-size: 13px; color: var(--text-secondary); line-height: 1.6; padding-left: var(--sp-lg); position: relative; }
.cs-list li::before { content: '▸'; position: absolute; left: 0; color: var(--matcha); }
.cs-list strong { color: var(--text-primary); font-weight: 600; }
.cs-list + .cs-body { margin-top: var(--sp-lg); }

/* Pull quote */
.cs-quote {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 300;
  font-size: clamp(20px, 3vw, 28px); line-height: 1.4; color: var(--text-primary);
  border-left: 2px solid var(--matcha); padding-left: var(--sp-lg); margin: var(--sp-2xl) 0; max-width: 700px;
}

/* Outcome stats */
.cs-stats {
  display: flex; flex-wrap: wrap; gap: var(--sp-2xl);
  padding: var(--sp-xl); background: var(--bg-surface);
  border: 1px solid var(--bg-border); border-radius: var(--r-lg); margin: var(--sp-xl) 0;
  max-width: 700px; box-sizing: border-box;
}
.cs-stat .v { font-size: 28px; font-weight: 600; color: var(--matcha); text-shadow: 0 0 12px var(--matcha-glow); }
.cs-stat .l { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; max-width: 160px; }

/* Note / NDA callout */
.cs-note {
  font-size: 12px; color: var(--text-secondary); line-height: 1.6;
  background: rgba(255,214,107,0.06); border: 1px solid rgba(255,214,107,0.22);
  border-radius: var(--r-md); padding: var(--sp-md); margin: var(--sp-lg) 0;
  display: flex; gap: 10px; max-width: 760px;
}
.cs-note .ico { color: var(--butter); flex-shrink: 0; }

/* Next-project nav */
.cs-next { border-top: 1px solid var(--bg-border); background: var(--bg-surface); }
.cs-next-inner {
  max-width: 1040px; margin: 0 auto; padding: var(--sp-2xl) var(--sp-xl);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-lg);
}
.cs-next-link { text-decoration: none; text-align: right; display: flex; flex-direction: column; gap: 4px; transition: transform 0.2s; }
.cs-next-link:hover { transform: translateX(4px); }
.cs-next-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.cs-next-title { font-family: 'Fraunces', serif; font-size: 22px; color: var(--text-primary); transition: color 0.2s; }
.cs-next-link:hover .cs-next-title { color: var(--matcha); }

/* Status pill (case study header) */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px; border: 1px solid var(--bg-border); color: var(--text-muted);
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.status-pill.shipped .dot  { background: var(--matcha); box-shadow: 0 0 4px var(--matcha); }
.status-pill.progress .dot { background: var(--butter); }

/* ---- About page ---- */
.about-page-hero { display: grid; grid-template-columns: 1fr 340px; gap: var(--sp-2xl); align-items: start; margin-bottom: var(--sp-2xl); }
.about-page-title { font-family: 'Fraunces', serif; font-weight: 300; font-size: clamp(34px, 5vw, 56px); line-height: 1.1; margin-bottom: var(--sp-lg); }
.about-page-title em { font-style: italic; color: var(--matcha); }
.about-photo {
  width: 100%; aspect-ratio: 4 / 5; border-radius: var(--r-lg);
  border: 1px solid var(--bg-border);
  background: linear-gradient(160deg, var(--matcha-deep) 0%, #2C2A27 45%, var(--sakura-soft) 120%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 48px; color: var(--bg-deep);
  box-shadow: 0 0 30px rgba(168,195,160,0.15); overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-prose p { font-size: 14px; color: var(--text-secondary); line-height: 1.85; margin-bottom: var(--sp-md); max-width: 720px; }
.about-prose p strong { color: var(--text-primary); font-weight: 600; }
.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-lg); margin: var(--sp-xl) 0; }
.about-card { background: var(--bg-card); border: 1px solid var(--bg-border); border-radius: var(--r-lg); padding: var(--sp-lg); }
.about-card .ico { font-size: 18px; margin-bottom: var(--sp-sm); display: block; }
.about-card h3 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 16px; color: var(--text-primary); margin-bottom: 6px; }
.about-card p { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

/* Timeline (about) */
.timeline { display: flex; flex-direction: column; gap: 0; max-width: 760px; }
.timeline-item { display: grid; grid-template-columns: 90px 1fr; gap: var(--sp-lg); padding: var(--sp-lg) 0; border-bottom: 1px solid var(--bg-border); }
.timeline-when { font-size: 11px; color: var(--matcha); letter-spacing: 0.04em; }
.timeline-what h4 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 16px; color: var(--text-primary); margin-bottom: 4px; }
.timeline-what p { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

/* ---- Contact page ---- */
.contact-hero { max-width: 760px; }
.contact-title { font-family: 'Fraunces', serif; font-weight: 300; font-size: clamp(34px, 5vw, 56px); line-height: 1.1; margin-bottom: var(--sp-md); }
.contact-title em { font-style: italic; color: var(--matcha); }
.contact-lead { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--sp-2xl); max-width: 600px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-lg); max-width: 760px; }
.contact-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--bg-border); border-radius: var(--r-lg);
  padding: var(--sp-lg); text-decoration: none; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.contact-card:hover { border-color: var(--matcha); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 16px var(--matcha-glow2); }
.contact-card .cc-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.contact-card .cc-value { font-size: 15px; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.contact-card .cc-value .ico { color: var(--matcha); }
.contact-card .cc-sub { font-size: 11px; color: var(--text-muted); }
.contact-avail {
  display: inline-flex; align-items: center; gap: 8px; margin-top: var(--sp-xl);
  font-size: 12px; color: var(--text-secondary);
  padding: 8px 14px; border: 1px solid rgba(168,195,160,0.3); border-radius: 20px;
}
.contact-avail .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--matcha); box-shadow: 0 0 8px var(--matcha); animation: twinkle 2s ease-in-out infinite; }

/* ---- Inner-page responsive ---- */
@media (max-width: 900px) {
  .cs-two-col { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .cs-meta { grid-template-columns: repeat(2, 1fr); }
  .about-page-hero { grid-template-columns: 1fr; }
  .about-photo { max-width: 280px; }
  .about-cards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .page-wrap { padding: var(--sp-2xl) var(--sp-md); }
  .cs-meta { grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
  .cs-next-inner { padding: var(--sp-xl) var(--sp-md); flex-direction: column; align-items: flex-start; }
  .cs-next-link { text-align: left; }
  .contact-grid { grid-template-columns: 1fr; }
  .cs-stats { gap: var(--sp-lg); }
}

/* ---- Case study: numbered key decisions ---- */
.cs-decision { margin: var(--sp-xl) 0 var(--sp-lg); max-width: 700px; }
.cs-h3 {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: 20px; line-height: 1.3; color: var(--text-primary);
  margin-bottom: var(--sp-sm); display: flex; align-items: baseline; gap: 12px;
}
.cs-h3 .num { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.08em; color: var(--matcha); }

/* ---- Case study: native diagrams (rebuilt in tokens instead of white-bg images) ---- */
.cs-diagram figcaption { margin-top: var(--sp-md); }
.cs-cycle {
  list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px;
  counter-reset: stage; font-family: 'JetBrains Mono', monospace;
}
.cs-cycle li {
  counter-increment: stage; position: relative;
  border: 1px solid var(--bg-border); border-radius: var(--r-md);
  padding: 10px 8px; font-size: 10px; line-height: 1.4; color: var(--text-muted);
  display: flex; flex-direction: column; gap: 4px;
}
.cs-cycle li::before { content: counter(stage, decimal-leading-zero); font-size: 9px; color: var(--text-faint); }
.cs-cycle li:not(:last-child)::after {
  content: '→'; position: absolute; right: -15px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--text-faint);
}
.cs-cycle li.on { border-color: var(--matcha-deep); color: var(--matcha); background: var(--matcha-glow2); }
.cs-cycle li.on::before { color: var(--matcha-deep); }
.cs-cycle-loop { margin-top: var(--sp-sm); font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-faint); }

.cs-formula {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  font-family: 'JetBrains Mono', monospace; margin: var(--sp-lg) 0;
}
.cs-formula .term {
  border: 1px solid var(--bg-border); border-radius: 999px; padding: 6px 16px;
  font-size: 12px; color: var(--text-primary);
}
.cs-formula .term small { color: var(--text-muted); font-size: 10px; }
.cs-formula .term.result { border-color: var(--matcha-deep); color: var(--matcha); background: var(--matcha-glow2); }
.cs-formula .op { color: var(--text-faint); font-size: 14px; }

.cs-flow { display: grid; grid-template-columns: 1fr 3fr 1fr; gap: 12px; align-items: stretch; }
.cs-flow-group {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  border: 1px dashed var(--matcha-deep); border-radius: var(--r-lg); padding: 26px 10px 10px;
}
.cs-flow-group-label {
  position: absolute; top: 7px; left: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--matcha);
}
.cs-flow-step {
  border: 1px solid var(--bg-border); border-radius: var(--r-md); padding: 10px;
  font-size: 11px; line-height: 1.5; color: var(--text-secondary);
}
.cs-flow-step .n { display: block; font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text-faint); margin-bottom: 4px; }
.cs-flow-group .cs-flow-step { border-color: rgba(168,195,160,0.25); }

@media (max-width: 700px) {
  .cs-cycle { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cs-cycle li::after { display: none; }
  .cs-flow, .cs-flow-group { grid-template-columns: 1fr; }
}

/* ---- Case study: research stickies, data cards, API endpoint list (Route Calculator) ---- */
.cs-stickies { display: flex; flex-wrap: wrap; gap: 18px; margin: var(--sp-lg) 0; max-width: 700px; }
.cs-sticky {
  flex: 0 1 210px; min-height: 150px; padding: 16px 16px 12px;
  background: #F4A99A; color: #2A2420; border-radius: 3px;
  font-size: 13px; line-height: 1.5; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 10px 18px -12px rgba(0,0,0,0.6);
}
.cs-sticky:nth-child(odd)  { transform: rotate(-1.5deg); }
.cs-sticky:nth-child(even) { transform: rotate(1.2deg); }
.cs-sticky cite { font-style: normal; font-size: 10px; color: rgba(42,36,32,0.6); margin-top: 12px; }

.cs-data {
  border: 1px solid var(--bg-border); border-radius: var(--r-lg); overflow: hidden;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
}
.cs-data-head {
  display: flex; justify-content: space-between; padding: 10px 16px;
  border-bottom: 1px solid var(--bg-border); color: var(--matcha);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
}
.cs-data-head span:last-child { color: var(--text-faint); }
.cs-data dl { display: grid; grid-template-columns: max-content 1fr; margin: 0; }
.cs-data dt, .cs-data dd { padding: 9px 16px; border-bottom: 1px solid var(--bg-border); margin: 0; }
.cs-data dt { color: var(--text-secondary); }
.cs-data dd { color: var(--text-faint); letter-spacing: -0.05em; text-align: right; }
.cs-data dl > :nth-last-child(-n+2) { border-bottom: 0; }

.cs-endpoints { list-style: none; display: grid; gap: 8px; font-family: 'JetBrains Mono', monospace; }
.cs-endpoints li {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 4px 12px; align-items: center;
  border: 1px solid var(--bg-border); border-radius: var(--r-md); padding: 10px 12px;
}
.cs-endpoints .verb {
  grid-row: span 2; text-align: center; font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--bg-base); background: var(--matcha); border-radius: var(--r-sm); padding: 5px 0;
}
.cs-endpoints code { font-size: 12px; color: var(--text-primary); overflow-wrap: anywhere; }
.cs-endpoints span:last-child { font-family: inherit; font-size: 11px; color: var(--text-muted); }
.cs-endpoints li.new { border-color: var(--matcha-deep); background: var(--matcha-glow2); }
.cs-endpoints li.new code::after {
  content: 'added after testing'; margin-left: 10px; font-size: 9px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--sakura);
}

.cs-ask {
  font-family: 'Fraunces', serif; font-weight: 400; font-size: clamp(20px, 3vw, 26px); line-height: 1.35;
  color: var(--text-primary); margin: var(--sp-lg) 0; max-width: 700px;
}
.cs-ask::before { content: '⟡ '; color: var(--sakura); }

/* ---- Case study: palette, before/after compare, glossary checklist (Truffle Health) ---- */
.cs-media.narrow { max-width: 440px; }
.cs-media.narrow img { border-radius: var(--r-md); }

.cs-palette { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cs-palette li { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-primary); }
.cs-palette .chip { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-md); margin-bottom: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
.cs-palette b { font-weight: 600; }
.cs-palette code { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-muted); }
.cs-palette small { font-size: 10px; line-height: 1.4; color: var(--text-faint); }

.cs-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: var(--sp-xl); align-items: start; }
.cs-compare.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-lg); }
.cs-compare img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); }
.cs-compare-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: var(--sp-sm);
}
.cs-compare-label.after { color: var(--matcha); }

.cs-checks {
  display: grid; grid-template-columns: max-content 1fr; margin: var(--sp-lg) 0; max-width: 700px;
  border: 1px solid var(--bg-border); border-radius: var(--r-lg); overflow: hidden;
}
.cs-checks dt, .cs-checks dd { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--bg-border); font-size: 13px; line-height: 1.55; }
.cs-checks dt { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--matcha); padding-top: 12px; }
.cs-checks dd { color: var(--text-secondary); }
.cs-checks > :nth-last-child(-n+2) { border-bottom: 0; }

@media (max-width: 700px) {
  .cs-palette { grid-template-columns: repeat(3, 1fr); }
  .cs-compare, .cs-compare.wide { grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
  .cs-checks { grid-template-columns: 1fr; }
  .cs-checks dt { border-bottom: 0; padding-bottom: 0; }
  .cs-checks > :nth-last-child(2) { border-bottom: 0; }
}

/* ---- Case study: concept status + before/after information architecture (Disneyland) ---- */
.status-pill.concept .dot { background: var(--sakura); }

.cs-ia-maps img { border-radius: var(--r-md); }

/* ---- Case study: annotated screen + small icon figure (Disneyland) ---- */
.cs-media.icon { max-width: 150px; }
.cs-media.icon figcaption { white-space: nowrap; }
.cs-annotated { display: grid; grid-template-columns: 280px 1fr; gap: var(--sp-xl); align-items: center; }
.cs-anno-phone { position: relative; }
.cs-anno-list { list-style: none; display: flex; flex-direction: column; gap: var(--sp-lg); }
.cs-anno-list b { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.cs-anno-list span { font-size: 12px; line-height: 1.6; color: var(--text-secondary); }

@media (max-width: 600px) {
  .cs-annotated { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .cs-anno-phone { max-width: 260px; }
}

.cs-personas { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-xl); max-width: 700px; margin: var(--sp-lg) 0; }
.cs-personas li { display: flex; flex-direction: column; gap: 6px; }
.cs-personas img { width: 120px; height: 120px; border-radius: 50%; margin-bottom: var(--sp-sm); }
.cs-personas b { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.cs-personas span { font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
@media (max-width: 600px) {
  .cs-personas { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .cs-personas li { display: grid; grid-template-columns: 88px 1fr; column-gap: var(--sp-md); align-items: start; }
  .cs-personas img { width: 88px; height: 88px; grid-row: span 2; margin: 0; }
}

.cs-ba .cs-compare-label { margin-top: var(--sp-lg); }
.cs-ba .cs-compare-label:first-child { margin-top: 0; }
.cs-ba img { display: block; width: 100%; height: auto; }

/* ---- Case study: Paper and Milk (shop banner, origin photo + text, product grid) ---- */
.pm-banner img { border-radius: var(--r-lg); }
.cs-meta-value a { color: var(--matcha); text-decoration: underline; text-underline-offset: 2px; }
.pm-origin { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--sp-xl); align-items: start; max-width: 700px; }
.pm-origin .cs-media { margin: 0; }
.pm-origin img { border-radius: var(--r-md); }
.pm-products { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 700px; margin: var(--sp-lg) 0; }
.pm-products img { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.cs-media.pm-drawing { max-width: 280px; }
.pm-drawing img { border-radius: var(--r-md); }
@media (max-width: 600px) {
  .pm-origin { grid-template-columns: 1fr; }
  .pm-origin .cs-media { max-width: 280px; }
  .pm-products { grid-template-columns: 1fr 1fr; }
}
