/* ==========================================================================
   mdabulshahid.com — Portfolio design system
   Palette concept: a spectral cyan -> violet -> magenta accent, echoing
   spectroscopic SMLM, where emission is separated by wavelength.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg:        #FBFAF8;
  --bg-2:      #F4F2EE;
  --surface:   #FFFFFF;
  --surface-2: #FAF9F7;
  --ink:       #14161A;
  --ink-2:     #40464F;
  --ink-3:     #6C737E;
  --line:      #E4E1DA;
  --line-2:    #EFEDE8;

  --accent:    #6D4AFF;
  --accent-2:  #00B8D4;
  --accent-3:  #FF3D8B;
  --accent-ink:#5A38F0;
  --accent-wash:#F1EDFF;

  --spectral: linear-gradient(90deg, var(--accent-2) 0%, var(--accent) 52%, var(--accent-3) 100%);

  --ink-dark:  #0A0C10;
  --ink-dark-2:#11141A;

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--1: clamp(0.80rem, 0.77rem + 0.14vw, 0.875rem);
  --step-0:  clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --step-1:  clamp(1.15rem, 1.08rem + 0.34vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.30rem + 0.72vw, 1.95rem);
  --step-3:  clamp(1.9rem, 1.62rem + 1.38vw, 2.9rem);
  --step-4:  clamp(2.6rem, 1.95rem + 3.2vw, 4.9rem);

  --sp-1: 0.5rem;  --sp-2: 0.875rem; --sp-3: 1.25rem; --sp-4: 2rem;
  --sp-5: 3rem;    --sp-6: 4.5rem;   --sp-7: 7rem;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20,22,26,.05), 0 4px 14px -6px rgba(20,22,26,.09);
  --shadow-md: 0 2px 6px rgba(20,22,26,.05), 0 18px 44px -22px rgba(20,22,26,.22);
  --shadow-lg: 0 30px 70px -34px rgba(20,22,26,.36);

  --nav-h: 66px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

:root[data-theme="dark"] {
  --bg:        #0A0C10;
  --bg-2:      #0F1218;
  --surface:   #13171F;
  --surface-2: #171C25;
  --ink:       #F3F4F6;
  --ink-2:     #B6BDC9;
  --ink-3:     #858E9E;
  --line:      #242A35;
  --line-2:    #1C222C;

  --accent:    #9C86FF;
  --accent-2:  #34D6F0;
  --accent-3:  #FF6BA6;
  --accent-ink:#B4A3FF;
  --accent-wash:#1B1830;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px -6px rgba(0,0,0,.5);
  --shadow-md: 0 2px 6px rgba(0,0,0,.4), 0 18px 44px -22px rgba(0,0,0,.7);
  --shadow-lg: 0 30px 70px -34px rgba(0,0,0,.8);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: var(--bg);
  padding: .75rem 1.25rem; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.wrap { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(840px, 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: var(--sp-7); position: relative; }
.section--tight { padding-block: var(--sp-6); }
.section--alt { background: var(--bg-2); }

/* ---------- Shared type pieces ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; gap: .7rem;
  margin-bottom: var(--sp-2);
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: var(--spectral); flex: none;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 20ch;
}
.about__title {
  max-width: none;
  background: var(--spectral);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.capabilities-title { max-width: none; }
.gradient-title {
  background: var(--spectral);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.section-intro {
  color: var(--ink-2);
  font-size: var(--step-1);
  max-width: 62ch;
  margin-top: var(--sp-3);
  line-height: 1.6;
}
.section-head { margin-bottom: var(--sp-5); }
.section-head--split {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  align-items: flex-end; justify-content: space-between;
}
.section-head--split .section-intro { margin-top: 0; flex: 1 1 380px; max-width: 46ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow-sm); }
.btn--primary:hover { box-shadow: var(--shadow-md); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 10px 26px -12px var(--accent); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink-3); background: var(--surface); }

.btn--on-dark { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.18); backdrop-filter: blur(8px); }
.btn--on-dark:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.32); }
.btn--light { background: #fff; color: #0A0C10; }
.btn--light:hover { box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); }

.textlink {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--step--1); font-weight: 600; color: var(--accent-ink);
  text-decoration: none; border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), gap .2s var(--ease);
}
.textlink:hover { border-color: currentColor; gap: .65rem; }
.textlink svg { width: 14px; height: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); width: 100%; }
.nav__brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; font-size: .95rem; letter-spacing: -0.01em;
  text-decoration: none; color: #fff;
  transition: color .35s var(--ease);
}
.nav.is-stuck .nav__brand { color: var(--ink); }
.nav__mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: var(--spectral);
  display: grid; place-items: center;
  color: #fff; font-family: var(--font-mono); font-size: .72rem; font-weight: 700;
  letter-spacing: -.02em;
  box-shadow: 0 6px 16px -8px var(--accent);
}
.nav__links { display: flex; align-items: center; gap: .35rem; }
.nav__links a {
  padding: .5rem .8rem; border-radius: 999px;
  font-size: .875rem; font-weight: 500; text-decoration: none;
  color: rgba(255,255,255,.72);
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav.is-stuck .nav__links a { color: var(--ink-2); }
.nav__links a:hover, .nav__links a.is-active { color: #fff; background: rgba(255,255,255,.12); }
.nav.is-stuck .nav__links a:hover, .nav.is-stuck .nav__links a.is-active {
  color: var(--ink); background: var(--bg-2);
}
.nav__actions { display: flex; align-items: center; gap: .55rem; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  cursor: pointer; padding: 0;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
}
.icon-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.16); }
.nav.is-stuck .icon-btn { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.nav.is-stuck .icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav__progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--spectral);
  transition: transform .1s linear;
}

.nav__burger { display: none; }

/* Interior pages get a solid nav from the start */
.nav--solid {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--line);
}
.nav--solid .nav__brand { color: var(--ink); }
.nav--solid .nav__links a { color: var(--ink-2); }
.nav--solid .nav__links a:hover, .nav--solid .nav__links a.is-active { color: var(--ink); background: var(--bg-2); }
.nav--solid .icon-btn { background: var(--surface); color: var(--ink-2); border-color: var(--line); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--ink-dark);
  color: #fff;
  padding-top: calc(var(--nav-h) + var(--sp-6));
  padding-bottom: var(--sp-6);
  overflow: hidden;
  isolation: isolate;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(to bottom, transparent, rgba(10,12,16,.85));
  pointer-events: none; z-index: -1;
}
#localizations {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: -2; opacity: .85;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: var(--sp-6);
  align-items: center;
}
.hero__status {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .4rem .9rem .4rem .55rem;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin-bottom: var(--sp-3);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: #3DDC97; box-shadow: 0 0 0 0 rgba(61,220,151,.7);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(61,220,151,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); }
}
.hero__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-4);
  line-height: .96;
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-3);
}
.hero__name em {
  font-style: normal;
  background: var(--spectral);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__role {
  font-size: var(--step-0);
  color: rgba(255,255,255,.9);
  font-weight: 500;
  line-height: 1.6;
  text-align: justify;
  margin-bottom: var(--sp-3);
  max-width: 68ch;
}
.hero__pitch {
  color: rgba(255,255,255,.62);
  max-width: 56ch;
  font-size: var(--step-0);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: var(--sp-4); }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  font-family: var(--font-mono); font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.hero__meta span { display: flex; align-items: center; gap: .45rem; }
.hero__meta svg { width: 13px; height: 13px; opacity: .7; }

/* Portrait */
.hero__portrait { position: relative; justify-self: center; width: 100%; max-width: 330px; }
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(145deg, #1A1F2B, #10131A);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.9);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
/* Scrim so a light-background headshot still sits inside the dark hero */
.portrait-frame.has-img::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(to top, rgba(10,12,16,.78), transparent);
  pointer-events: none;
}
.portrait-frame__placeholder {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: .5rem; text-align: center;
  color: rgba(255,255,255,.3);
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 1.5rem;
}
.portrait-frame__placeholder svg { width: 34px; height: 34px; margin-inline: auto; opacity: .5; }
.portrait-glow {
  position: absolute; inset: -18%; z-index: -1;
  background: radial-gradient(circle at 50% 40%, rgba(109,74,255,.42), transparent 62%);
  filter: blur(42px);
}
.portrait-badge {
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
  background: rgba(16,19,26,.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: .5rem 1rem;
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
  display: flex; align-items: center; gap: .5rem;
}

/* ---------- Metrics strip ---------- */
.metrics {
  background: var(--ink-dark-2);
  border-top: 1px solid rgba(255,255,255,.07);
  padding-block: var(--sp-4);
  color: #fff;
}
.metrics__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-3);
}
.metric { text-align: center; position: relative; padding: .5rem .25rem; }
.metric + .metric::before {
  content: ""; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 1px; background: rgba(255,255,255,.09);
}
.metric__num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem);
  line-height: 1;
  background: var(--spectral);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin-bottom: .35rem;
}
.metric__label {
  font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .13em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
  line-height: 1.4;
}

