/* Site styles. Layouts and components are independent of the original theme. */
:root {
  color-scheme: light;
  --background: #fff;
  --alternate: #f4f6f9;
  --surface: #fff;
  --text: #303a48;
  --heading: #172238;
  --muted: #566478;
  --accent: #3456a6;
  --border: #d7dfe9;
  --shadow: 0 2px 5px #0002;
  --body-font: Roboto, sans-serif;
  --heading-font: Montserrat, sans-serif;
  --header-height: 70px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #181e29;
  --alternate: #151a24;
  --surface: #202837;
  --text: #e2e7ef;
  --heading: #fff;
  --muted: #b6b8c1;
  --accent: #abc8ff;
  --border: #394557;
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--header-height) + 20px);
}
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 16px/1.65 var(--body-font);
}
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading);
  font-family: var(--heading-font);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  letter-spacing: -0.04em;
  font-weight: 700;
}
h2 {
  font-size: 1.75rem;
}
h3 {
  font-size: 1.35rem;
}
p {
  margin: 0 0 1rem;
}
a {
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
  height: auto;
}
button,
input,
select {
  font: inherit;
}
button,
.btn {
  cursor: pointer;
}
button,
select,
input {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--background);
  color: var(--text);
  padding: 0.45rem 0.65rem;
}
button:hover,
.btn:hover {
  border-color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
ul {
  padding-left: 1.5rem;
}
pre {
  overflow: auto;
  padding: 1rem;
  background: var(--alternate);
  border-radius: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
code {
  font-family: "Roboto Mono", monospace;
  font-size: 0.9em;
}

.container,
.nav-shell {
  width: calc(100% - 60px);
  max-width: 1200px;
  margin-inline: auto;
}
.row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -15px;
}
.row > * {
  padding-inline: 15px;
  min-width: 0;
}
.col {
  flex: 1 0 0%;
}
.col-auto {
  flex: 0 0 auto;
}
.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}
.section-heading {
  text-align: center;
}
.section-subheading {
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.4;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.section-heading h1::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-bottom: 0.75rem;
  background: var(--accent);
}
.home-section {
  padding: clamp(3rem, 6vw, 6rem) 0;
}
.home-section:nth-child(even) {
  background: var(--alternate);
}
#about {
  padding-block: clamp(2.5rem, 5vw, 5rem);
}
#profile {
  text-align: center;
  padding: 0 10px;
}
.avatar {
  object-fit: cover;
  width: min(100%, 214px);
  height: auto;
  aspect-ratio: 1;
}
.avatar-circle {
  border-radius: 50%;
}
.portrait-title h2 {
  margin: 20px 0 10px;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}
