/*
 * Base styles and shared shell (header, primary nav, footer).
 * Load after tokens.css. Mobile-first; breakpoints at 768px and 1024px (D-013).
 */

/* ---------- Look: monochrome base, blue accent (D-027, amended 2026-10-28) ---------- */
/* Semantic overrides only; token values in tokens.css stay as approved. Warning colors are
   untouched everywhere: placeholders must stay distinct.
   - Default (every page but Home): the monochrome base (stone-50 page, white cards, coal-black
     text and buttons, stone borders) plus one accent from the blue scale: blue-700 for links,
     icons and focus, blue-50/100 for tinted surfaces, blue sector labels on Project cards.
   - .theme-mono on Home's <body>: the accent turns black too, so Home stays fully monochrome.
   --color-accent colors the icons (D-023), the Career Journey chart (D-032), and disclosure triangles (D-025). */
:root {
  --color-surface-background: var(--stone-50);
  --color-surface-card: #ffffff;
  --color-surface-subtle: var(--stone-100); /* secondary-button hover, image backdrop */
  --color-surface-tint: var(--blue-50); /* tinted cards and tiles */
  --color-surface-inverse: var(--stone-900); /* dark bands */
  --color-text-default: var(--stone-900);
  --color-text-secondary: var(--stone-600);
  --color-text-on-inverse: var(--stone-50);
  --color-text-on-inverse-muted: var(--stone-300);
  --color-accent-on-inverse: var(--blue-300); /* icons and focus on dark bands (D-027) */
  --color-rule-on-inverse: var(--stone-700); /* step dividers on dark bands */
  --color-text-link: var(--blue-700);
  --color-action-primary: var(--stone-900);
  --color-action-on-primary: #ffffff;
  --color-action-hover: var(--stone-700);
  --color-accent: var(--blue-700);
  --color-border-default: var(--stone-200);
  --color-border-strong: var(--stone-500); /* outline of the mobile Menu button, 4.8:1 on white (non-text contrast) */
  --color-focus-visible: var(--blue-700);
  --color-text-numeral: var(--stone-500); /* large decorative numerals only, never body text */
  --color-surface-header-gray: var(--stone-200); /* About header band (D-033) */
  /* Dark bands (Projects hero, closing band) and project-card pills. */
  --color-surface-inverse-raised: var(--stone-800);
  --color-border-inverse: var(--stone-700);
  --color-pill-surface: var(--stone-50);
  --color-pill-border: var(--stone-300);
  --color-pill-accent-surface: var(--blue-50);
  --color-pill-accent-border: var(--blue-300);
  --color-pill-accent-text: var(--blue-800);

  /* H1 and H2 at regular weight; H3 and below stay 600 so small headings still stand apart
     from body text (design language, updated 2026-10-23). */
  --font-weight-h1: var(--font-weight-body);
  --font-weight-h2: var(--font-weight-body);
  /* Emphasis that is not a heading: site name, current nav item, timeline years (D-024). */
  --font-weight-strong: 600;
  /* EB Garamond, regular and italic only (D-036): the Home name, vision quote and figures, and the
     header site name. Everything else stays Inter (D-019). */
  --font-family-serif: "EB Garamond", Georgia, "Times New Roman", serif;

  --radius-pill: 999px;
  --size-header-mobile: 3.75rem; /* 60px: height of the one-row mobile header */
  --radius-card: 12px;
  --radius-band: 16px; /* dark bands on Leadership (C2, 2026-11-03) */
  --size-chart-bar-phone: 0.875rem; /* 14px: Career Journey span-chart bar below 768px */

  /* "How I lead" step sizes (C2): no matching token exists in tokens.css yet. */
  --font-size-step: 1.375rem;       /* 22px */
  --line-height-step: 1.75rem;      /* 28px */
  --line-height-step-body: 1.625rem; /* 26px */
}

.theme-mono {
  --color-surface-tint: var(--stone-100);
  --color-text-link: var(--stone-900);
  --color-accent: var(--stone-900);
  --color-focus-visible: var(--stone-900);
  --color-pill-accent-surface: var(--stone-100);
  --color-pill-accent-border: var(--stone-400);
  --color-pill-accent-text: var(--stone-900);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

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

/* ---------- Document ---------- */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-base);
  font-size: var(--font-size-body-m);
  line-height: var(--line-height-body-m);
  font-weight: var(--font-weight-body);
  color: var(--color-text-default);
  background-color: var(--color-surface-background);
  overflow-wrap: break-word;
}

/* Heading weights come from the :root overrides (D-027: regular weight at every level). */
h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-h1);
  letter-spacing: var(--letter-spacing-h1);
  font-weight: var(--font-weight-h1);
}

h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-h2);
  letter-spacing: var(--letter-spacing-h2);
  font-weight: var(--font-weight-h2);
}

h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-h3);
  letter-spacing: var(--letter-spacing-h3);
  font-weight: var(--font-weight-h3);
}

/* Links are always underlined so they are not identified by color alone. */
a {
  color: var(--color-text-link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--color-focus-visible);
  outline-offset: 2px;
}

/* main receives focus only from the skip link; it is not an interactive control. */
main:focus {
  outline: none;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 72rem; /* 1152px */
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-8);
  }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 10;
  padding: var(--padding-button-md);
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-label);
  color: var(--color-action-on-primary);
  background-color: var(--color-action-primary);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Header ---------- */
.site-header {
  background-color: var(--color-surface-card);
  border-bottom: 1px solid var(--color-border-default); /* decorative divider */
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-block: var(--space-4);
}

@media (min-width: 1024px) {
  .site-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
  }
}

.site-name {
  font-family: var(--font-family-serif);
  font-size: 1.375rem; /* 22px (D-036) */
  line-height: var(--line-height-h4);
  font-weight: var(--font-weight-body); /* only regular is loaded; the current page shows as an underline */
  color: var(--color-text-default);
  text-decoration: none;
}

.site-name:hover {
  text-decoration: underline;
}

