/* ───────────────────── DAVIDE LUSUARDI · CV ─────────────────────
   Editorial executive aesthetic.
   Display: Instrument Serif (italic-feel, refined)
   Body:    Inter Tight
   Palette: warm ivory · deep ink · single terracotta accent
   ─────────────────────────────────────────────────────────────── */

:root {
  --bg:        #ECE6DA;
  --bg-2:      #E2DBCB;
  --paper:    #F4EFE3;
  --ink:       #14171A;
  --ink-2:     #2B2E32;
  --muted:     #6B6C6E;
  --muted-2:   #93908A;
  --rule:      rgba(20,23,26,.14);
  --rule-soft: rgba(20,23,26,.08);
  --accent:    #B34A2B;   /* terracotta */
  --accent-ink: #6E2A14;
  --accent-soft: rgba(179,74,43,.10);

  --serif: "Instrument Serif", "Newsreader", Georgia, serif;
  --sans:  "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1180px;
  --pad: clamp(20px, 4vw, 56px);

  --density: 1;
}

[data-theme="dark"] {
  --bg:        #14130F;
  --bg-2:      #1B1A15;
  --paper:    #1F1D17;
  --ink:       #ECE6DA;
  --ink-2:     #D6CFC0;
  --muted:     #9B958A;
  --muted-2:   #6B6660;
  --rule:      rgba(236,230,218,.16);
  --rule-soft: rgba(236,230,218,.08);
  --accent:    #E07A52;
  --accent-ink: #F2B295;
  --accent-soft: rgba(224,122,82,.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  transition: background .3s ease, color .3s ease;
}

::selection { background: var(--accent); color: #fff; }

/* ────────── Page shell ────────── */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) var(--pad) 80px;
}

.deco-rule {
  height: 1px;
  background: var(--rule);
  margin: 0;
  border: 0;
}

/* ────────── Header / hero ────────── */
.hero {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.hero-left .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-left .eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 116px);
  line-height: .92;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--ink);
}
.hero h1 .it {
  font-style: italic;
  color: var(--accent);
}
.hero .role {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--ink-2);
  margin-top: 14px;
  line-height: 1.2;
  max-width: 30ch;
}
.hero .meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  font-size: 13.5px;
  color: var(--muted);
}
.hero .meta .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 0;
  border-right: 1px solid var(--rule);
  padding-right: 14px;
  margin-right: 14px;
}
.hero .meta .chip:last-child { border-right: 0; }
.hero .meta a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.hero .meta a:hover { border-color: var(--accent); color: var(--accent); }

.portrait {
  width: clamp(140px, 18vw, 220px);
  aspect-ratio: 4/5;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.portrait image-slot {
  width: 100%; height: 100%;
  display: block;
  border-radius: 4px;
}

/* ────────── Stat strip ────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 36px 0 56px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat {
  padding: 22px 24px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat:last-child { border-right: 0; }
.stat .n {
  font-family: var(--serif);
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}
.stat .n .it { font-style: italic; color: var(--accent); }
.stat .l {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* ────────── Section heading ────────── */
.section {
  margin-top: calc(64px * var(--density));
}
.section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  margin-bottom: 28px;
  align-items: baseline;
}
.section-head .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.02;
  margin: 0;
  letter-spacing: -.015em;
}
.section-head h2 .it { font-style: italic; color: var(--accent); }
.section-head .lede {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 64ch;
  line-height: 1.55;
}

/* ────────── Executive summary ────────── */
.summary {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}
.summary .body {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.36;
  color: var(--ink-2);
  max-width: 26ch;
  letter-spacing: -.005em;
}
.summary .body .it { font-style: italic; color: var(--accent); }
.summary .ext {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 60ch;
}

/* ────────── Competencies ────────── */
.comp-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.comp {
  background: var(--bg);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 130px;
  transition: background .2s, transform .2s;
}
.comp:hover { background: var(--paper); }
.comp .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.comp .t {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
}
.comp .d {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: auto;
  line-height: 1.5;
}

/* ────────── Experience timeline ────────── */
.timeline {
  position: relative;
  margin-left: 220px;
  padding-left: 32px;
  border-left: 1px solid var(--rule);
}
@media (max-width: 820px) {
  .timeline { margin-left: 0; padding-left: 24px; }
}

