/* ============================================================
   CUSTOM PROPERTIES
============================================================ */
:root {
  /* Colors */
  --color-bg:           #F4F6F9; /* Cool blue-grey white */
  --color-text:         #1C2B3A; /* Deep navy-slate */
  --color-accent-blue:  #2C5F8A; /* Links, CTAs */
  --color-accent-green: #3B7A6E; /* Teal */
  --color-border:       rgba(28, 43, 58, 0.13);
  --color-panel:        #D8E8F5; /* Light steel blue — panels, contact, highlights */

  /* Typography */
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, sans-serif;

  --fw-light:    300;
  --fw-regular:  400;

  /* Spacing scale */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   5rem;

  /* Layout */
  --max-width:  1120px;
  --nav-height: 60px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  line-height: 1.7;
  min-height: 100vh;
  /* Grain texture — SVG noise at ~8% opacity */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
}

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

a {
  color: var(--color-accent-blue);
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}

a:hover {
  opacity: 0.7;
}

ul {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 2rem); }
h4 { font-size: 1.1rem; }

p {
  max-width: 68ch;
}

/* ============================================================
   LAYOUT UTILITIES
============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* Hairline rule between sections */
.section + .section {
  border-top: 1px solid var(--color-border);
}

.section {
  padding-block: var(--space-xl);
}

/* ============================================================
   NAVIGATION
============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  /* Base: opaque brand background */
  background-color: var(--color-bg);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s var(--ease),
    border-color     0.3s var(--ease),
    backdrop-filter  0.3s var(--ease);
}

/* Frosted state — triggered by JS on scroll past 48px */
.site-nav.is-scrolled {
  background-color: rgba(244, 246, 249, 0.90); /* #F4F6F9 at 90% */
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom-color: var(--color-border);
}

.site-nav nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.nav-wordmark {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
  white-space: nowrap;
  line-height: 1;
  transition: text-shadow 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-wordmark:hover {
  opacity: 1;
  text-shadow: 0 0 18px rgba(47, 54, 64, 0.22), 0 2px 10px rgba(47, 54, 64, 0.12);
}

/* Desktop links */
.nav-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.8rem;
  color: var(--color-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--color-accent-blue);
  opacity: 1;
}

/* Active state — set by IntersectionObserver */
.nav-links a.is-active {
  color: var(--color-accent-blue);
  border-bottom-color: var(--color-accent-blue);
  opacity: 1;
}

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  /* Visual size 28px but tap area is 44px minimum */
  width: 44px;
  height: 44px;
  margin-right: -8px; /* compensate so spans stay optically right-aligned */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 8px;
  z-index: 101; /* above overlay */
}

.nav-toggle span {
  display: block;
  height: 1px;
  width: 100%;
  background-color: var(--color-text);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease), width 0.2s var(--ease);
  transform-origin: center;
}

/* X state when expanded */
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Dark mode / theme toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: none;
  cursor: pointer;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
  flex-shrink: 0;
  margin-left: var(--space-md);
  margin-right: 4px;
}

.theme-toggle:hover {
  background-color: var(--color-panel);
  border-color: var(--color-accent-blue);
}

/* Show sun in dark mode, moon in light mode */
.theme-toggle-icon--sun  { display: none; }
.theme-toggle-icon--moon { display: inline; }

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

/* Prevent body scroll when overlay is open */
body.nav-open {
  overflow: hidden;
}

/* ── Full-screen mobile overlay ── */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background-color: var(--color-bg);
  background-image: inherit; /* carry grain texture */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Hidden state */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-overlay-close {
  position: absolute;
  top: calc(var(--nav-height) / 2);
  right: var(--space-md);
  transform: translateY(-50%);
  /* 44px tap target */
  width: 44px;
  height: 44px;
  margin-right: -8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nav-overlay-close span {
  display: block;
  position: absolute;
  height: 1px;
  width: 22px;
  background-color: var(--color-text);
}

.nav-overlay-close span:nth-child(1) { transform: rotate(45deg); }
.nav-overlay-close span:nth-child(2) { transform: rotate(-45deg); }

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

.nav-overlay-links a {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: clamp(2rem, 8vw, 3rem);
  color: var(--color-text);
  letter-spacing: 0.02em;
  text-decoration: none;
  line-height: 1;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
  /* Stagger in when overlay opens */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), color 0.2s var(--ease);
}

