:root {
  --charcoal: #2a2a2a;
  --charcoal-overlay: rgba(30, 30, 30, 0.92);
  --gray-mid: #3d3d3d;
  --gray-soft: #5c5c5c;
  --yellow: #f5c518;
  --yellow-soft: #ffe566;
  --yellow-dim: rgba(245, 197, 24, 0.15);
  --bg: #f4f4f2;
  --bg-muted: #ececea;
  --bg-card: #ffffff;
  --text: #1e1e1e;
  --text-muted: #6b6b6b;
  --text-on-dark: #f5f5f5;
  --text-on-dark-muted: #b8b8b8;
  --border: #dcdcd8;
  --tab-active: #c9a000;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", var(--font);
  --max-width: 1080px;
  --avatar-size: 112px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container-wide {
  width: min(var(--max-width), calc(100% - 2.5rem));
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

/* ── Hero: Carlos-inspired gray + yellow ── */

.profile-hero.carlos-hero {
  position: relative;
  background-color: var(--charcoal);
  background-image:
    linear-gradient(145deg, #1e1e1e 0%, #2a2a2a 45%, #333333 100%),
    radial-gradient(ellipse at 85% 15%, rgba(245, 197, 24, 0.12) 0%, transparent 55%);
  color: var(--text-on-dark);
  padding: 2.5rem 0 2.25rem;
  overflow: hidden;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.hero-left-only {
  padding: 0;
}

.hero-left {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
}

.profile-avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--yellow);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.2);
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.65rem;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
}

.hero-role {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-on-dark-muted);
  line-height: 1.5;
  max-width: 36rem;
}

.hero-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.hero-profile-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-on-dark);
  border: 1px solid rgba(245, 197, 24, 0.35);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  transition: background 0.15s, border-color 0.15s;
}

.hero-profile-links a:hover {
  background: rgba(245, 197, 24, 0.12);
  border-color: var(--yellow);
}

/* Hero animated viz panel */
.hero-viz {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0.85rem;
  min-height: 200px;
}

.viz-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
}

.viz-label {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

.viz-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 120px;
}

.viz-bar {
  flex: 1;
  height: 100%;
  background: linear-gradient(180deg, var(--yellow-soft) 0%, var(--yellow) 100%);
  border-radius: 4px 4px 2px 2px;
  transform-origin: bottom center;
  animation: barOscillate 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.15s);
  opacity: 0.9;
}

.viz-card-donut {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.viz-donut {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(
    var(--yellow) 0deg 110deg,
    rgba(255, 255, 255, 0.12) 110deg 200deg,
    var(--yellow-soft) 200deg 290deg,
    rgba(255, 255, 255, 0.08) 290deg 360deg
  );
  animation: donutSpin 12s linear infinite;
  box-shadow: inset 0 0 0 14px var(--charcoal);
}

.viz-orbit {
  position: absolute;
  inset: 0;
  animation: orbitSpin 10s linear infinite reverse;
}

.viz-orbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(245, 197, 24, 0.6);
}

.viz-orbit span:nth-child(2) {
  top: auto;
  bottom: 18%;
  left: 18%;
  width: 8px;
  height: 8px;
  opacity: 0.7;
}

.viz-orbit span:nth-child(3) {
  top: 55%;
  right: 12%;
  left: auto;
  width: 6px;
  height: 6px;
  opacity: 0.5;
}

@keyframes barOscillate {
  0%, 100% { transform: scaleY(0.28); }
  50% { transform: scaleY(1); }
}

@keyframes donutSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes motionBarSweep {
  0%, 100% { transform: scaleX(0.2); opacity: 0.45; }
  50% { transform: scaleX(1); opacity: 1; }
}

@keyframes ringPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.35; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

.profile-hero:not(.carlos-hero) {
  position: relative;
  background-color: var(--charcoal);
  color: var(--text-on-dark);
  padding: 2.75rem 0 2.5rem;
}

.hero-contact {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-on-dark-muted);
}

.hero-contact a {
  color: var(--text-on-dark);
}

.hero-contact a:hover {
  text-decoration: underline;
}

/* ── Latest canvas carousel (overlay slides) ── */

.latest-canvas {
  position: relative;
  height: calc(100vh - 52px);
  min-height: 520px;
  background:
    linear-gradient(145deg, #1e1e1e 0%, #2a2a2a 45%, #333333 100%),
    radial-gradient(ellipse at 85% 15%, rgba(245, 197, 24, 0.1) 0%, transparent 55%);
  color: var(--text-on-dark);
  overflow: hidden;
}

.latest-canvas-viewport {
  position: relative;
  width: 100%;
  height: 100%;
}

.latest-canvas-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.canvas-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(48px);
  transition: opacity 0.75s ease, transform 0.75s ease, visibility 0.75s;
  overflow: hidden;
  z-index: 1;
}