/* ---------- About ---------- */
.about__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: var(--sp-6); align-items: start;
}
.about__body p { color: var(--ink-2); font-size: var(--step-0); line-height: 1.72; text-align: justify; }
.about__body p:first-of-type { color: var(--ink); }
.about__body strong { color: var(--ink); font-weight: 600; }
.facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
  position: sticky; top: calc(var(--nav-h) + 1.5rem);
}
.facts__title {
  font-family: var(--font-mono); font-size: .82rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line-2);
}
.fact { display: flex; gap: .9rem; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
.fact:last-child { border-bottom: 0; padding-bottom: 0; }
.fact svg { width: 17px; height: 17px; flex: none; color: var(--accent); margin-top: 3px; }
.fact__k {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: .1rem;
}
.fact__v { font-size: .92rem; font-weight: 500; color: var(--ink); line-height: 1.45; }
.fact__v a { color: var(--accent-ink); text-decoration: none; border-bottom: 1px solid transparent; }
.fact__v a:hover { border-color: currentColor; }

/* ---------- Research pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.pillar {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.pillar::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--spectral);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .45s var(--ease);
}
.pillar:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.pillar:hover::before { transform: scaleX(1); }
.pillar__icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--accent-wash); color: var(--accent-ink);
  margin-bottom: var(--sp-3);
}
.pillar__icon svg { width: 23px; height: 23px; }
.pillar__n {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  font-family: var(--font-mono); font-size: .7rem; color: var(--ink-3); opacity: .5;
}
.pillar h3 { font-size: var(--step-1); margin-bottom: .6rem; letter-spacing: -0.02em; }
.pillar p { color: var(--ink-2); font-size: .93rem; line-height: 1.65; margin-bottom: var(--sp-3); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: 6px;
  background: var(--bg-2); color: var(--ink-3);
  border: 1px solid var(--line-2);
}

/* ---------- Featured work ---------- */
.features { display: grid; gap: var(--sp-4); }
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-5); align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.feature:nth-child(even) .feature__media { order: 2; }
.feature__media {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(140deg, #0E1118, #191E2B);
  display: grid; place-items: center;
}
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.media-placeholder {
  text-align: center; padding: var(--sp-3);
  color: rgba(255,255,255,.34);
  font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .1em; text-transform: uppercase; line-height: 1.7;
}
.media-placeholder svg { width: 30px; height: 30px; margin: 0 auto .7rem; opacity: .45; }
.feature__badge {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-wash);
  padding: .32rem .7rem; border-radius: 6px; margin-bottom: var(--sp-3);
}
.feature h3 { font-size: var(--step-2); letter-spacing: -0.025em; margin-bottom: var(--sp-2); line-height: 1.2; }
.feature p { color: var(--ink-2); font-size: .96rem; line-height: 1.7; margin-bottom: var(--sp-3); }
.feature__venue {
  font-family: var(--font-mono); font-size: .7rem; color: var(--ink-3);
  padding-top: var(--sp-3); border-top: 1px solid var(--line-2);
  display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center;
}

