/* ========================================================================== */
/* Global layout                                                              */
/* ========================================================================== */

#quarto-content {
  max-width: 100% !important;
}


/* ========================================================================== */
/* Blog listing cards                                                         */
/* ========================================================================== */

/* Listing card container */
.quarto-listing-default .quarto-post {
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

/* Hover affordance: make the row feel clickable */
.quarto-listing-default .quarto-post:hover {
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.035);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

/* Dark-mode hover affordance */
@media (prefers-color-scheme: dark) {
  .quarto-listing-default .quarto-post:hover {
    background-color: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  }
}

/* Widen the text body inside each post listing */
.quarto-post .body {
  max-width: 55rem;
  width: 100%;
}


/* ========================================================================== */
/* Blog listing typography                                                    */
/* ========================================================================== */

/* Post title */
.quarto-post .listing-title {
  margin-bottom: 0.4rem;
  font-size: 1.35rem;
  line-height: 1.2;
}


/* Keep listing titles on one line on desktop, but allow wrapping on mobile */
@media (min-width: 768px) {
  .quarto-post .listing-title,
  .quarto-post .listing-title a {
    white-space: nowrap;
  }
}


/* Category pills */
.quarto-post .listing-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
  margin-bottom: 0.65rem;
}

.quarto-post .listing-category {
  display: inline-block;
  line-height: 1.2;
}

/* Listing call-to-action */
.quarto-listing-default .listing-description::after {
  content: " Read post →";
  color: var(--category-color);
  font-weight: 600;
  white-space: nowrap;
}

.quarto-listing-default .quarto-post:hover .listing-description::after {
  text-decoration: underline;
}


/* ========================================================================== */
/* Appendix and footnotes                                                     */
/* ========================================================================== */

#quarto-appendix.default {
  background-color: transparent !important;
  padding-top: 0.5em;
}

.footnotes {
  background-color: transparent !important;
  padding: 0.5rem;
  border-radius: 8px;
}


/* ========================================================================== */
/* Figures and tooltips                                                       */
/* ========================================================================== */

.tippy-box .quarto-figure {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

.tippy-box img {
  display: block !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

figcaption {
  text-align: center;
}


/* ========================================================================== */
/* Code block language labels                                                 */
/* ========================================================================== */

pre > code::before {
  display: block;
  margin-bottom: 5px;
  padding-left: 5px;
  font-size: 0.75em;
  font-weight: bold;
}

pre > code.bash::before { content: "Bash"; }
pre > code.json::before { content: "JSON"; }
pre > code.julia::before { content: "Julia"; }
pre > code.markdown::before { content: "Markdown"; }
pre > code.matlab::before { content: "MATLAB"; }
pre > code.python::before { content: "Python"; }
pre > code.r::before { content: "R"; }
pre > code.sql::before { content: "SQL"; }
pre > code.stata::before { content: "Stata"; }
pre > code.yaml::before { content: "YAML"; }