/* ---------- Navigation (primary and footer) ---------- */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem; /* 44px touch target */
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-label);
  color: var(--color-text-secondary);
  text-decoration: none;
}

.nav-list a:hover {
  text-decoration: underline;
}

/* Current page: weight and a thick underline, not color alone. */
.nav-list a[aria-current="page"] {
  color: var(--color-text-default);
  font-weight: var(--font-weight-strong);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-name[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Contact as a coal-black pill, last in the Primary nav (D-027). */
.nav-list a.nav-cta {
  padding: 0 var(--space-5);
  border-radius: var(--radius-pill);
  background-color: var(--color-action-primary);
  color: var(--color-action-on-primary);
}

.nav-list a.nav-cta:hover {
  background-color: var(--color-action-hover);
}

/* On the Contact page the pill keeps its colors; the thick underline marks the current page. */
.nav-list a.nav-cta[aria-current="page"] {
  color: var(--color-action-on-primary);
}

/* ---------- Mobile header with a Menu button (below 768px) ----------
   Everything here is gated by .has-menu, which nav-menu.js adds. Without JavaScript the header
   stays as above at every width. The extra Contact link and the button stay out of sight
   everywhere else, so wide screens look as before. */
.nav-cta--header,
.nav-toggle {
  display: none;
}

@media (max-width: 767px) {
  .site-header.has-menu .site-header__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--size-header-mobile);
    padding-block: var(--space-2);
  }

  .site-header.has-menu nav {
    display: contents; /* the site name, Contact, Menu and the panel become items of one row */
  }

  .site-header.has-menu .site-name {
    margin-right: auto;
    font-size: 1.25rem; /* 20px */
    line-height: 1.75rem;
  }

  .site-header.has-menu .nav-cta--header {
    display: inline-flex;
    align-items: center;
    min-height: var(--space-11); /* 44px touch target */
    padding: 0 var(--space-4);
    border-radius: var(--radius-pill);
    background-color: var(--color-action-primary);
    color: var(--color-action-on-primary);
    font-size: var(--font-size-label);
    line-height: var(--line-height-label);
    font-weight: var(--font-weight-label);
    text-decoration: none;
  }

  .site-header.has-menu .nav-cta--header:hover {
    background-color: var(--color-action-hover);
  }

  .site-header.has-menu .nav-cta--header[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
  }

  .site-header.has-menu .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--space-11);
    padding: 0 14px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    background-color: var(--color-surface-card);
    color: var(--color-text-default);
    font: inherit;
    font-size: var(--font-size-label);
    line-height: var(--line-height-label);
    font-weight: var(--font-weight-label);
    cursor: pointer;
  }

  .site-header.has-menu .nav-toggle[aria-expanded="true"] {
    border-color: var(--color-action-primary);
  }

  .site-header.has-menu .nav-toggle__icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
  }

  /* The panel: a block under the row, full width, pushing the page down. */
  .site-header.has-menu .nav-list {
    display: none;
    flex: 0 0 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    order: 3;
    width: calc(100% + 2 * var(--space-4)); /* reaches the screen edges, so the hairline spans the page */
    margin-inline: calc(-1 * var(--space-4));
    padding: var(--space-2) var(--space-4);
    border-top: 1px solid var(--color-border-default); /* decorative divider */
  }

  .site-header.has-menu.is-open .nav-list {
    display: flex;
  }

  .site-header.has-menu .nav-list li {
    border-bottom: 1px solid var(--color-border-default); /* decorative divider */
  }

  .site-header.has-menu .nav-list li:nth-child(5) {
    border-bottom: 0;
  }

  .site-header.has-menu .nav-list a {
    display: flex;
    min-height: var(--space-13); /* 52px */
    font-size: 1.0625rem; /* 17px */
    line-height: 1.5rem;
    font-weight: var(--font-weight-label);
    color: var(--color-text-default);
  }

  .site-header.has-menu .nav-list a[aria-current="page"] {
    font-weight: var(--font-weight-strong);
  }

  /* Contact stays in the row at 360px and wider; the in-list item is for wide screens only. */
  .site-header.has-menu .nav-list__contact {
    display: none;
  }
}

/* Below 360px the row does not fit: Contact moves into the panel as the last item. */
@media (max-width: 359px) {
  .site-header.has-menu .nav-cta--header {
    display: none;
  }

  .site-header.has-menu .nav-list li:nth-child(5) {
    border-bottom: 1px solid var(--color-border-default); /* decorative divider */
  }

  .site-header.has-menu .nav-list__contact {
    display: block;
    padding-block: var(--space-3) var(--space-1);
    border-bottom: 0;
  }

  .site-header.has-menu .nav-list a.nav-cta {
    justify-content: center;
    min-height: var(--space-12); /* 48px */
    color: var(--color-action-on-primary);
    font-weight: var(--font-weight-label);
  }

  .site-header.has-menu .nav-list a.nav-cta[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
  }
}

/* ---------- Main ---------- */
.site-main {
  flex: 1;
  padding-block: var(--space-8);
}

@media (min-width: 1024px) {
  .site-main {
    padding-block: var(--space-12);
  }
}

/* Pages that open with a full-width dark band start flush under the header. */
.site-main--band {
  padding-top: 0;
}

/* Pages that end with the band (Contact, D-034) meet the footer directly: the band grows to
   fill a tall window instead of leaving an empty strip above the footer. */
.site-main--end-band {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.site-main--end-band > :last-child {
  flex: 1;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-border-default); /* decorative divider */
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------- Buttons ---------- */
/* Pill buttons, devin.ai style (D-027). Primary: coal-black fill. Secondary: outlined. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem; /* 44px touch target */
  padding: 0 var(--space-6);
  border: 1px solid var(--color-action-primary);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-label);
  text-decoration: none;
}

.button--primary {
  background-color: var(--color-action-primary);
  color: var(--color-action-on-primary);
}

.button--primary:hover {
  background-color: var(--color-action-hover);
  border-color: var(--color-action-hover);
}

.button--secondary {
  background-color: transparent;
  color: var(--color-action-primary);
}

