/* ==========================================================================
   Deepali Kundnani, site styles
   Design tokens first; everything else derives from them.
   ========================================================================== */

:root {
  --navy:        #0f2942;
  --navy-2:      #163a5c;
  --navy-3:      #1d4d78;
  --accent:      #0d9488;
  --accent-2:    #0f766e;
  --accent-soft: #ddf5f1;
  --amber:       #b45309;
  --amber-soft:  #fdf0d9;

  --bg:          #fbfcfe;
  --surface:     #ffffff;
  --surface-2:   #f1f5fb;
  --border:      #e2e8f2;
  --text:        #1c2733;
  --text-soft:   #566274;
  --text-faint:  #8592a3;
  --on-dark:     #eef3fb;
  --on-dark-soft:#9fb2ce;

  /* Hero / sub-hero: a bright wash rather than a dark slab. */
  --hero-1:      #e8f4ff;
  --hero-2:      #eafaf6;
  --hero-3:      #fdf7ed;
  --hero-blob-1: rgba(13,148,136,.16);
  --hero-blob-2: rgba(56,132,222,.14);
  --hero-text:   var(--text);
  --hero-muted:  var(--text-soft);
  --hero-line:   rgba(15,41,66,.12);
  --glass:       rgba(255,255,255,.82);

  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 1px 2px rgba(6,24,52,.06), 0 6px 20px rgba(6,24,52,.07);
  --shadow-lg:   0 2px 6px rgba(6,24,52,.08), 0 18px 44px rgba(6,24,52,.14);
  --nav-h:       62px;
  --maxw:        1080px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22,.61,.36,1);
}

html[data-theme="dark"] {
  --navy:        #050e1e;
  --navy-2:      #0a1c38;
  --accent:      #2dd4bf;
  --accent-2:    #5eead4;
  --accent-soft: #10312f;
  --amber:       #fbbf24;
  --amber-soft:  #33270d;

  --bg:          #070d18;
  --surface:     #0e1626;
  --surface-2:   #131f34;
  --border:      #23324b;
  --text:        #dce5f2;
  --text-soft:   #9fb0c8;
  --text-faint:  #7386a1;
  --shadow:      0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  --shadow-lg:   0 2px 6px rgba(0,0,0,.45), 0 18px 44px rgba(0,0,0,.5);

  --hero-1:      #0a1729;
  --hero-2:      #0c2033;
  --hero-3:      #0a1b2c;
  --hero-blob-1: rgba(45,212,191,.16);
  --hero-blob-2: rgba(56,132,222,.14);
  --hero-line:   rgba(255,255,255,.12);
  --glass:       rgba(10,18,32,.78);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.icon {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon--solid { fill: currentColor; stroke: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: .6rem 1rem;
  border-radius: var(--radius-sm); transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }

/* --------------------------------------------------------------- progress */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 120; will-change: transform;
}

/* -------------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 110;
  height: var(--nav-h);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.nav.is-stuck { box-shadow: 0 2px 16px rgba(15,41,66,.09); }
.nav__inner { display: flex; align-items: center; gap: 1rem; height: 100%; }

.nav__brand {
  display: flex; align-items: center; gap: .55rem;
  color: var(--text); text-decoration: none;
  font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.nav__mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--navy-3));
  color: #fff; font-size: .78rem; font-weight: 800; letter-spacing: .04em;
}
.nav__brand:hover { color: var(--accent); }

.nav__links {
  display: flex; align-items: center; gap: .15rem;
  margin: 0 0 0 auto; padding: 0; list-style: none;
}
.nav__links a {
  display: block; padding: .45rem .6rem; border-radius: var(--radius-sm);
  color: var(--text-soft); text-decoration: none;
  font-size: .74rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  white-space: nowrap; transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav__links a:hover { color: var(--accent); background: var(--accent-soft); }
.nav__links a.is-active { color: var(--accent); background: var(--accent-soft); }
.nav__links a.is-active::after {
  content: ""; display: block; height: 2px; margin-top: 3px; border-radius: 2px;
  background: var(--accent-2);
}

.nav__btn {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--border); border-radius: 10px;
  background: transparent; color: var(--text-soft); cursor: pointer; font-size: 1.05rem;
  transition: background-color .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}
.nav__btn:hover { background: var(--surface-2); color: var(--accent); transform: translateY(-1px); }
.nav__toggle { display: none; margin-left: auto; }
html[data-theme="dark"] .theme-icon--moon { display: none; }
html:not([data-theme="dark"]) .theme-icon--sun { display: none; }

@media (max-width: 1040px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); padding: .5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(15,41,66,.10);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: .8rem .5rem; font-size: .82rem; border-bottom: 1px solid var(--border); }
  .nav__links a.is-active::after { display: none; }
}

/* ------------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 4.5rem) 0 3.5rem;
  background:
    radial-gradient(1000px 520px at 80% -10%, var(--hero-blob-2) 0%, transparent 62%),
    radial-gradient(820px 460px at 8% 106%, var(--hero-blob-1) 0%, transparent 60%),
    linear-gradient(168deg, var(--hero-1) 0%, var(--hero-2) 52%, var(--hero-3) 100%);
  color: var(--hero-text);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero::after {          /* soft fade into the page background */
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  opacity: .75; pointer-events: none;
}
.hero__helix {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .5; pointer-events: none;
}
.hero__helix .strand { animation: drift 26s linear infinite; }
.hero__helix .strand--b { animation-duration: 34s; animation-direction: reverse; }
@keyframes drift { to { transform: translateX(-160px); } }