.canvas-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  z-index: 3;
}

.canvas-slide.is-leaving {
  opacity: 0;
  transform: translateX(-48px);
  z-index: 2;
}

.canvas-slide-inner {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.canvas-slide-scroll {
  justify-content: flex-start;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 197, 24, 0.4) transparent;
}

.canvas-slide-hero .canvas-slide-inner {
  justify-content: center;
}

.hero-spread {
  display: grid;
  grid-template-columns: minmax(160px, 22vw) 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  width: 100%;
}

.hero-spread-left {
  display: flex;
  justify-content: flex-start;
}

.hero-spread-right {
  min-width: 0;
}

.profile-avatar-large {
  width: clamp(140px, 18vw, 220px);
  height: clamp(140px, 18vw, 220px);
}

.hero-spread-right h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
}

.hero-role-primary {
  margin: 0;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 600;
  color: var(--yellow);
  line-height: 1.3;
}

.hero-role-institution {
  margin: 0.2rem 0 1.25rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--text-on-dark-muted);
  line-height: 1.4;
}

.hero-spread .hero-profile-links {
  margin-bottom: 1rem;
}

.canvas-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.canvas-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.canvas-dot.is-active {
  background: var(--yellow);
  transform: scale(1.25);
}

.canvas-dot:hover {
  background: var(--yellow-soft);
}

.toolbar-inner-wide {
  width: min(1400px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.highlight-grid-canvas {
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.latest-canvas .highlight-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.latest-canvas .highlight-card h2,
.latest-canvas .highlight-card h2 a {
  color: var(--text-on-dark);
}

.latest-canvas .highlight-card-meta {
  color: var(--text-on-dark-muted);
}

.latest-canvas .loading,
.latest-canvas .empty-state {
  color: var(--text-on-dark-muted);
}

.latest-canvas .section-title-light {
  color: #fff;
}

.latest-canvas .about-tags span {
  background: rgba(245, 197, 24, 0.12);
  color: var(--yellow-soft);
  border-color: rgba(245, 197, 24, 0.35);
}

#mainScroll.hidden {
  display: none;
}

/* ── Sequential section reveal (legacy) ── */

.section-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.latest-active {
  background: var(--charcoal);
  overflow: hidden;
}

body.latest-active .site-footer {
  display: none;
}

body.latest-active .content-toolbar {
  background: var(--charcoal);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.latest-active .tab {
  color: var(--text-on-dark-muted);
}

body.latest-active .tab:hover {
  color: var(--text-on-dark);
}

body.latest-active .tab.active {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

body.latest-active .toolbar-search input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-on-dark);
}

body.latest-active .toolbar-search input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

body.latest-active .toolbar-search input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(245, 197, 24, 0.45);
}

.main-content-gray {
  background: var(--charcoal);
  color: var(--text-on-dark);
}

/* ── Profile dashboard (data-driven CV) ── */

.profile-dashboard {
  padding: 2rem 0 1rem;
}

.profile-bio-text {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-on-dark-muted);
  margin: 0 0 1rem;
  max-width: 52rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-on-dark);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.metric-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1.1;
}

.metric-label {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-on-dark-muted);
}

.metric-detail {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.profile-block {
  padding: 2rem 0 0.5rem;
}

.profile-block-edu {
  padding-bottom: 1.5rem;
}

.section-lead-light {
  margin: -0.5rem 0 1.25rem;
  font-size: 0.9rem;
  color: var(--text-on-dark-muted);
}

.main-content-gray .section-lead {
  margin: -0.5rem 0 1.25rem;
  font-size: 0.9rem;
  color: var(--text-on-dark-muted);
}

.main-content-gray .section-lead strong {
  color: var(--yellow);
}

.employment-group {
  margin-bottom: 1.75rem;
}

.employment-group-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--yellow);
  display: inline-block;
  color: var(--text-on-dark);
}

.employment-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.job-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--yellow);
  transition: transform 0.15s, background 0.15s;
}

.job-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.job-card.job-industry {
  border-left-color: #c9a000;
}

.job-card.job-honorary {
  border-left-color: #ffe566;
}

.job-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.job-card h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-on-dark);
}

.job-duration {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--yellow);
  background: rgba(245, 197, 24, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.job-dept,
.job-institute {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  color: var(--text-on-dark-muted);
}

.job-period {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
}

.job-note {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-on-dark-muted);
}

.education-path {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  position: relative;
}

.education-path::before {
  content: "";
  position: absolute;
  top: 1.35rem;
  left: 8%;
  right: 8%;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow) 0%, var(--yellow-soft) 100%);
  z-index: 0;
  border-radius: 999px;
}

