.profile-hero {
  padding: 3.5rem 0 2.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.profile-hero .lead-serif {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  margin-bottom: 1rem;
}

.contents {
  padding: 2.5rem 0;
  background: var(--bg);
}

.list-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 2rem;
}

.contents ul {
  max-width: 52rem;
}

.contents .chev-list li::before {
  top: 50%;
  transform: translateY(-50%);
}

.contents a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.profile-section {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}

.service-block {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 1.25rem 0;
  max-width: 70ch;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
}

.service-block:last-of-type {
  border-bottom: 1px solid var(--rule);
}

.service-block h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 400;
}

.card-grid,
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 1rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.person,
.project-card {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0 0 1rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
}


.project-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.project-chips li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: var(--ink-body);
}

.project-chips svg {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  color: var(--accent);
}

.card-grid {
  margin-top: 0.75rem;
}

.project-card picture {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  outline: 1px solid rgba(255, 255, 255, 0.22);
  outline-offset: -1px;
  box-shadow: 0 10px 30px rgba(0, 9, 24, 0.18);
}

.project-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.person img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.person h4 {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.team-group {
  margin: 1.75rem 0 0.5rem;
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.role-list {
  columns: 1;
  max-width: 40rem;
}

.person picture {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  outline: 1px solid rgba(255, 255, 255, 0.22);
  outline-offset: -1px;
  box-shadow: 0 10px 30px rgba(0, 9, 24, 0.18);
}

.team-stage {
  position: relative;
  --team-chrome: 5.5rem;
  --portrait-max-h: max(9rem, calc(100svh - var(--header-h, 72px) - var(--team-chrome)));
}

.team-nav {
  display: none;
}

@media (max-width: 39.999rem) {
  .team-grid {
    display: flex;
    gap: 1rem;
    margin-top: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
  }

  html.js .team-stage {
    padding-top: 1.25rem;
  }

  .person {
    flex: 0 0 min(72%, var(--portrait-max-h));
    scroll-snap-align: start;
    scroll-snap-stop: always;
    border-bottom: 0;
    padding-bottom: 0;
  }

  html.js .team-grid {
    scrollbar-width: none;
  }

  html.js .team-grid::-webkit-scrollbar {
    display: none;
  }

  html.js .team-nav {
    display: grid;
    position: absolute;
    top: calc(1.25rem + var(--portrait-band, calc(0.72 * min(100vw - 2 * var(--page-gutter), 72rem))) / 2);
    z-index: 2;
    transform: translateY(-50%);
  }

  html.js .team-nav[data-dir="-1"] {
    left: 0.75rem;
  }

  html.js .team-nav[data-dir="1"] {
    right: 0.75rem;
  }
}

.team-group:has(+ .team-stage) {
  scroll-snap-align: start;
  scroll-margin-top: 1rem;
}

@media (max-width: 27.5rem) and (min-height: 500px) {
  html {
    scroll-snap-type: y proximity;
  }
}

@media (min-width: 27.5rem) and (max-width: 39.999rem) and (min-height: 650px) {
  html {
    scroll-snap-type: y proximity;
  }
}

@media (min-width: 40rem) and (min-height: 780px) {
  html {
    scroll-snap-type: y proximity;
  }
}

.gallery {
  padding: 3rem 0 3.5rem;
  border-top: 1px solid var(--rule);
  timeline-scope: --gallery-x;

  --gallery-chrome: 8.5rem;
  --photo-max-h: max(12rem, calc(100svh - var(--header-h, 72px) - var(--gallery-chrome)));
}

.gallery-stage {
  position: relative;
  padding-top: 1.5rem;
}

.gallery-scroller {
  display: flex;
  gap: 1.5rem;
  width: var(--page-wrap);
  margin-inline: auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scroll-timeline-name: --gallery-x;
  scroll-timeline-axis: x;
}

html.js .gallery-scroller {
  scrollbar-width: none;
}

html.js .gallery-scroller::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  flex: 0 0 min(85%, calc(var(--photo-max-h) * 3 / 2));
  margin: 0;
  scroll-snap-align: start;
}

.gallery-item picture,
.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.gallery-item picture,
.lightbox-figure picture {
  overflow: hidden;
  outline: 1px solid rgba(255, 255, 255, 0.22);
  outline-offset: -1px;
  box-shadow: 0 10px 30px rgba(0, 9, 24, 0.18);
}

.gallery-item figcaption {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  margin-top: 0.75rem;
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-body);
}