.hero__inner { position: relative; z-index: 1; }

.hero__photo {
  width: 235px; height: 235px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 1.4rem; display: block;
  box-shadow: 0 0 0 5px var(--surface), 0 0 0 7px var(--accent), 0 16px 40px rgba(15,41,66,.18);
}
.hero h1 {
  margin: 0 0 .35rem; font-size: clamp(2.1rem, 6vw, 3.2rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
}
.hero__role {
  margin: 0 0 .1rem; font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 600; color: var(--accent); letter-spacing: .01em;
}
.hero__affil { margin: 0 0 1.2rem; color: var(--hero-muted); font-size: .95rem; }

/* rotating keyword line */
.rotator { height: 1.7em; margin-bottom: 1.4rem; font-size: .95rem; color: var(--hero-muted); }
.rotator__word { display: inline-block; font-weight: 600; color: var(--text); }
.rotator__word.is-swapping { animation: swap .42s var(--ease); }
@keyframes swap {
  0%   { opacity: 1; transform: translateY(0); }
  45%  { opacity: 0; transform: translateY(-9px); }
  55%  { opacity: 0; transform: translateY(9px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero__lead {
  max-width: 660px; margin: 0 auto 2rem; color: var(--hero-muted);
  font-size: 1.02rem; text-wrap: pretty;
}

/* stat counters */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; max-width: 720px; margin: 0 auto 2.2rem;
  padding: 1.25rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.stat__num {
  font-size: clamp(1.4rem, 4.2vw, 2rem); font-weight: 800;
  line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-faint); margin-top: .3rem;
}
@media (max-width: 620px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.2rem .75rem; }
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .68rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
  font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(13,148,136,.34); }
.btn--primary:hover { background: var(--accent-2); color: #04211f; box-shadow: 0 10px 26px rgba(13,148,136,.44); }
.btn--ghost { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn--ghost:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.socials { display: flex; gap: .5rem; }
.socials a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-soft); font-size: 1.05rem;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.socials a:hover {
  transform: translateY(-3px); background: var(--accent); border-color: var(--accent); color: #fff;
}

/* --------------------------------------------------------------- sections */
main { padding-block: 3.5rem 1rem; }
.section { margin-bottom: 4.25rem; scroll-margin-top: calc(var(--nav-h) + 20px); }
.section__title {
  display: flex; align-items: center; gap: .75rem;
  margin: 0 0 .35rem; font-size: clamp(1.4rem, 3.4vw, 1.85rem);
  font-weight: 750; letter-spacing: -.015em; color: var(--text);
}
.section__title::before {
  content: ""; width: 5px; height: 1.05em; border-radius: 3px; flex: none;
  background: linear-gradient(180deg, var(--accent), #5eb3e8);
}
.section__intro { margin: 0 0 1.75rem; color: var(--text-soft); max-width: 68ch; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); }

.grid { display: grid; gap: 1.1rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.prose p { margin: 0 0 1rem; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }

/* about */
.about { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.75rem; align-items: start; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }
.about__aside { display: grid; gap: 1rem; }
.factlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.factlist li { display: flex; gap: .75rem; align-items: flex-start; }
.factlist .icon { color: var(--accent); font-size: 1.05rem; margin-top: .28rem; }
.factlist strong { display: block; font-size: .95rem; }
.factlist span { color: var(--text-soft); font-size: .87rem; }

/* highlight cards */
.hl { display: grid; gap: .6rem; }
.hl__icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1.15rem;
}
.hl h3 { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: -.005em; }
.hl p { margin: 0; color: var(--text-soft); font-size: .9rem; }

/* pills */
.pills { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .38rem .85rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .84rem; color: var(--text-soft); font-weight: 500;
  transition: transform .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), background-color .2s var(--ease);
}
.pill:hover {
  transform: translateY(-2px); color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--accent-soft);
}

/* --------------------------------------------------------------- timeline */
/* Two columns astride a central spine: education left, experience right.
   --gap is the half-gutter each card leaves for the line. */
.timeline {
  --gap: 34px;                  /* half-gutter each column leaves for the spine */
  --split: 33.333%;             /* education gets a third, experience two thirds */
  --pad: 1.15rem;               /* horizontal padding inside a concurrent block   */
  position: relative; max-width: 1000px; margin-inline: auto;
  font-size: .92rem;            /* the journey reads a step smaller than the page */
}
.timeline::before {
  content: ""; position: absolute; left: var(--split); top: 0; bottom: 0; width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--accent), var(--border) 78%, transparent);
}

