/* ============================================
   Julien Lambert — Interactive CV
   Theme: clinical / molecular
   ============================================ */

:root {
  /* Light mode — calm clinical white */
  --bg: #f4f6f8;
  --bg-elev: #ffffff;
  --bg-soft: #eaeff3;
  --ink: #0c1f2c;
  --ink-soft: #3b5364;
  --ink-mute: #6b7e8c;
  --line: #d6dde3;
  --line-soft: #e6ecf0;

  /* Brand — deep clinical blue + medical teal-green */
  --brand: #0a4d6e;      /* deep medical blue */
  --brand-2: #126e8c;
  --accent: #14a37f;     /* clinical teal-green */
  --accent-soft: #7fd6c0;
  --warn: #d98a2b;

  /* Map pin categories — four distinct hues that sit in the existing palette.
     current = teal-green (var(--accent)); worked = navy brand;
     live = indigo violet; born = warm amber. */
  --pin-current: var(--accent);
  --pin-worked: var(--brand);
  --pin-live:   #6b5cd6;
  --pin-born:   #d98a2b;

  /* Disc colors */
  --disc-rim: #0a4d6e;
  --disc-face: #ffffff;
  --disc-tick: #b9c4cc;
  --disc-tick-major: #0a4d6e;

  /* Typography */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(12, 31, 44, 0.06), 0 1px 1px rgba(12, 31, 44, 0.04);
  --shadow: 0 8px 24px -8px rgba(12, 31, 44, 0.15), 0 2px 6px rgba(12, 31, 44, 0.05);
  --shadow-lg: 0 24px 48px -16px rgba(12, 31, 44, 0.22), 0 4px 12px rgba(12, 31, 44, 0.08);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* World map */
  --map-bg-top: #e8eff3;
  --map-bg-bottom: #dde6ec;
  --map-land: #b6c2cc;
  --map-land-soft: #c8d1d8;
  --map-land-stroke: rgba(40, 60, 80, 0.18);
}

[data-theme="dark"] {
  --bg: #07131c;
  --bg-elev: #0d1f2c;
  --bg-soft: #102836;
  --ink: #e6eef3;
  --ink-soft: #b2c5d1;
  --ink-mute: #7a8d99;
  --line: #1d3645;
  --line-soft: #15293a;

  --brand: #3aa5cf;
  --brand-2: #5dbde0;
  --accent: #2ed7a3;
  --accent-soft: #14a37f;

  --disc-rim: #3aa5cf;
  --disc-face: #0d1f2c;
  --disc-tick: #2c4555;
  --disc-tick-major: #5dbde0;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);

  --map-bg-top: #0f2533;
  --map-bg-bottom: #08151f;
  --map-land: #1f3a4d;
  --map-land-soft: #2a4b62;
  --map-land-stroke: rgba(180, 210, 230, 0.22);

  /* Slightly brighter pin variants for dark mode */
  --pin-current: var(--accent);
  --pin-worked: var(--brand-2);
  --pin-live:   #9b8bff;
  --pin-born:   #f0b257;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

main { position: relative; z-index: 1; }

/* Background virus motif — extends the hero's VZV/enveloped-virus theme across the whole page */
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  color: var(--brand);
  opacity: 0.16;
}
[data-theme="dark"] .bg-pattern { opacity: 0.14; }

/* ============ Theme toggle ============ */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.theme-toggle:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.theme-toggle .icon { width: 20px; height: 20px; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); position: absolute; }
[data-theme="light"] .icon-moon, [data-theme="dark"] .icon-sun { opacity: 0; transform: scale(0.5) rotate(-90deg); }
[data-theme="light"] .icon-sun, [data-theme="dark"] .icon-moon { opacity: 1; transform: scale(1) rotate(0); }

/* ============ HERO ============ */
.hero {
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 5vw, 3.5rem);
  max-width: 1200px;
  margin: 0 auto;
}
.hero__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
@media (max-width: 720px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

.hero__photo-wrap {
  position: relative;
  width: clamp(180px, 22vw, 240px);
  aspect-ratio: 1;
}
.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-elev);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}
.hero__photo-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px dashed var(--accent);
  opacity: 0.55;
  animation: spinSlow 40s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
}
[data-theme="dark"] .hero__eyebrow { color: var(--brand-2); }
.hero__eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
  50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.02;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero__name-accent {
  font-style: italic;
  color: var(--brand);
  font-weight: 400;
}
[data-theme="dark"] .hero__name-accent { color: var(--brand-2); }

