/* ============================================
   Styles handled by custom.scss:
   - Font consistency (via $font-family-sans-serif)
   - Navbar sizing (via $navbar-padding-y)
   - Header sizes and spacing (via $h1-font-size etc.)
   ============================================ */

/* ============================================
   Navbar Active Link - Ensure visibility on primary background
   ============================================ */
/* For navbar-dark (used when background: primary in Quarto) */
.navbar-dark .nav-link,
.navbar[class*="primary"] .nav-link,
.navbar.bg-primary .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-dark .nav-link:hover,
.navbar[class*="primary"] .nav-link:hover,
.navbar.bg-primary .nav-link:hover {
  color: #ffffff !important;
}

.navbar-dark .nav-link.active,
.navbar[class*="primary"] .nav-link.active,
.navbar.bg-primary .nav-link.active {
  color: #ffffff !important;
  font-weight: 600;
}

/* Dark theme navbar adjustments */
body.quarto-dark .navbar-dark .nav-link.active,
body.quarto-dark .navbar[class*="primary"] .nav-link.active,
body.quarto-dark .navbar.bg-primary .nav-link.active {
  color: #ffffff !important;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.15) !important;
  border-radius: 0.25rem;
}

body.quarto-dark .navbar-dark .nav-link:hover,
body.quarto-dark .navbar[class*="primary"] .nav-link:hover,
body.quarto-dark .navbar.bg-primary .nav-link:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   Card Components
   ============================================ */
