/* 1. Reset and global vars */

/* 2. Base styles (html, body, typography, buttons) */

/* 3. Layout (grid, app, containers) */
/* 3.1 Hero area */
/* 3.2 Main Content */
/* 3.3 Footer */
/* 3.X Media queries */

/* 4. Components (nav, buttons, sections, etc.) */
/* 4.01 Navigation */
/* 4.01.0 Navigation height on narrow screens */
/* 4.01.1 Navigation Ultra-wide Layout ≥ 1600px */
/* 4.01.2 Navigation Responsive Bottom Nav for Mobile/Tablet Portrait */
/* 4.02 Hero language switcher */
/* 4.03 Main title */
/* 4.04 Profile / Intro-snippet */
/* 4.05 Details / summary intro */
/* 4.06 Details / summary generic */
/* 4.07 Experience infographic */
/* 4.08 Bullet list */
/* 4.09 Pills */
/* 4.10 Section Headings */
/* 4.11 Semantic Lists */
/* 4.12 Footer navigation */
/* 4.13 Donut chart */
/* 4.14 Card + card--alternative */
/* 4.15 Drawer / Modal / Lightbox */
/* 4.15.1 Drawer / offcanvas that slides in from the right */
/* 4.15.2 Modal centered on screen */
/* 4.15.3 Lightbox */
/* 4.15.X Modals media queries */
/* 4.16 Projects */
/* 4.17 Alerts */
/* 4.18 Carousel */
/* 4.19 Pictures & images */
/* 4.19.1 Pictures grid */
/* 4.19.2 Pictures flex */
/* 4.20 CTA */
/* 4.21 Quote / callout */

/* 5. Utilities (helper classes, spacing, screen readers) */

/* 6. Transitions and Animations */
/* 6.1 View Transitions: Nav Indicator */



/* TODO */
/* Make carousel full width of the container with neg.margins and calc. Check .carousel--fullwidth, needs tuning */
/* Make carousel view other slides opaque */



/* 1. Reset and global vars */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
:root {
  --grey-025-hsl: 0 20% 99%; /* fdfcfc */
  --grey-035-hsl: 0 0% 99%; /* fcfcfc */
  --grey-100-hsl: 0 5% 96%; /* #f6f5f5 */
  --grey-200-hsl: 330 3% 88%; /* #e1dfe0 */
  --grey-300-hsl: 0 2% 84%; /* #d7d5d5 */
  --grey-400-hsl: 345 3% 76%; /* #c4c0c1 */
  --grey-500-hsl: 350 3% 60%; /* #9c9697 */
  --grey-550-hsl: 350 2.8% 58.04%; /* #979192 corrected from 500 for more contrast */
  --grey-600-hsl: 351 3% 52%; /* #888182 */
  --grey-650-hsl: 352.5 3.36% 46.67%; /* #7b7374 corrected from 600 for more contrast */
  --grey-700-hsl: 351 3% 44%; /* #736c6d */
  --grey-800-hsl: 348 4% 26%; /* #464142 */
  --grey-900-hsl: 0 5% 4%; /* #0b0a0a */

  --red-500-hsl: 355 80% 45%; /* #d11726 */

  --blue-100-hsl: 204 33% 94%; /* #ecf2f6 */
  --blue-500-hsl: 204 41% 48%; /* #4884ad */
  --blue-550-hsl: 202.56 53.92% 42.55%; /* corrected from 500 for more contrast #327ba7 */

  --logo-grey: #4d4d4d;

  --nav-bg: hsl(var(--grey-025-hsl));
  --hero-bg: hsl(var(--grey-100-hsl));
  --main-bg: hsl(var(--grey-035-hsl));
  --active-bg: hsl(var(--red-500-hsl));

  --icon-size: 1.75rem;

  --font-body: 'Roboto', sans-serif;
  --font-title: 'Open Sans', sans-serif;

  --app-screen: clamp(180px, 26vw, 800px); /* negative margin calc stuff going on here, experiment with .carousel--fullwidth */
  --app-screen-large: clamp(180px, 28vw, 800px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }
}


/* 2. Base styles (html, body, typography, buttons) */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
html{
  /* scrollbar-gutter: stable; */ /* prevents content shift in the background when dialog is open // prevents standard showing of scrollbars in dialog too = not worth it */
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--main-bg);
  scroll-behavior: smooth;
  color: hsl(var(--grey-900-hsl));  
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: hsl(var(--grey-700-hsl));
}

h1 {
  font-size: 3rem;
  font-weight: 600;
}

h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: hsl(var(--grey-800-hsl));
}

h3 {
  font-size: 1.25rem;
  font-weight: 500;
  color: hsl(var(--grey-700-hsl));
}

h4 {
  font-size: 1.25rem;
  font-weight: 500;
  color: hsl(var(--grey-600-hsl));
}

p {
  color: hsl(var(--grey-800-hsl));
  line-height: 1.5rem;
  margin-block: 1rem;
}

p strong, ul strong, dd strong{
  font-weight: 500;
}

a {
  color: hsl(var(--blue-550-hsl));
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: hsl(var(--blue-550-hsl) / 50%);
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color 0.3s ease, text-decoration-thickness 0.3s ease, color 0.3s ease;
}

a:hover,
a:focus {
  text-decoration-thickness: 2.5px;
  outline: none;
  text-decoration-color: hsl(var(--blue-550-hsl) / 90%);
}