.nav-overlay.is-open .nav-overlay-links a {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger each link slightly */
.nav-overlay.is-open .nav-overlay-links li:nth-child(1) a { transition-delay: 0.05s; }
.nav-overlay.is-open .nav-overlay-links li:nth-child(2) a { transition-delay: 0.1s; }
.nav-overlay.is-open .nav-overlay-links li:nth-child(3) a { transition-delay: 0.15s; }
.nav-overlay.is-open .nav-overlay-links li:nth-child(4) a { transition-delay: 0.2s; }
.nav-overlay.is-open .nav-overlay-links li:nth-child(5) a { transition-delay: 0.25s; }

.nav-overlay-links a:hover,
.nav-overlay-links a.is-active {
  color: var(--color-accent-blue);
  opacity: 1;
}

/* ============================================================
   SECTION VARIANTS
============================================================ */

/* Hero — full-viewport with blurred video background */
.section--hero {
  position: relative;
  padding-top: calc(var(--nav-height) + var(--space-md));
  padding-bottom: var(--space-lg);
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

/* Proof bar — compact */
.section--proof-bar {
  padding-block: var(--space-lg);
}

/* ============================================================
   TAGS (used in skills / case studies)
============================================================ */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: var(--fw-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-green);
  border: 1px solid var(--color-accent-green);
  padding: 0.25em 0.7em;
  border-radius: 2px;
  cursor: default;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.tag:hover {
  background-color: #2D5E55; /* deepened teal */
  border-color: #2D5E55;
  color: #FFFFFF;
}

/* ============================================================
   CONTACT SECTION
============================================================ */
.section--contact {
  background-color: var(--color-accent-blue);
  border-top: none;
  border-bottom: none;
  padding-top: var(--space-lg);
}

/* ── Contact section: light text on dark blue ── */
.section--contact .contact-headline {
  color: #F4F6F9;
}

.section--contact .contact-intro {
  color: #F4F6F9;
  opacity: 0.75;
}

.section--contact .contact-details {
  border-top-color: rgba(244, 246, 249, 0.2);
}

.section--contact .contact-detail-label {
  color: #F4F6F9;
  opacity: 0.5;
}

.section--contact .contact-detail-value {
  color: #F4F6F9;
}

.section--contact a.contact-detail-value:hover {
  color: #F4F6F9;
  opacity: 0.65;
}

.section--contact .contact-resume-link {
  color: #F4F6F9;
  border-bottom-color: rgba(244, 246, 249, 0.55);
}

.section--contact .contact-resume-link:hover {
  opacity: 0.65;
}

.section--contact .form-label {
  color: #F4F6F9;
  opacity: 0.6;
}

.section--contact .form-input {
  color: #F4F6F9;
  border-bottom-color: rgba(244, 246, 249, 0.25);
}

.section--contact .form-input:focus {
  border-bottom-color: rgba(244, 246, 249, 0.85);
}

.section--contact .form-input::placeholder {
  color: #F4F6F9;
  opacity: 0.25;
}

/* Submit button: white-filled on dark blue bg */
.section--contact .btn--primary {
  background-color: #F4F6F9;
  color: var(--color-accent-blue);
  border-color: #F4F6F9;
}

.section--contact .btn--primary:hover {
  background-color: transparent;
  color: #F4F6F9;
  border-color: #F4F6F9;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* ── Info column ── */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-headline {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  color: var(--color-text);
}

.contact-intro {
  font-size: 0.925rem;
  line-height: 1.8;
  color: var(--color-text);
  opacity: 0.7;
  max-width: 38ch;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
}

.contact-detail {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-sm);
  align-items: baseline;
  font-size: 0.875rem;
}

.contact-detail-label {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.45;
}

.contact-detail-value {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.2s var(--ease);
}

a.contact-detail-value:hover {
  color: var(--color-accent-blue);
  opacity: 1;
}

.contact-resume-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  border-bottom: 1px solid var(--color-accent-blue);
  padding-bottom: 0.1em;
  width: fit-content;
  transition: opacity 0.2s var(--ease);
}

.contact-resume-link:hover {
  opacity: 0.6;
}

/* ── Form ── */
.contact-form-wrap {
  padding-top: calc(var(--space-md) + 1.2rem); /* optical alignment with headline */
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.form-label {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.55;
}

/* Bottom-border-only inputs — editorial, not SaaS */
.form-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  padding: 0.55em 0;
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  /* 1rem = 16px — prevents iOS Safari auto-zoom on focus */
  font-size: 1rem;
  color: var(--color-text);
  appearance: none;
  outline: none;
  transition: border-color 0.2s var(--ease);
}

.form-input:focus {
  border-bottom-color: var(--color-accent-blue);
}

.form-input::placeholder {
  color: var(--color-text);
  opacity: 0.25;
}

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

.btn--form {
  align-self: flex-start;
  margin-top: var(--space-xs);
}

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-md);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-dateline,
.footer-credit {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--color-text);
  opacity: 0.45;
  max-width: none;
}

/* ============================================================
   HERO SECTION
============================================================ */

/* ── Video background ── */
.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Blurred but visible — overlay handles the softening, not brightness */
  filter: blur(12px) brightness(0.55) saturate(0.75);
  transform: scale(1.06); /* prevent blur-edge fringing */
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  /* Lighter overlay so the blurred reel reads through */
  background: linear-gradient(
    160deg,
    rgba(244, 246, 249, 0.78) 0%,
    rgba(244, 246, 249, 0.68) 55%,
    rgba(244, 246, 249, 0.76) 100%
  );
}

/* ── Stacked content column ── */
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  width: 100%;
}

/* ── Identity row: avatar + name ── */
.hero-identity {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.hero-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-accent-blue);
  outline: 1px solid rgba(44, 95, 138, 0.22);
  outline-offset: 3px;
  flex-shrink: 0;
  transition: outline-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.hero-avatar:hover {
  outline-color: rgba(44, 95, 138, 0.55);
  box-shadow: 0 4px 20px rgba(44, 95, 138, 0.18);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Zoom into face/neck — pulls image up so head fills the circle */
  object-position: 50% 12%;
  transform: scale(1.25);
  transform-origin: 50% 15%;
  filter: saturate(0.88) contrast(1.04);
  transition: transform 0.4s var(--ease);
}

.hero-avatar:hover img {
  transform: scale(1.38);
}

.hero-identity-text {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  max-width: none;
}

.hero-h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero-role-line {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.85rem;
  color: var(--color-text);
  opacity: 0.6;
  max-width: none;
}

/* ── About block ── */
.hero-about {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 700px;
}

.hero-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text);
  opacity: 0.85;
  max-width: 64ch;
}

/* ── Stats row ── */
.hero-stats {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-accent-blue);
  background-color: transparent;
  flex-wrap: wrap;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding: var(--space-sm) var(--space-md);
  flex: 1;
  min-width: 130px;
  transition: background-color 0.2s var(--ease);
  cursor: default;
}

.hero-stat-item:hover {
  background-color: var(--color-accent-blue);
}

.hero-stat-divider {
  width: 1px;
  background-color: rgba(44, 95, 138, 0.3);
  flex-shrink: 0;
  align-self: stretch;
}

.hero-stat-num {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
  color: var(--color-accent-blue);
  letter-spacing: -0.02em;
  transition: color 0.2s var(--ease);
}

.hero-stat-desc {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--color-text);
  opacity: 0.65;
  max-width: none;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.hero-stat-item:hover .hero-stat-num,
