:root {
  --ink: #101820;
  --muted: #4a5a66;
  --line: #d5dde3;
  --paper: #eef2f4;
  --panel: #f7f9fa;
  --teal: #0b5c63;
  --teal-deep: #083f44;
  --accent: #c45c26;
  --max: 1080px;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --display: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9ecec 0%, transparent 55%),
    linear-gradient(180deg, #e7eef1 0%, var(--paper) 28%, #e9eef1 100%);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }
img { max-width: 100%; }
.wrap { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 2.5rem)); }

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(247, 249, 250, 0.9);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 1rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.9rem 1.15rem; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--teal); }
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font: inherit;
}

.hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 2.5rem;
  align-items: end;
}
.eyebrow {
  margin: 0 0 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal);
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.role {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.lede {
  margin: 1.1rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 0.65rem;
  margin-top: 1.6rem;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.btn.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.btn.primary:hover { background: var(--teal-deep); color: #fff; }
.btn:hover { border-color: #9eb0ba; }

.hero-aside {
  display: grid;
  gap: 1.1rem;
  justify-items: start;
}
.portrait {
  width: min(280px, 100%);
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(16, 24, 32, 0.12);
  background: #fff;
}
.hero-facts {
  display: grid;
  gap: 0.75rem;
  width: min(280px, 100%);
  padding: 0;
  border-top: 0;
}
.hero-facts div {
  display: grid;
  gap: 0.15rem;
}
.hero-facts strong {
  font-family: var(--display);
  font-size: 1.15rem;
}
.hero-facts span { color: var(--muted); font-size: 0.92rem; }

.section { padding: 4.4rem 0; }
.section.tint {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid var(--line);
}
.section h2 {
  margin: 0 0 1.4rem;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
}
.section-note { margin: -0.6rem 0 1.4rem; color: var(--muted); }
.section p { color: var(--muted); }
.section .narrow > p { font-size: 1.05rem; }

.interests-label {
  margin: 1.85rem 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.narrow > p + .interests-label {
  margin-top: 1.65rem;
}
.skill-row {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 0.55rem;
  padding: 0; margin: 0;
}
.skill-row li {
  padding: 0.4rem 0.75rem;
  border: 1px solid #b8c4cc;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(16, 24, 32, 0.05);
}
.skill-row--tech li {
  /* Same visual weight as Leadership / Research pills — only content differs */
  padding: 0.4rem 0.75rem;
  font-size: 0.86rem;
}
.pubs li {
  position: relative;
  padding-right: 3.5rem;
}
.cite-count {
  position: absolute;
  right: 0;
  top: 0;
  min-width: 2.4rem;
  text-align: right;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--teal);
  line-height: 1.3;
}
.section-note a { color: var(--teal); font-weight: 600; }

.timeline { display: grid; gap: 1.6rem; }
.timeline article, .split article {
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}
.timeline h3, .split h3, .split h4 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.award-group + .award-group {
  margin-top: 2.2rem;
}
.award-group-title {
  margin: 0 0 0.35rem;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.award-group .split:has(> :only-child) {
  grid-template-columns: 1fr;
}
.exp-header {
  display: block;
}
.exp-header h3 {
  margin: 0 0 0.45rem;
}
.exp-org-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  min-width: 0;
}
.org-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
  object-position: center;
  padding: 3px;
  box-sizing: border-box;
  display: block;
}
.org-logo--unh {
  background: #003A70;
  border-color: #003A70;
  padding: 6px;
}
.org-logo--wide {
  object-fit: contain;
  padding: 6px 2px;
}
.exp-org-row .meta {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.exp-copy { min-width: 0; }
.meta {
  margin: 0.35rem 0 0.7rem;
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.4rem;
  line-height: 1.4;
}
.org-name { color: var(--teal-deep); }
.meta-sep {
  color: var(--muted);
  font-weight: 500;
}
.timeline ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}
.timeline .exp-header + ul {
  margin-left: 0;
  padding-left: 1.15rem;
}
.timeline li + li { margin-top: 0.35rem; }
.edu-list {
  display: grid;
  gap: 1.35rem;
}
.edu-list article {
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
}
.edu-list .exp-header + p {
  margin: 0;
  color: var(--muted);
}
.cert-list {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.cert-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.cert-item .org-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
.cert-logo--nercomp {
  background: #F4F7F2;
}
.cert-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  line-height: 1.3;
}
.cert-item .meta {
  margin: 0.2rem 0 0;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 2rem;
}
.split p { margin: 0; }
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.7rem !important;
  font-size: 0.88rem;
  font-weight: 600;
}

.pubs {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}
.pubs li + li { margin-top: 1rem; }
.pubs em { color: var(--ink); font-style: italic; }
.more-link { margin-top: 1.4rem; font-weight: 600; }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: 0.75rem;
}
.contact-list li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.contact-list span:first-child {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  gap: 2rem 2.5rem;
  align-items: start;
  margin-top: 0.5rem;
}
.contact-form {
  display: grid;
  gap: 0.85rem;
  padding: 1.35rem 1.4rem 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.contact-form h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
}
.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: var(--panel);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(11, 92, 99, 0.25);
  border-color: var(--teal);
  background: #fff;
}
.contact-form .honey {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
  pointer-events: none;
}
.contact-form .btn {
  justify-self: start;
  margin-top: 0.25rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.site-footer p { margin: 0; }

@media (max-width: 860px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
  .hero-aside { justify-items: center; text-align: center; }
  .hero-facts { width: min(320px, 100%); text-align: left; }
  .portrait { width: min(220px, 70vw); }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 64px;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
  .contact-list li { grid-template-columns: 1fr; gap: 0.2rem; }
  .pub-cite { min-width: 4.75rem; }
  .award-group .split:has(> :only-child) { grid-template-columns: 1fr; }
}

/*
  Token-matched version — uses the site's real custom properties
  (--line, --muted, --ink, --teal, --panel, --display) instead of the
  earlier placeholder rgba() values, so these blend with .skill-row,
  .timeline article, and .cite-count rather than looking bolted on.
*/

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 1.75rem 0 1.75rem;
  max-width: 44rem;
}

