/* ==========================================================================
   UHBC — Inner pages (about, developments, project pages, contact, 404)
   ========================================================================== */

/* --- Page hero ---------------------------------------------------------- */

.page-hero {
  padding: calc(var(--header-h) + clamp(3rem, 9vw, 9rem)) 0 clamp(3rem, 6vw, 5.5rem);
}

.page-hero__inner {
  display: grid;
  gap: clamp(1.75rem, 3vw, 2.75rem);
}

.page-hero__title {
  font-size: var(--fs-display-1);
  line-height: 0.95;
}

.page-hero__foot {
  display: grid;
  gap: 1.5rem;
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--c-line-strong);
}

.page-hero__lede {
  max-width: 46ch;
  font-size: var(--fs-lede);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--c-slate);
}

@media (min-width: 1024px) {
  .page-hero__foot {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
    align-items: start;
  }

  .page-hero__foot > .label {
    grid-column: 1 / span 5;
  }

  .page-hero__lede {
    grid-column: 7 / -1;
  }
}

/* --- Breadcrumb --------------------------------------------------------- */

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.breadcrumb li + li::before {
  content: "/";
  opacity: 0.5;
}

.breadcrumb a {
  transition: color 0.3s var(--ease-out);
}

.breadcrumb a:hover {
  color: var(--c-accent-ink);
}

.breadcrumb [aria-current="page"] {
  color: var(--c-ink);
}

.label--light.breadcrumb [aria-current="page"] {
  color: var(--c-paper);
}

.label--light.breadcrumb a:hover {
  color: var(--c-accent-light);
}

/* --- Wide figure -------------------------------------------------------- */

.page-figure {
  display: grid;
  gap: 0.9rem;
}

.page-figure__frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--c-stone);
}

.page-figure__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .page-figure__frame {
    aspect-ratio: 21 / 9;
  }
}

.section--flush-top {
  padding-top: 0;
}

/* --- Split section (label column + content column) ---------------------- */

.split {
  display: grid;
  gap: 2rem;
}

.split__main > * + * {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
  }

  .split__head {
    grid-column: 1 / span 4;
  }

  .split__main {
    grid-column: 6 / -1;
  }
}

/* --- Disciplines (about page) ------------------------------------------ */

.disciplines {
  border-top: 1px solid var(--c-line-strong);
}

.discipline {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-bottom: 1px solid var(--c-line);
}

.discipline::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-expo);
}

