/* ---------- Navbar ---------- */
.navbar-brand img,
.navbar-logo {
  max-height: 44px;
  width: auto;
}
/* ---------- Headings: Times italic ---------- */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.title, .quarto-title .title, .about-entity h1, .listing-title,
.navbar-title {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 400;
}
.navbar-title { font-size: 1.35rem; }

/* ---------- CV layout: date column + entry ---------- */
.cv-entry {
  display: grid;
  grid-template-columns: 9rem 1fr;
  column-gap: 1.25rem;
  margin-bottom: 0.9rem;
}
.cv-entry > .cv-when {
  color: var(--bs-secondary-color, #6c757d);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.cv-entry > .cv-what p { margin-bottom: 0.15rem; }
.cv-entry > .cv-what ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }
.cv-entry > .cv-what li {
  font-size: 0.92em;
  color: var(--bs-secondary-color, #6c757d);
  margin-bottom: 0.1rem;
}

@media (max-width: 575px) {
  .cv-entry { grid-template-columns: 1fr; }
  .cv-entry > .cv-when { text-align: left; font-weight: 600; }
}

/* ---------- Photo gallery (masonry via CSS columns) ---------- */
.photo-grid {
  columns: 2 20rem;   /* up to 2 columns, each at least 20rem wide */
  column-gap: 0.6rem;
  margin: 0.75rem 0 2rem;
}
.photo-grid .photo {
  position: relative;
  display: block;
  break-inside: avoid;
  margin-bottom: 0.6rem;
  border-radius: 0.35rem;
  overflow: hidden;
  background: var(--bs-secondary-bg, #e9e2de);
}
.photo-grid .photo img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.photo-grid .photo-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 0.8rem 0.6rem;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.3;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
@media (hover: hover) {
  .photo-grid .photo:hover img { transform: scale(1.03); }
  .photo-grid .photo:hover .photo-caption,
  .photo-grid .photo:focus-visible .photo-caption { opacity: 1; }
}
.photo-grid .photo:focus-visible { outline: 3px solid var(--bs-primary); outline-offset: 2px; }


/* Photos page: line titles and headings up with the wide gallery */
.photos-page #title-block-header,
.photos-page section.level2 > h2 {
  grid-column: screen-start-inset / screen-end-inset;
}

/* Home page subtitle uses the body text colour */
.about-entity .subtitle,
.quarto-title .subtitle { color: var(--bs-body-color); }

/* Home page: name on two lines */
.about-entity .about-contents h1.title,
.about-entity h1.title { max-width: min-content; margin-inline: auto; }

/* CV section headings: small moon (the favicon) before and after the text */
.cv-page main h2::before,
.cv-page main h2::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.7em;
  margin: 0 0.45em;
  vertical-align: 0.05em;
  background-color: var(--cv-mark, currentColor);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20384%20512%22%3E%3Cpath%20d%3D%22M144.7%2098.7c-21%2034.1-33.1%2074.3-33.1%20117.3c0%2098%2062.8%20181.4%20150.4%20211.7c-12.4%202.8-25.3%204.3-38.6%204.3C126.6%20432%2048%20353.3%2048%20256c0-68.9%2039.4-128.4%2096.8-157.3zm62.1-66C91.1%2041.2%200%20137.9%200%20256C0%20379.7%20100%20480%20223.5%20480c47.8%200%2092-15%20128.4-40.6c1.9-1.3%203.7-2.7%205.5-4c4.8-3.6%209.4-7.4%2013.9-11.4c2.7-2.4%205.3-4.8%207.9-7.3c5-4.9%206.3-12.5%203.1-18.7s-10.1-9.7-17-8.5c-3.7%20.6-7.4%201.2-11.1%201.6c-5%20.5-10.1%20.9-15.3%201c-1.2%200-2.5%200-3.7%200l-.3%200c-96.8-.2-175.2-78.9-175.2-176c0-54.8%2024.9-103.7%2064.1-136c1-.9%202.1-1.7%203.2-2.6c4-3.2%208.2-6.2%2012.5-9c3.1-2%206.3-4%209.6-5.8c6.1-3.5%209.2-10.5%207.7-17.3s-7.3-11.9-14.3-12.5c-3.6-.3-7.1-.5-10.7-.6c-2.7-.1-5.5-.1-8.2-.1c-3.3%200-6.5%20.1-9.8%20.2c-2.3%20.1-4.6%20.2-6.9%20.4z%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20384%20512%22%3E%3Cpath%20d%3D%22M144.7%2098.7c-21%2034.1-33.1%2074.3-33.1%20117.3c0%2098%2062.8%20181.4%20150.4%20211.7c-12.4%202.8-25.3%204.3-38.6%204.3C126.6%20432%2048%20353.3%2048%20256c0-68.9%2039.4-128.4%2096.8-157.3zm62.1-66C91.1%2041.2%200%20137.9%200%20256C0%20379.7%20100%20480%20223.5%20480c47.8%200%2092-15%20128.4-40.6c1.9-1.3%203.7-2.7%205.5-4c4.8-3.6%209.4-7.4%2013.9-11.4c2.7-2.4%205.3-4.8%207.9-7.3c5-4.9%206.3-12.5%203.1-18.7s-10.1-9.7-17-8.5c-3.7%20.6-7.4%201.2-11.1%201.6c-5%20.5-10.1%20.9-15.3%201c-1.2%200-2.5%200-3.7%200l-.3%200c-96.8-.2-175.2-78.9-175.2-176c0-54.8%2024.9-103.7%2064.1-136c1-.9%202.1-1.7%203.2-2.6c4-3.2%208.2-6.2%2012.5-9c3.1-2%206.3-4%209.6-5.8c6.1-3.5%209.2-10.5%207.7-17.3s-7.3-11.9-14.3-12.5c-3.6-.3-7.1-.5-10.7-.6c-2.7-.1-5.5-.1-8.2-.1c-3.3%200-6.5%20.1-9.8%20.2c-2.3%20.1-4.6%20.2-6.9%20.4z%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
}
.cv-page main h2::before { margin-left: 0; }
/* the hover "link to heading" icon would sit between the text and the second moon */
.cv-page main h2 .anchorjs-link { display: none; }
