/* ════════════════════════════════════════════════════════════
   WALLACE CASACA — Personal Academic Site
   Design: Modern Academic — Navy + Blue accent palette
   ════════════════════════════════════════════════════════════ */

/* ── Google Fonts loaded in HTML ────────────────────────────────────────────
   Inter (400 500 600 700)  +  Playfair Display (700 900)  +  JetBrains Mono
   ──────────────────────────────────────────────────────────────────────── */

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Primary palette */
  --navy:       #0d1f3c;
  --navy-mid:   #1a3a5c;
  --navy-light: #264d7a;
  --blue:       #2563eb;
  --blue-hover: #1d4ed8;
  --blue-light: #60a5fa;
  --blue-pale:  #eff6ff;
  --cyan:       #0891b2;

  /* Neutrals */
  --white:      #ffffff;
  --gray-bg:    #f8fafc;
  --gray-50:    #f1f5f9;
  --gray-100:   #e2e8f0;
  --gray-200:   #cbd5e1;
  --gray-400:   #94a3b8;
  --gray-600:   #475569;
  --gray-800:   #1e293b;
  --gray-900:   #0f172a;

  /* Semantic */
  --text:       var(--gray-900);
  --text-mid:   var(--gray-600);
  --text-light: var(--gray-400);
  --border:     var(--gray-100);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --shadow-blue:0 4px 20px rgba(37,99,235,.25);

  /* Shape */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Motion */
  --ease:       cubic-bezier(.4,0,.2,1);
  --fast:       .15s;
  --mid:        .25s;
  --slow:       .4s;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body  {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img  { display: block; max-width: 100%; }
a    { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.section    { padding: 80px 0; }
.section-alt { background: var(--gray-bg); }

.serif { font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; }
.mono  { font-family: 'JetBrains Mono', 'Fira Code', monospace; }

/* ── Section title ─────────────────────────────────────────────────────────── */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  display: block;
  width: 5px;
  height: 1.2em;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(13, 31, 60, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.navbar-brand {
  color: var(--white);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-light), var(--cyan));
  flex-shrink: 0;
}

.navbar-nav {
  display: flex;
  gap: 2px;
  list-style: none;
}

.navbar-nav a {
  color: rgba(255,255,255,.65);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
  display: block;
}

.navbar-nav a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.navbar-nav a.active {
  background: rgba(37,99,235,.25);
  color: var(--blue-light);
  border: 1px solid rgba(96,165,250,.2);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: all var(--mid) var(--ease);
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  background-image:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(37,99,235,.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(8,145,178,.12) 0%, transparent 50%);
  color: var(--white);
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid decoration */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Bottom wave */
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 1;
}

/* Photo */
.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
}

.hero-photo-ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--blue-light), var(--cyan), var(--blue));
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), var(--shadow-blue);
  position: relative;
}

.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--navy);
}

.hero-photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  border: 3px solid var(--navy);
}

/* Info */
.hero-info { display: flex; flex-direction: column; gap: 0; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(37,99,235,.2);
  border: 1px solid rgba(96,165,250,.3);
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--blue-light);
  text-transform: uppercase;
}

.hero-name {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 10px;
  letter-spacing: -.02em;
}

.hero-title {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 4px;
  font-weight: 400;
}

.hero-institution {
  font-size: .9rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 28px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: all var(--mid) var(--ease);
}

.hero-links .btn-primary {
  background: var(--blue);
  color: var(--white);
  border: 1px solid transparent;
}
.hero-links .btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-blue);
}

.hero-links .btn-ghost {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.15);
}
.hero-links .btn-ghost:hover {
  background: rgba(255,255,255,.15);
  color: var(--white);
  transform: translateY(-1px);
}

/* ── Stats bar ──────────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--border);
}

.stat-item {
  padding: 24px 28px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background var(--fast) var(--ease);
}

.stat-item:hover { background: var(--blue-pale); }

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── About ──────────────────────────────────────────────────────────────────── */
#about .content-wrap {
  max-width: 760px;
}

#about p {
  font-size: 1.02rem;
  color: var(--gray-800);
  margin-bottom: 1em;
  line-height: 1.75;
}

#about p:last-child { margin-bottom: 0; }

/* ── Research Interests tags ─────────────────────────────────────────────────── */
.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-xl);
  font-size: .85rem;
  font-weight: 500;
  color: var(--gray-800);
  box-shadow: var(--shadow-sm);
  cursor: default;
  transition: all var(--mid) var(--ease);
  position: relative;
  overflow: hidden;
}

.tag::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  opacity: 0;
  transition: opacity var(--mid) var(--ease);
}

.tag:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tag span { position: relative; z-index: 1; }

/* ── Publication cards ──────────────────────────────────────────────────────── */
.pub-list { display: flex; flex-direction: column; gap: 14px; }

.pub-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  gap: 20px;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease), border-left-color var(--mid) var(--ease);
  position: relative;
}