.tl-heads {
  display: grid;
  grid-template-columns: calc(var(--split) - var(--gap)) 1fr;
  gap: calc(var(--gap) * 2); margin-bottom: 1.5rem;
}
.tl-heads span {
  font-size: .72rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: var(--accent); padding: .4rem .9rem; border-radius: 999px;
  background: var(--accent-soft); justify-self: center;
}

.tl {
  position: relative; margin-bottom: 1.1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .85rem 1rem; box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.tl:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
}
.tl--edu { width: calc(var(--split) - var(--gap)); margin-right: auto; }
.tl--exp { width: calc(100% - var(--split) - var(--gap)); margin-left: auto; }

.tl::before {                      /* node on the spine */
  content: ""; position: absolute; top: 1.5rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg); z-index: 1;
}
.tl--edu::before { right: calc(-1 * (var(--gap) + 7px)); }
.tl--exp::before { left:  calc(-1 * (var(--gap) + 7px)); }

.tl::after {                       /* connector from card to spine */
  content: ""; position: absolute; top: calc(1.5rem + 6px);
  width: calc(var(--gap) - 7px); height: 2px; background: var(--border);
}
.tl--edu::after { right: calc(-1 * (var(--gap) - 7px)); }
.tl--exp::after { left:  calc(-1 * (var(--gap) - 7px)); }

