/* Massimo Buonaiuto — career site. Layout: sticky four-tab bar over one fluid column; every view re-uses the same statement data. */
:root{
  --bg:#FFFFFF; --surface:#FFFFFF; --ink:#0B2A4A; --text:#1E2F45; --text-2:#2F425B; --text-3:#3D5170; --muted:#5A6B82; --muted-2:#8A9AB0;
  --line:#D8E2F0; --line-2:#C6D4E8; --line-3:#AFC2DD; --chip:#EAF1FB; --muted-bg:#F2F6FC;
  --accent:#0B3D6E; --accent-2:#1F6FD1; --on-accent:#FFFFFF; --tint:#E3EDFB; --tint-2:#BFD4F2; --tint-soft:#F4F8FD; --ring:#D97706;
  --band:#FFFFFF; --band-text:#2F425B; --band-fg:#0B2A4A; --band-accent:#1F6FD1;
  --serif:"Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap:1200px; color-scheme:light;
}
/* Dark theme only on request (header icon, remembered in localStorage) — white is the default. */
:root[data-theme="dark"]{
  --bg:#0E1116; --surface:#161B22; --ink:#E8ECF2; --text:#CED5DF; --text-2:#B9C1CC; --text-3:#A7B0BC; --muted:#97A1AD; --muted-2:#6E7783;
  --line:#2A313B; --line-2:#343C47; --line-3:#3F4753; --chip:#222831; --muted-bg:#1A1F27;
  --accent:#8DB3F0; --accent-2:#5E86CC; --on-accent:#0E1116; --tint:#1C2A40; --tint-2:#2A3F63; --tint-soft:#141B26; --ring:#F59E0B;
  --band:#0A0D12; --band-text:#C3CBD6; --band-fg:#FFFFFF; --band-accent:#8DB3F0; color-scheme:dark }

*{ box-sizing:border-box }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100% }
body{ margin:0; background:var(--bg); color:var(--ink); font-family:var(--sans); font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased }
a{ color:var(--accent); text-underline-offset:3px }
img{ max-width:100% }
h1,h2,h3,h4{ text-wrap:balance; margin:0 }
:focus-visible{ outline:3px solid var(--ring); outline-offset:2px; border-radius:6px }
.skip{ position:absolute; left:16px; top:-60px; z-index:100; background:var(--ink); color:var(--bg); padding:10px 16px; border-radius:8px }
.skip:focus{ top:12px }
.wrap{ max-width:var(--wrap); margin:0 auto; padding-left:max(24px, env(safe-area-inset-left, 0px)); padding-right:max(24px, env(safe-area-inset-right, 0px)) }
@media (max-width:480px){ .wrap{ padding-left:max(16px, env(safe-area-inset-left, 0px)); padding-right:max(16px, env(safe-area-inset-right, 0px)) } }
.serif{ font-family:var(--serif) }
.eyebrow{ font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--accent); margin:0 0 8px }
.muted{ color:var(--muted) }
.lede{ font-size:18px; color:var(--text-3); max-width:64ch; margin:0 }

/* Header + primary navigation */
.site-head{ background:var(--surface) }
.site-head .wrap{ padding-block:24px 18px }
.brand{ display:inline-flex; align-items:center; gap:16px; text-decoration:none; color:var(--ink); min-height:44px }
.brand .mono{ flex:none; display:flex; align-items:center; justify-content:center; width:56px; height:56px; border-radius:14px; background:linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); color:#FFFFFF; font-family:var(--serif); font-size:24px; font-weight:600; letter-spacing:.02em; box-shadow:0 4px 14px rgba(11,61,110,.22) }
.brand-t{ display:flex; flex-direction:column; gap:4px }
.brand-t b{ display:block; font-family:var(--serif); font-size:34px; font-weight:600; line-height:1.05; letter-spacing:-.01em }
.brand-t > span{ display:block; font-size:13px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:var(--accent-2) }
.brand:hover .brand-t b{ color:var(--accent-2) }
@media (max-width:640px){ .site-head .wrap{ padding-block:16px 12px } .brand{ gap:12px } .brand .mono{ width:44px; height:44px; border-radius:11px; font-size:19px } .brand-t b{ font-size:25px } .brand-t > span{ font-size:11px; letter-spacing:.1em } }
.brand-t .loc{ font-style:normal }
@media (max-width:640px){ .brand-t .loc{ display:none } }
@media (max-width:360px){ .brand .mono{ display:none } }
.tabs{ position:sticky; top:0; z-index:10; background:var(--surface); border-bottom:1px solid var(--line-2) }
.tabs ul{ list-style:none; margin:0 auto; display:flex; flex-wrap:wrap; gap:0 8px; padding-block:0 }
.tabs li{ flex:1 1 150px }
.tabs a{ display:block; min-height:68px; padding:10px 8px 8px; text-decoration:none; color:var(--ink); border-bottom:4px solid transparent; transition:border-color .3s ease }
.tabs a b{ display:block; font-size:18px; line-height:1.25; font-weight:600 }
.tabs a span{ display:block; font-size:13px; line-height:1.3; color:var(--muted) }
.tabs a[aria-current="page"]{ border-bottom-color:var(--accent) }
.tabs a[aria-current="page"] b{ color:var(--accent); font-weight:700 }
.tabs a:hover b{ color:var(--accent) }

main{ display:block; animation:enter .42s ease both }
@keyframes enter{ from{ opacity:0; transform:translateY(12px) } to{ opacity:1; transform:none } }

/* Sections */
.section{ padding-block:48px 8px }
.section:last-child{ padding-bottom:72px }
.section h2{ font-family:var(--serif); font-size:30px; font-weight:600; line-height:1.2; margin:0 0 6px }
.section > .wrap > p.sub, .sub{ margin:0 0 18px; color:var(--text-3); max-width:70ch }
.page-head{ padding-block:40px 8px }
.page-head h1{ font-family:var(--serif); font-size:40px; font-weight:600; line-height:1.15; margin:0 0 6px }
.crumbs{ font-size:14px; margin:0 0 10px; color:var(--muted) }
.crumbs a{ color:var(--muted) }

