/* Global font settings */
body, p {
  font-family: "Raleway", "Montserrat", "Lato", "Open Sans", sans-serif;
  font-size: 1.0em;
}

/* Prevent excessive spacing in terminal output -- need a better solution for when ansi codes are present */
pre {
  line-height: 1.2;
}

/* Do not insert a space between a paragraph and a list */
p:has(+ ul) {
  margin-bottom: 0.0em;
}

/* Quarto-specific */
.navbar-logo {
    height: 2em !important;
    max-height: none !important;
    min-height: 40px !important;
}

.navbar-nav {
  display: flex;
  justify-content: center;
  width: 100%;
}

#quarto-document-content {
  margin-top: 0;
  padding-top: 0 !important;
}

/* Prevent API doc table name columns from wrapping */
table td:first-child a {
  white-space: nowrap;
}

/* Cards -- adapted from Material for MkDocs */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.example-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.example-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

.example-card .card-body {
  padding: 1.25rem;
}

.example-card .card-title {
  margin-top: 0;
  margin-bottom: 1rem;
}

.example-card hr {
  margin: 0 0 1.25rem 0;
}

.example-card img {
  display: block;
  margin: 0 auto 1.5rem auto;
}

.example-card p {
  margin-bottom: 1rem;
}

.example-card .card-meta {
  display: block;
  margin-top: 1rem;
  color: var(--bs-secondary-color);
}


/* Compact gallery grid (matplotlib-style) */
.sti-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75em;
  margin: 1em 0;
}

.sti-gallery a {
  display: block;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--md-default-bg-color);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.sti-gallery a:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
  border-color: var(--md-accent-fg-color);
}

.sti-gallery figure {
  margin: 0;
}

.sti-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: #ffffff;
}

.sti-gallery figcaption {
  padding: 0.5em 0.6em 0.6em;
  font-size: 0.8em;
  line-height: 1.3;
  text-align: center;
  font-weight: 500;
}