.tl--edu { border-top: 3px solid color-mix(in srgb, var(--accent) 55%, var(--border)); }
.tl--exp { border-top: 3px solid color-mix(in srgb, #5eb3e8 60%, var(--border)); }

/* ---- Concurrent block: a degree and the roles held during it, one unit ---- */
.tl-block {
  position: relative; width: 100%; margin-bottom: 1.75rem;
  padding: 2.5rem var(--pad) var(--pad);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 42%, var(--surface));
}
.tl-block::before {          /* keep the spine visually continuous through the block */
  content: ""; position: absolute; left: var(--split); top: 2.6rem; bottom: 1rem; width: 2px;
  transform: translateX(-50%); background: var(--border);
}
.tl-block__date {
  position: absolute; top: -1px; left: var(--split); transform: translate(-50%, -50%);
  padding: .3rem 1rem; border-radius: 999px; white-space: nowrap;
  background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-block__cols {
  display: grid;
  grid-template-columns: calc(var(--split) - var(--gap) - var(--pad)) 1fr;
  gap: calc(var(--gap) * 2);
  align-items: stretch;
}
.tl-block__cols > div { display: flex; flex-direction: column; }
.tl-block__cols > div > .tl:only-child { flex: 1; }

/* Cards inside a block sit in the grid rather than astride the spine. */
.tl--bare { position: relative; width: 100%; margin: 0 0 .75rem; }
.tl--bare:last-child { margin-bottom: 0; }
.tl--bare::before, .tl--bare::after { display: none; }

@media (max-width: 860px) {
  .tl-block { padding: 2.5rem .95rem 1rem; }
  .tl-block::before { display: none; }
  .tl-block__cols { grid-template-columns: 1fr; gap: 1rem; }
  .tl-block__date { left: 50%; }
}

@media (max-width: 860px) {
  .timeline { --gap: 0px; padding-left: 2.2rem; }
  .timeline::before { left: 7px; transform: none; }
  .tl-heads { display: none; }
  .tl, .tl--edu, .tl--exp { width: 100%; margin-left: 0; margin-right: 0; }
  .tl--edu::before, .tl--exp::before { left: -2.2rem; right: auto; }
  .tl::after { display: none; }
  .tl-block { margin-left: -1.4rem; }
}
.tl__head { display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: baseline; }
.tl__role { font-size: .95rem; font-weight: 700; margin: 0; letter-spacing: -.005em; }
.tl__date {
  width: 100%; font-size: .73rem; font-weight: 600; color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.tl__org { margin: .1rem 0 .6rem; font-size: .84rem; color: var(--accent); font-weight: 600; }
.tl__org .tl__place { color: var(--text-faint); font-weight: 400; }
.tl ul { margin: 0; padding-left: .95rem; color: var(--text-soft); font-size: .69rem; }
.tl li { margin-bottom: .35rem; }
.tl li::marker { color: var(--accent); }
.tl__tag {
  display: inline-block; padding: .12rem .55rem; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent); vertical-align: middle;
}

/* collapsible detail */
.tl__more {
  margin-top: .1rem; background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .8rem; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: .35rem;
}
.tl__more .icon { transition: transform .25s var(--ease); }
.tl__more[aria-expanded="true"] .icon { transform: rotate(180deg); }
.tl__extra { display: none; }
.tl__extra.is-open { display: block; animation: fade .3s var(--ease); }
.tl__extra li:has(> strong) {
  list-style: none; margin-left: -1.05rem; margin-top: .7rem;
  font-size: .72rem; letter-spacing: .07em; text-transform: uppercase;
}
.tl__extra li:first-child:has(> strong) { margin-top: .2rem; }
.tl__extra li > strong { color: var(--text-faint); font-weight: 700; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------- publications */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.filter {
  padding: .4rem .95rem; border-radius: 999px; cursor: pointer; font: inherit;
  font-size: .82rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-soft);
  transition: all .2s var(--ease);
}
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.pub {
  display: grid; grid-template-columns: 62px 1fr; gap: 1rem;
  padding: 1.1rem 1.25rem; margin-bottom: .8rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.pub:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); }
.pub[hidden] { display: none; }
.pub__year {
  font-size: .95rem; font-weight: 800; color: var(--accent);
  font-variant-numeric: tabular-nums; padding-top: .1rem;
}
.pub__title { margin: 0 0 .35rem; font-size: 1rem; font-weight: 700; line-height: 1.45; }
.pub__title a { color: var(--text); text-decoration: none; }
.pub__title a:hover { color: var(--accent); text-decoration: underline; }
.pub__authors { margin: 0 0 .5rem; font-size: .87rem; color: var(--text-soft); }
.pub__authors b { color: var(--text); }
.pub__venue { font-style: italic; color: var(--text-faint); }
.pub__links { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .22rem .65rem; border-radius: 999px;
  font-size: .74rem; font-weight: 600; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft);
  transition: all .18s var(--ease);
}
a.tag:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag--muted { font-style: italic; }
@media (max-width: 560px) {
  .pub { grid-template-columns: 1fr; gap: .4rem; }
}

/* -------------------------------------------------------------- projects */
.project {
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.project:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); }
.project__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.project:hover .project__media img { transform: scale(1.05); }
.project__body { padding: 1.2rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.project h3 { margin: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.4; }
.project p { margin: 0; font-size: .89rem; color: var(--text-soft); }
.project__links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .3rem; }

