/* ==========================================================================
   PRODUCT DESIGNER PORTFOLIO - DESIGN SYSTEM & STYLES
   ========================================================================== */

/* --- CSS Variables & Theme System --- */
:root {
  /* Dark Theme (Base Theme) */
  --bg-primary: #0A0A0A;
  --bg-secondary: #171717;
  --bg-tertiary: #242424;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(10, 10, 10, 0.82);

  --text-h1: #FFFFFF;
  --text-body: #D4D4D4;
  --text-subtitle: #A3A3A3;
  --text-primary: #FFFFFF;
  --text-secondary: #D4D4D4;
  --text-muted: #A3A3A3;
  --text-inverse: #0A0A0A;

  --accent-primary: #29B6B6;
  --accent-primary-hover: #229999;
  --accent-glow: rgba(41, 182, 182, 0.25);
  --accent-emerald: #10b981;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);

  --font-mono: 'Azeret Mono', ui-monospace, monospace;
  --font-display: 'Satoshi', -apple-system, 'Segoe UI', sans-serif;
  --font-sans: 'Satoshi', -apple-system, 'Segoe UI', sans-serif;
  --font-h1: var(--font-mono);
  --font-subtitle: var(--font-mono);
  --font-heading: var(--font-sans);
  --font-body: var(--font-sans);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);

  /* screenshot presentation - see .screen */
  --screen-field: #141414;
  --screen-ring: 1px solid rgba(255, 255, 255, 0.07);
  --screen-shadow: drop-shadow(0 26px 44px rgba(0, 0, 0, 0.8)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* v2 case study tokens (handoff 07 §1, Figma "Theme" collection) - Dark */
  --background: #09090b;
  --card: #111113;
  --muted: #18181b;
  --foreground: #fafafa;
  --muted-foreground: #a1a1aa;
  --border: #27272a;
  --primary: #fafafa;
  --primary-foreground: #18181b;
  --brand: #7c9bff;
  --brand-muted: rgb(124 155 255 / 0.12);
  --accent: var(--accent-primary); /* the site's existing teal, #29B6B6 */
}

[data-theme="light"] {
  --screen-field: #E4E6EA;
  --screen-ring: 1px solid rgba(15, 23, 42, 0.10);
  --screen-shadow: drop-shadow(0 18px 32px rgba(15, 23, 42, 0.18)) drop-shadow(0 4px 10px rgba(15, 23, 42, 0.10));
  --bg-primary: #EDEDED;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #E5E5E5;
  --bg-card: rgba(0, 0, 0, 0.03);
  --bg-card-hover: rgba(0, 0, 0, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.82);

  --text-h1: #0A0A0A;
  --text-body: #404040;
  --text-subtitle: #737373;
  --text-primary: #0A0A0A;
  --text-secondary: #404040;
  --text-muted: #737373;
  --text-inverse: #FFFFFF;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.15);

  /* v2 case study tokens - Light (warm paper) */
  --background: #F3F0EB;
  --card: #FBFAF8;
  --muted: #ECE8E2;
  --foreground: #1C1B19;
  --muted-foreground: #6B6760;
  --border: #E2DDD5;
  --primary: #1C1B19;
  --primary-foreground: #FBFAF8;
  --brand: #3B5BDB;
  --brand-muted: rgb(59 91 219 / 0.10);
  --accent: #0F7F7F; /* darker teal, passes WCAG AA on the light surfaces */
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

/* --- Typography Helpers --- */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

.text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Layout Containers --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 100px 0;
}

/* --- Header & Navigation --- */
.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: padding var(--transition-fast), background var(--transition-fast);
}

