/* ==========================================================================
   tonyabdelmalak.com, 2026 refresh
   One stylesheet for the home page and every report page.
   Palette kept from the original site: navy #001e42, deep blue #1E3A8A,
   teal #14B8A6, light gray #F3F4F6, ink #111827, slate #374151.
   Decisions and sources are documented in docs/design-notes.md.
   ========================================================================== */

:root {
  /* Palette (original) */
  --navy: #001e42;
  --blue: #1e3a8a;
  --teal: #14b8a6;          /* decorative and on-navy only: 2.5:1 on white */
  --bg: #f3f4f6;
  --ink: #111827;
  --slate: #374151;

  /* Accessible derivatives (checked to WCAG AA in tools/audit) */
  --teal-ink: #0f766e;      /* teal for text/links on light backgrounds, 5.5:1 on white */
  --teal-soft: #ccfbf1;
  --muted: #4b5563;         /* secondary text, 7.6:1 on white */
  --line: #e5e7eb;
  --card: #ffffff;
  --on-navy: #e6edf7;
  --on-navy-muted: #b8c4d6;

  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.7vw, 1.75rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.2rem, 1.7rem + 2.6vw, 3.6rem);

  /* Space and shape */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4.5rem; --space-9: 6.5rem;
  --radius-s: 10px; --radius: 16px; --radius-l: 24px;
  --shadow-1: 0 1px 2px rgba(17,24,39,.06), 0 1px 1px rgba(17,24,39,.04);
  --shadow-2: 0 10px 30px -12px rgba(0,30,66,.22), 0 2px 6px rgba(17,24,39,.06);
  --shadow-3: 0 24px 60px -20px rgba(0,30,66,.35);
  --ease: cubic-bezier(.2,.8,.2,1);
  --dur: 220ms;
  --measure: 66ch;          /* 50 to 75 characters per line (Baymard) */
  --tap: 44px;              /* Apple HIG minimum hit target */
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-sans); font-size: var(--step-0); line-height: 1.6;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--card); color: var(--ink); padding: 12px 16px; border-radius: var(--radius-s); box-shadow: var(--shadow-2); }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 var(--space-4); letter-spacing: -0.015em; }
h1, h2 { font-family: var(--font-display); font-weight: 600; font-optical-sizing: auto; }
h1 { font-size: var(--step-4); letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 650; }
p { margin: 0 0 var(--space-4); max-width: var(--measure); }
.lead { font-size: var(--step-1); color: var(--slate); line-height: 1.55; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: var(--space-4);
  font-size: .78rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-ink);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: var(--space-9); }
.section--tight { padding-block: var(--space-8); }
.section--white { background: var(--card); }
.section-head { margin-bottom: var(--space-7); max-width: 760px; }
.section-head p { color: var(--slate); }