/* full project page entries */
.entry { margin-bottom: 3.25rem; }
.entry__figure {
  position: relative; margin: 0 0 1.1rem; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow);
  background: var(--surface-2); cursor: zoom-in;
}
.entry__figure img { width: 100%; }
.entry__zoom {
  position: absolute; right: .75rem; bottom: .75rem;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .75rem; border-radius: 999px;
  background: rgba(6,24,52,.82); color: #fff; font-size: .74rem; font-weight: 600;
  backdrop-filter: blur(6px); pointer-events: none;
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  place-items: center; padding: 2rem 1rem;
  background: rgba(3,10,22,.93); backdrop-filter: blur(4px);
}
.lightbox.is-open { display: grid; animation: fade .25s var(--ease); }
.lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; border-radius: 8px; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  color: #fff; font-size: 1.2rem;
}
.lightbox__close:hover { background: rgba(255,255,255,.26); }
.lightbox__cap {
  position: absolute; left: 0; right: 0; bottom: 1rem; text-align: center;
  color: #cfd9e8; font-size: .85rem; padding-inline: 1rem;
}

/* ----------------------------------------------------------------- skills */
.skillgroup h3 {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 .8rem; font-size: .78rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint);
}
.skillgroup h3 .icon { color: var(--accent); font-size: 1rem; }

/* ---------------------------------------------------------------- contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; align-items: start; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.field { margin-bottom: .85rem; }
.field label {
  display: block; margin-bottom: .3rem; font-size: .8rem;
  font-weight: 600; color: var(--text-soft);
}
.field input, .field textarea {
  width: 100%; padding: .7rem .9rem; font: inherit; font-size: .93rem;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field textarea { resize: vertical; min-height: 118px; }

/* ----------------------------------------------------------------- footer */
.footer {
  background: var(--surface-2); color: var(--text-soft);
  border-top: 1px solid var(--border);
  padding: 2.25rem 0 1.75rem; margin-top: 3rem; text-align: center;
}
.footer .socials { justify-content: center; margin-bottom: 1.1rem; }
.footer__note { font-size: .84rem; margin: 0; }
.footer a { color: var(--text); }

.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 100;
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 1.1rem;
  box-shadow: 0 8px 22px rgba(13,148,136,.42);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all .25s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent-2); color: #04211f; transform: translateY(-3px); }

/* ------------------------------------------------------- reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .to-top, .scroll-progress, .hero__helix, .lightbox, .filters, form { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .pub, .project { box-shadow: none; border-color: #ccc; }
}

/* ==========================================================================
   Project carousel (portfolio page)
   ========================================================================== */
.carousel { position: relative; }
.carousel__frame {
  position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow-lg);
}
.carousel__track {
  display: flex; width: 100%;
  transition: transform .55s var(--ease);
  will-change: transform;
}
.carousel__slide { flex: 0 0 100%; min-width: 0; }
.carousel__media {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--navy); cursor: zoom-in;
}
.carousel__media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.carousel__eyebrow {
  display: inline-block; margin-bottom: .5rem;
  padding: .2rem .7rem; border-radius: 999px;
  background: rgba(45,212,191,.2); border: 1px solid rgba(45,212,191,.45);
  color: #7fe9db; font-size: .68rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
}
@media (max-width: 620px) {
  .carousel__media { aspect-ratio: 4 / 3; }
}

.carousel__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; cursor: pointer; font-size: 1.1rem;
  background: rgba(6,24,52,.62); border: 1px solid rgba(255,255,255,.28); color: #fff;
  backdrop-filter: blur(8px);
  transition: background-color .2s var(--ease), transform .2s var(--ease), opacity .2s var(--ease);
}
.carousel__nav:hover { background: var(--accent); border-color: var(--accent); }
.carousel__nav:disabled { opacity: .3; cursor: default; }
.carousel__nav--prev { left: .85rem; }
.carousel__nav--next { right: .85rem; }
@media (max-width: 620px) { .carousel__nav { width: 38px; height: 38px; } }