.navbar-wrapper.scrolled {
  padding: 10px 0;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

/* Light mode: warm paper instead of pure white (19 Nov 2026) */
[data-theme="light"] .navbar-wrapper.scrolled {
  background: color-mix(in srgb, var(--background) 85%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  padding: 2px;
  position: relative;
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.brand-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .nav-menu {
  background: rgba(0, 0, 0, 0.04);
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Theme toggle: shows the mode it switches to - the sun in dark mode, the moon in light */
.theme-toggle-btn {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: background-color 150ms ease;
}
.theme-toggle-btn:hover { background: var(--muted); }
.theme-toggle-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-icon {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  transition: opacity 150ms ease, transform 150ms ease;
}
.theme-icon * { vector-effect: non-scaling-stroke; } /* a true 1.5px line at 20px */
.theme-icon--moon { opacity: 0; transform: rotate(-90deg) scale(0.8); }
[data-theme="light"] .theme-icon--sun { opacity: 0; transform: rotate(90deg) scale(0.8); }
[data-theme="light"] .theme-icon--moon { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .theme-icon, .theme-toggle-btn { transition: none; }
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .navbar {
    flex-wrap: wrap;
  }

  .nav-menu,
  .nav-actions {
    display: none;
  }

  .navbar-wrapper.nav-open .nav-menu {
    display: flex;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-top: 12px;
    padding: 12px 20px;
  }

  .navbar-wrapper.nav-open .nav-actions {
    display: flex;
    order: 4;
    width: 100%;
    justify-content: space-between;
    margin-top: 12px;
  }

  .nav-link {
    padding: 10px 0;
  }
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  padding-top: 140px;
  padding-bottom: 80px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 10%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
}

.hero-title {
  font-family: var(--font-h1);
  font-weight: 200;
  font-size: clamp(38px, 6.5vw, 84px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
  font-family: var(--font-subtitle);
  font-weight: 200;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .hero-title,
[data-theme="light"] .hero-subtitle {
  text-shadow: none;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: var(--text-inverse);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

/* --- Selected Work Section --- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
}

/* Projects Grid & Featured Card Layout */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.project-card.featured-video-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  min-height: 340px;
}

.project-card.featured-video-card .project-media {
  width: 52%;
  height: auto;
  min-height: 340px;
}

.project-card.featured-video-card .project-body {
  width: 48%;
  justify-content: center;
  padding: 36px;
}

@media (max-width: 900px) {
  .project-card.featured-video-card {
    flex-direction: column;
  }
  .project-card.featured-video-card .project-media {
    width: 100%;
    min-height: 280px;
  }
  .project-card.featured-video-card .project-body {
    width: 100%;
  }
}

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

.project-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md), 0 0 30px rgba(59, 130, 246, 0.15);
}

.project-media {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: #0d0d0d;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-media img {
  transform: scale(1.04);
}

.project-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 2;
}

.project-badge.video-badge {
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.project-overlay-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  color: #141414;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
  opacity: 0.85;
  transform: scale(0.9);
  transition: all var(--transition-fast);
  z-index: 2;
}

.play-icon-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  padding-left: 3px;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6) !important;
  opacity: 1 !important;
  transform: scale(1) !important;
}

.project-card:hover .project-overlay-btn {
  opacity: 1;
  transform: scale(1.1) !important;
}

/* --- Animated UI Video Player Modal Styles --- */
.video-player-container {
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid var(--border-medium);
  overflow: hidden;
  margin: 20px 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.video-player-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.video-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

.video-title-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #cbd5e1;
  letter-spacing: 0.05em;
  flex: 1;
}

.video-quality-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #3b82f6;
  color: #fff;
  letter-spacing: 0.05em;
}

.video-viewport {
  position: relative;
  width: 100%;
  height: 380px;
  background: #020617;
  overflow: hidden;
}

.video-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.video-ui-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.live-counter-box {
  align-self: flex-start;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.live-pulse {
  font-size: 10px;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.08em;
}

.live-counter-val {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0;
}

.live-counter-lbl {
  font-size: 11px;
  color: #94a3b8;
}

.live-comment-toast {
  align-self: flex-end;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 13px;
  color: #f8fafc;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
}

.live-comment-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.play-center-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.9);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  padding-left: 4px;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.7);
  transition: transform 0.2s ease;
}

.play-center-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.video-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
}

.video-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 10px #3b82f6;
  transition: width 0.2s linear;
}

.video-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #0f172a;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.video-ctrl-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.video-ctrl-btn:hover {
  color: #ffffff;
}

.video-time-display {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #94a3b8;
}

.ctrl-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #64748b;
  text-transform: uppercase;
}

.project-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-category {
  font-family: var(--font-subtitle);
  font-weight: 200;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.project-desc {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}

.project-skills {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: -12px 0 20px;
}

.project-stats {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.stat-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Section 1: Full-Bleed Edge-to-Edge Case Study Hero Header (100% Widescreen 4K) */
.case-study-hero-fullbleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 72px;
  background: var(--bg-primary);
  overflow: hidden;
}

.case-study-hero-fullbleed img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform-origin: center top;
  will-change: transform;
}