/* ---------- Publications ---------- */
.pub-controls {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: var(--sp-4); align-items: center;
}
.chip {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .5rem .95rem; border-radius: 999px;
  background: transparent; color: var(--ink-3);
  border: 1px solid var(--line); cursor: pointer;
  transition: all .25s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pub-count {
  margin-left: auto; font-family: var(--font-mono);
  font-size: .7rem; color: var(--ink-3); letter-spacing: .06em;
}

.pub-list { display: flex; flex-direction: column; gap: 0; }
.pub {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line-2);
  align-items: start;
  transition: opacity .3s var(--ease);
}
.pub:first-child { border-top: 1px solid var(--line-2); }
.pub[hidden] { display: none; }
.pub__year {
  font-family: var(--font-mono); font-size: .82rem;
  color: var(--ink-3); padding-top: .18rem; letter-spacing: .02em;
}
.pub__title {
  font-size: 1.02rem; font-weight: 600; line-height: 1.4;
  letter-spacing: -0.012em; margin-bottom: .35rem;
  color: var(--ink); text-decoration: none;
  display: inline-block;
}
a.pub__title:hover { color: var(--accent-ink); }
.pub__authors { font-size: .855rem; color: var(--ink-3); line-height: 1.55; margin-bottom: .45rem; }
.pub__authors b { color: var(--ink-2); font-weight: 700; }
.pub__meta { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.venue {
  font-style: italic; font-size: .85rem; color: var(--ink-2); font-weight: 500;
}
.pill {
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .22rem .55rem; border-radius: 5px; white-space: nowrap;
}
.pill--first { background: var(--accent-wash); color: var(--accent-ink); font-weight: 600; }
.pill--kind { background: var(--bg-2); color: var(--ink-3); border: 1px solid var(--line-2); }
.pub__cites {
  font-family: var(--font-mono); font-size: .72rem;
  color: var(--ink-3); text-align: right; white-space: nowrap;
  padding-top: .25rem;
}
.pub__cites b { display: block; font-size: 1.15rem; color: var(--ink); font-weight: 500; line-height: 1.2; }

/* ---------- Capabilities ---------- */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.cap {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--sp-4);
}
.cap__head { display: flex; align-items: center; gap: .8rem; margin-bottom: var(--sp-3); }
.cap__head svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.cap__head h3 { font-size: 1.02rem; letter-spacing: -0.01em; }
.cap ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.cap li {
  font-size: .885rem; color: var(--ink-2); line-height: 1.5;
  padding-left: 1.05rem; position: relative;
}
.cap li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .55;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--accent-2), var(--accent), var(--accent-3));
  opacity: .35; border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: var(--sp-5); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: calc(-2rem + 1px); top: .5rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-date {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: .35rem;
}
.tl-item h3 { font-size: var(--step-1); letter-spacing: -0.02em; margin-bottom: .2rem; }
.tl-org { font-size: .93rem; color: var(--ink-2); font-weight: 500; margin-bottom: .55rem; }
.tl-item p { color: var(--ink-3); font-size: .9rem; line-height: 1.65; max-width: 62ch; }
.tl-item ul { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--ink-3); font-size: .9rem; line-height: 1.7; }