.carousel__bar { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.carousel__dots { display: flex; gap: .45rem; }
.carousel__dot {
  width: 32px; height: 5px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--border); transition: background-color .25s var(--ease), width .25s var(--ease);
}
.carousel__dot:hover { background: var(--text-faint); }
.carousel__dot[aria-selected="true"] { background: var(--accent); width: 52px; }
.carousel__play {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: auto; width: 30px; height: 30px;
  border-radius: 999px; cursor: pointer; font: inherit;
  font-size: .76rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-soft);
  transition: all .2s var(--ease);
}
.carousel__play:hover { border-color: var(--accent); color: var(--accent); }

/* thumbnail strip */
.carousel__thumbs {
  display: flex; gap: .6rem; margin-top: 1rem;
  overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin;
}
.carousel__thumb {
  flex: 0 0 108px; padding: 0; cursor: pointer; overflow: hidden;
  border-radius: var(--radius-sm); border: 2px solid transparent;
  background: var(--surface-2); opacity: .6;
  transition: opacity .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.carousel__thumb img { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.carousel__thumb:hover { opacity: 1; transform: translateY(-2px); }
.carousel__thumb[aria-selected="true"] { opacity: 1; border-color: var(--accent); }

/* ==========================================================================
   Blog
   ========================================================================== */
.post {
  display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: inherit; height: 100%;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); color: inherit; }
.post__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-size: .74rem; color: var(--text-faint); font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
}
.post__topic { color: var(--accent); }
.post h3 { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; }
.post p { margin: 0; font-size: .89rem; color: var(--text-soft); }
.post__more {
  margin-top: auto; padding-top: .5rem; display: inline-flex; align-items: center; gap: .35rem;
  font-size: .84rem; font-weight: 600; color: var(--accent);
}
.post:hover .post__more .icon { transform: translateX(3px); }
.post__more .icon { transition: transform .2s var(--ease); }

/* article page */
.article { max-width: 70ch; margin-inline: auto; }
.article__head { margin-bottom: 2rem; }
.article__head h1 {
  margin: .5rem 0 .6rem; font-size: clamp(1.7rem, 4.6vw, 2.5rem);
  font-weight: 800; letter-spacing: -.025em; line-height: 1.15;
}
.article__body { font-size: 1.03rem; }
.article__body h2 {
  margin: 2.4rem 0 .8rem; font-size: 1.28rem; font-weight: 750; letter-spacing: -.015em;
}
.article__body p { margin: 0 0 1.15rem; text-wrap: pretty; }
.article__body ul, .article__body ol { margin: 0 0 1.15rem; padding-left: 1.3rem; color: var(--text-soft); }
.article__body li { margin-bottom: .45rem; }
.article__body li::marker { color: var(--accent); }
.article__body blockquote {
  margin: 1.6rem 0; padding: .3rem 0 .3rem 1.2rem;
  border-left: 3px solid var(--accent); color: var(--text-soft); font-style: italic;
}
.article__body figure { margin: 1.8rem 0; }
.article__body figcaption {
  margin-top: .6rem; font-size: .84rem; color: var(--text-faint); text-align: center;
}
.article__foot {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.callout {
  display: flex; gap: .85rem; padding: 1rem 1.15rem; margin: 0 0 2rem;
  border-radius: var(--radius); background: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
  font-size: .89rem; color: var(--text);
}
.callout .icon { color: var(--amber); font-size: 1.1rem; flex: none; margin-top: .2rem; }
.callout p { margin: 0; }

/* subpage hero (smaller than the home hero) */
.subhero {
  padding: calc(var(--nav-h) + 3rem) 0 2.75rem;
  background:
    radial-gradient(900px 420px at 80% -20%, var(--hero-blob-2) 0%, transparent 62%),
    linear-gradient(168deg, var(--hero-1) 0%, var(--hero-2) 60%, var(--hero-3) 100%);
  color: var(--text); text-align: center;
  border-bottom: 1px solid var(--border);
}
.subhero h1 {
  margin: 0 0 .6rem; font-size: clamp(1.8rem, 5vw, 2.7rem);
  font-weight: 800; letter-spacing: -.025em;
}
.subhero p { margin: 0 auto; max-width: 62ch; color: var(--text-soft); }
.subhero .eyebrow {
  display: inline-block; margin-bottom: .7rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}

/* Publication action row */
.pub__actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1.4rem; }

/* Per-paper citation badge */
.pub__cites {
  background: var(--accent-soft); border-color: transparent;
  color: var(--accent); font-variant-numeric: tabular-nums;
}