.role {
  position: relative;
  padding: calc(28px * var(--density)) 0 calc(32px * var(--density));
  border-bottom: 1px solid var(--rule-soft);
}
.role:last-child { border-bottom: 0; }
.role::before {
  content: "";
  position: absolute;
  left: -38px;
  top: calc(38px * var(--density));
  width: 12px; height: 12px;
  background: var(--bg);
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: all .25s ease;
}
.role.current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.role-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  cursor: pointer;
}
.role .yrs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.role .yrs .dur {
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
}
.role .co {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 0;
  display: block;
}
.role .co .loc {
  display: block;
  font-style: italic;
  color: var(--muted);
  font-size: 14px;
  font-family: var(--sans);
  letter-spacing: 0;
  margin-top: 6px;
  line-height: 1.3;
}
.role .title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 8px;
  letter-spacing: .005em;
}
.role .toggle {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--muted);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 16px;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.role .toggle:hover { border-color: var(--ink); color: var(--ink); }
.role.open .toggle { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: rotate(45deg); }

.role-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease;
}
.role.open .role-body { grid-template-rows: 1fr; }
.role-body > .inner {
  overflow: hidden;
  min-height: 0;
}
.role-body .pad {
  padding-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.role-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.role-body ul li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 70ch;
}
.role-body ul li::before {
  content: "→";
  position: absolute;
  left: 0; top: 0;
  color: var(--accent);
  font-family: var(--mono);
}
.role-body .achievements {
  background: var(--paper);
  border-left: 2px solid var(--accent);
  padding: 18px 22px;
  margin-top: 4px;
  border-radius: 0 6px 6px 0;
}
.role-body .achievements .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.role-body .achievements ul li::before { content: "✓"; }

/* Quick teaser bullets when collapsed */
.role-body-teaser {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  max-width: 68ch;
  line-height: 1.55;
}

/* Filter chips */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  margin-left: 220px;
}
@media (max-width: 820px) { .filters { margin-left: 0; } }
.filters button {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12.5px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .01em;
}
.filters button:hover { color: var(--ink); border-color: var(--ink); }
.filters button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ────────── Two-col blocks (Education / Certs / Lang / Tech) ────────── */
.twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 8px;
}
@media (max-width: 820px) { .twocol { grid-template-columns: 1fr; gap: 32px; } }

.list-block .item {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-soft);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: baseline;
}
.list-block .item:last-child { border-bottom: 0; }
.list-block .item .idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: .1em;
}
.list-block .item .name {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -.005em;
}
.list-block .item .where {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* Languages */
.langs { display: flex; flex-direction: column; gap: 18px; }
.lang {
  display: grid;
  grid-template-columns: 110px 1fr 70px;
  align-items: center;
  gap: 16px;
}
.lang .name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -.005em;
}
.lang .name .flag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  margin-right: 8px;
  text-transform: uppercase;
}
.lang .bar {
  height: 6px;
  background: var(--rule-soft);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.lang .bar .fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  width: 100%;
  transform-origin: left;
  animation: bar-fill 1.1s cubic-bezier(.22,1,.36,1) both;
}
.lang.fluent .bar .fill { width: 92%; }
.lang .lvl {
  text-align: right;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.lang.native .lvl { color: var(--accent); }
@keyframes bar-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Tech tag cloud */
.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tech .tag {
  font-family: var(--sans);
  font-size: 13px;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink-2);
  background: var(--bg);
  transition: all .2s;
  cursor: default;
}
.tech .tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.tech .tag .num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
  margin-right: 6px;
}

/* Leadership profile */
.profile-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.profile-pills .pill {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: -.005em;
  color: var(--ink);
  padding: 6px 0;
  position: relative;
}
.profile-pills .pill::after {
  content: "·";
  font-family: var(--serif);
  color: var(--accent);
  margin-left: 16px;
}
.profile-pills .pill:last-child::after { display: none; }