.discipline__title {
  font-size: var(--fs-h4);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.discipline p {
  max-width: 52ch;
  color: var(--c-slate);
}

@media (hover: hover) {
  .discipline:hover::before {
    transform: scaleX(1);
  }
}

@media (min-width: 768px) {
  .discipline {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: baseline;
    gap: 1.5rem;
  }
}

/* --- Call-to-action band ------------------------------------------------ */

.cta-band {
  padding-block: clamp(5rem, 3rem + 8vw, 10rem);
  background: var(--c-ink);
  color: var(--c-paper);
}

.cta-band__inner {
  display: grid;
  gap: clamp(1.75rem, 3vw, 2.5rem);
}

.cta-band__title em {
  color: var(--c-accent-light);
}

/* Light version, for pages where the band follows a dark section. */
.cta-band--light {
  background: var(--c-paper-2);
  color: var(--c-ink);
}

.cta-band--light .cta-band__title em {
  color: var(--c-accent-ink);
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2.5rem;
}

/* --- Developments list -------------------------------------------------- */

.developments {
  padding-bottom: var(--section-space);
}

.developments__note {
  margin-top: clamp(4rem, 8vw, 7rem);
}

/* --- Developments map --------------------------------------------------- */

html:not(.js) .dev-map {
  display: none;
}

.dev-map__head {
  display: grid;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.dev-map__intro {
  max-width: 40ch;
  color: var(--c-slate);
}

.dev-map__stage {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.dev-map__canvas {
  position: relative;
  width: min(100%, 26rem);
  margin-inline: auto;
  aspect-ratio: 500 / 840;
}

.dev-map__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dev-map__land {
  fill: var(--c-paper-2);
  stroke: var(--c-ink);
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.dev-map__graticule line {
  stroke: var(--c-line-strong);
  stroke-width: 1;
  stroke-dasharray: 2 5;
  vector-effect: non-scaling-stroke;
}

.dev-map__graticule text {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  fill: var(--c-slate);
}

.dev-map__sea {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 26px;
  fill: var(--c-slate-light);
}

/* On phones the map is too small for the sea label to clear the southern pins. */
@media (max-width: 639px) {
  .dev-map__sea {
    display: none;
  }
}

.dev-map__note {
  position: absolute;
  top: 2.25rem;
  right: 0;
  max-width: 9rem;
  text-align: right;
}

/* Pins: the button is placed on the town, with the dot centred on it. */
.map-pin {
  position: absolute;
  display: flex;
  align-items: center;
  margin: -1.375rem 0 0 -1.375rem;
  white-space: nowrap;
}

.map-pin__dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
}

.map-pin__dot::before {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-paper);
  transition: transform 0.5s var(--ease-expo);
}

.map-pin__dot::after {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border: 1px solid var(--c-accent);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-expo);
}

.map-pin__label {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--c-line);
  background: var(--c-paper);
  color: var(--c-ink);
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

/* Labels can sit a little above or below their dot where pins are close together. */
.map-pin--up .map-pin__label {
  transform: translateY(-1.4rem);
}

.map-pin--down .map-pin__label {
  transform: translateY(1.4rem);
}

.map-pin.is-active .map-pin__dot::before {
  transform: scale(1.3);
}

.map-pin.is-active .map-pin__dot::after {
  opacity: 1;
  transform: scale(1);
  animation: pin-pulse 2.2s var(--ease-out) infinite;
}

.map-pin:hover .map-pin__label,
.map-pin.is-active .map-pin__label {
  border-color: var(--c-ink);
  background: var(--c-ink);
  color: var(--c-paper);
}

@keyframes pin-pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* Location list */

.dev-map__list {
  border-top: 1px solid var(--c-line-strong);
}

.map-item {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.25rem 1rem;
  width: 100%;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
}

.map-item::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-expo);
}

.map-item__num {
  color: var(--c-accent-ink);
}

.map-item__name {
  font-size: var(--fs-h4);
  line-height: 1.2;
  letter-spacing: -0.02em;
  transition: color 0.35s var(--ease-out);
}

.map-item__place {
  grid-column: 2;
}

.map-item:hover .map-item__name,
.map-item.is-active .map-item__name {
  color: var(--c-accent-ink);
}

.map-item.is-active::before {
  transform: scaleX(1);
}

/* Preview card */

.map-card {
  margin-top: 2rem;
  background: var(--c-paper-2);
  border: 1px solid var(--c-line);
}

/* The photo links to the project page too (the "View project" link below is the accessible one). */
.map-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--c-stone);
  cursor: pointer;
}

.map-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-expo);
}

.map-card__open {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  background: var(--c-paper);
  color: var(--c-ink);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-expo), background-color 0.3s, color 0.3s;
}

.map-card__open .icon-arrow {
  width: 1rem;
  height: 1rem;
}

.map-card__media:hover img {
  transform: scale(1.05);
}

.map-card__media:hover .map-card__open {
  opacity: 1;
  transform: none;
  background: var(--c-accent-ink);
  color: var(--c-paper);
}

/* Touch screens have no hover, so the hint stays visible there. */
@media (hover: none) {
  .map-card__open {
    opacity: 1;
    transform: none;
  }
}

.map-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.6rem;
  background: rgba(26, 24, 24, 0.62);
  color: var(--c-paper);
}

.map-card__body {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.map-card__index b {
  font-weight: 500;
  color: var(--c-ink);
}

.map-card__title {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.map-card__title em {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.6em;
  color: var(--c-slate);
}

.map-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--c-line-strong);
}

.map-card__meta div {
  display: grid;
  gap: 0.3rem;
  align-content: start;
}

.map-card__meta dd {
  font-size: 0.9375rem;
  line-height: 1.45;
}

.map-card .link-cta {
  justify-self: start;
}

@media (prefers-reduced-motion: reduce) {
  .map-pin.is-active .map-pin__dot::after {
    animation: none;
  }
}

