/* ============================================
   PAGES & ARCHITECT-POSITIONING SECTIONS
   Extends styles.css using the same design tokens.
   ============================================ */

/* ============================================
   PORTFOLIO PAGE
   ============================================ */

.portfolio-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin: 2rem 0 2.25rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  max-width: fit-content;
}

.portfolio-stats .stat-number {
  font-size: 2rem;
}

.portfolio-stats .stat-label {
  font-size: 0.75rem;
}

.portfolio__filters-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-default);
}

.portfolio__filters-hint {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
}

.portfolio-page .portfolio__filters {
  margin: 0;
}

.portfolio-page .filter-btn {
  font-size: 0.875rem;
  padding: 7px 18px;
}

.portfolio-page .filter-btn[aria-selected="true"],
.portfolio-page .filter-btn.active {
  color: #fff;
  border-color: transparent;
}

/* Flexbox, not grid: CSS Grid cannot center a lone leftover item within its
   row (it stays pinned to the first track), which left an orphaned card
   sitting at the left edge. Flex-wrap + justify-content:center centers any
   partial last row correctly, including the 1-item "Applied AI" filter. */
.portfolio-card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.portfolio-card-grid .portfolio-card {
  flex: 1 1 340px;
  max-width: 400px;
}

.portfolio-card.is-hidden {
  display: none;
}

/* Uniform gradient icon tile for engagements without dedicated cover art —
   keeps the grid visually consistent instead of mixing photographic covers
   with unrelated stock-icon placeholders. */
.cs-card__media--tile {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cs-card__tile-icon {
  font-size: 2.75rem;
  color: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.25));
}

.cs-card__domain--tile {
  top: auto;
  bottom: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.28);
}

/* ============================================
   AGGREGATE STACK CLOUD
   ============================================ */

.stack-cloud-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
}

.stack-groups {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 920px;
  margin: 0 auto;
}

.stack-group {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-default);
}

.stack-group:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.stack-group__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stack-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.stack-cloud__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 7px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.stack-cloud__chip:hover {
  border-color: var(--brand-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Weighted like a real tag cloud: the technologies that actually carry these
   engagements (Java, Spring Boot, GCP...) read as heavier and brighter than
   the single-engagement tools, instead of every chip competing equally. */
.stack-cloud__chip--md {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stack-cloud__chip--lg {
  padding: 9px 18px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(139, 92, 246, 0.14));
  border-color: var(--brand-primary);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 700;
}

.stack-cloud__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .stack-group {
    grid-template-columns: 1fr;
    gap: 0.625rem;
    padding-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  .portfolio-stats {
    gap: 1.5rem;
    padding: 1.25rem;
  }
  .portfolio-stats .stat-number {
    font-size: 1.5rem;
  }
}

/* ============================================
   HEADER ADDITIONS
   ============================================ */

/* Scrolled state uses tokens so it tracks the active theme */
.header--scrolled {
  background: var(--bg-secondary);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.nav__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav__social:hover {
  color: #fff;
  background: #0A66C2;
  border-color: #0A66C2;
  transform: translateY(-2px);
}

.floating-btn.linkedin {
  background: #0A66C2;
}

/* ============================================
   HERO — keep the original cinematic rhythm
   (badge → 3-line title → role line → CTAs → stats → scroll)
   ============================================ */

.hero__scroll .scroll-indicator {
  color: inherit;
  text-decoration: none;
}

.hero__cta .btn {
  cursor: pointer;
  border: none;
  font: inherit;
}

/* ============================================
   SHARED: PLACEHOLDER MARKERS
   Deliberately loud so nothing ships unfilled.
   ============================================ */

.placeholder {
  display: block;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border: 2px dashed var(--warning);
  border-radius: 10px;
  background: color-mix(in srgb, var(--warning) 8%, transparent);
  color: var(--text-secondary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.placeholder::before {
  content: 'ACTION NEEDED';
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--warning);
  margin-bottom: 0.4rem;
}

.placeholder--inline {
  display: inline-block;
  margin: 0;
  padding: 2px 8px;
  border-width: 1px;
  font-size: 0.875rem;
}

.placeholder--inline::before {
  display: none;
}

/* Long file paths must not push the viewport wide on phones */
.placeholder code,
.cs-diagram__slot-note code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ============================================
   HOW I WORK / ARCHITECTURE PHILOSOPHY
   ============================================ */

.philosophy__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.philosophy-card {
  padding: 2rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.philosophy-card::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--brand-gradient);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s ease;
}

.philosophy-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.12);
}

.philosophy-card:hover::after {
  transform: scaleY(1);
}

.philosophy-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1.375rem;
  margin-bottom: 1.25rem;
}

