/* ============================================
   CSS Reset (modern minimal)
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

html:focus-within {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  height: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ============================================
   Design Tokens
   ============================================ */
:root {
  /* Base Colors - Dark theme */
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1f2937;
  --text: #f5f1ed;
  --muted: #9ca3af;
  --link: #60a5fa;

  /* Semantic colors */
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --border: #30363d;
  --border-bright: #404854;

  /* Base button text color */
  --btn-primary-text: #ffffff;

  /* Full Accent Palette (available for all themes) */
  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-purple: #a855f7;
  --accent-purple-light: #c084fc;
  --accent-pink: #ec4899;
  --accent-pink-light: #f472b6;
  --accent-orange: #f97316;
  --accent-orange-light: #fb923c;
  --accent-teal: #14b8a6;
  --accent-teal-light: #2dd4bf;
  --accent-lime: #84cc16;
  --accent-lime-light: #a3e635;
  --accent-red: #ef4444;
  --accent-red-light: #f87171;
  --accent-green: #10b981;
  --accent-green-light: #34d399;
  --accent-yellow: #eab308;
  --accent-yellow-light: #fbbf24;

  /* Default Theme: Vintage Garden */
  --primary-accent: #ff6542; /* Tomato */
  --primary-accent-light: #ff8A70;
  --secondary-accent: #697a21; /* Forest Moss */
  --secondary-accent-light: #8ba02c;
  --tertiary-accent: #478eff; /* Blue Energy */

  /* Dynamic RGBA values (centralized for shadows/overlays) */
  --primary-accent-rgb: 255, 101, 66; /* Tomato */
  --secondary-accent-rgb: 105, 122, 33; /* Forest Moss */
  --tertiary-accent-rgb: 71, 142, 255; /* Blue Energy */

  /* Elevation shadows using dynamic colors */
  --shadow: 0 10px 30px rgba(var(--secondary-accent-rgb), 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(var(--secondary-accent-rgb), 0.1), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-colored: 0 10px 40px rgba(var(--tertiary-accent-rgb), 0.25);

  /* Spacing */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --container: 1120px;

  /* Typography */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* ============================================
   Theme Variations
   ============================================ */

/* Purple-Pink Theme */
:root[data-theme="purple-pink"] {
  --primary-accent: var(--accent-purple);
  --primary-accent-light: var(--accent-purple-light);
  --secondary-accent: var(--accent-pink);
  --secondary-accent-light: var(--accent-pink-light);
  --tertiary-accent: var(--accent-blue);
  --primary-accent-rgb: 168, 85, 247; /* purple */
  --secondary-accent-rgb: 236, 72, 153; /* pink */
  --tertiary-accent-rgb: 59, 130, 246; /* blue */
}

/* Teal-Blue Theme */
:root[data-theme="teal-blue"] {
  --primary-accent: var(--accent-teal);
  --primary-accent-light: var(--accent-teal-light);
  --secondary-accent: var(--accent-blue);
  --secondary-accent-light: var(--accent-blue-light);
  --tertiary-accent: var(--accent-purple);
  --primary-accent-rgb: 20, 184, 166; /* teal */
  --secondary-accent-rgb: 59, 130, 246; /* blue */
  --tertiary-accent-rgb: 168, 85, 247; /* purple */
}

/* Orange-Red Theme (Warm) */
:root[data-theme="orange-red"] {
  --primary-accent: var(--accent-orange);
  --primary-accent-light: var(--accent-orange-light);
  --secondary-accent: var(--accent-red);
  --secondary-accent-light: var(--accent-red-light);
  --tertiary-accent: var(--accent-yellow);
  --primary-accent-rgb: 249, 115, 22; /* orange */
  --secondary-accent-rgb: 239, 68, 68; /* red */
  --tertiary-accent-rgb: 234, 179, 8; /* yellow */
}

/* Green-Teal Theme (Nature) */
:root[data-theme="green-teal"] {
  --primary-accent: var(--accent-green);
  --primary-accent-light: var(--accent-green-light);
  --secondary-accent: var(--accent-teal);
  --secondary-accent-light: var(--accent-teal-light);
  --tertiary-accent: var(--accent-lime);
  --primary-accent-rgb: 16, 185, 129; /* green */
  --secondary-accent-rgb: 20, 184, 166; /* teal */
  --tertiary-accent-rgb: 132, 204, 22; /* lime */
}

/* Monochrome Theme (Professional) */
:root[data-theme="monochrome"] {
  --primary-accent: #6b7280;
  --primary-accent-light: #9ca3af;
  --secondary-accent: #4b5563;
  --secondary-accent-light: #6b7280;
  --tertiary-accent: #374151;
  --primary-accent-rgb: 107, 114, 128; /* gray */
  --secondary-accent-rgb: 75, 85, 99; /* dark gray */
  --tertiary-accent-rgb: 55, 65, 81; /* darker gray */
}

/* Vintage Garden Theme (Custom) */
:root[data-theme="vintage-garden"] {
  --primary-accent: #ff6542; /* Tomato */
  --primary-accent-light: #ff8A70;
  --secondary-accent: #697a21; /* Forest Moss */
  --secondary-accent-light: #8ba02c;
  --tertiary-accent: #478eff; /* Blue Energy */
  --primary-accent-rgb: 255, 101, 66; /* Tomato */
  --secondary-accent-rgb: 105, 122, 33; /* Forest Moss */
  --tertiary-accent-rgb: 71, 142, 255; /* Blue Energy */
  /* Additional palette colors available for manual use */
  --vintage-grape: #45425a;
  --parchment: #f5f1ed;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafbfc;
    --surface: #ffffff;
    --surface-2: #f5f1ed;
    --text: #2F2A53;
    --muted: #4a4672;
    --border: #e5e7eb;
    --border-bright: #d1d5db;

    --shadow: 0 10px 30px rgba(var(--primary-accent-rgb), 0.12), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 8px rgba(var(--primary-accent-rgb), 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-colored: 0 10px 40px rgba(var(--secondary-accent-rgb), 0.2);
  }
}

/* ============================================
   Base Styles
   ============================================ */
body {
  background:
    radial-gradient(ellipse 120% 80% at 20% -25%, rgba(var(--tertiary-accent-rgb), 0.1), transparent 65%),
    radial-gradient(ellipse 110% 70% at 85% 5%, rgba(var(--primary-accent-rgb), 0.1), transparent 70%),
    radial-gradient(circle at 50% 50%, rgba(var(--tertiary-accent-rgb), 0.04), transparent 80%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(var(--tertiary-accent-rgb), 0.015) 3px, rgba(var(--tertiary-accent-rgb), 0.015) 6px),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(var(--primary-accent-rgb), 0.015) 3px, rgba(var(--primary-accent-rgb), 0.015) 6px);
  background-size: 120px 120px;
  background-attachment: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
  filter: blur(0.5px);
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}
/* ============================================
   Layout
   ============================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--surface) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 650;
  letter-spacing: 0.2px;
  text-decoration: none;
  color: var(--primary-accent);
  transition: all 0.3s ease;
}

.brand:hover {
  color: var(--tertiary-accent);
  transform: translateY(-1px);
}

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

.nav a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  position: relative;
}

.nav a:hover {
  opacity: 1;
}

.nav a:focus-visible {
  opacity: 1;
  outline: 2px solid var(--accent-blue);
  outline-offset: 4px;
  border-radius: 4px;
}

.nav a[aria-current="page"] {
  opacity: 1;
  font-weight: 600;
  position: relative;
}

.nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-accent);
  border-radius: 2px;
}

.menu-btn {
  display: none;
  gap: 8px;
  align-items: center;
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-btn:hover {
  background: var(--surface-2);
}

.menu-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .menu-btn {
    display: inline-flex;
  }

  .nav {
    display: none;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    box-shadow: var(--shadow-sm);
  }

  .nav.open a {
    padding: 12px;
    border-radius: var(--radius-sm);
  }

  .nav.open a:hover {
    background: var(--surface-2);
  }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 80px 0 32px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--tertiary-accent-rgb), 0.15), transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}

.hero h1 {
  font-size: clamp(24px, 4.5vw, 48px);
  line-height: 1.2;
  font-weight: 700;
  max-width:70vw;
  color: var(--text);
}

.hero p {
  margin-top: 16px;
  font-size: 18px;
  color: var(--muted);
  max-width: 70ch;
  line-height: 1.6;
}

.hero-centered {
  text-align: center;
}

.hero-centered h1,
.hero-centered p {
  margin-left: auto;
  margin-right: auto;
}

.hero-centered .actions {
  justify-content: center;
}

/* ============================================
   Hero split layout (text + visual)
   ============================================ */
.hero-inner {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.hero-copy {
  flex: 1 1 auto;
  min-width: 0; /* allow the copy to shrink inside flex */
  max-width: calc(100% - 460px); /* reserve space for visual */
}

.hero-visual {
  flex: 0 0 420px;
  max-width: 420px;
}

.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 800px) {
  .hero-inner {
    flex-direction: column;
    gap: 20px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-visual {
    max-width: 100%;
    width: 100%;
  }
}

/* About page specifics */
.about-hero {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 24px 0;
}
.about-headshot {
  flex: 0 0 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-headshot-img {
  width: 300px;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}
.about-actions {
  margin-top: 18px;
}
@media (max-width:800px) {
  .about-hero {
    flex-direction: column;
    text-align: center;
  }
  .about-intro { max-width: none; }
  .about-headshot { margin-bottom: 6px; }
  .about-headshot-img { width: 140px; height: 140px; }
  .about-intro .actions { justify-content: center; }
}

/* ============================================
   Buttons & Actions
   ============================================ */
.actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-bright);
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--secondary-accent-rgb), 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--secondary-accent);
}