.portrait-title h3 {
  color: var(--muted);
  font: 400 1rem/1.7 var(--body-font);
  margin: 0;
}
.network-icon {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  font-size: 1.75rem;
}
.network-icon li {
  display: inline-block;
}
.ul-edu {
  list-style: none;
  padding-left: 1.8rem;
}
.ul-edu li {
  position: relative;
  margin-bottom: 0.65rem;
}
.fa-li {
  position: absolute;
  left: -1.8rem;
  top: 0.2rem;
}
.ul-edu .course {
  margin: 0;
  font-size: 0.9rem;
}
.ul-edu .institution {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.ul-interests {
  margin-top: 0;
}
.article-style p:last-child {
  margin-bottom: 1rem;
}
#about .article-style {
  max-width: 72ch;
  font-size: 1.0625rem;
}
#about .article-style + .row {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.ul-interests li::marker,
.ul-edu .fa-li {
  color: var(--accent);
}
#profile .network-icon {
  gap: 0.875rem;
  font-size: 1.4rem;
}
/* Header: one shared navigation for every page. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.nav-shell {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-height);
}
.site-brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.35rem;
  white-space: nowrap;
}
.site-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0 0 0 auto;
  font-size: 0.9rem;
}
.site-navigation a {
  color: var(--muted);
  font-weight: 700;
}
.site-navigation a:hover,
.site-navigation a[aria-current="location"] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}
.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-tools button {
  border-color: transparent;
  background: transparent;
}
.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  font-size: 1.1rem;
}
.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--accent);
  background: var(--alternate);
}
.theme-toggle i::before {
  content: "\f186"; /* Crescent moon */
}
[data-theme="dark"] .theme-toggle i::before {
  content: "\f185"; /* Sun */
}
.menu-toggle {
  display: none;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 10px;
  z-index: 100;
  padding: 10px;
  background: var(--background);
}
.skip-link:focus {
  top: 10px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Experience and training share cards, with a CSS timeline. */
.timeline-entry {
  position: relative;
  margin-left: 0;
  padding-left: 25px;
  padding-bottom: 0.5rem;
}
.timeline-entry::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 2rem;
  bottom: -2rem;
  border-left: 1px solid var(--border);
}
.timeline-entry::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(2rem - 6px);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--background);
}
.timeline-entry.is-current::after {
  background: var(--accent);
}
.timeline-entry:last-child::before {
  display: none;
}
.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}
.card-body {
  padding: 1.25rem clamp(1.1rem, 2vw, 1.65rem);
}
.card-title {
  margin-bottom: 0.5rem;
}
.card .exp-title {
  color: var(--heading);
  letter-spacing: -0.018em;
  font-size: 1.1rem;
  font-weight: 700;
}
.exp-company {
  font-size: 0.9rem;
  font-weight: 400;
}
.exp-meta {
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
  font-variant-numeric: tabular-nums;
}
.card-text {
  margin-top: 0.9rem;
  font-size: 1rem;
}
.card-subtitle {
  font-family: var(--body-font);
  color: var(--muted);
  font-size: 0.9rem;
}
.card-link {
  font-size: 0.85rem;
}
/* Publication lists and compact article/event lists. */
.pub-list-item {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.pub-icon {
  color: var(--muted);
  padding-right: 0.35rem;
}
.pub-list-item p {
  margin-top: 0.4rem;
}
.li-cite-author {
  font-size: 1rem;
}
.author-highlighted {
  font-weight: 700;
}
.pub-list-item > a {
  font-weight: 700;
}
.btn {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--surface));
  border-radius: 0.45rem;
  color: var(--accent);
  background: transparent;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0.2rem 0.2rem 0.2rem 0;
}
.btn:hover {
  background: var(--accent);
  color: var(--background);
  text-decoration: none;
}
.btn-links {
  margin-bottom: 1rem;
}
.media {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.media-body {
  flex: 1;
  min-width: 0;
}
.stream-item {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.35rem;
}
.stream-item .article-title {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  letter-spacing: -0.02em;
}
.stream-item .article-title a {
  color: var(--text);
}
.stream-item .article-style {
  font-size: 1rem;
  margin: 0.4rem 0;
}
.summary-link {
  color: var(--text);
}
.stream-item img {
  display: block;
  width: 150px;
  max-width: 150px;
  border-radius: 0.5rem;
}
.article-metadata {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.article-metadata a {
  color: inherit;
}
.middot-divider::after {
  content: " · ";
}
.see-all {
  font-family: var(--heading-font);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.form-row .col-auto {
  padding: 0;
}
.filter-search {
  max-width: 100%;
}
/* Detail and taxonomy pages. */
.page-content {
  padding: 40px 0 60px;
  min-height: 65vh;
}
.universal-wrapper {
  width: calc(100% - 60px);
  max-width: 1000px;
  margin: 0 auto;
}
.article-container {
  width: calc(100% - 60px);
  max-width: 800px;
  margin: 0 auto;
}
.article-header {
  text-align: center;
}
.featured-image {
  display: block;
  margin: auto;
}
.article-container h1 {
  text-wrap: balance;
}
.article-container .article-style,
.pub-abstract {
  font-size: 1.0625rem;
  line-height: 1.75;
}
.pub-abstract {
  text-align: left;
}
.pub-row-heading {
  font-weight: 700;
}
.space-below {
  margin-bottom: 1.25rem;
}

.share {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  padding: 1rem 0;
  font-size: 1.2rem;
}
.content-widget-hr {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.author-card .avatar {
  width: 90px;
  height: 90px;
}
.author-card .network-icon {
  justify-content: flex-start;
  font-size: 1.2rem;
}
.author-card .card-title {
  font-size: 1.1rem;
}

.site-footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.zoomable {
  cursor: zoom-in;
}
/* Accessible native dialogs need no modal library. */
dialog {
  color: var(--text);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  width: min(760px, calc(100% - 30px));
  max-height: 85vh;
  box-shadow: 0 15px 60px #0006;
}
dialog::backdrop {
  background: #0009;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.dialog-heading h2 {
  margin: 0;
}
.dialog-heading button {
  font-size: 1.5rem;
}
.dialog-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
#search-results {
  padding-left: 1.2rem;
}
#search-results li {
  margin-bottom: 0.75rem;
}
#site-search {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
}
#preview-dialog {
  width: min(1060px, 95vw);
  max-height: 94dvh;
  padding: 0;
}
#preview-dialog .dialog-heading {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
}
#preview-title {
  flex: 1;
  font-size: 1.05rem;
}
#preview-content object {
  display: block;
  width: 100%;
  height: min(76vh, 80dvh);
  border: 0;
}
#preview-content img {
  display: block;
  margin: auto;
  max-width: 100%;
  max-height: 76dvh;
  object-fit: contain;
}
html:has(#preview-dialog[open]) {
  overflow: hidden;
}
/* Small compatibility utilities for the preserved semantic HTML. */
.text-muted {
  color: var(--muted);
}

