body, p {
  text-align: justify;
  hyphens: auto;
}

/* For Jupyter and nbconvert, sometimes table cells need extra specificity: */
table, thead, tbody, tr, td, th {
  text-align: left !important;
  hyphens: auto;
}

.sidebar {
  text-align: left !important;
  hyphens: auto;
}

img {
  max-width: 100%;
  height: auto;
  margin: auto;
  display: block;
  margin-top: 1.5rem;
  margin-bottom: 1.0rem;
  padding-bottom: 0.5rem;
  filter: brightness(96%);
}

.cell-output-display img,
.cell-output img {
  margin-top: 0rem;
  margin-bottom: 1.25rem;
  display: block;
  border-radius: 4px;
}

.cell-output table {
  margin-bottom: 1.5em;
}

code {
  word-break: break-word;
  hyphens: none;
}

table.dataframe td,
table.dataframe th {
  text-align: left !important;
}

/* WebKit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width:   4px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #e3e3e3;
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #666;
}

#quarto-back-to-top {
  right: 9rem !important;
  left: auto !important;
  bottom: 1.5rem !important;
}

/* Fix Quarto tooltip readability in light mode */
body:not(.quarto-dark) .tippy-box {
  background-color: #fefefe !important;
  border: 1px solid #ccc !important;
  color: #222 !important;
  box-shadow: 0px 2px 8px rgba(0,0,0,0.15);
}

h2 {
  margin-top: 0.75em !important;
}

#title-block-header .description {
  color: #6c757d;
  font-style: italic;
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

/* --- Learning grid listing cards --- */
.quarto-grid-item.card {
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.quarto-grid-item.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.quarto-grid-item .card-img-top {
  margin: 0;
  padding: 0;
  line-height: 0;
}

.quarto-grid-item .card-img-top img.thumbnail-image,
.quarto-grid-item .card-img-top img.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
  margin: 0;
  padding: 0;
  border-radius: 0;
  filter: brightness(100%);
}

.quarto-grid-item .card-body {
  padding: 1rem;
}

.quarto-grid-item .card-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.quarto-grid-item .card-text,
.quarto-grid-item .card-text p,
.quarto-grid-item .listing-description,
.quarto-grid-item .listing-description p {
  text-align: left !important;
  hyphens: none;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #555;
}

/* --- Listing toolbar: fill filter input width --- */
.listing-actions-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.listing-actions-group .quarto-listing-sort {
  order: 2;
  flex-shrink: 0;
  margin-right: 0;
  margin-bottom: 0;
}

.listing-actions-group .quarto-listing-filter {
  order: 1;
  flex: 1 1 auto;
  width: auto !important;
  margin-left: 0;
  margin-bottom: 0;
}

.listing-actions-group .quarto-listing-filter input.form-control {
  min-width: 0;
}

/* --- Listing table header consistency --- */
.quarto-listing thead th a.sort {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.quarto-listing thead th a.sort:hover {
  color: #E95420;
  text-decoration: none;
}

/* --- Active filter pills: orange accent --- */
.quarto-listing-category-title {
  margin-top: 10px;
}

.quarto-listing-category .category {
  font-size: 0.88em;
}

.quarto-listing-category .category.active {
  color: #E95420;
  font-weight: 600;
}

.df-year-pill {
  font-size: 0.88em;
}

.df-months .df-month-pill {
  font-size: 0.78em;
}

.df-month-pill.df-active {
  color: #E95420;
  font-weight: 600;
}

/* --- Date filter pills (injected by date-pills.lua) --- */
.df-container {
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.df-title {
  cursor: default;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.df-year-section {
  margin-bottom: 0.15rem;
}

.df-year-pill {
  cursor: pointer;
  padding: 0.1rem 0;
  transition: color 0.1s ease;
}

.df-year-pill:hover {
  color: var(--bs-body-color);
}

.df-year-pill .df-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 0.75em;
  margin-right: 0.15em;
}

.df-year-section.df-expanded .df-year-pill .df-chevron {
  transform: rotate(90deg);
}

.df-months {
  display: none;
  padding-left: 1.25rem;
}

.df-year-section.df-expanded .df-months {
  display: block;
}

.df-month-pill {
  cursor: pointer;
  padding: 0.1rem 0;
  font-size: 0.95em;
  transition: color 0.1s ease;
}

.df-month-pill:hover:not(.df-active) {
  color: var(--bs-body-color);
}

/* --- Resume hero banner --- */
.resume-hero {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  background: linear-gradient(135deg, #fdfdfd 0%, #f4f4f4 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.03);
}

.resume-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(
    circle at 73% 20%,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.55) 35%,
    rgba(0, 0, 0, 0) 70%
  );
  mask-image: radial-gradient(
    circle at 73% 20%,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.55) 35%,
    rgba(0, 0, 0, 0) 70%
  );
}

.resume-hero-content {
  position: relative;
  z-index: 1;
}

.resume-hero-content h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.resume-hero-content p:last-child {
  margin-bottom: 0;
}

.resume-hero canvas {
  display: block;
}