/* Hero */
.hero{ background:var(--surface); border-bottom:1px solid var(--line) }
.hero-grid{ display:flex; flex-wrap:wrap; gap:32px 56px; align-items:flex-start; padding-block:48px 40px }
.hero-main{ flex:999 1 520px; min-width:0 }
.hero h1{ font-family:var(--serif); font-size:clamp(34px, 5vw, 46px); font-weight:600; line-height:1.12; letter-spacing:-.01em; margin:0 0 16px }
.snapshot{ flex:1 1 300px; margin:0; padding:22px; border:1px solid var(--line); border-radius:14px; background:var(--bg); display:grid; gap:12px; font-size:15px }
.snapshot dt{ font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--muted) }
.snapshot dd{ margin:2px 0 0 }
.stats{ display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:14px; overflow:hidden; margin-bottom:48px }
.stats div{ background:var(--surface); padding:20px 22px }
.stats b{ display:block; font-family:var(--serif); font-size:32px; font-weight:600; line-height:1.1; color:var(--accent) }
.stats span{ display:block; font-size:14px; color:var(--text-3); margin-top:6px }

/* Visionary band */
.band{ background:var(--band); color:var(--band-text); margin-top:48px }
.band .wrap{ padding-block:56px 60px }
.band .eyebrow{ color:var(--band-accent); letter-spacing:.1em }
.band h2{ font-family:var(--serif); font-size:38px; font-weight:600; line-height:1.15; color:var(--band-fg); max-width:22ch; margin:0 0 12px }
.band h3{ font-family:var(--serif); font-size:28px; font-weight:600; color:var(--band-fg) }
.band .lede{ color:var(--band-text); margin-bottom:36px }
.vision{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(270px, 1fr)); gap:14px }
.vision li{ border:1px solid rgba(213,220,230,.22); border-radius:14px; padding:20px; display:flex; flex-direction:column; gap:8px }
.vision .year{ font-family:var(--serif); font-size:30px; font-weight:600; line-height:1; color:var(--band-accent) }
.vision .t{ font-size:17px; font-weight:700; line-height:1.3; color:var(--band-fg) }
.vision p{ margin:0; font-size:14px; line-height:1.55; flex-grow:1 }
.vision a, .band-link{ color:var(--band-accent); font-weight:600; font-size:14px; min-height:40px; display:inline-flex; align-items:center }
.talks-head{ display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px 24px; margin:48px 0 16px }
.btn-band{ display:inline-flex; align-items:center; min-height:44px; padding:0 16px; border-radius:10px; background:var(--band-accent); color:var(--bg); font-size:15px; font-weight:700; text-decoration:none }
.talks{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(270px, 1fr)); gap:10px }
.talks a{ display:flex; flex-direction:column; gap:4px; height:100%; padding:16px 18px; border-radius:12px; background:rgba(213,220,230,.07); text-decoration:none; color:var(--band-text) }
.talks a:hover{ background:rgba(213,220,230,.13) }
.talks .when{ font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--band-accent) }
.talks .t{ font-size:16px; font-weight:600; line-height:1.35; color:var(--band-fg) }
.talks .k{ font-size:13px }

/* Cards */
.cards{ display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:12px }
.card{ display:flex; flex-direction:column; gap:6px; padding:20px; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--ink); text-decoration:none; transition:border-color .2s ease, transform .2s ease }
a.card:hover{ border-color:var(--accent); transform:translateY(-2px) }
.card .k{ font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent) }
.card .n{ font-family:var(--serif); font-size:22px; font-weight:600; line-height:1.2 }
.card .fig{ font-family:var(--serif); font-size:30px; font-weight:600; line-height:1.1; color:var(--accent) }
.card p{ margin:0; font-size:14px; color:var(--text-2); line-height:1.5 }
.card .meta{ font-size:13px; color:var(--muted) }
.card.partner p{ flex-grow:1 }
.card .links{ display:flex; flex-wrap:wrap; gap:4px 16px; margin-top:4px }
.card .links a{ display:inline-flex; align-items:center; min-height:40px; font-size:14px; font-weight:600; color:var(--accent) }
.entry{ min-height:180px; padding:26px; border-radius:16px; border-color:var(--line-2) }
.entry .n{ font-size:28px }
.entry .go{ margin-top:auto; font-size:15px; font-weight:600; color:var(--accent) }

/* Career at a glance */
.glance{ border:1px solid var(--line); border-radius:14px; background:var(--surface); padding:12px 16px }
.glance ol{ list-style:none; margin:0; padding:0 }
.glance li{ animation:slide .5s ease both; animation-delay:var(--d) }
.glance li.child{ padding-left:18px }
.glance a{ display:block; min-height:48px; padding:6px 0; border-bottom:1px solid var(--chip); text-decoration:none; color:var(--ink) }
.glance .row{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; font-size:14px; line-height:1.3 }
.glance .row b{ font-weight:600 }
.glance li.child .row b{ font-weight:500; font-size:13px }
.glance .row span{ color:var(--muted); font-size:13px; white-space:nowrap }
.glance .track{ display:block; position:relative; height:10px; margin-top:6px; border-radius:5px; background:var(--chip) }
.glance .bar{ position:absolute; top:0; bottom:0; left:var(--l); width:max(8px, var(--w)); border-radius:5px; background:var(--accent); transform-origin:left; animation:grow 1.1s cubic-bezier(.2,.7,.2,1) both; animation-delay:var(--d) }
.glance li.child .bar{ background:var(--accent-2) }
.glance li.off a{ opacity:.45 }
.glance li.off .row b{ font-weight:400 }
.glance li.off .bar{ background:var(--line-2) }
.glance .ticks{ position:relative; height:20px; margin-top:8px; font-size:12px; color:var(--muted) }
.glance .ticks span{ position:absolute; transform:translateX(-50%); left:var(--l) }
@keyframes grow{ from{ transform:scaleX(0) } to{ transform:scaleX(1) } }
@keyframes slide{ from{ opacity:0; transform:translateX(-12px) } to{ opacity:1; transform:none } }