.pub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-left-color: var(--cyan);
}

.pub-thumb-wrap {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gray-50);
  border: 1px solid var(--border);
}

.pub-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pub-body { flex: 1; min-width: 0; }

.pub-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 6px;
}

.pub-title a { color: inherit; transition: color var(--fast) var(--ease); }
.pub-title a:hover { color: var(--blue); }

.pub-authors {
  font-size: .82rem;
  color: var(--text-mid);
  margin-bottom: 5px;
  line-height: 1.4;
}

.pub-authors .self {
  font-weight: 700;
  color: var(--gray-800);
}

.pub-venue {
  font-size: .82rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
  letter-spacing: .01em;
}

.pub-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
}

.badge-year {
  background: var(--gray-50);
  color: var(--gray-600);
  border: 1px solid var(--gray-100);
}

.badge-type {
  background: var(--blue-pale);
  color: var(--blue);
  border: 1px solid rgba(37,99,235,.15);
}

.badge-award {
  background: #fefce8;
  color: #92400e;
  border: 1px solid #fde68a;
}

.pub-doi {
  margin-left: auto;
  font-size: .75rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-light);
}
.pub-doi a { color: inherit; transition: color var(--fast); }
.pub-doi a:hover { color: var(--blue); }

/* ── Awards timeline ────────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  position: relative;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  margin-bottom: 14px;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease), border-left-color var(--mid) var(--ease);
}

.timeline-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-left-color: var(--cyan);
}


.timeline-year {
  font-size: .78rem;
  font-weight: 800;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: .92rem;
  font-weight: 700;
  color: #0d1f3c;
  line-height: 1.4;
}
.timeline-desc {
  font-size: .82rem;
  font-weight: 400;
  color: #475569;
  line-height: 1.5;
  margin-top: 3px;
}

.timeline-prize {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: #92400e;
  background: #fefce8;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ── Contact ────────────────────────────────────────────────────────────────── */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch;
}
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-card {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 24px; color: inherit;
  transition: box-shadow var(--mid) var(--ease), transform var(--mid) var(--ease), border-color var(--mid);
}
.contact-card-icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--navy-mid));
  box-shadow: 0 4px 10px -3px rgba(37,99,235,.5);
}
.contact-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contact-card h4 {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-light); margin-bottom: 2px;
}
.contact-strong { font-size: .95rem; font-weight: 700; color: var(--navy); line-height: 1.35; }
.contact-muted { font-size: .82rem; color: var(--text-mid); line-height: 1.4; }
.contact-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: .82rem; font-weight: 700; color: var(--blue);
}
.contact-cta svg:last-child { transition: transform var(--mid) var(--ease); }
.contact-card.is-link:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-3px);
  border-color: rgba(37,99,235,.3);
}
.contact-card.is-link:hover .contact-cta svg:last-child { transform: translateX(4px); }

/* email + actions inside the "Get in touch" card */
.contact-email-link {
  font-family: 'JetBrains Mono', monospace; font-size: .86rem; color: var(--text-mid);
  word-break: break-all; margin-top: 1px;
}
.contact-email-link:hover { color: var(--blue); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.contact-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: var(--radius-xl);
  font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
  background: var(--white); color: var(--blue); border: 1.5px solid var(--border);
  transition: all var(--fast) var(--ease);
}
.contact-btn:hover { border-color: var(--blue); background: var(--blue-pale); color: var(--blue); }
.contact-btn--primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.contact-btn--primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }

/* ── See-all link ───────────────────────────────────────────────────────────── */
.see-all-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-weight: 700;
  font-size: .88rem;
  color: var(--blue);
  padding: 8px 20px;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-xl);
  transition: all var(--mid) var(--ease);
}

.see-all-link:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-blue);
}

.see-all-link svg { transition: transform var(--mid) var(--ease); }
.see-all-link:hover svg { transform: translateX(3px); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,.6);
  padding: 52px 0 32px;
  font-size: .875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand h3 {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.footer-brand p {
  font-size: .82rem;
  color: rgba(255,255,255,.45);
  line-height: 1.6;
}

.footer-curiosities { display: flex; flex-direction: column; gap: 12px; }

.footer-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 14px 18px;
  line-height: 1.55;
}

.footer-card strong {
  color: rgba(255,255,255,.9);
  font-size: .82rem;
  display: block;
  margin-bottom: 2px;
}

.footer-card span {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
}