@media (min-width: 640px) {
  .map-item {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  }

  .map-item__place {
    grid-column: auto;
  }
}

@media (min-width: 900px) {
  .dev-map__stage {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(2rem, 5vw, 6rem);
  }

  .dev-map__canvas {
    width: min(100%, 30rem);
  }
}

@media (min-width: 1024px) {
  .dev-map__head {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
    align-items: end;
  }

  .dev-map__head .section-index {
    grid-column: 1 / -1;
  }

  .dev-map__head h2 {
    grid-column: 1 / span 7;
  }

  .dev-map__intro {
    grid-column: 9 / -1;
    justify-self: end;
  }
}

/* --- Project page: one screen, details on glass over the rendering ------ */

/* The rendering stays pinned behind the content: on large screens everything
   fits in one viewport; on small or short screens the cards scroll over it. */
.pd {
  position: relative;
  display: grid;
  background: var(--c-ink);
  color: var(--c-paper);
}

.pd__media,
.pd__layout {
  grid-area: 1 / 1;
}

.pd__media {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100svh;
  overflow: hidden;
}

.pd__frame {
  position: absolute;
  inset: 0;
}

.pd__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 24, 24, 0.5) 0%, rgba(26, 24, 24, 0) 26%),
    linear-gradient(0deg, rgba(26, 24, 24, 0.85) 0%, rgba(26, 24, 24, 0.2) 50%, rgba(26, 24, 24, 0) 72%),
    linear-gradient(90deg, rgba(26, 24, 24, 0.45) 0%, rgba(26, 24, 24, 0) 55%);
}

.pd__layout {
  position: relative;
  display: grid;
  align-content: start;
  gap: 1.25rem;
  min-width: 0;
  padding-top: calc(var(--header-h) + 1.25rem);
  padding-bottom: 1.5rem;
}

.pd__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.pd__main {
  container-type: inline-size;
  display: grid;
  align-content: end;
  gap: clamp(1.25rem, 3vh, 2rem);
  min-height: calc(78svh - var(--header-h));
  padding-bottom: 0.5rem;
}

/* Sized from the title's own column (cqi), so the longest name ("Thalawathugoda",
   about 6.5em wide) fills at most ~85% of it and never breaks mid-word. */
.pd__title {
  font-size: clamp(2.25rem, 0.4rem + 6.5vw, 7.5rem);
  font-size: clamp(2.25rem, 13cqi, 7.5rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.05em;
  overflow-wrap: break-word;
}

.pd__title em {
  display: inline-block;
  font-size: 0.4em;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: rgba(247, 247, 244, 0.86);
}

.pd__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.pd__cards {
  display: grid;
  gap: 1rem;
  align-content: end;
}

/* Glass surface. Dark-tinted so text stays legible over bright skies and façades. */
.glass {
  background: rgba(22, 20, 20, 0.42);
  border: 1px solid rgba(247, 247, 244, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 60px -30px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(22, 20, 20, 0.82);
  }
}

.pd-card {
  display: grid;
  gap: 1rem;
  padding: clamp(1.1rem, 2vw, 1.6rem);
}

.pd-card__label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.pd-card__summary {
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.125rem);
  line-height: 1.5;
  color: rgba(247, 247, 244, 0.92);
}

.pd-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(247, 247, 244, 0.16);
}

.pd-facts div {
  display: grid;
  gap: 0.3rem;
  align-content: start;
}

.pd-facts dd {
  font-size: 0.9375rem;
  line-height: 1.4;
}

.pd-facts .status::before {
  border-color: var(--c-accent-light);
}

.pd-card__note {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(247, 247, 244, 0.6);
}

.pd-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pd-card__row .pd-card__label {
  flex: 1;
}

.pd-expand {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(247, 247, 244, 0.28);
  border-radius: 50%;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.pd-expand svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.pd-expand:hover {
  border-color: var(--c-accent-light);
  background: rgba(233, 56, 25, 0.2);
}

.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.pd-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  opacity: 0.55;
  transition: opacity 0.4s var(--ease-out);
}

.pd-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color 0.4s var(--ease-out);
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-expo);
}

.pd-thumb:hover {
  opacity: 0.85;
}

