:root {
  --bg: #fafbfc;
  --bg-soft: #eef1f4;
  --surface: #ffffff;
  --surface-strong: #fff;
  --ink: #1b1f24;
  --ink-muted: #66707a;
  --line: #e5eaf0;
  --accent: #005f86;
  --accent-soft: #e6f3fa;
  --brand: #009bdb;
  --radius: 12px;
  --shadow: 0 6px 18px rgba(24, 35, 46, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", "Trebuchet MS", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: 3rem;
  margin-top: 0.25rem;
}

h2 {
  font-size: 1.85rem;
}

a {
  color: var(--ink);
  text-decoration-color: rgba(27, 31, 36, 0.35);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  text-decoration-color: currentColor;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

.container {
  margin: 0 auto;
  max-width: 1000px;
  padding: 0 1.25rem;
}

.page-glow {
  display: none;
}

.skip-link {
  background: var(--ink);
  color: #fff;
  left: 0;
  padding: 0.5rem 0.75rem;
  position: absolute;
  top: -40px;
}

.skip-link:focus {
  top: 0;
}

.site-header {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-wrap {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
}

.site-nav a {
  border-radius: 999px;
  font-size: 0.96rem;
  padding: 0.35rem 0.7rem;
  text-decoration: none;
}

.site-nav a.active,
.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.section {
  padding: 2.6rem 0;
}

.hero,
.intro {
  padding-top: 3.5rem;
}

.hero-grid,
.intro-grid {
  align-items: start;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.3fr 0.9fr;
}

.intro-grid {
  grid-template-columns: 235px minmax(0, 1fr);
}

.portrait {
  aspect-ratio: 4 / 5;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.eyebrow {
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}

.lead {
  color: var(--ink-muted);
  font-size: 1.05rem;
  margin-top: 1rem;
  max-width: 68ch;
}

.lead a {
  color: var(--ink);
  text-decoration-color: rgba(27, 31, 36, 0.35);
}

.compact-lead {
  margin-top: 0.55rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.profile-links a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  display: inline-flex;
  height: 2.45rem;
  justify-content: center;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: 2.45rem;
}

.profile-links a:hover,
.profile-links a:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--accent);
  outline: none;
  transform: translateY(-1px);
}

.profile-links svg {
  fill: none;
  height: 1.32rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1.32rem;
}

.orcid-mark {
  color: currentColor;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.hero-card,
.panel,
.paper-card,
.paper-item {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-card {
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.panel {
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.hero-card ul {
  margin-top: 0.8rem;
}

.hero-card li + li {
  margin-top: 0.45rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.35rem;
}

.button {
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 600;
  padding: 0.62rem 1rem;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover,
.button:focus-visible {
  box-shadow: 0 8px 16px rgba(0, 95, 134, 0.22);
  transform: translateY(-1px);
}

.button-sm {
  font-size: 0.88rem;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
}

.button-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.section-heading {
  align-items: baseline;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.paper-card,
.paper-item {
  background: #fff;
  box-shadow: none;
  padding: 1.1rem 1.2rem;
}

.paper-card h3,
.paper-item h3 {
  margin: 0.45rem 0 0.55rem;
}

.paper-item h3 a {
  text-decoration-color: var(--accent-soft);
}

.meta {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.paper-links {
  align-items: center;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  gap: 0.45rem 0.8rem;
  margin-top: 0.55rem;
}

.paper-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.paper-links a:hover,
.paper-links a:focus-visible {
  text-decoration: underline;
  text-decoration-color: rgba(0, 95, 134, 0.45);
}

.paper-award {
  color: var(--accent);
  font-size: 0.95rem;
  font-style: normal;
  margin-top: 0.85rem;
}

.paper-award a {
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}

.paper-award a:hover,
.paper-award a:focus-visible {
  text-decoration: underline;
  text-decoration-color: rgba(0, 95, 134, 0.35);
}

.paper-list {
  border-top: 1px solid var(--line);
}

.paper-entry {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1.05rem 0 1.05rem 2.75rem;
  position: relative;
}

.paper-main h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: 0.45rem;
}

.paper-main h3 a {
  color: var(--ink);
  text-decoration: none;
}

.paper-main h3 a:hover,
.paper-main h3 a:focus-visible {
  text-decoration: underline;
  text-decoration-color: rgba(0, 95, 134, 0.35);
}

.paper-main p:not(.paper-award) {
  color: var(--ink-muted);
}

.paper-main p:not(.paper-award) a,
.paper-main p:not(.paper-award) em {
  color: var(--ink);
}

.paper-main p + p {
  margin-top: 0.25rem;
}

.paper-details {
  margin-top: 0.8rem;
}

.paper-details summary {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  height: 2rem;
  justify-content: center;
  list-style: none;
  position: absolute;
  left: 0;
  top: 1.05rem;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  width: 2rem;
}

.paper-details summary::-webkit-details-marker {
  display: none;
}

.paper-details summary::before {
  border: 2px solid currentColor;
  border-radius: 999px;
  content: "";
  display: block;
  height: 0.72rem;
  transform: translate(-0.08rem, -0.08rem);
  width: 0.72rem;
}

.paper-details summary::after {
  background: currentColor;
  border-radius: 999px;
  content: "";
  display: block;
  height: 2px;
  position: absolute;
  transform: translate(0.42rem, 0.42rem) rotate(45deg);
  width: 0.5rem;
}

.paper-details summary:hover,
.paper-details summary:focus-visible,
.paper-details[open] summary {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.summary-label {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.details-body {
  background: #fff;
  border-left: 2px solid var(--accent-soft);
  color: var(--ink-muted);
  margin-top: 0.65rem;
  padding: 0.15rem 0 0.15rem 1rem;
}

.details-body p + p {
  margin-top: 0.55rem;
}

.details-body a {
  color: var(--accent);
  font-weight: 400;
  text-decoration-color: rgba(0, 95, 134, 0.35);
}

.details-body a:hover,
.details-body a:focus-visible {
  text-decoration-color: currentColor;
}

.details-body strong {
  color: var(--ink);
  font-weight: 400;
}

.section-note {
  margin-top: 0;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.link-row a,
.text-link {
  color: var(--accent);
  font-weight: 600;
}

.split-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline {
  list-style: none;
  margin-top: 0.8rem;
  padding-left: 0;
}

.timeline li {
  border-left: 2px solid var(--accent-soft);
  margin-bottom: 0.85rem;
  padding-left: 0.75rem;
}

.timeline span {
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 1rem;
}

.filter-row a {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  text-decoration: none;
}

.filter-row a:hover,
.filter-row a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.research-block {
  margin-top: 1.9rem;
}

.research-block h2 {
  margin-bottom: 0.75rem;
}

.research-block .paper-item + .paper-item {
  margin-top: 1rem;
}

.stack-list {
  padding-left: 1.1rem;
}

.stack-list li + li {
  margin-top: 0.55rem;
}

.stack-list a {
  text-decoration-color: var(--accent-soft);
}

.quote-card {
  background: #f9fbfd;
  border-left: 3px solid var(--accent-soft);
  border-radius: 8px;
  margin-top: 0.8rem;
  padding: 0.7rem 0.85rem;
}

.compact-item p {
  margin-top: 0.3rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  margin-top: 2rem;
  padding: 1.6rem 0;
}

.site-footer a {
  color: var(--ink);
  text-decoration-color: rgba(27, 31, 36, 0.35);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  justify-content: space-between;
}

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.js .reveal.in {
  animation: riseIn 550ms ease-out forwards;
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.8rem 1.25rem;
  }

  .button-sm {
    align-self: flex-start;
  }

  .hero-grid,
  .intro-grid,
  .split-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .portrait {
    max-width: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .js .reveal.in {
    animation: none;
  }

  .button {
    transition: none;
  }
}
