:root {
  --ink: #121a22;
  --muted: #4a5560;
  --line: #d5dde6;
  --paper: #f4f6f8;
  --card: #ffffff;
  --accent: #164a6b;
  --accent-soft: #e6eef5;
  --rule: #b8941f;
  --header: #0d141c;
  --font: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: #0f3349; }
a:focus-visible,
.btn:focus-visible,
.nav a:focus-visible,
.nav-btn:focus-visible {
  outline: 2px solid #c9a227;
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 12px; background: #fff; padding: 8px; z-index: 100; }

.wrap {
  width: min(960px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header);
  color: #e8eef4;
  border-bottom: 2px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  width: min(960px, calc(100% - 40px));
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.nav a {
  color: #b8c4d0;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav a:hover { color: #fff; }
.nav-btn {
  display: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  border: 1px solid #5a6d82;
  padding: 6px 10px;
  border-radius: 2px;
  cursor: pointer;
}

.hero {
  background: linear-gradient(165deg, #0d141c 0%, #172636 55%, #164a6b 140%);
  color: #eef3f7;
  padding: 52px 0 44px;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 600;
  color: #e0c56e;
  margin: 0 0 14px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.65rem, 3.8vw, 2.35rem);
  line-height: 1.22;
  margin: 0 0 14px;
  color: #fff;
}
.deck {
  max-width: 44rem;
  margin: 0 0 18px;
  color: #d2dbe5;
  font-size: 1.02rem;
  line-height: 1.55;
  font-weight: 400;
}
.deck strong { color: #fff; font-weight: 600; }
.track-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.track {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.28);
  color: #e8eef4;
}
.track.eng { border-color: rgba(120, 190, 230, 0.55); }
.track.acad { border-color: rgba(224, 197, 110, 0.65); }
.track.phd { border-color: rgba(160, 210, 170, 0.6); background: rgba(255,255,255,0.04); }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-block;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.28);
  color: #e8eef4;
  padding: 8px 13px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 2px;
}
.btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.btn.primary {
  background: #fff;
  border-color: #fff;
  color: var(--header);
}
.btn.primary:hover { background: #e8eef4; color: var(--header); }
.hero-meta {
  margin: 26px 0 0;
  font-size: 0.88rem;
  color: #b7c5d2;
  line-height: 1.5;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: -16px;
  margin-bottom: 4px;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(16, 24, 32, 0.06);
}
.metrics > div {
  background: var(--card);
  padding: 14px 12px;
  text-align: center;
}
.metrics strong {
  display: block;
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--ink);
}
.metrics span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.section { padding: 44px 0 10px; }
.section-kicker {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
}
.section h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.lead {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 0.98rem;
  max-width: 46rem;
}

/* About */
.about-title {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 12px;
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.about-byline {
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
.byline-name { font-weight: 600; color: var(--ink); }
.byline-sep { margin: 0 7px; color: #b0b8c0; }
.about-body {
  font-size: 1.02rem;
  line-height: 1.65;
  color: #2c3640;
}
.about-body::after {
  content: "";
  display: table;
  clear: both;
}
.about-photo {
  float: right;
  width: 200px;
  margin: 2px 0 16px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 5px 5px 8px;
}
.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 22%;
}
.about-photo figcaption {
  margin-top: 7px;
  padding: 0 3px;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
}
.about-lead {
  margin: 0 0 12px;
  font-size: 1.08rem;
  color: var(--ink);
  font-weight: 500;
}
.about-body > p { margin: 0 0 12px; }
.about-note {
  font-size: 0.88rem;
  color: var(--muted);
  border-left: 3px solid var(--rule);
  padding: 6px 0 6px 12px;
  margin-top: 6px !important;
  background: transparent;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px 17px;
  margin-bottom: 12px;
}
.card.wide { grid-column: 1 / -1; }
.phd-card {
  border-left: 3px solid var(--accent);
  background: linear-gradient(180deg, #fff 0%, #f7fafc 100%);
}
.phd-card .quote {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  margin: 10px 0 12px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
}
.card h3, .job h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0 0 8px;
  font-weight: 600;
}
.card ul, .job ul { margin: 0; padding-left: 18px; }
.card li, .job li { margin-bottom: 5px; font-size: 0.95rem; }
.card p { margin: 0; font-size: 0.95rem; color: #2c3640; }
.note { color: var(--muted); font-size: 0.88rem; margin: 8px 0 0 !important; }
.links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px !important; }
.sub {
  font-size: 0.92rem;
  margin: 22px 0 8px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.role {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 0;
  padding: 2px 6px;
  margin-right: 6px;
  vertical-align: 1px;
}
.pubs {
  padding-left: 20px;
  margin: 0 0 8px;
}
.pubs li {
  margin-bottom: 11px;
  font-size: 0.94rem;
  line-height: 1.5;
  color: #2c3640;
}

.job {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 16px 18px 14px 18px;
  margin-bottom: 14px;
}
.job header p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
}
.tech {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.contact {
  list-style: none;
  padding: 0;
  columns: 2;
  margin: 0;
}
.contact li { margin: 0 0 8px; break-inside: avoid; font-size: 0.95rem; }

.site-footer {
  margin-top: 36px;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.engage {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.engage.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.engage-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 20, 28, 0.48);
  cursor: pointer;
}
.engage-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 24px 22px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  box-shadow: 0 24px 56px rgba(13, 20, 28, 0.22);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s ease;
}
.engage.is-visible .engage-panel {
  transform: translateY(0) scale(1);
}
.engage-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.engage-close:hover { color: var(--ink); }
.engage-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
}
.engage-panel h2 {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--ink);
  line-height: 1.3;
}
.engage #engage-copy {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: #24303a;
  line-height: 1.55;
}
.engage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.engage-btn {
  display: inline-block;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 12px;
  border: 1px solid var(--line);
  color: var(--accent);
  border-radius: 2px;
  background: #fff;
}
.engage-btn:hover { background: var(--accent-soft); color: #0f3349; }
.engage-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.engage-btn.primary:hover {
  background: #0f3349;
  border-color: #0f3349;
  color: #fff;
}
.engage-later {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 6px 0 0;
  text-align: left;
  font-family: inherit;
}
.engage-later:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .engage,
  .engage-panel { transition: none; }
}

html.engage-open {
  overflow: hidden;
}

@media (max-width: 800px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .contact { columns: 1; }
  .nav-btn { display: inline-block; }
  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 10px;
  }
  .header-inner { flex-wrap: wrap; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .about-photo {
    float: none;
    width: min(220px, 65%);
    margin: 0 auto 18px;
  }
  .hero h1 { max-width: none; }
  .hero-links { justify-content: flex-start; }
  .engage { padding: 16px; }
  .engage-panel { padding: 22px 18px 16px; }
}