/* ---------- Gallery ---------- */
.gallery-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
}
.gallery-carousel__arrow {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink-2);
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), opacity .25s var(--ease);
}
.gallery-carousel__arrow:hover:not(:disabled) { background: var(--ink); color: #fff; border-color: var(--ink); }
.gallery-carousel__arrow:disabled { opacity: .3; cursor: default; }
.gallery-carousel__arrow svg { width: 18px; height: 18px; }
.gallery {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-3) var(--bg-2);
  overscroll-behavior-inline: contain;
  padding: .25rem .1rem .65rem;
}
.gallery::-webkit-scrollbar { height: 6px; }
.gallery::-webkit-scrollbar-track { background: var(--bg-2); border-radius: 6px; }
.gallery::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 6px; }
.gal-item {
  position: relative; flex: 0 0 clamp(220px, 27vw, 300px); aspect-ratio: 4 / 3;
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line);
  cursor: pointer; padding: 0;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  display: block; width: 100%; text-align: left;
}
.gal-item:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-md); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.gal-item--contain img { object-fit: contain; }
.gal-item--cover { aspect-ratio: 1203 / 1600; }
.gal-item--award { aspect-ratio: 1206 / 1600; }
.gal-item--conference { aspect-ratio: 2604 / 1739; }
.gal-item--poster { aspect-ratio: 2808 / 2430; }
.gal-item--vimentine { aspect-ratio: 1596 / 1563; }
.gal-item__cap {
  position: absolute; inset: auto 0 0 0;
  background: linear-gradient(to top, rgba(8,10,14,.92), transparent);
  color: #fff; padding: 1.5rem .9rem .75rem;
  font-size: .78rem; font-weight: 500; line-height: 1.4;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.gal-item:hover .gal-item__cap { opacity: 1; transform: translateY(0); }
.gal-item__ph {
  position: absolute; inset: 0; display: grid; place-content: center; gap: .5rem;
  text-align: center; padding: 1rem;
  color: var(--ink-3); font-family: var(--font-mono);
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.6;
}
.gal-item__ph svg { width: 26px; height: 26px; margin-inline: auto; opacity: .45; }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,8,12,.94);
  backdrop-filter: blur(10px);
  display: none; place-items: center; padding: var(--sp-4);
}
.lightbox[open], .lightbox.is-open { display: grid; }
.lightbox img { max-width: min(1000px, 92vw); max-height: 82vh; border-radius: var(--radius); object-fit: contain; }
.lightbox__cap {
  color: rgba(255,255,255,.75); text-align: center;
  margin-top: 1rem; font-size: .875rem;
}
.lightbox__close {
  position: absolute; top: 1.4rem; right: 1.4rem;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; cursor: pointer; display: grid; place-items: center;
}
.lightbox__close svg { width: 20px; height: 20px; }

