/* Site-specific spacing and typography over the al-folio theme. */
:root {
  color-scheme: light;
  --site-muted: #60656b;
  --site-rule: #e3e5e8;
  --site-accent: #8b1688;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --site-muted: #b0b5bb;
  --site-rule: #3b3e43;
  --site-accent: #65c7de;
}
html {
  scroll-padding-top: 6rem;
}
body {
  font-size: 1.0625rem;
  line-height: 1.75;
}
a {
  color: var(--site-accent);
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--site-accent);
  text-decoration: underline;
}

.post p a,
.post-header .desc a,
footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
pre:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 5px;
  border-radius: 2px;
}
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 1rem;
  z-index: 1100;
  padding: 0.5rem 1rem;
  background: var(--global-bg-color);
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
}
main.container {
  padding-top: 1.5rem;
  padding-bottom: 4.5rem;
}
.post {
  max-width: 820px;
  margin-inline: auto;
}
.post-header {
  margin-bottom: 2.75rem;
}
.post-title {
  font-size: clamp(2rem, 4vw, 2.65rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
}
.post-header .desc,
.post-description {
  color: var(--site-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}
.post article > p,
.home-page .clearfix > p {
  margin-bottom: 1.5rem;
}
.post article h2 {
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}
/* Page section titles (Research, Publications); CV and homepage headings sit inside sections. */
.post article > h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding-left: 1rem;
  border-left: 3px solid var(--site-accent);
}
.post article h3 {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}
.post article hr {
  border-top: 1px solid var(--site-rule);
  margin-block: 2.75rem;
}
.post article details {
  margin-block: 1.25rem;
}
.post article summary {
  cursor: pointer;
  color: var(--site-accent);
  padding-block: 0.5rem;
}
.post article details p {
  margin-top: 1rem;
}
.navbar {
  opacity: 1;
}
.navbar .nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.navbar #light-toggle,
.navbar-toggler {
  min-width: 44px;
  min-height: 44px;
}
/* Center the theme icon on the same 44px row as the navigation links. */
.navbar .toggle-container {
  display: flex;
  align-items: center;
}
.navbar #light-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  transform: none;
  line-height: 1;
}
.navbar #light-toggle i {
  line-height: 1;
}
.home-page .post {
  max-width: 760px;
}
.home-page .post-header {
  margin-bottom: 2.5rem;
}
.home-page .phd-note {
  margin: 2.5rem 0 1.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--site-accent);
}
.home-page .phd-note p {
  margin: 0;
}
.profile-links,
.publication-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  row-gap: 0.15rem;
  font-size: 0.9375rem;
}
.profile-links a,
.publication-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
}
.link-note,
.publication-authors,
.publication-venue {
  color: var(--site-muted);
}
.paper-authors {
  margin: -0.5rem 0 0.35rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--site-muted);
}
.paper-authors .author-self {
  font-weight: 600;
}
.paper-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9375rem;
  color: var(--site-muted);
}
.post article > .paper-meta {
  margin-bottom: 1.5rem;
}
.paper-status {
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--site-rule);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--global-text-color);
}
.paper-status.is-published {
  border-color: var(--site-accent);
  color: var(--site-accent);
}
.research-overview {
  margin: 2rem 0 0.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--site-rule);
  border-radius: 0.35rem;
}
.research-count {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--site-muted);
}
.research-count strong {
  color: var(--global-text-color);
  font-weight: 600;
}
.jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.jump-links a,
.paper-actions a,
.copy-bibtex {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 40px;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--site-rule);
  border-radius: 4px;
  font-size: 0.875rem;
  line-height: 1.4;
}
.jump-links a:hover,
.paper-actions a:hover,
.copy-bibtex:hover {
  border-color: var(--site-accent);
  text-decoration: none;
}
.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
/* Filled "Project website" button; outranks the plain and outlined links beside it. */
.website-button,
.publication-links a.website-button,
.paper-actions a.website-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--site-accent);
  border-radius: 4px;
  background: var(--site-accent);
  color: var(--global-bg-color);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}