.hero-stat-item:hover .hero-stat-desc {
  color: #FFFFFF;
  opacity: 1;
}

/* CTA row */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  /* min 44px height for touch targets */
  min-height: 44px;
  padding: 0.7em 1.75em;
  border: 1px solid currentColor;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease);
  cursor: pointer;
}

.btn--primary {
  background-color: var(--color-accent-blue);
  color: var(--color-bg);
  border-color: var(--color-accent-blue);
}

.btn--primary:hover {
  background-color: transparent;
  color: var(--color-accent-blue);
  opacity: 1;
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}

.btn--secondary:hover {
  background-color: var(--color-text);
  color: var(--color-bg);
  opacity: 1;
}

/* ── Referrals carousel ── */
.hero-referrals {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.hero-referrals-eyebrow {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  opacity: 0.75;
  max-width: none;
}

.referral-track-wrap {
  width: 100%;
  overflow: clip;
}

.referral-track {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-block: var(--space-xs) var(--space-md);
  scrollbar-width: none;
}

.referral-track::-webkit-scrollbar {
  display: none;
}

.referral-card {
  scroll-snap-align: start;
  flex: 0 0 clamp(280px, 38vw, 400px);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  background-color: transparent;
  border: 1px solid var(--color-accent-blue);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
  cursor: pointer;
}

.referral-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
}

.referral-expand-hint {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--color-accent-blue);
  opacity: 0.7;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s var(--ease);
}

.referral-card:hover .referral-expand-hint {
  opacity: 1;
  color: #ffffff;
}

.referral-card:hover {
  background-color: var(--color-accent-blue);
  border-color: var(--color-accent-blue);
}

.referral-quote {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-text);
  font-style: italic;
  flex: 1;
  transition: color 0.2s var(--ease);
}

.referral-author {
  display: flex;
  align-items: center;
  gap: 0.65em;
  transition: border-color 0.2s var(--ease);
}

/* Top border on the footer row (contains both author + expand hint) */
.referral-footer {
  border-top: 1px solid rgba(44, 95, 138, 0.3);
  padding-top: 0.65rem;
  margin-top: auto;
}

.referral-card:hover .referral-quote,
.referral-card:hover .referral-name,
.referral-card:hover .referral-title {
  color: #FFFFFF;
}

.referral-card:hover .referral-footer {
  border-top-color: rgba(255, 255, 255, 0.25);
}

.referral-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: var(--fw-regular);
  letter-spacing: 0.04em;
  color: #FFFFFF;
}