.edu-step {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.edu-node {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--yellow);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--yellow);
}

.edu-content h4 {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-on-dark);
}

.edu-content p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-on-dark-muted);
  line-height: 1.45;
}

.edu-dept {
  margin-top: 0.25rem !important;
  font-size: 0.72rem !important;
}

@keyframes eduFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Latest landing: about first, motion, publications ── */

.about-first {
  padding: 2rem 0 1.25rem;
}

.about-first .section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

.about-bio-compact p {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  max-width: 52rem;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.about-tags span {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(245, 197, 24, 0.12);
  color: var(--yellow-soft);
  border: 1px solid rgba(245, 197, 24, 0.35);
}

.main-content-gray .about-tags span {
  background: rgba(245, 197, 24, 0.12);
  color: var(--yellow-soft);
  border-color: rgba(245, 197, 24, 0.35);
}

.motion-panel {
  margin: 0 0 2rem;
  padding: 1.25rem 1.35rem;
  background: var(--charcoal);
  border-radius: 12px;
  border: 1px solid rgba(245, 197, 24, 0.2);
  overflow: hidden;
}

.motion-panel-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.motion-bars-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 56px;
}

.motion-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow) 0%, var(--yellow-soft) 100%);
  transform-origin: left center;
  animation: motionBarSweep 3.2s ease-in-out infinite;
  animation-delay: calc(var(--d) * 0.12s);
}

.motion-circles {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.motion-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(245, 197, 24, 0.5);
  animation: ringPulse 3s ease-in-out infinite;
}

.motion-ring.ring-2 {
  inset: 12px;
  animation-delay: 0.5s;
  border-color: rgba(245, 197, 24, 0.35);
}

.motion-ring.ring-3 {
  inset: 24px;
  background: var(--yellow-dim);
  border-color: var(--yellow);
  animation-delay: 1s;
}

.latest-header {
  margin-bottom: 1.25rem;
}

.latest-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  color: var(--text-on-dark);
}

.latest-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-on-dark-muted);
}

.about-extended {
  padding-top: 2.5rem;
}

.about-cards-light .light-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.35rem 1.5rem;
  border-left: 3px solid var(--yellow);
}

.about-cards-light .light-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

/* ── Tab toolbar ── */

.content-toolbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
}

.content-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.content-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.85rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--charcoal);
  border-bottom-color: var(--yellow);
  font-weight: 600;
}

.toolbar-search input {
  width: 200px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  background: var(--bg-muted);
}

.toolbar-search input:focus {
  outline: none;
  border-color: var(--yellow);
  background: #fff;
}

/* ── Highlight card grid ── */

.main-content {
  padding: 2rem 0 0;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 1.5rem;
  padding-bottom: 3rem;
}

.highlight-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  transition: background 0.2s, transform 0.2s;
}

.main-content-gray .highlight-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.highlight-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.main-content-gray .highlight-card h2,
.main-content-gray .highlight-card h2 a {
  color: var(--text-on-dark);
}

.main-content-gray .highlight-card-meta {
  color: var(--text-on-dark-muted);
}

.main-content-gray .loading,
.main-content-gray .empty-state {
  color: var(--text-on-dark-muted);
}

.highlight-card-image {
  width: 100%;
  height: 180px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-dark-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.highlight-card-image img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.highlight-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  letter-spacing: -0.01em;
}

.highlight-card h2 a {
  color: var(--text);
  transition: color 0.15s;
}

.highlight-card h2 a:hover {
  color: #9a7500;
}

.highlight-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.highlight-card-meta a {
  color: #9a7500;
}

.highlight-card-meta a:hover {
  text-decoration: underline;
}

.meta-sep {
  color: #d1d5db;
}

/* ── Publications panel (All tab) ── */

.publication-panel {
  padding-bottom: 3rem;
}

.pub-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.pub-controls select {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  background: var(--bg);
}

.pub-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
}

.publication-list {
  display: grid;
  gap: 0;
}

#publicationList {
  display: grid;
  gap: 2rem;
}

.pub-category-group {
  margin: 0;
}

.pub-category-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--charcoal);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.pub-category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-muted);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pub-category-group .publication-item:first-child {
  border-top: 0;
}

.publication-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.publication-item:first-child {
  border-top: 1px solid var(--border);
}

.publication-item h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

.publication-item h3 a {
  color: var(--text);
}

.publication-item h3 a:hover {
  color: var(--tab-active);
}

.pub-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.pub-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.loading,
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ── Lower sections ── */

.section {
  padding: 3.5rem 0;
  scroll-margin-top: 3.25rem;
}