.gallery-item .num {
  color: var(--ink-muted);
  white-space: nowrap;
}

.gallery-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.gallery-progress {
  flex: 1;
  height: 3px;
  overflow: hidden;
  background: var(--rule);
  border-radius: var(--radius);
}

.gallery-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--bar-paper);
  transform-origin: left;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .gallery-progress span {
      width: 100%;
      animation: gallery-grow linear;
      animation-timeline: --gallery-x;
    }
  }
}

@keyframes gallery-grow {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

html:not(.js) .gallery-nav {
  display: none;
}

.gallery-nav {
  position: absolute;
  top: calc(1.5rem + var(--photo-band, calc(0.85 * min(100vw - 2 * var(--page-gutter), 72rem) * 2 / 3)) / 2);
  z-index: 2;
  transform: translateY(-50%);
}

.gallery-nav[data-dir="-1"] {
  left: calc((100% - var(--page-wrap)) / 2 + 0.75rem);
}

.gallery-nav[data-dir="1"] {
  right: calc((100% - var(--page-wrap)) / 2 + 0.75rem);
}

.lightbox {
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgba(0, 9, 24, 0.82);
}

.lightbox-figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.lightbox-figure picture,
.lightbox-figure img {
  display: block;
  border-radius: var(--radius);
}

.lightbox-figure img {
  max-width: min(94vw, var(--lb-max-w, 94vw));
  max-height: 90svh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--surface-2);
}

.lightbox-figure figcaption {
  max-width: min(94vw, var(--lb-max-w, 94vw));
  font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--on-media);
  text-shadow: 0 1px 3px rgba(0, 9, 24, 0.6);
}

.lightbox-figure .num {
  color: var(--on-media-muted);
  white-space: nowrap;
}

.lightbox-close {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px));
  right: 1rem;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav[data-dir="-1"] {
  left: 1rem;
}

.lightbox-nav[data-dir="1"] {
  right: 1rem;
}

.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.gallery-open:focus-visible {
  outline: 2px solid var(--focus, var(--accent));
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] {
    animation: lb-in 160ms ease-out;
  }

  .lightbox[open] .lightbox-figure {
    animation: lb-zoom 160ms ease-out;
  }
}

@keyframes lb-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes lb-zoom {
  from {
    transform: scale(0.97);
  }

  to {
    transform: scale(1);
  }
}

.caption-list {
  max-width: 70ch;
}

.purpose-panel {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
}

.purpose-panel h3 {
  margin-top: 0;
}

.purpose-panel p:last-child {
  margin-bottom: 0;
}

.values-title {
  margin-top: 2rem;
}

.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.5rem;
  padding: 0;
  margin: 0 0 1rem;
  list-style: none;
}

.values li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--accent-deep);
  border-radius: var(--radius);
  font-weight: 700;
  text-align: center;
  color: var(--ink);
}

.values li::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--bar-paper);
}

.why-list {
  max-width: 70ch;
}

@media (min-width: 40rem) {
  .list-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-list {
    columns: 2;
  }

  .project-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .project-chips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-grid.officers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item img {
    transition: transform 400ms ease;
  }

  .gallery-item:hover img {
    transform: scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item img,
  .gallery-item:hover img {
    transform: none;
    transition: none;
  }
}

.chev-list {
  padding-left: 0;
  list-style: none;
}

.chev-list li {
  position: relative;
  padding-left: 1.15rem;
}

.chev-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.7em;
  height: 0.7em;
  background-color: var(--accent);
  -webkit-mask: var(--chev-mask) no-repeat center / contain;
  mask: var(--chev-mask) no-repeat center / contain;
}

:root {
  --chev-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4l4 4-4 4'/%3E%3C/svg%3E");
}

@supports not ((-webkit-mask: none) or (mask: none)) {
  .chev-list li::before {
    content: "\203A";
    background-color: transparent;
    width: auto;
    height: auto;
    top: 0;
    color: var(--accent);
    font-weight: 700;
  }
}