.hero__tagline {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 1.5rem;
}

.hero__contact {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
@media (max-width: 720px) { .hero__contact { justify-content: center; } }
.hero__contact a, .contact-static {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.hero__contact a:hover {
  color: var(--brand);
  border-color: var(--accent);
  transform: translateY(-1px);
}
[data-theme="dark"] .hero__contact a:hover { color: var(--brand-2); }
.hero__contact svg { width: 16px; height: 16px; color: var(--accent); }

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
@media (max-width: 720px) { .hero__chips { justify-content: center; } }
.chip {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.3rem 0.65rem;
  border-radius: 100px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: color-mix(in srgb, var(--accent) 80%, var(--ink));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
[data-theme="dark"] .chip {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

/* ============ Section heads ============ */
.section-head {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  margin-right: 0.85rem;
  vertical-align: middle;
  transform: translateY(-4px);
}
.section-sub {
  color: var(--ink-mute);
  font-size: 0.9375rem;
  margin: 0;
  max-width: 60ch;
}

/* ============ CAREER / Timeline ============ */
.career {
  padding: clamp(2rem, 6vw, 4rem) 0;
  position: relative;
}

.timeline-wrap {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

.timeline-axis {
  position: absolute;
  left: clamp(1rem, 4vw, 3rem);
  right: clamp(1rem, 4vw, 3rem);
  top: 50%;
  height: 2px;
  background: linear-gradient(to right,
    transparent 0%,
    var(--line) 5%,
    var(--brand) 50%,
    var(--line) 95%,
    transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) var(--line-soft);
  padding: 1rem 0;
  position: relative;
  z-index: 1;
}
.timeline-scroll::-webkit-scrollbar { height: 8px; }
.timeline-scroll::-webkit-scrollbar-track { background: var(--line-soft); border-radius: 4px; }
.timeline-scroll::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 4px; }
.timeline-scroll::-webkit-scrollbar-thumb:hover { background: var(--brand-2); }
.timeline-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }

.timeline {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  width: max-content;
}

.tl-item {
  scroll-snap-align: center;
  width: 280px;
  min-height: 200px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tl-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 3px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s var(--ease);
}
.tl-item.is-active {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.tl-item.is-active::after {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent);
}

.tl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.tl-logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: transparent;
}
.tl-logo-chip[data-logo="raster"] {
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line-soft);
}
[data-theme="dark"] .tl-logo-chip[data-logo="raster"] {
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18);
}
.tl-logo {
  display: block;
  height: 20px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  opacity: 0.95;
}
[data-theme="dark"] .tl-logo-chip[data-logo="mono"] .tl-logo {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.tl-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--accent);
}
.tl-icon svg { width: 24px; height: 24px; }

.tl-year {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.04em;
}
[data-theme="dark"] .tl-year { color: var(--brand-2); }
.tl-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin: 0;
}
.tl-org {
  font-size: 0.875rem;
  color: var(--ink-mute);
  margin: 0;
  font-style: italic;
}
.tl-tag {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
  margin-top: auto;
}

.timeline-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.75rem);
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.timeline-hint__caption {
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  opacity: 0.75;
}

/* Compact arrow nav (Newer / Older) — drives the on-strand ribosome. */
.ribo-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
              background 0.25s var(--ease), color 0.25s var(--ease);
}
.ribo-nav svg { width: 14px; height: 14px; flex-shrink: 0; }
.ribo-nav:hover:not([disabled]) {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--brand);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.ribo-nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.ribo-nav[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}
[data-theme="dark"] .ribo-nav {
  background: color-mix(in srgb, var(--surface) 50%, transparent);
}

/* Translating ribosome that rides the RNA strand. Group transform moves it
   to the active role's position; the ellipses are drawn in local coords. */
