/* Draft A · Classic
   The reference site's look (navy Cormorant Garamond headings, Raleway text,
   alternating grey/white bands, centred hero with portrait), rebuilt with real
   hierarchy: sticky section nav, readable body weight, aligned role/year ledgers. */

:root {
  --bg: #FFFFFF;
  --tint: #EFEEEB;
  --ink: #1E2630;
  --muted: #56606E;
  --navy: #0F3A63;
  --rule: #DAD7D0;
  --card: #FFFFFF;
  --chip: #F4F3EF;
  --band-navy: #0F3A63;
  --on-navy: #F4F6F9;
  --on-navy-muted: #C6D3E3;
  --portrait-bg: #D7DEE6;
  --portrait-ink: #0F3A63;
  --focus: #0F3A63;
  --shadow: 0 34px 60px -34px rgba(13, 32, 54, .5);

  --font-display: 'Cormorant Garamond Variable', 'Cormorant Garamond', Garamond, Georgia, serif;
  --font-body: 'Raleway Variable', 'Raleway', 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1120px;
  --narrow: 720px;
  --gutter: 16px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0D141C;
  --tint: #121B26;
  --ink: #E3E8EE;
  --muted: #A5B0BE;
  --navy: #B3C9E6;
  --rule: #263240;
  --card: #16212E;
  --chip: #1B2836;
  --band-navy: #0B2138;
  --on-navy: #F1F4F8;
  --on-navy-muted: #B5C4D6;
  --portrait-bg: #1A293A;
  --portrait-ink: #B3C9E6;
  --focus: #B3C9E6;
  --shadow: 0 34px 60px -34px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
@media (min-width: 640px) { :root { --gutter: 32px; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 450;
  line-height: 1.7;
  font-variant-numeric: lining-nums;
}
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 650; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(var(--narrow), 100% - 2 * var(--gutter)); }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
/* Grid keeps the theme toggle pinned top-right at every width; the section nav
   drops to its own scrollable row when the window is too narrow for one line. */
.header-inner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  column-gap: 1.25rem; min-height: 64px;
}
.wordmark {
  white-space: nowrap;
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; line-height: 1;
  color: var(--navy); text-decoration: none;
}
.site-nav {
  justify-self: end; min-width: 0; display: flex; gap: 0 1.35rem;
  overflow-x: auto; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: none; display: inline-flex; align-items: center; min-height: 44px;
  color: var(--muted); text-decoration: none;
  font-size: .82rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
}
.site-nav a:hover { color: var(--navy); }
.theme-toggle { grid-column: 3; grid-row: 1; --toggle-border: var(--rule); color: var(--navy); }
@media (max-width: 1080px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; padding-top: .4rem; }
  .theme-toggle { grid-column: 2; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; gap: 0 1.1rem; border-top: 1px solid var(--rule); }
  .site-nav a { font-size: .72rem; letter-spacing: .08em; }
}

/* ---------- Bands & section titles ---------- */
.band { padding-block: clamp(3.75rem, 2.5rem + 5vw, 6.5rem); }
.band--tint { background: var(--tint); }
.section-title {
  font-family: var(--font-display); font-weight: 500; color: var(--navy);
  font-size: clamp(2.3rem, 1.7rem + 2.6vw, 3.4rem); line-height: 1.05; letter-spacing: -.005em;
  text-align: center; text-wrap: balance;
}
.section-title::after {
  content: ''; display: block; width: 56px; height: 1px; margin: .55em auto 0;
  background: currentColor; opacity: .45;
}
.section-head { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); text-align: center; }
.section-sub {
  margin-top: .9rem; color: var(--muted);
  font-size: .8rem; font-weight: 650; letter-spacing: .2em; text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: clamp(3rem, 2rem + 5vw, 5.75rem); }
