/* Small site-specific adjustments to the al-folio layout. */
html[data-theme="dark"] {
  --global-theme-color: #59c4de;
  --global-hover-color: #8bdbef;
}

#navbar .navbar-collapse-main {
  justify-content: center;
  text-align: center;
}

#navbar .navbar-menu-list {
  margin-inline: auto;
}

#search-toggle .nav-link {
  font-size: 0;
}

#search-toggle .nav-link i {
  font-size: 1rem;
}

@media (min-width: 576px) {
  #navbar .navbar-brand {
    display: none;
  }
}

.post .profile {
  width: 190px;
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.post .profile .more-info {
  font-family: inherit;
  font-size: 0.875rem;
  text-align: center;
  color: var(--global-text-color-light);
}

.post article > h2 {
  margin-top: 1.75rem;
}

.news .table {
  background: transparent;
  color: var(--global-text-color);
}

.news th {
  white-space: nowrap;
  font-weight: 400;
}

.contact-emails {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}

.contact-email {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
}

.email-label {
  color: var(--global-text-color-light);
  font-weight: 500;
}

.email-copy-button {
  max-width: 100%;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--global-divider-color);
  border-radius: 4px;
  background: transparent;
  color: var(--global-theme-color);
  font: inherit;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.email-copy-button:hover {
  border-color: var(--global-theme-color);
  color: var(--global-hover-color);
}

.email-copy-button:focus-visible {
  outline: 2px solid var(--global-theme-color);
  outline-offset: 3px;
}

.email-copy-feedback {
  min-height: 1.25em;
  max-width: 18rem;
  color: var(--global-text-color-light);
  font-size: 0.8125rem;
  line-height: 1.25;
}

.publication-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0 1rem;
}

.publication-toolbar[hidden] {
  display: none;
}

.publication-toolbar-label {
  margin-right: 0.25rem;
  color: var(--global-text-color);
  font-size: 0.875rem;
}

.publication-group-button {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--global-divider-color);
  border-radius: 4px;
  background: transparent;
  color: var(--global-text-color);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.publication-group-button:hover,
.publication-group-button:focus-visible {
  border-color: var(--global-theme-color);
}

.publication-group-button:focus-visible {
  outline: 2px solid var(--global-theme-color);
  outline-offset: 3px;
}

.publication-group-button[aria-pressed="true"] {
  border-color: var(--global-theme-color);
  background: var(--global-theme-color);
  color: var(--global-bg-color);
}

.publications h2.bibliography {
  color: var(--global-text-color);
  font-size: 1.4rem;
  font-weight: 400;
  text-align: left;
}

.repository-card {
  margin-top: 1.5rem;
  border: 1px solid var(--global-divider-color);
  background: var(--global-card-bg-color);
  box-shadow: none;
}

.repository-title {
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.repository-title i {
  margin-right: 0.35rem;
}

.repository-languages {
  font-size: 0.875rem;
  color: var(--global-text-color-light);
}

.repository-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.repository-links .btn {
  border: 1px solid var(--global-text-color);
  color: var(--global-text-color);
  text-transform: none;
}

.repository-links .btn:hover {
  border-color: var(--global-theme-color);
  color: var(--global-theme-color);
}

@media (max-width: 575.98px) {
  .footer-last-updated {
    display: block;
  }

  #navbar .navbar-menu-list {
    align-items: center;
  }

  .post .profile {
    float: none !important;
    width: 132px;
    margin: 0 auto 1.5rem;
  }

  .news th {
    padding-right: 1rem;
    font-size: 0.8125rem;
  }
}

/* Dotted word on the misc page, drawn by assets/js/misc-playground.js. */
.dotted-hero {
  display: block;
  width: 100%;
  cursor: crosshair;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.dotted-hero[hidden] {
  display: none;
}

.dotted-hero canvas {
  display: block;
}

.post-header.dotted-title-active .post-title {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Pages without a description (research, misc) skip the empty subtitle line. */
.post-header .post-description:empty {
  display: none;
}

/* Particle hover on the "misc" link in the navigation bar, drawn by assets/js/nav-particles.js. */
.nav-particles-canvas {
  position: fixed;
  display: none;
  pointer-events: none;
  z-index: 2000;
}

.nav-link.nav-particles-hidden {
  color: transparent !important;
}

/* Opinion network behind the top of the homepage, drawn by assets/js/influence-network.js. */
.influence-net {
  position: absolute;
  left: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 100px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 100px), transparent);
}

.has-influence-net [role="main"] {
  position: relative;
  z-index: 1;
}

/* A halo of background colour around the text above the network, so its lines stop just short of each letter. */
.has-influence-net .post-header,
.has-influence-net .post article > .clearfix {
  text-shadow:
    0 0 1px var(--global-bg-color),
    0 0 2px var(--global-bg-color),
    0 0 3px var(--global-bg-color),
    0 0 4px var(--global-bg-color),
    0 0 6px var(--global-bg-color);
}