.button--secondary:hover {
  background-color: var(--color-surface-subtle);
}

/* Hidden visually, still read by screen readers (keeps the heading outline complete). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Placeholder for unapproved content ---------- */
/* The visible "Placeholder" text in the markup carries the meaning; the border is a supporting cue. */
.placeholder {
  padding: var(--padding-card);
  border: 2px dashed var(--color-warning-default);
  background-color: var(--color-warning-surface);
  color: var(--color-text-default);
}

.placeholder__label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-label);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--color-warning-default);
}

/* ---------- Utilities ---------- */
/* Vertical rhythm between direct children. */
.stack > * + * {
  margin-top: var(--space-6);
}

.stack-sm > * + * {
  margin-top: var(--space-4);
}

/* ---------- Page sections ---------- */
.section {
  margin-top: var(--space-12);
}

/* Reading measure: 38rem keeps body lines near 65–75 characters (Impeccable craft floor). */
.lead {
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  max-width: 38rem;
}

/* ---------- Home (D-036, "HomeSignature") ---------- */
/* One hero, then the three D-028 figures. Text and buttons first; the headshot and the vision
   quote follow on mobile and sit on the right from 1024px, where the quote card overlaps the
   photo's lower left corner and sticks out past its left edge. */
.signature-hero {
  display: grid;
  gap: var(--space-10);
  padding-bottom: var(--space-10);
}