.card {
  background-color: var(--color-bg-card, #ffffff);
  border: 1px solid var(--color-border, #dee2e6);
  border-radius: var(--radius-md, 0.5rem);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
}

.card-header {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-primary, #2c5f7d);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-border, #dee2e6);
}

.card-body {
  line-height: 1.7;
}

.card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border, #dee2e6);
}

/* Research Interest Grid (2x2) */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.research-grid .research-card {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .research-grid {
    grid-template-columns: 1fr;
  }
}

/* Research Interest Cards */
.research-card {
  background: linear-gradient(135deg, rgba(74, 144, 164, 0.15) 0%, rgba(106, 155, 209, 0.15) 100%);
  border-left: 4px solid var(--color-secondary, #4a90a4);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.3s ease;
  border-radius: var(--radius-sm, 0.375rem);
}

.research-card:hover {
  border-left-color: var(--color-primary, #2c5f7d);
}

.research-card h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--color-primary, #2c5f7d);
  font-size: 1.1rem;
}

.research-card p {
  margin-bottom: 0;
  color: var(--color-text-secondary, #6c757d);
  font-size: 0.95rem;
}

/* Highlight Cards */
.highlight-card {
  background: var(--color-bg-card, #ffffff);
  border: 1px solid var(--color-border, #dee2e6);
  border-left: 4px solid var(--color-secondary, #4a90a4);
  border-radius: var(--radius-md, 0.5rem);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
}

.highlight-card:hover {
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
  border-color: var(--color-border, #dee2e6);
  border-left-color: var(--color-primary, #2c5f7d);
}

.highlight-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--color-primary, #2c5f7d);
  font-size: 1.5rem;
}

.highlight-card p {
  margin-bottom: 0;
  line-height: 1.7;
}

/* ============================================
   Smooth Scrolling
   ============================================ */
html {
  scroll-behavior: smooth;
}

/* ============================================
   Focus States for Accessibility
   ============================================ */
a:focus,
button:focus,
.nav-link:focus,
.social-icons a:focus {
  outline: 2px solid var(--color-primary, #2c5f7d);
  outline-offset: 2px;
  border-radius: var(--radius-sm, 0.375rem);
}

/* ============================================
   DOI/PDF/Download Badges
   ============================================ */
.badge {
  display: inline-block;
  padding: 0.35em 0.7em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--radius-sm, 0.375rem);
  margin-left: 0.5em;
  text-decoration: none !important;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
}

.badge-doi {
  background-color: var(--color-primary, #2c5f7d);
  color: white !important;
}

.badge-doi:hover {
  background-color: var(--color-accent, #6b9bd1);
  color: white !important;
}

.badge-pdf {
  background-color: #dc3545;
  color: white !important;
}

.badge-pdf:hover {
  background-color: #c82333;
  color: white !important;
}

.badge-download {
  background-color: var(--color-text-secondary, #6c757d);
  color: white !important;
}

.badge-download:hover {
  background-color: var(--color-primary, #2c5f7d);
  color: white !important;
}

.badge-cran {
  background-color: var(--color-success, #5a9);
  color: white !important;
}

.badge-cran:hover {
  background-color: #4a8;
  color: white !important;
}

.badge-github {
  background-color: #333;
  color: white !important;
}

.badge-github:hover {
  background-color: #24292e;
  color: white !important;
}

.badge-slides {
  background-color: #fd7e14;
  color: white !important;
}

.badge-slides:hover {
  background-color: #e96b00;
  color: white !important;
}

.badge-info {
  background-color: var(--color-secondary, #4a90a4);
  color: white !important;
}

.badge-info:hover {
  background-color: var(--color-primary, #2c5f7d);
  color: white !important;
}

/* ============================================
   Page subtitle (tagline below title)
   ============================================ */
.quarto-title .subtitle,
header.quarto-title-block .subtitle {
  font-size: 1.25rem;
  color: var(--color-secondary, #4a90a4);
  font-weight: 400;
  font-style: italic;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

/* ============================================
   Two-column Hero (photo left, info right)
   ============================================ */
.hero-flex {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 1.5rem 0 2.5rem 0;
}

.hero-flex .profile-image {
  margin: 0;
  flex-shrink: 0;
  width: 180px;
  height: 180px;
}

.hero-content {
  flex-grow: 1;
}

.hero-content .hero-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary, #2c5f7d);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.hero-content .hero-affiliation {
  color: var(--color-text-secondary, #6c757d);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.hero-content p {
  margin-top: 0.75rem;
  margin-bottom: 0;
  line-height: 1.7;
}

@media (max-width: 700px) {
  .hero-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .hero-flex .profile-image {
    width: 150px;
    height: 150px;
  }
}

/* ============================================
   Featured Software Cards (front page)
   ============================================ */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.featured-card {
  background: var(--color-bg-card, #ffffff);
  border: 1px solid var(--color-border, #dee2e6);
  border-left: 4px solid var(--color-secondary, #4a90a4);
  border-radius: var(--radius-md, 0.5rem);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
  border-left-color: var(--color-primary, #2c5f7d);
}

.featured-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.featured-card h3 a {
  color: var(--color-primary, #2c5f7d);
}

.featured-card p {
  flex-grow: 1;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-secondary, #6c757d);
}

.featured-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
}

.featured-card-footer .badge {
  margin-left: 0;
}

@media (max-width: 800px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
  border: 4px solid var(--color-bg-card, #ffffff);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.profile-image:hover {
  box-shadow: var(--shadow-lg, 0 10px 15px rgba(0, 0, 0, 0.1));
  transform: scale(1.02);
  border-color: var(--color-primary, #2c5f7d);
}

/* ============================================
   Social Media Icons
   ============================================ */
.social-icons {
  display: flex;
  gap: 1.5rem;
  font-size: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
  justify-content: center;
}

.social-icons a {
  color: var(--color-text-secondary, #6c757d);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--color-bg-light, #f8f9fa);
}

.social-icons a:hover {
  color: var(--color-primary, #2c5f7d);
  background-color: rgba(44, 95, 125, 0.1);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
}

/* ============================================
   Publication Statistics
   ============================================ */
.pub-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(44, 95, 125, 0.05) 0%, rgba(106, 155, 209, 0.05) 100%);
  border-radius: var(--radius-md, 0.5rem);
  border: 1px solid var(--color-border, #dee2e6);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
}

.pub-stat-item {
  flex: 1;
  min-width: 150px;
  text-align: center;
  padding: 1rem;
  background: var(--color-bg-card, #ffffff);
  border-radius: var(--radius-sm, 0.375rem);
  border: 1px solid var(--color-border, #dee2e6);
  transition: all 0.3s ease;
}

.pub-stat-item:hover {
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
  transform: translateY(-2px);
  border-color: var(--color-primary, #2c5f7d);
}

.pub-stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary, #2c5f7d);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.pub-stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text-secondary, #6c757d);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

@media (max-width: 768px) {
  .pub-stats {
    flex-direction: column;
  }
  
  .pub-stat-item {
    min-width: 100%;
  }
  
  .pub-stat-number {
    font-size: 1.75rem;
  }
}

/* ============================================
   Publication Items
   ============================================ */
.publication-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--color-bg-card, #ffffff);
  border: 1px solid var(--color-border, #dee2e6);
  border-radius: var(--radius-md, 0.5rem);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
}

.publication-item:hover {
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
  border-color: var(--color-secondary, #4a90a4);
  transform: translateY(-2px);
}

.publication-item p {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.publication-item:last-child {
  margin-bottom: 0;
}

/* ============================================
   Collapsible Sections (HTML details)
   ============================================ */
details {
  margin: 1.5rem 0;
  border: 1px solid var(--color-border, #dee2e6);
  border-radius: var(--radius-md, 0.5rem);
  padding: 0;
  background-color: var(--color-bg-card, #ffffff);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
}

details:hover {
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
  border-color: var(--color-secondary, #4a90a4);
}

details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1em;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(44, 95, 125, 0.05) 0%, rgba(106, 155, 209, 0.05) 100%);
  border-radius: var(--radius-md, 0.5rem) var(--radius-md, 0.5rem) 0 0;
  transition: all 0.3s ease;
  list-style: none;
  color: var(--color-primary, #2c5f7d);
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: "▶ ";
  display: inline-block;
  transition: transform 0.3s ease;
  margin-right: 0.5rem;
  color: var(--color-primary, #2c5f7d);
}

details[open] summary::before {
  transform: rotate(90deg);
}

details summary:hover {
  background: linear-gradient(135deg, rgba(44, 95, 125, 0.1) 0%, rgba(106, 155, 209, 0.1) 100%);
  color: var(--color-primary, #2c5f7d);
}

details[open] summary {
  border-bottom: 1px solid var(--color-border, #dee2e6);
  margin-bottom: 0;
}

details>*:not(summary) {
  padding: 1.5rem;
}

details table {
  margin-top: 0.5rem;
}

/* ============================================
   Code Blocks
   ============================================ */
pre.sourceCode {
  border-radius: var(--radius-md, 0.5rem);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
  border: 1px solid var(--color-border, #dee2e6);
}

/* ============================================
   Buttons - Consistent sizing across light/dark themes
   ============================================ */
.btn,
a.btn,
button.btn,
body.quarto-dark .btn,
body.quarto-dark a.btn,
body.quarto-dark button.btn {
  display: inline-block;
  padding: 0.375rem 0.75rem !important;  /* Use rem for consistent sizing */
  border-radius: var(--radius-md, 0.5rem) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 1rem !important;  /* Explicit font-size */
  line-height: 1.5 !important;
  transition: all 0.3s ease;
  border: none !important;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
  box-sizing: border-box;
}

.btn:hover,
a.btn:hover,
button.btn:hover,
body.quarto-dark .btn:hover,
body.quarto-dark a.btn:hover,
body.quarto-dark button.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
}

.btn-primary,
a.btn-primary,
button.btn-primary,
body.quarto-dark .btn-primary,
body.quarto-dark a.btn-primary,
body.quarto-dark button.btn-primary {
  background-color: var(--color-primary, #2c5f7d) !important;
  color: white !important;
}

.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover,
body.quarto-dark .btn-primary:hover,
body.quarto-dark a.btn-primary:hover,
body.quarto-dark button.btn-primary:hover {
  background-color: var(--color-accent, #6b9bd1) !important;
  color: white !important;
}

/* ============================================
   Tables
   ============================================ */
table.nicetable {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  border-radius: var(--radius-md, 0.5rem);
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
  border: 1px solid var(--color-border, #dee2e6);
}

table.nicetable tr:nth-child(even) {
  background: var(--color-bg-light, #f8f9fa);
}

table.nicetable tr:hover {
  background-color: rgba(44, 95, 125, 0.05);
  transition: background-color 0.2s ease;
}

table.nicetable th {
  background: linear-gradient(135deg, var(--color-primary, #2c5f7d) 0%, var(--color-secondary, #4a90a4) 100%);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

table.nicetable td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border, #dee2e6);
}

/* ============================================
   Package/Project Cards - GitHub card style grid
   ============================================ */
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.package-item {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  background: var(--color-bg-card, #ffffff);
  border: 1px solid var(--color-border, #dee2e6);
  border-radius: var(--radius-md, 0.5rem);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease;
  min-height: 140px;
}

.package-item:hover {
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.1));
  border-color: var(--color-secondary, #4a90a4);
  transform: translateY(-2px);
}

.package-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary, #2c5f7d);
}

.package-item-name a {
  color: var(--color-primary, #2c5f7d);
}

.package-item-desc {
  font-size: 0.85rem;
  color: var(--color-text-secondary, #6c757d);
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 0.75rem;
}

.package-item-footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.package-item-footer .badge {
  margin-left: 0;
  font-size: 0.7em;
}

.package-item-footer .btn {
  font-size: 0.75rem !important;
  padding: 0.2rem 0.5rem !important;
}

@media (max-width: 600px) {
  .package-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Presentations Page Formatting
   ============================================ */
/* Add visual separator between conferences within the same year */
/* Target paragraphs starting with bold text (conference names), except the first one */
#selected-conference-contributions .level2>p:has(> strong:first-child):not(:first-of-type) {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px dashed var(--color-border, #dee2e6);
}

/* Dark theme adjustments */
body.quarto-dark #selected-conference-contributions .level2>p:has(> strong:first-child):not(:first-of-type) {
  border-top-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Work Experience & Education Tables
   ============================================ */
/* Set first column (dates) to 25% width so they don't wrap */
/* Override Quarto's inline colgroup styles */
details table colgroup col:first-child {
  width: 25% !important;
}

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

/* ============================================
   Footer Enhancement
   ============================================ */
.page-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border, #dee2e6);
  background-color: var(--color-bg-light, #f8f9fa);
  text-align: center;
  color: var(--color-text-secondary, #6c757d);
  font-size: 0.9rem;
}

.page-footer p {
  margin-bottom: 0.5rem;
}

/* Dark mode adjustments */
body.quarto-dark {
  --color-primary: #88b8d4;
  --color-secondary: #6abfc8;
  --color-accent: #a8d4e8;
  --color-bg-card: rgba(255, 255, 255, 0.05);
  --color-bg-light: rgba(255, 255, 255, 0.03);
  --color-border: rgba(255, 255, 255, 0.12);
  --color-text-primary: rgba(255, 255, 255, 0.9);
  --color-text-secondary: rgba(255, 255, 255, 0.65);
  --color-text-muted: rgba(255, 255, 255, 0.5);
}

body.quarto-dark .page-footer {
  background-color: rgba(255, 255, 255, 0.05);
  border-top-color: rgba(255, 255, 255, 0.1);
}

body.quarto-dark .card,
body.quarto-dark .highlight-card,
body.quarto-dark .research-card,
body.quarto-dark .publication-item,
body.quarto-dark .package-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

body.quarto-dark .pub-stats {
  background: linear-gradient(135deg, rgba(44, 95, 125, 0.15) 0%, rgba(106, 155, 209, 0.15) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

body.quarto-dark .pub-stat-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

body.quarto-dark .social-icons a {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

body.quarto-dark .social-icons a:hover {
  background-color: rgba(44, 95, 125, 0.3);
  color: var(--color-accent, #6b9bd1);
}

/* ============================================
   Link Styling
   ============================================ */
a {
  color: var(--color-primary, #2c5f7d);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-accent, #6b9bd1);
  text-decoration: underline;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
  .social-icons {
    font-size: 1.5rem;
    gap: 1rem;
  }

  details summary {
    font-size: 1em;
    padding: 1rem;
  }
  
  .card,
  .highlight-card,
  .research-card {
    padding: 1.25rem;
  }
  
  .pub-stats {
    flex-direction: column;
  }
  
  .pub-stat-item {
    min-width: 100%;
  }
}

/* ============================================
   Blog listing — compact grid cards
   ============================================ */

/* outer card element has all four classes on the same div */
.quarto-grid-item.card.h-100.card-left {
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius-md, 0.5rem);
  padding: 0 !important;
}

/* hide image placeholder */
.quarto-grid-item.card.h-100.card-left .card-img-top,
.quarto-grid-item.card.h-100.card-left .thumbnail-image,
.quarto-grid-item.card.h-100.card-left .listing-item-img-placeholder {
  display: none;
}

.quarto-grid-item.card.h-100.card-left .card-body {
  padding: 0.5rem 1rem 0.75rem 1rem;
}

.quarto-grid-item.card.h-100.card-left .card-title,
.quarto-grid-item.card.h-100.card-left h5 {
  margin-top: 0 !important;
  margin-bottom: 0.25rem;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--color-primary, #2c5f7d) !important;
}

.quarto-grid-item.card.h-100.card-left .card-title a,
.quarto-grid-item.card.h-100.card-left h5 a {
  color: var(--color-primary, #2c5f7d) !important;
  text-decoration: none;
}

.quarto-grid-item.card.h-100.card-left .listing-date,
.quarto-grid-item.card.h-100.card-left .listing-categories,
.quarto-grid-item.card.h-100.card-left .listing-description {
  font-size: 0.8rem;
}

.quarto-grid-item.card.h-100.card-left .listing-description {
  color: var(--color-text-muted, #6c757d);
  margin-bottom: 0.25rem;
}

.quarto-grid-item.card.h-100.card-left .listing-description p {
  margin: 0;
}

.quarto-grid-item.card.h-100.card-left .card-attribution.card-text-small.end {
  padding: 0 !important;
}

.quarto-grid-item.card.h-100.card-left .listing-categories .listing-category {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  background: var(--color-bg-light, #f0f4f8);
  color: var(--color-secondary, #4a90a4);
  border: 1px solid var(--color-border, #d0dde4);
  margin-right: 0.25rem;
  display: inline-block;
}