/* ------------------------------------------------------------------ Nav --- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 900; height: var(--nav-h);
  background: var(--navy); color: #fff; transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav.is-scrolled { box-shadow: 0 8px 24px -12px rgba(0,0,0,.5); background: rgba(0,30,66,.97); backdrop-filter: saturate(140%) blur(10px); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: var(--space-5); }
.nav__brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; display: inline-flex; align-items: center; min-height: var(--tap); white-space: nowrap; }
.nav__brand:hover { color: #fff; }
.nav__links { display: flex; align-items: center; gap: .25rem; margin: 0 auto; padding: 0; list-style: none; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .8rem;
  color: var(--on-navy); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.nav__link:hover, .nav__link.is-active { color: #fff; }
/* Kept from the original site: animated underline that grows from the center. */
.nav__link::after {
  content: ""; position: absolute; left: 50%; bottom: 8px; width: 0; height: 2px; background: var(--teal);
  border-radius: 2px; transform: translateX(-50%); transition: width var(--dur) var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after, .nav__link:focus-visible::after { width: calc(100% - 1.6rem); }
.nav__cta { margin-left: auto; }
.nav__toggle { display: none; margin-left: auto; width: var(--tap); height: var(--tap); border: 0; border-radius: 12px; background: transparent; color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.nav__toggle svg { width: 24px; height: 24px; }

@media (max-width: 1060px) {
  .nav__toggle { display: inline-flex; }
  .nav .nav__cta { display: none; }
  .nav__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; margin: 0; padding: var(--space-3) var(--space-4) var(--space-5);
    flex-direction: column; align-items: stretch; gap: 0; background: var(--navy);
    box-shadow: 0 20px 30px -10px rgba(0,0,0,.45); transform-origin: top; transform: scaleY(.96); opacity: 0; visibility: hidden;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; visibility: visible; }
  .nav__link { min-height: 48px; padding: 0 .5rem; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav__link::after { left: .5rem; transform: none; bottom: 10px; }
  .nav__link:hover::after, .nav__link.is-active::after { width: 40px; }
  .nav__links .nav__mobile-cta { display: flex; padding-top: var(--space-4); }
}
.nav__mobile-cta { display: none; }

/* -------------------------------------------------------------- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: var(--tap);
  padding: .7rem 1.25rem; border-radius: 999px; border: 1px solid transparent; font: 600 .98rem/1 var(--font-sans);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur);
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.98); }
.btn--teal { background: var(--teal); color: var(--navy); box-shadow: 0 8px 24px -10px rgba(20,184,166,.7); }
.btn--teal:hover { background: #2dd4bf; color: var(--navy); transform: translateY(-1px); }
.btn--ghost-light { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.35); }
.btn--ghost-light:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--blue); color: #fff; transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--navy); border-color: #cbd5e1; }
.btn--outline:hover { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn--sm { min-height: var(--tap); padding: .55rem 1rem; font-size: .9rem; }
.text-link { display: inline-flex; align-items: center; gap: .35rem; min-height: var(--tap); font-weight: 600; color: var(--teal-ink); text-decoration: none; }
.text-link svg { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

/* ----------------------------------------------------------------- Hero --- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: calc(var(--nav-h) + var(--space-8)) 0 var(--space-9); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; z-index: -1;
  background: radial-gradient(closest-side, rgba(20,184,166,.28), rgba(20,184,166,0) 70%);
}
.hero::after {
  content: ""; position: absolute; inset: auto auto -30% -15%; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; z-index: -1;
  background: radial-gradient(closest-side, rgba(30,58,138,.55), rgba(30,58,138,0) 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--space-8); align-items: center; }
.hero h1 { color: #fff; margin-bottom: var(--space-5); max-width: 15ch; }
.hero h1 em { font-style: italic; color: #5eead4; }
.hero .eyebrow { color: #5eead4; }
.hero__sub { color: var(--on-navy); font-size: var(--step-1); line-height: 1.55; max-width: 54ch; margin-bottom: var(--space-6); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-6); }
.hero__proof { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.hero__proof li { font-size: .85rem; color: var(--on-navy-muted); padding: .35rem .75rem; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; }
.portrait { position: relative; justify-self: center; width: min(340px, 100%); }
.portrait__frame {
  position: relative; border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 1 / 1; background: #f4f6f8;
  box-shadow: var(--shadow-3); border: 1px solid rgba(255,255,255,.12);
}
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.portrait__chip {
  position: absolute; left: -18px; bottom: 28px; display: flex; align-items: center; gap: .7rem; max-width: 260px;
  padding: .75rem 1rem; border-radius: 16px; background: rgba(255,255,255,.96); color: var(--ink); box-shadow: var(--shadow-2);
  font-size: .86rem; line-height: 1.35; border: 1.5px solid var(--navy); text-align: left; cursor: pointer; min-height: var(--tap);
}
.portrait__chip strong { display: block; font-size: .9rem; }
.portrait__chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(20,184,166,.2); flex: none; }
.portrait__chip:hover { transform: translateY(-1px); }

@media (max-width: 900px) {
  .hero { padding-top: calc(var(--nav-h) + var(--space-6)); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-7); }
  .hero__grid { gap: var(--space-5); }
  /* Mobile: a small round photo beside the chat card, so the headline stays on the first screen */
  .portrait { order: -1; width: 100%; justify-self: start; display: flex; align-items: center; gap: var(--space-4); }
  .portrait__frame { width: 88px; height: 88px; flex: none; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); box-shadow: var(--shadow-2); }
  .portrait__chip { position: static; transform: none; max-width: none; }
  .portrait__chip:hover { transform: translateY(-1px); }
  .hero h1 { max-width: none; }
}

