@import url('https://fonts.googleapis.com/css2?family=Dela+Gothic+One&display=swap');

:root {
  color-scheme: dark;
  --color-cream: #f3eadb;
  --color-anthracite: #1a1a1f;
  --color-light-grey: #cfcfcf;
  --color-bg: var(--color-anthracite);
  --color-surface: rgba(26, 26, 31, 0.92);
  --color-overlay: rgba(26, 26, 31, 0.84);
  --color-border: rgba(243, 234, 219, 0.18);
  --color-border-strong: rgba(243, 234, 219, 0.36);
  --color-text: var(--color-cream);
  --color-text-subtle: var(--color-light-grey);
  --color-text-muted: var(--color-light-grey);
  --color-icon: var(--color-cream);
  --color-shadow: rgba(26, 26, 31, 0.6);
  --color-shadow-soft: rgba(26, 26, 31, 0.45);
  --color-pill-fill: var(--color-cream);
  --color-pill-text: var(--color-anthracite);
  --color-pill-stroke: var(--color-cream);
  --color-toggle-bg: var(--color-pill-fill);
  --color-toggle-border: var(--color-pill-stroke);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-width: none;
}

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -ms-overflow-style: none;
  scrollbar-width: none;
  transition: background 0.45s ease, color 0.45s ease;
}

body.theme-dark {
  color-scheme: dark;
}

body.theme-light {
  color-scheme: light;
  --color-light-grey: #8c8c8c;
  --color-bg: var(--color-cream);
  --color-surface: rgba(243, 234, 219, 0.92);
  --color-overlay: rgba(243, 234, 219, 0.82);
  --color-border: rgba(26, 26, 31, 0.16);
  --color-border-strong: rgba(26, 26, 31, 0.35);
  --color-text: var(--color-anthracite);
  --color-text-subtle: var(--color-light-grey);
  --color-text-muted: var(--color-light-grey);
  --color-icon: var(--color-anthracite);
  --color-shadow: rgba(26, 26, 31, 0.15);
  --color-shadow-soft: rgba(26, 26, 31, 0.12);
  --color-pill-fill: var(--color-anthracite);
  --color-pill-text: var(--color-cream);
  --color-pill-stroke: var(--color-anthracite);
  --color-toggle-bg: var(--color-pill-fill);
  --color-toggle-border: var(--color-pill-stroke);
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  pointer-events: none;
  z-index: 170;
  background: transparent;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.scroll-progress__bar {
  width: 100%;
  height: 100%;
  background: var(--color-text);
  transform-origin: top center;
  transform: scaleY(0);
  will-change: transform;
  transition: transform 0.2s ease-out;
  opacity: 0.85;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-overlay);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(0.5rem, 1.5vw, 0.85rem) clamp(0.85rem, 3vw, 1.4rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'identity nav actions';
  align-items: center;
  column-gap: clamp(0.75rem, 2.4vw, 2.5rem);
}

.topbar__identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  grid-area: identity;
}

.topbar__title {
  font-size: clamp(0.85rem, 1.8vw, 1.45rem);
  font-family: 'Dela Gothic One', 'Raleway', 'Outfit', 'DM Sans', system-ui,
    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: font-weight 0.25s ease;
}

.topbar__title:hover,
.topbar__title:focus-visible {
  font-weight: 300;
}

.topbar__subtitle {
  font-family: 'Outfit', 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: clamp(0.6rem, 1.2vw, 0.8rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.topbar__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.6rem, 2.2vw, 1.6rem);
  grid-area: nav;
}

.topbar__nav-link {
  border: 2px solid var(--color-pill-stroke);
  border-radius: 999px;
  background: var(--color-pill-fill);
  color: var(--color-pill-text);
  padding: 0.4rem clamp(0.95rem, 2.6vw, 1.4rem);
  font-family: 'Dela Gothic One', 'Raleway', 'Outfit', 'DM Sans', system-ui,
    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: clamp(0.75rem, 1.9vw, 1rem);
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    -webkit-text-stroke 0.25s ease;
  -webkit-text-stroke: 0 transparent;
  box-shadow: none;
}

.topbar__nav-link:hover,
.topbar__nav-link:focus-visible,
.topbar__nav-link.is-active {
  background: transparent;
  border-color: var(--color-pill-stroke);
  color: var(--color-pill-stroke);
}