.hero-stat {
  padding: 0.95rem 1.05rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  min-width: 0;
}

.hero-stat-value {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--teal);
}

.hero-stat-label {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Mobile: 4-across gets cramped under ~560px, drop to a 2x2 grid */
@media (max-width: 560px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}

/*
  Compact publications list — quieter single-line-per-entry treatment
  so publications don't compete with Experience / Leadership for
  attention. Reuses .cite-count's teal serif-numeral styling for
  visual continuity with the rest of the site.

  Note: this does NOT remove the old .pubs / .cite-count rules —
  they're simply unused once publications-compact.html replaces the
  old markup. Safe to delete later if you want to tidy the file.
*/

.pubs-compact {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.pubs-compact li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.pubs-compact li:first-child {
  border-top: none;
}

.pub-cite {
  flex-shrink: 0;
  min-width: 6.4rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--teal);
}

.pub-line {
  flex: 1;
  min-width: 0;
  color: var(--ink);
}

.pub-extra {
  color: var(--muted);
  font-weight: 500;
}
.pub-extra::before {
  content: " · ";
  color: var(--muted);
}

.pub-line em { color: var(--ink); font-style: italic; }


/*
  === DYNAMIC / MOTION LAYER ===
  Purely additive. Nothing above this point is modified. Adds:
  1. Slow ambient hero background shift (subtle, not a "blob" animation)
  2. Scroll-reveal fade/slide-in for sections and cards (.reveal class,
     toggled by IntersectionObserver in script.js)
  3. Gentle hover lift on cards, buttons, skill pills, portrait
  4. Animated underline on nav links + active-section highlight
  5. Count-up-ready hero stat numbers (animation itself driven by JS,
     this just adds a starting-state class)

  Respects prefers-reduced-motion throughout — anyone with that OS
  setting gets the instant, non-animated version automatically.
*/

/* 1. Ambient hero background — slow 20s drift between two soft states.
   Uses the same colors already in body{}'s gradient, just animates the
   radial gradient's position slightly so it feels alive without being
   distracting. */
@keyframes ambient-shift {
  0%   { background-position: 10% -10%, 0% 0%; }
  50%  { background-position: 18% -6%, 0% 0%; }
  100% { background-position: 10% -10%, 0% 0%; }
}
.hero {
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9ecec 0%, transparent 55%),
    linear-gradient(180deg, transparent 0%, transparent 100%);
  background-size: 140% 140%, 100% 100%;
  animation: ambient-shift 22s ease-in-out infinite;
}