.rna-ribosome {
  pointer-events: none;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.rna-ribosome__lg {
  fill: color-mix(in srgb, var(--brand) 85%, transparent);
  stroke: var(--brand);
  stroke-width: 0.7;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
}
.rna-ribosome__sm {
  fill: color-mix(in srgb, var(--accent) 80%, transparent);
  stroke: var(--accent);
  stroke-width: 0.7;
}
.rna-ribosome__seam {
  stroke: color-mix(in srgb, var(--surface) 70%, transparent);
  stroke-width: 0.6;
  opacity: 0.7;
}
.rna-ribosome__site {
  fill: var(--surface);
  opacity: 0.95;
}
[data-theme="dark"] .rna-ribosome__lg {
  fill: color-mix(in srgb, var(--brand-2) 70%, transparent);
  stroke: var(--brand-2);
}
[data-theme="dark"] .rna-ribosome__sm {
  fill: color-mix(in srgb, var(--accent) 70%, transparent);
}

/* ============ Arc dial + Task panel ============ */
.disc-wrap {
  max-width: 1400px;
  margin: clamp(1.5rem, 4vw, 3rem) auto 0;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

/* Linear time-scale dial — a horizontal baseline with year ticks and a bright active segment
   marking the focused role's date range. */
.arc-dial {
  position: relative;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 1200 / 96; /* matches the SVG viewBox — strand spans full width */
}
.arc-dial__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

/* RNA-strand baseline — sugar-phosphate backbone with base-pair rungs. */
.arc-dial__guide {
  pointer-events: none;
}
.rna-backbone {
  fill: none;
  stroke: var(--disc-tick-major);
  stroke-width: 1.4;
  opacity: 0.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rna-rung {
  stroke: var(--disc-tick);
  stroke-width: 1;
  opacity: 0.55;
  stroke-linecap: round;
}
[data-theme="dark"] .rna-backbone { opacity: 0.95; }
[data-theme="dark"] .rna-rung { opacity: 0.7; }

/* Year ticks across the baseline. */
.arc-dial__tick {
  stroke: var(--disc-tick-major);
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: 0.7;
}
.arc-dial__tick--minor {
  stroke: var(--disc-tick);
  stroke-width: 0.8;
  opacity: 0.55;
}
.arc-dial__yearlabel {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  fill: var(--ink-mute);
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* Bright active segment — highlighted slice of the RNA backbone for the focused role. */
.arc-dial__segment {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 55%, transparent));
  transition: d 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Role anchor dots + above-axis year labels. */
.arc-dial__anchor {
  fill: var(--disc-tick-major);
  stroke: var(--bg-elev);
  stroke-width: 1.2;
  transition: r 0.3s var(--ease), fill 0.3s var(--ease);
}
.arc-dial__anchor.is-active {
  r: 4.8;
  fill: var(--accent);
}
.arc-dial__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  fill: var(--ink-mute);
  letter-spacing: 0.04em;
  transition: fill 0.3s var(--ease), font-size 0.3s var(--ease);
}
.arc-dial__label.is-active {
  fill: var(--brand);
  font-size: 11px;
}
[data-theme="dark"] .arc-dial__label.is-active { fill: var(--brand-2); }
.arc-dial__leader {
  stroke: var(--disc-tick);
  stroke-width: 0.6;
  opacity: 0.5;
  stroke-linecap: round;
}

/* Invisible click/keyboard hit zone covering each role marker on the arc.
   Pointer events live here so users can tap anywhere near the year. */
.arc-dial__hit {
  fill: transparent;
  cursor: pointer;
  outline: none;
  transition: fill 0.2s var(--ease);
}
.arc-dial__hit:hover,
.arc-dial__hit:focus-visible {
  fill: color-mix(in srgb, var(--accent) 12%, transparent);
}
.arc-dial__hit:focus-visible {
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
.arc-dial__hit:hover + .arc-dial__anchor,
.arc-dial__hit:focus-visible + .arc-dial__anchor {
  r: 4.4;
  fill: var(--accent);
}

/* Static task panel sitting below the time-scale bar. */
.task-panel {
  position: relative;
  margin: clamp(0.75rem, 2vw, 1.25rem) auto 0;
  max-width: 720px;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--brand) 4%, var(--bg-elev)) 0%,
    var(--bg-elev) 100%);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem 1.25rem;
  box-shadow: var(--shadow);
}

.task-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line-soft);
}
.task-panel__meta { min-width: 0; }
.task-panel__year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin: 0 0 0.3rem;
  font-weight: 600;
}
[data-theme="dark"] .task-panel__year { color: var(--brand-2); }
.task-panel__role {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.task-panel__org {
  font-size: 0.9rem;
  color: var(--ink-mute);
  margin: 0.2rem 0 0;
  font-style: italic;
}

/* Logo chip — raster (e.g. GSK orange JPG) gets a white rounded background so it sits well in dark mode. */
.task-panel__logo-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: transparent;
}
.task-panel__logo-chip[data-logo="raster"] {
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--line-soft);
}
[data-theme="dark"] .task-panel__logo-chip[data-logo="raster"] {
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18);
}
.task-panel__logo {
  display: block;
  height: 26px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}