.btn:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: var(--primary-accent);
  color: var(--btn-primary-text);
  border: none;
  font-weight: 600;
  box-shadow: var(--shadow-colored);
}

.btn.primary:hover {
  background: var(--surface-2);
  color: var(--secondary-accent);
  box-shadow: inset 0 0 0 1px var(--secondary-accent);
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 48px 0;
}

.section-divider {
  max-width: 120px;
  margin: 0 auto;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--secondary-accent), transparent);
}

.section h2 {
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 16px;
  font-weight: 700;
  position: relative;
  padding-bottom: 12px;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--secondary-accent);
  border-radius: 2px;
}

.section-centered {
  text-align: center;
}

.section-centered h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.section h3 {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 650;
}

/* ============================================
   Grid & Cards
   ============================================ */
.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  box-shadow: var(--shadow-colored);
  transform: translateY(-4px);
  border-color: var(--border-bright);
}

.card h3 {
  margin-bottom: 8px;
  color: var(--text);
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tag {
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  transition: all 0.3s ease;
  position: relative;
}

.tag:hover {
  background: linear-gradient(135deg, rgba(var(--primary-accent-rgb), 0.15), rgba(var(--secondary-accent-rgb), 0.15));
  border-color: var(--primary-accent);
  transform: translateY(-1px);
}

/* ============================================
   Case Study Specifics
   ============================================ */
.challenges-list {
  margin-top: 24px;
  color: var(--text);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: start;
}

.challenge {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.challenge .challenge-icon {
  width: 48px;
  height: 48px;
  display: inline-block;
  margin-bottom: 12px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  /* Glyphs webcomponents size their SVGs using em units, so set font-size here to control visual size */
  font-size: 48px;
  line-height: 0;
  min-width: 48px;
  min-height: 48px;
}

.challenge img.challenge-icon {
  width: 48px;
  height: 48px;
  display: block;
  margin-bottom: 12px;
}

.challenge h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.challenge ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(var(--secondary-accent-rgb), 0.1), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat:hover::after {
  opacity: 1;
}

.stat:hover {
  border-color: var(--secondary-accent);
  transform: scale(1.05);
}

.stat .kpi {
  font-weight: 700;
  font-size: 24px;
  color: var(--primary-accent);
  position: relative;
  z-index: 1;
}

@media (max-width: 720px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Research Flow Layout */
.research-flow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px;
  margin-top: 24px;
  position: relative;
}

.research-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: flex-start;
  position: relative;
}

.research-item-even {
  direction: rtl;
}

.research-item-even > * {
  direction: ltr;
}

.research-number {
  font-size: 56px;
  font-weight: 700;
  color: var(--primary-accent);
  opacity: 0.12;
  line-height: 1;
  min-width: 56px;
  text-align: right;
  flex-shrink: 0;
}

.research-item-even .research-number {
  text-align: left;
}

.research-content h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

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

  .research-item {
    grid-template-columns: auto 1fr;
    gap: 16px;
  }

  .research-item-even {
    direction: ltr;
  }

  .research-number {
    font-size: 48px;
    min-width: 48px;
  }

  .research-item-even .research-number {
    text-align: right;
  }
}