.pd-thumb:hover img {
  transform: scale(1.08);
}

.pd-thumb[aria-pressed="true"] {
  opacity: 1;
}

.pd-thumb[aria-pressed="true"]::after {
  border-color: var(--c-accent);
  box-shadow: inset 0 -3px 0 var(--c-accent);
}

/* Next development */

.pd-next {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.1rem 0.6rem 0.6rem;
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}

.pd-next__media {
  display: block;
  width: 5.5rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.pd-next__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-expo);
}

.pd-next__text {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.pd-next__name {
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.pd-next__arrow .icon-arrow {
  width: 1.4rem;
  height: 1.4rem;
}

.pd-next:hover {
  background: rgba(22, 20, 20, 0.6);
  border-color: rgba(247, 247, 244, 0.32);
}

.pd-next:hover .pd-next__media img {
  transform: scale(1.08);
}

.pd-next:hover .icon-arrow {
  transform: translateX(0.35rem);
  stroke: var(--c-accent-light);
}

/* Large screens with enough height: everything on one screen. */
@media (min-width: 1024px) and (min-height: 700px) {
  .pd__layout {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto minmax(0, 1fr) auto;
    column-gap: 1.5rem;
    row-gap: clamp(1rem, 2.5vh, 1.75rem);
    height: 100svh;
    padding-top: calc(var(--header-h) + clamp(1rem, 2.5vh, 2rem));
    padding-bottom: clamp(1.25rem, 3vh, 2.25rem);
  }

  .pd__top {
    grid-column: 1 / span 7;
    grid-row: 1;
    justify-content: flex-start;
    column-gap: 2.5rem;
  }

  .pd__main {
    grid-column: 1 / span 7;
    grid-row: 2 / 4;
    align-self: end;
    min-height: 0;
    padding-bottom: 0;
  }

  .pd__title {
    font-size: clamp(2.75rem, min(6.4vw, 12vh), 7.5rem);
    font-size: clamp(2.75rem, min(13cqi, 12vh), 7.5rem);
  }

  /* The whole card stack is centred vertically over the rendering. */
  .pd__cards {
    grid-column: 8 / -1;
    grid-row: 1 / -1;
    align-self: center;
    justify-self: end;
    width: min(100%, 30rem);
  }
}

@media (min-width: 1024px) and (max-width: 1279px) and (min-height: 700px) {
  .pd__top,
  .pd__main {
    grid-column: 1 / span 6;
  }

  .pd__cards {
    grid-column: 7 / -1;
  }
}

@media (min-width: 1024px) and (min-height: 700px) and (max-height: 860px) {
  .pd-card {
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .pd-card__summary {
    font-size: 0.9375rem;
    line-height: 1.45;
  }

  .pd-facts {
    padding-top: 0.75rem;
    gap: 0.6rem 1.25rem;
  }

  .pd-facts dd {
    font-size: 0.875rem;
  }
}

@media (min-width: 1024px) and (min-height: 700px) and (max-height: 760px) {
  .pd__layout {
    row-gap: 0.75rem;
    padding-top: calc(var(--header-h) + 0.75rem);
    padding-bottom: 1rem;
  }

  .pd__cards {
    gap: 0.75rem;
  }
}

/* Narrow and short: the summary only restates the facts below it, so it gives way. */
@media (min-width: 1024px) and (max-width: 1279px) and (min-height: 700px) and (max-height: 760px) {
  .pd-card__summary {
    display: none;
  }
}

/* --- Leadership profile page -------------------------------------------- */

/* Editorial profile: the portrait stays beside the reading column (introduction,
   Profile, Recognition) on large screens; everything stacks on small ones. */
.person {
  padding: calc(var(--header-h) + clamp(2rem, 5vw, 4.5rem)) 0 var(--section-space);
}

.person__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.person__portrait {
  display: grid;
  gap: 1rem;
}

.person__frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--c-paper-2);
}

.person__caption {
  display: grid;
  gap: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--c-line-strong);
}