.signature-label {
  font-size: 0.8125rem; /* 13px */
  line-height: 1rem;
  font-weight: var(--font-weight-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

/* The name in three lines; real spaces between the spans keep it "Jairo Enrique Diaz" when read. */
.signature-name {
  margin-top: var(--space-5);
  font-family: var(--font-family-serif);
  font-size: 4.5rem; /* 72px */
  line-height: 1;
  letter-spacing: -0.01em;
}

.signature-name > span {
  display: block;
}

.signature-name__middle {
  font-style: italic;
  color: var(--color-text-secondary); /* stone-600, 7.3:1 on the page */
}

/* Left-aligned at every width, no hyphenation (Jairo, 2026-10-29). */
.signature-lead {
  max-width: 31rem;
  margin-top: var(--space-6);
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  color: var(--color-text-secondary);
  text-align: left;
  hyphens: manual;
  text-wrap: pretty;
}

.signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.signature-portrait {
  position: relative;
  width: 100%;
  max-width: 28.75rem; /* 460px */
}

.signature-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  background-color: var(--color-surface-subtle); /* shows while the photo loads */
}

/* Mobile: the card overlaps the photo's bottom edge, inset from both sides, never off screen. */
.vision-card {
  position: relative;
  margin: calc(-1 * var(--space-8)) var(--space-4) 0;
  padding: var(--space-5) var(--space-6);
  background-color: var(--color-surface-card);
  border: 1px solid transparent; /* forced-colors edge; the shadow carries it otherwise */
  border-radius: 2px;
  box-shadow: var(--elevation-floating);
}

.vision-card blockquote {
  margin: 0;
  font-family: var(--font-family-serif);
  font-style: italic;
  font-size: 1.3125rem; /* 21px */
  line-height: 1.75rem;
}

.vision-card figcaption {
  margin-top: var(--space-3);
  font-size: 0.6875rem; /* 11px; letter-spaced uppercase label, secondary to the quote */
  line-height: 0.875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

/* A left-aligned column on phones (centred, the short "5 industries" row zig-zags); centred in one row from 768px. */
.signature-figures {
  display: flex;
  flex-direction: column;
  gap: var(--space-3) var(--space-12);
  padding: var(--space-6) 0 0;
  border-top: 1px solid var(--color-border-default); /* decorative divider */
  list-style: none;
}

.signature-figures li {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.signature-figures strong {
  font-family: var(--font-family-serif);
  font-size: 2.25rem; /* 36px */
  line-height: 2.5rem;
  font-weight: var(--font-weight-body);
  font-variant-numeric: lining-nums;
}

.signature-figures span {
  max-width: 22ch;
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .signature-figures {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  /* The hero and figures fill the first screen below the header, centred vertically. */
  .site-main--signature {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: var(--space-10) var(--space-8);
  }

  .signature-hero {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
    gap: 7rem; /* 112px keeps the text and buttons at least 40px clear of the quote card */
  }

  .signature-name {
    font-size: 6rem; /* 96px */
    line-height: 0.95;
  }

  .signature-portrait {
    justify-self: end;
    padding-bottom: var(--space-16); /* the card hangs lower, clear of the face (Jairo, 2026-10-29) */
  }

  .vision-card {
    position: absolute;
    left: -4.5rem; /* 72px past the photo's left edge */
    bottom: 0;
    max-width: 19rem; /* 304px */
    margin: 0;
    padding: var(--space-4) var(--space-5);
  }

  .vision-card blockquote {
    font-size: 1.1875rem; /* 19px */
    line-height: 1.625rem;
  }
}

/* Visible text marks draft or placeholder copy; the color is a supporting cue only. */
.draft-flag {
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-label);
  color: var(--color-warning-default);
}

/* ---------- Card focus ---------- */
/* The title link is the card's only control: ring the whole card instead of each wrapped title line. */
/* Browsers without :has() keep the default link outline. */
@supports selector(:has(*)) {
  .project-card:has(:focus-visible) {
    outline: 3px solid var(--color-focus-visible);
    outline-offset: 2px;
  }

  .project-card__title a:focus-visible {
    outline: none;
  }
}

/* Decorative heading icons: outlined, inherit the heading color, never carry meaning alone (design-language.md). */
.heading-icon {
  display: inline-block;
  flex: none;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.4em;
  vertical-align: -0.08em;
  color: var(--color-accent);
}

.story-card__meta {
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

.story-summary {
  max-width: 60ch;
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
}

/* ---------- Dark page band (Projects hero, D-028) ---------- */
.page-band {
  padding-block: var(--space-10) var(--space-12);
  background-color: var(--color-surface-inverse);
  color: var(--color-text-on-inverse);
}

.page-band__intro {
  max-width: 38rem;
  margin-top: var(--space-4);
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  color: var(--color-text-on-inverse-muted);
}

/* Title and intro side by side from 1024px (How I Can Help, D-031). */
.page-band__intro-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .page-band__intro-grid {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

/* Title area split in two from 1024px: a large lead line and the body text (Leadership, D-030). */
.page-band__split {
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.page-band__quote {
  max-width: 22ch;
  font-size: var(--font-size-h2);
  line-height: var(--line-height-h2);
  letter-spacing: var(--letter-spacing-h2);
}

.page-band__body {
  max-width: 38rem;
  color: var(--color-text-on-inverse-muted);
}

@media (min-width: 1024px) {
  .page-band__split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  /* Leadership: lift the philosophy so its first line starts level with the title. */
  .page-band__split .page-band__body {
    margin-top: calc(-1 * (var(--line-height-display) + var(--space-8)));
  }
}

/* Key figures: three panels; the large value carries the emphasis. */
.kpis {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding: 0;
  list-style: none;
}

.kpi {
  padding: var(--space-7) var(--space-7) var(--space-6);
  border: 1px solid var(--color-border-inverse);
  border-radius: var(--radius-card);
  background-color: var(--color-surface-inverse-raised);
}

.kpi__value {
  display: block;
  font-size: var(--font-size-display);
  line-height: 1;
  letter-spacing: var(--letter-spacing-display);
  font-weight: var(--font-weight-strong);
}

.kpi__label {
  display: block;
  margin-top: var(--space-3);
  color: var(--color-text-on-inverse-muted);
}

@media (min-width: 768px) {
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .page-band {
    padding-block: var(--space-16);
  }

  .page-band h1 {
    font-size: var(--font-size-display);
    line-height: var(--line-height-display);
    letter-spacing: var(--letter-spacing-display);
  }
}

/* ---------- Project cards (Projects page, D-028; anatomy per D-014 as amended) ---------- */
/* Featured: one column, two from 768px, three from 1024px. More: one column, two from 768px (D-013). */
.project-grid {
  display: grid;
  gap: var(--space-6);
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .project-grid--featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* The whole card is clickable through the title link's ::after; the title comes first in the
   source so screen readers announce it first, and the tag row is moved above it visually. */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  height: 100%;
  padding: var(--space-7);
  border: 1px solid transparent; /* kept for forced-colors mode; the shadow carries the edge */
  border-radius: var(--radius-card);
  background-color: var(--color-surface-card);
  box-shadow: var(--elevation-raised);
}

/* Featured: more padding, a larger title, and a deeper shadow; the section heading names the group. */
.project-card--featured {
  padding: var(--space-8);
  box-shadow: var(--elevation-floating);
}

.project-card__top {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pill {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-pill-border);
  border-radius: var(--radius-pill);
  background-color: var(--color-pill-surface);
  font-size: var(--font-size-caption);
  line-height: var(--line-height-caption);
  font-weight: var(--font-weight-strong);
  color: var(--color-text-secondary);
}

.pill--sector {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border-color: var(--color-pill-accent-border);
  background-color: var(--color-pill-accent-surface);
  color: var(--color-pill-accent-text);
}

/* Sector icon (D-029): decorative, the sector name carries the meaning. */
.pill__icon {
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
}

/* Method label (Agile or Waterfall, D-029): same row as the tags, in a gray tone. */
.pill--method {
  border-color: var(--color-surface-subtle);
  background-color: var(--color-surface-subtle);
  color: var(--color-text-secondary);
}

.project-card__year {
  padding-top: var(--space-1);
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  font-weight: var(--font-weight-label);
  color: var(--color-text-secondary);
}

.project-card__title {
  margin-top: var(--space-2);
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  letter-spacing: var(--letter-spacing-h4);
}

.project-card__title a {
  color: inherit;
  text-decoration-thickness: 1px;
}

.project-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
}

.project-card__client {
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-label);
  color: var(--color-text-secondary);
}

/* Company logo (symbol only where one exists) with the company line, stacked so the role text keeps the card width (D-029), from the official brand files. Empty alt:
   the company name is already in the text. */
.project-card__company {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

.project-card__logo {
  flex: none;
  width: auto;
  height: 1.75rem;
}

/* Mavenir has no separate symbol, so its wordmark is used, a little shorter. */
.project-card__logo--wordmark {
  height: 1.5rem;
}

.project-card__summary {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-default); /* decorative divider */
  color: var(--color-text-secondary);
}

@media (min-width: 1024px) {
  .project-card__title {
    font-size: var(--font-size-h3);
    line-height: var(--line-height-h3);
    letter-spacing: var(--letter-spacing-h3);
  }

  .project-card--featured .project-card__title {
    font-size: var(--font-size-h2);
    line-height: var(--line-height-h2);
    letter-spacing: var(--letter-spacing-h2);
  }
}

/* ---------- Closing call-to-action band (D-028) ---------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-8);
  border-radius: var(--radius-card);
  background-color: var(--color-surface-inverse);
  color: var(--color-text-on-inverse);
}

.cta-band__text {
  flex: 1 1 20rem;
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  font-weight: var(--font-weight-label);
}

.button--inverse {
  border-color: var(--color-text-on-inverse);
  background-color: var(--color-text-on-inverse);
  color: var(--color-surface-inverse);
}

.button--inverse:hover {
  background-color: var(--color-surface-subtle);
}

.button--outline-inverse {
  border-color: var(--color-text-on-inverse-muted);
  background-color: transparent;
  color: var(--color-text-on-inverse);
}

.button--outline-inverse:hover {
  background-color: var(--color-surface-inverse-raised);
}

.cta-band__title {
  flex: 1 1 20rem;
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  letter-spacing: var(--letter-spacing-h4);
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Focus on dark bands: blue-700 is too dark there, so the ring turns light (blue-300, 3:1+). */
.page-band,
.cta-band {
  --color-focus-visible: var(--blue-300);
}

/* ---------- Link list (entry points) ---------- */
.link-list {
  display: grid;
  gap: var(--gap-list);
  padding: 0;
  list-style: none;
}

.link-list a {
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  font-weight: var(--font-weight-label);
}

/* ---------- Project Story Detail (D-035) ---------- */
/* Header (title, company line, summary, facts), the four chapter buttons ("The story in 60
   seconds"), then the chapters as numbered cards. Without JavaScript every chapter shows, one
   after another; story-chapters.js adds .story--tabs and shows one chapter at a time. */
.back-link {
  margin-bottom: var(--space-6);
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-label);
}

.story-header {
  display: grid;
  gap: var(--space-6);
}

.story-header__main > * {
  max-width: 38rem;
}

.story-facts {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
}

.story-facts > div {
  display: grid;
  gap: 0 var(--space-4);
}

@media (min-width: 768px) {
  .story-facts > div {
    grid-template-columns: 9rem 1fr;
  }
}

.story-facts dt {
  font-weight: var(--font-weight-label);
  color: var(--color-text-default);
}

.story-facts dd {
  margin: 0;
  color: var(--color-text-secondary);
}

/* "The story in 60 seconds": four chapter buttons, stacked on mobile, two per row from 768px,
   four from 1024px. The selected one is coal black; aria-selected carries the state. */
.chapters {
  margin-top: var(--space-10);
}

.chapters__head,
.chapter__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
}

.chapters__title,
.chapter__title {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  letter-spacing: var(--letter-spacing-h4);
}

.chapters__time,
.chapter__count,
.chapter__step,
.chapter-tab__time {
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

.chapter-tabs {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.chapter-tab {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--color-border-default); /* decorative */
  border-radius: var(--radius-card);
  background-color: var(--color-surface-card);
  box-shadow: var(--elevation-raised);
  color: var(--color-text-default);
  text-decoration: none;
}

.chapter-tab:hover {
  border-color: var(--color-text-secondary);
}

.chapter-tab:focus-visible {
  outline-offset: 3px;
}

.chapter-tab__top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}

.chapter-tab__num {
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-strong);
  color: var(--color-accent);
}

.chapter-tab__title {
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  font-weight: var(--font-weight-strong);
}

.chapter-tab__summary {
  display: grid;
  gap: var(--space-1);
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

.chapter-tab__item::before {
  content: "· ";
}

.chapter-tab__item--more::before {
  content: none;
}

.chapter-tab__kpi {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  font-weight: var(--font-weight-strong);
  color: var(--color-pill-accent-text);
}

.chapter-tab__more {
  margin-top: auto;
  padding-top: var(--space-2);
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-label);
  color: var(--color-accent);
}

/* Selected chapter: stone-50 on stone-900 (17:1), summary stone-300 (11:1), blue-300 accents. */
.chapter-tab[aria-selected="true"] {
  border-color: var(--color-surface-inverse);
  background-color: var(--color-surface-inverse);
  color: var(--color-text-on-inverse);
}

.chapter-tab[aria-selected="true"] .chapter-tab__summary,
.chapter-tab[aria-selected="true"] .chapter-tab__time {
  color: var(--color-text-on-inverse-muted);
}

.chapter-tab[aria-selected="true"] .chapter-tab__num,
.chapter-tab[aria-selected="true"] .chapter-tab__kpi {
  color: var(--blue-300);
}

.chapter-tab[aria-selected="true"] .chapter-tab__more {
  color: var(--color-text-on-inverse);
}

/* Chapters and their numbered cards: one column, two from 1024px. */
.chapter {
  margin-top: var(--space-10);
  scroll-margin-top: var(--space-4); /* breathing room when a tap scrolls it into view */
}

.story--tabs .chapter {
  margin-top: var(--space-8);
}

.story-cards {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.story-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border: 1px solid var(--color-border-default); /* decorative */
  border-radius: var(--radius-card);
  background-color: var(--color-surface-card);
  box-shadow: var(--elevation-raised);
}

.story-block__num {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-h3);
  color: var(--color-text-numeral);
}