/* SVG (monochrome) logos invert in dark mode; raster logos stay as-is on their white chip. */
[data-theme="dark"] .task-panel__logo-chip[data-logo="mono"] .task-panel__logo {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.task-panel__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.task-panel__list li {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 0.6rem;
}
.task-panel__list .bullet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin-top: 0.1em;
}
.task-panel__list .bullet svg {
  width: 20px;
  height: 20px;
  display: block;
}
.task-panel__list .task-text { display: block; }
@media (max-width: 720px) {
  .task-panel { padding: 0.95rem 1rem 1rem; }
  .task-panel__list li { font-size: 0.86rem; line-height: 1.45; }
  .task-panel__list .bullet svg { width: 18px; height: 18px; }
  .task-panel__logo { height: 22px; max-width: 96px; }
  .arc-dial { aspect-ratio: 1200 / 130; }  /* slightly taller on mobile so labels breathe */
}

/* ============ Grid section (Edu + Cert) ============ */
.grid-section {
  padding: clamp(2rem, 5vw, 4rem) 0;
  max-width: 1200px;
  margin: 0 auto;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 0 clamp(1rem, 4vw, 3rem);
}
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

.card-list {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card-list__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 1.2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--brand);
}
[data-theme="dark"] .card-list__title { color: var(--brand-2); }
.card-list ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.entry {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1rem;
  align-items: start;
}
.entry__year {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 2px;
}
.entry__title { margin: 0; font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.entry__org { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--ink-mute); font-style: italic; }