a:focus-visible, button:focus-visible {
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

mark {
  color: hsl(var(--grey-800-hsl));
  background: linear-gradient(to top, hsl(var(--red-500-hsl) / 30%) 45%, transparent 45%);
  display: initial;
  position: relative;
  transition: color 0.3s ease;
}

mark.light{
  background: linear-gradient(to top, hsl(var(--red-500-hsl) / 15%) 45%, transparent 45%);
}

mark.light-full{
  background: linear-gradient(to top, hsl(var(--red-500-hsl) / 20%) 100%, transparent 45%);
  color: hsl(var(--grey-900-hsl));
}

mark.light-strong{
  background: linear-gradient(to top, hsl(var(--red-500-hsl) / 15%) 45%, transparent 45%);
  color: hsl(var(--grey-900-hsl));
  font-weight: 500;
}


mark.lighter{
  background: linear-gradient(to top, hsl(var(--red-500-hsl) / 5%) 45%, transparent 45%);
}

.icon {
  width: 1.5em;
  height: 1.5em;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
}

.button {
  display: inline-block;
  min-width: 15ch;
  padding: 0.6em 1.25em;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background-color: hsl(var(--blue-550-hsl));
  color: white;
  transition: background-color 0.25s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.button:hover,
.button:focus {
  background-color: hsl(var(--blue-550-hsl) / 80%);
  box-shadow: 0 2px 8px hsl(var(--blue-500-hsl) / 20%);
}

.button:focus-visible {
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

.button:active {
  transform: scale(0.97);
}

.button--ghost {
  background-color: transparent;
  border-color: hsl(var(--blue-550-hsl));
  color: hsl(var(--blue-550-hsl));
}

.button--ghost:hover,
.button--ghost:focus {
  background-color: hsl(var(--blue-500-hsl) / 10%);
  box-shadow: 0 0 0 2px hsl(var(--blue-500-hsl) / 20%);
}

.button--ghost:focus-visible {
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

.button--ghost:active {
  background-color: hsl(var(--blue-500-hsl) / 10%);
}


/* 3. Layout (grid, app, containers) */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.app {  
  display: grid;
  grid-template-areas:
    "nav hero main"
    "nav hero footer";
  grid-template-columns:
    4.5rem
    var(--app-screen)
    1fr;
  grid-template-rows: auto auto;
  min-height: 100vh;
  overflow: visible;
}


/* 3.1 Hero area */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.hero {
  grid-area: hero;
  background: var(--hero-bg);
  overflow: hidden;
  overflow: visible;
  border-right: 1px solid hsl(var(--grey-300-hsl));
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 5;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(hsl(var(--grey-400-hsl) / 40%) 1px, transparent 2px);
  background-size: 20px 20px;
}

/* 3.2 Main Content */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.main {
  grid-area: main;
  flex: 1;
  padding-block: 2rem;
  padding-inline: clamp(5px, 1.5vw, 2rem);
  overflow-y: auto;
  min-height: 0;
}

.main__container {
  max-width: 950px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3.5rem);
  container-type: inline-size;
  container-name: my-main;
}

/* 3.3 Footer */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.footer{
  padding-block-start: 2rem;
  padding-block-end: 0;
  padding-inline: clamp(5px, 1.5vw, 2rem);
  container-type: inline-size;
  container-name: my-footer;
  max-width: 100%;
  margin-top: auto;
  position: relative;
}

/* 3.X Media queries */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
@media (min-width: 1600px) {
  .app {
    grid-template-columns:
    6.75rem
    var(--app-screen-large)
    1fr;
    /* grid-template-columns:
    6.75rem
    clamp(180px, 28vw, 800px)
    1fr; */
  }
}

@media (max-width: 767px), (max-width: 1024px) and (orientation: portrait) {
  .app {
   grid-template-areas:
      "hero"
      "main"
      "footer"
      "nav";
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto 4.25rem;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .hero {
    height: 20vh;
    position: relative;
    border-right: unset;
    border-bottom: 1px solid hsl(var(--grey-300-hsl));
  }
}

/* 4. Components (nav, buttons, sections, etc.) */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */

/* 4.01 Navigation */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.nav {
  grid-area: nav;
  background-color: var(--nav-bg);
  border-right: 1px solid hsl(var(--grey-300-hsl));
  width: 4.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  flex-shrink: 0;
  padding: 6.25rem 0 0 0;
  overflow-y: visible;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
}

.nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.nav__list {
  flex: 1;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.25rem;
  width: 100%;
  align-items: center;
}
  
.nav__item {
  width: 100%;
  position: relative;
}

.nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: hsl(var(--grey-650-hsl));
  text-decoration: none;
  font-size: 0.75rem;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.nav__link:hover{
  color: hsl(var(--grey-900-hsl));
}

.nav__link:focus {
  outline: none;
}

.nav__link:focus-visible {
  color: hsl(var(--grey-800-hsl));
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

.nav__item--active::before {
  content: "";
  position: absolute;
  right: -8px;
  top: 0;
  height: 100%;
  width: 10px;
  background: var(--hero-bg);
  border-left: 4px solid hsl(var(--grey-300-hsl));
  border-radius: 1rem;
  z-index: 4;
}

.nav__item--active::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 1px;
  height: calc(100% - 6.5px);
  width: 6px;
  background-color: var(--active-bg);
  border-radius: 1rem;
  border: 2px solid var(--hero-bg);
  z-index: 5;
}

.nav__item--active .nav__link {
  color: hsl(var(--grey-900-hsl));
}

.nav__icon {
  width: var(--icon-size);
  height: var(--icon-size);
  fill: currentColor;
}

.nav__label {
  display: block;
  text-align: center;
}

/* 4.01.0 Navigation height on narrow screens */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
@media (max-height: 476px) and (orientation: landscape) {
  .nav {
    padding-top: 1rem;
  }
}

/* 4.01.1 Navigation Ultra-wide Layout ≥ 1600px */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
@media (min-width: 1600px) {
  .nav {
    width: 6.75rem;
  }

  .nav__link{
    font-size: 1rem;
    gap: 0.375rem;
  }

  .nav__icon {
    width: calc(var(--icon-size) * 1.5);
    height: calc(var(--icon-size) * 1.5);
  }
}
  
/* 4.01.2 Navigation Responsive Bottom Nav for Mobile/Tablet Portrait */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
@media (max-width: 767px), (max-width: 1024px) and (orientation: portrait) {
  .nav {
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    height: 4.25rem;
    width: 100%;
    border-right: none;
    border-top: 1px solid hsl(var(--grey-300-hsl));
    padding: 0;
    position: sticky;
    bottom: 0;
    z-index: 5;
  }

  .nav__list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    gap: clamp(0.25rem, 2vw, 1rem);
  }

  .nav__item {
    flex: 1 1 6rem;
    max-width: 6rem;
    display: flex;
    justify-content: center;
    align-items: stretch;
  }

  .nav__link {
    display: flex;               
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    padding: 0.25rem;
    text-align: center;
    width: 100%;
    height: 100%; 
  }

  .nav__item--active::before {
    right: 0;
    top: -8px;
    height: 10px;
    width: 100%;
    border-left: unset;
    border-bottom: 4px solid hsl(var(--grey-300-hsl));
  }

  .nav__item--active::after {
    right: 1px;
    top: -5px;
    width: calc(100% - 6.5px);
    height: 6px;
  }

  .nav__label {
    font-size: 0.7rem;
  }
}


/* 4.02 Hero language switcher */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.hero__topbar {
  position: fixed;
  top: 2rem;
  right: 3.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 50;
}

.hero__lang-switcher {
  display: flex;
  align-items: center;
  gap: 0;
  background-color: hsl(var(--grey-035-hsl) / 70%);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

.hero__lang-icon {
  width: 1.75rem;
  height: 1.75rem;
  color: hsl(var(--grey-700-hsl));
  fill: currentColor;
}

.hero__lang-select {
  font-size: 0.85rem;
  border: none;
  background: transparent;
  color: hsl(var(--grey-700-hsl));
  cursor: pointer;
  padding: 0.8rem 0.4rem;
}

.hero__lang-select:focus {
  outline: none;
}

.hero__lang-select:focus-visible {
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 767px), (max-width: 1024px) and (orientation: portrait) {
  .hero__topbar {
    position: absolute;
    top: 1rem;
    right: 0.5rem;
  }

  .hero__lang-switcher{
    background: transparent;
  }
}


/* 4.03 Main title */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.main__title {
  line-height: 1.1;
  margin-block-start: clamp(2rem, 10vh, 10rem);
  margin-block-end: 1rem;
  max-width: 30ch;
  text-wrap: balance;
}

.main__title-sub {
  display: block;
  font-size: 1.5rem;
  font-weight: 400;
  color: hsl(var(--grey-550-hsl));
}

.main__title-accent { /* delete, this is now <mark></mark> */
  color: hsl(var(--grey-800-hsl));
  background: linear-gradient(to top, hsl(var(--red-500-hsl) / 30%) 45%, transparent 45%);
  display: inline-block;
  position: relative;
}

@media (max-width: 767px), (max-width: 1024px) and (orientation: portrait) {
  .main__title {
    margin-block-start: 0.5rem;
  }
}


@container my-main (min-width: 561px){
  .main__title {
    font-size: 6cqi;
  }

  .main__title--compact {
    font-size: 5.6cqi;
    max-width: 35ch;
  }
}

@container my-main (max-width: 560px){
  .main__title {
    font-size: 2rem;
  }
}

/* 4.04 Profile / Intro-snippet / Body-snippet */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.profile, .intro-snippet, .body-snippet {
  display: flex;
  align-items: start;
  gap: 1.75rem;
  margin-top: 2rem;
  flex-wrap: nowrap;
}

.profile--home{
  align-items: center;
  margin-block: 2rem;
}

.body-snippet{
  align-items: start;
  margin-block: 1rem;
}

.profile__avatar, .intro-snippet__avatar, .body-snippet__avatar {
  position: relative;
  display: inline-block;
  border: 3px solid hsl(var(--grey-700-hsl));
  border-radius: 50%;
  padding: 0;
  background: hsl(var(--grey-200-hsl));
  margin-top: 1rem;
}

.profile--home .profile__avatar{
  margin-block: 0;
}


.profile__avatar img, .intro-snippet__avatar img, .body-snippet__avatar img {
  width: calc(5.75rem - 6px);
  height: calc(5.75rem - 6px);
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.profile__avatar::after, .intro-snippet__avatar::after, .body-snippet__avatar::after {
  content: '';
  position: absolute;
  top: 0.75rem;
  right: 0;
  width: 0.5rem;
  height: 0.5rem;
  background-color: hsl(var(--red-500-hsl));
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px hsl(var(--grey-700-hsl));
  z-index: 2;
}

.intro-snippet__quote{
  font-size: 1.1em;
  color: hsl(var(--grey-700-hsl));
  line-height: 1.75rem;
}

.profile__info {
  max-width: 80ch;
}

.profile__name {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: hsl(var(--grey-650-hsl));
  font-weight: 500;
  margin: 0;
}

.profile__bio {
  font-size: 1rem;
  line-height: 1.5;
  color: hsl(var(--grey-650-hsl));
  margin-block: 0.2rem;
}

@media (max-width: 560px) {
  .profile, .intro-snippet{
    align-items: start;
  }

  .profile__avatar img, .intro-snippet__avatar img {
    width: 4rem;
    height: 4rem;
  }

  .profile__bio{
    font-size: 0.85rem;
  }
}


/* 4.05 Details / summary intro */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.intro-toggle {
  font-size: 1rem;
}

.intro-toggle__summary {
  font-weight: 400;
  cursor: pointer;
  color: hsl(var(--grey-800-hsl));
  list-style: none;
  outline: none;
}

.intro-toggle__summary::-webkit-details-marker {
  display: none; /* hides default ▶ arrow */
}

.intro-toggle__summary:focus-visible {
  color: hsl(var(--grey-800-hsl));
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

.intro-toggle__summary mark{
  color: hsl(var(--blue-550-hsl));
  background: none;
  text-decoration-line: underline;
  text-decoration-color: hsl(var(--blue-550-hsl) / 50%);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition:
    text-decoration-color 0.3s ease,
    text-decoration-thickness 0.3s ease,
    color 0.3s ease;
}

.intro-toggle__summary:hover mark{
  text-decoration-color: hsl(var(--blue-550-hsl) / 90%);
  text-decoration-thickness: 2.5px;
}

.intro-toggle[open] .intro-toggle__summary {
  color: hsl(var(--grey-800-hsl));
}

.intro-toggle__icon {
  width: 2em;
  height: 2em;
  transition: transform 0.3s ease;
  transform-origin: center;
  color: hsl(var(--blue-550-hsl));
  fill: currentColor;
  vertical-align: middle; 
}

details[open] .intro-toggle__icon {
  transform: rotate(180deg);
}

@supports selector(::details-content) {
  .intro-toggle::details-content {
    height: 0;
    overflow: clip;
    transition:
      height 0.3s ease,
      content-visibility 0.3s ease allow-discrete;
  }

  .intro-toggle[open]::details-content {
    height: auto;
  }
}


/* 4.06 Details / summary generic */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.collapsible-block{
  margin-block: 4rem;
}

.collapsible {
  font-size: 1rem;
  border-bottom: 2px solid hsl(var(--grey-300-hsl));
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.collapsible::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 50px;
  background-color: hsl(var(--red-500-hsl));
  border-right: 3px solid hsl(var(--grey-035-hsl));
  transition: width 1.3s ease;
}

.collapsible[open] {
  border-bottom: 2px solid hsl(var(--grey-300-hsl));
}

.collapsible:has(summary:hover)::after {
  width: calc(100% - 50px);
}

.collapsible[open]::after {
  width: calc(100% - 50px);
}

.collapsible__summary {
  list-style: none;
  cursor: pointer;
  outline: none;
  padding: 0;
}

.collapsible__summary::-webkit-details-marker {
  display: none;
}

.collapsible__summary-header {
  padding-bottom: 0.75rem;
  position: relative;
}

.collapsible__summary-header h2 {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: hsl(var(--grey-800-hsl));
  position: relative;
}

.collapsible:has(summary:hover) h2 mark.light{
  color: hsl(var(--grey-900-hsl));
}

.collapsible__summary-header p{
  font-size: 1rem;
  text-wrap: pretty;
  color: hsl(var(--grey-800-hsl));
  line-height: 1.5rem;
  margin-block: 0;
  max-width: 100%;
}

.collapsible__toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 400;
  color: hsl(var(--blue-550-hsl));
  text-decoration: underline;
  gap: 0;
  transition: color 0.3s ease;
  background-color: hsl(var(--grey-035-hsl) / 70%);
  padding-left: 0.5rem;
  text-decoration-color: hsl(var(--blue-550-hsl) / 50%);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition:
    text-decoration-color 0.3s ease,
    text-decoration-thickness 0.3s ease,
    color 0.3s ease;
}

.collapsible__summary:hover .collapsible__toggle {
  text-decoration-color: hsl(var(--blue-550-hsl) / 90%);
  text-decoration-thickness: 2.5px;
}

.collapsible__summary:focus-visible .collapsible__toggle {
  color: hsl(var(--grey-800-hsl));
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

.collapsible__icon {
  width: 2em;
  height: 2em;
  transition: transform 0.3s ease;
  transform-origin: center;
  color: hsl(var(--blue-550-hsl));
  fill: currentColor;
  vertical-align: middle;
}

.collapsible[open] .collapsible__toggle svg {
  transform: rotate(180deg);
}

.collapsible__toggle .toggle-label::after {
  content: "Expand";
}

.collapsible[open] .toggle-label::after {
  content: "Collapse";
}

@supports selector(::details-content) {
  .collapsible::details-content {
    height: 0;
    overflow: clip;
    transition:
      height 0.3s ease,
      content-visibility 0.3s ease allow-discrete;
  }
  .collapsible[open]::details-content {
    height: auto;
  }
}


/* 4.07 Experience infographic */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.experience__infographic{
  margin-block: 4rem;
}

.experience__figure {
  max-width: 35rem;
  margin-inline: auto;
  text-align: center;
}

.experience__figure img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
}

.experience__caption {
  font-size: 0.85rem;
  color: hsl(var(--grey-600-hsl));
  line-height: 1.4;
}

/* 4.08 Bullet List */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.bullet-list {
  list-style: none;
  margin-block: 1rem;
  margin-inline: 0;
  padding: 0;
}

.bullet-list__item {
  position: relative;
  padding-left: 2em;
  margin: 0.75em 0;
  line-height: 1.5;
}

.bullet-list__item::before {
  content: '';
  position: absolute;
  left: 7px;
  top:0;
  transform: translateY(0.5rem);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: hsl(var(--grey-700-hsl));
  box-shadow: 0 0 0 2px #fff, 0 0 0 7px hsl(var(--red-500-hsl) / 10%);
}

.bullet-list__item--30::before {/* Override for bullet30 */
  background-color: hsl(var(--grey-800-hsl));
  box-shadow: 0 0 0 2px #fff, 0 0 0 7px hsl(var(--red-500-hsl) / 50%);
}

.bullet-list__item--05::before {/* Override for bullet05 */
  background-color: hsl(var(--grey-500-hsl));
  box-shadow: 0 0 0 2px #fff, 0 0 0 7px hsl(var(--red-500-hsl) / 5%);
}

.bullet-list--underline .bullet-list__item {/* Optional underline modifier */
  border-bottom: 1px solid hsl(var(--grey-200-hsl));
  padding-bottom: 0.5em;
}

.bullet-list--underline-light .bullet-list__item {/* Optional underline modifier light */
  border-bottom: 1px solid hsl(var(--grey-100-hsl));
}

.bullet-list--underline .bullet-list__item:last-child,
.bullet-list--underline-light .bullet-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bullet-list--align-pills .bullet-list__item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.25em 1rem;
  padding-left: 2em;
  color: hsl(var(--grey-900-hsl));
}

.bullet-list--align-pills .bullet-list__item .pill {
  flex-shrink: 0;
  margin-left: auto;
}

.bullet-list--align-pills .bullet-list__meta {
  margin-left: auto;
  color: hsl(var(--grey-600-hsl));
  font-style: italic;
  font-size: 0.875rem;
  white-space: normal;
  flex-shrink: 1;
  text-align: right;
  min-width: fit-content;
}

.bullet-list__charts{
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

.bullet-list--icons .bullet-list__item::before {
  content: '';
  position: absolute;
  left: -0.35rem;
  top: -0.7rem;
  transform: translateY(0.5rem);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: hsl(var(--red-500-hsl) / 10%);
  box-shadow: unset;
}

.bullet__icon {
  width: 1.25em;
  height: 1.25em;
  color: hsl(var(--grey-700-hsl));
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
  margin-left: -2rem;
  margin-top: 0.1rem;
  position: absolute;
}


/* 4.09 Pills */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.pill-list {
  list-style: none;
  padding: 0;
  margin-block: 1rem;
}

.pill-list--inline {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 400;
  font-size: 0.85rem;
  background-color: hsl(var(--grey-500-hsl)); /* default if no modifier */
  fill: currentColor;
  line-height: 1.5em;
}

.pill__icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
  margin-left: -0.25rem;
}

/* modifiers */
.pill--grey  { background-color: hsl(var(--grey-700-hsl)); }
.pill--blue  { background-color: hsl(var(--blue-500-hsl)); }
.pill--red   { background-color: hsl(var(--red-500-hsl)); }


/* 4.10 Section Headings */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.section-heading {
  display: flex;
  align-items: center;
  gap: 0.25em;
}

.section-heading__icon {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
  flex-shrink: 0;
}


/* 4.11 Semantic Lists */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.semantic-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.semantic-list__item {
  margin: 0.75em 0;
}

.semantic-list--underline .semantic-list__item {
  border-bottom: 1px solid hsl(var(--grey-200-hsl));
  padding-bottom: 0.5em;
}

.semantic-list--underline .semantic-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.semantic-list__row {
  display: grid;
  grid-template-columns: 12.5ch 1fr;
  column-gap: 1em;
  align-items: start;
}

.semantic-list--less .semantic-list__row {
  grid-template-columns: 10.5ch 1fr;
}

.semantic-list__pill-wrap {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.15em;
}

.semantic-list__title {
  margin: 0;
  font-weight: 400;
  font-size: 1rem;
  font-family: var(--font-body);
  color: hsl(var(--grey-900-hsl));
}

.semantic-list__text {
  /* this is all good! */
}

.semantic-list__meta {
  margin: 0.25em 0 0 0;
  color: hsl(var(--grey-600-hsl));
  font-style: italic;
  font-size: 0.875rem;
}


/* 4.12 Footer navigation */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.footer__nav {
  max-width: 950px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.footer__card {
  display: grid;
  grid-template-areas:
    "title"
    "image"
    "label";
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr;
  position: relative;
  text-align: left;
  gap: 0;
  text-decoration: none;
  color: hsl(var(--grey-500-hsl));
  padding-inline: 0.75rem;
  padding-block-start: 0;
  padding-block-end: 3rem;
}

.footer__card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 0;
  width: 1px;
  background-color: hsl(var(--grey-300-hsl));
}

.footer__title {
  grid-area: title;
  font-family: var(--font-title);
  font-weight: 300;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
  background-image: linear-gradient(
    to top,
    hsl(var(--red-500-hsl) / 25%) 45%,
    transparent 45%
  );
  background-repeat: no-repeat;
  background-size: 0% 100%; /* Start hidden */
  background-position: 0 100%;
  transition: 
    background-size 0.4s ease-out,
    color 0.3s ease;
}

.footer__card:hover .footer__title {
  background-size: 100% 100%;
  color: hsl(var(--grey-900-hsl));
}

.footer__card:hover::after{
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  height: 24px;
  width: 1px;
  background-color: hsl(var(--red-500-hsl));
}

.footer__card:focus-visible {
  color: hsl(var(--grey-800-hsl));
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer__image {
  grid-area: image;
  width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.footer__label {
  grid-area: label;
  font-size: 0.85rem;
  color: hsl(var(--grey-650-hsl));
  line-height: 1.4rem;
  max-width: 45ch;
  margin-block-start: 0;
  text-wrap: pretty;
  text-decoration-line: underline;
  text-decoration-color: hsl(var(--grey-650-hsl) / 30%);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition:
    color 0.3s ease,
    text-decoration-color 0.3s ease,
    text-decoration-thickness 0.3s ease;
}

.footer__card:hover .footer__label {
  color: hsl(var(--blue-550-hsl));
  text-decoration-color: hsl(var(--blue-550-hsl) / 70%);
  text-decoration-thickness: 3px;
}

.footer__meta {
  background-color: hsl(var(--grey-500-hsl));
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: white;
  text-align: left;
  position: absolute;
  bottom: 1rem;
  right: 0;
  min-width: 45cqi;
}

.footer__meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: 0;
}

.footer__meta-list li::after {
  content: '|';
  margin-inline: 0.75rem;
  color: currentColor;
}

.footer__meta-list li:last-child::after {
  content: '';
}

.footer__meta-link {
  color: white;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.3s ease;
}

.footer__meta-link:hover {
  color: hsl(var(--red-500-hsl));
  text-decoration-thickness: 2px;
  outline: none;
  text-decoration-color: hsl(var(--red-500-hsl) / 90%);
}

@container my-footer (width < 768px) {
  .footer__nav {
    grid-template-columns: 1fr;
    margin-block-end: 2rem;
  }

  .footer__card {
    grid-template-areas:
      "title image"
      "label image";
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
    align-items: start;
    text-align: left;
    border-left: unset;
    padding-block-end: unset;
    padding-inline: unset;
  }

  .footer__card::before {
    content: none;
  }

  .footer__title {
    border-bottom: 1px solid hsl(var(--grey-300-hsl));
    padding-bottom: 0.25rem;
    background-position: 0px -2px;
  }

  .footer__card:hover .footer__title {
    background-size: 50% 100%;
  }

  .footer__card:hover::after{
    content: none;
  }

  .footer__image {
    align-self: center;
    width: 160px;
    height: auto;
    max-height: 100px;
    object-fit: cover;
  }
}

@container my-footer (width < 600px) {
 .footer__image {
    width: 30cqi;
    height: 30cqi;
  }
}


/* 4.13 Donut chart */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.donut-chart {
  display: inline-block;
  margin: 1rem;
  text-align: center;
  font-family: var(--font-title);
}

.donut-chart__donut {
  width: 6rem;
  height: 7.5rem;
}

.donut-chart__outer-ring{
  fill: none;
  stroke: hsl(var(--grey-800-hsl));
  stroke-width: 1;
}

.donut-chart__ring {
  fill: none;
  stroke: hsl(var(--grey-100-hsl));
  stroke-width: 4;
}

.donut-chart__segment {
  fill: none;
  stroke: hsl(var(--red-500-hsl));
  stroke-width: 4;
  stroke-linecap: butt;
  transform: rotate(-90deg);
}

.donut-chart__indicator-out{
  fill: none;
  stroke: hsl(var(--red-500-hsl) / 15%);
  stroke-width: 2;
}

.donut-chart__indicator-in{
  fill: hsl(var(--grey-500-hsl));
  stroke: none;
  }

.donut-chart__indicator-stroke {
  stroke-width: 1;
  stroke: hsl(var(--grey-500-hsl));
}

.donut-chart__text {
  fill: hsl(var(--grey-500-hsl));
  font-size: 0.5rem;
}

.donut-chart__caption {
  margin-top: 0.25rem;
  font-weight: 400;
  line-height: 1.2;
  font-family: var(--font-body);
}

.donut-chart__caption em{
  font-size: 0.875rem;
  color: hsl(var(--grey-700-hsl));
}

/* 4.14 Cards */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.card-container {
  container-type: inline-size;
}

.card {
  all: unset; /* resets button styles */
  display: grid;
  grid-template-columns: 150px 1fr;
  text-decoration: none;
  color: inherit;
  background: hsl(var(--grey-100-hsl));
  border-radius: 5px;
  overflow: hidden;
  outline: none;
  margin-block: 2rem;
  min-height: 10rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease-in-out;
  transform: scale(1);
}

.card:hover,
.card:focus,
.card:focus-visible {
  box-shadow: 0 4px 12px hsl(var(--grey-900-hsl) / 15%);
  cursor: pointer;
  transform: scale(1.02);
  background-color: #fff;
}

.card__media {
  background-color: hsl(var(--grey-500-hsl) / 40%);
  height: 100%;
  overflow: hidden;
}

.card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card__content {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.25rem;
  padding-inline: 1rem;
  padding-block: 0.5rem;
}

.card__title {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 300;
  font-family: var(--font-title);
  color: hsl(var(--grey-800-hsl));
  position: relative;
}

.card__title::before {
  content: '';
  position: absolute;
  top: 0.25rem;
  left: -1.15rem;
  width: 4px;
  height: calc(100% - 0.5rem);
  border-radius: 2px;
  background-color: hsl(var(--red-500-hsl));
  box-shadow: 0 0 0 2px hsl(var(--grey-100-hsl));
}

.card__title mark{
  display: initial;
  background-image: linear-gradient(
    to top,
    hsl(var(--red-500-hsl) / 25%) 45%,
    transparent 45%
  );
  background-repeat: no-repeat;
  background-size: 0% 100%; /* Start hidden */
  background-position: 0 100%;
  transition: 
    background-size 0.4s ease-out,
    color 0.3s ease;
}

.card:hover .card__title mark,
.card:focus .card__title mark,
.card:focus-visible .card__title mark {
  background-size: 100% 100%;
  color: hsl(var(--grey-900-hsl));
}

.card__description {
  margin: 0;
  color: hsl(var(--grey-700-hsl));
  font-size: 0.875rem;
}

.card__footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.card__details-link {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  font-size: 0.85rem;
}

.card__label{
  font-size: 0.85rem;
  font-weight: 400;
  color: hsl(var(--blue-550-hsl));
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: hsl(var(--blue-550-hsl) / 50%);
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color 0.3s ease, text-decoration-thickness 0.3s ease, color 0.3s ease;
}

.card__icon {
  width: 2em;
  height: 2em;
  transition: transform 0.3s ease;
  transform-origin: center;
  color: hsl(var(--blue-550-hsl));
  transform: rotate(-90deg);
  fill: currentColor;
  vertical-align: middle;
}

.card:hover .card__icon,
.card:focus .card__icon,
.card:focus-visible .card__icon {
  transform: translateX(2px) rotate(-90deg);
}

.card:hover .card__label,
.card:focus .card__label,
.card:focus-visible .card__label {
  text-decoration-thickness: 2.5px;
  outline: none;
  text-decoration-color: hsl(var(--blue-550-hsl) / 90%);
}

.card--alternative { /* alternative styling for the card */
  grid-template-columns: 1fr 150px;
  gap: 0.75rem;
  background: transparent;
  overflow: unset;
}

.card--alternative:hover,
.card--alternative:focus,
.card--alternative:focus-visible {
  background-color: transparent;
  box-shadow: unset;
}

.card--alternative .card__media {
  order: 2;
  border-radius: 5px;
  transition: box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease-in-out;
  transform: scale(1);
}

.card--alternative .card__content {
  border-radius: 5px;
  background: hsl(var(--grey-100-hsl));
  padding-inline: 1.5rem 0.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease-in-out;
  transform: scale(1);
}

.card--alternative:hover .card__media,
.card--alternative:focus .card__media,
.card--alternative:focus-visible .card__media {
  box-shadow: 0px 0px 0px 15px hsl(var(--red-500-hsl) / 10%), 0 4px 12px hsl(var(--grey-900-hsl) / 15%);
  transform: scale(1.02);
  z-index: -1;
} 

.card--alternative:hover .card__content,
.card--alternative:focus .card__content,
.card--alternative:focus-visible .card__content {
  box-shadow: 0 4px 12px hsl(var(--grey-900-hsl) / 15%);
  background-color: #fff;
  transform: scale(1.01);
}

.card--alternative .card__title::before {
  content: unset;
}

@container (max-width: 510px) {
  .card {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .card__media {
    height: 10rem; /* or use aspect-ratio: 16/9; */
  }

  .card__title::before {
    top: -0.6rem;
    left: 0;
    height: 4px;
    width: 2rem;
  }

  .card--alternative {
    gap: 0;
    border-radius: 5px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease-in-out;
    transform: scale(1);
  }

  .card--alternative:hover,
  .card--alternative:focus,
  .card--alternative:focus-visible {
    box-shadow: 0 4px 12px hsl(var(--grey-900-hsl) / 15%);
    transform: scale(1.02);
  }

  .card--alternative .card__media {
    order: 0;
    border-radius: unset;
  }

  .card--alternative .card__content {
    border-radius: unset;
  }

  .card--alternative:hover .card__media,
  .card--alternative:focus .card__media,
  .card--alternative:focus-visible .card__media,
  .card--alternative:hover .card__content,
  .card--alternative:focus .card__content,
  .card--alternative:focus-visible .card__content {
    box-shadow: unset;
    transform: unset;
  }
}


/* 4.15 Drawer / offcanvas & modal - use .drawer or .modal */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
body:has(dialog[open]) {
  overflow: hidden;
}

/* 4.15.1 Drawer / offcanvas that slides in from the right */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.drawer {
  inset: unset;
  max-height: none;
  border: none;
  margin: 0;
  padding: 0;
  background: transparent;
  z-index: 1000;
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  height: 100vh;
  width: max(45vw, 640px);
  max-width: 100vw;
  overflow: unset;
  transform: translateX(100%);
  opacity: 0;
  transition:
    transform 0.45s ease-in-out,
    opacity 0.3s cubic-bezier(.4,0,.2,1),
    display 0.45s allow-discrete,
    overlay 0.45s allow-discrete;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: -3rem;
    width: 3rem;
    height: 100%;
    background: hsl(var(--red-500-hsl) / 25%);
    mix-blend-mode: multiply;
    pointer-events: none;
  }

  &::backdrop {
    background-color: hsl(var(--grey-900-hsl) / 0%);
    backdrop-filter: blur(2px);
    transition:
      background-color 0.3s,
      display 0.45s allow-discrete,
      overlay 0.45s allow-discrete;
  }

  &[open] {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    transform: translateX(0);
    opacity: 1;
  }

  @starting-style {
    &[open] {
      transform: translateX(100%);
      opacity: 0;
    }
  }
  
  &[open]::backdrop {
    background-color: hsl(var(--grey-900-hsl) / 15%);
  }

  @starting-style {
    &[open]::backdrop {
      background-color: hsl(var(--grey-900-hsl) / 0%);
    }
  }
}

/* 4.15.2 Modal centered on screen */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.modal {
  display: none;
  pointer-events: none;
  border: none;
  margin: auto;
  padding: 0;
  background: transparent;
  opacity: 0;
  transform: scale(0.98);
  transition:
    transform 0.45s ease-in-out,
    opacity 0.3s ease,
    display 0.45s allow-discrete,
    overlay 0.45s allow-discrete;
  overflow: unset;

  &::backdrop {
    background-color: hsl(var(--grey-900-hsl) / 0%);
    backdrop-filter: blur(2px);
    transition: background-color 0.25s ease;
  }

  &[open] {
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 1100;
    opacity: 1;
    transform: scale(1);
   }

  @starting-style {
    &[open] {
      opacity: 0;
      transform: scale(0.98);
    }
  }

  &[open]::backdrop {
    background-color: hsl(var(--grey-900-hsl) / 15%);
  }

  @starting-style {
    &[open]::backdrop {
      background-color: hsl(var(--grey-900-hsl) / 0%);
    }
  }
}

.drawer__content {
  container-type: inline-size;
  container-name: my-drawer;
  position: relative;
  flex-basis: 100%;
  box-sizing: border-box;
  background: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -4px 0 16px hsl(var(--grey-900-hsl) / 30%);
}

.modal__content {
  container-type: inline-size;
  box-sizing: border-box;
  position: relative;
  width: min(92vw, 960px);
  max-height: 90vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0px 0px 0px 15px hsl(var(--red-500-hsl) / 30%), 0 12px 32px hsl(var(--grey-900-hsl) / 30%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer__header, .modal__header {
  position: absolute;
  top: 0;
  right: 0;
  padding: 1rem;
  z-index: 2;
}

.drawer__body, .modal__body {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 0 1rem 3rem 3rem;
  outline: none;
}

.modal__body {
  padding: 0 1rem 1rem 1rem;
}

.drawer__body:focus-visible, .modal__body:focus-visible {
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: -6px;
  border-radius: 4px;
}

.drawer__inner {
  max-width: 720px;
  margin: 0 auto;
}

.modal__inner {
  max-width: 960px;
  margin: 0 auto;
}

.drawer__inner h2, .modal__inner h2 {
  font-size: 1.5rem;
  font-weight: 300;
  font-family: var(--font-title);
  color: hsl(var(--grey-800-hsl));
  position: relative;
  margin-top: 7rem;
  position: sticky;
  top: 0;
  background: white;
  padding-block: 1.25rem 0.25rem;
  z-index: 1;
}

.modal__inner h2 {
  margin-top: 0;
}

.drawer__inner h2 mark, .modal__inner h2 mark {
  color: hsl(var(--grey-900-hsl));
}

.drawer__close, .modal__close {
  font-size: 1rem;
  background-color: hsl(0, 0%, 100%, 0.7);
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  color: hsl(var(--grey-700-hsl));
  padding: 0.5rem;
}

.drawer__footer {
  position: sticky;
  bottom: 0;
  padding: 1rem 3rem 1rem 3rem;
  background: white;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.05);
  z-index: 1;
}

.modal__footer {
  padding: 1rem;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.05);
  background: #fff;
}

/* 4.15.3 Lightbox */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.lightbox {
  display: none;
  pointer-events: none;
  border: none;
  margin: auto;
  padding: 0;
  background: transparent;
  opacity: 0;
  transform: scale(0.98);
  transition:
    transform 0.45s ease-in-out,
    opacity 0.3s ease,
    display 0.45s allow-discrete,
    overlay 0.45s allow-discrete;
  overflow: unset;

  &::backdrop {
    background-color: hsl(var(--grey-900-hsl) / 0%);
    backdrop-filter: blur(2px);
    transition: background-color 0.25s ease;
  }

  &[open] {
    display: grid;
    pointer-events: auto;
    position: fixed;
    inset: 0;
    inline-size: 100dvw;
    block-size: 100dvh;
    place-items: center;
    z-index: 1100;
    opacity: 1;
    transform: scale(1);
  }

  @starting-style {
    &[open] {
      opacity: 0;
      transform: scale(0.98);
    }
  }

  &[open]::backdrop {
    background-color: hsl(var(--grey-900-hsl) / 15%);
  }

  @starting-style {
    &[open]::backdrop {
      background-color: hsl(var(--grey-900-hsl) / 0%);
    }
  }
}

.lightbox__figure {
  margin: 0;
  position: relative;
  max-inline-size: min(95vw, 1200px);
  max-block-size: 92dvh;
  display: grid;
  place-items: center;
}

.lightbox__img {
  display: block;
  max-inline-size: 100%;
  max-block-size: 90dvh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0px 0px 0px 15px hsl(var(--red-500-hsl) / 30%), 0 12px 32px hsl(var(--grey-900-hsl) / 30%);
  background: hsl(var(--grey-100-hsl));
}

.lightbox__caption {
  margin-top: 0.5rem;
  text-align: center;
  color: white;
  font-size: 1rem;
  font-weight: 400;
  background: linear-gradient(to top, hsl(var(--red-500-hsl)) 100%, transparent 45%);
}

.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: hsl(0 0% 100% / 85%);
  width: 2.25rem; height: 2.25rem;
  border-radius: 5px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: hsl(var(--blue-550-hsl));
  border: 1px solid hsl(var(--blue-550-hsl));
}

.lightbox__close:hover{
  background: hsl(var(--blue-100-hsl));
  box-shadow: 0 0 0 2px hsl(var(--blue-100-hsl));
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #FFFFFF;
  border: none;
  color: hsl(var(--blue-550-hsl));
  border: 1px solid hsl(var(--blue-550-hsl));
  cursor: pointer;
  padding: 1rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox__prev:hover,
.lightbox__next:hover {
  background: hsl(var(--blue-100-hsl));
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 0 2px hsl(var(--blue-100-hsl));
}

.lightbox__prev {
  left: 1rem; /* place on left side */
}

.lightbox__next {
  right: 1rem; /* place on right side */
}

.lightbox__prev svg,
.lightbox__next svg {
  width: 2rem;
  height: 2rem;
  fill: currentColor;
  pointer-events: none;
  transform: rotate(90deg);
}

.lightbox__next svg{
  transform: rotate(-90deg);
}

.lightbox__close:focus-visible, .lightbox__prev:focus-visible, .lightbox__next:focus-visible {
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}




/* 4.15.X Modals media queries */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
@media (max-width: 688px) {
  .drawer {
    width: calc(100vw - 2.5rem);
  }

  .drawer__body {
    padding: 0 0.5rem 1rem 2rem;
  }
  .drawer__footer {
    padding: 1rem 0.5rem 1rem 2rem;
  }

  .modal {
    width: 100vw;
    height: 100vh;
    max-width: 100dvw;
    max-height: 100dvh;
  }

  .modal__content{
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: unset;
  }

  .modal__body{
    display: flex;
    align-items: center; /* remove this if content should be aligned to top in fullscreen mode */
  }
}

@media (max-width: 480px) {
  .drawer {
    width: calc(100vw - 1.5rem);
  }

  .drawer__body {
    padding: 0 0.5rem 1rem 1rem;
  }
  .drawer__footer {
    padding: 1rem 0.5rem 1rem 1rem;
  }
}



/* 4.16 Projects */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.project-subtitle{
  font-size: 1rem;
  text-wrap: pretty;
  color: hsl(var(--grey-700-hsl));
  line-height: 1.5rem;
  margin-block: 0 2rem;
}

.project-details {
  margin: 2rem 0 1rem 0;
  font-size: 1rem;
  color: hsl(var(--grey-800-hsl));
}

.project-details__row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid hsl(var(--grey-200-hsl));
}

.project-details__row:last-child {
  border-bottom: none;
}

.project-details dt {
  flex: 0 0 110px;
  font-weight: 500;
  color: hsl(var(--grey-800-hsl));
  margin: 0;
}

.project-details dd {
  flex: 1 1 0;
  margin: 0;
  padding-left: 1.2rem;
  color: hsl(var(--grey-700-hsl));
  font-weight: 400;
  line-height: 1.5;
}

.project-details__row:has(dd ~ dd) { /* when there are multiple dd */
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: start;
}

.project-details__row:has(dd ~ dd) dt {
  grid-row: 1 / span 99;
}

.project-details__row:has(dd ~ dd) dd {
  grid-column: 2;
  margin-bottom: 0.5em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid hsl(var(--grey-100-hsl));
  position: relative;
  margin-left: 1.2rem;
  padding-left: 2em;
}

.project-details__row:has(dd ~ dd) dd:last-child {
  padding-bottom: 0;
  border-bottom: none;
  margin-bottom: 0;
}

.project-details__row:has(dd ~ dd) dd::before {
  content: '';
  position: absolute;
  left: 7px;
  top:0;
  transform: translateY(0.5rem);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: hsl(var(--grey-700-hsl));
  box-shadow: 0 0 0 2px #fff, 0 0 0 7px hsl(var(--red-500-hsl) / 10%);
}

.project-details__row dd .bullet-list__item:first-child{
  margin-top: 0;
}

.project-details__row dd .bullet-list__item:last-child{
  margin-bottom: 0;
}

.project-summary, .project-summary-part-1, .project-summary-part-2{
  margin-block: 2rem 0;
}

@media (max-width: 560px) {
  .project-details__row,
  .project-details__row:has(dd ~ dd) {
    display: block;
    padding-bottom: 0;
  }

  .project-details dt {
    flex: none;
    min-width: 0;
    padding-bottom: 0.25rem;
    font-weight: 500;
  }

  .project-details dd {
    padding-left: 0 !important;
    margin-bottom: 0.35em;
  }

  .project-details__row:has(dd ~ dd) dd {
    margin-left: 0;
    padding-left: 2em !important;
  }
  .project-details__row:has(dd ~ dd) dd::before {
    margin-left: 0;
  }
}



/* 4.17 Alerts */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  background: hsl(var(--grey-100-hsl));
  border-radius: 5px;
  padding: 1rem;
  margin: 1.5rem auto;
  gap: 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: hsl(var(--grey-700-hsl));
  max-width: 99vw;
  min-width: 200px;
}

.alert__icon {
  flex-shrink: 0;
  margin-top: 0;
  width: 2.5em;
  height: 2.5em;
}

.alert__content {
  flex: 1;
  margin-top: 0.4rem;
}

.alert__content strong {
  font-weight: 500;
  display: block;
  margin-bottom: 0.2em;
}

.alert__content p {
  margin: 0;
  font-size: 1em;
  color: hsl(var(--grey-800-hsl));
}

.alert.alert--info{
  background: hsl(var(--blue-500-hsl) / 10%);
}

.alert--info strong, .alert--info .alert__icon{
  color: hsl(var(--blue-500-hsl));
}

@media (max-width: 520px) {
  .alert {
    font-size: 0.875rem;
  }
}



/* 4.18 Carousel */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.carousel {
  position: relative;
  margin-block: 2rem 4rem;
  container-type: inline-size;
  display: flex;
  justify-content: center;
}

.carousel--fullwidth{ /* experimental - look at use case in TODO */
  margin-inline: calc(((100vw - 4.5rem - var(--app-screen) - 100cqw) / 2) * -1);
  border: 5px solid #4d4d4d;
  @media (min-width: 1600px) {
    margin-inline: calc(((100vw - 6.75rem - var(--app-screen-large) - 100cqw) / 2) * -1);
  }
  @media (max-width: 767px), (max-width: 1024px) and (orientation: portrait) {
    margin-inline: calc(((100vw - 100cqw) / 2) * -1);
  }
}

.carousel__viewport {
  anchor-name: --igniteCarousel;
  scroll-marker-group: after;
  width: 100%;
  max-width: 720px;
  height: calc(((100cqw / 16) * 9) + 2rem); /* image 405 + caption 25 */
  /* aspect-ratio: 16 / 9; */
  overflow-x: scroll;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  columns: 1;
  text-align: center;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  scrollbar-color: hsl(var(--grey-200-hsl)) #FFF; /* light gray thumb, white track */
  scrollbar-width: thin;
}

.carousel__slide {
  display: inline-block;
  text-align: left;
  margin: 0;
  padding: 0;
  max-width: 100%;
  height: 100%;
  scroll-snap-align: center;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.carousel__slide-figure{
  /* aspect-ratio: 16 / 9; */
}

.carousel__slide-figure img {
  width: 100%;
  object-fit: cover;
  display: block;
  /* aspect-ratio: 16 / 9; */
}

.carousel__slide-figure-caption {
  padding: 0.25rem 1rem;
  color: hsl(var(--grey-700-hsl));
  font-size: 0.875rem;
  text-align: left;
}

.carousel__viewport::column {
  scroll-snap-align: center;
}

.carousel__viewport::scroll-button(*) {
  position: absolute;
  position-anchor: --igniteCarousel;
  height: calc(100% - 2rem);
  border: none;
  transition: background 0.18s, color 0.18s;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  pointer-events: auto;
  background-color: hsl(var(--grey-200-hsl) / 80%);
  color: hsl(var(--blue-550-hsl));
}

.carousel__viewport::scroll-button(left) {
  /* content: "Left";
  content: "❮" / "Scroll left"; */
  content: "◄";
  /* position-area: center left; */
  right: calc(anchor(left) + 0.25rem);
  bottom: calc(anchor(bottom) + 0.5rem);
}

.carousel__viewport::scroll-button(right) {
  /* content: "Right";
  content: "❯" / "Scroll right"; */
  content: "►";
  /* position-area: center right; */
  left: calc(anchor(right) + 0.25rem);
  bottom: calc(anchor(bottom) + 0.5rem);
}

.carousel__viewport::scroll-button(*):hover,
.carousel__viewport::scroll-button(*):focus {
  background-color: hsl(var(--blue-500-hsl) / 20%);
  color: hsl(var(--blue-550-hsl));
}

.carousel__viewport:focus-visible, 
.carousel__viewport::scroll-button(*):focus-visible {
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

.carousel__viewport::scroll-button(*):active {
  translate: 1px 1px;
}

.carousel__viewport::scroll-button(*):disabled {
  background-color: hsl(var(--grey-200-hsl) / 50%);
  color: hsl(var(--blue-550-hsl) / 40%);
  cursor: unset;
}

.carousel__viewport::scroll-marker-group {
  position: absolute;
  position-anchor: --igniteCarousel;
  top: calc(anchor(bottom) + 0.75rem);
  justify-self: anchor-center;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.carousel__viewport::column::scroll-marker {
  content: "";
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: hsl(var(--blue-550-hsl) / 40%);
  box-shadow: 0 0 0 2px #fff, 0 0 0 7px hsl(var(--grey-700-hsl) / 15%);
  transition: background 0.4s;
  pointer-events: auto;
}

.carousel__viewport::column::scroll-marker:target-current {
    background-color: hsl(var(--blue-550-hsl));
}

.carousel__viewport::column::scroll-marker:focus-visible {
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
}

.carousel-support-alert { /* If support for scroll-marker-group is ok, we hide the alert */
  @supports (scroll-marker-group: before) {
    display: none;
  }
}

@media (max-width: 570px) {
  .carousel__viewport::scroll-button(*) {
    padding: 0;
    font-size: 1rem;
  }
}
@container my-drawer (max-width: 830px) {
  .carousel__viewport {
    max-width: calc(100cqw - 2rem);
  }

  .carousel__viewport::scroll-button(*) {
    padding: 0.1rem;
    font-size: 1rem;
  }
}


/* 4.19 Pictures & images */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */

/* 4.19.1 Pictures grid */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.image-gallery-grid__grid{
  --image-gallery-grid-gap: 1rem;
  --image-gallery-grid-radius: 5px;
  --image-gallery-grid-shadow: 0 4px 12px hsl(var(--grey-900-hsl) / 15%);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--image-gallery-grid-gap);
}

.image-gallery-grid__item {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.image-gallery-grid__button {
  all: unset;
  display: block;
  border: none;
  cursor: pointer;
  border-radius: var(--image-gallery-grid-radius);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  background: hsl(var(--grey-200-hsl));
}

@media (hover:hover) and (pointer:fine) {
  .image-gallery-grid__button:hover {
    box-shadow: var(--image-gallery-grid-shadow);
    transform: scale(1.02);
  }
  .image-gallery-grid__button:hover .image-gallery-grid__img {
    transform: scale(1.02);
  }
}

.image-gallery-grid__img {
  display: block;
  width: 100%;
  /* aspect-ratio: 1 / 1; */
  object-fit: cover;
  /* border-radius: 0; */
  transform: scale(1);
  transition: transform 0.3s ease;
  background: hsl(var(--grey-200-hsl));

  height: auto;
  border: 0;
}

.image-gallery-grid__item:not(:has(.image-gallery-grid__button)) .image-gallery-grid__img {
  border-radius: var(--image-gallery-grid-radius);
}

.image-gallery-grid__caption {
  font-size: 0.75rem;
  color: hsl(var(--grey-700-hsl));
  text-align: center;
  margin-top: 0.5rem;
}

/* Gallery grid row modifiers */
/* 1) Single image full-width */
.image-gallery-grid__grid--fr-1 .image-gallery-grid__item:nth-child(1) { grid-column: span 6; }

/* 2) Two images 3/3 */
.image-gallery-grid__grid--fr-3-3 .image-gallery-grid__item:nth-child(1),
.image-gallery-grid__grid--fr-3-3 .image-gallery-grid__item:nth-child(2) { grid-column: span 3; }

/* 3) Two images 4/2 */
.image-gallery-grid__grid--fr-4-2 .image-gallery-grid__item:nth-child(1) { grid-column: span 4; }
.image-gallery-grid__grid--fr-4-2 .image-gallery-grid__item:nth-child(2) { grid-column: span 2; }

/* 4) Two images 2/4 */
.image-gallery-grid__grid--fr-2-4 .image-gallery-grid__item:nth-child(1) { grid-column: span 2; }
.image-gallery-grid__grid--fr-2-4 .image-gallery-grid__item:nth-child(2) { grid-column: span 4; }

/* 5) Two images 5/1 */
.image-gallery-grid__grid--fr-5-1 .image-gallery-grid__item:nth-child(1) { grid-column: span 5; }
.image-gallery-grid__grid--fr-5-1 .image-gallery-grid__item:nth-child(2) { grid-column: span 1; }

/* 6) Six images 1/1/1/1/1/1 (default; included for clarity) */
.image-gallery-grid__grid--fr-1x6 .image-gallery-grid__item:nth-child(-n+6) { grid-column: span 1; }

/* 7) Three images 3/2/1 */
.image-gallery-grid__grid--fr-3-2-1 .image-gallery-grid__item:nth-child(1) { grid-column: span 3; }
.image-gallery-grid__grid--fr-3-2-1 .image-gallery-grid__item:nth-child(2) { grid-column: span 2; }
.image-gallery-grid__grid--fr-3-2-1 .image-gallery-grid__item:nth-child(3) { grid-column: span 1; }

/* 8) Three images 1/2/3 */
.image-gallery-grid__grid--fr-1-2-3 .image-gallery-grid__item:nth-child(1) { grid-column: span 1; }
.image-gallery-grid__grid--fr-1-2-3 .image-gallery-grid__item:nth-child(3) { grid-column: span 2; }
.image-gallery-grid__grid--fr-1-2-3 .image-gallery-grid__item:nth-child(2) { grid-column: span 3; }

/* 9) Three images 4/1/1 */
.image-gallery-grid__grid--fr-4-1-1 .image-gallery-grid__item:nth-child(1) { grid-column: span 4; }
.image-gallery-grid__grid--fr-4-1-1 .image-gallery-grid__item:nth-child(2), 
.image-gallery-grid__grid--fr-4-1-1 .image-gallery-grid__item:nth-child(3) { grid-column: span 1; }

/* 10) Three images 2/2/2 */
.image-gallery-grid__grid--fr-2-2-2 .image-gallery-grid__item:nth-child(1) { grid-column: span 2; }
.image-gallery-grid__grid--fr-2-2-2 .image-gallery-grid__item:nth-child(3) { grid-column: span 2; }
.image-gallery-grid__grid--fr-2-2-2 .image-gallery-grid__item:nth-child(2) { grid-column: span 2; }

/* fr-1 => first row items: 1 */
.image-gallery-grid__grid--fr-1 .image-gallery-grid__item:nth-child(1) .image-gallery-grid__button,
.image-gallery-grid__grid--fr-1 .image-gallery-grid__item:nth-child(1) .image-gallery-grid__img { height: 100%; }
/* fr-3-3 / fr-4-2 / fr-2-4 / fr-5-1 => first row items: 1..2 */
.image-gallery-grid__grid--fr-3-3 .image-gallery-grid__item:nth-child(-n+2) .image-gallery-grid__button,
.image-gallery-grid__grid--fr-3-3 .image-gallery-grid__item:nth-child(-n+2) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-4-2 .image-gallery-grid__item:nth-child(-n+2) .image-gallery-grid__button,
.image-gallery-grid__grid--fr-4-2 .image-gallery-grid__item:nth-child(-n+2) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-2-4 .image-gallery-grid__item:nth-child(-n+2) .image-gallery-grid__button,
.image-gallery-grid__grid--fr-2-4 .image-gallery-grid__item:nth-child(-n+2) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-5-1 .image-gallery-grid__item:nth-child(-n+2) .image-gallery-grid__button,
.image-gallery-grid__grid--fr-5-1 .image-gallery-grid__item:nth-child(-n+2) .image-gallery-grid__img { height: 100%; }
/* fr-3-image variants => first row items: 1..3 */
.image-gallery-grid__grid--fr-3-2-1 .image-gallery-grid__item:nth-child(-n+3) .image-gallery-grid__button,
.image-gallery-grid__grid--fr-3-2-1 .image-gallery-grid__item:nth-child(-n+3) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-1-2-3 .image-gallery-grid__item:nth-child(-n+3) .image-gallery-grid__button,
.image-gallery-grid__grid--fr-1-2-3 .image-gallery-grid__item:nth-child(-n+3) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-4-1-1 .image-gallery-grid__item:nth-child(-n+3) .image-gallery-grid__button,
.image-gallery-grid__grid--fr-4-1-1 .image-gallery-grid__item:nth-child(-n+3) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-2-2-2 .image-gallery-grid__item:nth-child(-n+3) .image-gallery-grid__button,
.image-gallery-grid__grid--fr-2-2-2 .image-gallery-grid__item:nth-child(-n+3) .image-gallery-grid__img { height: 100%; }
/* fr-25x4 => first row items: 1..4 */
.image-gallery-grid__grid--fr-1x6 .image-gallery-grid__item:nth-child(-n+6) .image-gallery-grid__button,
.image-gallery-grid__grid--fr-1x6 .image-gallery-grid__item:nth-child(-n+6) .image-gallery-grid__img { height: 100%; }
/* Ensure image covers when filling height */
.image-gallery-grid__grid[class*="--fr-"] .image-gallery-grid__item .image-gallery-grid__img { object-fit: cover; }
/* ========== ROW 2+ : force square tiles ========== */
/* We must start squares AFTER the number of first-row items for each variant. */
/* fr-1 => from item 2 onward */
.image-gallery-grid__grid--fr-1 .image-gallery-grid__item:nth-child(n+2) .image-gallery-grid__img { aspect-ratio: 1 / 1; height: auto; }
/* fr-3-3 / fr-4-2 / fr-2-4 / fr-5-1 => from item 3 onward */
.image-gallery-grid__grid--fr-3-3 .image-gallery-grid__item:nth-child(n+3) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-4-2 .image-gallery-grid__item:nth-child(n+3) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-2-4 .image-gallery-grid__item:nth-child(n+3) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-5-1 .image-gallery-grid__item:nth-child(n+3) .image-gallery-grid__img { aspect-ratio: 1 / 1; height: auto; }
/* 3-image variants => from item 4 onward */
.image-gallery-grid__grid--fr-3-2-1 .image-gallery-grid__item:nth-child(n+4) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-1-2-3 .image-gallery-grid__item:nth-child(n+4) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-4-1-1 .image-gallery-grid__item:nth-child(n+4) .image-gallery-grid__img,
.image-gallery-grid__grid--fr-2-2-2 .image-gallery-grid__item:nth-child(n+4) .image-gallery-grid__img { aspect-ratio: 1 / 1; height: auto; }
/* fr-1x6 => from item 5 onward */
.image-gallery-grid__grid--fr-1x6 .image-gallery-grid__item:nth-child(n+5) .image-gallery-grid__img { aspect-ratio: 1 / 1; height: auto; }



/* 4.19.2 Pictures flex */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */

.image-gallery-flex__grid {
  --image-gallery-flex-radius: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* Space between images */
  justify-content: space-evenly;
  width: 100%;
}

.image-gallery-flex__grid > * {
  display: flex; /* allows images to stretch */
  align-items: stretch; /* ensures equal height */
}

.image-gallery-flex__item {
  flex: 1; /* All items grow and shrink equally - overrule with individual colspecs */
  min-width: 0; /* Prevents overflow issues with long content */
  max-height: 350px; /* You can set a fixed height here */
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
}

/* no max height for images */
.image-gallery-flex__item--nomax {
  max-height: unset;
}

/* grey border, for individual images */
.image-gallery-flex__item--grey-border img{
  border-radius: 0.5em;
  border: 5px solid hsl(var(--grey-500-hsl) / 5%);
}

.image-gallery-flex__button {
  all: unset;
  display: block;
  border: none;
  cursor: pointer;
  border-radius: var(--image-gallery-flex-radius);
  overflow: clip;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* stretches the images to full height - sometimes nice */
.image-gallery-flex__button--stretch { 
  width: 100% !important;
  height: 100% !important;
}

.image-gallery-flex__img {
  object-fit: cover;
  object-position: center;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
  transform: scale(1);
}

.image-gallery-flex__caption{
  font-size: 0.75rem;
  color: hsl(var(--grey-700-hsl));
  text-align: center;
}

/* Width modifiers based on flex grow factors */
.image-gallery-flex__item--col-1 { flex: 1; }
.image-gallery-flex__item--col-2 { flex: 2; }
.image-gallery-flex__item--col-3 { flex: 3; }
.image-gallery-flex__item--col-4 { flex: 4; }

@media (max-width: 640px) {
  .image-gallery-flex__grid {
    flex-wrap: wrap; /* Already active, but good to be explicit */
    justify-content: flex-start; /* Optional: Aligns items to the start of the line */
  }

  .image-gallery-flex__item--col-2,
  .image-gallery-flex__item--col-3,
  .image-gallery-flex__item--col-4 {
    flex: 1 1 100%;
    max-height: none; /* Allows the height to be dynamic for single, full-width images */
  }
}

@media (hover: hover) and (pointer: fine) {
  .image-gallery-flex__item:has(.image-gallery-flex__button):hover .image-gallery-flex__img {
    cursor: pointer;
    transform: scale(1.02);
  }

  .image-gallery-flex__button:hover{
    box-shadow: 0 4px 12px hsl(var(--grey-900-hsl) / 15%);
    cursor: pointer;
    transform: scale(1.02);
  }
}


/* 4.20 CTA */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.cta {
  margin-block: 3rem;
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -0.75rem;
  width: 4px;
  height: 100%;
  border-radius: 0% 0% 2px 2px;
  background-color: hsl(var(--grey-300-hsl));
}

.cta__title {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: hsl(var(--grey-800-hsl));
  position: relative;
}

.cta__title::before {
  content: '';
  position: absolute;
  top: 0;
  left: -0.75rem;
  width: 4px;
  height: 100%;
  border-radius: 2px 2px 0 0;
  background-color: hsl(var(--red-500-hsl));
  border-bottom: 4px solid hsl(var(--grey-035-hsl));
}

.cta__title mark {
  color: inherit;  
  background: linear-gradient(to top, hsl(var(--red-500-hsl) / 25%) 45%, transparent 45%);
  display: initial;
}

.cta__description {
  font-size: 1rem;
  text-wrap: pretty;
  color: hsl(var(--grey-700-hsl));
  line-height: 1.5rem;
  margin-block: 0;
}

.cta__link {
  color: hsl(var(--blue-550-hsl));
  background: none;
  text-decoration-line: underline;
  text-decoration-color: hsl(var(--blue-550-hsl) / 50%);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition:
    text-decoration-color 0.3s ease,
    text-decoration-thickness 0.3s ease,
    color 0.3s ease;
}

.cta__icon {
  width: 2em;
  height: 2em;
  vertical-align: middle;
  margin-left: 0.25em;
  transform: rotate(-90deg);
  transition: transform 0.3s ease;
  color: hsl(var(--blue-550-hsl));
  fill: currentColor;
}

.cta__link:hover {
  text-decoration-color: hsl(var(--blue-550-hsl) / 90%);
  text-decoration-thickness: 2.5px;
}

.cta__link:focus-visible {
  color: hsl(var(--grey-800-hsl));
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

.cta__link:hover .cta__icon {
  transform: translateX(2px) rotate(-90deg);
}


/* 4.21 Quote / callout */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.quote-section__blockquote{
  margin-block: 3rem;
  position: relative;
}

.quote-section__blockquote::before {
  content: '';
  position: absolute;
  top: 0.1rem;
  left: -0.75rem;
  width: 4px;
  height: 100%;
  border-radius: 2px 2px 2px 2px;
  background-color: hsl(var(--red-500-hsl));
}

.quote-section__blockquote--grey::before {
  background-color: hsl(var(--grey-300-hsl));
}

.quote-section__blockquote--blue::before {
  background-color: hsl(var(--blue-500-hsl));
}

.quote-section__text{
  font-size: 1.1em;
  color: hsl(var(--grey-700-hsl));
  line-height: 1.75rem;
}

.quote-section__author{
  display: block;
  font-size: 0.85rem;
  color: hsl(var(--grey-800-hsl));
  font-weight: 500;
}

.quote-section__job-title{
  display: block;
  font-size: 0.85rem;
  color: hsl(var(--grey-700-hsl));
}


/* 4.22 Article image rail / scrollspy (large screens) */
.article-visuals {
  padding-top: 6rem;
  padding-bottom: 25vh;
  padding-inline: clamp(1.5rem, 3vw, 5rem);
  scrollbar-color: hsl(var(--grey-300-hsl)) hsl(var(--grey-100-hsl));
  scrollbar-width: thin;
  overflow-y: auto;
  height: 100vh;
/*  scroll-target-group: auto;
  scroll-snap-type: y mandatory;*/
  position: relative;
  z-index: 100;
}

#table-of-contents {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: min(720px, 100%);
  margin-inline: auto;
  display: grid;
  gap: 1rem;
}

.article-visuals__item{
  position: relative;
}

#table-of-contents .article-visuals__item a{
  border-radius: 8px;
  opacity: 1;
  transition: color 0.3s, opacity 0.3s;
  cursor: pointer;
  display: block;
/*  scroll-snap-align: start; */
  background: hsl(var(--grey-100-hsl));
  box-shadow: 0 8px 24px hsl(var(--grey-900-hsl, 0 0% 10%) / 15%);
  transition: box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease-in-out;
  transform: scale(0.98);
}

#table-of-contents .article-visuals__item a:hover,
#table-of-contents .article-visuals__item a:focus,
#table-of-contents .article-visuals__item a:focus-visible {
  box-shadow: 0 4px 12px hsl(var(--grey-900-hsl) / 15%);
  cursor: pointer;
  transform: scale(1.02);
  background-color: #fff;
}

#table-of-contents .article-visuals__item a.active {
  box-shadow: 0px 0px 0px 15px hsl(var(--red-500-hsl) / 30%), 0 12px 32px hsl(var(--grey-900-hsl) / 30%);
  text-decoration: none;
  opacity: 1;
  background-color: #FFFFFF;
  transform: scale(1);
  margin-block: 2rem;
}

.article-visuals__img {
  display: block;
  width: 100%;
  height: auto;
  /* aspect-ratio: 16 / 9; */
  object-fit: cover;
  opacity: 0.4;
  user-select: none;
  pointer-events: none;  /* Prevent image interfering with link clicks */
  border-radius: 8px;
  transition: opacity 0.6s ease;
}

.article-visuals__btn{
  position: absolute;
  bottom: 2rem;
  right: 0;
  width: 3rem;
  height: 3rem;
  background-color: hsl(var(--red-500-hsl));
  color: #FFFFFF;
  font-size: 18px;
  border: none;
  cursor: pointer;
  padding: 0;
  border-bottom-right-radius: 8px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  display: none;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
 }

.article-visuals__btn:hover{
  background-color: hsl(var(--red-500-hsl) / 80%);
}

#table-of-contents .article-visuals__item a:focus-visible {
  outline: 4px solid hsl(var(--blue-500-hsl) / 50%);
  outline-offset: 2px;
  border-radius: 4px;
}

#table-of-contents .article-visuals__btn:focus-visible{
  background-color: hsl(var(--blue-500-hsl) / 80%);
}

.article-visuals__icon{
  color: #FFFFFF;
  fill: currentColor;
  width: 80%;
  padding-left: 1rem;
  padding-top: 1rem;
}

#table-of-contents .article-visuals__item a.active .article-visuals__img {
  opacity: 1;
}

.article-visuals__item:has(a.active) .article-visuals__btn {
  display: flex;
}

/* Hide rail on narrow screens; rely on inline <figure> inside the article */
@media (max-width: 1024px) {
  .article-visuals { display: none; }
}













/* 5. Utilities (helper classes, spacing, screen readers) */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .show-on-mobile {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
}

.mlxl{
  margin-left: 7.5rem !important;
}

.mb-0{
  margin-bottom: 0 !important;
}

.mt-0{
  margin-top: 0 !important;
}

.mt-1{
  margin-top: 1rem !important;
}

.mt-2{
  margin-top: 2rem !important;
}

.mt-3{
  margin-top: 3rem !important;
}

.my-0{
  margin-block: 0 !important;
}

.my-1{
  margin-block: 1rem !important;
}

.my-2{
  margin-block: 2rem !important;
}

.break-lg {display: inline;}
.break-sm {display: none;}

.text-700{
  color: hsl(var(--grey-700-hsl)) !important;
}

.text-800{
  color: hsl(var(--grey-800-hsl)) !important;
}

.text-900{
  color: hsl(var(--grey-900-hsl)) !important;
}

@container my-main (max-width: 560px){
  .mlxl{margin-left: unset !important;}
  .break-lg {display: none;}
  .break-sm {display: inline;}
}



/* 6. Transitions and Animations */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
@view-transition {
  navigation: auto;
}

/* 6.1 View Transitions: Nav Indicator */
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------- */
.nav__item--active::before {
  view-transition-name: nav-indicator-bg;
}

.nav__item--active::after {
  view-transition-name: nav-indicator-bar;
}

@keyframes fade-in {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fade-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.8); }
}

::view-transition-old(nav-indicator-bar),
::view-transition-old(nav-indicator-bg) {
  animation: fade-out 1.3s ease;
}

::view-transition-new(nav-indicator-bar),
::view-transition-new(nav-indicator-bg) {
  animation: fade-in 1.3s ease;
}