.story-block__title {
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  letter-spacing: 0;
}

/* Sub-headings inside a card read as small gray labels. */
.story-block h4:not(.story-block__title),
.story-block h5 {
  margin-top: var(--space-2);
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-strong);
  letter-spacing: var(--letter-spacing-label);
  color: var(--color-text-secondary);
}

.story-block ul,
.story-block ol {
  padding-left: var(--space-6);
}

.story-block li + li {
  margin-top: var(--space-1);
}

/* A section whose items are numbered (challenges, decisions) becomes one card per item. */
.story-group {
  margin-top: var(--space-8);
}

.story-group:first-of-type {
  margin-top: var(--space-4);
}

.story-group__title {
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  letter-spacing: 0;
}

.story-group > p {
  max-width: 38rem;
  margin-top: var(--space-2);
}

.story-group + .story-cards,
.story-cards + .story-group {
  margin-top: var(--space-8);
}

.chapter__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-default); /* decorative divider */
}

@media (min-width: 768px) {
  .chapter-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .story-header {
    grid-template-columns: 7fr 5fr;
    gap: var(--space-12);
  }

  .chapter-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

/* Printing shows every chapter, one after another (D-035). */
@media print {
  .chapter[hidden] {
    display: block;
    content-visibility: visible; /* hidden="until-found" hides with content-visibility */
  }

  .chapter-tab,
  .story-block {
    box-shadow: none;
  }

  .chapter__end {
    display: none;
  }
}

.story-nav h3 {
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  letter-spacing: 0;
}

.footnote {
  margin-top: var(--space-12);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-default); /* decorative */
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

/* ---------- Capability rows with story proof panels (How I Can Help, D-031) ---------- */
/* Number, capability, and proof panel stack on mobile; three columns from 1024px. The story
   count is in the panel heading text, so it never relies on color. */
.capability-list {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-text-default); /* decorative divider */
}