/* ---------- Contact ---------- */
.contact {
  background: var(--ink-dark); color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 1rem + 5vw, 4.5rem);
  position: relative; overflow: hidden; isolation: isolate;
}
.contact::before {
  content: ""; position: absolute; inset: -50% -20% auto auto;
  width: 620px; height: 620px; z-index: -1;
  background: radial-gradient(circle, rgba(109,74,255,.35), transparent 62%);
  filter: blur(70px);
}
.contact::after {
  content: ""; position: absolute; inset: auto auto -45% -12%;
  width: 480px; height: 480px; z-index: -1;
  background: radial-gradient(circle, rgba(0,184,212,.22), transparent 65%);
  filter: blur(70px);
}
.contact h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--step-3); letter-spacing: -0.025em;
  margin-bottom: var(--sp-3); max-width: 17ch; line-height: 1.06;
}
.contact p { color: rgba(255,255,255,.66); max-width: 68ch; margin-bottom: var(--sp-4); font-size: var(--step-0); }
.contact__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: var(--sp-5); }
.contact__links {
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5);
  padding-top: var(--sp-4); border-top: 1px solid rgba(255,255,255,.12);
}
.contact__link {
  display: flex; align-items: center; gap: .65rem;
  color: rgba(255,255,255,.62); text-decoration: none;
  font-size: .875rem; transition: color .25s var(--ease);
}
.contact__link:hover { color: #fff; }
.contact__link svg { width: 17px; height: 17px; }

/* ---------- Footer ---------- */
.footer {
  padding-block: var(--sp-4);
  border-top: 1px solid var(--line);
  margin-top: var(--sp-6);
}
.footer__inner {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  align-items: center; justify-content: space-between;
  font-size: .8rem; color: var(--ink-3);
}
.footer__inner a { color: var(--ink-3); text-decoration: none; }
.footer__inner a:hover { color: var(--ink); }
.footer nav { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ---------- Page header (interior pages) ---------- */
.page-head {
  padding-top: calc(var(--nav-h) + var(--sp-5));
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.page-head h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--step-3); letter-spacing: -0.025em; margin-bottom: var(--sp-2);
}
.page-head p { color: var(--ink-2); max-width: 62ch; }
.back-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); text-decoration: none; margin-bottom: var(--sp-3);
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.back-link:hover { color: var(--ink); gap: .6rem; }
.back-link svg { width: 13px; height: 13px; }

/* ---------- Image slots ---------- */
.has-img .media-placeholder,
.has-img .portrait-frame__placeholder,
.has-img .gal-item__ph { display: none; }

.feature__media--wide   { aspect-ratio: 16 / 7; }
.feature__media--contain { aspect-ratio: 1358 / 758; }
.feature__media--chromatin-contain { aspect-ratio: 1232 / 808; }
.feature__media--kidney-contain { aspect-ratio: 923 / 463; }
.feature__media--square { aspect-ratio: 1 / 1; }
.feature__media img { transition: transform .8s var(--ease); }
.feature:hover .feature__media img { transform: scale(1.03); }
.feature__media--contain img,
.feature:hover .feature__media--contain img { object-fit: contain; transform: none; }
.feature__media--chromatin-contain img,
.feature:hover .feature__media--chromatin-contain img { object-fit: contain; transform: none; }
.feature__media--kidney-contain img,
.feature:hover .feature__media--kidney-contain img { object-fit: contain; transform: none; }

