body {
  line-height: 1.6;
}

:root {
  --site-content-width: min(1100px, 88vw);
  --site-content-width-mobile: 94vw;
}

/* Keep navbar and page content aligned to the same width */
#quarto-header .navbar-container,
#quarto-content main.content {
  width: var(--site-content-width);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

#quarto-content.quarto-container {
  width: 100%;
  max-width: none;
}

@media (max-width: 768px) {
  #quarto-header .navbar-container,
  #quarto-content main.content {
    width: var(--site-content-width-mobile);
  }
}

.navbar-brand {
  font-weight: 800;
}

.navbar-brand,
.navbar-brand:link,
.navbar-brand:visited,
.navbar-brand:hover,
.navbar-brand:focus,
.navbar-brand:active {
  color: #111 !important;
}

body.quarto-dark .navbar-brand,
body.quarto-dark .navbar-brand:link,
body.quarto-dark .navbar-brand:visited,
body.quarto-dark .navbar-brand:hover,
body.quarto-dark .navbar-brand:focus,
body.quarto-dark .navbar-brand:active {
  color: #f3f7fb !important;
}

h1, h2, h3, h4 {
  margin-top: 1rem;
}

/* Reduce vertical gap before bullet lists */
p:has(+ ul),
p:has(+ ol) {
  margin-bottom: 0.3rem;
}

/* Reduce left indent before bullet marker */
ul, ol {
  padding-left: 1rem;
}


.home-page h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
  margin-left: 0;
  color: #111;
}

/* Center the intro block (name + photo + basic info) as a unit */
.home-page .intro-block {
  width: min(1100px, 100%);
  max-width: 100%;
  margin: 0 auto;
}

.home-page .intro-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  column-gap: clamp(1rem, 2vw, 1.6rem);
  align-items: start;
}

.home-page .intro-name {
  margin: 0 0 0.5rem 0;
  font-size: clamp(1rem, 2.5vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 750;
  color: #111;
  text-align: left;
}

.home-page .intro-name a,
.home-page .intro-name a:link,
.home-page .intro-name a:visited,
.home-page .intro-name a:hover,
.home-page .intro-name a:focus,
.home-page .intro-name a:active {
  color: #111 !important;
  font-weight: 900 !important;
  text-decoration: none;
}

.home-page .intro-left {
  width: fit-content;
  max-width: 100%;
  justify-self: center;
  display: block;
}

.home-page .intro-right {
  width: 100%;
  justify-self: start;
  text-align: left;
  align-self: start;
}

.home-page .intro-extra {
  width: 100%;
  justify-self: start;
  text-align: left;
  align-self: start;
}

.home-page .intro-right ul,
.home-page .intro-right ol,
.home-page .intro-extra ul,
.home-page .intro-extra ol {
  margin: 0;
  padding-left: 1.2rem;
  list-style-position: outside;
  text-align: left;
}

.home-page .intro-right li,
.home-page .intro-extra li {
  text-align: left;
}

.home-page .intro-left img {
  width: auto !important;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.home-page .intro-left .intro-name {
  width: auto;
  text-align: left;
}

.home-page .intro-left p {
  margin: 0;
  width: fit-content;
  height: auto;
  overflow: visible;
}

@media (max-width: 900px) {
  .home-page .intro-block {
    width: 100%;
    max-width: 520px;
  }

  .home-page .intro-row {
    grid-template-columns: 1fr;
    width: 100%;
    row-gap: 1rem;
    align-items: center;
  }

  .home-page .intro-left {
    width: min(280px, 100%) !important;
    justify-self: center;
    display: block;
  }

  .home-page .intro-right {
    justify-self: stretch;
  }

  .home-page .intro-extra {
    justify-self: stretch;
  }

  .home-page .intro-left p {
    width: 100%;
    height: auto;
  }

  .home-page .intro-left img {
    width: 100% !important;
    height: auto;
    object-fit: contain;
  }

  .home-page .intro-name {
    font-size: clamp(2.2rem, 8vw, 2.8rem);
  }
}

.home-page h1 a {
  color: inherit !important;
  text-decoration: none;
  font-weight: inherit;
  letter-spacing: inherit;
}

.home-page h1 a:link,
.home-page h1 a:visited,
.home-page h1 a:hover,
.home-page h1 a:focus,
.home-page h1 a:active {
  color: #111 !important;
}

.home-page a.name-link:link,
.home-page a.name-link:visited,
.home-page a.name-link:hover,
.home-page a.name-link:focus,
.home-page a.name-link:active {
  color: #111 !important;
  font-weight: 900;
}

.home-page h1 a:hover,
.home-page h1 a:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-page h1 + p,
.home-page h1 + ul,
.home-page h1 + ol,
.home-page h1 + blockquote,
.home-page h1 + div {
  margin-left: 0;
}

.home-page ul {
  margin-left: 0;
  padding-left: 0;
  list-style-position: inside;
}

.home-page h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-bottom: 2px solid #0973B4;
  padding-bottom: 0.25rem;
  margin-top: 1.5rem;
  margin-left: 0;
}

.home-page h2 + p,
.home-page h2 + ul,
.home-page h2 + ol,
.home-page h2 + blockquote,
.home-page h2 + div {
  margin-left: 0;
}

.home-page h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0973B4;
  margin-top: 1rem;
  margin-left: 0;
}