.capability {
  display: grid;
  gap: var(--space-4) var(--space-10);
  padding-block: var(--space-9);
  border-bottom: 1px solid var(--color-border-default); /* decorative divider */
}

.capability__num {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-h1);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-numeral);
}

.capability__title {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-h3);
  letter-spacing: var(--letter-spacing-h3);
}

.capability__body {
  max-width: 60ch;
  font-size: var(--font-size-body-m);
  line-height: var(--line-height-body-m);
  color: var(--color-text-secondary);
}

.proof {
  overflow: hidden;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  background-color: var(--color-surface-card);
  box-shadow: var(--elevation-raised);
}

.proof__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-surface-tint);
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  font-weight: var(--font-weight-label);
  letter-spacing: 0;
  color: var(--color-pill-accent-text);
}

.proof__count {
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  font-weight: var(--font-weight-strong);
  color: var(--color-accent);
}

/* 1px gaps over a border-colored background draw the grid lines between stories. */
.proof__list {
  display: grid;
  gap: 1px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border-default);
  background-color: var(--color-border-default);
}

.proof__list li {
  background-color: var(--color-surface-card);
}

.proof__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.25rem;
  grid-template-rows: auto 1fr;
  gap: 0 var(--space-2);
  align-items: start;
  height: 100%;
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-default);
  text-decoration: none;
}

.proof__link:hover {
  background-color: var(--color-surface-subtle);
}

.proof__link:hover .proof__company {
  text-decoration: underline;
}

.proof__link:focus-visible {
  outline-offset: -3px;
}

.proof__company {
  font-weight: var(--font-weight-label);
  color: var(--color-text-link);
}

.proof__subtitle {
  grid-column: 1;
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

.proof__arrow {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent);
}

@media (min-width: 768px) {
  .proof__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* With an odd count, the last story spans the panel. */
  .proof__list li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .capability {
    grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* ---------- Long-form text ---------- */
.prose {
  max-width: 38rem;
}

/* ---------- Leadership principles ledger (D-030) ---------- */
/* A real ordered list; the large numerals are decorative (aria-hidden). Number, principle, and
   evidence slot stack on mobile and sit in three columns from 768px. */
.ledger {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border-default); /* decorative divider */
}

.ledger__row {
  display: grid;
  gap: var(--space-2) var(--space-8);
  padding-block: var(--space-7);
  border-bottom: 1px solid var(--color-border-default); /* decorative divider */
}

.ledger__num {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-h1);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-numeral);
}

.ledger__title {
  max-width: 34ch;
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  letter-spacing: var(--letter-spacing-h4);
}

.ledger__row .placeholder {
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
}

.ledger__evidence {
  max-width: 65ch;
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
}

.ledger__stories {
  margin-top: var(--space-2);
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .ledger__row {
    /* The evidence column is the wider one, so the paragraph reads in a few long lines. */
    grid-template-columns: 6rem minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: start;
  }
}

/* ---------- Leadership: "How I lead" dark band and closing band (C2, 2026-11-03) ---------- */
.how-lead {
  padding: var(--space-10) var(--space-6);
  border-radius: var(--radius-band);
  background-color: var(--color-surface-inverse);
  color: var(--color-text-on-inverse);
}

.how-lead__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 400;
}

.how-lead__icon {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--color-accent-on-inverse);
}

.how-lead__steps {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-10);
  padding: 0;
  list-style: none;
}

.how-lead__step {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-rule-on-inverse);
}

.how-lead__step-icon {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--color-accent-on-inverse);
}

.how-lead__label {
  margin-top: var(--space-1);
  font-size: var(--font-size-step);
  line-height: var(--line-height-step);
  font-weight: 600;
}

.how-lead__step p {
  font-size: var(--font-size-body-m);
  line-height: var(--line-height-step-body);
  color: var(--color-text-on-inverse-muted);
}

/* Closing band sits 40px below the "How I lead" band on mobile, 64px from 768px. */
.leadership-cta {
  margin-top: var(--space-10);
}

@media (min-width: 768px) {
  .how-lead {
    padding: var(--space-14) var(--space-12);
  }

  .how-lead__title {
    font-size: var(--font-size-h1);
    line-height: var(--line-height-h1);
  }

  .how-lead__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-8);
  }

  .leadership-cta {
    margin-top: var(--space-16);
  }
}

@media (min-width: 1024px) {
  .how-lead__steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Focus ring on the dark closing band: 2px in the dark-band accent, offset 2px (C2). */
.leadership-cta :focus-visible {
  outline: 2px solid var(--color-accent-on-inverse);
  outline-offset: 2px;
}

/* ---------- Career Journey: span chart and company panels (D-032) ---------- */
.page-band__placeholder {
  max-width: 40rem;
}

.section-note {
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

/* Span chart. The written label on each row carries the information; the track, bars, and
   year ticks are decorative (aria-hidden). Every bar uses the one accent; color encodes nothing.
   Bar positions come from the role dates on a 2011–2026 axis (16 years, one gridline per year). */
.span-chart {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  background-color: var(--color-surface-card);
  box-shadow: var(--elevation-raised);
}

.span-chart__title {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  letter-spacing: var(--letter-spacing-h4);
}

.span-chart__rows {
  display: grid;
  order: 2;
  gap: var(--space-6);
  margin-top: var(--space-4);
  padding: 0;
  list-style: none;
}

.span-chart__row {
  display: grid;
  gap: var(--space-2);
  align-items: center;
}

.span-chart__label {
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
}

.span-chart__company {
  display: block;
  font-weight: var(--font-weight-label);
}

.span-chart__meta {
  display: block;
  color: var(--color-text-secondary);
}

/* Below 768px: no gridlines, and the track is exactly as high as the bar. */
.span-chart__track {
  position: relative;
  height: var(--size-chart-bar-phone);
}

.span-chart__bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--start);
  width: var(--span);
  min-width: var(--size-chart-bar-phone);
  border-radius: var(--radius-pill);
  background-color: var(--color-accent);
}