@supports (-webkit-text-stroke: 1px currentColor) {
  .topbar__nav-link:hover,
  .topbar__nav-link:focus-visible,
  .topbar__nav-link.is-active {
    color: transparent;
    -webkit-text-stroke: 1.1px var(--color-pill-stroke);
  }
}

.topbar__nav-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-border-strong);
}

.topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.45rem, 1.8vw, 0.9rem);
  grid-area: actions;
  justify-self: end;
}

.topbar__theme-toggle,
.topbar__about {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid var(--color-pill-stroke);
  background: var(--color-pill-fill);
  color: var(--color-pill-text);
  padding: clamp(0.35rem, 1vw, 0.45rem);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  isolation: isolate;
}

.topbar__theme-toggle:hover,
.topbar__theme-toggle:focus-visible,
.topbar__about:hover,
.topbar__about:focus-visible {
  background: transparent;
  color: var(--color-pill-stroke);
  border-color: var(--color-pill-stroke);
}

.topbar__theme-toggle:focus-visible,
.topbar__about:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-border-strong);
}

.topbar__theme-toggle .icon,
.topbar__about .icon {
  color: inherit;
}

.topbar__theme-toggle .icon--theme__sun,
.topbar__theme-toggle .icon--theme__moon {
  fill: currentColor;
  stroke: currentColor;
}

.topbar__theme-toggle .icon--theme__sun {
  stroke-width: 0;
}

.topbar__theme-toggle .icon--theme__rays line {
  stroke: currentColor;
}

.topbar__theme-toggle .icon--theme__moon {
  stroke-width: 1.6;
}

.topbar__theme-toggle .icon {
  width: clamp(1.4rem, 3vw, 1.55rem);
  height: clamp(1.4rem, 3vw, 1.55rem);
}

.topbar__about {
  width: clamp(2.45rem, 5vw, 2.75rem);
  height: clamp(2.45rem, 5vw, 2.75rem);
}

.topbar__about .icon {
  width: clamp(1.4rem, 3.3vw, 1.6rem);
  height: clamp(1.4rem, 3.3vw, 1.6rem);
}

.topbar__contact-button {
  width: auto;
  height: auto;
  padding: clamp(0.35rem, 1.2vw, 0.55rem) clamp(0.9rem, 2.2vw, 1.35rem);
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  min-width: 9.5ch;
}

.topbar__contact-button .icon {
  display: none;
}

@media (max-width: 760px) {
  .topbar__inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'identity actions'
      'nav nav';
    row-gap: 0.8rem;
    align-items: start;
  }

  .topbar__identity {
    align-items: flex-start;
    text-align: left;
  }

  .topbar__actions {
    justify-content: flex-end;
    align-self: start;
  }

  .topbar__nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: clamp(0.4rem, 1.8vw, 0.9rem);
  }

  .topbar__nav-link {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0.38rem clamp(0.45rem, 2.3vw, 0.7rem);
    font-size: clamp(0.58rem, 3.1vw, 0.78rem);
    letter-spacing: 0.06em;
    white-space: nowrap;
    word-break: keep-all;
  }
}

@media (max-width: 520px) {
  .topbar__nav {
    gap: clamp(0.25rem, 1.4vw, 0.6rem);
  }

  .topbar__nav-link {
    padding: 0.28rem clamp(0.25rem, 1.6vw, 0.45rem);
    font-size: clamp(0.44rem, 3.2vw, 0.6rem);
    letter-spacing: 0.036em;
    border-width: 1.5px;
  }

  .topbar__nav-link:hover,
  .topbar__nav-link:focus-visible,
  .topbar__nav-link.is-active {
    border-width: 1.5px;
  }

  @supports (-webkit-text-stroke: 1px currentColor) {
    .topbar__nav-link:hover,
    .topbar__nav-link:focus-visible,
    .topbar__nav-link.is-active {
      -webkit-text-stroke: 0.85px var(--color-pill-stroke);
    }
  }

  .topbar__nav-link:focus-visible {
    box-shadow: 0 0 0 1.4px var(--color-border-strong);
  }
}

@media (max-width: 400px) {
  .topbar__nav-link {
    padding: 0.24rem clamp(0.2rem, 1.4vw, 0.35rem);
    font-size: clamp(0.4rem, 3.8vw, 0.55rem);
    letter-spacing: 0.03em;
  }

  .topbar__nav-link:focus-visible {
    box-shadow: 0 0 0 1.2px var(--color-border-strong);
  }
}

