:root {
  --ink: #3f3a34;
  --muted: #77736c;
  --line: #4a433b;
  --soft-line: #d8d1c7;
  --paper: #f7f3ed;
  --card: #fffdf9;
  --accent: #e9e0d3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "halyard-display", sans-serif;
	font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .72; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.banner {
  height: 18rem;
  background-position: center;
  background-size: cover;
}

.profile {
  max-width: 920px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0 2.5rem;
}

.portrait img {
  width: 180px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

h1 {
  line-height: 1.12;
font-family: "lemonde-journal", serif;
font-weight: 600;
font-style: normal;
}

h2, h3 {
  line-height: 1.12;
font-family: "lemonde-journal", serif;
font-weight: 400;
font-style: normal;
}


h1 {
  margin: .25rem 0 .65rem;
  font-size: clamp(2.4rem, 6vw, 4rem);
}

.role-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.role-line p { margin: 0; color: var(--ink); }
.bio { max-width: 68ch; margin: 0 0 1.25rem; }
.social, .footer a {
  border-bottom: 1px solid currentColor;
  font-size: .95rem;
}

.section-heading {
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.section-heading h2 {
  display: inline-block;
  margin: 0;
  padding: 1rem 2rem;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--accent);
  font-size: 1.55rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.25rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: .93rem;
}

.filter {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.filter:hover,
.filter.is-active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .18em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 5%;
  align-items: start;
  margin-bottom: 4rem;
}

.card {
  border: 1px solid var(--line);
  background: var(--card);
}

.thumb {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--accent);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.card:hover .thumb img { transform: scale(1.025); }
.card-body { padding: 1rem; }

.meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--soft-line);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.3;
}

.meta strong {
  color: var(--ink);
  font-weight: 500;
}

.meta time { white-space: nowrap; }

.card h3 {
  margin: 1rem 0 .85rem;
  font-size: 1.35rem;
}

.card p {
  margin: 0 0 .5rem;
  color: #5f5a53;
  font-size: .9rem;
  line-height: 1.5;
}

.card[hidden] { display: none; }

.footer {
  padding: 0 0 3rem;
  text-align: center;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 6%; }
  .profile { grid-template-columns: 150px 1fr; gap: 2rem; }
  .portrait img { width: 150px; }
}

@media (max-width: 620px) {
  .banner { height: 12rem; }
  .profile { display: block; text-align: center; padding-top: 2rem; }
  .portrait img { margin: 0 auto 1.5rem; }
  .role-line { display: block; }
  .grid { grid-template-columns: 1fr; }
  .section-heading h2 { padding-inline: 1.25rem; }
}

    .group-label {
      grid-column: 1 / -1;
      font-size: 0.78rem;
      font-weight: 300;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      opacity: 0.55;
      margin: 0;
    }
    .group-label--divider {
      border-top: 1px solid currentColor;
      padding-top: 1.5rem;
      margin-top: 1rem;
      border-color: rgba(0, 0, 0, 0.15);
    }
    body.view-social .filters {
      display: none;
    }
/* ---------- Photography ---------- */

.photography .group-label--divider {
  margin-top: 0;
  /* h2 for screen-reader navigation, but styled as a group label */
  font-family: "halyard-display", sans-serif;
  font-size: .78rem;
  line-height: 1.55;
}

.photo-intro {
  max-width: 68ch;
  margin: 1.25rem 0 2rem;
  color: #5f5a53;
  font-size: .9rem;
  line-height: 1.5;
}

.photo-intro a {
  border-bottom: 1px solid currentColor;
}

.photo-strip {
  display: flex;
  gap: 4%;
  margin-bottom: 4rem;
  padding-bottom: 1.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--soft-line) transparent;
}

.photo-strip:focus-visible {
  outline: 1px solid var(--line);
  outline-offset: .5rem;
}

.photo-strip::-webkit-scrollbar { height: 6px; }
.photo-strip::-webkit-scrollbar-track { background: var(--accent); }
.photo-strip::-webkit-scrollbar-thumb { background: var(--soft-line); }

.photo {
  flex: 0 0 clamp(240px, 28%, 340px);
  margin: 0;
  scroll-snap-align: start;
}

.photo-frame {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--accent);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.photo:hover .photo-frame img { transform: scale(1.025); }