/* ============ Skills ============ */
.skills {
  padding: clamp(2rem, 5vw, 4rem) 0;
  max-width: 1200px;
  margin: 0 auto;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  padding: 0 clamp(1rem, 4vw, 3rem);
}
.skill-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.skill-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0.7;
}
.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.skill-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
[data-theme="dark"] .skill-card__icon {
  background: color-mix(in srgb, var(--brand-2) 14%, transparent);
  color: var(--brand-2);
}
.skill-card__icon svg { width: 22px; height: 22px; }
.skill-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.skill-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.skill-card ul li {
  font-size: 0.875rem;
  color: var(--ink-soft);
  padding-left: 0.95rem;
  position: relative;
}
.skill-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.lang-list { display: grid; gap: 0.85rem; }
.lang-list li.lang {
  display: block;
  padding-left: 0;
}
.lang-list li.lang::before { display: none; }
.lang__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.lang__name {
  font-size: 0.875rem;
  color: var(--ink);
  font-weight: 500;
}
.lang__level {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--brand);
  padding: 0.1rem 0.5rem;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-radius: 100px;
}
.lang__bar {
  position: relative;
  height: 6px;
  width: 100%;
  border-radius: 100px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  overflow: hidden;
}
.lang__fill {
  position: absolute;
  inset: 0;
  width: var(--lvl, 0%);
  border-radius: 100px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  transform-origin: left center;
  animation: lang-grow 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes lang-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.lang__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.lang__streak {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: #d2691e;
  padding: 0.1rem 0.45rem 0.1rem 0.35rem;
  background: color-mix(in srgb, #f59e0b 14%, transparent);
  border-radius: 100px;
  line-height: 1;
}
.lang__streak svg {
  width: 11px;
  height: 11px;
  display: block;
  filter: drop-shadow(0 0 2px color-mix(in srgb, #f59e0b 50%, transparent));
}
.lang__streak-num { font-weight: 600; }
.lang__streak-unit { opacity: 0.75; }
[data-theme="dark"] .lang__streak {
  color: #ffb35c;
  background: color-mix(in srgb, #ffb35c 16%, transparent);
}
[data-theme="dark"] .lang__level { color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 14%, transparent); }
[data-theme="dark"] .lang__bar { background: color-mix(in srgb, var(--ink) 18%, transparent); }
[data-theme="dark"] .lang__fill { background: linear-gradient(90deg, var(--brand-2) 0%, var(--accent) 100%); }

/* ============ Publications ============ */
.publications {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
  max-width: 1100px;
  margin: 0 auto;
}
.pubs {
  list-style: none;
  padding: 0 clamp(1rem, 4vw, 3rem);
  margin: 0;
  display: grid;
  gap: 1rem;
}
.pub {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.pub:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.pub__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
  margin-bottom: 0.65rem;
}
.pub__type {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}
.pub__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  border: 1px solid var(--line-soft);
}
.pub__badge svg { width: 13px; height: 13px; stroke-width: 2.2; }
.pub__badge strong { color: var(--ink); font-weight: 600; }
.pub__badge--oa {
  color: color-mix(in srgb, #d97706 70%, var(--ink));
  background: color-mix(in srgb, #d97706 12%, transparent);
  border-color: color-mix(in srgb, #d97706 30%, transparent);
}
[data-theme="dark"] .pub__badge { background: color-mix(in srgb, var(--ink) 14%, transparent); }
[data-theme="dark"] .pub__badge--oa { color: #f0a657; background: color-mix(in srgb, #d97706 22%, transparent); }
.pub__type--thesis { background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); }
.pub__type--journal { background: color-mix(in srgb, var(--accent) 18%, transparent); color: color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.pub__type--talk { background: color-mix(in srgb, #d98a2b 18%, transparent); color: #b46b15; }
.pub__type--poster { background: color-mix(in srgb, #8b6dca 18%, transparent); color: #6346a8; }
[data-theme="dark"] .pub__type--thesis { color: var(--brand-2); }
[data-theme="dark"] .pub__type--journal { color: var(--accent); }
[data-theme="dark"] .pub__type--talk { color: #e3a35a; }
[data-theme="dark"] .pub__type--poster { color: #b89ee6; }

.pub__cite {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.5;
}
.pub__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 0.65rem;
}
.pub__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dashed var(--brand);
  padding-bottom: 1px;
}
.pub__link svg { width: 13px; height: 13px; flex-shrink: 0; }
[data-theme="dark"] .pub__link { color: var(--brand-2); border-bottom-color: var(--brand-2); }
.pub__link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ============ Footer ============ */
.site-footer {
  padding: 2rem 1rem 3rem;
  font-size: 0.8125rem;
  color: var(--ink-mute);
  border-top: 1px solid var(--line-soft);
}
.site-footer__row {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}
.site-footer__row > p { margin: 0; }
.site-footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-elev);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.45rem 0.95rem;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.footer-link svg { width: 14px; height: 14px; }
.footer-link:hover {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  transform: translateY(-1px);
}
[data-theme="dark"] .footer-link:hover { color: var(--brand-2); }

/* ============ Hero scientific motif ============ */
.hero { position: relative; overflow: hidden; }
.hero__motif {
  position: absolute;
  top: 50%;
  right: -3%;
  width: clamp(420px, 45vw, 720px);
  aspect-ratio: 1 / 1;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
  color: var(--brand);
  opacity: 0.18;
  filter: blur(0.2px);
}
[data-theme="dark"] .hero__motif {
  color: var(--brand-2);
  opacity: 0.22;
}
.hero__motif svg { width: 100%; height: 100%; display: block; }
.hero__motif .motif-ab,
.hero__motif .motif-virus {
  transform-origin: 50% 50%;
  animation: motif-drift 28s ease-in-out infinite alternate;
}
@keyframes motif-drift {
  0%   { transform: rotate(-2deg) translateY(-2px); }
  100% { transform: rotate(2deg) translateY(2px); }
}
/* Released virions drift independently */
.motif-virion {
  transform-box: fill-box;
  transform-origin: center;
  animation: virion-float 12s ease-in-out infinite alternate;
}
.motif-virion--1 { animation-duration: 14s; }
.motif-virion--2 { animation-duration: 18s; animation-direction: alternate-reverse; }
.motif-virion--3 { animation-duration: 22s; }
@keyframes virion-float {
  0%   { translate: 0 0; }
  50%  { translate: -6px 4px; }
  100% { translate: 4px -6px; }
}
.motif-orbit__node {
  transform-origin: 300px 300px;
  animation: motif-orbit 22s linear infinite;
}
.motif-orbit__node--2 { animation-duration: 34s; animation-direction: reverse; }
.motif-orbit__node--3 { animation-duration: 28s; }
.motif-orbit__node--4 { animation-duration: 40s; animation-direction: reverse; }
@keyframes motif-orbit {
  to { transform: rotate(360deg); }
}
.hero__inner { position: relative; z-index: 1; }

@media (max-width: 720px) {
  .hero__motif { width: 360px; right: -25%; opacity: 0.12; }
}

/* ============ Colophon modal ============ */
.colophon {
  border: none;
  border-radius: var(--radius-lg, 16px);
  padding: 0;
  max-width: 540px;
  width: calc(100% - 2rem);
  background: var(--bg-elev);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.colophon::backdrop {
  background: rgba(8, 22, 36, 0.6);
  backdrop-filter: blur(4px);
}
.colophon__inner {
  position: relative;
  padding: 1.75rem 1.75rem 1.5rem;
}
.colophon__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--ink-mute);
  padding: 0.4rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
}
.colophon__close svg { width: 18px; height: 18px; }
.colophon__close:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.colophon h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  padding-right: 1.5rem;
}
.colophon p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.925rem;
  line-height: 1.55;
}
.colophon__list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.55rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.875rem;
}
.colophon__list dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  padding-top: 0.15rem;
}
[data-theme="dark"] .colophon__list dt { color: var(--brand-2); }
.colophon__list dd {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}
.colophon__list a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dashed var(--brand);
}
[data-theme="dark"] .colophon__list a { color: var(--brand-2); border-bottom-color: var(--brand-2); }
.colophon__note {
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8125rem;
  color: var(--ink-mute);
}
@media (max-width: 540px) {
  .colophon__list { grid-template-columns: 1fr; gap: 0.25rem; }
  .colophon__list dt { padding-top: 0.5rem; }
}

/* ============ Looking-for / availability banner ============ */
.looking-for {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.25rem auto 2rem;
  padding: 0.7rem 1.1rem;
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-elev));
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  color: var(--ink);
}
.looking-for__pulse {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}
.looking-for__pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: lf-pulse 2.4s ease-out infinite;
}
@keyframes lf-pulse {
  0%   { transform: scale(0.5); opacity: 0.5; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}
.looking-for__text { margin: 0; line-height: 1.45; }
.looking-for__label {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-right: 0.25rem;
}
.looking-for strong { font-weight: 600; color: var(--brand); }
.looking-for__sep { margin: 0 0.45rem; color: var(--ink-mute); }
.looking-for__where { color: var(--ink-soft); }
@media (max-width: 640px) {
  .looking-for {
    width: 100%;
    border-radius: var(--radius);
    align-items: flex-start;
  }
  .looking-for__sep { display: none; }
  .looking-for__where { display: block; margin-top: 0.2rem; }
}

/* ============ Selected trials list (task panel) ============ */
.task-panel__trials {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.task-panel__trials-title {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin: 0 0 0.7rem;
  font-weight: 600;
}
.trials-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
}
.trial {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 50%, var(--bg-elev));
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
}
.trial__head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.trial__phase {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-elev));
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}
.trial__indication {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.3;
}
.trial__study {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--brand) 8%, var(--bg-elev));
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}
[data-theme="dark"] .trial__study {
  color: var(--ink);
  background: color-mix(in srgb, var(--brand-2) 14%, transparent);
  border-color: color-mix(in srgb, var(--brand-2) 28%, transparent);
}
.trial__scale {
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.trial__design {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.trial__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.trial__chip {
  display: inline-block;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}

/* ============ Beyond the CV: Currently + Map ============ */
.beyond {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  max-width: 1100px;
  margin: 0 auto;
}
.beyond-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* Currently card */
.currently {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.currently__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.currently__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
  animation: currently-pulse 2.6s ease-in-out infinite;
}
@keyframes currently-pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
  50%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 8%, transparent); }
}
.currently__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.currently__item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.85rem;
  align-items: flex-start;
}
.currently__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-elev));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
}
.currently__icon svg { width: 18px; height: 18px; }
.currently__body p { margin: 0; line-height: 1.5; color: var(--ink); }
.currently__lead {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.15rem !important;
  font-weight: 600;
}
.currently__body em { font-style: italic; color: var(--brand); }
.currently__body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  transition: border-color 0.2s;
}
.currently__body a:hover { border-bottom-color: var(--accent); }