/* Axis sits between the title and the first row, with only the two end years shown. */
.span-chart__axis {
  display: grid;
  order: 1;
  margin-top: var(--space-2);
}

.span-chart__ticks span:nth-child(n+2):nth-child(-n+5) {
  display: none;
}

/* Title dates stay on one line at every width. */
.nowrap {
  white-space: nowrap;
}

.span-chart__ticks {
  position: relative;
  height: 1rem;
  font-size: var(--font-size-caption);
  line-height: var(--line-height-caption);
  color: var(--color-text-secondary);
}

/* Each year label is centred in its own year column (between two gridlines), positioned like the
   bars, so a bar for 2011–2016 sits over the labels 2011 to 2016. */
.span-chart__ticks span {
  position: absolute;
  left: var(--at);
  transform: translateX(-50%);
}

@media (min-width: 768px) {
  .span-chart {
    display: block;
  }

  .span-chart__rows {
    order: 0;
    gap: var(--space-3);
  }

  .span-chart__axis {
    order: 0;
  }

  /* No gridlines on desktop either (Jairo, 2026-11-10): only the bars and the axis years. */
  .span-chart__track {
    height: 1.75rem;
    border-radius: var(--space-1);
    background-image: none;
  }

  .span-chart__bar {
    top: var(--space-1);
    bottom: var(--space-1);
    min-width: 0.75rem;
  }

  .span-chart__ticks span:nth-child(n+2):nth-child(-n+5) {
    display: block;
  }

  .span-chart__row,
  .span-chart__axis {
    grid-template-columns: 16rem minmax(0, 1fr);
    column-gap: var(--space-4);
  }

  .span-chart__ticks {
    grid-column: 2;
  }
}

/* Company panels and Project Story items: native <details>, several open at once.
   The summary text is the control; the triangle is decorative (D-025 style: right when
   closed, down when open). print-details.js opens every panel for printing. */
.companies {
  display: grid;
  gap: var(--space-4);
}

.company {
  overflow: hidden;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-card);
  background-color: var(--color-surface-card);
  box-shadow: var(--elevation-raised);
}

.company__summary,
.story-item > summary {
  display: grid;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.company__summary::-webkit-details-marker,
.story-item > summary::-webkit-details-marker {
  display: none;
}

.company__summary {
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  padding: var(--space-5) var(--space-6);
}

.company__summary:hover,
.story-item > summary:hover {
  background-color: var(--color-surface-subtle);
}

.company__summary:focus-visible,
.story-item > summary:focus-visible {
  outline-offset: -3px;
}

.disclosure-triangle {
  justify-self: center;
  width: 0;
  height: 0;
  border-top: 0.375rem solid transparent;
  border-bottom: 0.375rem solid transparent;
  border-left: 0.5625rem solid var(--color-accent);
}

details[open] > summary > .disclosure-triangle {
  transform: rotate(90deg);
}

.company__name {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  letter-spacing: var(--letter-spacing-h4);
}

.company__years {
  grid-column: 2;
  font-weight: var(--font-weight-strong);
  color: var(--color-accent);
}

.company__meta {
  grid-column: 2;
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  color: var(--color-text-secondary);
}

.company__body {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-2) var(--space-6) var(--space-6);
  border-top: 1px solid var(--color-border-default); /* decorative divider */
}

.role {
  padding-top: var(--space-4);
}

.role + .role {
  border-top: 1px solid var(--color-border-default); /* decorative divider */
}

.role h3 {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  letter-spacing: var(--letter-spacing-h4);
}

.role h4 {
  margin-top: var(--space-4);
  font-size: var(--font-size-body-m);
  line-height: var(--line-height-body-m);
}

.role ul:not([role]) {
  max-width: 44rem;
  padding-left: var(--space-6);
}

.role ul:not([role]) li + li {
  margin-top: var(--space-2);
}

.role__meta {
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  color: var(--color-text-secondary);
}

/* Achievement tiles under a role's dates (D-032). Each achievement appears only here, not repeated as a bullet. */
.role-figures {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding: 0;
  list-style: none;
}

.role-figure {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--space-2);
  background-color: var(--color-surface-tint);
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
}

.role-figure__value {
  display: block;
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  font-weight: var(--font-weight-strong);
  color: var(--color-pill-accent-text);
}

.story-items {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}

.story-item {
  border: 1px solid var(--color-border-default);
  border-radius: var(--space-2);
  background-color: var(--color-surface-background);
}

.story-item > summary {
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.story-item .disclosure-triangle {
  border-top-width: 0.3125rem;
  border-bottom-width: 0.3125rem;
  border-left-width: 0.4375rem;
}

.story-item__name {
  font-weight: var(--font-weight-label);
}

.story-item__when {
  grid-column: 2;
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  color: var(--color-text-secondary);
}

.story-item__body {
  padding: 0 var(--space-4) var(--space-4) var(--space-11);
}

@media (min-width: 768px) {
  .company__summary {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  }

  .company__years {
    grid-column: 3;
    grid-row: 1 / 3;
    font-size: var(--font-size-body-l);
    line-height: var(--line-height-body-l);
  }

  .company__body {
    padding-left: var(--space-15);
  }

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

@media print {
  .company,
  .span-chart {
    box-shadow: none;
  }

  .disclosure-triangle {
    display: none;
  }
}

/* ---------- Credentials (About) ---------- */
.credential-list {
  display: grid;
  gap: var(--space-4);
  padding: 0;
  list-style: none;
}

.credential-list strong {
  display: block;
  font-weight: var(--font-weight-label);
}

.credential-list span {
  display: block;
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

/* ---------- About: AboutGray (D-033) ---------- */
/* A dark grey header on About (stone-800, 2026-11-04): light text and a light blue pin.
   Title and summary (stone-50) 14.5:1, location (stone-300) 10.2:1, pin (blue-300) 8.4:1. */
.about-header {
  padding-block: var(--space-10);
  background-color: var(--color-surface-inverse-raised);
  color: var(--color-text-on-inverse);
}

.about-header__inner {
  display: grid;
  gap: var(--space-6);
}

.about-header__location {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
  color: var(--color-text-on-inverse-muted);
}

.about-header__pin {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent-on-inverse);
}

.about-header__summary {
  max-width: 38rem;
  font-size: var(--font-size-body-l);
  line-height: var(--line-height-body-l);
}

/* Credential cards: one column, then two from 768px, then a 12-column grid from 1024px. */
.about-grid {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.about-card {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--color-border-default); /* decorative */
  border-radius: var(--radius-card);
  background-color: var(--color-surface-card);
  box-shadow: var(--elevation-raised);
}

.about-card--tint {
  border-color: var(--color-pill-accent-border); /* decorative */
  background-color: var(--color-surface-tint);
}

.about-card__title {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4);
  letter-spacing: var(--letter-spacing-h4);
}

/* One row per item: name and school or provider on the left, the year on the right. */
.about-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-list li {
  display: grid;
  align-content: start; /* the provider stays under its course when the row beside it is taller */
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-4);
  padding-block: var(--space-3);
  border-top: 1px solid var(--color-border-default); /* decorative divider */
}