/* Pills */
.pills{ display:flex; flex-wrap:wrap; gap:6px }
.pill{ display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:6px 14px; border-radius:999px; border:1px solid var(--line-2); background:var(--surface); color:var(--ink); font-size:14px; font-weight:500; text-decoration:none; line-height:1.3 }
.pill small{ font-size:12px; color:var(--muted); font-weight:600 }
.pill:hover, .pill[aria-current="page"]{ border-color:var(--accent); background:var(--tint) }
.pill.sm{ min-height:30px; padding:3px 10px; font-size:13px }
.pill.ind{ border:0; background:var(--chip) }
.groups{ display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:18px 28px }
.groups h3{ font-family:var(--serif); font-size:20px; font-weight:600; line-height:1.25; margin:0 0 10px }
.label{ font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin-right:4px }

/* Experience list + detail */
.xp{ list-style:none; margin:0; padding:0 }
.xp > li{ display:flex; flex-wrap:wrap; gap:6px 32px; padding:28px 0; border-top:1px solid var(--line) }
.xp-side{ flex:1 1 150px; max-width:190px }
.xp-side b{ display:block; font-size:15px }
.xp-side span{ display:block; font-size:14px; color:var(--muted) }
.xp-main{ flex:999 1 320px; min-width:0 }
.xp-main h2, .xp-main h3{ font-family:var(--serif); font-size:24px; font-weight:600; line-height:1.25 }
.xp-main h2 a, .xp-main h3 a{ color:inherit; text-decoration:none }
.xp-main h2 a:hover, .xp-main h3 a:hover{ color:var(--accent) }
.role{ margin:2px 0 0; font-size:15px; font-weight:500; color:var(--text) }
.status{ margin:2px 0 12px; font-size:14px; color:var(--muted) }
.eng{ font-size:12px; font-weight:600; letter-spacing:.04em; color:var(--accent-2) }
.umbrella{ background:var(--tint-soft); border-radius:14px; padding:0 20px; margin:24px 0 0; border:0 }
.umbrella > .head{ padding:24px 0 18px; border-bottom:1px solid var(--tint-2) }
.umbrella > .head h2{ font-family:var(--serif); font-size:30px; font-weight:600; line-height:1.2; margin:6px 0 2px }
.umbrella .xp > li:first-child{ border-top:0 }
.minis{ display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:8px; margin:0 0 14px }
.mini{ border:1px solid var(--line); border-radius:10px; background:var(--surface); padding:10px 12px }
.mini b{ display:block; font-family:var(--serif); font-size:22px; font-weight:600; line-height:1.1; color:var(--accent) }
.mini span{ display:block; font-size:13px; line-height:1.35; color:var(--text); margin-top:4px }
a.mini{ text-decoration:none; color:inherit; transition:border-color .2s ease, transform .2s ease }
a.mini:hover{ border-color:var(--accent); transform:translateY(-2px) }
/* Milestone target: the contribution flashes three times, slowly */
@keyframes msflashA{ 0%,100%{ background-color:transparent } 50%{ background-color:rgba(245,158,11,.32) } }
@keyframes msflashB{ 0%,100%{ background-color:transparent } 50%{ background-color:rgba(245,158,11,.32) } }
.st li, .cred li{ scroll-margin-top:110px; border-radius:6px }
.st li:target, .cred:target li{ animation:msflashA 1.6s ease-in-out 3 }
.st li.flash, .cred.flash li{ animation:msflashB 1.6s ease-in-out 3 }
.cred{ scroll-margin-top:110px }
@media (prefers-reduced-motion: reduce){ .st li:target, .cred:target li, .st li.flash, .cred.flash li{ animation:none; background-color:rgba(245,158,11,.32) } }
/* Topics filters */
.topic-filter{ margin:0 0 8px }
.topic-filter .label{ margin:14px 0 8px; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted) }
.js .topic-filter .chips{ display:flex; flex-wrap:wrap; gap:6px }
.fchip small{ color:var(--muted); font-size:12px; margin-left:2px }
#topic-note{ margin:10px 0 0; font-size:14px; min-height:1px }
.tagrow{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0 0 8px }
ul.hl, ul.st{ margin:0 0 12px; padding-left:20px; color:var(--text); max-width:76ch }
ul.hl li{ margin:4px 0 }
ul.st > li{ margin:10px 0 }
ul.st .tags{ display:flex; flex-wrap:wrap; gap:4px; margin-top:6px }
.more{ display:inline-flex; align-items:center; min-height:44px; padding:0 16px; border:1px solid var(--line-3); border-radius:10px; background:var(--surface); font-weight:600; font-size:14px; text-decoration:none }
.grp-h{ margin:28px 0 10px; font-family:var(--serif); font-size:22px; font-weight:600; line-height:1.25; color:var(--ink) }
.sec-h{ display:block; margin:8px 0 14px; font-family:var(--serif); font-size:24px; font-weight:600; line-height:1.2; color:var(--ink) }
.evi{ font-size:14px; font-weight:600; white-space:nowrap }
.prevnext{ display:flex; justify-content:space-between; gap:16px; border-top:1px solid var(--line); margin-top:32px; padding-top:20px }
.prevnext a{ text-decoration:none; font-weight:600; max-width:48% }
.prevnext small{ display:block; color:var(--muted); font-weight:500 }
.prevnext .next{ margin-left:auto; text-align:right }

