/* Shared layout. Colors, fonts and personality live in theme.css */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: 1.08; }
h1 em, h2 em { font-family: var(--font-em); font-style: var(--em-style); font-weight: var(--em-weight); color: var(--accent); }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
@media (min-width: 720px) { .wrap { width: min(1160px, 100% - 64px); } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 22px; text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav ul { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-size: 15px; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav .nav-cta { color: var(--text); border: 1px solid var(--line-strong); padding: 8px 16px; border-radius: var(--pill); }
.nav .nav-cta:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) { .hide-sm { display: none; } }

/* Hero */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px); position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: clamp(36px, 5vw, 72px); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.25fr 0.75fr; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: var(--eyebrow-tracking); text-transform: var(--eyebrow-case); color: var(--muted); font-family: var(--font-label); margin-bottom: 24px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(40px, 6.4vw, var(--h1-max)); margin-bottom: 24px; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 40em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-row.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: var(--pill); font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .2s, background .2s, border-color .2s, color .2s; border: 1px solid transparent; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-photo { margin: 0; position: relative; max-width: 440px; justify-self: center; width: 100%; }
.hero-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius-lg); }
.badge { position: absolute; left: -16px; bottom: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: grid; line-height: 1.3; box-shadow: var(--shadow); }
.badge strong { font-size: 15px; }
.badge span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 520px) { .badge { left: 12px; } }

/* Stats */
.stats { border-block: 1px solid var(--line); background: var(--bg-alt); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 28px 20px; border-left: 1px solid var(--line); display: grid; gap: 6px; }
.stat:nth-child(odd) { border-left: 0; }
@media (min-width: 900px) { .stat:nth-child(odd) { border-left: 1px solid var(--line); } .stat:first-child { border-left: 0; } }
@media (max-width: 899px) { .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.stat b { font-family: var(--font-display); font-size: clamp(24px, 2.6vw, 32px); font-weight: var(--display-weight); letter-spacing: -0.02em; color: var(--stat-color); line-height: 1.1; }
.stat span { font-size: 14px; color: var(--muted); line-height: 1.45; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: clamp(32px, 4vw, 56px); max-width: 760px; }
.kicker { font-family: var(--font-label); font-size: 13px; letter-spacing: var(--eyebrow-tracking); text-transform: var(--eyebrow-case); color: var(--accent); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, var(--h2-max)); }
.section-sub { color: var(--muted); font-size: 18px; margin-top: 18px; }

.about-grid { display: grid; gap: 24px 64px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 0.9fr 1.1fr; } .about-grid .section-head { margin-bottom: 0; } }
.about-body p { color: var(--muted); font-size: 18px; }
.about-body strong { color: var(--text); font-weight: 600; }
.about-body em { color: var(--text); }

.cards { display: grid; gap: 20px; margin-top: clamp(48px, 6vw, 80px); }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; transition: border-color .25s, transform .25s; }
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card-icon { width: 44px; height: 44px; border-radius: var(--radius); display: grid; place-items: center; background: var(--accent-soft); margin-bottom: 20px; }
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 20px; margin-bottom: 10px; font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* Global affairs */
.global-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 760px) { .global-grid { grid-template-columns: repeat(2, 1fr); } }
.gcard { background: var(--bg); padding: clamp(24px, 3vw, 40px); }
.gnum { font-family: var(--font-label); font-size: 13px; color: var(--accent); display: block; margin-bottom: 18px; }
.gcard h3 { font-size: 22px; margin-bottom: 10px; }
.gcard p { color: var(--muted); margin: 0; font-size: 16px; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.job { display: grid; gap: 8px 48px; padding: 32px 0; border-top: 1px solid var(--line); }
.job:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .job { grid-template-columns: 200px 1fr; } }
.job-meta { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
@media (min-width: 820px) { .job-meta { flex-direction: column; } }
.when { font-family: var(--font-label); font-size: 14px; color: var(--muted); padding-top: 4px; }
.tag { font-family: var(--font-label); font-size: 12px; padding: 3px 10px; border-radius: var(--pill); background: var(--accent-soft); color: var(--accent); }
.job-body h3 { font-size: clamp(21px, 2.2vw, 26px); margin-bottom: 10px; }
.at { display: inline-block; font-family: var(--font-sans); font-size: 0.68em; font-weight: 500; color: var(--accent); letter-spacing: 0; margin-left: 8px; vertical-align: 0.12em; }
.job-body > p { color: var(--muted); }
.job-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.job-body li { position: relative; padding-left: 22px; color: var(--muted); font-size: 16px; }
.job-body li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 1.5px; background: var(--accent); }
.job-body li em { color: var(--text); }
.job-body strong { color: var(--text); font-weight: 600; }
.job-compact .job-body p { margin: 0; }

/* Speaking */
.speaking-grid { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (min-width: 900px) { .speaking-grid { grid-template-columns: 1fr 1fr; } }
.speaking-photo { margin: 0; }
.speaking-photo img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4/3; object-fit: cover; filter: var(--photo-filter); }
.talks { list-style: none; margin: 0; padding: 0; }
.talks li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.talks li:last-child { border-bottom: 1px solid var(--line); }
.year { font-family: var(--font-label); font-size: 14px; color: var(--accent); padding-top: 2px; }
.talks b { display: block; font-weight: 600; font-size: 17px; line-height: 1.35; }
.talks span:not(.year) { font-size: 14.5px; color: var(--muted); }

/* Credentials */
.cred-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .cred-grid { grid-template-columns: repeat(3, 1fr); } }
.cred { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.cred h3 { font-family: var(--font-label); font-size: 13px; font-weight: 600; letter-spacing: var(--eyebrow-tracking); text-transform: var(--eyebrow-case); color: var(--accent); margin-bottom: 14px; }
.cred h3.mt { margin-top: 28px; }
.cred ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cred li { display: grid; line-height: 1.4; }
.cred b { font-weight: 600; font-size: 15.5px; }
.cred li span { font-size: 14px; color: var(--muted); }

/* Contact */
.contact { padding: clamp(80px, 11vw, 140px) 0; text-align: center; background: var(--contact-bg); }
.contact-inner { max-width: 720px; }
.contact h2 { font-size: clamp(36px, 5.4vw, var(--h2-max)); margin-bottom: 18px; }
.contact p:not(.kicker) { color: var(--muted); font-size: 18px; }

.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* Scroll reveal (only when JS is on and motion is allowed) */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Experience: organization grid */
.orgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 600px) { .orgs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .orgs { grid-template-columns: repeat(3, 1fr); } }
.orgs li { background: var(--bg); padding: clamp(24px, 3vw, 36px); display: grid; gap: 6px; }
.orgs b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(22px, 2.4vw, 30px); letter-spacing: var(--display-tracking); line-height: 1.1; }
.orgs span { font-size: 14.5px; color: var(--muted); }
