:root {
  --paper: #f4efe4;
  --ink: #221b16;
  --muted: #6d5f53;
  --line: #e0d3c3;
  --copper: #8f3b28;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --sans: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

main {
  width: min(40rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 3.25rem 0 4.5rem;
}

.mark {
  width: 2.25rem;
  height: 3px;
  margin: 0 0 1.35rem;
  border: 0;
  background: var(--copper);
}

h1 {
  margin: 0 0 0.55rem;
  font-family: var(--serif);
  font-size: clamp(2.15rem, 8vw, 3.5rem);
  font-weight: 560;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

.surname {
  white-space: nowrap;
}

.role {
  margin: 0 0 1.35rem;
  color: var(--muted);
}

.summary {
  max-width: 28rem;
  margin: 0 0 1.4rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 460;
  font-optical-sizing: auto;
  line-height: 1.35;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact a {
  color: var(--copper);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.contact a:hover {
  color: var(--ink);
}

a:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

h2 {
  margin: 2.75rem 0 0.85rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.job {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.job h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 560;
  line-height: 1.2;
}

.job .place {
  grid-column: 1;
  margin: 0.15rem 0 0;
}

.job .when {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.brief {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.notes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes li {
  padding: 0.28rem 0;
}

.videos {
  display: grid;
  gap: 1.85rem;
}

figure {
  margin: 0;
}

.gallery-viewport {
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  background: #1c1612;
}

.gallery-viewport:active {
  cursor: grabbing;
}

.gallery-track {
  display: flex;
  will-change: transform;
}

.slide {
  position: relative;
  flex: 0 0 100%;
  height: min(70vh, 36rem);
  overflow: hidden;
}

.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.lower-third {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0.7rem 0.95rem 0.8rem;
  background: #221b16;
  color: #f4efe4;
}

.lower-third strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 560;
  line-height: 1.25;
  color: #f4efe4;
}

.lower-third span {
  display: block;
  margin-top: 0.15rem;
  color: #e4d8c8;
  font-size: 0.95rem;
  line-height: 1.35;
}

.gallery-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.gallery-bar button {
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--copper);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.gallery-bar button:disabled {
  color: #b5a89b;
  cursor: default;
}

.gallery-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.video figcaption {
  margin-top: 0.55rem;
}

.frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1c1612;
}

.frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-link {
  margin: 0;
}

.print-url {
  display: none;
}

@media (max-width: 36rem) {
  main {
    width: min(40rem, calc(100% - 2rem));
    padding-top: 2.25rem;
  }

  .job {
    grid-template-columns: 1fr;
  }

  .job .when {
    grid-column: 1;
    grid-row: auto;
    margin-top: 0.2rem;
    text-align: left;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  main {
    width: auto;
    padding: 0;
  }

  .mark {
    background: #000;
  }

  a,
  .role,
  .brief,
  .job .when,
  h2 {
    color: #000;
  }

  .frame {
    display: none;
  }

  .print-url {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
  }

  .gallery-viewport {
    overflow: visible;
    background: transparent;
  }

  .gallery-track {
    display: block;
    transform: none !important;
  }

  .slide {
    height: auto;
    margin-bottom: 1rem;
    break-inside: avoid;
  }

  .slide img {
    height: auto;
    object-fit: contain;
  }

  .gallery-bar {
    display: none;
  }
}