/* Color-coded by company */
.referral-avatar--rg { background-color: #4D7358; } /* Salucro — green */
.referral-avatar--ba { background-color: #C07040; } /* ArcSite — amber */
.referral-avatar--cv { background-color: #2C5F8A; } /* Salucro — blue */
.referral-avatar--ml { background-color: #2A7A6A; } /* Ancera — teal */

.referral-name {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 0.82rem;
  color: var(--color-text);
  max-width: none;
  transition: color 0.2s var(--ease);
}

.referral-title {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.7rem;
  color: var(--color-text);
  opacity: 0.65;
  letter-spacing: 0.02em;
  max-width: none;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.referral-card:hover .referral-title {
  opacity: 0.75;
}

/* ============================================================
   PROOF BAR SECTION
============================================================ */
.section--proof-bar {
  padding-block: var(--space-sm);
  background-color: var(--color-accent-blue);
  border-top: none;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.section--proof-bar + .section {
  border-top: 1px solid var(--color-border);
}

.proof-bar-label {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 246, 249, 0.6);
  max-width: none;
  text-align: center;
  padding-inline: var(--space-md);
}

/* ── Logo list ── */
.proof-bar-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  padding-inline: var(--space-md);
  padding-bottom: var(--space-xs);
}

.proof-logo-link {
  display: flex;
  align-items: center;
  opacity: 0.65;
  cursor: pointer;
  transition: opacity 0.2s var(--ease);
}

.proof-logo-link:hover {
  opacity: 1;
}

.proof-logo {
  display: block;
  height: 26px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* ============================================================
   SECTION HEADER (shared across case studies, expertise, etc.)
============================================================ */
.section-header {
  margin-bottom: var(--space-lg);
  max-width: 56ch;
}

/* Tighter header in skills section */
.section--expertise .section-header {
  margin-bottom: var(--space-sm);
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  max-width: none;
  margin-bottom: var(--space-xs);
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-intro {
  font-size: 1rem;
  opacity: 0.75;
}

/* ============================================================
   CASE STUDIES SECTION
============================================================ */
.section--case-studies {
  border-top: 1px solid var(--color-border);
}

.case-study {
  border-left: 2px solid var(--color-accent-blue);
  padding-left: var(--space-md);
  margin-bottom: var(--space-xl);
}

.case-study:last-of-type {
  margin-bottom: 0;
}

/* Client / theme meta row */
.cs-meta {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: var(--space-sm);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cs-client {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  color: var(--color-accent-blue);
}

.cs-divider {
  color: var(--color-text);
  opacity: 0.3;
}

.cs-theme {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  color: var(--color-text);
  opacity: 0.55;
}

/* Case study headline */
.cs-headline {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.15;
  margin-bottom: var(--space-md);
  max-width: none;
}

/* STAR narrative blocks */
.cs-narrative {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.cs-block {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0 var(--space-md);
  align-items: baseline;
}

.cs-star-label {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  opacity: 1;
  padding-top: 0.3em;
  max-width: none;
}

.cs-block p:last-child {
  font-size: 0.975rem;
  line-height: 1.8;
  color: var(--color-text);
}

/* Results stat block */
.cs-results {
  background-color: transparent;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
}

.cs-results-label {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  opacity: 1;
  margin-bottom: var(--space-md);
  max-width: none;
}

.cs-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.cs-stat {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  padding: var(--space-sm);
  background-color: rgba(28, 43, 58, 0.04);
  border: 1px solid var(--color-border);
  cursor: default;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cs-stat:hover {
  background-color: var(--color-accent-blue);
  border-color: var(--color-accent-blue);
}

.cs-stat:hover .cs-stat-number,
.cs-stat:hover .cs-stat-award,
.cs-stat:hover .cs-stat-desc {
  color: #ffffff;
  opacity: 1;
}

.cs-stat-number {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--color-text);
  letter-spacing: -0.02em;
  transition: color 0.2s var(--ease);
}

.cs-stat-plus {
  font-size: 0.6em;
  vertical-align: super;
}

.cs-stat-award {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.2;
  font-style: italic;
  color: var(--color-text);
  transition: color 0.2s var(--ease);
}

.cs-stat-desc {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text);
  opacity: 0.6;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}

/* Role label in meta row */
.cs-role {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-text);
  opacity: 0.45;
  text-transform: none;
}

/* Qualitative results variant — 3 columns, award-style labels */
.cs-stats--qual {
  grid-template-columns: repeat(3, 1fr);
}

.cs-stats--qual .cs-stat-award {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  font-style: normal;
  color: var(--color-text);
}

/* ============================================================
   ARTIFACT GALLERY SECTION
============================================================ */
.section--artifact-gallery {
  border-top: 1px solid var(--color-border);
  padding-bottom: var(--space-xl);
}

.gallery-header {
  margin-bottom: var(--space-md);
}

.gallery-scroll-hint {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.35;
  padding-left: calc((100% - var(--max-width)) / 2 + var(--space-md));
  margin-bottom: var(--space-sm);
  transition: opacity 0.4s var(--ease);
}

.gallery-scroll-hint.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Track ── */
.gallery-track-wrap {
  width: 100%;
  position: relative;
  /* clip rather than hidden — clip doesn't create a scroll container,
     so it can't trap or block the child's overflow-x scroll on iOS */
  overflow: clip;
}

/* ── Gallery scroll arrows ── */
.gallery-arrow {
  position: absolute;
  top: 0;
  bottom: var(--space-md);
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-text);
  cursor: pointer;
  z-index: 2;
  padding: 0;
  transition: opacity 0.18s var(--ease);
  opacity: 0.9;
}

.gallery-arrow--prev {
  left: 0;
  background: linear-gradient(to right, var(--color-bg) 45%, transparent);
}

.gallery-arrow--next {
  right: 0;
  background: linear-gradient(to left, var(--color-bg) 45%, transparent);
}

.gallery-arrow.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.gallery-arrow:not(.is-hidden):hover {
  opacity: 1;
  color: var(--color-accent-blue);
}

.gallery-track {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* Stop the page from scrolling when the user hits the track's edge */
  overscroll-behavior-x: contain;
  /* Indent first card to align with .container content.
     max() ensures padding never goes negative on viewports narrower than --max-width */
  padding-inline: max(var(--space-md), calc((100% - var(--max-width)) / 2 + var(--space-md)));
  padding-block: var(--space-sm) var(--space-md);
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

/* ── Cards ── */
.gallery-card {
  scroll-snap-align: start;
  flex: 0 0 300px;
  background-color: #EDF1F7;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.gallery-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--color-text);
  text-decoration: none;
}

.gallery-card-link:hover .gallery-cta {
  color: var(--color-accent-blue);
  opacity: 1;
}

.gallery-card-link:hover .gallery-thumb img {
  transform: scale(1.02);
}

/* ── Thumbnail ── */
.gallery-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: rgba(47, 54, 64, 0.07);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease);
  filter: saturate(0.9);
}

/* ── Media icon overlays on video, webinar, and podcast cards ── */
.gallery-card[data-type="video"] .gallery-thumb::after,
.gallery-card[data-type="webinar"] .gallery-thumb::after,
.gallery-card[data-type="podcast"] .gallery-thumb::after {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  line-height: 72px;
  text-align: center;
  text-indent: 5px; /* optical center for ▶ */
  pointer-events: none;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.gallery-card[data-type="video"] .gallery-card-link:hover .gallery-thumb::after,
.gallery-card[data-type="webinar"] .gallery-card-link:hover .gallery-thumb::after,
.gallery-card[data-type="podcast"] .gallery-card-link:hover .gallery-thumb::after {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.85);
}

/* Podcast cards: audio note icon instead of play triangle */
.gallery-card[data-type="podcast"] .gallery-thumb::after {
  content: '♫';
  font-size: 1.6rem;
  text-indent: 0;
}

/* ── Category color tokens ── */
:root {
  --cat-report:        #3C6E50; /* forest green */
  --cat-article:       #3F62A8; /* cobalt blue */
  --cat-sales:         #7848A8; /* violet */
  --cat-press-release: #1A7E9E; /* cyan-teal — distinct from accent blue */
  --cat-webinar:       #2E8A6A; /* teal-green */
  --cat-video:         #A83040; /* crimson — clearly distinct from article */
  --cat-podcast:       #8A3A5C; /* wine rose */
  --cat-social:        #B85E18; /* burnt orange */
  --cat-landing:       #5E6B3C; /* olive — distinct from webinar */
  --cat-earned:        #7A5628; /* amber-brown — earned/trade media */
}

/* Category badges */
.gallery-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25em 0.6em;
  color: #FFFFFF;
}

.gallery-badge--report        { background-color: var(--cat-report); }
.gallery-badge--article       { background-color: var(--cat-article); }
.gallery-badge--sales         { background-color: var(--cat-sales); }
.gallery-badge--press-release { background-color: var(--cat-press-release); }
.gallery-badge--webinar       { background-color: var(--cat-webinar); }
.gallery-badge--video         { background-color: var(--cat-video); }
.gallery-badge--podcast       { background-color: var(--cat-podcast); }
.gallery-badge--social        { background-color: var(--cat-social); }
.gallery-badge--landing       { background-color: var(--cat-landing); }
.gallery-badge--earned        { background-color: var(--cat-earned); }

/* ── Filter buttons ── */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.gallery-filter {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.42em 1.05em;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--color-text);
  opacity: 0.4;
  border-radius: 2px;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
              border-color 0.15s var(--ease), opacity 0.15s var(--ease);
}

.gallery-filter:hover {
  opacity: 0.75;
  border-color: currentColor;
}

/* "All" active state */
.gallery-filter.is-active {
  opacity: 1;
  background-color: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

/* Category-specific active states */
.gallery-filter--report.is-active        { background-color: var(--cat-report);        border-color: var(--cat-report);        color: #FFFFFF; }
.gallery-filter--article.is-active       { background-color: var(--cat-article);       border-color: var(--cat-article);       color: #FFFFFF; }
.gallery-filter--sales.is-active         { background-color: var(--cat-sales);         border-color: var(--cat-sales);         color: #FFFFFF; }
.gallery-filter--press-release.is-active { background-color: var(--cat-press-release); border-color: var(--cat-press-release); color: #FFFFFF; }
.gallery-filter--webinar.is-active       { background-color: var(--cat-webinar);       border-color: var(--cat-webinar);       color: #FFFFFF; }
.gallery-filter--video.is-active         { background-color: var(--cat-video);         border-color: var(--cat-video);         color: #FFFFFF; }
.gallery-filter--podcast.is-active       { background-color: var(--cat-podcast);       border-color: var(--cat-podcast);       color: #FFFFFF; }
.gallery-filter--social.is-active        { background-color: var(--cat-social);        border-color: var(--cat-social);        color: #FFFFFF; }
.gallery-filter--landing.is-active       { background-color: var(--cat-landing);       border-color: var(--cat-landing);       color: #FFFFFF; }
.gallery-filter--earned.is-active        { background-color: var(--cat-earned);        border-color: var(--cat-earned);        color: #FFFFFF; }

/* ── Card body ── */
.gallery-body {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  padding: var(--space-sm);
  flex: 1;
  border-top: 1px solid var(--color-border);
}

.gallery-client {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  opacity: 0.8;
  max-width: none;
}

.gallery-title {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--color-text);
}

.gallery-desc {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--color-text);
  opacity: 0.65;
  flex: 1;
  max-width: none;
}

.gallery-cta {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.45;
  margin-top: var(--space-xs);
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}

/* ============================================================
   SKILLS / EXPERTISE SECTION
============================================================ */
.section--expertise {
  border-top: 1px solid var(--color-border);
  padding-bottom: var(--space-xl);
}

/* ── 6-group uniform grid ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px; /* hairline gaps via gap + bg color trick */
  background-color: var(--color-border);
  border: 1px solid var(--color-border);
  margin-top: var(--space-md);
}

.skill-group {
  background-color: var(--color-bg);
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-group-header {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.skill-group-num {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--color-accent-blue);
  opacity: 0.55;
  flex-shrink: 0;
}

.skill-group-title {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
}

/* Waterfall band removed */

.waterfall-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.waterfall-text {
  border-left: 2px solid var(--color-accent-blue);
  padding-left: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.waterfall-headline {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
  color: var(--color-text);
}

.waterfall-body {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--color-text);
  opacity: 0.8;
  max-width: 48ch;
}

/* ── Cascade list ── */
.waterfall-cascade {
  list-style: none;
  display: flex;
  flex-direction: column;
  counter-reset: cascade;
  padding-top: 0.25rem; /* optical alignment with waterfall-text */
}

.waterfall-cascade li {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  position: relative;
  padding: 0.6em 0 0.6em 1.5rem;
}

/* Vertical connector line */
.waterfall-cascade li::before {
  content: '';
  position: absolute;
  left: 0.35rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: var(--color-border);
}

.waterfall-cascade li:last-child::before {
  bottom: 50%;
}

/* Node dot */
.waterfall-cascade li::after {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: calc(0.6em + 0.55em); /* center on text */
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-accent-blue);
  opacity: 0.5;
}

.cascade-node {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 0.85rem;
  color: var(--color-text);
}

.cascade-node--anchor {
  font-weight: var(--fw-regular);
  color: var(--color-accent-blue);
}

.cascade-label {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.72rem;
  color: var(--color-text);
  opacity: 0.5;
  line-height: 1.4;
}

/* Scroll reveal removed — page loads fully visible */

/* ============================================================
   RESPONSIVE — TABLET  (max 900px)
============================================================ */
@media (max-width: 900px) {
  :root {
    --space-xl: 3.5rem;
    --space-lg: 2.5rem;
  }

  .section--hero {
    min-height: auto;
    padding-top: var(--space-xl);
  }

  /* Contact: stack on tablet */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .contact-form-wrap {
    padding-top: 0;
  }

  /* Skills: 3-col → 2-col on tablet */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Waterfall: stack on tablet */
  .waterfall-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Case study: 4-col stats → 2-col on tablet */
  .cs-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-stats--qual {
    grid-template-columns: 1fr;
  }

  /* Hero stats: allow 2×2 wrap on narrow tablet */
  .hero-about {
    max-width: 100%;
  }
}

/* ============================================================
   RESPONSIVE — TABLET NAV  (max 768px)
   Show hamburger earlier so nav links don't crowd at mid-widths
============================================================ */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none; /* overlay handles nav at this width */
  }
}

/* ============================================================
   RESPONSIVE — MOBILE  (max 640px)
============================================================ */
@media (max-width: 640px) {
  :root {
    --space-xl: 2.5rem;
    --space-lg: 1.75rem;
    --space-md: 1.25rem;
  }

  /* Hero: compact identity row on mobile */
  .hero-identity {
    gap: var(--space-sm);
  }

  .hero-avatar {
    width: 96px;
    height: 96px;
  }

  /* Stats: 2×2 grid on mobile */
  .hero-stat-divider:nth-child(4),
  .hero-stat-divider:nth-child(6) {
    display: none;
  }

  .hero-stat-item {
    flex: 0 0 calc(50% - 1px);
  }

  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Referral cards: nearly full width on mobile */
  .referral-card {
    flex: 0 0 min(360px, 88vw);
  }

  /* Skills: 2-col → single column on mobile */
  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* Bump body copy to 16px on mobile */
  .cs-block p:last-child,
  .waterfall-body,
  .contact-intro {
    font-size: 1rem;
  }

  /* cs-meta: allow role text to wrap on narrow screens */
  .cs-meta {
    flex-wrap: wrap;
    row-gap: 0.25em;
  }

  /* Gallery: keep horizontal scroll on mobile — cards sized to show edge of next */
  .gallery-track {
    gap: var(--space-sm);
    padding-inline: var(--space-md);
  }

  .gallery-card {
    flex: 0 0 min(260px, 80vw);
  }

  /* Case study: collapse STAR label above copy on mobile */
  .cs-block {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  /* Stats → 2-column on mobile */
  .cs-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-detail {
    grid-template-columns: 70px 1fr;
  }

  /* Contact detail value — ensure tap-able email/LinkedIn links are tall enough */
  a.contact-detail-value {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.25em;
  }

  p {
    max-width: 100%;
  }
}

/* ============================================================
   CASE STUDY FEATURED FRAME
============================================================ */

/* Float frame right so narrative text wraps to its left */
/* ── Case study two-column header (headline + carousel) ── */
.cs-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: start;
  margin-bottom: var(--space-md);
}

.cs-header-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-right: var(--space-sm);
}

.cs-header-text .cs-headline {
  margin-bottom: 0;
}

.cs-header-carousel {
  position: relative;
}

/* ── CS image carousel ── */
.cs-carousel {
  position: relative;
  border: 1px solid var(--color-border);
  outline: 1px solid var(--color-accent-blue);
  outline-offset: -4px;
  overflow: hidden;
  background: var(--color-panel);
}

.cs-carousel-track {
  display: flex;
  transition: transform 0.42s var(--ease);
  will-change: transform;
}

.cs-carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.cs-carousel-slide img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top;
  filter: saturate(0.88) contrast(1.03);
}

/* Navigation bar below image */
.cs-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem var(--space-sm);
  background: rgba(28, 43, 58, 0.04);
  border-top: 1px solid var(--color-border);
}

.cs-carousel-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--color-accent-blue);
  cursor: pointer;
  padding: 0.2em 0.5em;
  opacity: 0.7;
  transition: opacity 0.2s var(--ease);
  pointer-events: auto;
}

.cs-carousel-btn:hover { opacity: 1; }

.cs-carousel-dots {
  display: flex;
  gap: 0.4em;
  align-items: center;
}

.cs-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--color-accent-blue);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s var(--ease);
  pointer-events: auto;
}

.cs-carousel-dot.is-active {
  background-color: var(--color-accent-blue);
}

/* ── CS company badge: "Case Study" label + logo, at top of text column ── */
.cs-company-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  background-color: #1C2B3A;
  border-radius: 6px;
  padding: 0.45em 1em;
  align-self: flex-start;
}