/* ---------------------------------------------------------------- About --- */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--space-8); align-items: start; }
.about__story p { color: var(--slate); }
.about__story p:first-child { font-size: var(--step-1); color: var(--ink); }
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.thread li { display: grid; grid-template-columns: 44px 1fr; gap: var(--space-4); align-items: start; padding: var(--space-4); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.thread .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-ink); }
.thread .ico svg { width: 22px; height: 22px; }
.thread h3 { margin: 0 0 .2rem; font-size: 1rem; }
.thread p { margin: 0; font-size: .95rem; color: var(--muted); }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: var(--space-6); } }

/* --------------------------------------------------------------- Results --- */
.results { background: var(--navy); color: #fff; }
.results h2 { color: #fff; }
.results .eyebrow { color: #5eead4; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden; }
.metric { background: var(--navy); padding: var(--space-6) var(--space-5); }
.metric__num { font-family: var(--font-display); font-size: clamp(2.4rem, 2rem + 2vw, 3.4rem); line-height: 1; color: #fff; font-weight: 600; letter-spacing: -.02em; }
.metric__num span { color: #5eead4; }
.metric__label { margin: var(--space-3) 0 .35rem; font-weight: 600; color: #fff; }
.metric__src { margin: 0; font-size: .85rem; color: var(--on-navy-muted); }
@media (max-width: 900px) { .metrics { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .metrics { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- Products --- */
.products { display: grid; gap: var(--space-6); }
.product {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.product:hover { box-shadow: var(--shadow-2); }
.product:nth-child(even) .product__media { order: 2; }
.product__media { position: relative; background: linear-gradient(160deg, #eef2f7, #dfe7f1); padding: var(--space-6); display: flex; align-items: center; justify-content: center; min-height: 280px; }
.product__media picture { display: block; width: 100%; }
.product__media img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(0,30,66,.45); border: 1px solid rgba(0,30,66,.08); }
.product__body { padding: var(--space-7) var(--space-7) var(--space-6); display: flex; flex-direction: column; }
.product__tag { display: inline-flex; align-self: flex-start; align-items: center; gap: .4rem; margin-bottom: var(--space-4); padding: .3rem .7rem; border-radius: 999px; background: var(--bg); color: var(--slate); font-size: .8rem; font-weight: 600; }
.product__tag svg { width: 14px; height: 14px; }
.product h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; margin-bottom: var(--space-3); }
.product__why { font-size: .95rem; color: var(--muted); border-left: 3px solid var(--teal); padding-left: var(--space-4); margin: var(--space-2) 0 var(--space-5); }
.product__note { font-size: .9rem; color: var(--slate); background: var(--teal-soft); border-radius: 12px; padding: .75rem 1rem; margin: 0 0 var(--space-5); }
.product__links { margin-top: auto; display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.product.is-flash { box-shadow: 0 0 0 3px var(--teal), var(--shadow-2); }
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; }
  .product:nth-child(even) .product__media { order: 0; }
  .product__media { min-height: 0; padding: var(--space-5); }
  .product__body { padding: var(--space-5); }
}

/* ------------------------------------------------------------ Experience --- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--teal), #cbd5e1); }
.role { position: relative; display: grid; grid-template-columns: 190px 1fr; gap: var(--space-5); padding: 0 0 var(--space-6) var(--space-6); }
.role::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--teal); }
.role__when { font-size: .9rem; color: var(--muted); font-weight: 500; padding-top: 2px; }
.role h3 { margin-bottom: .15rem; }
.role__org { font-weight: 600; color: var(--blue); margin: 0 0 var(--space-2); font-size: .97rem; }
.role p { color: var(--slate); font-size: .97rem; margin-bottom: var(--space-2); }
.role__wins { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: var(--space-2) 0 0; list-style: none; }
.role__wins li { font-size: .82rem; font-weight: 600; color: var(--teal-ink); background: var(--teal-soft); padding: .25rem .6rem; border-radius: 999px; }
.edu { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; padding: var(--space-5); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.edu p { margin: 0; }
@media (max-width: 720px) { .role { grid-template-columns: 1fr; gap: .3rem; } }

/* ------------------------------------------------------------- Carousels --- */
.rail { position: relative; }
.rail__head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.rail__head h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; margin: 0; }
.rail__head p { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }
.rail__controls { display: flex; gap: .5rem; flex: none; }
.rail__btn {
  width: var(--tap); height: var(--tap); border-radius: 50%; border: 1px solid #cbd5e1; background: var(--card); color: var(--navy);
  display: grid; place-items: center; cursor: pointer; transition: background var(--dur), border-color var(--dur), opacity var(--dur);
}
.rail__btn:hover { border-color: var(--navy); }
.rail__btn[disabled] { opacity: .35; cursor: default; }
.rail__btn svg { width: 20px; height: 20px; }
.rail__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * var(--space-5)) / 3); gap: var(--space-5);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
  padding: 4px 2px var(--space-5); margin: -4px -2px 0; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent;
}
.rail__track::-webkit-scrollbar { height: 6px; }
.rail__track::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
@media (max-width: 1000px) { .rail__track { grid-auto-columns: calc((100% - var(--space-5)) / 2.15); } }
@media (max-width: 640px) { .rail__track { grid-auto-columns: 84%; } .rail__controls { display: none; } }

.card {
  scroll-snap-align: start; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); text-decoration: none; color: inherit;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur);
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: #d6dde6; color: inherit; }
.card__img { aspect-ratio: 16 / 10; background: #e8edf3; overflow: hidden; border-bottom: 1px solid var(--line); }
.card__img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 500ms var(--ease); }
a.card:hover .card__img img { transform: scale(1.03); }
.card__body { padding: var(--space-5); display: flex; flex-direction: column; flex: 1; }
.card__kicker { font-size: .78rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-ink); margin-bottom: .45rem; }
.card h4 { font-size: 1.08rem; margin: 0 0 .5rem; line-height: 1.3; }
.card p { font-size: .93rem; color: var(--muted); margin: 0 0 var(--space-4); }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: .88rem; font-weight: 600; color: var(--navy); min-height: 24px; }
.card__foot svg { width: 16px; height: 16px; }

.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.case { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-6); display: flex; flex-direction: column; box-shadow: var(--shadow-1); }
.case__stat { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--navy); margin-bottom: var(--space-2); font-weight: 600; }
.case__stat-label { font-size: .85rem; color: var(--muted); margin-bottom: var(--space-4); }
.case h4 { font-size: 1.12rem; margin: 0 0 .5rem; }
.case p { font-size: .94rem; color: var(--muted); }
.case .text-link { margin-top: auto; }
@media (max-width: 900px) { .cases { grid-template-columns: 1fr; } }