/* The theme colours every span with the body text colour; keep link arrows on the link colour. */
.publication-links a span[aria-hidden],
.website-button span {
  color: inherit;
}
/* Compact pill centred in the 44px row of plain homepage links. */
.publication-links a.website-button {
  align-self: center;
}
/* Same height and padding as the outlined Research page buttons. */
.paper-actions a.website-button {
  min-height: 40px;
  padding: 0.35rem 0.85rem;
}
a.website-button:hover,
a.website-button:focus-visible {
  border-color: var(--site-accent);
  background: var(--site-accent);
  color: var(--global-bg-color);
  text-decoration: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--site-accent) 30%, transparent);
}
.copy-bibtex {
  margin-bottom: 0.5rem;
  background: var(--global-bg-color);
  color: var(--site-accent);
  cursor: pointer;
}
.home-page .home-section {
  margin-top: 3rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--site-rule);
}
.home-page .home-section h2 {
  margin: 0 0 1.75rem;
  font-size: 1.35rem;
  font-weight: 500;
}
.paper-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.paper-list > li + li {
  margin-top: 2.25rem;
}
.home-page .paper-list h3 {
  margin: 0 0 0.4rem;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.45;
}
.paper-list h3 a {
  color: var(--global-text-color);
}
.paper-list p {
  margin: 0 0 0.4rem;
  font-size: 0.9375rem;
}
.paper-list .paper-summary {
  margin-top: 0.6rem;
  line-height: 1.65;
}
.paper-list .publication-links {
  margin-top: 0.15rem;
}
/* BibTeX disclosure on the Research page. */
.bibtex-block .bibliography {
  margin: 0;
  padding: 0;
  list-style: none;
}
.bibtex-block pre {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-x: auto;
}
.bibtex-block pre,
.bibtex-block .highlight code,
.bibtex-block .highlight code span {
  color: var(--global-text-color);
}
.cv-page .post {
  max-width: none;
}
.cv-page .post-header {
  margin-bottom: 1.75rem;
}
.cv-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}
.cv-toolbar p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--site-muted);
}
.cv-download {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border: 1px solid var(--site-accent);
  border-radius: 4px;
  min-height: 44px;
  font-size: 0.9375rem;
}
.cv-layout {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.cv-navigation {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  line-height: 1.5;
  border-left: 1px solid var(--site-rule);
  padding-left: 1rem;
}
.cv-navigation a {
  color: var(--site-muted);
  padding-block: 0.55rem;
}
.cv-navigation a:hover,
.cv-navigation a:focus-visible {
  color: var(--site-accent);
}
.cv-page .cv-section {
  padding-top: 2.25rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--site-rule);
  scroll-margin-top: 6rem;
}
.cv-page .cv-section:first-child {
  padding-top: 0;
  margin-top: 0;
  border: 0;
}
.cv-page .cv-section h2 {
  margin: 0 0 1.6rem;
  font-size: 1.35rem;
  font-weight: 500;
}
.cv-entry + .cv-entry {
  margin-top: 2rem;
}
.cv-entry-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.cv-page .cv-entry h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 500;
}
.cv-date {
  flex-shrink: 0;
  color: var(--site-muted);
  font-size: 0.875rem;
}
.cv-entry p {
  margin: 0.45rem 0 0;
  font-size: 0.9375rem;
}
.cv-entry .cv-affiliation {
  color: var(--site-muted);
}
.cv-entry ul {
  margin: 0.85rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}
.cv-entry li + li {
  margin-top: 0.5rem;
}
.cv-page .cv-entry details {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
}
.cv-page .cv-entry details p {
  margin-top: 0.5rem;
}
.cv-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9375rem;
}