.footer-card a {
  color: var(--blue-light);
  font-size: .78rem;
}
.footer-card a:hover { color: var(--white); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  color: rgba(255,255,255,.3);
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom a {
  color: rgba(255,255,255,.4);
  transition: color var(--fast);
}
.footer-bottom a:hover { color: var(--white); }

/* ── Page hero (inner pages) ────────────────────────────────────────────────── */
.page-hero {
  background: var(--navy);
  background-image: radial-gradient(ellipse 60% 80% at 100% 50%, rgba(37,99,235,.15) 0%, transparent 60%);
  color: var(--white);
  padding: 52px 0 44px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.page-hero h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}

.page-hero p {
  color: rgba(255,255,255,.55);
  font-size: .95rem;
}

/* ── Filter bar (publications) ──────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  align-items: center;
  padding: 16px 20px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-bar label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-right: 4px;
}

.filter-btn {
  padding: 5px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--white);
  color: var(--text-mid);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}

.filter-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-pale);
}

.filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}

.filter-select {
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  cursor: pointer;
  outline: none;
  transition: border-color var(--fast);
}

.filter-select:focus { border-color: var(--blue); }

.pub-count {
  margin-left: auto;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Teaching ───────────────────────────────────────────────────────────────── */
.teaching-group { margin-bottom: 48px; }

.teaching-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-light);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.course-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.course-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow var(--mid) var(--ease), transform var(--mid) var(--ease), border-color var(--mid) var(--ease);
}

.course-item:hover {
  box-shadow: var(--shadow);
  transform: translateX(4px);
  border-color: var(--blue);
}

.course-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.course-info h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
}

.course-info p, .course-meta {
  font-size: .78rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.course-sems {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.teaching-inst-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  padding: 10px 0 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

/* ── CV page ────────────────────────────────────────────────────────────────── */
.cv-section { margin-bottom: 56px; }

.cv-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-50);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cv-entry {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-50);
}

.cv-year {
  flex-shrink: 0;
  min-width: 72px;
  font-size: .78rem;
  font-weight: 800;
  color: var(--blue);
  text-align: right;
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

.cv-entry-body h4          { font-size: .92rem; font-weight: 700; color: var(--navy); }
.cv-entry-body p           { font-size: .82rem; color: var(--text-mid); margin-top: 3px; line-height: 1.5; }
.cv-entry-body .award-desc { font-size: .88rem; font-weight: 500; color: var(--text); line-height: 1.6; margin-top: 0; }

.award-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.award-list li {
  position: relative;
  padding-left: 14px;
  line-height: 1.5;
}
.award-title {
  display: block;
  font-size: .92rem;
  font-weight: 700;
  color: var(--navy);
}
.award-detail {
  display: block;
  font-size: .82rem;
  font-weight: 400;
  color: var(--text-mid);
  text-align: justify;
  margin-top: 2px;
}
.award-list li + li { margin-top: 6px; }
.award-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.5;
}

.profile-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius);
  color: var(--blue);
  font-size: .85rem;
  font-weight: 600;
  transition: all var(--mid) var(--ease);
}

.profile-link-btn:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

/* Stats grid in CV */
.stats-grid-cv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: box-shadow var(--mid) var(--ease);
}

.stat-card:hover { box-shadow: var(--shadow); }

.stat-card .number {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-light);
}