/* 2. Scroll reveal. JS adds .in-view to .reveal elements when they enter
   the viewport. Default state is a slight fade + rise; final state is
   fully visible in place. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(2px);
  transition: opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.95s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.95s ease;
  will-change: opacity, transform, filter;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
  filter: none;
}
/* Stagger children inside a revealed group (timeline articles, split
   grids, hero-stats, skill rows) so they don't all pop at once */
.reveal-group > * {
  opacity: 0;
  transform: translateY(22px);
}
.reveal-group.in-view > * {
  animation: reveal-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.reveal-group.in-view > *:nth-child(1) { animation-delay: 0.04s; }
.reveal-group.in-view > *:nth-child(2) { animation-delay: 0.12s; }
.reveal-group.in-view > *:nth-child(3) { animation-delay: 0.2s; }
.reveal-group.in-view > *:nth-child(4) { animation-delay: 0.28s; }
.reveal-group.in-view > *:nth-child(5) { animation-delay: 0.36s; }
.reveal-group.in-view > *:nth-child(6) { animation-delay: 0.44s; }
.reveal-group.in-view > *:nth-child(n+7) { animation-delay: 0.5s; }
@keyframes reveal-rise {
  from { opacity: 0; transform: translateY(22px); filter: blur(1.5px); }
  to   { opacity: 1; transform: translateY(0); filter: none; }
}

/* 3. Hover lift on interactive surfaces */
.btn {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(16, 24, 32, 0.1);
}
.btn.primary:hover {
  box-shadow: 0 10px 24px rgba(11, 92, 99, 0.28);
}
.btn:active { transform: translateY(0); box-shadow: none; }

.timeline article, .split article {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.timeline article:hover, .split article:hover {
  transform: translateX(4px);
}

.hero-stat {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease, border-color 0.25s ease;
}
.hero-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(16, 24, 32, 0.1);
  border-color: var(--teal);
}

.skill-row li {
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.skill-row li:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  transform: translateY(-2px);
}

.portrait {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.portrait:hover {
  transform: translateY(-4px) rotate(-0.6deg);
  box-shadow: 0 24px 48px rgba(16, 24, 32, 0.16);
}

.pubs-compact li {
  transition: padding-left 0.2s ease, background 0.2s ease;
  border-radius: 6px;
}
.pubs-compact li:hover {
  padding-left: 0.5rem;
  background: rgba(11, 92, 99, 0.05);
}

/* 4. Nav link underline + active-section state */
.site-nav a {
  position: relative;
  padding-bottom: 3px;
  transition: color 0.2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 2px;
  background: var(--teal);
  transition: right 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-nav a:hover::after,
.site-nav a.active::after {
  right: 0;
}
.site-nav a.active { color: var(--teal); }

/* 5. Hero stat number starting state for count-up (JS swaps the text
   content on animation; this just avoids a flash of the final number
   before JS runs) */
.hero-stat-value[data-count-to] {
  font-variant-numeric: tabular-nums;
}

/* Respect reduced motion: disable all of the above animation/transition
   behavior, but keep final visual states (reveal items stay visible,
   hover states still work instantly) */
@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
  .reveal, .reveal-group > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }
  .btn, .timeline article, .split article, .hero-stat,
  .skill-row li, .portrait, .pubs-compact li, .site-nav a::after {
    transition: none !important;
  }
}

/* === Resume dropdown === */
.resume-dropdown {
  position: relative;
  display: inline-block;
}
.resume-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
}
.resume-toggle .chev {
  transition: transform 0.2s ease;
}
.resume-toggle[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}
.resume-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(16, 24, 32, 0.14);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.resume-menu.open {
  display: flex;
}
.resume-menu a {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0.55rem 0.7rem;
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.resume-menu a:hover,
.resume-menu a:focus-visible {
  background: rgba(11, 92, 99, 0.08);
}
.resume-menu-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.resume-menu-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .resume-toggle .chev { transition: none; }
}