/* Alternating rows (text + media) */
.alt-grid {
  display: grid;
  gap: 24px;
}

.alt-row {
  display: grid;
  grid-template-columns: 2fr 395px;
  gap: 24px;
  align-items: center;
  padding: 0 4%;
}

.alt-row.alt-right {
  direction: rtl;
}
.alt-row.alt-right > * { direction: ltr; }

.alt-media {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
}

.alt-media .caption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

.alt-media-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.alt-media-img:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-colored); border-color: var(--border-bright); }

.alt-content h3 { margin-top: 0; }
.alt-content {
  display: flex;
  flex-direction: column;
  row-gap: 12px;
}

@media (max-width: 900px) {
  .alt-row { grid-template-columns: 1fr; }
  .alt-row.alt-right { direction: ltr; }
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 24px;
}

.lightbox-overlay.open { display: flex; }
.lightbox-content { max-width: 1100px; width: 100%; max-height: 90vh; overflow: auto; }
.lightbox-content img { width: 100%; height: auto; border-radius: var(--radius); }
.lightbox-caption { color: var(--muted); font-size: 14px; margin-top: 12px; }
.lightbox-close { position: absolute; right: 18px; top: 18px; background: transparent; border: none; color: #fff; font-size: 28px; cursor: pointer; }

body.no-scroll { overflow: hidden; }

.figure {
  margin: 20px 0;
  position: relative;
}

.figure img {
  border-radius: var(--radius);
  border: 2px solid var(--border);
  width: 100%;
  height: auto;
  background: var(--surface-2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.figure img:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-colored);
  border-color: var(--border-bright);
}

.figure .caption {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
  padding-left: 4px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  background-color: var(--surface);
  padding: 36px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.2s ease;
}

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

/* ============================================
   Utilities
   ============================================ */
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.kicker {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: var(--tertiary-accent);
}

.lead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.muted {
  color: var(--muted);
}

.sep {
  height: 2px;
  background: var(--border-bright);
  margin: 32px 0;
  opacity: 0.5;
}

/* Utility Classes */
.mb-18 {
  margin-bottom: 18px;
}

.section-bg {
  background: var(--surface);
}

.callout-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary-accent);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout-text {
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
}