/* Running challenge progress bar */
.run-progress {
  margin-top: 0.1rem;
}
.run-progress__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.run-progress__current {
  font-size: 0.95rem;
  color: var(--ink);
}
.run-progress__current strong {
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-weight: 500;
  font-size: 1.55rem;
  color: var(--brand);
  margin-right: 0.18rem;
  letter-spacing: -0.01em;
}
[data-theme="dark"] .run-progress__current strong { color: var(--brand-2); }
.run-progress__goal {
  font-size: 0.78rem;
  color: var(--ink-mute);
  font-family: var(--font-mono, ui-monospace, monospace);
  letter-spacing: 0.04em;
}
.run-progress__track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-soft));
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
}
.run-progress__fill {
  position: relative;
  height: 100%;
  width: var(--pct, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 75%, var(--brand)) 0%,
    var(--accent) 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent),
              0 0 12px color-mix(in srgb, var(--accent) 35%, transparent);
  animation: run-fill-in 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
@keyframes run-fill-in {
  from { width: 0; }
  to   { width: var(--pct, 0%); }
}
.run-progress__runner {
  position: absolute;
  right: -8px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent);
  animation: run-bob 1.6s ease-in-out infinite;
}
.run-progress__runner svg { width: 12px; height: 12px; }
@keyframes run-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.5px); }
}
.run-progress__meta {
  margin-top: 0.45rem !important;
  font-size: 0.76rem;
  color: var(--ink-mute);
  font-family: var(--font-mono, ui-monospace, monospace);
  letter-spacing: 0.03em;
}
.run-progress__pct {
  color: var(--accent);
  font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
  .run-progress__fill { animation: none; }
  .run-progress__runner { animation: none; }
}