/* ── Advising ───────────────────────────────────────────────────────────────── */
.badge-ongoing {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-completed {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  font-weight: 600;
}

.badge-corole {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Scholarship badges */
.badge-scholarship  { font-weight: 600; }
.badge-sc-cnpq      { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-sc-fapesp    { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-sc-capes     { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; }
.badge-sc-petrobras { background: #fefce8; color: #854d0e; border: 1px solid #fde68a; }
.badge-sc-univesp   { background: #faf5ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.badge-sc-intl      { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }

/* Teaching institution badges */
.badge-inst          { font-weight: 600; }
.badge-inst-ibilce   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-inst-fct      { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.badge-inst-fec      { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-inst-univesp  { background: #faf5ff; color: #7e22ce; border: 1px solid #e9d5ff; }

.advising-title {
  font-size: .82rem;
  color: var(--text-mid);
  font-style: italic;
  margin-bottom: 3px;
  line-height: 1.45;
}

/* ── Loading state ─────────────────────────────────────────────────────────── */
.loading {
  text-align: center;
  color: var(--text-light);
  padding: 60px 20px;
  font-size: .9rem;
}

/* ── Scroll-reveal ─────────────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 680px) {
  .hero { padding: 64px 0 80px; }
  .hero::after { height: 60px; }

  .hero-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 32px;
  }

  .hero-badges { justify-content: center; }
  .hero-links  { justify-content: center; }

  .hero-photo-ring { width: 160px; height: 160px; }
  .hero-name { font-size: 2rem; }

  .section { padding: 56px 0; }

  .pub-card { flex-direction: column; }
  .pub-thumb-wrap { width: 100%; height: 120px; }

  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 18px 16px; }

  .navbar-nav { display: none; flex-direction: column; width: 100%; }
  .navbar-nav.open {
    display: flex;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(13,31,60,.98);
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .navbar-nav.open a { padding: 10px 14px; }
  .nav-toggle { display: flex; }

  .navbar { position: relative; }

  .cv-entry { flex-direction: column; gap: 2px; }
  .cv-year { text-align: left; }

  .footer-bottom { flex-direction: column; }
  .timeline-item::before { left: -31px; }
}

@media (max-width: 440px) {
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 16px; }
}


/* ════════════════════════════════════════════════════════════
   ADDITIONS (2026-11)
   ════════════════════════════════════════════════════════════ */

/* Accessibility */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 1000;
  background: var(--blue); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
  font-weight: 700; transition: top var(--fast);
}
.skip-link:focus { top: 12px; color: #fff; }
:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* About: lead + collapsible rest */
#about .about-lead {
  font-size: 1.18rem; line-height: 1.7; color: var(--gray-900); font-weight: 500;
  text-align: justify; hyphens: auto;
}
#about .read-more { margin-top: 10px; }
#about .about-more {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .5s var(--ease), opacity .4s var(--ease);
}
#about-text.expanded .about-more { max-height: 1600px; opacity: 1; }
.read-more {
  margin-top: 6px; background: none; border: 1.5px solid var(--border); color: var(--blue);
  font: inherit; font-size: .85rem; font-weight: 700; padding: 7px 16px;
  border-radius: var(--radius-xl); cursor: pointer; transition: all var(--fast) var(--ease);
}
.read-more:hover { border-color: var(--blue); background: var(--blue-pale); }

/* Highlights */
.highlights-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px;
}
/* .highlight-icon is also used by the Interests field cards */
.highlight-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-pale); color: var(--blue); margin-bottom: 4px;
}

.highlight-card {
  --accent: #2563eb; --accent-2: #0d1f3c;
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; color: inherit;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease), border-color var(--mid);
}
.highlight-card.accent-red    { --accent: #e11d48; --accent-2: #7f1d1d; }
.highlight-card.accent-blue   { --accent: #2563eb; --accent-2: #0d1f3c; }
.highlight-card.accent-violet { --accent: #7c3aed; --accent-2: #2e1065; }
.highlight-card.accent-teal   { --accent: #0d9488; --accent-2: #134e4a; }
.highlight-card.accent-amber  { --accent: #d97706; --accent-2: #78350f; }
.highlight-card.accent-indigo { --accent: #4f46e5; --accent-2: #1e1b4b; }
.highlight-card.accent-green  { --accent: #16a34a; --accent-2: #14532d; }
.highlight-card.accent-cyan   { --accent: #0891b2; --accent-2: #164e63; }

.highlight-cover {
  position: relative; height: 112px; overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
}
.highlight-motif {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: none; stroke: rgba(255,255,255,.28); stroke-width: 2;
  transition: transform .6s var(--ease);
}
.highlight-motif circle, .highlight-motif rect { fill: rgba(255,255,255,.08); }
.highlight-cover .highlight-icon {
  position: absolute; left: 20px; top: 18px; margin: 0;
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255,255,255,.95); color: var(--accent);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.highlight-role {
  position: absolute; left: 20px; bottom: 12px;
  padding: 3px 10px; border-radius: var(--radius-xl);
  background: rgba(0,0,0,.28); color: #fff; backdrop-filter: blur(4px);
  font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}

.highlight-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 20px 20px; }
.highlight-card h3 { font-size: 1.02rem; color: var(--navy); line-height: 1.3; }
.highlight-subtitle { font-size: .8rem; font-style: italic; color: var(--text-mid); line-height: 1.45; }
.highlight-spacer { flex: 1; }
.highlight-card p { font-size: .88rem; color: var(--text-mid); line-height: 1.55; flex: 1; }
.highlight-cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: .84rem; font-weight: 700; color: var(--accent);
}
.highlight-cta svg { transition: transform var(--mid) var(--ease); }

.highlight-card.is-link { cursor: pointer; }
.highlight-card.is-link:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.highlight-card.is-link:hover .highlight-motif { transform: scale(1.08); }
.highlight-card.is-link:hover .highlight-cta svg { transform: translateX(4px); }
.highlight-card.is-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Publication actions (DOI + Cite) */
.pub-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.pub-actions .pub-doi { margin-left: 0; }
.cite-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--white); border: 1px solid var(--border); color: var(--text-mid);
  font: inherit; font-size: .74rem; font-weight: 700; padding: 3px 10px;
  border-radius: var(--radius-xl); cursor: pointer; transition: all var(--fast) var(--ease);
}
.cite-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-pale); }

/* Search */
.search-wrap { position: relative; flex: 1 1 100%; margin-bottom: 6px; }
.search-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light);
}
.search-input {
  width: 100%; padding: 11px 14px 11px 40px; font: inherit; font-size: .92rem;
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--white);
  color: var(--text); outline: none; transition: border-color var(--fast), box-shadow var(--fast);
}
.search-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.filter-btn .cnt { opacity: .6; font-weight: 600; margin-left: 2px; }
.filter-btn .cnt:empty { display: none; }

/* Year groups */
.pub-year-group { margin-bottom: 34px; }
.pub-year-heading {
  position: sticky; top: 64px; z-index: 5;
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 0; margin-bottom: 10px;
  background: linear-gradient(var(--white) 75%, transparent);
  font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; color: var(--navy);
}
.pub-year-heading small {
  font-family: 'Inter', sans-serif; font-size: .75rem; font-weight: 700; color: var(--text-light);
  text-transform: uppercase; letter-spacing: .06em;
}

/* Advising summary */
.adv-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 28px;
}
.adv-stat {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column; background: var(--white);
}
.adv-stat-num { font-size: 1.9rem; font-weight: 900; color: var(--navy); line-height: 1.1; }
.adv-stat-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mid); }
.adv-stat-sub { font-size: .75rem; color: var(--text-light); margin-top: 4px; }

