/* User Provided Stylesheet */

/* Homepage only: WVU mark beside frontmatter title (h1 stays plain text in YAML) */
article:has(.intro-bio-grid) #skip-to-frontmatter h1.myst-fm-block-title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

article:has(.intro-bio-grid) #skip-to-frontmatter h1.myst-fm-block-title::after {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  margin-left: 0.125rem;
  background: url('book/images/wvu.webp') no-repeat center / contain;
}

/* Introduction bio grid: native :columns: 4/8 from index.md; avoid equal-height stretch */
.myst-grid.intro-bio-grid {
  align-items: start;
}

/* Tagline under headshot: align with h2#introduction .heading-text (book theme / Tailwind-like) */
.intro-bio-grid .intro-tagline {
  display: block;
  margin: 0.75rem 0 0;
  text-align: left;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: rgb(28 25 23);
}

.intro-bio-grid .intro-tagline span {
  display: block;
}

html.dark .intro-bio-grid .intro-tagline,
.dark .intro-bio-grid .intro-tagline {
  color: rgb(245 245 244);
}

/* Homepage: headshot only (not the small story icons below) */
.intro-bio-grid .intro-headshot-wrap img {
  display: block;
  width: 100%;
  max-width: min(280px, 100%);
  height: auto;
  border-radius: 0.375rem;
}

/* First column: let the MyST 12-col cell use full width (avoids 1-col icon strip ~36px wide) */
.intro-bio-grid > .myst-grid-item:first-child {
  min-width: 0;
  width: 100%;
}

/* Small story images: 3x3 grid (8 icons + 1 empty cell) */
.intro-bio-grid .intro-story-icons {
  display: block;
  margin-top: 0.75rem;
  width: 100%;
  max-width: min(280px, 100%);
  min-width: 0;
}

/* Equal 3x3 tracks; square box so row/column cells align (not a short wide strip) */
.intro-bio-grid .intro-story-3x3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-flow: row;
  gap: 0.4rem 0.35rem;
  width: min(100%, 10.5rem);
  max-width: 10.5rem;
  aspect-ratio: 1;
  min-width: 8.5rem;
  min-height: 0;
  box-sizing: border-box;
  place-items: center;
  align-content: stretch;
}

.intro-bio-grid .intro-story-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.intro-bio-grid .intro-story-cell--empty {
  min-height: 0;
  pointer-events: none;
  /* Keep empty slots aligned in the 3x3 */
  background: transparent;
}

/* Theme sets margin auto on content images; keep icons centered in cell without stretching layout */
.intro-bio-grid .intro-story-cell img {
  display: block;
  width: 2.25rem !important;
  height: 2.25rem !important;
  max-width: 100%;
  object-fit: contain;
  border-radius: 0.2rem;
  margin: 0 !important;
  flex: 0 0 auto;
}

/* MyST turns DOIs (links or plain text) into citations and a References section; the site uses CV lists and direct links instead. */
section#references {
  display: none !important;
}

.myst-fm-downloads-dropdown {
  display: none !important;
}

/* No GitHub icon in the frontmatter badge row */
.myst-fm-github-link {
  display: none !important;
}

table td:first-child,
table th:first-child {
  white-space: nowrap;
}

#giscus-comments {
  max-width: 100% !important;
  padding: 0 !important;
}

.giscus,
.giscus-frame {
  width: 100% !important;
}

#featured-projects + .myst-grid .myst-card-footer,
#featured-projects + .myst-grid .myst-card-title {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  text-align: center !important;
  white-space: nowrap;
}

#featured-projects + .myst-grid .myst-card-footer > *,
#featured-projects + .myst-grid .myst-card-title > * {
  text-align: center !important;
}

#featured-projects + .myst-grid .myst-card-footer p,
#featured-projects + .myst-grid .myst-card-footer strong {
  margin: 0 auto;
}