@media (max-width: 340px) {
  .topbar__nav {
    gap: clamp(0.18rem, 1vw, 0.35rem);
  }

  .topbar__nav-link {
    padding: 0.22rem clamp(0.18rem, 1.2vw, 0.3rem);
    font-size: clamp(0.36rem, 3.6vw, 0.5rem);
    letter-spacing: 0.025em;
  }
}

.icon {
  display: inline-flex;
  width: 100%;
  height: 100%;
  color: var(--color-icon);
  transition: transform 0.3s ease;
}

.icon:hover,
.icon:focus-visible {
  transform: scale(1.05);
}

.icon path,
.icon line,
.icon circle,
.icon polyline {
  transition: stroke 0.3s ease, fill 0.3s ease;
}

.icon--theme {
  width: clamp(1.4rem, 3vw, 1.55rem);
  height: clamp(1.4rem, 3vw, 1.55rem);
}

.icon--theme__sun {
  fill: currentColor;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.icon--theme__moon {
  fill: currentColor;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.icon--theme__rays line {
  stroke: currentColor;
  stroke-width: 1.6;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.theme-light .icon--theme__sun,
body.theme-light .icon--theme__rays line {
  opacity: 1;
}

body.theme-light .icon--theme__moon {
  opacity: 0;
}

.portfolio {
  flex: 1;
  padding: 30px 0 7rem;
}

.projects__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: clamp(0.85rem, 1.6vw, 0.95rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.85;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
  min-height: 1.5rem;
  margin-bottom: clamp(1.2rem, 4vw, 2rem);
}

.projects__loading.is-hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.projects__loading-text {
  display: inline-block;
  min-width: 7ch;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 7vw, 4rem);
}

.project {
  position: relative;
  display: none;
  flex-direction: column;
  gap: clamp(0.75rem, 2vw, 1.1rem);
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

.project.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

body.category-film .project[data-category='film'],
body.category-photo .project[data-category='photo'],
body.category-evenementiel .project[data-category='evenementiel'] {
  display: flex;
}

.media-strip {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  height: clamp(210px, 30vw, 360px);
}

.media-track {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  width: max-content;
  will-change: transform;
  transform: translateZ(0);
  min-height: 100%;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.project--loading .media-track {
  opacity: 0;
}

.project--hydrated .media-track {
  opacity: 1;
}

.placeholder {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: 0;
  box-shadow: 0 20px 40px var(--color-shadow);
  cursor: pointer;
  overflow: hidden;
  --placeholder-image: none;
  --placeholder-animated: var(--placeholder-image);
  background-color: var(--color-surface);
  background-image: var(--placeholder-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.placeholder__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  filter: saturate(0.8) contrast(1.05);
}

.placeholder[data-video].is-active .placeholder__video,
.placeholder--video .placeholder__video {
  opacity: 1;
}

.placeholder--video {
  background-image: none;
  background-color: var(--color-surface);
}

.placeholder--video:not(.project-hero__media)::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(2.8rem, 8vw, 4rem);
  height: clamp(2.8rem, 8vw, 4rem);
  border-radius: 999px;
  border: 2px solid rgba(243, 234, 219, 0.85);
  background: rgba(26, 26, 31, 0.58);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.placeholder--video:not(.project-hero__media)::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  border-left: clamp(1rem, 3vw, 1.4rem) solid var(--color-cream);
  border-top: clamp(0.65rem, 1.9vw, 1.05rem) solid transparent;
  border-bottom: clamp(0.65rem, 1.9vw, 1.05rem) solid transparent;
  transform: translate(calc(-50% + clamp(0.12rem, 0.5vw, 0.2rem)), -50%);
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.3s ease;
}

.portfolio .media-strip .placeholder--video:not(.project-hero__media)::before,
.portfolio .media-strip .placeholder--video:not(.project-hero__media)::after {
  display: none;
}

.placeholder--video:not(.project-hero__media):is(:hover, :focus-visible)::before,
.placeholder--video:not(.project-hero__media):is(:hover, :focus-visible)::after {
  opacity: 0;
}

.project-detail__gallery .placeholder--video::before,
.project-detail__gallery .placeholder--video::after {
  display: none;
}

.project-detail__item .placeholder__image {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}

.project-detail__item .placeholder__video {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.portfolio .placeholder {
  border-radius: 3px;
}

.placeholder:focus-visible {
  outline: 3px solid var(--color-border-strong);
  outline-offset: 4px;
}

.media-track .placeholder {
  flex: 0 0 clamp(330px, 42vw, 540px);
  height: 100%;
  min-height: clamp(210px, 30vw, 360px);
  max-height: clamp(210px, 30vw, 360px);
}

.media-track
  .placeholder[data-still]:not([data-animated]):not([data-video]):not(.placeholder--video) {
  background-position: top center;
}

body.category-film
  .project[data-category="film"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  ),
body.category-film
  .project-detail[data-category="film"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  ) {
  background-position: center center;
}

body.category-film
  .project[data-category="film"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__image,
body.category-film
  .project[data-category="film"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__video,
body.category-film
  .project-detail[data-category="film"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__image,
body.category-film
  .project-detail[data-category="film"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__video {
  object-position: center center;
}

body.category-photo
  .project[data-category="photo"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  ),
body.category-photo
  .project-detail[data-category="photo"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  ) {
  background-position: top center;
}

body.category-photo
  .project[data-category="photo"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__image,
body.category-photo
  .project[data-category="photo"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__video,
body.category-photo
  .project-detail[data-category="photo"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__image,
body.category-photo
  .project-detail[data-category="photo"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__video {
  object-position: top center;
}

body.category-evenementiel
  .project[data-category="evenementiel"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  ),
body.category-evenementiel
  .project-detail[data-category="evenementiel"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  ) {
  background-position: center center;
}

body.category-evenementiel
  .project[data-category="evenementiel"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__image,
body.category-evenementiel
  .project[data-category="evenementiel"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__video,
body.category-evenementiel
  .project-detail[data-category="evenementiel"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__image,
body.category-evenementiel
  .project-detail[data-category="evenementiel"]
  .placeholder:not(.placeholder--video):is(
    [data-still$=".png" i],
    [data-still$=".jpg" i],
    [data-still$=".jpeg" i],
    [data-animated$=".png" i],
    [data-animated$=".jpg" i],
    [data-animated$=".jpeg" i]
  )
  .placeholder__video {
  object-position: center center;
}

.placeholder:is(:hover, :focus-visible) {
  background-image: var(--placeholder-animated);
}

.transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
  z-index: 180;
}

.transition-overlay.is-active {
  opacity: 1;
}

.transition-overlay--title {
  display: flex;
  align-items: center;
  justify-content: center;
}

.transition-overlay__title {
  font-family: 'Raleway', 'Outfit', 'DM Sans', system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(2rem, 6vw, 5.5rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text);
  text-align: center;
  font-weight: 900;
  font-variation-settings: 'wght' 900;
}

.placeholder--transition {
  pointer-events: none;
  z-index: 220;
}

body.is-transitioning {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: rgba(26, 26, 31, 0.82);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 260;
}

.lightbox.is-active {
  visibility: visible;
  pointer-events: auto;
}

.lightbox.is-visible {
  opacity: 1;
}

.lightbox__content {
  position: relative;
  display: grid;
  align-items: flex-start;
  justify-content: center;
  justify-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(0.75rem, 2.5vw, 1.8rem);
  max-width: min(94vw, 1180px);
  transform: scale(0.94);
  transition: transform 0.35s ease;
}

.lightbox.is-visible .lightbox__content {
  transform: scale(1);
}

.lightbox__media {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(92vw, 1080px);
  max-width: 100%;
  height: auto;
  max-height: min(82vh, 900px);
  background: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  grid-column: 1;
  justify-self: center;
  margin: 0 auto;
}

.lightbox__media .placeholder__video {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent;
  pointer-events: auto;
}

.lightbox__media.placeholder--video::before,
.lightbox__media.placeholder--video::after {
  display: none;
}

.lightbox__media img,
.lightbox__media video {
  display: block;
  width: 100%;
  height: auto;
  max-width: min(92vw, 1080px);
  max-height: min(82vh, 900px);
  object-fit: contain;
  margin: 0 auto;
}

.lightbox__close {
  position: static;
  transform: scale(var(--lightbox-close-scale));
  width: clamp(2.2rem, 5vw, 2.8rem);
  height: clamp(2.2rem, 5vw, 2.8rem);
  border-radius: 999px;
  border: none;
  background: rgba(26, 26, 31, 0.75);
  color: var(--color-cream);
  font-family: 'Dela Gothic One', 'Outfit', 'DM Sans', system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.3s ease,
    opacity 0.3s ease;
  --lightbox-close-scale: 1;
  will-change: transform;
  align-self: flex-start;
  justify-self: flex-start;
  grid-column: 2;
  grid-row: 1;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: rgba(26, 26, 31, 0.9);
  color: var(--color-cream);
  outline: none;
  --lightbox-close-scale: 1.05;
}

.lightbox__close:active {
  --lightbox-close-scale: 0.96;
}

.lightbox__close-icon {
  position: relative;
  width: 52%;
  height: 52%;
}

.lightbox__close-icon::before,
.lightbox__close-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 12%;
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
  transition: transform 0.3s ease;
}

.lightbox__close-icon::before {
  transform: translateY(-50%) rotate(45deg);
}

.lightbox__close-icon::after {
  transform: translateY(-50%) rotate(-45deg);
}

.lightbox__close:hover .lightbox__close-icon::before,
.lightbox__close:focus-visible .lightbox__close-icon::before {
  transform: translateY(-50%) scaleX(1.05) rotate(45deg);
}

.lightbox__close:hover .lightbox__close-icon::after,
.lightbox__close:focus-visible .lightbox__close-icon::after {
  transform: translateY(-50%) scaleX(1.05) rotate(-45deg);
}

@media (max-width: 640px) {
  .lightbox__content {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(0.6rem, 4vw, 1.4rem);
  }

  .lightbox__close {
    grid-column: 1;
    justify-self: flex-end;
  }

  .lightbox__media {
    grid-column: 1;
    justify-self: center;
  }
}

.media-strip__control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(2.75rem, 9vw, 3.75rem);
  height: clamp(2.75rem, 9vw, 3.75rem);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  font: inherit;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(26, 26, 31, 0.82);
  color: var(--color-text);
  box-shadow: 0 16px 36px var(--color-shadow);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease,
    color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  touch-action: none;
  z-index: 3;
}

.media-strip[data-controls-ready='true'] .media-strip__control {
  display: flex;
  opacity: 0;
}

.media-strip[data-controls-ready='true']:hover .media-strip__control,
.media-strip[data-controls-ready='true'] .media-strip__control:focus-visible,
.media-strip[data-controls-ready='true'] .media-strip__control.is-active {
  opacity: 1;
}

.media-strip__control svg {
  width: 44%;
  height: 44%;
  pointer-events: none;
}

.media-strip__control--left {
  left: clamp(0.85rem, 5vw, 3rem);
}

.media-strip__control--right {
  right: clamp(0.85rem, 5vw, 3rem);
}

.media-strip__control:is(:hover, :focus-visible),
.media-strip__control.is-active {
  transform: translateY(-50%) scale(1.05);
  background: rgba(26, 26, 31, 0.95);
  border-color: var(--color-border-strong);
  color: var(--color-text);
  box-shadow: 0 22px 42px var(--color-shadow);
}

.media-strip__control:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: 3px;
}

.media-strip--touch .media-strip__control {
  opacity: 1;
  display: flex;
  background: rgba(26, 26, 31, 0.72);
  border-width: 1px;
}

.media-strip--touch .media-strip__control:is(:active, .is-active) {
  transform: translateY(-50%) scale(0.96);
}

.media-strip--touch .media-track {
  touch-action: pan-y;
}

@media (max-width: 600px) {
  .media-strip__control {
    width: clamp(2.6rem, 14vw, 3.25rem);
    height: clamp(2.6rem, 14vw, 3.25rem);
    box-shadow: 0 12px 30px var(--color-shadow-soft);
  }

  .media-strip__control--left {
    left: clamp(0.7rem, 6vw, 2.2rem);
  }

  .media-strip__control--right {
    right: clamp(0.7rem, 6vw, 2.2rem);
  }
}

.project-detail-page {
  background: var(--color-bg);
}

.project-detail {
  position: relative;
  padding: 30px 0 6rem;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 8vw, 4.5rem);
}

.project-hero {
  display: flex;
  justify-content: center;
  width: 100%;
}

.project-hero__media {
  --hero-aspect: 16 / 9;
  width: min(95vw, 1200px);
  aspect-ratio: var(--hero-aspect, 16 / 9);
  margin: 0 auto;
  transform: translateZ(0);
  position: relative;
  display: block;
  border-radius: 3px;
}

.project-hero__media.placeholder {
  cursor: default;
}

.project-hero__media.placeholder:is(:hover, :focus-visible) {
  background-image: var(--placeholder-image);
}

.project-hero__media.is-playing {
  background-image: none !important;
}

.project-hero__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(3.6rem, 10vw, 5rem);
  height: clamp(3.6rem, 10vw, 5rem);
  border-radius: 999px;
  border: 1px solid rgba(243, 234, 219, 0.55);
  background: rgba(26, 26, 31, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: transparent;
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
    background 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.project-hero__play::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  margin-left: clamp(0.05rem, 0.4vw, 0.35rem);
  border-left: clamp(1.1rem, 3vw, 1.6rem) solid var(--color-cream);
  border-top: clamp(0.75rem, 2.1vw, 1.15rem) solid transparent;
  border-bottom: clamp(0.75rem, 2.1vw, 1.15rem) solid transparent;
}

.project-hero__play:is(:hover, :focus-visible) {
  background: rgba(26, 26, 31, 0.75);
  border-color: rgba(243, 234, 219, 0.9);
  transform: translate(-50%, -50%) scale(1.05);
}

.project-hero__play:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: 3px;
}

.project-hero__play.is-hidden,
.project-hero__play[hidden] {
  display: none;
}

.project-hero__media.is-playing .project-hero__play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

.project-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  background: rgba(26, 26, 31, 0.85);
  display: flex;
  border-radius: inherit;
  overflow: hidden;
}

.project-hero__media.is-playing .project-hero__video {
  opacity: 1;
  pointer-events: auto;
}

.project-hero__video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.project-detail__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.35rem, 5vw, 2.9rem);
  height: clamp(2.35rem, 5vw, 2.9rem);
  color: var(--color-text);
  background: transparent;
  border: none;
  border-radius: 50%;
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
}

.project-detail__back:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: 4px;
}

.project-detail__back .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.project-detail__body {
  max-width: min(95vw, 900px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  text-align: left;
  align-items: stretch;
}

  .project-detail__heading {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: clamp(0.85rem, 2.5vw, 1.5rem);
    row-gap: clamp(0.4rem, 1vw, 0.75rem);
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    text-align: left;
    justify-items: start;
  }

  .project-detail__heading-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(0.2rem, 0.6vw, 0.35rem);
    min-width: 0;
    text-align: left;
    align-self: flex-start;
  }

  .project-detail__title {
    font-size: clamp(1.55rem, 3.1vw, 2.75rem);
    font-family: 'Dela Gothic One', 'Outfit', 'DM Sans', system-ui,
      -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
    color: var(--color-cream);
    mix-blend-mode: difference;
    filter: contrast(0.92) brightness(1.08);
    line-height: 1.05;
    white-space: normal;
    max-width: 100%;
    word-break: break-word;
    hyphens: auto;
  }

  .project-detail__heading:hover .project-detail__title,
  .project-detail__heading:focus-within .project-detail__title {
    opacity: 0.85;
  }

  .project-detail__meta {
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    color: var(--color-cream);
    mix-blend-mode: difference;
    display: block;
    white-space: normal;
    font-family: 'Outfit', 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont,
      'Segoe UI', sans-serif;
    font-weight: 500;
    text-align: left;
    align-self: flex-start;
    word-break: break-word;
    hyphens: auto;
  }

.project-detail__description {
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  max-width: 65ch;
  color: var(--color-text-subtle);
  font-family: 'Outfit', 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  font-weight: 200;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
}

.project-detail__gallery {
  --gallery-gap: clamp(10px, 2vw, 18px);
  width: min(96vw, 1100px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(clamp(220px, 28vw, 340px), 1fr)
  );
  gap: var(--gallery-gap);
  position: relative;
  justify-content: center;
  align-items: start;
}

.project-detail__credits {
  width: min(95vw, 1100px);
  margin: 60px auto 0;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--color-text);
}

.project-detail__credits.is-hidden {
  display: none;
}

.project-detail__credits-title {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-family: 'Outfit', 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-detail__credits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: 'Outfit', 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  font-weight: 300;
  color: var(--color-text-subtle);
}

.project-detail__credits-list li {
  line-height: 1.5;
}

.project-detail__item {
  position: relative;
  width: 100%;
  box-shadow: 0 20px 40px var(--color-shadow);
  transition: transform 0.45s cubic-bezier(0.2, 0, 0.2, 1),
    opacity 0.35s ease;
  margin: 0;
  will-change: transform, opacity;
  cursor: pointer;
  min-height: 0;
}

.project-detail__item img,
.project-detail__item video {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .project-detail__gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    --gallery-gap: clamp(6px, 3.5vw, 12px);
  }
}

.project-detail__gallery.is-masonry {
  display: block;
  gap: 0;
  padding-bottom: var(--gallery-gap);
  min-height: 0;
}

.project-detail__gallery.is-masonry .project-detail__item {
  position: absolute;
  flex: none;
  opacity: 0;
}

.project-detail__gallery.is-masonry.is-ready .project-detail__item {
  opacity: 1;
}

@media (max-width: 600px) {
  .project-detail__title {
    font-size: clamp(1.05rem, 6.5vw, 1.7rem);
    white-space: normal;
    word-break: break-word;
    line-height: 1.08;
  }

  .project-detail__meta {
    white-space: normal;
    font-size: clamp(0.85rem, 3.8vw, 1.1rem);
  }
}

@media (max-width: 768px) {
  .project-detail {
    padding-top: 30px;
  }

  .project-detail__credits {
    margin: 40px auto 0;
    padding-bottom: 60px;
  }

  .project-detail__credits-title {
    letter-spacing: 0.08em;
  }

  .project-detail__back {
    width: 2.4rem;
    height: 2.4rem;
  }

  .project-detail__back .icon {
    width: 1.55rem;
    height: 1.55rem;
  }

  .project-detail__body {
    gap: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .transition-overlay {
    transition: none;
  }
}

.project-heading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: clamp(0.35rem, 1vw, 0.65rem);
  padding: clamp(1.35rem, 4vw, 3.5rem) clamp(1.75rem, 5.5vw, 4.5rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 2;
  color: var(--color-light-grey);
  text-align: left;
  mix-blend-mode: difference;
  isolation: isolate;
}

.media-strip:hover + .project-heading,
.media-strip:focus-within + .project-heading,
.project:focus-within .project-heading {
  opacity: 1;
}

.project-title {
  font-size: clamp(1.05rem, 3vw, 1.95rem);
  font-family: 'Dela Gothic One', 'Outfit', 'DM Sans', system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  -webkit-text-stroke: 0.04em rgba(243, 234, 219, 0.92);
  paint-order: stroke fill;
  mix-blend-mode: difference;
  filter: contrast(0.9) brightness(1.08) saturate(0.95);
  text-shadow:
    0 0 1px rgba(243, 234, 219, 0.65),
    0 0 12px rgba(0, 0, 0, 0.35);
  opacity: 0.96;
  transition: opacity 0.3s ease;
}

.project-meta {
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  font-family: 'Outfit', 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  font-weight: 500;
  color: var(--color-cream);
  mix-blend-mode: difference;
  filter: contrast(0.8) brightness(1.08) saturate(0.9);
  opacity: 0.9;
}

.project:is(:hover, :focus-within) .project-title {
  opacity: 0.85;
}

@media (hover: none) {
  .project-heading {
    opacity: 1;
  }
}

.about-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 30px 20px 4rem;
  gap: 2.5rem;
}

.about-page__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.8vw, 1.6rem);
  width: min(520px, 92vw);
  text-align: center;
}

.about-page__line {
  font-family: 'Outfit', 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  font-weight: 500;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
}

.about-page__line--headline {
  font-family: 'Dela Gothic One', 'Outfit', 'DM Sans', system-ui,
    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.about-page__line--contact {
  font-size: clamp(1rem, 2.1vw, 1.4rem);
  letter-spacing: 0.1em;
}

.about-page__line--contact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.about-page__line--contact a:hover,
.about-page__line--contact a:focus-visible {
  border-color: var(--color-pill-stroke);
  outline: none;
}

@media (max-width: 600px) {
  .about-page__content {
    align-items: center;
  }

  .about-page__line--headline {
    white-space: normal;
    max-width: clamp(18ch, 82vw, 26ch);
    line-height: 1.3;
    margin-left: auto;
    margin-right: auto;
  }
}

.site-footer {
  margin-top: auto;
  padding: 1.75rem 20px 2.75rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio > .site-footer {
  padding: 0.85rem 20px 0.4rem;
}

.site-footer a {
  color: var(--color-text);
  text-decoration: none;
  position: relative;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: 4px;
}

.site-footer a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  transition: opacity 0.2s ease;
}

.site-footer a:is(:hover, :focus-visible)::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .media-track {
    transform: none !important;
  }

  .topbar__about {
    transition: none;
  }
}


/* =========================
   ABOUT — BIO LAYOUT (FINAL)
   Append at the very end of styles.css
   ========================= */

/* Let the bio expand beyond the original 520px cap of the parent container */
.about-page__content {
  width: 100%;
}

/* Keep headline + contact lines visually constrained & centered */
.about-page__content .about-page__line {
  max-width: min(520px, 92vw);
  margin-inline: auto;
}

/* EXPLICIT: ensure headline stays centered regardless of later overrides */
.about-page__line--headline {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* --- Bio block: centered, image left / text right, equal heights --- */
.about-page__bio {
  width: min(100vw - 4rem, 1200px);            /* inside page with lateral margin */
  margin: clamp(1.5rem, 3vw, 3rem) auto 0;
  display: flex;
  align-items: stretch;                         /* image & text same height */
  gap: clamp(1rem, 2vw, 2rem);
  text-align: left;                             /* override parent's center text */
  box-sizing: border-box;
}

/* Image column: responsive but smaller than text */
.about-page__bio-media {
  flex: 0 0 clamp(200px, 22vw, 320px);
  display: flex;
  align-items: stretch;
  margin: 0;                                    /* reset figure default margins */
}

.about-page__bio-media img {
  display: block;
  width: 100%;
  height: 100%;                                 /* match text column height */
  object-fit: cover;                            /* graceful crop for portrait */
  aspect-ratio: 1170 / 1439;
  border-radius: 8px;
}

/* Text column: single-column paragraphs, same font as email, no uppercase */
.about-page__bio-text {
  flex: 1 1 0;
  min-width: 0;                                 /* prevent flex overflow */
  /* IMPORTANT: ensure NORMAL block flow (no flex row, no columns) */
  display: block;                               
  column-count: initial !important;             /* nuke any prior multi-columns */
  column-gap: normal !important;

  font-family: 'Outfit','DM Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; /* matches email */
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.55;
  font-size: clamp(0.96rem, 0.2vw + 0.96rem, 1.08rem);
  overflow: visible;                             /* allow full text height on desktop */
}

/* Paragraphs stack top-to-bottom with tidy spacing */
.about-page__bio-text p {
  margin: 0 0 1rem 0;
  overflow-wrap: anywhere;
  text-align: left;
}

.about-page__bio-text p:last-child {
  margin-bottom: 0;
}

/* --- Responsive: stack neatly on small screens --- */
@media (max-width: 820px) {
  .about-page__bio {
    flex-direction: column;
    width: min(100vw - 2rem, 700px);
    max-height: none;                            /* allow natural flow when stacked */
    gap: 1rem;
  }

  .about-page__bio-media {
    flex: none;
    width: 100%;
  }

  .about-page__bio-media img {
    width: 100%;
    height: auto;                                 /* natural height on mobile */
    max-height: 65svh;                            /* safety cap */
  }
}


/* HEADLINE TRUE-CENTER FIX */
.about-page__content { 
  align-items: stretch; /* children can span full row width */
}

/* Make each line a full row and center the text itself */
.about-page__line--headline,
.about-page__line--contact {
  width: 100%;
  max-width: none;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Allow the headline to wrap so it centers perfectly */
.about-page__line--headline {
  white-space: normal;  /* was nowrap before */
}

/* MOBILE TEXT VISIBILITY FIX */
@media (max-width: 820px) {
  .about-page__bio-text {
    overflow: visible;      /* let the stacked text render fully */
    padding-bottom: 0.5rem; /* small breathing room */
  }
}

/* CENTER ALIGN BIO TEXT (desktop + mobile) */
.about-page__bio-text {
  text-align: center;
}

/* Keep alignment consistent when stacked on small screens */
@media (max-width: 820px) {
  .about-page__bio-text {
    text-align: center;
  }
}