.cs-company-label {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 246, 249, 0.85);
  white-space: nowrap;
}

.cs-company-badge .cs-featured-logo {
  height: 18px;
  width: auto;
  max-width: 100px;
  filter: none;
  opacity: 0.9;
  background: none;
  padding: 0;
  border-radius: 0;
}

[data-theme="dark"] .cs-company-badge {
  background-color: #243444;
}

/* Sub-headline — descriptive paragraph below the headline */
.cs-subheadline {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--color-text);
  opacity: 0.72;
  max-width: none;
}

.cs-featured-logo {
  display: block;
  height: 22px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.65;
}

@media (max-width: 900px) {
  .cs-header {
    grid-template-columns: 1fr;
  }
  .cs-carousel-slide img {
    height: 200px;
  }
}

/* ============================================================
   CONTENT PREVIEW CARDS (case studies work samples)
============================================================ */
.cs-content-previews {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.cs-content-label {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  opacity: 0.8;
  margin-bottom: var(--space-md);
  max-width: none;
}

.cs-content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.cs-content-card {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  flex: 0 0 175px;
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  background-color: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  color: var(--color-text);
  transition:
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

/* Reset button element to match <a> card appearance */
button.cs-content-card {
  cursor: pointer;
  font: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.cs-content-card:hover {
  border-color: var(--color-accent-blue);
  background-color: rgba(44, 95, 138, 0.05);
  opacity: 1;
}

.cs-content-card--placeholder {
  opacity: 0.5;
  pointer-events: none;
}

/* Thumbnail image at top of cs-content-card */
.cs-content-thumb {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 2px;
  margin-bottom: 0.2em;
}

/* Short description line inside cs-content-card */
.cs-content-desc {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: var(--fw-light);
  line-height: 1.45;
  color: var(--color-text);
  opacity: 0.68;
  flex: 1;
}

.cs-content-type {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: var(--fw-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2em 0.55em;
  color: #FFFFFF;
  border-radius: 2px;
  width: fit-content;
}

.cs-content-type--report        { background-color: var(--cat-report); }
.cs-content-type--article       { background-color: var(--cat-article); }
.cs-content-type--sales         { background-color: var(--cat-sales); }
.cs-content-type--press-release { background-color: var(--cat-press-release); }
.cs-content-type--webinar       { background-color: var(--cat-webinar); }
.cs-content-type--video         { background-color: var(--cat-video); }
.cs-content-type--podcast       { background-color: var(--cat-podcast); }

.cs-content-title {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--color-text);
  flex: 1;
}

.cs-content-cta {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  opacity: 0.7;
}

/* ── CS Work Gallery Rows ──────────────────────────────────── */
.cs-work-row { margin: 0; }
.cs-work-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}
.cs-work-row-header .cs-content-label { margin: 0; }
.cs-content-previews .gallery-track-wrap { overflow: hidden; }

/* ── Skill Tag Modals ──────────────────────────────────────── */
.skill-tag {
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.skill-tag:hover, .skill-tag:focus-visible {
  background-color: var(--color-accent-blue);
  color: #ffffff;
  border-color: var(--color-accent-blue);
  outline: none;
}
.skill-modal-inner {
  max-width: min(92vw, 480px);
  max-height: none;
  overflow: visible;
}
.skill-modal-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.skill-modal-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: var(--fw-light);
  color: var(--color-text);
}
.skill-modal-level {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: var(--fw-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 2px;
  background-color: var(--color-accent-blue);
  color: #ffffff;
}
.skill-modal-where {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: var(--fw-light);
  color: var(--color-text);
  opacity: 0.65;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.04em;
}
.skill-modal-desc {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: var(--fw-light);
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.85;
}

/* ============================================================
   GALLERY ROWS (3-row portfolio structure)
============================================================ */
.gallery-row {
  margin-bottom: var(--space-lg);
}

.gallery-row:last-child {
  margin-bottom: 0;
}

.gallery-row-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-inline: calc((100% - var(--max-width)) / 2 + var(--space-md));
  margin-bottom: 0.75rem;
}

.gallery-row-label {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
}

.gallery-row-num {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-accent-blue);
  opacity: 0.6;
  flex-shrink: 0;
}

.gallery-row-title {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  line-height: 1.15;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.gallery-row-types {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--color-text);
  opacity: 0.4;
  max-width: none;
}

/* Coming-soon cards */
.gallery-card--soon {
  opacity: 0.55;
}

.gallery-card-placeholder {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--color-text);
}