/* Dedicated Case Study Meta Grid (Role & Timeline only) */
.case-study-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 24px;
  align-items: center;
  margin-bottom: 40px;
}

@media (max-width: 840px) {
  .case-study-meta-grid {
    grid-template-columns: 1fr;
    padding: 24px 28px;
    gap: 20px;
  }
}

.case-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 32px;
  margin-top: 60px;
}

@media (max-width: 480px) {
  .case-nav-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .case-nav-footer .btn-primary,
  .case-nav-footer .btn-secondary {
    justify-content: center;
    text-align: center;
  }
}

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

.meta-label {
  font-family: var(--font-subtitle);
  font-size: 11px;
  font-weight: 200;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meta-val {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* --- About Me Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.about-text p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.skill-tag {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Experience Cards */
.exp-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
  transition: border-color var(--transition-fast);
}

.exp-card:hover {
  border-color: var(--border-medium);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.exp-role {
  font-weight: 600;
  font-size: 16px;
}

.exp-company {
  color: var(--accent-primary);
  font-weight: 500;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.exp-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Interactive Design System Sandbox --- */
.sandbox-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 40px;
  margin-top: 40px;
}

.token-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.color-swatch {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-end;
  padding: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
}

/* --- Contact Section --- */
.contact-section {
  text-align: center;
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-email-link {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 4px;
  display: inline-block;
  margin: 24px 0 32px;
  transition: all var(--transition-fast);
}

.contact-email-link:hover {
  color: var(--accent-primary);
  border-bottom-color: transparent;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==========================================================================
   CASE STUDY MODAL SYSTEM
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-medium);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(30px) scale(0.96);
  transition: transform var(--transition-normal);
}

.modal-backdrop.open .modal-container {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: sticky;
  top: 20px;
  right: 20px;
  float: right;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.modal-close-btn:hover {
  background: #ffffff;
  color: #141414;
  transform: scale(1.08);
}

.modal-header {
  padding: 60px 60px 40px;
}

.modal-body {
  padding: 0 60px 60px;
}

@media (max-width: 768px) {
  .modal-header, .modal-body {
    padding: 30px 24px;
  }
}

/* Case Study Meta Item details defined above */

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.meta-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Tesla Web Mockup & AI Chatbot Simulator */
.tesla-web-frame {
  border-radius: 20px;
  border: 1px solid var(--border-medium);
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow-lg);
  margin: 32px 0;
  position: relative;
}

.browser-bar {
  background: #1e293b;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.browser-url {
  background: #0f172a;
  border-radius: 6px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  flex: 1;
  text-align: center;
}

.tesla-viewport {
  position: relative;
  min-height: 480px;
  background: linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.8)), url('./Screenshot 2026-07-30 195415.png') center/cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.tesla-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
}

.tesla-logo {
  letter-spacing: 0.3em;
  font-weight: 800;
  font-size: 16px;
}

.tesla-hero-text {
  text-align: center;
  margin-top: 40px;
  color: #ffffff;
}

.tesla-hero-text h2 {
  font-size: 36px;
  font-weight: 700;
}

/* Chatbot Floating Widget Inside Viewport */
.chatbot-widget {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 360px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 600px) {
  .chatbot-widget {
    position: static;
    width: 100%;
    margin-top: 20px;
  }
}

.chat-header {
  background: rgba(30, 41, 59, 0.8);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.chat-title {
  font-size: 13px;
  font-weight: 600;
}

.chat-status {
  font-size: 10px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-messages {
  padding: 16px;
  height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
}

.msg-bot {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.msg-user {
  background: #3b82f6;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-chips {
  display: flex;
  gap: 6px;
  padding: 0 16px 12px;
  overflow-x: auto;
}

.chip-btn {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 11px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #ffffff;
  border-color: #3b82f6;
}

.chat-input-row {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  color: #ffffff;
  font-size: 12px;
  outline: none;
}

.chat-send-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #3b82f6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Mobile App Frame for Facts Commando */
.mobile-phone-frame {
  width: 320px;
  height: 640px;
  border-radius: 44px;
  border: 10px solid #1a1a1a;
  background: #000000;
  box-shadow: var(--shadow-lg);
  margin: 32px auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 90px;
  height: 22px;
  background: #1a1a1a;
  border-radius: 12px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.phone-screen {
  background: #ffffff;
  color: #1a1a1a;
  flex: 1;
  overflow-y: auto;
  padding: 40px 16px 16px;
  display: flex;
  flex-direction: column;
}

.profile-card-ui {
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px;
  margin-top: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Utility Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}


/* --- Screenshot presentation ------------------------------------------ */
.screen {
  background: var(--screen-field);
  border: var(--screen-ring);
  border-radius: 20px;
  padding: 28px;
  box-sizing: border-box;
}
.screen img {
  display: block;
  width: 100%;
  filter: var(--screen-shadow);
}
@media (max-width: 640px) {
  .screen { padding: 16px; border-radius: 16px; }
}

/* --- Case study top block (30-second summary; full article lives on *-process.html) --- */
.cs-top {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.cs-block {
  margin-bottom: 40px;
}

.cs-block p {
  margin: 0;
}

.cs-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.cs-lead {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Results strip: data, so it is the one boxed element in the top block */
.cs-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: -16px 0 12px;
}

.cs-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-result-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-primary);
  white-space: nowrap;
}

.cs-result-label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.cs-result-source {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.cs-activity {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 48px;
}

.cs-activity-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-right: 8px;
}

.cs-decisions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.cs-decisions h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.cs-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-medium);
  text-underline-offset: 4px;
}

.cs-more:hover,
.cs-more:focus-visible {
  text-decoration-color: currentColor;
}

.cs-full-link {
  margin: 8px 0 24px;
}

.cs-back-summary {
  margin: 8px 0 32px;
}

@media (max-width: 640px) {
  .cs-lead { font-size: 18px; }
  .cs-results { padding: 20px; }
}

/* ==========================================================================
   v2 CASE STUDY COMPONENTS (handoff 07 §2-§5)
   Shared by the three summary pages. Prefixed v2- so nothing here touches
   the current pages or the Full process pages. Breakpoint: 640px.
   ========================================================================== */

/* --- Page layout (handoff 07 §3) --- */
.v2-page { background: var(--background); color: var(--foreground); padding: 64px 0 96px; }
.v2-container { width: min(1024px, 100% - 48px); margin-inline: auto; }
.v2-sections { display: grid; gap: 64px; }
.v2-section { display: grid; gap: 24px; }
.v2-intro { display: grid; gap: 16px; }

/* --- Breadcrumb (desktop only) --- */
.v2-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font: 500 14px/20px var(--font-sans); color: var(--muted-foreground); }
.v2-breadcrumb a { color: var(--muted-foreground); transition: color var(--transition-fast); }
.v2-breadcrumb a:hover, .v2-breadcrumb a:focus-visible { color: var(--foreground); }
.v2-breadcrumb [aria-current] { color: var(--foreground); }

/* --- Hero panel: transparent PNG on a --card panel.
   Give the mobile <source> its own width/height so the panel has no gap. --- */
.v2-hero { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.v2-hero img { display: block; width: 100%; height: auto; }
/* one <picture> per theme; the manual toggle sets data-theme, so no prefers-color-scheme */
.v2-hero__light { display: none; }
[data-theme="light"] .v2-hero__light { display: block; }
[data-theme="light"] .v2-hero__dark { display: none; }

/* --- Type roles --- */
.v2-title { font: 700 48px/48px var(--font-sans); letter-spacing: -0.02em; color: var(--foreground); }
.v2-lead { font: 300 18px/30px var(--font-mono); color: var(--muted-foreground); }
.v2-h2 { font: 700 24px/32px var(--font-sans); letter-spacing: -0.015em; color: var(--foreground); }
.v2-body { font: 400 15px/24px var(--font-sans); color: var(--muted-foreground); max-width: 720px; }

/* no orphan words */
.v2-title, .v2-lead, .v2-h2, .v2-decision__title, .v2-lesson__title { text-wrap: balance; }
.v2-body, .v2-note__text, .v2-fc dd, .v2-lesson p { text-wrap: pretty; }

/* --- Badge --- */
.v2-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-badge {
  display: inline-flex; align-items: center; white-space: nowrap;
  font: 400 12px/16px var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em;
  padding: 2px 10px; border-radius: 6px;
  border: 1px solid var(--border); color: var(--foreground); background: transparent;
}
.v2-badge--brand { background: var(--brand-muted); color: var(--brand); border-color: transparent; }

/* --- Button --- */
.v2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 14px/20px var(--font-sans); padding: 10px 16px; border-radius: 8px;
  border: 1px solid transparent; text-decoration: none;
  transition: background-color var(--transition-fast), opacity var(--transition-fast), border-color var(--transition-fast);
}
.v2-btn--primary { background: var(--primary); color: var(--primary-foreground); }
.v2-btn--primary:hover { opacity: 0.88; }
.v2-btn--outline { background: transparent; border-color: var(--foreground); color: var(--foreground); }
.v2-btn--outline:hover { background: var(--muted); }
.v2-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v2-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 32px; border-top: 1px solid var(--border); }

