:root {
  --page: #fbfaf7;
  --surface: #f4f5f4;
  --ink: #25272a;
  --muted: #6c7076;
  --line: #dedfdd;
  --blue: #315f92;
  --pink: #b75b7a;
  --orange: #cb7042;
  --content-width: 900px;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
}

a {
  color: var(--blue);
  text-decoration-color: color-mix(in srgb, var(--blue), transparent 55%);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #244a74;
  text-decoration-color: currentColor;
}

.navbar {
  background: color-mix(in srgb, var(--page), transparent 4%) !important;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  padding: 0;
}

.navbar .container-fluid {
  max-width: var(--content-width);
  min-height: 58px;
  margin: 0 auto;
  padding: 0 22px;
}

.navbar-brand {
  color: var(--ink) !important;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.navbar-nav .nav-link {
  color: var(--muted) !important;
  font-size: 0.86rem;
  margin-left: 1.15rem;
  padding: 1.15rem 0 !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--ink) !important;
}

#quarto-content {
  min-height: calc(100vh - 120px);
}

main.content {
  max-width: none;
  margin: 0;
  padding: 0;
}

main.content > header#title-block-header {
  display: none;
}

.site-shell,
.not-found {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: inherit;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

h2 {
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1.15rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 0.35rem;
}

p {
  margin-bottom: 0.95rem;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 172px;
  gap: 3.5rem;
  align-items: start;
  padding: 4.25rem 0 3.3rem;
}

.profile-copy {
  max-width: 610px;
}

.profile-name {
  margin: 0 0 0.55rem;
}

.name-switch {
  display: flex;
  width: fit-content;
  gap: 0.22em;
  max-width: 100%;
  margin-inline-start: -0.055em;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.greeting-prefix {
  white-space: nowrap;
}

.name-options {
  display: grid;
  min-width: 0;
}

.name-options > span {
  grid-area: 1 / 1;
  transition: opacity 220ms ease, transform 220ms ease;
}

.name-option {
  opacity: 0;
  transform: translateY(0.15em);
}

.name-option.is-active {
  opacity: 1;
  transform: translateY(0);
}

.name-switch:focus-visible,
.social-icons a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .name-options > span { transition: none; transform: none !important; }
}

.contact-email {
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.social-icons {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: 23px;
}

.social-icons a:hover { color: var(--blue); }
.social-icons svg { width: 23px; height: 23px; }
.social-icons .bi { font-size: 23px; line-height: 1; }
.orcid-mark { background: var(--muted); color: var(--page); border-radius: 50%; width: 23px; height: 23px; font: 600 16px/23px Arial, sans-serif; text-align: center; }
.social-icons a:hover .orcid-mark { background: var(--blue); }
.social-icons .lab-link { padding: 0 5px; }
.social-icons img { width: 58px; height: auto; mix-blend-mode: multiply; }

.profile-role {
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.profile-focus {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.profile-copy > p:last-of-type {
  color: var(--muted);
  max-width: 560px;
}

.portrait {
  margin: 0;
}

.portrait img {
  aspect-ratio: 1;
  height: auto;
  border-radius: 3px;
  object-fit: cover;
  object-position: center top;
  width: 172px;
}

.profile-links,
.profile-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin-top: 1.25rem;
}

.profile-links p,
.profile-list p {
  display: contents;
}

.profile-links a,
.profile-list a,
.quiet-link {
  font-size: 0.88rem;
}

.accent-line {
  background: linear-gradient(
    90deg,
    var(--blue) 0 36%,
    var(--pink) 36% 67%,
    var(--orange) 67% 100%
  );
  border-radius: 2px;
  height: 2px;
  opacity: 0.8;
  width: 100%;
}

.content-section {
  border-bottom: 1px solid var(--line);
  padding: 2.4rem 0;
}

.content-section:last-child {
  border-bottom: 0;
  padding-bottom: 4.5rem;
}

.content-section > p {
  color: var(--muted);
  max-width: 700px;
}

.interest-list {
  border-top: 1px solid var(--line);
  margin: 1.7rem 0 1.2rem;
}

.interest-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}

.interest-item p {
  color: var(--muted);
  margin: 0;
}

.interest-item p:last-child {
  grid-column: 2;
}

.interest-item p:first-of-type {
  color: var(--ink);
}

.interest-item strong { color: var(--ink); }

.interest-mark {
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  margin-top: 0.45rem;
  width: 7px;
}

.mark-blue {
  background: var(--blue);
}

.mark-pink {
  background: var(--pink);
}

.mark-orange {
  background: var(--orange);
}

.publication-item {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 1.4rem;
  padding: 1.25rem 0 0.4rem;
}

.publication-date {
  color: var(--muted);
  font-size: 0.82rem;
  padding-top: 0.1rem;
}

.publication-body {
  max-width: 720px;
}

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

.publication-body h3 a:hover {
  color: var(--blue);
}

.publication-body p {
  color: var(--muted);
  font-size: 0.91rem;
  margin-bottom: 0.5rem;
}

.page-header {
  padding: 4rem 0 2.5rem;
}

.page-header h1 {
  margin: 0 0 0.55rem;
}

.page-header p {
  color: var(--muted);
  font-size: 1rem;
  margin: 0;
}

.research-list {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
}

.research-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 0.8rem;
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 0;
}

.research-item p {
  color: var(--muted);
  margin: 0;
}

/* Quarto wraps each Markdown heading and its body in a section. */
.research-item > p {
  grid-column: 1;
  grid-row: 1;
}

.research-item > section {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.research-item h3 {
  margin-bottom: 0.65rem;
}

.note-panel {
  background: var(--surface);
  border-left: 3px solid var(--blue);
  border-radius: 0 3px 3px 0;
  max-width: 680px;
  padding: 1.25rem 1.4rem;
}

.note-panel p {
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.cv-section {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem 0;
}

.cv-section:last-child {
  border-bottom: 0;
  padding-bottom: 4.5rem;
}

.cv-heading {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 500;
}

.cv-details h3:not(:first-child) {
  margin-top: 1.5rem;
}

.cv-details p {
  color: var(--muted);
}

.not-found {
  min-height: calc(100vh - 120px);
  padding-top: 14vh;
}

.nav-footer {
  background: var(--page);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  padding: 1.1rem 0;
}

.nav-footer a {
  color: var(--muted);
  text-decoration: none;
}

.nav-footer a:hover {
  color: var(--blue);
}

@media (max-width: 700px) {
  .navbar-nav .nav-link {
    margin-left: 0;
    padding: 0.55rem 0 !important;
  }

  .profile {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 3rem;
  }

  .portrait {
    grid-row: 1;
  }

  .portrait img {
    width: 138px;
  }

  .interest-item,
  .research-item {
    grid-template-columns: 12px 1fr;
  }

  .interest-item p:last-child {
    grid-column: 2;
  }

  .cv-section {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
}

@media (max-width: 480px) {
  .navbar .container-fluid,
  .site-shell,
  .not-found {
    padding-left: 18px;
    padding-right: 18px;
  }

  .profile {
    padding-top: 2.5rem;
  }

  .publication-item {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}