.gallery-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(47, 54, 64, 0.05);
}

.gallery-soon-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.35;
}

.gallery-cta--dim {
  color: var(--color-text);
  opacity: 0.3;
}

@media (max-width: 640px) {
  .cs-content-grid {
    gap: 0.75rem;
  }

  .cs-content-card {
    flex: 0 0 calc(50% - 0.375rem);
  }

  .gallery-row-header {
    padding-inline: var(--space-md);
  }
}

/* ============================================================
   WATERFALL FLOW (visual redesign)
============================================================ */
.waterfall-flow {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: 0.25rem;
}

/* Pillar asset: accent card */
.cascade-pillar {
  background-color: var(--color-accent-blue);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.cascade-pillar-label {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: 1.1rem;
  color: #FFFFFF;
  letter-spacing: 0.02em;
}

.cascade-pillar-desc {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.72rem;
  color: rgba(244, 246, 249, 0.65);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* Branch items */
.cascade-branches {
  border-left: 1px solid var(--color-border);
  margin-left: var(--space-sm);
  padding-left: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.cascade-branch {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.4em 0;
  border-bottom: 1px solid rgba(47, 54, 64, 0.06);
}

.cascade-branch:last-child {
  border-bottom: none;
}

.cascade-branch-icon {
  font-size: 0.7rem;
  color: var(--color-accent-blue);
  opacity: 0.5;
  flex-shrink: 0;
}

.cascade-branch-name {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.875rem;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

/* ============================================================
   GALLERY MODAL (social series carousel)
============================================================ */

/* Button-as-card-link reset */
button.gallery-card-link {
  width: 100%;
  height: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
}

/* Modal backdrop */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28, 43, 58, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}

.gallery-modal.is-open {
  opacity: 1;
  visibility: visible;
}

/* Modal content box */
.gallery-modal-inner {
  position: relative;
  width: 100%;
  max-width: min(88vw, 560px);
  background-color: var(--color-bg);
  background-image: inherit;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  max-height: 92vh;
  overflow: hidden;
}

/* Close button */
.gallery-modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 10;
}

.gallery-modal-close span {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  height: 1px;
  width: 20px;
  background-color: var(--color-text);
  pointer-events: none;
}

.gallery-modal-close span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.gallery-modal-close span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

/* Modal eyebrow label */
.gallery-modal-eyebrow {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-blue);
  opacity: 0.8;
  max-width: none;
  padding-right: 44px; /* don't overlap close button */
}

/* Carousel wrapper */
.modal-carousel-wrap {
  overflow: clip;
  flex: 1;
  min-height: 0;
}

.modal-carousel {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  max-height: calc(92vh - 8rem);
}

.modal-carousel::-webkit-scrollbar {
  display: none;
}

.modal-carousel li {
  scroll-snap-align: start;
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-carousel img {
  width: 100%;
  height: auto;
  max-height: calc(92vh - 8rem);
  object-fit: contain;
  display: block;
}

/* Swipe hint */
.gallery-modal-hint {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  opacity: 0.35;
  text-align: center;
  max-width: none;
}

/* ── Video modal variant ─────────────────────────────────────── */
.gallery-modal--video .gallery-modal-inner {
  max-width: min(92vw, 840px);
  /* let the iframe dictate height; no fixed max-height clip */
  max-height: none;
  overflow: visible;
}

/* Responsive 16:9 video wrapper */
.modal-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background-color: #000;
}

.modal-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Description text below video */
.modal-video-desc {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text);
  opacity: 0.72;
  margin-top: var(--space-sm);
  max-width: none;
}