/* Strip */
.strip-box{ overflow-x:auto; margin:0 0 24px }
.strip{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(9, minmax(84px, 1fr)); gap:4px; min-width:780px }
.strip li{ border-radius:8px; padding:8px 10px; background:var(--chip); color:var(--muted); font-size:12px; line-height:1.3 }
.strip li b{ display:block; font-weight:600 }
.strip li.on{ background:var(--accent); color:var(--on-accent) }

/* Grouped statement lists (skill / industry / AI / matrix) */
.grouped > div{ display:flex; flex-wrap:wrap; gap:4px 32px; padding:22px 0; border-top:1px solid var(--line) }
.grouped .g-side{ flex:1 1 150px; max-width:190px }
.grouped .g-side b{ display:block; font-size:15px }
.grouped .g-side span{ display:block; font-size:13px; color:var(--muted) }
.grouped .g-main{ flex:999 1 320px; min-width:0 }
.grouped h3{ font-size:18px; font-weight:600; line-height:1.3; margin:0 0 6px }
.grouped h3 a{ color:inherit; text-decoration:none }
.grouped ul{ margin:0; padding-left:20px; color:var(--text); max-width:76ch }
.grouped li{ margin:8px 0 }

/* Lens tabs on Topics */
.lenses{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin:8px 0 0 }
@media (max-width:760px){ .lenses{ grid-template-columns:repeat(2, minmax(0, 1fr)) } }
@media (max-width:440px){ .lenses{ grid-template-columns:1fr } }
.lenses a{ display:block; min-height:64px; padding:10px 16px; border-radius:12px; border:1.5px solid var(--line-2); background:var(--surface); color:var(--ink); text-decoration:none }
.lenses a b{ display:block; font-size:17px }
.lenses a span{ display:block; font-size:13px; color:var(--muted) }
.lenses a[aria-current="page"]{ background:var(--accent); border-color:var(--accent); color:var(--on-accent) }
.lenses a[aria-current="page"] span{ color:var(--on-accent); opacity:.8 }
.list-items{ display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:6px }
.list-items a{ display:flex; justify-content:space-between; align-items:center; gap:10px; min-height:48px; padding:6px 14px; border-radius:10px; border:1.5px solid var(--line); background:var(--surface); color:var(--ink); text-decoration:none; font-size:15px }
.list-items a small{ color:var(--muted); font-size:13px }
.list-items a:hover, .list-items a[aria-current="page"]{ border-color:var(--accent); background:var(--tint) }

/* Milestones */
.ms{ list-style:none; margin:0; padding:0 }
.ms li{ display:flex; flex-wrap:wrap; gap:6px 32px; padding:24px 0; border-top:1px solid var(--line) }
.ms .rank{ font-size:13px; font-weight:700; letter-spacing:.06em; color:var(--accent) }
.ms .fig{ font-family:var(--serif); font-size:34px; font-weight:600; line-height:1.1; color:var(--accent) }
.ms h3{ font-size:19px; font-weight:600; line-height:1.35; margin:6px 0 4px }
.ms p{ margin:0 0 4px; color:var(--text-2); max-width:70ch }

/* Heat maps (AI explorer, matrix) */
.tiles{ display:flex; flex-wrap:wrap; gap:12px }
.fam{ flex:var(--g) 1 300px; min-width:0; border:1px solid var(--line); border-radius:14px; background:var(--surface); padding:12px }
.fam-h{ display:flex; width:100%; justify-content:space-between; align-items:baseline; gap:8px; min-height:40px; padding:0 4px; border:0; background:transparent; font:inherit; cursor:pointer; text-align:left; color:var(--ink) }
.fam-h b{ font-size:16px }
.fam-h span{ font-size:13px; color:var(--muted) }
.tile-row{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px }
.tile{ flex:var(--g) 1 120px; min-height:var(--h); display:flex; flex-direction:column; justify-content:space-between; gap:6px; padding:8px 10px; border-radius:8px; font:inherit; font-size:13px; font-weight:600; line-height:1.3; text-align:left; cursor:pointer; border:2px solid transparent; transition:background-color .3s ease, border-color .3s ease }
.tile b{ font-family:var(--serif); font-size:22px; line-height:1 }
.s0{ background:var(--muted-bg); color:var(--muted) } .s1{ background:var(--tint); color:var(--ink) } .s2{ background:var(--tint-2); color:var(--ink) }
.s3{ background:var(--accent-2); color:var(--on-accent) } .s4{ background:var(--accent); color:var(--on-accent) }
.sel{ border-color:var(--ring) !important }
.hm-box{ overflow:auto; max-height:75vh; border:1px solid var(--line); border-radius:14px; background:var(--surface) }
.hm{ border-collapse:separate; border-spacing:3px; font-size:13px }
.hm th{ background:var(--surface); font-weight:600; text-align:left }
.hm thead th{ position:sticky; top:0; z-index:2; vertical-align:bottom; padding:6px 2px; box-shadow:0 1px 0 var(--line) }
.hm thead th.vert span{ writing-mode:vertical-rl; transform:rotate(180deg); display:inline-block; max-height:224px; font-size:12px; line-height:1.2 }
.hm thead th.vert{ height:236px; text-align:center }
.hm thead th.corner{ left:0; z-index:3; min-width:260px; padding:8px 10px; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:var(--accent) }
.hm tbody th{ position:sticky; left:0; z-index:1; min-width:260px; max-width:320px; padding:4px 10px; font-weight:500 }
.hm tbody th small{ display:block; color:var(--muted); font-weight:400; font-size:12px }
.hm td{ padding:0 }
.hm td button{ width:46px; height:40px; border-radius:6px; font:inherit; font-size:13px; font-weight:600; cursor:pointer; border:2px solid transparent }
.seg{ display:flex; flex-wrap:wrap; align-items:center; gap:6px }
.seg button{ min-height:40px; padding:0 14px; border-radius:999px; font:inherit; font-size:14px; font-weight:600; cursor:pointer; background:var(--surface); color:var(--ink); border:1.5px solid var(--line-2) }
.seg button[aria-pressed="true"]{ background:var(--accent); color:var(--on-accent); border-color:var(--accent) }
.controls{ display:flex; flex-wrap:wrap; gap:12px 32px; margin:0 0 18px }
.result-h{ margin:32px 0 4px }
.result-h h3{ font-family:var(--serif); font-size:24px; font-weight:600; line-height:1.3 }