/* --- Meta row --- */
.v2-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 24px;
  padding: 16px 0; margin: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.v2-meta dt { font: 400 12px/16px var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); }
.v2-meta dd { margin: 4px 0 0; font: 500 14px/20px var(--font-sans); color: var(--foreground); }

/* --- Stat card --- */
.v2-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.v2-stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.v2-stat__label { font: 500 14px/20px var(--font-sans); color: var(--muted-foreground); }
.v2-stat__value { margin-top: 8px; font: 700 30px/36px var(--font-sans); letter-spacing: -0.02em; color: var(--foreground); text-wrap: balance; }
.v2-stat__note { margin-top: 8px; font: 500 12px/16px var(--font-sans); color: var(--muted-foreground); }

/* --- Research note (brand badge + muted text) --- */
.v2-note { display: flex; align-items: baseline; gap: 12px; }
.v2-note .v2-badge { flex: none; }
.v2-note__text { font: 400 14px/20px var(--font-sans); color: var(--muted-foreground); }

/* --- Decision card (text-only is the base; --image and .v2-flow add to it) --- */
.v2-decisions { display: grid; gap: 16px; }
.v2-decision { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px 24px 24px 32px; }
.v2-decision__head { display: flex; align-items: center; gap: 12px; }
.v2-decision__num { font: 400 12px/16px var(--font-mono); color: var(--muted-foreground); }
.v2-decision__title { margin: 12px 0 16px; font: 700 20px/28px var(--font-sans); letter-spacing: -0.01em; color: var(--foreground); }