/* Map / regions */
.regions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 12px;
}
.region {
  background: var(--bg);
  padding: 18px 18px;
}
.region .place {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.15;
}
.region .country {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.region .yrs {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  margin-top: 8px;
}

/* Footer */
.footer {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  font-size: 13px;
  color: var(--muted);
}
.footer .sig {
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  color: var(--ink);
  line-height: 1;
}
.footer a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.footer a:hover { color: var(--accent); border-color: var(--accent); }

/* Show/hide by viewport */
.mobile-only { display: none; }
.desktop-only { display: flex; }

/* ─────────── Mobile hero action cluster ─────────── */
.hero-mobile { margin-top: 24px; }
.hero-loc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-loc .pin { color: var(--accent); font-size: 8px; }
.hero-actions { display: grid; grid-template-columns: 1fr; gap: 8px; width: 50%;}
.act-btn {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.act-btn:active { transform: scale(.98); }
.act-btn .ic {
  display: none!important;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-size: 17px;
  color: var(--accent);
  font-family: var(--sans);
  font-style: italic;
}
.act-btn .lb {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -.005em;
  line-height: 1;
}
.act-btn .sub { display: none; }
.act-btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.act-btn.primary .ic { background: transparent; border-color: rgba(255,255,255,.3); color: var(--accent); }
.act-btn.primary .lb { color: var(--bg); }
.act-btn::after {
  content: "→";
  font-family: var(--mono);
  font-size: 18px;
  color: var(--muted);
  justify-self: end;
}
.act-btn.primary::after { color: var(--accent); }

/* ─────────── Floating CTA (mobile) ─────────── */
.fab-cluster {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 84px;
  z-index: 58;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.fab {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 14px 20px 14px 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(20,23,26,.22), 0 2px 6px rgba(20,23,26,.12);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  transition: all .25s ease;
}
.fab .fab-ic {
  width: 22px; height: 22px;
  background: rgba(255,255,255,.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-family: var(--mono);
}
.fab-cluster.open .fab { background: var(--ink); }
.fab-action {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 6px 18px rgba(20,23,26,.14);
  opacity: 0;
  transform: translateY(8px) scale(.6);
  pointer-events: none;
  transition: all .25s cubic-bezier(.22,1,.36,1);
}
.fab-cluster.open .fab-action {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.fab-cluster.open .fab-action:nth-child(1) { transition-delay: .04s; }
.fab-cluster.open .fab-action:nth-child(2) { transition-delay: .1s; }

/* Top toolbar (theme switch / print) */
.toolbar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 6px 20px rgba(20,23,26,.06);
}
.toolbar button {
  appearance: none;
  background: transparent;
  border: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.toolbar button:hover { background: var(--bg-2); color: var(--ink); }
.toolbar button.active { background: var(--ink); color: var(--bg); }

/* ────────── Monogram ────────── */
.hero-right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.monogram {
  width: clamp(140px, 18vw, 220px);
  height: auto;
  aspect-ratio: 5/6;
  color: var(--ink);
  display: block;
}

/* ────────── Career arc ────────── */
.career-arc {
  margin: 56px 0 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.career-arc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  gap: 16px;
}
.career-arc-title { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 320px; }
.career-arc-title .num-yr { font-family: var(--serif); font-size: 22px; color: var(--ink); text-transform: none; letter-spacing: -.01em; }
.career-arc-title .num-yr.it { font-style: italic; color: var(--accent); }
.career-arc-title .career-arc-line { flex: 1; height: 1px; background: var(--rule); }

.career-arc-track {
  position: relative;
  height: 90px;
  color: var(--ink);
}
.career-arc-ticks {
  position: absolute; inset: 0; width: 100%; height: 30px;
}
.career-arc-decades {
  position: absolute; top: 32px; left: 0; right: 0; height: 16px;
}
.career-arc-decades span {
  position: absolute;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: .1em;
}
.career-arc-roles {
  position: absolute; left: 0; right: 0; top: 52px; height: 60px;
}
.career-arc-bar {
  position: absolute;
  height: 10px;
  background: var(--ink);
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 4px 0 12px;
  color: var(--bg);
  transition: transform .2s, background .2s;
  cursor: default;
  min-width: 14px;
}
.career-arc-bar:hover { transform: translateY(-1px); background: var(--accent); }
.career-arc-bar.current { background: var(--accent); }
.career-arc-bar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg);
  position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
}
.career-arc-bar .lbl {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 2px;
}
.career-arc-legend {
  display: flex;
  gap: 32px;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}
.career-arc-legend strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  text-transform: none;
  letter-spacing: -.01em;
  margin-right: 6px;
}

/* ────────── Geo map ────────── */
.geo-map {
  margin-top: 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px;
  color: var(--ink);
  aspect-ratio: 5/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.geo-map svg { width: 100%; height: 100%; display: block; }
.geo-map text { letter-spacing: .04em; }

/* ────────── Industry icon (timeline) ────────── */
.ind-icon { vertical-align: middle; margin-right: 6px; }

/* ────────── Mobile bottom nav ────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 60;
  background: rgba(244, 239, 227, .92);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(20,23,26,.18);
  justify-content: space-between;
  gap: 2px;
}
[data-theme="dark"] .mobile-nav { background: rgba(31, 29, 23, .92); }
.mobile-nav button {
  flex: 1;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 8px 4px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .2s;
}
.mobile-nav button .ic { font-size: 16px; line-height: 1; }
.mobile-nav button.active {
  background: var(--ink);
  color: var(--bg);
}
.mobile-nav button.active .ic { color: var(--accent); }

/* ────────── Sticky compact header ────────── */
.sticky-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 32px);
  background: rgba(236, 230, 218, .88);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--rule);
  transform: translateY(-100%);
  transition: transform .35s ease;
}
[data-theme="dark"] .sticky-head { background: rgba(20, 19, 15, .88); }
.sticky-head.show { transform: translateY(0); }
.sh-name { font-family: var(--serif); font-size: 18px; letter-spacing: -.01em; }
.sh-name .mono { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .12em; }
.sh-cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  border-radius: 999px;
  transition: background .2s;
}
.sh-cta:hover { background: var(--accent); }