.mb-0 {
  margin-bottom: 0;
}
.mb-3 {
  margin-bottom: 1rem;
}
.mb-4 {
  margin-bottom: 1.5rem;
}
.mt-0 {
  margin-top: 0;
}
.mt-4 {
  margin-top: 1.5rem;
}
.my-0 {
  margin-top: 0;
  margin-bottom: 0;
}
.mr-1 {
  margin-right: 0.25rem;
}
.mr-3 {
  margin-right: 1rem;
}
.ml-3 {
  margin-left: 1rem;
}
.pt-3 {
  padding-top: 1rem;
}
.py-2 {
  padding-block: 0.5rem;
}

@media (min-width: 768px) {
  .col-md-1 {
    flex: 0 0 8.333%;
  }
  .col-md-3 {
    flex: 0 0 25%;
  }
  .col-md-5 {
    flex: 0 0 41.667%;
  }
  .col-md-7 {
    flex: 0 0 58.333%;
  }
  .col-md-9 {
    flex: 0 0 75%;
  }
  .col-md-10 {
    flex: 0 0 83.333%;
  }
  .d-md-none {
    display: none;
  }
}
@media (min-width: 992px) {
  .col-lg-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
  }
  .col-lg-8 {
    flex: 0 0 66.667%;
    max-width: 66.667%;
  }
  .col-lg-12 {
    flex: 0 0 100%;
  }
  .section-heading h1 {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
  }
  .section-heading {
    text-align: left;
  }
  .mb-lg-0 {
    margin-bottom: 0;
  }
}
@media (max-width: 1199px) {
  .nav-shell {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-block: 0.75rem;
  }
  .site-brand {
    margin-right: auto;
  }
  .interactive .menu-toggle {
    display: inline-block;
  }
  .site-navigation {
    order: 3;
    width: 100%;
    margin: 0;
  }
  .interactive .site-navigation {
    display: none;
  }
  .interactive .site-navigation.is-open {
    display: flex;
  }
}
@media (max-width: 991px) {
  .container {
    max-width: 720px;
  }
  .home-section {
    padding: 60px 0;
  }
  #about {
    padding: 40px 0 60px;
  }
  .section-heading {
    text-align: left;
    margin-bottom: 1.5rem;
  }
}
@media (max-width: 575px) {
  .container,
  .nav-shell,
  .article-container,
  .universal-wrapper {
    width: calc(100% - 30px);
  }
  #profile {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    column-gap: 1rem;
    text-align: left;
    align-items: center;
    padding: 0 0 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  #profile .network-icon {
    grid-column: 2;
    justify-content: flex-start;
    margin: 0;
  }
  #profile .avatar {
    grid-row: span 2;
  }
  .portrait-title h2 {
    margin: 0 0 0.25rem;
  }
  .site-brand {
    white-space: normal;
    flex: 1 1 5rem;
    line-height: 1.2;
    font-size: 1rem;
  }
  .nav-tools {
    gap: 0;
  }
  .nav-shell {
    gap: 0.2rem;
  }
  h1 {
    font-size: 1.9rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .stream-item {
    gap: 0.5rem;
  }
  .stream-item img {
    width: 90px;
    max-width: 90px;
  }
  .stream-item .ml-3 {
    margin-left: 0;
  }
  .timeline-entry {
    padding-left: 15px;
  }
  .card-body {
    padding: 1rem;
  }
  .author-card {
    flex-wrap: wrap;
  }
}
@media print {
  .site-header,
  .site-footer,
  dialog,
  .btn-links,
  .share-box {
    display: none;
  }
  body {
    color: #000;
    background: #fff;
  }
  .home-section {
    padding: 1.5rem 0;
    break-inside: avoid;
  }
}