.v2-fc { display: grid; grid-template-columns: 56px 1fr; gap: 12px 0; margin: 0; }
.v2-fc dt { font: 500 11px/24px var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); }
.v2-fc dd { margin: 0; font: 400 15px/24px var(--font-sans); color: var(--muted-foreground); }
.v2-fc dd.v2-fc__chose { color: var(--foreground); } /* the choice is the brightest line */

/* screenshot panel, used by image cards and flow steps */
.v2-shot {
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--background); border: 1px solid var(--border); border-radius: 8px; padding: 12px;
}
.v2-shot img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.v2-decision--image { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: center; }
.v2-decision--image .v2-shot { height: 260px; }

/* cover: pre-cropped, borderless images fill the panel edge to edge; the panel
   supplies the border and radius. Centred, so one file serves desktop and phone. */
/* phone screenshots (portrait flow, contained image cards) get rounded corners on the
   image itself; cropped full-page shots (cover, landscape flow) stay square */
.v2-flow:not(.v2-flow--landscape) .v2-shot img,
.v2-decision--image .v2-shot:not(.v2-shot--cover) img { border-radius: 14px; }

.v2-shot--cover { padding: 0; }
.v2-shot--cover img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; object-position: center; }

/* flow (decision 01 - the user journey) */
.v2-flow {
  --shot-h: 320px;
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr); gap: 0 12px;
}
.v2-flow--landscape { --shot-h: 180px; }
.v2-flow__step { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.v2-flow__step .v2-shot { height: var(--shot-h); }
.v2-flow__arrow { padding-top: calc(var(--shot-h) / 2 - 12px); text-align: center; color: var(--muted-foreground); font: 400 16px/24px var(--font-sans); }
.v2-flow__arrow::before { content: "\2192"; }
.v2-flow__label { display: flex; align-items: center; gap: 8px; font: 500 14px/20px var(--font-sans); color: var(--foreground); }
.v2-dot {
  flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand-muted); color: var(--brand); font: 400 11px/1 var(--font-mono);
}