/* Error fallback: hide iframe, show thumbnail + YouTube link */
.modal-video-wrap.is-error { background-color: var(--color-panel); }
.modal-video-wrap.is-error iframe { opacity: 0; pointer-events: none; }

.video-error-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md);
}

.video-error-thumb {
  width: 100%;
  max-height: 60%;
  object-fit: cover;
  object-position: center;
  border-radius: 2px;
  opacity: 0.85;
}

.video-error-note {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: var(--fw-light);
  color: #ffffff;
  opacity: 0.72;
  text-align: center;
  max-width: 36ch;
}

.video-error-btn {
  flex-shrink: 0;
}

/* ── Iframe modal variant ──────────────────────────────────────
   Two modes toggled by JS:
   • .is-embedding  → tall iframe fills the modal (Drive PDFs, YouTube)
   • default        → preview card (sites blocking iframe embedding)
   ── */

/* Base: wide modal, auto height, scrollable if needed */
.gallery-modal--iframe .gallery-modal-inner {
  max-width: min(94vw, 1000px);
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Embedding mode: fixed tall height for iframe to fill */
.gallery-modal--iframe.is-embedding .gallery-modal-inner {
  height: 86vh;
  max-height: 86vh;
  overflow: hidden;
}

/* ── Panel A: iframe container (Drive, YouTube) ── */
/* Hidden by default; shown in embedding mode */
.gallery-modal--iframe .modal-iframe-wrap {
  display: none;
}

.gallery-modal--iframe.is-embedding .modal-iframe-wrap {
  display: block;
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background-color: var(--color-panel);
}

.modal-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.modal-iframe-wrap.is-loaded iframe { opacity: 1; }

/* Shimmer pulse behind iframe */
.modal-iframe-loading {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--color-panel) 25%,
    rgba(44, 95, 138, 0.08) 50%,
    var(--color-panel) 75%
  );
  background-size: 200% 100%;
  animation: iframe-shimmer 1.4s ease infinite;
  transition: opacity 0.3s var(--ease);
  z-index: 1;
  pointer-events: none;
}