.sidebar-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Testimonial Dialog */
.testimonial-dialog {
  max-width: 480px !important;
  width: 90%;
  max-height: 80vh;
  padding: 0;
  margin: auto;
  border: none;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  background: var(--bg);
  color: var(--text);
  overflow: visible;
}

.testimonial-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.testimonial-dialog[open] {
  animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dialog-content {
  max-height: 80vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
}

.dialog-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dialog-close:hover {
  background: var(--bg);
  border-color: var(--secondary-accent);
}

.dialog-quote {
  margin: 0 0 24px;
}

.dialog-quote p {
  font-size: 16px !important;
  line-height: 1.5;
  color: var(--text);
  font-style: italic;
  margin: 0;
}

.dialog-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dialog-author strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.dialog-author .muted {
  font-size: 13px;
}

.dialog-date {
  display: block;
  margin-top: 12px;
  font-size: 12px;
}

/* Make testimonial cards clickable */
.testimonial {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.testimonial:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .testimonial-dialog {
    max-width: 95% !important;
  }

  .dialog-content {
    padding: 20px;
  }

  .dialog-quote p {
    font-size: 15px !important;
  }

  .dialog-author strong {
    font-size: 14px;
  }
}

/* ============================================
   Principles Section (Homepage)
   ============================================ */
.principles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  margin: 3em 0 4em;
  text-align: center;
}