.note { font-size: .86rem; color: var(--muted); margin-top: var(--space-4); }

/* --------------------------------------------------------------- Writing --- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-6); display: flex; flex-direction: column; text-decoration: none; color: inherit; box-shadow: var(--shadow-1); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
a.post:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); color: inherit; }
.post__topic { font-size: .78rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-ink); margin-bottom: var(--space-3); }
.post blockquote { margin: 0 0 var(--space-5); font-family: var(--font-display); font-size: 1.22rem; line-height: 1.35; color: var(--ink); }
.post .text-link { margin-top: auto; }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Skills --- */
/* Kept from the original: grid of tools with icons (now Lucide). */
.skills { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); }
@media (max-width: 1000px) { .skills { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .skills { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .skills { grid-template-columns: repeat(2, 1fr); } .skill { min-height: 118px; } }
.skill {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65rem; text-align: center;
  min-height: 132px; padding: var(--space-5) var(--space-3); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur);
}
.skill:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: #d6dde6; }
.skill .skill__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--ic, #4338ca); background: var(--ib, #eef2ff); box-shadow: inset 0 0 0 1px rgba(15,23,42,.05); transition: transform var(--dur) var(--ease); }
.skill .skill__icon svg { width: 26px; height: 26px; stroke-width: 1.9; }
.skill:hover .skill__icon { transform: scale(1.06); }
/* Six soft hues so the grid reads light and varied; every icon is 4.5:1 or better on its tile (WCAG 1.4.11 needs 3:1). */
.skill:nth-child(6n+1) { --ib: #eef2ff; --ic: #4338ca; }
.skill:nth-child(6n+2) { --ib: #ecfdf5; --ic: #047857; }
.skill:nth-child(6n+3) { --ib: #fffbeb; --ic: #b45309; }
.skill:nth-child(6n+4) { --ib: #fff1f2; --ic: #be123c; }
.skill:nth-child(6n+5) { --ib: #f0f9ff; --ic: #0369a1; }
.skill:nth-child(6n+6) { --ib: #f5f3ff; --ic: #6d28d9; }
.skill > span:last-child { font-weight: 600; font-size: .92rem; color: var(--ink); line-height: 1.3; }
.skills-group { margin-bottom: var(--space-6); }
.skills-group h3 { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-4); }

/* ---------------------------------------------------------- Certificates --- */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-4); }
.cert { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-5); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; }
a.cert:hover { border-color: #cbd5e1; box-shadow: var(--shadow-1); color: inherit; }
.cert .ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--bg); color: var(--blue); }
.cert .ico svg { width: 22px; height: 22px; }
.cert h4 { font-size: .98rem; margin: 0 0 .2rem; line-height: 1.3; }
.cert p { margin: 0; font-size: .85rem; color: var(--muted); }
.cert__view { display: inline-flex; align-items: center; gap: .3rem; margin-top: .4rem; font-size: .85rem; font-weight: 600; color: var(--teal-ink); }
.cert__view svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------- Reading --- */
.reading { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
.reading a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 56px; padding: .8rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .94rem; }
.reading a:hover { border-color: #cbd5e1; color: var(--navy); }
.reading svg { width: 16px; height: 16px; color: var(--muted); flex: none; }

/* --------------------------------------------------------------- Contact --- */
.contact { background: linear-gradient(135deg, var(--navy), #0b2f63); color: #fff; border-radius: var(--radius-l); padding: var(--space-8) var(--space-7); display: grid; grid-template-columns: 1.2fr .8fr; gap: var(--space-6); align-items: center; }
.contact h2 { color: #fff; margin-bottom: var(--space-3); }
.contact p { color: var(--on-navy); margin: 0; }
.contact__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: flex-end; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; padding: var(--space-6) var(--space-5); } .contact__actions { justify-content: flex-start; } }

/* ---------------------------------------------------------------- Footer --- */
.footer { padding: var(--space-7) 0; color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; }
.footer__links { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.footer__links a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 .6rem; color: var(--slate); text-decoration: none; font-weight: 500; }
.footer__links a:hover { color: var(--navy); }
.footer p { margin: 0; }

/* ---------------------------------------------------------- Reveal motion --- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ======================================================= Report pages === */
.report-hero { background: var(--navy); color: #fff; padding: calc(var(--nav-h) + var(--space-7)) 0 var(--space-7); position: relative; overflow: hidden; isolation: isolate; }
.report-hero::before { content: ""; position: absolute; right: -10%; top: -40%; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px; z-index: -1; background: radial-gradient(closest-side, rgba(20,184,166,.22), rgba(20,184,166,0) 70%); }
.report-hero h1 { color: #fff; font-size: var(--step-3); max-width: 24ch; }
.report-hero .eyebrow { color: #5eead4; }
.report-hero p { color: var(--on-navy); font-size: var(--step-1); max-width: 62ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: var(--space-5); font-size: .9rem; }
.crumbs a { color: var(--on-navy); text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; min-height: var(--tap); }
.crumbs a:hover { color: #fff; }
.crumbs svg { width: 16px; height: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); margin-top: var(--space-6); }
.kpi { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: var(--space-5); }
.kpi__num { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; font-weight: 600; color: #fff; }
.kpi__label { margin-top: .5rem; font-size: .9rem; color: var(--on-navy); }
.report { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-7); padding-block: var(--space-7) var(--space-9); }
.report > * { min-width: 0; }
.report__toc { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
.report__toc h2 { font-family: var(--font-sans); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-3); }
.report__toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.report__toc a { display: flex; align-items: center; min-height: var(--tap); padding-left: var(--space-4); margin-left: -2px; border-left: 2px solid transparent; color: var(--slate); text-decoration: none; font-size: .92rem; }
.report__toc a:hover, .report__toc a.is-active { color: var(--navy); border-left-color: var(--teal); }
.report__body > section { margin-bottom: var(--space-8); }
.report__body h2 { font-size: var(--step-2); }
.report__body p, .report__body li { color: var(--slate); }
.report__body ul { padding-left: 1.2rem; max-width: var(--measure); }
.report__body li { margin-bottom: .45rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); box-shadow: var(--shadow-1); margin: var(--space-5) 0; }
.panel__title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.panel__title h3 { margin: 0; font-size: 1.05rem; }
.panel select { min-height: var(--tap); padding: 0 2.2rem 0 .9rem; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; font: inherit; font-size: .92rem; color: var(--ink); }
.chart { width: 100%; min-height: 340px; overflow: hidden; }
.insight { display: flex; gap: var(--space-3); align-items: flex-start; background: var(--teal-soft); color: #134e4a; border-radius: 12px; padding: .85rem 1rem; font-size: .94rem; margin-top: var(--space-3); }
.insight svg { width: 18px; height: 18px; flex: none; margin-top: 3px; }
.insight p { margin: 0; color: #134e4a; }
.datanote li, .datanote p { overflow-wrap: anywhere; }
.datanote { font-size: .86rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: var(--space-4); margin-top: var(--space-6); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; }
table.data th, table.data td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font-weight: 650; color: var(--slate); background: #f8fafc; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.report-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
@media (max-width: 900px) { .report { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); } .report__toc { position: static; } .report__toc ol { display: flex; flex-wrap: wrap; border: 0; gap: .25rem; } .report__toc a { border: 1px solid var(--line); border-radius: 999px; padding: 0 .9rem; margin: 0; background: #fff; } }

/* ===== Detours (weekly column) =====
   Reading measure stays at 50 to 75 characters (Baymard); body text a step larger for long-form reading. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.article__wrap { max-width: calc(var(--measure) + 2 * var(--space-5)); }
.article__hero h1 { max-width: 22ch; }
.article__dek { font-size: var(--step-1); }
.report-hero .article__meta { font-size: .92rem; color: var(--on-navy-muted); margin-top: var(--space-4); }
.article { background: #fff; }
.article__body { padding-block: var(--space-7) var(--space-9); }
.article__body > p, .article__body > ol li, .article__body > ul li { font-size: 1.125rem; line-height: 1.75; color: var(--slate); max-width: var(--measure); }
.article__body > p { margin: 0 0 1.25em; }
.article__body > ol, .article__body > ul { padding-left: 1.4rem; margin: 0 0 1.5em; }
.article__body > ol li { margin-bottom: .5rem; }
.article__h2 { font-size: var(--step-2); margin: 2.2em 0 .6em; }
.article__body > p:last-of-type { color: var(--ink); font-weight: 600; }
.article__sources { border-top: 1px solid var(--line); margin-top: var(--space-7); padding-top: var(--space-5); font-size: .9rem; color: var(--muted); }
.article__sources h2 { font-family: var(--font-sans); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--space-3); }
.article__sources ul { padding-left: 1.1rem; margin: 0; }
.article__sources li { margin-bottom: .4rem; overflow-wrap: anywhere; }
.article__more { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); margin-top: var(--space-6); }
.author { display: flex; gap: var(--space-5); align-items: flex-start; margin-top: var(--space-7); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.author img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; }
.author p { margin: 0 0 var(--space-3); color: var(--slate); font-size: .98rem; }
.author .author__name { font-weight: 700; color: var(--ink); margin-bottom: var(--space-1); }
.author__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@media (max-width: 560px) { .author { flex-direction: column; } .author img { width: 72px; height: 72px; } }
.detours-hero__tag { font-family: var(--font-display); font-style: italic; color: #fff !important; font-size: var(--step-2) !important; margin-bottom: var(--space-4); }
.detours-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.detours-list { max-width: 880px; }
.entries { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.entries li { border-bottom: 1px solid var(--line); }
.entry { display: flex; gap: var(--space-5); align-items: center; padding: var(--space-5) var(--space-2); text-decoration: none; color: inherit; border-radius: var(--radius-s); transition: background var(--dur) var(--ease); }
.entry:hover { background: var(--bg); }
.entry__no { font-family: var(--font-display); color: var(--teal-ink); font-size: 1.05rem; min-width: 4.2ch; }
.entry__main { flex: 1; display: grid; gap: .3rem; }
.entry__title { font-family: var(--font-display); font-size: var(--step-2); color: var(--navy); line-height: 1.2; }
.entry__dek { color: var(--slate); }
.entry__meta { font-size: .86rem; color: var(--muted); }
.entry > svg, .entry > i { color: var(--teal-ink); flex: none; }
@media (max-width: 560px) { .entry { flex-direction: column; align-items: flex-start; gap: var(--space-2); } .entry > svg, .entry > i { display: none; } }

/* ===== Career map (home) ===== */
.careermap { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); counter-reset: step; }
.careermap li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: var(--space-2); }
.careermap li:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: calc(-1 * var(--space-4)); width: var(--space-4); height: 2px; background: var(--teal); }
.careermap__when { font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--teal-ink); }
.careermap h3 { font-size: var(--step-1); margin: 0; }
.careermap__org { font-size: .88rem; color: var(--muted); margin: 0; }
.careermap__carry { margin: var(--space-2) 0 0; color: var(--slate); font-size: .95rem; }
.careermap__led { margin-top: auto; padding-top: var(--space-3); border-top: 1px dashed var(--line); font-size: .88rem; color: var(--ink); }
.careermap__led strong { color: var(--teal-ink); }
.careermap li.is-now { background: var(--navy); border-color: var(--navy); }
.careermap li.is-now h3, .careermap li.is-now .careermap__led { color: #fff; }
.careermap li.is-now .careermap__when { color: #5eead4; }
.careermap li.is-now .careermap__org, .careermap li.is-now .careermap__carry { color: var(--on-navy); }
.careermap li.is-now .careermap__led { border-top-color: rgba(255,255,255,.2); }
.careermap__foot { margin-top: var(--space-5); color: var(--slate); }
@media (max-width: 960px) { .careermap { grid-template-columns: repeat(2, minmax(0, 1fr)); } .careermap li::after { display: none; } }
@media (max-width: 560px) { .careermap { grid-template-columns: minmax(0, 1fr); } }
.detours-latest { margin-top: var(--space-6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-6); align-items: center; padding: var(--space-6); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); }
.detours-latest__lede { font-family: var(--font-display); font-size: var(--step-2); color: var(--navy); line-height: 1.25; margin: 0 0 var(--space-4); }
.detours-latest__list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.detours-latest__list li { border-bottom: 1px solid var(--line); }
.detours-latest__list a { display: flex; gap: var(--space-4); align-items: baseline; min-height: var(--tap); padding: var(--space-3) 0; text-decoration: none; color: var(--ink); font-weight: 600; }
.detours-latest__list a:hover { color: var(--teal-ink); }
.detours-latest__list span { font-family: var(--font-display); color: var(--teal-ink); font-weight: 500; min-width: 4.2ch; }
@media (max-width: 760px) { .detours-latest { grid-template-columns: minmax(0, 1fr); padding: var(--space-5); } }
/* Long button labels wrap on the narrowest phones instead of pushing the page sideways */
@media (max-width: 400px) { .btn { white-space: normal; max-width: 100%; text-align: center; height: auto; } }

/* ===== Detours sign-up ===== */
.subscribe { margin-top: var(--space-7); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6); border-radius: var(--radius-l); background: #f0fdfa; border: 1px solid #99f6e4; }
.subscribe h2 { font-size: var(--step-2); margin: 0 0 var(--space-2); color: var(--navy); }
.subscribe__copy p { color: var(--slate); margin: 0 0 var(--space-3); }
.subscribe__gift { display: flex; gap: var(--space-2); align-items: flex-start; font-size: .95rem; }
.subscribe__gift svg { flex: none; color: var(--teal-ink); width: 20px; height: 20px; margin-top: 2px; }
.subscribe__form { display: grid; gap: var(--space-3); align-content: start; }
.subscribe__field { display: grid; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.subscribe__field input { min-height: var(--tap); padding: 0 14px; border-radius: 12px; border: 1px solid #94a3b8; font: inherit; font-weight: 400; font-size: 1rem; background: #fff; color: var(--ink); }
.subscribe__field input:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--teal-ink); }
.subscribe__form .btn { justify-self: start; }
.subscribe__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.subscribe__msg { margin: 0; min-height: 1.2em; font-weight: 600; color: var(--teal-ink); }
.subscribe__msg.is-error { color: #b91c1c; }
.subscribe__fine { margin: 0; font-size: .82rem; color: var(--muted); }
.subscribe.is-done .subscribe__field, .subscribe.is-done .subscribe__form .btn { display: none; }
@media (max-width: 760px) { .subscribe { grid-template-columns: minmax(0, 1fr); padding: var(--space-5); } }
.detours-latest__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; }