/* Compact year-keyed lists: conferences, invited talks */
.mini__head {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 1rem; font-size: .78rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint);
}
.mini__head .icon { color: var(--accent); font-size: 1rem; }
.mini { list-style: none; margin: 0; padding: 0; }
.mini li {
  display: grid; grid-template-columns: 42px 1fr; gap: .7rem;
  margin-bottom: .85rem; font-size: .85rem;
}
.mini li:last-child { margin-bottom: 0; }
.mini__year {
  color: var(--accent); font-weight: 700; font-size: .8rem;
  font-variant-numeric: tabular-nums;
}
.mini b { display: block; color: var(--text); font-weight: 600; line-height: 1.45; }
.mini__kind {
  display: inline-block; margin-bottom: .2rem; padding: .1rem .5rem;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: .66rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-faint);
}
.mini__v { display: block; margin-top: .15rem; color: var(--text-faint); font-size: .79rem; }

/* Wider variant for full-width year lists (awards, service) */
.mini--wide { max-width: 780px; }
.mini--wide li { grid-template-columns: 82px 1fr; margin-bottom: 1rem; }
.mini--wide .mini__year { font-size: .84rem; }
.mini--wide b { font-size: .95rem; }

/* ==========================================================================
   Organisation marks: a supplied logo, or a monogram badge as fallback
   ========================================================================== */
.orglogo {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  height: 34px; padding: 0 .55rem; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--brand, var(--navy));
  font-size: .66rem; font-weight: 800; letter-spacing: -.01em;
  line-height: 1; text-align: center; white-space: nowrap;
}
/* A supplied logo keeps its own proportions inside the same tile height. */
img.orglogo--img {
  width: auto; height: 34px; max-width: 130px; padding: 4px 7px;
  object-fit: contain; box-sizing: border-box;
}
html[data-theme="dark"] img.orglogo--img { background: #f6f8fc; }
/* Logos that ship their own background sit flush, clipped to the tile. */
img.orglogo--bleed { padding: 0; background: none; overflow: hidden; }
html[data-theme="dark"] img.orglogo--bleed { background: none; }

/* Hero strip, directly under the metrics */
.orgstrip { max-width: 720px; margin: 0 auto 2rem; }
.orgstrip ul {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: .6rem .7rem; margin: 0; padding: 0; list-style: none;
}
.orgstrip li { display: flex; }
.orgstrip .orglogo {
  height: 40px; border-radius: 11px; font-size: .72rem; padding: 0 .7rem;
  box-shadow: var(--shadow); cursor: default;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.orgstrip img.orglogo--img { height: 40px; max-width: 155px; padding: 5px 9px; }
.orgstrip .orglogo:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Timeline cards */
.tl__head .orglogo { align-self: center; margin-right: .1rem; }
@media (max-width: 620px) {
  .orgstrip .orglogo, .orgstrip img.orglogo--img { height: 34px; border-radius: 9px; font-size: .66rem; }
}

/* Blog categories */
.catnav { margin-bottom: 2.5rem; }
.catnav .pills { justify-content: flex-start; }
.catnav a.pill { text-decoration: none; }
.catnav a.pill:hover { color: var(--accent); }

/* Optional picture at the head of a post card */
.post__media {
  margin: -1.4rem -1.4rem .2rem; border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2);
}
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post:hover .post__media img { transform: scale(1.04); }

/* Planned entries: present, but clearly not yet written */
.post--planned {
  border-style: dashed; box-shadow: none; cursor: default;
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
}
.post--planned:hover { transform: none; box-shadow: none; border-color: var(--border); }
.post--planned h3, .post--planned p { opacity: .78; }
.post__soon {
  color: var(--text-faint); font-size: .74rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
}

/* Highlight cards that link somewhere */
a.hl { text-decoration: none; color: inherit; }
a.hl:hover h3 { color: var(--accent); }
.hl__go {
  display: inline-flex; align-items: center; margin-top: .15rem;
  font-size: .95rem; color: var(--accent); opacity: .55;
}
a.hl:hover .hl__go { opacity: 1; }
.hl__go .icon { transition: transform .2s var(--ease); }
a.hl:hover .hl__go .icon { transform: translateX(3px); }