.principle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.principle-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.principle-icon svg {
  width: 32px;
  height: 32px;
  color: var(--muted);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  opacity: 0.8;
}

.principle-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(var(--secondary-accent-rgb), 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.principle:hover .principle-icon {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.principle:hover .principle-icon svg {
  color: var(--text);
  opacity: 1;
}

.principle:hover .principle-icon::after {
  opacity: 1;
}

.principle-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.principle-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.ai-focus-box {
  margin-top: 48px;
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
  padding: 48px;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 2px solid var(--secondary-accent);
}

.ai-focus-box h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.ai-focus-box p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto 32px;
  font-size: 16px;
}

.ai-focus-links {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 32px;
}

.ai-focus-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--border-bright);
  transition: all 0.3s ease;
}

.ai-focus-links a:hover {
  border-bottom-color: var(--secondary-accent);
  color: var(--secondary-accent);
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .principle-icon {
    width: 100px;
    height: 100px;
  }

  .ai-focus-box {
    padding: 32px 24px;
  }
}

@media (max-width: 640px) {
  .principles {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .principle-icon {
    width: 120px;
    height: 120px;
  }

  .ai-focus-links {
    flex-direction: column;
    gap: 20px;
  }

  .ai-focus-box {
    padding: 24px 20px;
  }
}

/* ============================================
   Testimonials Section
   ============================================ */
.testimonials-section {
  background: var(--surface);
  padding: 64px 0;
}

/* Horizontal scroller on all viewports to prevent wrapping rows */
.testimonials {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 32px;
  margin-top: 48px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 8px 0;
}

#testimonials-list {
  width: 90%;
  margin: 0 auto;
}

/* Card sizing for the scroller; keeps a 3-up feel on wide screens but prevents wrapping */
.testimonial {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc(33.333% - 21.333px);
  min-width: 320px;
  scroll-snap-align: start;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: 16px;
  left: 24px;
  font-size: 64px;
  font-weight: 700;
  color: var(--border-bright);
  line-height: 1;
  opacity: 0.3;
}

.testimonial:hover {
  border-color: var(--secondary-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-colored);
}

.testimonial blockquote {
  margin: 0;
  position: relative;
  z-index: 1;
}

.testimonial blockquote p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 24px 0;
  font-style: italic;
}