/* Map card */
.map-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.map-card__title {
  font-family: var(--font-serif, "Fraunces", "Source Serif Pro", Georgia, serif);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0 0 0.2rem;
  color: var(--brand);
}
.map-card__sub {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--ink-mute);
}
.map-card__viz {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--map-bg-bottom);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-height: 0;
  overflow: hidden;
}
.map-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius) - 4px);
}
.map-land {
  color: var(--map-land);
}
.map-graticule {
  color: var(--ink-mute);
}
.map-arc {
  color: var(--accent);
  opacity: 0.7;
  stroke-linecap: round;
}

/* Pins — every node uses a local --pin-color CSS var so halos/dots/labels
   share the same hue. Category modifier classes (--current/--worked/--live/--born)
   override --pin-color. Default falls back to the brand navy. */
.map-node {
  --pin-color: var(--pin-worked);
}
.map-node--current { --pin-color: var(--pin-current); }
.map-node--worked  { --pin-color: var(--pin-worked);  }
.map-node--live    { --pin-color: var(--pin-live);    }
.map-node--born    { --pin-color: var(--pin-born);    }

.map-node__halo {
  fill: color-mix(in srgb, var(--pin-color) 22%, transparent);
  transform-box: fill-box;
  transform-origin: center;
  animation: map-halo 3.4s ease-out infinite;
}
.map-node__halo--2 {
  animation-delay: 1.1s;
  fill: color-mix(in srgb, var(--pin-color) 14%, transparent);
}
@keyframes map-halo {
  0%   { opacity: 0.75; transform: scale(0.35); }
  85%  { opacity: 0;    transform: scale(1.7); }
  100% { opacity: 0;    transform: scale(1.7); }
}
.map-node__dot {
  fill: var(--pin-color);
  stroke: var(--bg-elev);
  stroke-width: 0.6;
}
.map-node__dot--current {
  fill: var(--pin-current);
  stroke: var(--bg-elev);
  stroke-width: 0.7;
  filter: drop-shadow(0 0 2px color-mix(in srgb, var(--pin-current) 70%, transparent));
}
.map-node__label {
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  fill: color-mix(in srgb, var(--pin-color) 90%, var(--ink));
  letter-spacing: 0.01em;
  paint-order: stroke;
  stroke: var(--map-bg-bottom);
  stroke-width: 3;
  stroke-linejoin: round;
}
[data-theme="dark"] .map-node__label {
  fill: color-mix(in srgb, var(--pin-color) 88%, white);
}
.map-node__label--current {
  fill: var(--pin-current);
}
[data-theme="dark"] .map-node__label--current {
  fill: var(--pin-current);
}

/* Locations legend list (grid 2x2 below the map) */
.map-card__legend {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 1.1rem;
  margin: 0.9rem 0 0;
  padding: 0;
}
.map-loc {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 0.6rem;
  align-items: start;
}
.map-loc {
  --pin-color: var(--pin-worked);
}
.map-loc--current { --pin-color: var(--pin-current); }
.map-loc--worked  { --pin-color: var(--pin-worked);  }
.map-loc--live    { --pin-color: var(--pin-live);    }
.map-loc--born    { --pin-color: var(--pin-born);    }