/* Footer quick links */
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.footer-links a {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600;
  color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.15);
  padding: 5px 12px; border-radius: var(--radius-xl); transition: all var(--fast);
}
.footer-links a:hover { color: #fff; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.06); }

/* Back to top + toast */
.back-to-top {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--navy); color: #fff; box-shadow: var(--shadow-lg);
  display: grid; place-items: center;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease);
}
.back-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--blue); }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--gray-900); color: #fff; padding: 10px 18px; border-radius: var(--radius);
  font-size: .85rem; font-weight: 600; box-shadow: var(--shadow-lg);
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 680px) {
  .pub-actions { margin-left: 0; width: 100%; justify-content: space-between; }
  .pub-year-heading { top: 0; }
}

/* Print (CV / publications) */
@media print {
  .navbar, .skip-link, .back-to-top, .toast, .filter-bar, .cite-btn,
  .read-more, .hero::before, .hero::after, footer { display: none !important; }
  body { font-size: 11pt; }
  .page-hero, .hero { background: none !important; color: #000 !important; padding: 0 0 12px !important; }
  .page-hero h1, .page-hero p { color: #000 !important; }
  .section { padding: 12px 0 !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  #about .about-more { max-height: none; opacity: 1; }
  .pub-card, .cv-entry, .course-item { break-inside: avoid; box-shadow: none !important; }
  .pub-year-heading { position: static; }
  a { color: #000; }
}

/* BibTeX fallback dialog */
.bib-dialog {
  margin: auto; border: none; border-radius: var(--radius-lg); padding: 22px;
  width: min(640px, calc(100vw - 32px)); box-shadow: var(--shadow-lg);
}
.bib-dialog::backdrop { background: rgba(13,31,60,.55); }
.bib-dialog h3 { font-size: 1rem; color: var(--navy); margin-bottom: 10px; }
.bib-dialog textarea {
  width: 100%; font-family: 'JetBrains Mono', monospace; font-size: .78rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px;
  resize: vertical; color: var(--text); background: var(--gray-bg);
}
.bib-dialog form { text-align: right; margin-top: 10px; }

/* Home: texto justificado em todos os blocos de texto */
#about p,
#highlights-grid .highlight-card p,
#centers-grid .highlight-card p,
#recent-pubs .pub-title,
#awards-timeline .timeline-title,
#awards-timeline .timeline-desc,
.footer-brand p,
.footer-card span {
  text-align: justify;
  hyphens: auto;
}

/* Teste: títulos dos papers na página Publications em azul-petróleo */
#pub-list .pub-title { color: #226e93; }
#pub-list .pub-title a:hover { color: var(--blue); }

/* Logo da UNESP no canto superior direito do cabeçalho da Home */
.hero-logo-corner {
  position: absolute; top: 24px; right: 28px; z-index: 2;
  display: inline-flex; opacity: .95; transition: opacity var(--fast);
}
.hero-logo-corner:hover { opacity: 1; }
.hero-logo-corner img { height: 56px; width: auto; }
@media (max-width: 680px) {
  .hero-logo-corner { top: 14px; right: 16px; }
  .hero-logo-corner img { height: 34px; }
}

/* ── Interests page ─────────────────────────────────────────────────────────── */
.fields-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px;
}
.field-card {
  background: var(--white); border: 1px solid var(--border); border-top: 4px solid var(--blue);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease);
}
.field-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.field-card h3 { font-size: 1.05rem; color: var(--navy); line-height: 1.35; }
.field-icons { display: flex; gap: 8px; }
.topics-grid {
  list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px;
}
.topic-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; font-size: .92rem; font-weight: 500; color: var(--gray-800); line-height: 1.35;
  transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast);
}
.topic-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; background: var(--blue-pale); color: var(--blue);
}
.topic-name { flex: 1; min-width: 0; }
.topic-item:has(.topic-link) { padding: 0; }
.topic-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 14px; color: inherit; border-radius: inherit;
}
.topic-link:hover { color: var(--navy); }
.topic-item:has(.topic-link):hover {
  border-color: var(--blue-light); box-shadow: var(--shadow); transform: translateY(-2px);
}
.topic-item:has(.topic-link):hover .topic-icon { background: var(--blue); color: #fff; }
.topic-count {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  font-size: .74rem; font-weight: 700; color: var(--text-light); white-space: nowrap;
  transition: color var(--fast);
}
.topic-count svg { transition: transform var(--mid) var(--ease); }
.topic-link:hover .topic-count { color: var(--blue); }
.topic-link:hover .topic-count svg { transform: translateX(3px); }

/* Topic filter chip on Publications */
.topic-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 4px;
  background: var(--blue-pale); color: var(--navy); border: 1px solid rgba(37,99,235,.25);
  border-radius: var(--radius-xl); padding: 4px 6px 4px 14px; font-size: .82rem;
}
.topic-chip button {
  width: 24px; height: 24px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 1rem; line-height: 1;
}
.topic-chip button:hover { background: var(--blue-hover); }
.topics-grid .loading { grid-column: 1 / -1; list-style: none; }
@media (max-width: 440px) { .topics-grid { grid-template-columns: 1fr; } }