.cv-section > .cv-entry + .cv-list {
  margin-top: 1rem;
}
.cv-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.65rem;
}
.cv-list li:first-child {
  padding-top: 0;
}
.cv-list strong {
  font-weight: 500;
}
.cv-list small {
  display: block;
  font-size: 0.875rem;
  color: var(--site-muted);
}
.cv-skills {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 0.8rem 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}
.cv-skills dt {
  font-weight: 500;
}
.cv-skills dd {
  margin: 0;
}
footer.sticky-bottom {
  border-top-color: var(--site-rule);
  font-size: 0.8125rem;
  color: var(--site-muted);
}
@media (max-width: 767px) {
  main.container {
    padding: 0.5rem 1.5rem 3.5rem;
  }
  .post-header {
    margin-bottom: 2rem;
  }
  .post article > h2 {
    font-size: 1.35rem;
    padding-left: 0.75rem;
  }
  .cv-layout {
    display: block;
  }
  .cv-navigation {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 1.25rem;
    margin-bottom: 2.5rem;
    padding: 0 0 1rem;
    border-left: 0;
    border-bottom: 1px solid var(--site-rule);
  }
  .cv-navigation a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .cv-toolbar {
    margin-bottom: 1.75rem;
  }
  .cv-entry-heading,
  .cv-list li {
    flex-direction: column;
    align-items: start;
    gap: 0.2rem;
  }
  .cv-skills {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .cv-skills dd + dt {
    margin-top: 1rem;
  }
}
@media (max-width: 575px) {
  .navbar #light-toggle {
    justify-content: flex-start;
  }
  .navbar .container {
    padding-inline: 1.25rem;
  }
  .navbar .navbar-brand {
    font-size: 1rem;
  }
  .navbar .nav-link {
    width: 100%;
  }
  .home-page .phd-note {
    padding-left: 1.1rem;
  }
  .profile-links,
  .publication-links {
    column-gap: 1.25rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.research-figure {
  margin: 1.75rem 0 2rem;
}
.research-figure img {
  display: block;
  padding: 0.75rem;
  background: #fff;
  border-radius: 0.35rem;
  cursor: default;
  width: 100%;
  height: auto;
}
.research-figure figcaption {
  margin-top: 0.85rem;
  color: var(--site-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.research-figure img.is-flush {
  padding: 0;
  background: none;
}
.research-figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0 2rem;
}
.research-figure-grid .research-figure {
  margin: 0;
}
@media (max-width: 575px) {
  .research-figure-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Cerberus pictogram strip (_includes/cerberus-story.liquid): four steps in a row joined by
   arrows, a return loop to the dock underneath; stacks into rows with down arrows on narrow
   screens. The drawings take every colour from the theme variables below. */
.rover-story {
  --rs-gap: 2rem;
  --rs-pic-w: 140px;
  --rs-pic-h: 100px;
}
.rover-story-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--rs-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.rover-story-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  text-align: center;
  line-height: 1.4;
}
.rover-story svg {
  display: block;
  overflow: visible;
  fill: none;
  stroke: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rover-story-step svg {
  width: var(--rs-pic-w);
  height: var(--rs-pic-h);
  margin-bottom: 0.6rem;
}
.rover-story-step strong {
  color: var(--global-text-color);
  font-size: 0.95rem;
  font-weight: 600;
}
.rover-story-step span,
.rover-story-return span {
  margin-top: 0.15rem;
  color: var(--site-muted);
  font-size: 0.82rem;
  text-wrap: balance;
}
/* Arrow into each step after the first: a shaft and a triangular head. */
.rover-story-step + .rover-story-step::before,
.rover-story-step + .rover-story-step::after {
  content: "";
  position: absolute;
}
.rover-story-step + .rover-story-step::before {
  top: calc(var(--rs-pic-h) / 2 - 1px);
  left: calc((100% - var(--rs-pic-w)) / -2 - var(--rs-gap) + 0.5rem);
  width: calc(100% - var(--rs-pic-w) + var(--rs-gap) - 1rem - 7px);
  height: 2px;
  border-radius: 1px;
  background: var(--site-accent);
}
.rover-story-step + .rover-story-step::after {
  top: calc(var(--rs-pic-h) / 2 - 5px);
  left: calc((100% - var(--rs-pic-w)) / 2 - 0.5rem - 7px);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--site-accent);
}
/* Return path: from under the last step back to the first, with the dock on the bottom run. */
.rover-story-return {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.75rem;
  margin: 0.6rem calc((100% - 3 * var(--rs-gap)) / 8) 1.6rem;
  border: 1.5px dashed var(--site-muted);
  border-top: 0;
  border-radius: 0 0 0.9rem 0.9rem;
}
.rover-story-return::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-bottom: 7px solid var(--site-muted);
}
.rover-story-return > * {
  position: relative;
  top: 0.875rem;
  background: var(--global-bg-color);
}
.rover-story-return svg {
  width: 72px;
  height: 36px;
  padding: 0 0.3rem 0 0.5rem;
}
.rover-story-return span {
  margin: 0;
  padding-right: 0.5rem;
}
.rover-story .rs-ink {
  stroke: var(--global-text-color);
  stroke-width: 1.75;
}
.rover-story .rs-mute {
  stroke: var(--site-muted);
  stroke-width: 1.5;
}
.rover-story .rs-acc {
  stroke: var(--site-accent);
  stroke-width: 2;
}
.rover-story .rs-bg {
  stroke: var(--global-bg-color);
  stroke-width: 1.5;
}
.rover-story .rs-dots {
  stroke-width: 2;
  stroke-dasharray: 0 5;
}
/* Tread: short notches knocked out of the tyre rim. */
.rover-story .rs-knobs {
  stroke: var(--global-bg-color);
  stroke-width: 1.6;
  stroke-dasharray: 1.3 3.41;
}
.rover-story .rs-f-ink {
  fill: var(--global-text-color);
}
.rover-story .rs-f-bg {
  fill: var(--global-bg-color);
}
.rover-story .rs-f-rule {
  fill: var(--site-rule);
}
.rover-story .rs-f-mute {
  fill: var(--site-muted);
}
.rover-story .rs-f-acc {
  fill: var(--site-accent);
}
@media (max-width: 767px) {
  .rover-story {
    --rs-gap: 1.75rem;
    --rs-pic-w: 112px;
    --rs-pic-h: 80px;
  }
  .rover-story-steps {
    grid-template-columns: 1fr;
    row-gap: var(--rs-gap);
  }
  .rover-story-step {
    display: grid;
    grid-template-columns: var(--rs-pic-w) minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 1rem;
    align-content: center;
    text-align: left;
  }
  .rover-story-step svg {
    grid-row: 1 / 3;
    margin: 0;
  }
  .rover-story-step strong {
    align-self: end;
  }
  .rover-story-step span {
    align-self: start;
  }
  .rover-story-step + .rover-story-step::before {
    top: calc(var(--rs-gap) * -1 + 0.3rem);
    left: calc(var(--rs-pic-w) / 2 - 1px);
    width: 2px;
    height: calc(var(--rs-gap) - 1rem);
  }
  .rover-story-step + .rover-story-step::after {
    top: calc(-0.3rem - 7px);
    left: calc(var(--rs-pic-w) / 2 - 5px);
    border-top: 7px solid var(--site-accent);
    border-right: 5px solid transparent;
    border-bottom: 0;
    border-left: 5px solid transparent;
  }
  .rover-story-return {
    display: grid;
    grid-template-columns: var(--rs-pic-w) minmax(0, 1fr);
    column-gap: 1rem;
    align-items: center;
    height: auto;
    margin: var(--rs-gap) 0 0;
    border: 0;
    border-radius: 0;
  }
  .rover-story-return::before {
    top: calc(var(--rs-gap) * -1 + 0.3rem);
    left: calc(var(--rs-pic-w) / 2 - 0.75px);
    height: calc(var(--rs-gap) - 0.6rem);
    border: 0;
    border-left: 1.5px dashed var(--site-muted);
  }
  .rover-story-return > * {
    top: 0;
  }
  .rover-story-return svg {
    justify-self: center;
    padding: 0;
  }
  .rover-story-return span {
    padding: 0;
    line-height: 1.4;
  }
}

.home-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.home-intro-text {
  min-width: 0;
}
.home-avatar {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}
@media (max-width: 575px) {
  .home-avatar {
    width: 72px;
    height: 72px;
  }
}