.hero h1 {
  font-family: var(--font-display); font-weight: 500; color: var(--navy);
  font-size: clamp(3.1rem, 2rem + 5.6vw, 5.5rem); line-height: 1; letter-spacing: -.01em;
}
.postnominal {
  display: block; margin-top: 1.1rem;
  font-family: var(--font-body); font-size: clamp(.8rem, .75rem + .25vw, .95rem); font-weight: 650;
  letter-spacing: .32em; text-transform: uppercase; color: var(--muted);
}
.hero-roles { max-width: 44rem; margin: 1.5rem auto 0; font-size: clamp(1rem, .95rem + .3vw, 1.125rem); }
.hero-tagline {
  margin-top: .85rem; color: var(--navy);
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.45rem, 1.25rem + .9vw, 1.9rem);
}
.hero-portrait {
  width: min(280px, 72%); aspect-ratio: 1; margin: 2.5rem auto 0;
  border-radius: 3px; box-shadow: var(--shadow);
  --portrait-size: clamp(4rem, 3rem + 4vw, 6rem); --portrait-font: var(--font-display);
}
.hero-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 980px; margin: 3.25rem auto 0;
  border-block: 1px solid var(--rule);
}
.hero-facts li { display: grid; align-content: start; gap: .35rem; padding: 1.35rem 1.25rem; }
.hero-facts li + li { border-left: 1px solid var(--rule); }
.fact-k { color: var(--navy); font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.fact-v { font-size: .98rem; line-height: 1.45; }
@media (max-width: 760px) {
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts li + li { border-left: 0; border-top: 1px solid var(--rule); }
}

/* ---------- About ---------- */
#about .section-title { margin-bottom: 2rem; }
.lede { font-size: clamp(1.2rem, 1.1rem + .4vw, 1.375rem); line-height: 1.55; font-weight: 500; }
#about p + p { margin-top: 1.15em; }

/* ---------- Engagement and Impact ---------- */
.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.ledger--single { grid-template-columns: 1fr; }
@media (max-width: 880px) { .ledger { grid-template-columns: 1fr; } }
.ledger-card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 6px;
  padding: clamp(1.35rem, 1rem + 1.2vw, 2.1rem);
}
.ledger-card h3 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; color: var(--navy); }
.card-org { margin-top: .3rem; color: var(--muted); font-size: .9rem; }
.rows { margin-top: 1.1rem; border-top: 1px solid var(--rule); }
.rows li {
  display: flex; justify-content: space-between; align-items: baseline; gap: .2rem 1.5rem;
  padding-block: .8rem; border-bottom: 1px solid var(--rule); line-height: 1.5;
}
.rows li:last-child { border-bottom: 0; padding-bottom: 0; }
.rows .yr { flex: none; color: var(--muted); font-size: .84rem; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
@media (max-width: 520px) { .rows li { flex-direction: column; } }
.ledger-card--feature { background: var(--band-navy); border-color: var(--band-navy); color: var(--on-navy); display: flex; flex-direction: column; }
.ledger-card--feature h3 { color: #fff; }
.ledger-card--feature .card-org, .ledger-card--feature .yr { color: var(--on-navy-muted); }
.ledger-card--feature .rows, .ledger-card--feature .rows li { border-color: rgba(255, 255, 255, .18); }
.feature-note {
  margin-top: auto; padding-top: 1.5rem; color: #fff;
  font-family: var(--font-display); font-style: italic; font-size: 1.45rem; line-height: 1.3;
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chips--center { justify-content: center; }
.chips li {
  padding: .4rem .85rem; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--chip); font-size: .9rem; font-weight: 550;
}
.mini-title {
  margin-top: 2.25rem; color: var(--navy);
  font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
}
.strip { margin-top: 2.5rem; text-align: center; }
.strip .mini-title { margin-top: 0; }

.rows small { display: block; margin-top: .3rem; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.ledger-card--feature .rows small { color: var(--on-navy-muted); }
.card-note { margin-top: 1rem; color: var(--muted); font-size: .92rem; }

/* ---------- Core competencies ---------- */
.comp {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem;
  max-width: 980px; margin: 2.75rem auto 0; padding-top: .5rem; border-top: 1px solid var(--rule);
}
.comp .mini-title { margin-top: 1.25rem; }
.comp ul { margin-top: .75rem; display: grid; gap: .45rem; }
.comp li { position: relative; padding-left: 1.1rem; font-size: .97rem; line-height: 1.45; }
.comp li::before { content: ''; position: absolute; left: 0; top: .6em; width: .4rem; height: .4rem; border-radius: 50%; background: var(--navy); opacity: .7; }
@media (max-width: 760px) { .comp { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Experience ---------- */
#experience .section-title { margin-bottom: 2.25rem; }
.jobs { border-left: 1px solid var(--rule); margin-left: .35rem; }
.job { position: relative; padding: 0 0 2.1rem 1.75rem; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ''; position: absolute; left: -.4rem; top: .35rem; width: .75rem; height: .75rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--navy);
}
.job-when { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.job-role { margin-top: .3rem; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.15; color: var(--navy); }
.job-org { margin-top: .2rem; font-weight: 600; font-size: .97rem; }
.job-points { margin-top: .6rem; display: grid; gap: .4rem; }
.job-points li { position: relative; padding-left: 1rem; color: var(--muted); font-size: .97rem; line-height: 1.55; }
.job-points li::before { content: '·'; position: absolute; left: 0; }

/* ---------- Teaching, research & talks ---------- */
.tri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 980px) { .tri { grid-template-columns: 1fr; } }

/* ---------- Education ---------- */
#education .section-title, #publications .section-title { margin-bottom: 2.25rem; }
.degrees { border-top: 1px solid var(--rule); }
.degrees li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1.5rem;
  padding-block: 1.15rem; border-bottom: 1px solid var(--rule);
}
.deg { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.2; color: var(--navy); }
.inst { grid-column: 1; color: var(--muted); }
.degrees .yr { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums lining-nums; }
.license {
  margin-top: 1.75rem; text-align: center; color: var(--navy);
  font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
}
.langs { margin-top: .6rem; text-align: center; color: var(--muted); font-size: .95rem; }
.certs { margin-top: 2.75rem; text-align: center; }
.certs .mini-title { margin-top: 0; }
.certs-k { margin-top: 1.25rem; color: var(--muted); font-size: .9rem; font-weight: 600; }
.certs .chips { margin-top: .6rem; }

/* ---------- Publications ---------- */
.pubs { display: grid; gap: 1.75rem; }
.pubs li { padding-left: 1.25rem; border-left: 2px solid var(--navy); }
.pub-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.22; color: var(--navy); }
.pub-title a { text-decoration: none; }
.pub-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.pub-meta { margin-top: .4rem; color: var(--muted); font-size: .95rem; }
.pub-meta strong { color: var(--ink); }
.pub-more { margin-top: 2rem; text-align: center; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn-row.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; padding: .7rem 1.45rem;
  border: 1px solid var(--navy); border-radius: 999px; background: var(--navy); color: var(--bg);
  font-size: .9rem; font-weight: 650; letter-spacing: .04em; text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}
.btn svg { width: 18px; height: 18px; }
.btn--outline { background: transparent; color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--bg); }

/* ---------- Gallery ---------- */
#gallery .section-title { margin-bottom: 2.25rem; }
.gallery { columns: 3 240px; column-gap: 1rem; }
.gallery img { width: 100%; margin-bottom: 1rem; border-radius: 3px; break-inside: avoid; }
.gallery .gallery-wide { column-span: all; }

/* ---------- Connect (replaces the reference's "Vote online" band) ---------- */
.band--navy { background: var(--band-navy); color: var(--on-navy); }
.band--navy .section-title { color: #fff; }
.connect-text { margin-top: 1.75rem; color: var(--on-navy-muted); font-size: 1.1rem; }
.connect-mail { color: #fff; font-weight: 600; text-decoration-color: rgba(255, 255, 255, .5); }
.connect-mail:hover { color: #fff; text-decoration-color: #fff; }
.band--navy .btn { background: #fff; border-color: #fff; color: #0F3A63; }
.band--navy .btn:hover { background: #E6EDF6; border-color: #E6EDF6; }
.band--navy .btn--outline { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.band--navy .btn--outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.5rem 3rem; color: var(--muted); font-size: .9rem; text-align: center; }
.footer-inner { display: grid; gap: 1rem; justify-items: center; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.75rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.footer-links a:hover { color: var(--navy); }
.footer-social { display: flex; gap: .5rem; }
.footer-social a {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--rule); border-radius: 999px; color: var(--navy);
}
.footer-social a:hover { background: var(--tint); }
.footer-social svg { width: 18px; height: 18px; }