/* Search */
.search{ display:flex; flex-direction:column; gap:4px; max-width:560px; font-size:13px; font-weight:600; color:var(--text-2); margin:0 0 16px }
.search input{ min-height:48px; border:1px solid var(--line-3); border-radius:10px; padding:0 14px; font:inherit; font-size:16px; font-weight:400; background:var(--surface); color:var(--ink) }
mark{ background:var(--tint-2); color:inherit; border-radius:3px; padding:0 2px }

/* Credentials */
.cred-nav{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px }
.cred-nav a{ display:inline-flex; align-items:center; min-height:40px; padding:0 14px; border-radius:999px; background:var(--chip); color:var(--ink); font-size:14px; text-decoration:none }
.cred{ display:flex; flex-wrap:wrap; gap:4px 32px; padding:28px 0; border-top:1px solid var(--line); scroll-margin-top:90px }
.cred-h{ flex:1 1 220px; max-width:260px }
.cred h2{ font-family:var(--serif); font-size:22px; font-weight:600; line-height:1.3 }
.cred ul{ flex:999 1 320px; min-width:0; margin:0; padding-left:20px; color:var(--text); max-width:76ch }
.cred li{ margin:6px 0 }

/* Footer */
.site-foot{ background:var(--band); color:var(--band-text); margin-top:24px }
.site-foot .wrap{ padding-block:48px; display:flex; flex-wrap:wrap; justify-content:space-between; gap:24px; font-size:15px }
.site-foot b{ display:block; font-family:var(--serif); font-size:22px; font-weight:600; color:var(--band-fg) }
.site-foot a{ color:var(--band-fg) }
.site-foot nav{ display:flex; flex-direction:column; gap:4px }

