@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #f3f3f1;
  --paper-2: #e9e9e6;
  --ink: #121212;
  --ink-2: #55554f;
  --rule: #c9c9c4;
  --pad: clamp(1.25rem, 3vw, 2.75rem);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--ink); color: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { top: 1rem; }

/* Labels: expanded caps, the comp card's voice */
.nav a, .role, .stats dt, .rep__label, .filter, .counter, .h2, .contact h3, .foot__meta, .socials span {
  font-stretch: 118%;
  font-weight: 560;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ───────── Card (first viewport) ───────── */
.card {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(22rem, 1fr);
  min-height: 100svh;
}
.card__photo { position: relative; background: var(--paper-2); overflow: hidden; }
.card__photo picture, .card__photo img.cover {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.cover { animation: develop 1.6s var(--ease) both; }
@keyframes develop {
  from { filter: brightness(1.35) contrast(0.85); transform: scale(1.025); }
  to { filter: none; transform: none; }
}

.card__face {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vh, 3rem);
  padding: var(--pad);
  padding-top: clamp(1.25rem, 2.5vw, 2rem);
  container-type: inline-size;
}
.nav { display: flex; gap: 1.75rem; }
.nav a { text-decoration: none; padding-block: 0.4rem; }
.nav a:hover { text-decoration: underline; }

.name {
  margin-top: auto;
  font-stretch: 125%;
  font-weight: 640;
  font-size: min(18cqi, 6rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.name span { display: block; }
.role { color: var(--ink-2); margin-top: -1rem; }
.role span { margin-inline: 0.35em; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
  border-top: 1px solid var(--ink);
}
.stats div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--rule);
}
.stats dt { color: var(--ink-2); }
.stats dd { font-size: 1.0625rem; font-weight: 500; font-variant-numeric: tabular-nums; }

.rep { display: grid; gap: 0.35rem; }
.rep__label { color: var(--ink-2); }
.rep__name { font-stretch: 112%; font-weight: 600; font-size: 1.5rem; letter-spacing: -0.01em; }
.rep__name a { text-decoration: none; display: inline-flex; align-items: baseline; gap: 0.35em; }
.rep__name a:hover { text-decoration: underline; }
.ext { width: 0.55em; height: 0.55em; fill: none; stroke: currentColor; stroke-width: 1.4; }
.rep__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 0.9rem; }
.rep__phone { font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.6rem;
  background: var(--ink); color: var(--paper);
  font-stretch: 118%; font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }

/* ───────── Book ───────── */
.book { padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(2.5rem, 6vw, 5rem); }
.book__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem;
  padding-inline: var(--pad);
  margin-bottom: 1.5rem;
}
.h2 { font-size: 0.8125rem; }
.book__bar .h2 { margin-right: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.filter {
  background: none; border: 1px solid transparent; cursor: pointer;
  padding: 0.55rem 0.8rem; min-height: 2.5rem; color: var(--ink-2);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.filter span { font-variant-numeric: tabular-nums; margin-left: 0.2em; opacity: 0.7; }
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.book__nav { display: flex; align-items: center; gap: 0.5rem; }
.counter { font-variant-numeric: tabular-nums; min-width: 5.5em; }
.arrow {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; padding: 0;
  background: none; border: 1px solid var(--ink); cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s;
}
.arrow svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.arrow:hover { background: var(--ink); color: var(--paper); }
.arrow:disabled { opacity: 0.3; pointer-events: none; }

.strip {
  --h: clamp(22rem, 74svh, 54rem);
  display: flex;
  gap: clamp(0.5rem, 1vw, 0.875rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--pad);
  padding-inline: var(--pad);
  padding-bottom: 1.25rem;
  align-items: center;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) var(--paper-2);
  cursor: grab;
}
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.strip.is-dragging .frame__open { pointer-events: none; }
.strip:focus-visible { outline-offset: -2px; }
.strip::-webkit-scrollbar { height: 3px; }
.strip::-webkit-scrollbar-track { background: var(--paper-2); }
.strip::-webkit-scrollbar-thumb { background: var(--ink); }
.frame {
  flex: none;
  /* Full height, unless that would make the photo wider than the screen. */
  height: min(var(--h), calc((100vw - 2 * var(--pad)) / var(--arn)));
  aspect-ratio: var(--ar);
  scroll-snap-align: start;
  background: var(--paper-2);
}
.frame[hidden] { display: none; }
.frame__open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.frame img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.frame.is-entering { animation: settle 0.6s var(--ease) both; }
@keyframes settle { from { opacity: 0; transform: translateX(1.5rem); } }

/* ───────── Back of the card ───────── */
.back {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(22rem, 1fr);
  border-top: 1px solid var(--ink);
  margin-inline: var(--pad);
}
.about, .contact { padding-block: clamp(2rem, 5vw, 4rem); }
.about { padding-right: clamp(1.5rem, 6vw, 6rem); }
.contact { padding-left: var(--pad); border-left: 1px solid var(--rule); display: grid; gap: 2rem; align-content: start; }
.back .h2 { margin-bottom: 1.5rem; }
.contact .h2 { margin-bottom: 0; }
.bio {
  font-stretch: 100%;
  font-size: clamp(1.375rem, 2.3vw, 2.125rem);
  line-height: 1.25;
  letter-spacing: -0.012em;
  max-width: 30ch;
  text-wrap: pretty;
}
.contact__group { display: grid; gap: 0.5rem; }
.contact h3 { color: var(--ink-2); }
.contact p { font-size: 1.0625rem; line-height: 1.55; }
.contact a { font-variant-numeric: tabular-nums; }
.socials { display: grid; gap: 0.25rem; font-size: 1.0625rem; }
.socials a { text-decoration: none; display: inline-flex; gap: 0.75rem; align-items: baseline; }
.socials a:hover { text-decoration: underline; }
.socials span { color: var(--ink-2); min-width: 6.5rem; }

/* ───────── Footer ───────── */
.foot { padding: clamp(2.5rem, 6vw, 5rem) var(--pad) 1.5rem; overflow: hidden; }
.foot__name {
  font-stretch: 125%;
  font-weight: 640;
  text-transform: uppercase;
  font-size: clamp(2.25rem, 10.3vw, 12rem);
  line-height: 0.82;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.foot__meta {
  display: flex; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--ink);
  margin-top: 1.25rem; padding-top: 0.9rem;
  color: var(--ink-2);
}
.foot__meta a { text-decoration: none; }
.foot__meta a:hover { color: var(--ink); text-decoration: underline; }

/* ───────── Viewer ───────── */
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--paper); color: var(--ink);
  overflow: hidden;
}
.viewer[open] { display: grid; grid-template-rows: auto 1fr; animation: fade 0.25s var(--ease); }
.viewer::backdrop { background: var(--paper); }
@keyframes fade { from { opacity: 0; } }
.viewer__bar { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem var(--pad); }
.viewer__close { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; background: none; border: 0; cursor: pointer; margin-right: -0.6rem; }
.viewer__close svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
.viewer__stage { margin: 0; min-height: 0; display: grid; place-items: center; padding: 0 calc(var(--pad) + 3.5rem) var(--pad); touch-action: pan-y; }
.viewer__stage picture { display: contents; }
.viewer__stage img { max-width: 100%; max-height: calc(100dvh - 4.5rem - var(--pad)); width: auto; height: auto; object-fit: contain; }
.viewer__stage img.is-swapping { animation: fade 0.3s var(--ease); }
.viewer__prev, .viewer__next { position: absolute; top: 50%; translate: 0 -50%; background: var(--paper); }
.viewer__prev { left: var(--pad); }
.viewer__next { right: var(--pad); }

/* ───────── Small screens ───────── */
@media (max-width: 959px) {
  .card { grid-template-columns: 1fr; min-height: 0; }
  .card__photo { aspect-ratio: 4 / 5; max-height: 82svh; width: 100%; order: 2; }
  .card__face { display: contents; }
  .nav { order: 1; justify-content: flex-end; padding: 0.75rem var(--pad); gap: 1.25rem; }
  .name { order: 3; margin-top: 0; padding: 1.5rem var(--pad) 0; font-size: clamp(2.6rem, 15vw, 5.5rem); }
  .role { order: 4; margin: 0.75rem var(--pad) 0; }
  .stats { order: 5; margin: 1.75rem var(--pad) 0; }
  .rep { order: 6; margin: 1.75rem var(--pad) 0; }
  .nav { position: relative; }
  .back { grid-template-columns: 1fr; }
  .about { padding-right: 0; }
  .contact { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .viewer__stage { padding: 0 0 4.5rem; }
  .viewer__stage img { max-height: calc(100dvh - 9rem); }
  .viewer__prev, .viewer__next { top: auto; bottom: 0.75rem; translate: none; }
}
/* Phones: the book becomes a two-up contact sheet; tap any frame for the full image. */
@media (max-width: 759px) {
  .book__nav { display: none; }
  .book__bar .h2 { margin-right: 0; flex: 1 1 100%; }
  .strip {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.375rem;
    overflow: visible; cursor: auto; scroll-snap-type: none; padding-bottom: 0;
  }
  .frame { height: auto; aspect-ratio: 4 / 5; }
  .frame.is-entering { animation-name: fade; }
}
@media (max-width: 359px) {
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .filter { padding-inline: 0.55rem; }
  .book__bar { gap: 0.5rem 1rem; }
  .rep__actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