/* Ícone do selo de prêmio (medalha) */
.badge-award { gap: 4px; }
.badge-award svg { flex-shrink: 0; }

/* ── Home: Research Interests tiles ─────────────────────────────────────────── */
.areas-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px;
}
.area-tile {
  --accent: #2563eb; --accent-2: #1e3a8a;
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--border); color: inherit;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease), border-color var(--mid);
}
/* thin accent stripe on the left */
.area-tile::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--accent), var(--accent-2));
}
.area-tile.accent-blue   { --accent: #2563eb; --accent-2: #1e3a8a; }
.area-tile.accent-indigo { --accent: #4f46e5; --accent-2: #312e81; }
.area-tile.accent-violet { --accent: #7c3aed; --accent-2: #4c1d95; }
.area-tile.accent-red    { --accent: #e11d48; --accent-2: #881337; }
.area-tile.accent-teal   { --accent: #0d9488; --accent-2: #134e4a; }
.area-tile.accent-cyan   { --accent: #0891b2; --accent-2: #164e63; }
.area-tile.accent-pink   { --accent: #db2777; --accent-2: #831843; }
.area-tile.accent-amber  { --accent: #d97706; --accent-2: #78350f; }
.area-tile.accent-green  { --accent: #16a34a; --accent-2: #14532d; }

.area-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: transform var(--mid) var(--ease);
}
.area-text { display: flex; flex-direction: column; min-width: 0; }
.area-name { font-size: .9rem; font-weight: 700; color: var(--navy); line-height: 1.25; }
.area-count {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 2px;
  font-size: .74rem; font-weight: 700; color: var(--text-light);
  transition: color var(--fast);
}
.area-count svg { transition: transform var(--mid) var(--ease); }

.area-tile.is-link:hover {
  transform: translateY(-3px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.area-tile.is-link:hover .area-icon { transform: scale(1.08) rotate(-4deg); }
.area-tile.is-link:hover .area-count { color: var(--accent); }
.area-tile.is-link:hover .area-count svg { transform: translateX(3px); }
.area-tile.is-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 440px) { .areas-grid { grid-template-columns: 1fr 1fr; } }

/* ════════════════════════════════════════════════════════════
   CV PAGE (new layout — cv.html)
   ════════════════════════════════════════════════════════════ */
.cv-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cv-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cv-hero-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-xl);
  font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
  background: var(--blue); color: #fff; border: 1px solid var(--blue); box-shadow: var(--shadow-blue);
  transition: all var(--fast) var(--ease);
}
.cv-hero-btn:hover { background: var(--blue-hover); color: #fff; transform: translateY(-1px); }
.cv-hero-btn--ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); box-shadow: none; }
.cv-hero-btn--ghost:hover { background: rgba(255,255,255,.14); }

.cv-layout { display: grid; grid-template-columns: 190px 1fr; gap: 48px; align-items: start; }
.cv-main { min-width: 0; }
.cv-block { margin-bottom: 56px; scroll-margin-top: 84px; }

/* side navigation */
.cv-toc {
  position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px;
  border-left: 2px solid var(--border); padding-left: 2px;
}
.cv-toc-title {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-light); padding: 0 12px 8px;
}
.cv-toc a {
  margin-left: -4px; padding: 6px 12px; border-left: 2px solid transparent;
  font-size: .85rem; font-weight: 600; color: var(--text-mid); border-radius: 0 6px 6px 0;
  transition: all var(--fast);
}
.cv-toc a:hover { color: var(--blue); background: var(--blue-pale); }
.cv-toc a.active { color: var(--blue); border-left-color: var(--blue); background: var(--blue-pale); }
@media (max-width: 860px) {
  .cv-layout { grid-template-columns: 1fr; gap: 0; }
  .cv-toc { display: none; }
}

/* at a glance */
.cv-glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .cv-glance { grid-template-columns: 1fr 1fr; } }
.cv-glance-card {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  padding: 18px 20px; border-radius: var(--radius-lg);
  background: var(--white); border: 1px solid var(--border); color: inherit; overflow: hidden;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease), border-color var(--mid);
}
.cv-glance-card::before {
  content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}
.cv-glance-num { font-size: 2rem; font-weight: 900; color: var(--navy); line-height: 1.05; }
.cv-glance-label { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mid); }
.cv-glance-sub { font-size: .76rem; color: var(--text-light); margin-top: 2px; }
.cv-glance-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(37,99,235,.3); }

/* timeline (education, positions, awards) */
.cv-timeline { list-style: none; position: relative; padding-left: 0; }
.cv-timeline > li {
  position: relative; display: grid; grid-template-columns: 140px 1fr; gap: 22px;
  padding-bottom: 16px;
}
.cv-timeline > li::before {   /* vertical line */
  content: ''; position: absolute; left: 153px; top: 14px; bottom: -2px; width: 2px; background: var(--border);
}
.cv-timeline > li:last-child::before { display: none; }
.cv-timeline > li::after {    /* dot */
  content: ''; position: absolute; left: 148px; top: 9px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--blue-light);
}
.cv-timeline > li.is-current::after { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-pale); }
.cv-tl-year {
  text-align: right; padding-top: 4px; padding-right: 22px; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace; font-size: .8rem; font-weight: 500; color: var(--text-mid);
}
.cv-tl-card {
  margin-left: 14px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--border);
  transition: box-shadow var(--mid) var(--ease), border-color var(--mid);
}
.cv-tl-card:hover { box-shadow: var(--shadow-sm); border-color: rgba(37,99,235,.25); }
.cv-tl-card h4 { font-size: .95rem; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cv-tl-card p { font-size: .84rem; color: var(--text-mid); margin-top: 3px; line-height: 1.5; }
.cv-tl-note { color: #92400e !important; font-weight: 600; }
.cv-tl-badge {
  font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--radius-xl); background: #dcfce7; color: #166534;
}
@media (max-width: 560px) {
  .cv-timeline > li { grid-template-columns: 1fr; gap: 4px; padding-left: 22px; }
  .cv-timeline > li::before { left: 5px; }
  .cv-timeline > li::after { left: 0; }
  .cv-tl-year { text-align: left; padding: 0; }
  .cv-tl-card { margin-left: 0; }
}

/* awards inside the timeline */
.cv-award-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cv-award-list li { display: flex; gap: 10px; align-items: flex-start; }
.cv-award-list strong { display: block; font-size: .9rem; color: var(--navy); line-height: 1.35; }
.cv-award-desc { display: block; font-size: .8rem; color: var(--text-mid); line-height: 1.45; margin-top: 2px; }
.cv-award-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue-pale); color: var(--blue); margin-top: 1px;
}
.cv-award-list li.is-prize .cv-award-icon { background: #fef3c7; color: #b45309; }
.cv-awards > li.is-extra { display: none; }
#cv-awards.show-all .cv-awards > li.is-extra { display: grid; }
#cv-awards .read-more { margin-left: 176px; }
@media (max-width: 560px) { #cv-awards .read-more { margin-left: 0; } }

/* publications chart */
.cv-chart-card { padding: 20px 22px 14px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--border); }
.cv-chart-head {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: .82rem; font-weight: 700; color: var(--navy); margin-bottom: 14px;
}
.cv-legend { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; color: var(--text-mid); }
.cv-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.cv-chart { display: flex; align-items: flex-end; gap: 4px; height: 170px; }
.cv-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; color: inherit; }
.cv-bar-stack {
  width: 100%; max-width: 26px; min-height: 0; display: flex; flex-direction: column;
  border-radius: 4px 4px 0 0; overflow: hidden; transition: filter var(--fast), transform var(--fast);
}
.cv-bar .seg { display: block; min-height: 0; }
.seg-j { background: var(--blue); }
.seg-c { background: var(--cyan); }
.seg-b { background: #f59e0b; }
.cv-bar-n { font-size: .66rem; font-weight: 700; color: var(--text-mid); }
.cv-bar-y { font-family: 'JetBrains Mono', monospace; font-size: .62rem; color: var(--text-light); }
.cv-bar:hover .cv-bar-stack { filter: brightness(1.12); transform: scaleX(1.08); }

/* profiles & links */
.cv-profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cv-profile-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: var(--radius); background: var(--white); border: 1px solid var(--border); color: inherit;
  transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease), border-color var(--mid);
}
.cv-profile-card strong { display: block; font-size: .9rem; color: var(--navy); }
.cv-profile-card small { display: block; font-size: .75rem; color: var(--text-light); }
.cv-profile-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--gray-50); flex-shrink: 0; }
.cv-profile-icon svg { width: 20px; height: 20px; }
.cv-profile-arrow { margin-left: auto; color: var(--text-light); font-weight: 700; transition: transform var(--mid) var(--ease), color var(--fast); }
.cv-profile-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(37,99,235,.3); }
.cv-profile-card:hover .cv-profile-arrow { color: var(--blue); transform: translate(2px, -2px); }
.cv-related { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.cv-related > span { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-light); }
.cv-related > div { display: flex; flex-wrap: wrap; gap: 6px; }
.cv-related a {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--radius-xl);
  font-size: .76rem; font-weight: 600; color: var(--text-mid); background: var(--gray-50); border: 1px solid var(--border);
}
.cv-related a svg { width: 12px; height: 12px; }
.cv-related a:hover { color: var(--blue); border-color: var(--blue-light); }

