.profile-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.profile-card img {
  width: 170px;
  border-radius: 6px;
  object-fit: cover;
}

.profile-card .profile-text {
  flex: 1;
  min-width: 260px;
}

.contact-block {
  font-size: 0.95em;
  line-height: 1.75;
  color: #333;
}

.contact-block strong {
  color: #222;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.column-screen > p {
  margin: 0;
}

/* On pages with a hero banner, suppress Quarto's auto-rendered title block;
   the page provides its own heading inside `.content-card` instead. The
   :has() guard keeps this scoped — Research/CV pages keep their default
   title blocks. Document order: hero → attribution → manual title → body. */
main#quarto-document-content:has(> .column-screen) > #title-block-header {
  display: none;
}

.content-card {
  max-width: 720px;
  margin: 2.5rem auto 3rem;
  padding: 2.25rem 2.75rem;
  background: #fcfcfc;
  border: 1px solid #ececec;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.035);
}

.content-card > h1:first-child,
.content-card > h2:first-child {
  margin-top: 0;
}

.content-card h2 {
  border-bottom-color: #e6e6e6;
}

@media (max-width: 600px) {
  .content-card {
    padding: 1.5rem 1.25rem;
    margin: 1.5rem auto 2rem;
  }
}

.hero-img {
  display: block;
  width: 100%;
  height: clamp(150px, 20vw, 320px);
  object-fit: cover;
  margin: 0;
}

.hero-attribution {
  display: block;
  font-size: 0.78em;
  color: #888;
  text-align: right;
  margin-top: 0.4rem;
  margin-bottom: 1.8rem;
}

.hero-attribution a {
  color: #888;
  text-decoration: none;
}

.hero-attribution a:hover {
  text-decoration: underline;
  color: #555;
}

/* Dark-mode overrides for custom elements. Quarto sets body.quarto-dark
   on the page when the navbar toggle is set to dark; Bootstrap handles base
   colors, but the hard-coded values above need their own dark counterparts. */
body.quarto-dark .content-card {
  background: #1d2127;
  border-color: #2a2f36;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

body.quarto-dark .content-card h2 {
  border-bottom-color: #2a2f36;
}

body.quarto-dark .contact-block {
  color: #d0d4da;
}

body.quarto-dark .contact-block strong {
  color: #f0f2f5;
}

body.quarto-dark .hero-attribution,
body.quarto-dark .hero-attribution a {
  color: #9aa0a8;
}

body.quarto-dark .hero-attribution a:hover {
  color: #c5c9d0;
}

body.quarto-dark h2 {
  border-bottom-color: #2a2f36;
}

body.quarto-dark .pub-venue {
  color: #d0d4da;
}

body.quarto-dark .navbar {
  border-bottom-color: #2a2f36;
}