.philosophy-card__title {
  font-size: 1.1875rem;
  margin-bottom: 0.75rem;
}

.philosophy-card__text {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 0.9688rem;
}

/* ============================================
   DOMAIN EXPERTISE
   ============================================ */

.domains__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.domain-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.domain-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(59, 130, 246, 0.12);
}

.domain-card__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-default);
}

.domain-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.domain-card__body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.domain-card__label {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--brand-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.875rem;
}

.domain-card__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.domain-card__text {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.domain-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.domain-card__tag {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

/* ============================================
   CASE STUDY CARDS (home teasers + index grid)
   ============================================ */

.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.cs-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.35s ease;
}

.cs-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(59, 130, 246, 0.16);
}

.cs-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-default);
}

.cs-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.cs-card:hover .cs-card__media img {
  transform: scale(1.04);
}

.cs-card__domain {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(11, 15, 26, 0.82);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.cs-card__body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cs-card__client {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 0.625rem;
}

.cs-card__title {
  font-size: 1.3125rem;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.cs-card__title a {
  color: inherit;
  text-decoration: none;
}

.cs-card__title a:hover {
  color: var(--brand-primary);
}

.cs-card__summary {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.cs-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.cs-card__chip {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.cs-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-default);
}

.cs-card__metric {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--success);
  line-height: 1.3;
}

.cs-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

.cs-card__link i {
  transition: transform 0.3s ease;
}

.cs-card__link:hover i {
  transform: translateX(4px);
}

/* ============================================
   SUBPAGE HERO + BREADCRUMB
   ============================================ */

.page-hero {
  padding: 160px 0 60px;
  position: relative;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-default);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  list-style: none;
  padding: 0;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand-primary);
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--text-disabled);
}

.page-hero__tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--brand-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.page-hero__title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 900px;
}

.page-hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 760px;
}

.page-hero__eyebrow {
  font-family: var(--font-display, inherit);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--border-strong, var(--border-default));
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ============================================
   CASE STUDY DETAIL
   ============================================ */

.cs-detail {
  padding: 60px 0 100px;
}

.cs-detail__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3.5rem;
  align-items: start;
}

.cs-detail__main {
  min-width: 0;
}

/* At-a-glance fact panel */
.cs-facts {
  position: sticky;
  top: 100px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 18px;
  padding: 1.75rem;
}

.cs-facts__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.cs-facts__row {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-default);
}

.cs-facts__row:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cs-facts__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 0.375rem;
}

.cs-facts__value {
  display: block;
  color: var(--text-primary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.cs-facts__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.cs-facts__chip {
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 0.78rem;
}

/* Body sections */
.cs-block {
  margin-bottom: 3.5rem;
  scroll-margin-top: 100px;
}

.cs-block__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.cs-block__title {
  display: flex;
  align-items: center;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border-default);
}

.cs-block p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.125rem;
}

.cs-block strong {
  color: var(--text-primary);
}

.cs-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.cs-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.cs-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--brand-gradient);
}