.photo figcaption {
  margin-top: .85rem;
  padding-top: .65rem;
  border-top: 1px solid var(--soft-line);
}

.photo figcaption strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  font-size: .85rem;
  line-height: 1.35;
}

.photo figcaption span {
  display: block;
  margin-top: .3rem;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.3;
}

@media (max-width: 620px) {
  .photo { flex: 0 0 78%; }
  .photo-strip { gap: 6%; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-frame img { transition: none; }
  .photo:hover .photo-frame img { transform: none; }
}

/* ---------- Video lightbox ---------- */

.video-modal {
  /* Set per media by the script; 16:9 is the fallback */
  --media-ratio: 1.7777778;
  /* Height reserved for the bar plus caption, so the sum below leaves room for them */
  --modal-chrome: 13rem;
  /* Height of the player in the two-column portrait layout */
  --stage-h: min(70vh, 640px);

  flex-direction: column;
  width: min(980px, 92vw, calc((88vh - var(--modal-chrome)) * var(--media-ratio)));
  max-height: 88vh;
  max-height: 88dvh;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}

/* display goes on [open] only — setting it on .video-modal would override
   the browser's own display:none and leave the dialog on the page */
.video-modal[open] { display: flex; }

.video-modal::backdrop {
  background: rgba(42, 38, 33, 0.88);
}

.video-modal__bar {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: var(--accent);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.video-modal__source {
  color: var(--ink);
  font-weight: 500;
}

.video-modal__date { white-space: nowrap; }

.video-modal__close {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.video-modal__close:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .18em;
}

.video-modal__close:focus-visible { outline: 1px solid var(--line); outline-offset: 3px; }

/* Bar and player hold still; the caption is the part that scrolls */
.video-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.video-modal__stage {
  flex: none;
  display: flex;
  justify-content: center;
  aspect-ratio: var(--media-ratio);
  background: var(--ink);
}

.video-modal__stage wistia-player {
  display: block;
  width: 100%;
  height: 100%;
}

.video-modal__caption {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--soft-line) transparent;
  padding: 0.9rem 1rem 1.1rem;
  border-top: 1px solid var(--soft-line);
}

.video-modal__title {
  margin: 0 0 .6rem;
  font-size: 1.6rem;
}

.video-modal__dek {
  max-width: 78ch;
  color: #5f5a53;
  font-size: .9rem;
  line-height: 1.5;
}

.video-modal__dek p { margin: 0; }
.video-modal__dek p + p { margin-top: .7rem; }
.video-modal__dek a { border-bottom: 1px solid currentColor; }

.card .thumb[data-wistia] { cursor: pointer; }

@media (max-width: 620px) {
  .video-modal { width: min(94vw, calc((84vh - var(--modal-chrome)) * var(--media-ratio))); }
  .video-modal__title { font-size: 1.25rem; }
}

@media (min-width: 760px) {
  /* A bit more room around the text on wide, landscape modals */
  .video-modal:not(.video-modal--portrait) .video-modal__caption {
    padding: 1.1rem 1.5rem 1.4rem;
  }

  /* Portrait media, wide screens: info panel left, player right */
  .video-modal.video-modal--portrait {
    width: min(92vw, calc(var(--stage-h) * var(--media-ratio) + 24rem));
  }

  .video-modal--portrait .video-modal__body {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .video-modal--portrait .video-modal__stage {
    grid-column: 2;
    grid-row: 1;
    width: calc(var(--stage-h) * var(--media-ratio));
    height: var(--stage-h);
    aspect-ratio: auto;
  }

  .video-modal--portrait .video-modal__caption {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    align-content: center;
    padding: 1.5rem 1.75rem;
    border-top: 0;
    border-right: 1px solid var(--soft-line);
  }
}

/* Portrait media, narrow screens: cap the player's height and centre it,
   so the caption keeps a usable share of the screen */
@media (max-width: 759px) {
  .video-modal.video-modal--portrait { width: min(94vw, 420px); }

  .video-modal--portrait .video-modal__stage {
    height: min(52dvh, calc(94vw / var(--media-ratio)));
    aspect-ratio: auto;
  }

  .video-modal--portrait .video-modal__stage wistia-player {
    width: auto;
    max-width: 100%;
    aspect-ratio: var(--media-ratio);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .video-modal[open] { animation: video-modal-in 180ms ease-out; }
  @keyframes video-modal-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
