/* The profile views keep the source slide intact, with publication text below it. */
.profile-navigation,
.profile-section {
  padding-block: var(--chapter);
  border-block-end: 1px solid var(--graphite);
}

.profile-section {
  scroll-margin-block-start: 28px;
}

.profile-chapter-grid,
.profile-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.85vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-navigation .profile-chapter-grid {
  margin-block-start: clamp(20px, 3.8vw, 45px);
}

.profile-section .profile-page-grid {
  margin-block-start: clamp(22px, 3.25vw, 40px);
}

.profile-chapter-card,
.profile-page-card {
  min-inline-size: 0;
  border: 1px solid var(--graphite);
  border-radius: 15px;
  background: var(--night);
}

.profile-chapter-card {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.profile-chapter-card a {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.profile-chapter-card img,
.profile-image {
  display: block;
  aspect-ratio: 16 / 9;
  inline-size: 100%;
  background: #111;
}

.profile-chapter-card img,
.profile-image img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
}

.profile-chapter-card img {
  block-size: auto;
}

.profile-image {
  position: relative;
  overflow: hidden;
  border-start-start-radius: 14px;
  border-start-end-radius: 14px;
  border-block-end: 1px solid var(--graphite);
}

.profile-image:focus-visible,
.profile-chapter-card a:focus-visible {
  outline-offset: -4px;
}

.profile-image:hover img {
  filter: brightness(1.06);
}

.profile-image-action {
  position: absolute;
  inset-inline-end: 8px;
  inset-block-end: 8px;
  border: 1px solid #ffffff5e;
  border-radius: 5px;
  padding: 4px 8px;
  background: #0a0a0aee;
  color: #fff;
  font-size: .79rem;
}

.profile-project-link {
  display: block;
  border-radius: inherit;
  text-decoration: none;
}

.profile-project-link .profile-paper-copy { display: flex; justify-content: space-between; gap: 12px; }
.profile-project-link:is(:hover,:focus-visible) .profile-paper-copy { text-decoration: underline; text-underline-offset: 4px; }
.profile-source-note { border-inline-start: 2px solid var(--signal); padding-inline-start: 10px; }

.profile-paper-copy,
.profile-chapter-copy {
  padding: clamp(15px, 2vw, 24px);
}

.profile-chapter-card > :is(h2, h3, p, small),
.profile-chapter-card > a > :is(h2, h3, p, small) {
  padding-inline: clamp(15px, 2vw, 24px);
}

.profile-chapter-card > :first-child:not(img, a, picture),
.profile-chapter-card > a > :first-child:not(img, picture) {
  padding-block-start: clamp(15px, 2vw, 24px);
}

.profile-chapter-card > :last-child:not(img, a, picture),
.profile-chapter-card > a > :last-child:not(img, picture) {
  padding-block-end: clamp(15px, 2vw, 24px);
}

.profile-chapter-card h2,
.profile-chapter-card h3,
.profile-paper-copy h2,
.profile-paper-copy h3 {
  margin: 0;
  color: #f8f8f6;
  font-size: clamp(1.24rem, 2vw, 1.7rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.profile-chapter-card p,
.profile-paper-copy p {
  margin-block-start: 8px;
  color: var(--quiet);
  font-size: .98rem;
  line-height: 1.5;
}

.profile-chapter-card .section-label,
.profile-paper-copy :is(.section-label, .mono, small) {
  margin-block: 0 10px;
  color: var(--quiet);
  font-size: .72rem;
  line-height: 1.4;
}

.profile-source,
.profile-paper-copy > a:not(.button) {
  display: inline-flex;
  align-items: center;
  inline-size: fit-content;
  min-block-size: 44px;
  margin-block-start: 8px;
  color: var(--quiet);
  font-size: .87rem;
  text-decoration: underline;
  text-decoration-color: #ffffff5e;
  text-underline-offset: 4px;
}

.profile-source:hover,
.profile-paper-copy > a:not(.button):hover {
  color: #fff;
  text-decoration-color: var(--signal);
}

.profile-chapter-card:hover,
.profile-page-card:focus-within {
  border-color: #55433b;
}

.profile-compact {
  margin-block: clamp(18px, 3.4vw, 38px);
}

.profile-compact .profile-paper-copy {
  padding: clamp(12px, 1.65vw, 20px);
}

.profile-compact .profile-paper-copy :is(h2, h3) {
  font-size: clamp(1.07rem, 1.8vw, 1.35rem);
}

@media (max-width: 960px) {
  .profile-chapter-grid,
  .profile-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 570px) {
  .profile-chapter-grid,
  .profile-page-grid { grid-template-columns: 1fr; }
}