.section-dark {
  background: var(--charcoal);
  background-image:
    linear-gradient(135deg, rgba(28, 34, 44, 0.98) 0%, rgba(38, 48, 62, 0.95) 50%, rgba(30, 40, 52, 0.98) 100%),
    radial-gradient(ellipse at 80% 10%, rgba(74, 143, 168, 0.15) 0%, transparent 55%);
  color: var(--text-on-dark);
}

.section-dark.section-focus {
  box-shadow: inset 0 0 0 2px rgba(147, 197, 253, 0.35);
}

.section-light {
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.5rem;
}

.section-eyebrow-dark {
  color: var(--text-muted);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.section-title-light {
  color: #fff;
}

.section-lead {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-on-dark-muted);
  margin: -0.5rem 0 1.75rem;
  max-width: 52rem;
}

.section-lead a {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.section-lead a:hover {
  color: #fff;
}

.section-dark .about-bio p,
.section-dark .content-block p {
  color: var(--text-on-dark-muted);
}

.section-dark .plain-list {
  color: var(--text-on-dark-muted);
}

.plain-list-light {
  color: var(--text-on-dark-muted);
}

.section-cards {
  margin-top: 2rem;
}

.dark-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 1.35rem 1.5rem;
  border-left: 3px solid rgba(147, 197, 253, 0.45);
  transition: background 0.2s, border-color 0.2s;
}

.dark-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

.dark-card h3 {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  margin: -0.75rem 0 1.5rem;
  font-size: 0.92rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.content-block h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
}

.content-block p {
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  font-size: 0.93rem;
}

.plain-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.plain-list li {
  margin-bottom: 0.35rem;
}

.about-bio p {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin: 0 0 1rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  border: 1px solid var(--border);
  padding: 1.35rem 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s, transform 0.15s;
}

.project-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.project-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.55rem;
  line-height: 1.4;
}

.project-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.qaf-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.qaf-highlights-section {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.qaf-highlight-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.qaf-highlight-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(147, 197, 253, 0.35);
  transform: translateY(-2px);
}

.qaf-highlight-card strong {
  display: block;
  color: #fff;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.qaf-highlight-card span {
  font-size: 0.82rem;
  color: var(--text-on-dark-muted);
  line-height: 1.5;
}

.qaf-cta {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--charcoal);
  background: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  transition: background 0.15s, transform 0.15s;
}

.qaf-cta:hover {
  background: #e8eef5;
  transform: translateY(-1px);
}

.qaf-cta-inline {
  margin-top: 0.5rem;
}

.qaf-detail-single {
  grid-template-columns: 1fr;
}

.qaf-company-card h3 {
  margin-bottom: 0.65rem;
}

.qaf-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.qaf-meta-item {
  flex: 1;
  min-width: 10rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.75rem 1rem;
}

.qaf-meta-item dt {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.25rem;
}

.qaf-meta-item dd {
  margin: 0;
  font-size: 0.88rem;
  color: #fff;
  line-height: 1.4;
}

.qaf-detail-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.25rem;
  margin-bottom: 0;
}

.page-section.hidden {
  display: none !important;
}

.qaf-company-card p {
  color: var(--text-on-dark-muted);
  font-size: 0.93rem;
  line-height: 1.65;
  margin: 0 0 0.85rem;
}

.qaf-company-card strong {
  color: #fff;
}

.site-footer {
  padding: 2.5rem 0 2.75rem;
  background: var(--charcoal);
  background-image:
    linear-gradient(180deg, rgba(28, 34, 44, 1) 0%, rgba(22, 28, 36, 1) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(74, 143, 168, 0.12) 0%, transparent 60%);
  color: var(--text-on-dark-muted);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.footer-brand {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.footer-tagline {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-on-dark-muted);
}

.footer-stats {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-copy {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 20rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .employment-cards {
    grid-template-columns: 1fr;
  }

  .education-path {
    grid-template-columns: 1fr;
  }

  .education-path::before {
    display: none;
  }

  .hero-spread {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .hero-spread-left {
    justify-content: center;
  }

  .hero-spread .hero-profile-links {
    justify-content: center;
  }

  .hero-left {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-role {
    font-size: 0.9rem;
  }

  .toolbar-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0;
  }

  .toolbar-search input {
    width: 100%;
  }

  .highlight-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .highlight-grid-canvas {
    grid-template-columns: 1fr;
  }

  .latest-canvas {
    min-height: 480px;
  }

  .canvas-slide-inner {
    padding: 1.25rem 1rem 3rem;
  }

  .qaf-meta-row {
    flex-direction: column;
  }

  .qaf-meta-item {
    min-width: 0;
  }

  .two-col,
  .qaf-detail-grid,
  .qaf-highlights,
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .canvas-slide {
    transition: none;
  }

  .section-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