.modal-iframe-wrap.is-loaded .modal-iframe-loading { opacity: 0; }

@keyframes iframe-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Small "open in new tab" footnote — only shown in embedding mode */
.gallery-modal--iframe .gallery-modal-external-link {
  display: none;
}

.gallery-modal--iframe.is-embedding .gallery-modal-external-link {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: right;
  flex-shrink: 0;
  margin: 0;
}

.gallery-modal-external-link a {
  color: var(--color-accent-blue);
  text-decoration: none;
  opacity: 0.75;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.18s;
}

.gallery-modal-external-link a:hover { opacity: 1; }

/* ── Panel B: preview card (non-embeddable external sites) ── */
/* Hidden in embedding mode; shown by default */
.modal-link-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0 var(--space-md);
}

.gallery-modal--iframe.is-embedding .modal-link-panel {
  display: none;
}

.modal-link-thumb {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  border-radius: 2px;
}

.modal-link-thumb[src=""] {
  display: none; /* hide broken placeholder when no thumb */
}

.modal-link-desc {
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
  opacity: 0.72;
  text-align: center;
  max-width: 560px;
  margin: 0;
}

.modal-link-cta {
  margin-top: var(--space-xs);
}

/* earned media content type badge */
.cs-content-type--earned  { background-color: var(--cat-earned); }
.cs-content-type--social  { background-color: var(--cat-social); }
.cs-content-type--landing { background-color: var(--cat-landing); }

/* ============================================================
   REFERRAL EXPAND MODAL
============================================================ */
.referral-modal-inner {
  max-width: min(90vw, 600px);
  gap: var(--space-md);
}

.referral-modal-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.referral-modal-quote {
  font-family: var(--font-serif);
  font-weight: var(--fw-light);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.75;
  font-style: italic;
  color: var(--color-text);
  max-width: none;
}

.referral-modal-author {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-sm);
  gap: 0.75em;
}

/* ============================================================
   DARK MODE
============================================================ */
[data-theme="dark"] {
  --color-bg:           #0E1820;
  --color-text:         #D6E4F0;
  --color-accent-blue:  #5B9DCC;
  --color-accent-green: #52A898;
  --color-border:       rgba(214, 228, 240, 0.12);
  --color-panel:        #18283A;
}

/* Nav in dark mode */
[data-theme="dark"] .site-nav {
  background-color: var(--color-bg);
}

[data-theme="dark"] .site-nav.is-scrolled {
  background-color: rgba(14, 24, 32, 0.90);
}

/* Gallery cards */
[data-theme="dark"] .gallery-card {
  background-color: #152232;
}

/* Gallery card placeholder (coming-soon cards) */
[data-theme="dark"] .gallery-card-placeholder {
  background-color: #1a2e42;
}

/* CS carousel background */
[data-theme="dark"] .cs-carousel {
  background-color: var(--color-panel);
}

/* CS carousel nav bar */
[data-theme="dark"] .cs-carousel-nav {
  background: rgba(214, 228, 240, 0.04);
}

/* Skills tags */
[data-theme="dark"] .tag {
  background-color: #18283A;
  border-color: rgba(214, 228, 240, 0.14);
  color: var(--color-text);
}

[data-theme="dark"] .tag:hover {
  background-color: var(--color-accent-blue);
  color: #0E1820;
}

/* Proof bar — dark mode: neutral dark strip, logos stay legible */
[data-theme="dark"] .section--proof-bar {
  background-color: #111C27;
}

[data-theme="dark"] .proof-logo {
  filter: brightness(0) invert(1);
  opacity: 0.75;
}

/* Hero overlay gradient (adjust for dark bg) */
[data-theme="dark"] .hero-video-overlay {
  background: linear-gradient(
    160deg,
    rgba(14, 24, 32, 0.82) 0%,
    rgba(14, 24, 32, 0.72) 55%,
    rgba(14, 24, 32, 0.80) 100%
  );
}

/* Form inputs */
[data-theme="dark"] .form-input {
  background-color: #152232;
  border-color: rgba(214, 228, 240, 0.18);
  color: var(--color-text);
}

[data-theme="dark"] .form-input:focus {
  border-color: var(--color-accent-blue);
}

/* Logos in proof bar: invert to show on dark bg */
[data-theme="dark"] .proof-logo {
  filter: invert(1) brightness(0.85);
}

/* CS company badge — dark mode */
[data-theme="dark"] .cs-company-badge {
  background-color: #243444;
}

/* Referral cards */
[data-theme="dark"] .referral-card {
  border-color: rgba(214, 228, 240, 0.12);
}

/* Theme toggle hover in dark mode */
[data-theme="dark"] .theme-toggle:hover {
  background-color: #18283A;
}