.testimonial-quote {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.testimonial.expanded .testimonial-quote {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
}

.testimonial:not(.expanded)::after {
  content: 'Click to read more';
  position: absolute;
  bottom: 16px;
  right: 24px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.testimonial:not(.expanded):hover::after {
  opacity: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.testimonial-author strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.testimonial-author .muted {
  font-size: 14px;
}

@media (max-width: 900px) {
  .testimonials {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 24px;
    margin-top: 24px;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }

  .testimonials:focus-visible {
    outline: 3px solid var(--primary-accent);
    outline-offset: 4px;
    border-radius: 6px;
  }

  .testimonial {
    flex: 0 0 auto;
    min-width: 280px;
    scroll-snap-align: start;
  }

  .testimonials-section {
    padding: 48px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonials {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
}

/* Full-width wrapper for testimonials and navigation buttons */
.testimonials-wrapper {
  width: 100%;
  position: relative;
  padding: 0;
}

.testimonials {
  padding-left: 20px; /* align with .container padding */
  padding-right: 20px;
}



.testimonials-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  z-index: 5;
}

.testimonials-nav svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.testimonials-nav.prev {
  left: 12px;
}

.testimonials-nav.next {
  right: 12px;
}

@media (min-width: 900px) {
  .testimonials-nav {
    display: flex;
  }

  .testimonials {
    padding-left: 40px;
    padding-right: 40px;
  }
}

.testimonials-nav:focus-visible {
  outline: 2px solid var(--primary-accent);
  outline-offset: 3px;
}

.testimonials-nav[disabled] {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* ============================================
   Focus Styles (Accessibility)
   ============================================ */
:focus-visible {
  outline: 3px solid var(--primary-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================
   Testimonial Submission Page
   ============================================ */
.testimonial-mode-switcher {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
}

.mode-btn {
  padding: 16px 32px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mode-btn:hover {
  border-color: var(--secondary-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.mode-btn.active {
  background: var(--primary-accent);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-colored);
}

.testimonial-form {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 15px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-sans);
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-accent);
  box-shadow: 0 0 0 3px rgba(var(--secondary-accent-rgb), 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.char-counter {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.char-encouragement {
  color: var(--secondary-accent);
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--secondary-accent);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  justify-content: center;
}

/* Mad Libs Specific */
.madlibs-intro {
  text-align: center;
  margin-bottom: 32px;
  color: var(--muted);
}

.madlibs-templates {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.template-radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
}

.template-radio:hover {
  border-color: var(--secondary-accent);
  background: var(--surface);
}

.template-radio input[type="radio"] {
  margin-top: 4px;
  cursor: pointer;
  accent-color: var(--secondary-accent);
}

.template-radio input[type="radio"]:checked + .template-preview {
  color: var(--secondary-accent);
  font-weight: 600;
}

.template-preview {
  flex: 1;
  line-height: 1.6;
  color: var(--text);
}

.madlib-input {
  background: var(--surface) !important;
  border-color: var(--secondary-accent) !important;
}

/* Preview Card */
.testimonial-preview {
  margin-top: 48px;
  padding: 32px;
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-bright);
}

.testimonial-preview h3 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--text);
}

.testimonial-preview .btn {
  display: block;
  margin: 24px auto 0;
}

/* Success Overlay */
.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.success-modal {
  background: var(--surface);
  padding: 64px 48px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--secondary-accent);
  text-align: center;
  max-width: 500px;
  box-shadow: var(--shadow-colored);
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-icon {
  font-size: 72px;
  margin-bottom: 24px;
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.success-modal h2 {
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--primary-accent);
}

.success-modal p {
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Confetti Animation */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  opacity: 0;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg);
  }
}

/* Responsive */
@media (max-width: 640px) {
  .testimonial-mode-switcher {
    flex-direction: column;
  }

  .mode-btn {
    padding: 14px 24px;
  }

  .testimonial-form {
    padding: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .success-modal {
    padding: 48px 32px;
    margin: 20px;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .header,
  .footer,
  .menu-btn,
  .actions {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .card {
    break-inside: avoid;
  }
}

/* ============================================
   Work Page Styles
   ============================================ */

/* Work page hero variant */
.hero-work {
  padding-top: 120px;
  padding-bottom: 80px;
}

/* Case Studies Grid */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 32px;
}

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

/* Case Study Card */
.case-study-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
  position: relative;
}

.case-study-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-sm);
}

.case-study-card.featured {
  background:
    linear-gradient(135deg, rgba(var(--primary-accent-rgb), 0.08), rgba(var(--secondary-accent-rgb), 0.08)),
    var(--surface);
  border-color: var(--secondary-accent);
  box-shadow: var(--shadow-colored);
}

.case-study-card.featured:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 48px rgba(var(--secondary-accent-rgb), 0.3);
}

/* Case Study Meta */
.case-study-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Case Study Title */
.case-study-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.case-study-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.case-study-title a:hover {
  color: var(--primary-accent);
}

.case-study-card.featured .case-study-title a {
  color: var(--primary-accent);
}

/* Case Study Description */
.case-study-description {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  flex-grow: 1;
}

/* Case Study Highlights */
.case-study-highlights {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.case-study-highlights .highlight {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 12px;
  background: var(--surface-2);
  border-radius: 6px;
}

.case-study-card.featured .case-study-highlights .highlight {
  background: rgba(var(--secondary-accent-rgb), 0.15);
  color: var(--secondary-accent);
}

/* Case Study Link */
.case-study-link {
  color: var(--primary-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.case-study-link:hover {
  gap: 10px;
  color: var(--secondary-accent);
}

.case-study-card.featured .case-study-link {
  color: var(--secondary-accent);
}

.case-study-card.featured .case-study-link:hover {
  color: var(--tertiary-accent);
}

/* ============================================
   Resume Page Styles
   ============================================ */

/* Resume Header */
.resume-header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.resume-header .lead {
  margin-top: 8px;
  margin-bottom: 16px;
  color: var(--muted);
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 15px;
}

.resume-contact a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.resume-contact a:hover {
  color: var(--secondary-accent);
}

.resume-contact span {
  color: var(--muted);
}

/* Resume Sections */
.resume-section {
  margin-top: 48px;
}

.resume-section h2 {
  font-size: 24px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.resume-section h4.kicker {
  font-size: 14px;
  margin-bottom: 18px;
}

.resume-section p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.resume-section ul {
  list-style: disc;
  padding-left: 24px;
  margin-top: 8px;
}

.resume-section ul li {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.6;
}

/* Resume Entry */
.resume-entry {
  margin-bottom: 32px;
}

.resume-entry:last-child {
  margin-bottom: 0;
}

.resume-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 16px;
}

.resume-title-group {
  display: flex;
  gap: 1em;
  align-items: baseline;
}

.resume-entry h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.resume-entry .year {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.resume-responsibilities-label {
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 8px;
}

/* Resume Title Row */
.resume-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 32px;
}

.resume-title-row h1 {
  font-size: 42px;
  margin-bottom: 8px;
}

.resume-title-row .lead {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}

.resume-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* Company Name */
.company-name {
  color: var(--primary-accent);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}

/* Resume Highlights Grid */
.resume-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.resume-highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.resume-highlight-card:hover {
  border-color: var(--secondary-accent);
  transform: translateY(-2px);
}

.highlight-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-accent);
  margin-bottom: 8px;
}

.highlight-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Skills Categories */
.skills-category {
  margin-bottom: 32px;
}

.skills-category:last-child {
  margin-bottom: 0;
}

.skills-category h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Skills Badges */
.skills-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.skill-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: default;
}

.skill-badge svg {
  display: none;
}

.skill-badge:hover svg {
  opacity: 1;
}

/* Resume Entry Enhancements */
.resume-entry ul {
  margin-top: 12px;
}

.resume-entry ul li {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 10px;
}

.resume-entry ul li::marker {
  color: var(--primary-accent);
}

/* Career Timeline */
.career-timeline {
  position: relative;
  padding-left: 48px;
  margin-top: 32px;
}

.timeline-line {
  position: absolute;
  left: 15px;
  top: 12px;
  width: 2px;
  height: 0;
  background: var(--primary-accent);
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-line.animate {
  height: calc(100% - 24px);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-node {
  position: absolute;
  top: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--primary-accent);
  transition: transform 0.3s ease, border-width 0.3s ease, box-shadow 0.3s ease;
  z-index: 2;
  cursor: pointer;
  will-change: transform;
  /* Timeline line center is at 16px (15px left + 1px for 2px line center) */
  /* Node left position = 16px - (node-width / 2) - padding-left */
}

/* Graduated node sizes based on seniority - centered on timeline line */
.timeline-item[data-seniority="entry"] .timeline-node {
  width: 12px;
  height: 12px;
  left: calc(16px - 48px - 6px); /* 16px line center - 48px padding - half node width */
  border-color: var(--primary-accent);
}

.timeline-item[data-seniority="junior"] .timeline-node {
  width: 16px;
  height: 16px;
  left: calc(16px - 48px - 8px); /* 16px line center - 48px padding - half node width */
  border-color: var(--primary-accent);
}

.timeline-item[data-seniority="mid"] .timeline-node {
  width: 20px;
  height: 20px;
  left: calc(16px - 48px - 10px); /* 16px line center - 48px padding - half node width */
  border-color: var(--secondary-accent);
}

.timeline-item[data-seniority="senior"] .timeline-node {
  width: 24px;
  height: 24px;
  left: calc(16px - 48px - 12px); /* 16px line center - 48px padding - half node width */
  border-color: var(--tertiary-accent);
  box-shadow: 0 0 0 0 rgba(var(--tertiary-accent-rgb), 0.4);
}

/* Node hover effects - enhanced for clickability */
.timeline-node:hover {
  transform: scale(1.3);
}

.timeline-item[data-seniority="entry"] .timeline-node:hover {
  box-shadow: 0 0 16px rgba(0, 123, 255, 0.6);
}

.timeline-item[data-seniority="junior"] .timeline-node:hover {
  box-shadow: 0 0 18px rgba(0, 123, 255, 0.6);
}

.timeline-item[data-seniority="mid"] .timeline-node:hover {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
}

.timeline-item[data-seniority="senior"] .timeline-node:hover {
  box-shadow: 0 0 24px rgba(255, 105, 180, 0.7);
}

/* Active/expanded state for nodes */
.timeline-item.expanded .timeline-node {
  transform: scale(1.4);
  border-width: 4px;
}

/* Pulse animation for senior node */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 105, 180, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 105, 180, 0);
  }
}