/* ────────── Reveal on scroll ────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Marquee badge under stats */
.marquee {
  margin: -40px 0 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  display: flex;
  gap: 48px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--muted);
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 48px;
  animation: marq 40s linear infinite;
}
.marquee-track span .dot { color: var(--accent); margin: 0 12px; }
@keyframes marq {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ────────── Responsive ────────── */
@media (max-width: 820px) {
  body { font-size: 15px; line-height: 1.5; }
  .toolbar { display: none; }
  .mobile-only { display: flex; gap: 5%;}
  .desktop-only { display: none !important; }
  .fab-cluster { display: flex; }

  .page { padding: 28px 18px 120px; }

  /* ── Hero ── */
  .hero { padding-bottom: 28px; }
  .hero-left .eyebrow { font-size: 10px; letter-spacing: .18em; margin-bottom: 22px; }
  .hero h1 { font-size: clamp(64px, 19vw, 108px); line-height: .86; letter-spacing: -.025em; }
  .hero .role { font-size: 17px; margin-top: 14px; max-width: none; line-height: 1.35; }

  /* ── Stats ── */
  .stats { grid-template-columns: repeat(2, 1fr); margin: 36px 0 0; border-radius: 14px; overflow: hidden; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
  .stat { padding: 20px 16px; }
  .stat .n { font-size: 44px; }
  .stat .l { font-size: 9.5px; letter-spacing: .12em; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }

  /* ── Marquee ── */
  .marquee { margin: 0 -18px 40px; font-size: 17px; padding: 12px 0; }

  /* ── Career arc → vertical card grid on mobile ── */
  .career-arc { margin: 24px -18px; padding: 24px 18px; border-radius: 0; border-left: 0; border-right: 0; background: var(--paper); }
  .career-arc-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .career-arc-title { width: 100%; max-width: none; }
  .career-arc-track { height: 140px; }
  .career-arc-bar { height: 8px; padding: 0 4px 0 10px; }
  .career-arc-bar .lbl { display: none; }
  .career-arc-bar .dot { width: 6px; height: 6px; }
  .career-arc-legend { gap: 18px 24px; margin-top: 22px; }
  .career-arc-legend strong { font-size: 26px; display: block; margin-right: 0; margin-bottom: 2px; }
  .career-arc-legend > div { font-size: 9.5px; }

  /* ── Sections ── */
  .section { margin-top: 52px; }
  .section-head { grid-template-columns: 1fr; gap: 10px; margin-bottom: 22px; }
  .section-head .num { font-size: 10px; letter-spacing: .2em; }
  .section-head h2 { font-size: clamp(34px, 8vw, 44px); line-height: 1.02; }
  .section-head .lede { font-size: 14px; line-height: 1.5; }

  /* ── Summary ── */
  .summary { grid-template-columns: 1fr; gap: 20px; }
  .summary .body { font-size: 22px; max-width: none; line-height: 1.32; }
  .summary .ext { font-size: 14.5px; line-height: 1.6; }

  /* ── Competencies ── */
  .comp-grid { grid-template-columns: 1fr; border-radius: 12px; overflow: hidden; }
  .comp { min-height: auto; padding: 20px 18px; gap: 8px; }
  .comp .t { font-size: 19px; }
  .comp .d { font-size: 13px; }

  /* ── Timeline ── */
  .filters {
    margin-left: 0;
    margin-right: -18px;
    padding-right: 18px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex-shrink: 0; scroll-snap-align: start; padding: 8px 16px; font-size: 12px; }

  .timeline { margin-left: 0; padding-left: 0; border-left: 0; }
  .role {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 20px 18px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--rule);
  }
  .role::before { display: none; }
  .role.current { border-color: var(--accent); }
  .role.current::after {
    content: "NOW";
    position: absolute;
    top: 18px; right: 18px;
    background: var(--accent);
    color: var(--bg);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .18em;
    padding: 3px 8px;
    border-radius: 999px;
  }
  .role { position: relative; }
  .role .yrs { font-size: 10px; letter-spacing: .14em; gap: 8px; flex-wrap: wrap; }
  .role .yrs .dur { font-size: 9.5px; padding: 2px 7px; }
  .role .co { font-size: 22px; line-height: 1.12; padding-right: 50px; }
  .role .co .loc { font-size: 12.5px; margin-top: 4px; }
  .role .title { font-size: 13.5px; margin-top: 10px; }
  .role-head { grid-template-columns: 1fr; gap: 6px; }
  .role .toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px; height: 32px;
    font-size: 14px;
  }
  .role.current .toggle { top: 46px; }
  .role-body-teaser { font-size: 13.5px; line-height: 1.5; margin-top: 12px; }
  .role-body .pad { padding-top: 14px; }
  .role-body ul li { font-size: 13.5px; line-height: 1.55; padding-left: 18px; }
  .role-body .achievements { padding: 14px 16px; }
  .role-body .achievements .label { font-size: 9.5px; margin-bottom: 8px; }

  /* ── Two-col blocks ── */
  .twocol { grid-template-columns: 1fr; gap: 36px; }
  .list-block .item { grid-template-columns: 28px 1fr; padding: 14px 0; gap: 10px; }
  .list-block .item .name { font-size: 17px; }
  .list-block .item .where { font-size: 12.5px; }

  /* ── Languages ── */
  .langs { gap: 16px; }
  .lang { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; background: var(--paper); border-radius: 12px; }
  .lang .name { font-size: 18px; display: flex; align-items: baseline; gap: 8px; }
  .lang .name .flag { font-size: 9px; margin-right: 0; padding: 2px 6px; background: var(--bg); border-radius: 4px; }
  .lang .bar { order: 3; }
  .lang .lvl {
    order: 2;
    text-align: left;
    font-size: 9.5px;
    color: var(--accent);
    margin-top: -2px;
  }

  /* ── Tech tags ── */
  .tech .tag { font-size: 12.5px; padding: 8px 14px; }

  /* ── Geo map ── */
  .geo-map { aspect-ratio: 5/4; padding: 6px; margin: 4px -18px 0; border-radius: 0; border-left: 0; border-right: 0; }

  /* ── Regions ── */
  .regions { grid-template-columns: 1fr 1fr; }
  .region { padding: 14px 14px; }
  .region .place { font-size: 16px; }
  .region .country { font-size: 9.5px; }
  .region .yrs { font-size: 10px; }

  /* ── Profile pills ── */
  .profile-pills .pill { font-size: 22px; padding: 4px 0; }
  .profile-pills .pill::after { margin-left: 12px; font-size: 24px; }

  /* ── Footer ── */
  .footer { grid-template-columns: 1fr; gap: 24px; margin-top: 64px; padding-bottom: 20px; }
  .footer > div:last-child { text-align: left; }
  .footer .sig { font-size: 36px; }

  /* ── Sticky / nav ── */
  .mobile-nav { display: flex; }
  .sticky-head { display: flex; }
  .sh-name { font-size: 14px; }
  .sh-cta { padding: 7px 12px; font-size: 10px; }
}

@media (max-width: 480px) {
  .marquee { font-size: 15px; }
  .hero h1 { font-size: clamp(60px, 20vw, 88px); }
  .stat .n { font-size: 38px; }
  .regions { grid-template-columns: 1fr; }
}

/* Print */
@media print {
  body { background: white; }
  .toolbar, .twk-panel, .mobile-nav, .sticky-head { display: none !important; }
  .role-body { grid-template-rows: 1fr !important; }
  .role .toggle { display: none; }
  .page { padding: 24px; max-width: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