.figcap {
  font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); margin-top: .7rem; line-height: 1.5;
}

/* ---------- Awards ---------- */
.awards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--sp-5); }
.award {
  display: grid; grid-template-columns: 58px 1fr; gap: var(--sp-3);
  padding: .85rem 0; border-bottom: 1px solid var(--line-2); align-items: start;
}
.award__yr {
  font-family: var(--font-mono); font-size: .72rem;
  color: var(--ink-3); padding-top: .2rem; letter-spacing: .03em;
}
.award__t { font-size: .93rem; font-weight: 600; line-height: 1.4; margin-bottom: .12rem; }
.award__o { font-size: .82rem; color: var(--ink-3); line-height: 1.45; }
.award--hi .award__t { color: var(--accent-ink); }

/* ---------- Roles / leadership chips ---------- */
.rolegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.role-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-3) var(--sp-4);
}
.role-card h4 {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .8rem; font-weight: 500;
}
.role-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.role-card li { font-size: .86rem; color: var(--ink-2); line-height: 1.45; }
.role-card li b { color: var(--ink); font-weight: 600; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .pulse { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .hero__portrait { order: -1; max-width: 230px; justify-self: start; }
  .about__grid { grid-template-columns: 1fr; }
  .facts { position: static; }
  .pillars, .caps, .rolegrid { grid-template-columns: 1fr 1fr; }
  .awards { grid-template-columns: 1fr; }
  .metrics__grid { grid-template-columns: repeat(3, 1fr); row-gap: var(--sp-4); }
  .metric:nth-child(4)::before { display: none; }
}
@media (max-width: 780px) {
  :root { --sp-7: 4.25rem; --sp-6: 3.25rem; }
  .nav__links { display: none; }
  .nav__burger {
    display: grid; place-items: center;
  }
  .nav__links.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; inset: var(--nav-h) 0 auto 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: var(--sp-3); gap: .2rem;
    box-shadow: var(--shadow-md);
  }
  .nav__links.is-open a { color: var(--ink-2); padding: .7rem .9rem; border-radius: 10px; }
  .pillars, .caps, .feature, .rolegrid { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature__media { order: 0; }
  .feature { gap: var(--sp-3); }
  .metrics__grid { grid-template-columns: repeat(2, 1fr); }
  .metric::before { display: none !important; }
  .pub { grid-template-columns: 1fr; gap: .3rem; }
  .pub__year { font-size: .72rem; letter-spacing: .1em; }
  .pub__cites { text-align: left; display: flex; gap: .4rem; align-items: baseline; padding-top: .3rem; }
  .pub__cites b { display: inline; font-size: .95rem; }
  .pub-count { margin-left: 0; width: 100%; }
  .section-head--split { align-items: flex-start; }
}
@media (max-width: 560px) {
  /* A placeholder-sized portrait shouldn't push the name below the fold */
  .hero__portrait { max-width: 168px; }
  .portrait-frame__placeholder { font-size: .52rem; padding: .75rem; word-break: break-all; }
  .portrait-frame__placeholder svg { width: 24px; height: 24px; }
  .portrait-badge { font-size: .58rem; padding: .4rem .7rem; }
  .hero__status { font-size: .62rem; }
}
@media (max-width: 460px) {
  .wrap, .wrap-narrow { width: calc(100% - 2rem); }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
  .gallery { gap: .75rem; }
  .gal-item__ph { font-size: .55rem; }
}

/* ---------- Print ---------- */
@media print {
  .nav, .hero__cta, .contact__actions, .lightbox, .pub-controls, .footer nav, #localizations { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .hero, .metrics, .contact { background: #fff !important; color: #000 !important; }
  .hero__name, .metric__num { -webkit-text-fill-color: #000; color: #000; }
  .hero__pitch, .hero__role, .contact p, .metric__label { color: #333 !important; }
  .section { padding-block: 1.2rem; }
  .pillar, .cap, .feature, .facts { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .pub { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}