.home-page h3 + p,
.home-page h3 + ul,
.home-page h3 + ol,
.home-page h3 + blockquote,
.home-page h3 + div {
  margin-left: 0;
}

.home-page h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0973B4;
  margin-top: 0.8rem;
  margin-left: 0;
  position: relative;
  padding-left: 0.9rem;
}

.home-page h4::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: currentColor;
  line-height: 1;
}

.home-page h4 + p,
.home-page h4 + ul,
.home-page h4 + ol,
.home-page h4 + blockquote,
.home-page h4 + div {
  margin-left: 1rem;
}

.home-page .h4-text-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0973B4;
  margin: 0 0 0.35rem 0;
  line-height: 1.2;
  position: relative;
  padding-left: 0.9rem;
}

.home-page .h4-text-title::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: currentColor;
  line-height: 1;
}

.home-page .h4-text-title + p {
  margin-top: 0;
}

.home-page .h4-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 140px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #4d6d82;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  padding: 0.5rem;
  overflow: hidden;
}

.home-page .h4-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.home-page .h4-card {
  border: 1px solid #7ea9c7;
  border-radius: 10px;
  padding: 0.75rem;
  background: #f3f4f6;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-page .h4-card .h4-image-placeholder {
  margin-top: 0.75rem;
  min-height: 160px;
  background: #fff;
}

body.quarto-dark .home-page h3,
body.quarto-dark .home-page h4,
body.quarto-dark .home-page .h4-text-title {
  color: #8ecaf0;
}

body.quarto-dark .home-page h2 {
  border-bottom-color: #8ecaf0;
}

body.quarto-dark .home-page .h4-card {
  border-color: #5f7f95;
  background: #222831;
  color: #f3f7fb;
}

body.quarto-dark .home-page .h4-card p {
  color: inherit;
}

body.quarto-dark .home-page .h4-card .h4-image-placeholder {
  background: #fff;
  color: #1f2933;
}

.home-page .h4-two-column {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 25%;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 0.8rem;
}

.home-page .h4-two-column > .column {
  width: 100% !important;
  margin: 0;
}

.home-page .h4-two-column > .column:last-child {
  display: flex;
}

.home-page .h4-two-column > .column:last-child .h4-image-placeholder {
  flex: 1 1 auto;
}

.home-page .h4-image-placeholder p,
.home-page .h4-image-placeholder figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  float: none !important;
}

.home-page .h4-image-placeholder img,
.home-page .h4-image-placeholder p > img,
.home-page .h4-image-placeholder figure img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.home-page .h4-two-column .column > :last-child {
  margin-bottom: 0;
}

.home-page .h4-two-column:last-of-type {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .home-page .h4-card-grid {
    grid-template-columns: 1fr;
  }

  .home-page .h4-two-column {
    grid-template-columns: 1fr;
  }
}

.home-page h1 + *,
.home-page h2 + *,
.home-page h3 + *,
.home-page h4 + * 
{
  margin-left: inherit;
}

.quarto-title-banner {
  margin-bottom: 1rem;
}

img {
  border-radius: 10px;
}

.pub-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  align-items: center;
}

.pub-controls input,
.pub-controls select {
  padding: 0.45rem 0.6rem;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 0.95rem;
}

body.quarto-dark .pub-controls input,
body.quarto-dark .pub-controls select {
  border-color: #5f7f95;
  background-color: #222831;
  color: #f3f7fb;
}

body.quarto-dark .pub-controls input::placeholder {
  color: #b7c5d0;
  opacity: 1;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.image-box {
  width: 100%;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  display: flex;
}

.image-box figure,
.image-box .image-figure {
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.image-box p {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-box img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  background: #fff;
  box-sizing: border-box;
  padding: 0.5rem;
}

.image-box figcaption {
  text-align: center;
  font-size: 1rem;
  margin-top: 0.2rem;
}

.image-box figcaption .caption-description {
  color: #2f3a42;
  font-weight: 900;
}

.image-box figcaption .caption-link {
  color: #0973B4;
  font-weight: 900;
}

.image-box figcaption a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.quarto-dark .image-box figcaption .caption-description {
  color: #d7e1e8;
}

body.quarto-dark .image-box figcaption .caption-link {
  color: #8ecaf0;
}

.photo-page {
  --photo-ink: #111;
  --photo-muted: #5f6368;
  --photo-panel: #f5f5f7;
  --photo-panel-deep: #e8e8ed;
  color: var(--photo-ink);
  padding: 2rem 0 3rem;
  overflow: hidden;
}

.photo-carousel {
  position: relative;
  width: 100%;
}

.photo-viewport {
  overflow: hidden;
  width: 100%;
  transition: height 360ms ease;
}

.photo-track {
  display: flex;
  align-items: center;
  gap: 16px;
  will-change: transform;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-card {
  position: relative;
  flex: 0 0 min(68%, 720px);
  width: min(68%, 720px);
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.12)),
    linear-gradient(145deg, #f4f4f6 0%, #d9dde5 50%, #c9d3df 100%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
}

.photo-card img {
  width: 100%;
  height: min(430px, calc(100vh - 12rem));
  display: block;
  object-fit: contain;
  object-position: center;
  background: var(--photo-panel);
  border-radius: 0;
}

.photo-card figcaption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: #111;
  font-weight: 700;
  line-height: 1.25;
  backdrop-filter: blur(18px);
}

.photo-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #111;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.photo-nav:hover,
.photo-nav:focus {
  background: rgba(255, 255, 255, 0.9);
}

.photo-nav-prev {
  left: 1rem;
}

.photo-nav-next {
  right: 1rem;
}

.photo-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.photo-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.25);
  padding: 0;
  cursor: pointer;
}