.map-loc__dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--pin-color);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pin-color) 24%, transparent);
}
.map-loc--current .map-loc__dot {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pin-current) 30%, transparent),
              0 0 6px color-mix(in srgb, var(--pin-current) 45%, transparent);
}
.map-loc__name {
  margin: 0 !important;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: 0.005em;
}
.map-loc--current .map-loc__name { color: var(--pin-current); }
.map-loc--worked  .map-loc__name { color: var(--pin-worked); }
.map-loc--live    .map-loc__name { color: color-mix(in srgb, var(--pin-live) 90%, var(--ink)); }
.map-loc--born    .map-loc__name { color: color-mix(in srgb, var(--pin-born) 90%, var(--ink)); }
[data-theme="dark"] .map-loc--worked .map-loc__name { color: color-mix(in srgb, var(--pin-worked) 78%, white); }
.map-loc__meta {
  margin: 0.1rem 0 0 !important;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  line-height: 1.25;
}
@media (max-width: 480px) {
  .map-card__legend { grid-template-columns: 1fr; gap: 0.45rem; }
}

/* Map hover tooltip */
.map-card { position: relative; }
.map-node { cursor: default; }
.map-node text { pointer-events: auto; cursor: help; }
.map-tip {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px));
  background: var(--surface);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-left: 3px solid var(--pin-color, var(--brand));
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.map-tip.is-visible {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 14px));
}
[data-theme="dark"] .map-tip {
  background: color-mix(in srgb, var(--surface) 92%, black);
  border-color: color-mix(in srgb, white 12%, transparent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.25);
}
@media (prefers-reduced-motion: reduce) {
  .map-tip { transition: opacity 0.12s linear; }
  .map-tip.is-visible { transform: translate(-50%, calc(-100% - 14px)); }
}

/* ============ Print stylesheet (for PDF export) ============ */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  html, body { background: #fff !important; color: #0a2338 !important; font-size: 10.5pt; }
  .theme-toggle, .bg-pattern, .hero__motif,
  .site-footer__actions, .timeline-hint,
  .arc-dial, .colophon, .disc-wrap > .arc-dial,
  .timeline-wrap, .looking-for__pulse { display: none !important; }
  /* Flatten looking-for for print */
  .looking-for {
    background: #fff !important;
    border: 1px solid #d8dee4 !important;
    border-radius: 4px !important;
    width: 100% !important;
    padding: 4mm 6mm !important;
    margin-bottom: 4mm !important;
    font-size: 9.5pt;
  }
  /* Beyond section */
  .beyond { padding: 4mm 0 !important; }
  .beyond-grid { gap: 4mm !important; }
  .currently, .map-card {
    box-shadow: none !important;
    border: 1px solid #d8dee4 !important;
    padding: 4mm !important;
    break-inside: avoid;
  }
  .map-card__viz { min-height: 0 !important; padding: 2mm !important; background: #f4f6f8 !important; }
  .map-node__halo { display: none !important; }
  .map-land { color: #c1ccd5 !important; }
  .map-graticule { display: none !important; }
  .map-node__label { stroke: #f4f6f8 !important; }
  /* Running progress prints flat */
  .run-progress__fill { animation: none !important; box-shadow: none !important; background: #14a37f !important; }
  .run-progress__runner { animation: none !important; }
  /* Trials list */
  .trial { break-inside: avoid; background: #fff !important; }
  .trials-list { grid-template-columns: 1fr 1fr !important; }
  /* Show all task panels stacked when printing */
  .disc-wrap { display: block !important; }
  .task-panel { break-inside: avoid; margin-bottom: 0.8rem; box-shadow: none !important; border: 1px solid #d8dee4 !important; }
  .hero { padding: 0 0 0.5rem; }
  .hero__inner { display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: start; }
  .hero__photo-wrap, .hero__photo { width: 88px !important; height: 88px !important; }
  .hero__photo-ring { display: none; }
  .hero__name { font-size: 24pt !important; margin: 0 0 4px !important; }
  .hero__tagline { font-size: 10pt !important; line-height: 1.4; margin-bottom: 6px !important; }
  .hero__chips, .hero__contact { font-size: 9pt; }
  .section-title { font-size: 14pt !important; }
  .section-sub { font-size: 9.5pt !important; }
  .skills, .publications, .career { padding: 6mm 0 !important; page-break-inside: auto; }
  .pub { break-inside: avoid; box-shadow: none !important; border: 1px solid #d8dee4 !important; }
  .pub__badge { border: 1px solid #d8dee4 !important; }
  a { color: #0a4d6e !important; text-decoration: none; border: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 7.5pt; color: #6b7c8a; word-break: break-all; }
  /* Hide bg of card hover effects */
  .timeline-card, .skill-card { box-shadow: none !important; }
  .site-footer { border-top: 1px solid #d8dee4; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero__photo-ring { animation: none; }
}