.timeline-item[data-seniority="senior"] .timeline-node {
  animation: pulse 2s ease-in-out infinite;
}

.timeline-content {
  position: relative;
}

.timeline-summary {
  margin-top: 12px;
  margin-bottom: 0;
  line-height: 1.6;
}

.timeline-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              margin-top 0.3s ease;
  opacity: 0;
}

.timeline-item.expanded .timeline-details {
  max-height: 500px;
  opacity: 1;
  margin-top: 12px;
}

.timeline-details ul {
  list-style: disc;
  padding-left: 24px;
  margin: 0;
}

.timeline-details ul li {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .resume-title-row {
    flex-direction: column;
    gap: 16px;
  }

  .resume-title-row h1 {
    font-size: 32px;
  }

  .resume-actions {
    width: 100%;
  }

  .resume-actions .btn {
    flex: 1;
  }

  .resume-contact {
    flex-direction: column;
    gap: 8px;
  }

  .resume-entry-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .resume-highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skill-badge {
    font-size: 13px;
    padding: 7px 12px;
  }

  .skill-badge svg {
    width: 12px;
    height: 12px;
  }

  .career-timeline {
    padding-left: 32px;
  }

  .timeline-node {
    left: -28px;
  }

  .timeline-line {
    left: 10px;
  }
}