.photo-dot.is-active {
  background: rgba(17, 17, 17, 0.85);
}

body.quarto-dark .photo-page {
  --photo-ink: #f5f5f7;
  --photo-muted: #b9bec7;
  --photo-panel: #1d1d1f;
  --photo-panel-deep: #2a2a2d;
}

body.quarto-dark .photo-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #252529 0%, #353a45 50%, #4a5665 100%);
}

body.quarto-dark .photo-viewport {
  box-shadow: none;
}

body.quarto-dark .photo-card figcaption {
  background: rgba(29, 29, 31, 0.68);
  color: #f5f5f7;
}

body.quarto-dark .photo-nav {
  background: rgba(29, 29, 31, 0.7);
  color: #f5f5f7;
}

body.quarto-dark .photo-nav:hover,
body.quarto-dark .photo-nav:focus {
  background: rgba(29, 29, 31, 0.9);
}

body.quarto-dark .photo-dot {
  background: rgba(245, 245, 247, 0.25);
}

body.quarto-dark .photo-dot.is-active {
  background: rgba(245, 245, 247, 0.9);
}

@media (max-width: 900px) {
  .photo-page {
    padding-top: 1.25rem;
  }

  .photo-card {
    flex-basis: 82%;
    width: 82%;
  }
}

@media (max-width: 640px) {
  .photo-card img {
    height: min(340px, calc(100vh - 10rem));
  }

  .photo-nav {
    width: 38px;
    height: 38px;
    font-size: 1.7rem;
  }
}

/* Responsive inline SVG container */
.svg-responsive img {
  width: 100%;
  height: auto;
  display: block;
}

/* Overlay clickable references on top of the SVG */
.svg-overlay {
  position: relative;
  width: 100%;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.svg-overlay p {
  margin: 0;
}

.svg-overlay p > img {
  width: 100%;
  height: auto;
  display: block;
}

.svg-overlay .svg-ref {
  position: absolute;
  display: inline-block;
  padding: 0 1px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(7px, 3vw, 11px);
  color: #549AD1;
  text-decoration: none;
  background: rgba(229, 233, 240, 0.75);
  border-radius: 2px;
  line-height: 1;
  white-space: nowrap;
}

/* Ye2023 reference position */
.svg-overlay .svg-ref-1 {
  left: 63%;
  top: 93%;
}

/* TODO: set positions for additional refs */
.svg-overlay .svg-ref-2 {
  left: 60%;
  top: 82%;
}

.svg-overlay .svg-ref-3 {
  left: 63%;
  top: 82%;
}

.svg-overlay .svg-ref-4 {
  left: 66%;
  top: 82%;
}

.svg-overlay .svg-ref-5 {
  left: 57%;
  top: 71.5%;
}

.svg-overlay .svg-ref-6 {
  left: 59.5%;
  top: 71.5%;
}

.svg-overlay .svg-ref-7 {
  left: 62.5%;
  top: 71.5%;
}

.svg-overlay .svg-ref-9 {
  left: 54.5%;
  top: 60.5%;
}

.svg-overlay .svg-ref-10 {
  left: 57%;
  top: 60.5%;
}

.svg-overlay .svg-ref-8 {
  left: 52.5%;
  top: 50%;
}

.svg-overlay .svg-ref-11 {
  left: 55%;
  top: 50%;
}

.svg-overlay .svg-ref-12 {
  left: 57.5%;
  top: 50%;
}

.svg-overlay .svg-ref-13 {
  left: 26%;
  top: 32.5%;
}

.svg-overlay .svg-ref-14 {
  left: 28.5%;
  top: 32.5%;
}

.svg-overlay .svg-ref-15 {
  left: 31%;
  top: 32.5%;
}

@media (max-width: 768px) {
  .svg-overlay .svg-ref {
    padding: 0;
    font-size: 6px;
    border-radius: 1px;
    font-weight: 800;
    background: rgba(229, 233, 240, 0.55);
  }
}