.about-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.about-list li > * {
  grid-column: 1;
}

.about-list__name {
  font-weight: var(--font-weight-strong);
}

.about-list__sub,
.about-list__acronym,
.about-list__number,
.lang-list__level {
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

.about-list__acronym {
  font-weight: var(--font-weight-label);
  white-space: nowrap;
}

.about-list__number {
  font-family: var(--font-family-code);
  font-size: var(--font-size-caption);
  line-height: var(--line-height-caption);
}

.about-list .about-list__year {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-weight: var(--font-weight-strong);
  color: var(--color-accent);
}

/* Line under the courses list that points to the public credential profiles. */
.about-card__more {
  margin-top: var(--space-4);
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

.lang-list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-list li {
  display: grid;
  gap: var(--space-1);
}

/* Decorative: the level is written out beside it. */
.lang-meter {
  display: flex;
  gap: var(--space-1);
}

.lang-meter__dot {
  width: 0.625rem;
  height: 0.625rem;
  border: 1.5px solid var(--color-accent);
  border-radius: 50%;
}

.lang-meter__dot--on {
  background-color: var(--color-accent);
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Certifications sit beside Education and Languages, as on desktop. */
  .about-card--certifications {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .about-card--courses {
    grid-column: 1 / -1;
  }

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

  .about-list--cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-8);
  }

  .about-list--cols li:nth-child(2) {
    padding-top: 0;
    border-top: 0;
  }
}

@media (min-width: 1024px) {
  .about-header {
    padding-block: var(--space-14);
  }

  .about-header__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: var(--space-16);
  }

  .about-header h1 {
    font-size: var(--font-size-display);
    line-height: var(--line-height-display);
    letter-spacing: var(--letter-spacing-display);
  }

  .about-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    margin-top: var(--space-12);
  }

  .about-card--education,
  .about-card--languages {
    grid-column: span 7;
  }

  .about-card--certifications {
    grid-column: 8 / span 5;
  }
}

@media print {
  .about-card {
    box-shadow: none;
  }
}

/* ---------- Contact: ContactSplit (D-034) ---------- */
/* The dark band holds the whole page: the closing line from Projects (D-028) on the left and
   the white contact panel on the right, stacked below 1024px. */
.contact-band {
  padding-block: var(--space-10) var(--space-16);
}

.contact-band__inner {
  display: grid;
  gap: var(--space-10);
}

/* The <h1> "Contact" is visually hidden (Jairo, 2026-10-29): the headline opens the band, and
   screen readers still get the page title first. */
.contact-band__headline {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-h1);
  letter-spacing: var(--letter-spacing-h1);
}

.contact-band__text .placeholder {
  margin-top: var(--space-6);
}

/* White panel: the focus ring turns blue-700 again, as on the rest of the light page. */
.contact-panel {
  --color-focus-visible: var(--blue-700);
  overflow: hidden;
  border-radius: var(--radius-card);
  background-color: var(--color-surface-card);
  box-shadow: var(--elevation-floating);
  color: var(--color-text-default);
}

.contact-panel__title {
  padding: var(--space-5) var(--space-6) var(--space-3);
  font-size: var(--font-size-label);
  line-height: var(--line-height-label);
  letter-spacing: var(--letter-spacing-label);
  color: var(--color-text-secondary);
}

.contact-panel__rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The whole row is the link: icon, label and value, then a decorative arrow or external icon. */
.contact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border-default); /* decorative divider */
  color: var(--color-text-default);
  text-decoration: none;
}

.contact-row:hover {
  background-color: var(--color-surface-subtle);
}

.contact-row:focus-visible {
  outline-offset: -3px;
}

.contact-row__icon {
  grid-row: 1 / span 2;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-accent);
}

.contact-row__label {
  display: block;
  font-weight: var(--font-weight-strong);
}

.contact-row__value {
  grid-column: 2;
  color: var(--color-accent);
  overflow-wrap: anywhere; /* the long email and LinkedIn values wrap at 320px */
}

.contact-row__go {
  grid-row: 1 / span 2;
  grid-column: 3;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-text-secondary);
}

.contact-row:hover .contact-row__value {
  text-decoration: underline;
}

.contact-panel__cv {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--color-border-default); /* decorative divider */
  background-color: var(--color-surface-subtle);
}

.contact-panel__cv-note {
  display: block;
  font-size: var(--font-size-body-s);
  line-height: var(--line-height-body-s);
  color: var(--color-text-secondary);
}

.contact-panel__cv-icon {
  width: 1.25rem;
  height: 1.25rem;
}

@media (min-width: 1024px) {
  .contact-band {
    padding-block: var(--space-14) var(--space-16);
  }

  .contact-band__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: var(--space-16);
  }

  .contact-band__headline {
    font-size: var(--font-size-display);
    line-height: var(--line-height-display);
    letter-spacing: var(--letter-spacing-display);
  }
}

@media print {
  .contact-panel {
    box-shadow: none;
  }
}