.person__intro {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.person__name {
  line-height: 0.95;
}

.person__lede {
  max-width: 40ch;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.person__facts {
  margin-top: 0;
}

/* Profile / Recognition blocks */
.person-block {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--c-line-strong);
}

.person-block__title {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.person-profile__text {
  max-width: 62ch;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.7;
}

.person-profile__text p + p {
  margin-top: 1.25em;
}

/* The opening paragraph reads as an introduction. */
.person-profile__text p:first-child {
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);
  line-height: 1.5;
  letter-spacing: -0.015em;
}

.person-profile__text p:not(:first-child) {
  color: var(--c-slate);
}

.person-profile__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 2rem;
}

/* Recognition: a lead photograph with its caption, then the awards. */
.recognition-lead {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.recognition-lead__frame {
  overflow: hidden;
  background: var(--c-paper-2);
}

.recognition-lead__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recognition-lead__caption {
  max-width: 60ch;
  padding-left: 1rem;
  border-left: 2px solid var(--c-accent);
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--c-slate);
}

/* Award photographs side by side, bottoms aligned, each at its own shape. */
.awards {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.award figure {
  display: grid;
  gap: 1rem;
}

.award__frame {
  overflow: hidden;
  background: var(--c-paper-2);
}

.award__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-expo);
}

.award__title {
  font-size: var(--fs-h4);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.award__detail {
  margin-top: 0.5rem;
  line-height: 1.6;
}

@media (hover: hover) {
  .award:hover .award__frame img {
    transform: scale(1.04);
  }
}

/* 4 : 9 columns give the 2:3 trophy and the 3:2 plaque the same height. */
@media (min-width: 640px) {
  .awards {
    grid-template-columns: minmax(0, 4fr) minmax(0, 9fr);
    align-items: end;
    column-gap: clamp(1.25rem, 3vw, 2rem);
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .person__aside {
    max-width: 28rem;
  }
}

@media (min-width: 1024px) {
  .person__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
    align-items: start;
  }

  .person__aside {
    grid-column: 1 / span 5;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }

  /* Never taller than the window, so the pinned portrait and caption stay fully in view. */
  .person__frame {
    width: min(100%, calc((100svh - var(--header-h) - 9rem) * 0.8));
  }

  .person__caption {
    width: min(100%, calc((100svh - var(--header-h) - 9rem) * 0.8));
  }

  .person__content {
    grid-column: 7 / -1;
  }
}

/* --- Lightbox ----------------------------------------------------------- */

/* A light window floating over the dimmed, blurred page. The dialog itself is a
   transparent full-screen layer; the scrim and window inside it are animated. */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 4vw, 3rem);
  border: 0;
  background: transparent;
  color: var(--c-ink);
  overflow: hidden;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox__scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 18, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}

/* The window is sized so the 16:9 rendering plus its caption bar always fit the screen. */
.lightbox__window {
  position: relative;
  width: min(100%, 1500px, calc((100dvh - 10rem) * 1672 / 941));
  padding: clamp(0.5rem, 1vw, 0.75rem);
  background: var(--c-paper);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.6);
}

.lightbox__stage {
  overflow: visible;
}

.lightbox__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
  background: var(--c-stone);
  will-change: transform;
}

.lightbox__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: clamp(0.75rem, 1.5vw, 1rem) clamp(0.25rem, 0.8vw, 0.5rem) clamp(0.25rem, 0.5vw, 0.35rem);
}

.lightbox__caption {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  max-width: 70ch;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--c-slate);
}

.lightbox__controls {
  display: flex;
  gap: 0.5rem;
}

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--c-line-strong);
  border-radius: 50%;
  color: var(--c-ink);
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.lightbox__btn:hover {
  border-color: var(--c-ink);
  background: var(--c-ink);
  color: var(--c-paper);
}

.lightbox__btn--close:hover {
  border-color: var(--c-accent-ink);
  background: var(--c-accent-ink);
}

.lightbox__btn svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

@media (max-width: 639px) {
  .lightbox__caption [data-lb-alt] {
    display: none;
  }
}

/* --- Contact page ------------------------------------------------------- */

.contact--page {
  padding-top: clamp(4rem, 8vw, 7rem);
}

/* --- 404 ---------------------------------------------------------------- */

.not-found {
  min-height: calc(100svh - var(--header-h));
}

.not-found__links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
}