[hidden]{ display:none !important }
.js-only{ display:none }
.js .js-only{ display:block }
/* Career filter by skill */
.js .career-filter{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 10px }
.fchip{ min-height:40px; padding:0 14px; border-radius:999px; border:1px solid var(--line-2); background:var(--surface); color:var(--ink); font:inherit; font-size:14px; cursor:pointer }
.fchip[aria-pressed="true"]{ border-color:var(--accent); background:var(--tint); color:var(--accent); font-weight:600 }
#career-note{ margin:0 0 8px; font-size:14px }
.xp > li.off{ opacity:.5 }
.xp > li.off .xp-main > :not(h3):not(.role):not(.eng){ display:none }
.xp > li.filtered .hl, .xp > li.filtered .tagrow, .xp > li.filtered .more{ display:none }
.xp .hits{ margin:8px 0 12px; padding-left:20px; color:var(--text); max-width:76ch }
.xp .hits li{ margin:6px 0 }
.umbrella.off > .head{ opacity:.5 }
.js .no-js{ display:none }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation:none !important; transition:none !important; scroll-behavior:auto !important }
}
@media print{
  .tabs, .site-foot, .search, .controls, .cred-nav{ display:none } body{ background:#fff; color:#000 } .band{ background:#fff; color:#000 }
}
.ms-links{ display:flex; flex-wrap:wrap; gap:4px 20px; margin:6px 0 0 }
.ms-links a{ display:inline-flex; align-items:center; min-height:40px }
.cred-link{ margin:4px 0 8px }

/* Default (white) theme: blue and dark-blue accents */
:root:not([data-theme="dark"]) .band{ border-bottom:1px solid var(--line) }
:root:not([data-theme="dark"]) .site-foot{ border-top:4px solid var(--accent) }
:root:not([data-theme="dark"]) .site-head{ border-top:4px solid var(--accent) }
:root:not([data-theme="dark"]) .brand-t b{ color:var(--accent) }
:root[data-theme="dark"] .brand .mono{ color:#0E1116; box-shadow:none }
:root:not([data-theme="dark"]) .tabs a[aria-current="page"]{ border-bottom-color:var(--accent-2); background:var(--tint-soft) }
:root:not([data-theme="dark"]) .tabs a:hover{ background:var(--tint-soft) }
:root:not([data-theme="dark"]) .hero h1, :root:not([data-theme="dark"]) .page-head h1, :root:not([data-theme="dark"]) .section h2, :root:not([data-theme="dark"]) .band h2, :root:not([data-theme="dark"]) .band h3, :root:not([data-theme="dark"]) .grp-h, :root:not([data-theme="dark"]) .sec-h, :root:not([data-theme="dark"]) .card .n, :root:not([data-theme="dark"]) .cred h2{ color:var(--accent) }
:root:not([data-theme="dark"]) .eyebrow, :root:not([data-theme="dark"]) .card .k, :root:not([data-theme="dark"]) .talks .when, :root:not([data-theme="dark"]) .snapshot dt{ color:var(--accent-2) }
:root:not([data-theme="dark"]) .snapshot{ background:var(--tint-soft); border-left:4px solid var(--accent-2) }
:root:not([data-theme="dark"]) .stats div{ border-top:3px solid var(--accent-2) }
:root:not([data-theme="dark"]) .card{ border-top:3px solid var(--accent-2) }
:root:not([data-theme="dark"]) a.card:hover{ border-color:var(--accent-2); box-shadow:0 6px 18px rgba(11,61,110,.10) }
:root:not([data-theme="dark"]) .vision li{ border-color:var(--line); border-left:4px solid var(--accent-2); background:var(--tint-soft) }
:root:not([data-theme="dark"]) .vision .t, :root:not([data-theme="dark"]) .talks .t{ color:var(--accent) }
:root:not([data-theme="dark"]) .talks a{ background:var(--chip); border-left:3px solid var(--accent) }
:root:not([data-theme="dark"]) .talks a:hover{ background:var(--tint) }
:root:not([data-theme="dark"]) .btn-band{ background:var(--accent); color:#FFFFFF }
:root:not([data-theme="dark"]) .pill{ background:var(--chip); border-color:transparent; color:var(--accent) }
:root:not([data-theme="dark"]) .pill.ind{ background:var(--tint) }
:root:not([data-theme="dark"]) .pill:hover, :root:not([data-theme="dark"]) .pill[aria-current="page"]{ background:var(--accent); border-color:var(--accent); color:#FFFFFF }
:root:not([data-theme="dark"]) .pill:hover small, :root:not([data-theme="dark"]) .pill[aria-current="page"] small{ color:#D5E2F5 }
:root:not([data-theme="dark"]) .fchip[aria-pressed="true"]{ background:var(--accent); border-color:var(--accent); color:#FFFFFF }
:root:not([data-theme="dark"]) .fchip[aria-pressed="true"] small{ color:#D5E2F5 }
:root:not([data-theme="dark"]) .umbrella{ border-left:4px solid var(--accent-2) }
:root:not([data-theme="dark"]) .mini{ border-left:3px solid var(--accent-2) }

/* Theme toggle (header icon) */
.site-head .wrap{ display:flex; align-items:center; justify-content:space-between; gap:12px }
.theme-toggle{ display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:50%; border:1px solid var(--line-2); background:var(--surface); color:var(--accent); cursor:pointer }
.theme-toggle:hover{ background:var(--tint) }
.theme-toggle svg{ width:20px; height:20px }
.theme-toggle .sun{ display:none }
:root[data-theme="dark"] .theme-toggle .sun{ display:block }
:root[data-theme="dark"] .theme-toggle .moon{ display:none }

/* Knowledge graph */
:root{ --kg-person:#0B3D6E; --kg-experience:#1F6FD1; --kg-organisation:#5A6B82; --kg-partner:#0E8A7E; --kg-product:#6D4FC2; --kg-technology:#9B6BD8; --kg-event:#D97706; --kg-industry:#0E7490; --kg-skill:#3F67B0; --kg-place:#94A3B8; --kg-edge:#C6D4E8 }
:root[data-theme="dark"]{ --kg-person:#8DB3F0; --kg-experience:#5E9BEF; --kg-organisation:#A7B0BC; --kg-edge:#343C47 }
.kg-legend{ display:none } .js .kg-legend{ display:flex; flex-wrap:wrap; gap:6px; margin:20px 0 10px }
.kg-type i{ display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; background:var(--kg-c) }
.kg-type[aria-pressed="false"]{ opacity:.5 }
.t-person{ --kg-c:var(--kg-person) } .t-experience{ --kg-c:var(--kg-experience) } .t-organisation{ --kg-c:var(--kg-organisation) } .t-partner{ --kg-c:var(--kg-partner) }
.t-product{ --kg-c:var(--kg-product) } .t-technology{ --kg-c:var(--kg-technology) } .t-event{ --kg-c:var(--kg-event) } .t-industry{ --kg-c:var(--kg-industry) }
.t-skill{ --kg-c:var(--kg-skill) } .t-place{ --kg-c:var(--kg-place) }
.js .kg-tools{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:10px; margin:0 0 10px }
.kg-find{ flex:1 1 280px; max-width:420px }
.kg-zoom{ display:flex; gap:6px }
.kg-wrap{ display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start }
.kg-box{ flex:999 1 560px; min-width:0; border:1px solid var(--line); border-radius:14px; background:var(--surface); overflow:hidden; touch-action:none }
.kg-svg{ display:block; width:100%; height:auto; aspect-ratio:1200/820; cursor:grab; user-select:none }
.kg-svg.drag{ cursor:grabbing }
.kg-edges line{ stroke:var(--kg-edge); stroke-width:1.2 }
.kg-n{ cursor:pointer; outline:none }
.kg-n circle{ fill:var(--kg-c); stroke:var(--surface); stroke-width:2 }
.kg-n text{ font-size:12px; fill:var(--ink); paint-order:stroke; stroke:var(--surface); stroke-width:3px; stroke-linejoin:round; pointer-events:none; display:none }
.kg-n.lab text, .kg-n:hover text, .kg-n:focus text, .kg-n.on text, .kg-n.nb text{ display:block }
.kg-n.t-person text, .kg-n.t-experience text{ font-weight:700; font-size:13px }
.kg-n:focus-visible circle{ stroke:var(--ring); stroke-width:3 }
.kg-svg.sel .kg-n{ opacity:.18 } .kg-svg.sel .kg-n.on, .kg-svg.sel .kg-n.nb{ opacity:1 }
.kg-svg.sel .kg-edges line{ opacity:.12 } .kg-svg.sel .kg-edges line.on{ opacity:1; stroke:var(--accent-2); stroke-width:2 }
.kg-n.on circle{ stroke:var(--ring); stroke-width:3 }
.kg-hide{ display:none }
.kg-panel{ flex:1 1 260px; max-width:100%; border:1px solid var(--line); border-radius:14px; background:var(--surface); padding:16px 18px; font-size:14px }
.kg-panel h3{ font-family:var(--serif); font-size:20px; margin:0 0 2px; color:var(--accent) }
.kg-panel .k{ font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent-2); margin:0 0 10px }
.kg-panel ul{ list-style:none; margin:0; padding:0 } .kg-panel li{ padding:6px 0; border-top:1px solid var(--line) }
.kg-panel li button{ font:inherit; color:var(--accent); background:none; border:0; padding:0; cursor:pointer; text-align:left; font-weight:600 }
.kg-panel .rel{ color:var(--muted) }
@media (max-width:640px){ .kg-n text{ font-size:15px } }

/* Knowledge graph explorer (force-graph) */
.vh{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0) }
.kgx-bar{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; margin:0 0 10px }
.kgx-crumbs{ flex:1 1 100%; display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; font-size:15px; min-height:32px }
.kgx-crumbs button{ font:inherit; border:0; background:none; padding:2px 4px; color:var(--accent-2); cursor:pointer; text-decoration:underline; text-underline-offset:3px }
.kgx-crumbs .cur{ font-weight:700; color:var(--accent) } .kgx-crumbs .sep{ color:var(--muted) }
.kgx-btns{ display:flex; flex-wrap:wrap; gap:6px }
.kgx-btns button, .kgx-legend button{ min-height:38px; padding:0 12px; border-radius:999px; border:1px solid var(--line-2); background:var(--surface); color:var(--accent); font:inherit; font-size:13px; font-weight:600; cursor:pointer }
.kgx-btns button[aria-pressed="true"]{ background:var(--accent); border-color:var(--accent); color:#FFFFFF }
.kgx-find{ flex:1 1 240px; max-width:360px } .kgx-find input{ width:100%; min-height:40px; border:1px solid var(--line-3); border-radius:10px; padding:0 12px; font:inherit; font-size:14px; background:var(--surface); color:var(--ink) }
.kgx-legend{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px }
.kgx-legend button{ color:var(--ink); font-weight:500; display:inline-flex; align-items:center; gap:6px }
.kgx-legend i{ width:10px; height:10px; border-radius:50% } .kgx-legend button[aria-pressed="false"]{ opacity:.45; text-decoration:line-through }
.kgx-main{ display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start }
.kgx-stage{ flex:999 1 560px; min-width:0; position:relative; border:1px solid var(--line); border-radius:14px; overflow:hidden; background:radial-gradient(circle at 50% 50%, var(--tint-soft), var(--surface) 70%) }
.kgx-canvas{ width:100%; min-height:460px }
.kgx-hint{ position:absolute; left:12px; bottom:8px; margin:0; font-size:12px; color:var(--muted); pointer-events:none }
.kgx-panel{ flex:1 1 320px; max-width:100%; max-height:680px; overflow:auto; border:1px solid var(--line); border-radius:14px; background:var(--surface); padding:16px 18px; font-size:14px }
.kgx-panel h3{ font-family:var(--serif); font-size:22px; line-height:1.25; margin:0 0 6px; color:var(--accent) }
.kgx-k{ font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent-2); margin:12px 0 6px }
.kgx-open{ margin:0 0 6px } .kgx-open a{ font-weight:600 }
.kgx-sub{ display:flex; flex-wrap:wrap; gap:4px; margin:6px 0 4px; color:var(--muted) }
.kgx-sub button{ font:inherit; font-size:12px; border:1px solid var(--line-2); border-left:4px solid var(--c); border-radius:999px; background:var(--surface); color:var(--ink); padding:2px 8px; cursor:pointer }
.kgx-sub button:hover{ background:var(--tint) }
.kgx-g h4{ margin:14px 0 4px; font-size:15px; color:var(--accent) } .kgx-g h4 small{ color:var(--muted); font-weight:500 } .kgx-g h4 span{ font-size:12px; color:var(--on-accent); background:var(--accent-2); border-radius:999px; padding:1px 7px; margin-left:4px }
.kgx-g ul{ margin:0; padding-left:18px } .kgx-g li{ margin:6px 0; color:var(--text); line-height:1.5 }
.kgx-g .via{ display:block; font-size:12px; color:var(--muted) }
@media (max-width:640px){ .kgx-panel{ max-height:none } }
/* KG viewer — dark stage, glowing nodes, side controls (style of the GLiNER knowledge-graph viewer) */
.kgx-stage.dark{ background:radial-gradient(ellipse at 50% 40%, #13213A 0%, #0B1220 70%); border-color:#1E2A44 }
.kgx-stage.dark:fullscreen{ border-radius:0 }
.kgx-side{ position:absolute; right:12px; bottom:56px; display:flex; flex-direction:column; gap:8px }
.kgx-side button{ width:44px; height:44px; border-radius:12px; border:1px solid #2A3A5C; background:rgba(15,25,45,.85); color:#E6EDF7; cursor:pointer; display:flex; align-items:center; justify-content:center }
.kgx-side button:hover{ border-color:#22D3EE; color:#22D3EE }
.kgx-side svg{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round }
.kgx-stage.dark .kgx-hint{ color:#94A3B8; font-size:13px; left:14px; bottom:12px } .kgx-hint kbd{ font:600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color:#E6EDF7; border:1px solid #3B4B6B; border-radius:6px; padding:3px 6px; background:rgba(255,255,255,.04) }
.kgx-count{ position:absolute; right:14px; top:10px; margin:0; font-size:13px; color:#94A3B8; pointer-events:none }
.kgx-acts{ display:flex; flex-wrap:wrap; gap:6px 16px; margin:0 0 6px } .kgx-acts button{ font:inherit; font-weight:600; color:var(--accent-2); background:none; border:0; padding:0; cursor:pointer }
.kgx-path{ margin:0 0 10px; padding-left:20px } .kgx-path li{ margin:6px 0 } .kgx-path .kgx-rel{ display:block; font-size:12px; color:var(--muted) }
.kgx-path button{ font:inherit; font-weight:600; border:1px solid var(--line-2); border-left:4px solid var(--c); border-radius:999px; background:var(--surface); color:var(--ink); padding:2px 10px; cursor:pointer }
@media (max-width:640px){ .kgx-side{ bottom:auto; top:44px } .kgx-count{ display:none } }
#ai-title, #mx-title{ scroll-margin-top:110px }

/* Speaking: cards, year groups, talk page, gallery, lightbox */
.tgrid{ list-style:none; margin:0 0 8px; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:14px }
.tcard{ display:flex; flex-direction:column; height:100%; border:1px solid var(--line); border-radius:14px; overflow:hidden; background:var(--surface); color:var(--ink); text-decoration:none; transition:border-color .2s ease, transform .2s ease, box-shadow .2s ease }
.tcard:hover{ border-color:var(--accent-2); transform:translateY(-2px); box-shadow:0 6px 18px rgba(11,61,110,.10) }
.tcard img, .tc-ph{ display:block; width:100%; height:170px; object-fit:cover; background:var(--muted-bg) }
.tc-ph{ display:flex; align-items:center; justify-content:center; font-family:var(--serif); font-size:40px; font-weight:600; color:var(--accent-2); background:var(--tint) }
.tc-b{ display:flex; flex-direction:column; gap:4px; padding:14px 16px 16px }
.tc-b .when{ font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent-2) }
.tc-b .t{ font-weight:600; line-height:1.35; color:var(--accent) }
.tc-b .k{ font-size:13px; color:var(--muted); line-height:1.45 }
.tgrid li:target .tcard{ outline:3px solid var(--ring); outline-offset:2px }
.year-h{ font-family:var(--serif); font-size:28px; font-weight:600; margin:32px 0 14px; color:var(--accent) }
.talk-text{ font-size:18px; line-height:1.65; color:var(--text-2); max-width:72ch; margin:8px 0 0 }
.talk-points{ max-width:72ch; margin:14px 0 0; padding-left:22px; color:var(--text-2) }
.talk-points li{ margin:6px 0 }
.gallery{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:10px }
.gallery a{ display:block; border-radius:10px; overflow:hidden; background:var(--muted-bg); border:1px solid var(--line) }
.gallery img{ display:block; width:100%; height:180px; object-fit:cover; transition:transform .3s ease }
.gallery a:hover img{ transform:scale(1.03) }
@media (max-width:480px){ .gallery{ grid-template-columns:repeat(2, minmax(0, 1fr)) } .gallery img{ height:130px } }
.lb{ border:0; padding:0; max-width:100vw; max-height:100vh; width:100vw; height:100vh; background:rgba(5,12,22,.92); color:#fff }
.lb::backdrop{ background:rgba(5,12,22,.92) }
.lb figure{ margin:0; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:56px 16px 16px }
.lb img{ max-width:100%; max-height:calc(100vh - 110px); object-fit:contain; border-radius:6px }
.lb figcaption{ margin-top:10px; font-size:14px; color:#C9D3E0 }
.lb button{ position:absolute; min-width:48px; min-height:48px; border:0; border-radius:999px; background:rgba(255,255,255,.12); color:#fff; font-size:24px; cursor:pointer }
.lb button:hover{ background:rgba(255,255,255,.22) }
.lb .lb-x{ top:12px; right:12px } .lb .lb-p{ left:12px; top:50% } .lb .lb-n{ right:12px; top:50% }

/* Mobile & touch: every tap target at least 44 px high, comfortable spacing */
.site-foot nav a{ display:inline-flex; align-items:center; min-height:44px }
@media (pointer:coarse), (max-width:640px){
  .pill.sm{ min-height:40px; padding:6px 12px }
  .kgx-btns button, .kgx-legend button{ min-height:44px }
  .tagrow{ gap:8px }
}

/* Phones: compact one-line navigation and horizontally scrolling chip rows, so content starts on the first screen */
@media (max-width:640px){
  .tabs ul{ flex-wrap:nowrap; gap:0; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; padding-left:8px; padding-right:8px }
  .tabs ul::-webkit-scrollbar{ display:none }
  .tabs li{ flex:none }
  .tabs a{ min-height:48px; display:flex; align-items:center; padding:0 12px; border-bottom-width:3px }
  .tabs a b{ font-size:16px; white-space:nowrap }
  .tabs a span{ display:none }
  .js .career-filter, .js .topic-filter .chips, .tagrow, .cred-nav, ul.st .tags{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; padding-bottom:4px;
    -webkit-mask-image:linear-gradient(90deg, #000 85%, transparent); mask-image:linear-gradient(90deg, #000 85%, transparent) }
  .js .career-filter::-webkit-scrollbar, .js .topic-filter .chips::-webkit-scrollbar, .tagrow::-webkit-scrollbar, .cred-nav::-webkit-scrollbar, ul.st .tags::-webkit-scrollbar{ display:none }
  ul.st .tags .pill{ flex:none; white-space:nowrap }
  .fchip, .tagrow > *, .cred-nav a{ flex:none; white-space:nowrap }
  .lenses{ grid-template-columns:repeat(2, minmax(0, 1fr)) }
  .lenses a{ padding:10px 12px }
  .lenses a b{ font-size:15px }
  .lenses a span{ font-size:12px }
  .page-head h1{ font-size:clamp(30px, 8.5vw, 40px) }
}
@media (max-width:340px){ .lenses{ grid-template-columns:1fr } }
.tc-ph{ flex-direction:column; gap:6px; background:linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); color:#FFFFFF }
.tc-ph b{ font-family:var(--serif); font-size:44px; font-weight:600; line-height:1 }
.tc-ph small{ font-family:var(--sans); font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; opacity:.85 }
.tcard img.fit-contain{ object-fit:contain; padding:16px; background:#FFFFFF }