@media print {
  .cv-toc, .cv-hero-actions, #cv-awards .read-more, .cv-related { display: none !important; }
  .cv-layout { grid-template-columns: 1fr; }
  .cv-awards > li.is-extra { display: grid !important; }
  .cv-glance-card, .cv-tl-card, .cv-chart-card { break-inside: avoid; box-shadow: none !important; }
}

/* Footer: postal address */
.footer-address {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 10px;
  font-size: .82rem; line-height: 1.5; color: rgba(255,255,255,.6);
}
.footer-address svg { flex-shrink: 0; margin-top: 2px; color: var(--blue-light); }

/* ── Projects page ──────────────────────────────────────────────────────────── */
.proj-stat { color: inherit; transition: transform var(--mid) var(--ease), box-shadow var(--mid) var(--ease), border-color var(--mid); }
.proj-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(37,99,235,.3); }

.proj-group { margin-bottom: 44px; scroll-margin-top: 84px; }
.proj-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .proj-list { grid-template-columns: 1fr; } }

.proj-card {
  --accent: #2563eb; --accent-2: #1e3a8a;
  position: relative; overflow: hidden;
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 22px 18px; border-radius: var(--radius-lg);
  background: var(--white); border: 1px solid var(--border);
  transition: box-shadow var(--mid) var(--ease), transform var(--mid) var(--ease), border-color var(--mid);
}
.proj-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--accent), var(--accent-2));
}
.proj-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.proj-card.accent-red    { --accent: #e11d48; --accent-2: #881337; }
.proj-card.accent-blue   { --accent: #2563eb; --accent-2: #1e3a8a; }
.proj-card.accent-violet { --accent: #7c3aed; --accent-2: #4c1d95; }
.proj-card.accent-teal   { --accent: #0d9488; --accent-2: #134e4a; }
.proj-card.accent-amber  { --accent: #d97706; --accent-2: #78350f; }
.proj-card.accent-indigo { --accent: #4f46e5; --accent-2: #312e81; }
.proj-card.accent-green  { --accent: #16a34a; --accent-2: #14532d; }
.proj-card.accent-cyan   { --accent: #0891b2; --accent-2: #164e63; }

.proj-icon {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--accent) 60%, transparent);
}
.proj-icon svg { width: 22px; height: 22px; }
.proj-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.proj-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proj-acronym {
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent);
}
.proj-head .badge { margin-left: auto; }
.proj-title { font-size: .98rem; font-weight: 700; color: var(--navy); line-height: 1.35; }
.proj-desc { font-size: .85rem; color: var(--text-mid); line-height: 1.55; }
.proj-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 2px;
  font-size: .78rem; color: var(--text-light);
}
.proj-meta span { display: inline-flex; align-items: center; }
.proj-role {
  padding: 2px 9px; border-radius: var(--radius-xl); font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, white);
}
.proj-grant { font-family: 'JetBrains Mono', monospace; color: var(--text-mid); }
.proj-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.proj-links a {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: var(--radius-xl);
  font-size: .78rem; font-weight: 700; color: var(--accent);
  border: 1.5px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  transition: all var(--fast) var(--ease);
}
.proj-links a:hover { background: color-mix(in srgb, var(--accent) 10%, white); border-color: var(--accent); }
.proj-meta .proj-link-inline {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: var(--radius-xl);
  font-size: .76rem; font-weight: 700; color: var(--accent);
  border: 1.5px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  transition: all var(--fast) var(--ease);
}
.proj-meta .proj-link-inline:hover { background: color-mix(in srgb, var(--accent) 10%, white); border-color: var(--accent); }

/* Home: link from the Centers section to the Projects page */
.home-projects-link { margin-top: 22px; }

/* ── Center logos (Projects page + Home "Centers" cards) ─────────────────────── */
.proj-logo {
  flex-shrink: 0; width: 120px; height: 64px; border-radius: 12px;
  display: block; overflow: hidden; padding: 6px 8px;
  background: #fff; border: 1px solid var(--border);
}
.proj-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 480px) { .proj-card { flex-direction: column; } }

/* white panel of fixed size; the logo is scaled to fit inside it */
.highlight-logo {
  position: absolute; left: 16px; top: 14px; width: 132px; max-width: calc(100% - 32px); height: 58px;
  padding: 6px 10px; border-radius: 12px; background: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.highlight-logo img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.proj-meta span .proj-grant { margin-left: .35em; }