/* Constraint tiles */
.cs-constraints {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.cs-constraint {
  padding: 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 12px;
}

.cs-constraint__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.cs-constraint__value {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Decision / tradeoff blocks */
.cs-decision {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--brand-primary);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.cs-decision__head {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.cs-decision__grid {
  display: grid;
  gap: 1rem;
}

.cs-decision__item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.cs-decision__key {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.2rem;
}

.cs-decision__key--chose {
  color: var(--success);
}

.cs-decision__key--over {
  color: var(--text-muted);
}

.cs-decision__key--why {
  color: var(--brand-accent);
}

.cs-decision__key--cost {
  color: var(--warning);
}

.cs-decision__val {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin: 0;
}

/* Diagram slot */
.cs-diagram {
  margin: 2rem 0 2.5rem;
}

.cs-diagram__frame {
  position: relative;
  border: 2px dashed var(--brand-primary);
  border-radius: 16px;
  background: var(--bg-secondary);
  padding: 1rem;
  overflow: hidden;
}

.cs-diagram__frame img,
.cs-diagram__frame svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.cs-diagram__slot-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cs-diagram__slot-note i {
  color: var(--brand-primary);
  margin-top: 0.15rem;
}

.cs-diagram__slot-note code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--brand-accent);
  font-size: 0.8125rem;
}

.cs-diagram figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.cs-diagram__copyright {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.cs-note {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--brand-primary);
  background: var(--bg-tertiary);
  border-radius: 0 12px 12px 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.cs-card__image,
.domain-card__visual {
  position: relative;
}

.cs-card__image::after,
.domain-card__visual::after {
  content: "\00a9 sanjeevk.net";
  position: absolute;
  right: 0.6rem;
  bottom: 0.45rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #94a3b8;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* Outcome metrics */
.cs-outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}

.cs-outcome {
  padding: 1.75rem 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  text-align: center;
}

.cs-outcome--verified {
  border-color: color-mix(in srgb, var(--success) 45%, var(--border-default));
}

.cs-outcome__value {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.cs-outcome__label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Prev/next + CTA */
.cs-detail__cta {
  margin-top: 3rem;
  padding: 2.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  text-align: center;
}

.cs-detail__cta h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.cs-detail__cta p {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  max-width: 520px;
  margin-inline: auto;
}

.cs-detail__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ============================================
   CREDENTIALS / VERIFIED TRACK RECORD
   ============================================ */

.credentials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.credential-card {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  transition: all 0.3s ease;
}

.credential-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-3px);
}

.credential-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--brand-primary);
  font-size: 1.125rem;
}

.credential-card__name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9688rem;
  line-height: 1.45;
  margin-bottom: 0.25rem;
}

.credential-card__issuer {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.credential-card__status {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 2px 8px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--warning) 14%, transparent);
  color: var(--warning);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Engagement track record */
.engagements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.engagement {
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 14px;
}

.engagement__name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.engagement__role {
  color: var(--brand-accent);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.engagement__text {
  color: var(--text-secondary);
  font-size: 0.9063rem;
  line-height: 1.65;
}

/* ============================================
   FEATURED ON LINKEDIN
   ============================================ */

.linkedin-feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.75rem;
  align-items: center;
  padding: 2.25rem 2.5rem;
  background: linear-gradient(135deg,
      color-mix(in srgb, #0A66C2 12%, var(--bg-tertiary)),
      var(--bg-tertiary));
  border: 1px solid color-mix(in srgb, #0A66C2 35%, var(--border-default));
  border-radius: 20px;
}

.linkedin-feature__icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #0A66C2;
  color: #fff;
  font-size: 1.75rem;
}

.linkedin-feature__title {
  font-size: 1.3125rem;
  margin-bottom: 0.5rem;
}

.linkedin-feature__text {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin: 0;
}

/* ============================================
   TESTIMONIALS — REAL-READY EMPTY STATE
   ============================================ */

.testimonials__empty {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 20px;
  text-align: center;
}

.testimonials__empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--brand-primary);
  font-size: 1.375rem;
}

.testimonials__empty h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.testimonials__empty p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.testimonial-card__source {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

.testimonial-card__source i {
  color: #0A66C2;
}

.testimonials__note {
  margin: 2rem auto 0;
  max-width: 620px;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.testimonials__note a {
  color: var(--brand-primary);
  font-weight: 600;
}

.testimonials__note a:hover {
  text-decoration: underline;
}

/* The default link colour sits too close to the footer background to read. */
.footer__contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer__contact-item a:hover,
.footer__contact-item a:focus-visible {
  color: var(--brand-primary);
  text-decoration: underline;
}

/* ============================================
   RESUME PAGE
   ============================================ */

.resume {
  padding: 60px 0 100px;
}

.resume__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3.5rem;
  align-items: start;
}

.resume__aside {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 1.5rem;
}

.resume__download {
  padding: 1.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 18px;
  text-align: center;
}

.resume__download h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

.resume__download p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.resume__download .btn {
  width: 100%;
}

.resume__section {
  margin-bottom: 3rem;
  scroll-margin-top: 100px;
}

.resume__section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-accent);
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-default);
}