/* ==========================================================================
   Contact Page
   ========================================================================== */

.contact-header {
  max-width: 800px;
  margin-bottom: 64px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
}

.contact-main {
  max-width: 640px;
}

/* Contact Form */
.contact-form {
  margin-top: 0;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-accent);
  box-shadow: 0 0 0 3px rgba(var(--secondary-accent-rgb), 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn.primary {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* Contact Sidebar */
.contact-sidebar {
  position: sticky;
  top: 100px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* Contact Links */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-link:hover {
  transform: translateX(4px);
  border-color: var(--secondary-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-link svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.contact-link:hover svg {
  opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr 280px;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-sidebar {
    position: static;
    padding: 24px;
  }
}

/* ===================================
   About Page
   =================================== */

/* About Hero Section */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 48px;
}

.about-headshot {
  display: flex;
  justify-content: center;
  align-items: center;
}

.headshot-placeholder {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--secondary-accent-rgb), 0.15), rgba(var(--primary-accent-rgb), 0.1));
  border: 2px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}

.about-headshot svg {
  width: 80px;
  height: 80px;
  opacity: 0.6;
}

.about-intro h1 {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-accent), var(--tertiary-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Narrative Content Styling */
.narrative-content {
  margin: 0 auto 48px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(var(--surface-2), 0.5), rgba(var(--surface), 0.3));
  border-left: 3px solid var(--secondary-accent);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.narrative-content:hover {
  border-left-color: var(--primary-accent);
  background: linear-gradient(135deg, rgba(var(--surface-2), 0.7), rgba(var(--surface), 0.5));
}

.narrative-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin: 0 0 16px 0;
}

.narrative-content p:last-child {
  margin-bottom: 0;
}

.narrative-content strong {
  color: var(--primary-accent);
  font-weight: 600;
}

/* About Section Headings */
.about-section-heading {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  margin: 18px 0 32px 0;
  color: var(--text);
  position: relative;
  padding-bottom: 16px;
  max-width: 65ch;
  margin-right: auto;
}

.about-section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--secondary-accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.about-section-heading:hover::after {
  width: 100px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .about-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: flex-start;
  }

  .headshot-placeholder {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }

  .narrative-content {
    max-width: 100%;
    padding: 24px;
    margin-bottom: 32px;
  }

  .about-section-heading {
    margin: 48px 0 24px 0;
  }
}