/* --- Lesson card (styled like the quote callout: teal left bar, no other border) --- */
.v2-lesson { background: var(--card); border-left: 3px solid var(--accent); border-radius: 12px; padding: 28px 32px; }
.v2-lesson__title { margin: 16px 0 12px; font: 500 24px/32px var(--font-sans); letter-spacing: -0.01em; color: var(--foreground); }
.v2-lesson p { font: 400 15px/24px var(--font-sans); color: var(--muted-foreground); }
.v2-lesson p.v2-lesson__next { margin-top: 12px; color: var(--foreground); }

/* --- Phone --- */
@media (max-width: 640px) {
  .v2-page { padding: 24px 0 64px; }
  .v2-sections { gap: 48px; }
  .v2-breadcrumb { display: none; }

  .v2-title { font-size: 36px; line-height: 40px; }
  .v2-lead { font-size: 15px; line-height: 24px; }
  .v2-h2 { font-size: 20px; line-height: 28px; }

  .v2-meta { grid-template-columns: repeat(2, 1fr); }
  .v2-stats { grid-template-columns: 1fr; }
  .v2-stat__value { font-size: 28px; line-height: 36px; }
  .v2-note { flex-direction: column; align-items: flex-start; gap: 8px; }

  .v2-decision { padding: 16px 16px 20px; }
  .v2-decision__title { font-size: 18px; line-height: 28px; }
  .v2-fc { grid-template-columns: 1fr; gap: 0; }
  .v2-fc dd + dt { margin-top: 12px; }
  .v2-decision--image { grid-template-columns: 1fr; gap: 20px; }
  .v2-decision--image .v2-shot { order: -1; height: 190px; } /* Figma: 308x190, cover and contained */
  .v2-flow:not(.v2-flow--landscape) .v2-shot img,
  .v2-decision--image .v2-shot:not(.v2-shot--cover) img { border-radius: 10px; }

  .v2-flow { --shot-h: 260px; grid-template-columns: 1fr; gap: 12px; }
  .v2-flow--landscape { --shot-h: 200px; }
  .v2-flow__arrow { padding-top: 0; }
  .v2-flow__arrow::before { content: "\2193"; }

  .v2-lesson { padding: 24px 20px; }
  .v2-lesson__title { font-size: 20px; line-height: 28px; }

  .v2-actions { flex-direction: column; }
  .v2-actions .v2-btn { width: 100%; }
}

/* --- v2 summary pages inside the site (PR 2+): the fixed site nav sits above the page --- */
body.v2-site { background: var(--background); }
.v2-page--under-nav { padding-top: calc(64px + var(--v2-nav-h, 72px)); }
@media (max-width: 640px) {
  .v2-page--under-nav { padding-top: calc(24px + var(--v2-nav-h, 64px)); }
}

/* --- Tablet (641-900px): Figma covers 1440 and 390 only. Stop the image cards squeezing
   their text into a narrow column next to the 400px image, and keep stat values on one line. --- */
@media (min-width: 641px) and (max-width: 900px) {
  .v2-stat { padding: 16px; }
  .v2-stat__value { font-size: 28px; line-height: 36px; }
  .v2-decision--image { grid-template-columns: 1fr; gap: 24px; }
  .v2-decision--image .v2-shot { order: -1; }
  .v2-decision--image .v2-shot--cover { height: auto; aspect-ratio: 400 / 260; }
}

/* --- Breadcrumb row with the live-site link at its right end (desktop); the link
   moves under the meta row on phones --- */
.v2-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.v2-topbar .v2-breadcrumb { margin-bottom: 0; }
.v2-live {
  font: 500 14px/20px var(--font-sans); color: var(--muted-foreground);
  text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 4px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}
.v2-live:hover, .v2-live:focus-visible { color: var(--foreground); text-decoration-color: currentColor; }
.v2-show-phone { display: none; }
@media (max-width: 640px) {
  .v2-topbar, .v2-hide-phone { display: none; }
  .v2-show-phone { display: inline-block; justify-self: start; }
}

/* --- Phone: tighter spacing above the first stat (Hannah, 19 Nov) --- */
@media (max-width: 640px) {
  .v2-sections > .v2-intro { margin-top: -24px; }  /* hero -> intro 48 -> 24 */
  .v2-sections > .v2-stats { margin-top: -24px; }  /* intro -> stats 48 -> 24 */
  .v2-intro { gap: 12px; }                         /* badges / title / lead / meta / link 16 -> 12 */
  .v2-meta { padding: 12px 0; gap: 12px 24px; }    /* meta row padding and row gap 16 -> 12 */
}
