/* minimal overrides on top of the cosmo theme */

/* Deliberately not named .rounded - that collides with a Bootstrap utility
   class. The img.headshot selector (0,1,1) is also needed to outrank the
   .img-fluid max-width:100% that Quarto adds to every image. */
.headshot {
  border-radius: 0.5rem;
}

/* On narrow screens the 25/75 layout stacks, and an uncapped headshot fills
   the column and pushes the bio entirely below the fold. */
@media (max-width: 768px) {
  img.headshot {
    max-width: 180px;
  }
}

/* ---- Publications: headline stats ---------------------------------------- */
.stat-line {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}
.stat-line .meta {
  color: #6c757d;
  font-size: 0.85rem;
  font-weight: normal;
}

/* ---- Blog list ----------------------------------------------------------- */
.blog-list > p {
  /* same pandoc raw-HTML gotcha as .portfolio-grid below */
  display: contents;
}
.blog-entry {
  padding: 0.85rem 0;
  border-bottom: 1px solid #eee;
}
.blog-entry a {
  text-decoration: none;
}
.blog-entry a:hover {
  text-decoration: underline;
}
.blog-date {
  display: inline;
  color: #6c757d;
  font-size: 0.85rem;
  margin-left: 0.5rem;
  white-space: nowrap;
}
.blog-desc {
  display: block;
  color: #6c757d;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ---- CV embed ------------------------------------------------------------ */
.cv-actions {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cv-frame {
  width: 100%;
  max-width: 900px;
  height: 1150px;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  background: #fff;
}
@media (max-width: 768px) {
  .cv-frame {
    height: 700px;
  }
}

/* ---- Portfolio cards ----------------------------------------------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.portfolio-grid > p {
  /* pandoc wraps the whole card sequence in one <p> since there's no blank
     line to mark it as a raw HTML block - make it invisible to grid layout
     so its <a> children are still direct grid items. */
  display: contents;
}
.portfolio-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}
.portfolio-card:hover {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}
.portfolio-thumb {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.portfolio-thumb-placeholder {
  display: block;
  background: linear-gradient(135deg, #e9ecef, #f8f9fa);
}
.portfolio-card-body {
  display: block;
  padding: 0.75rem 1rem;
}
.portfolio-card-body .meta {
  color: #6c757d;
  font-size: 0.85rem;
}