.resume__summary {
  color: var(--text-secondary);
  line-height: 1.85;
  font-size: 1rem;
}

/* Competency groups */
.resume__competencies {
  display: grid;
  gap: 1.125rem;
}

.competency {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.125rem;
  border-bottom: 1px solid var(--border-default);
}

.competency:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.competency__label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9375rem;
  padding-top: 0.1rem;
}

.competency__value {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.75;
}

/* Experience entries */
.role {
  position: relative;
  padding-left: 1.75rem;
  padding-bottom: 2.25rem;
}

.role::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--brand-gradient);
  z-index: 1;
}

.role::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.4rem;
  bottom: 0;
  width: 1px;
  background: var(--border-default);
}

.role:last-child {
  padding-bottom: 0;
}

.role:last-child::after {
  display: none;
}

.role__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.375rem;
}

.role__title {
  font-size: 1.125rem;
  margin: 0;
}

.role__company {
  color: var(--brand-primary);
}

.role__dates {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.role__context {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.role__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.role__bullets li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.role__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--brand-primary);
}

/* Nested signature engagements */
.engagement-block {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 12px;
}

.engagement-block__head {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9688rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.engagement-block__meta {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 0.875rem;
}

.engagement-block .role__bullets li {
  font-size: 0.9063rem;
}

/* Education + certifications */
.resume__two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.edu-item {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-default);
}

.edu-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.edu-item__degree {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.edu-item__school {
  color: var(--text-secondary);
  font-size: 0.9063rem;
}

.edu-item__year {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1100px) {

  .cs-detail__layout,
  .resume__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .cs-facts,
  .resume__aside {
    position: static;
    top: auto;
  }

  .resume__aside {
    order: -1;
  }
}

@media (max-width: 968px) {
  .page-hero {
    padding: 130px 0 48px;
  }

  .linkedin-feature {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    justify-items: center;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .cs-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  /* Header is crowded on phones; LinkedIn stays reachable in the footer */
  .nav__social {
    display: none;
  }

  .nav__cta {
    padding: 8px 16px;
    font-size: 0.875rem;
  }

  .cs-detail,
  .resume {
    padding: 40px 0 70px;
  }

  .cs-block {
    margin-bottom: 2.5rem;
  }

  .cs-decision {
    padding: 1.25rem;
  }

  .cs-decision__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }

  .competency {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.375rem;
  }

  .role__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cs-card__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .cs-detail__cta {
    padding: 1.75rem 1.25rem;
  }

  .cs-detail__cta-actions .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .page-hero {
    padding: 116px 0 40px;
  }

  .philosophy-card,
  .domain-card__body,
  .cs-card__body,
  .cs-facts,
  .testimonials__empty {
    padding: 1.5rem 1.25rem;
  }

  .cs-block__title {
    font-size: 1.25rem;
  }

  .cs-block__number {
    width: 26px;
    height: 26px;
    font-size: 0.8125rem;
    margin-right: 0.5rem;
  }

  .cs-constraints,
  .cs-outcomes {
    grid-template-columns: minmax(0, 1fr);
  }

  .role {
    padding-left: 1.25rem;
  }
}

/* ============================================
   REDUCED MOTION
   Scroll reveals are JS-driven and start at opacity 0, so they must be
   neutralised rather than merely shortened.
   ============================================ */

@media (prefers-reduced-motion: reduce) {

  .fade-in,
  .fade-in.visible {
    opacity: 1 !important;
    transform: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   PRINT — resume page should print cleanly
   ============================================ */

@media print {

  .header,
  .footer,
  .floating-actions,
  .resume__aside,
  .hire-modal,
  .success-message,
  .breadcrumb {
    display: none !important;
  }

  .resume__layout {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 0 0 20px;
    border-bottom: 1px solid #ccc;
  }

  body {
    background: #fff;
    color: #000;
  }
}
