:root {
  --ap-ink: #142019;
  --ap-muted: #59675e;
  --ap-green: #204f39;
  --ap-green-dark: #0c2017;
  --ap-line: #d9e2dc;
  --ap-paper: #f8faf7;
}

/* Neutralise Quarto's page-column grid on the homepage only. */
body.home-page #quarto-content,
body.home-page #quarto-content.page-columns,
body.home-page main.content,
body.home-page main#quarto-document-content {
  width: 100%;
  max-width: none;
}

body.home-page #quarto-content.page-columns {
  display: block;
}

body.home-page main.content,
body.home-page main#quarto-document-content {
  margin: 0 !important;
  padding: 0 !important;
}

/* Centre and constrain all ordinary inner pages. */
body:not(.home-page) main.content,
body:not(.home-page) main#quarto-document-content {
  width: min(100% - 64px, 1280px);
  max-width: 1280px;
  margin-inline: auto !important;
  padding-top: 0 !important;
  padding-bottom: 5rem !important;
}

body:not(.home-page) #title-block-header {
  display: none;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ap-ink);
  background: var(--ap-paper);
  overflow-x: hidden;
}

.navbar {
  border-bottom: 1px solid rgba(217, 226, 220, 0.75);
  backdrop-filter: blur(14px);
  background: rgba(248, 250, 247, 0.92) !important;
}

.navbar-brand {
  font-weight: 680;
  letter-spacing: -0.025em;
}

.site-frame {
  width: min(100% - 64px, 1500px);
  margin-inline: auto;
}

.hero-cinematic {
  position: relative;
  min-height: min(880px, calc(100vh - 58px));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: white;
  background: var(--ap-green-dark);
}

.hero-media,
.hero-photo,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-photo {
  opacity: 0;
  background-size: cover;
  background-position: center;
  animation: hero-cycle 28s infinite;
  transform: scale(1.03);
}

.hero-photo-forest {
  background-image: url("https://images.unsplash.com/photo-1516441311474-499e4f3b32db?auto=format&fit=crop&q=85&w=2400");
  animation-delay: 0s;
}

.hero-photo-elephant {
  background-image: url("https://images.unsplash.com/photo-1505148230895-d9a785a555fa?auto=format&fit=crop&q=85&w=2400");
  background-position: center 45%;
  animation-delay: 7s;
}

.hero-photo-gibbon {
  background-image: url("https://commons.wikimedia.org/wiki/Special:Redirect/file/Lar%20Gibbon%20%2846946767992%29.jpg?width=2400");
  background-position: center 30%;
  animation-delay: 14s;
}

.hero-photo-technology {
  background-image: url("images/pam_validate.png");
  background-position: center;
  animation-delay: 21s;
}

@keyframes hero-cycle {
  0%   { opacity: 0; transform: scale(1.03); }
  5%   { opacity: 1; }
  23%  { opacity: 1; }
  28%  { opacity: 0; transform: scale(1.09); }
  100% { opacity: 0; }
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(4,13,9,.93) 0%, rgba(4,13,9,.66) 48%, rgba(4,13,9,.16) 82%),
    linear-gradient(0deg, rgba(4,13,9,.78) 0%, rgba(4,13,9,.03) 62%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-block: clamp(72px, 10vh, 120px);
}

.hero-content h1 {
  max-width: 980px;
  margin: 0 0 24px;
  font-size: clamp(2.5rem, 4.2vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
  overflow-wrap: normal;
}

.hero-deck {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
  line-height: 1.55;
  color: rgba(255,255,255,.88);
}

.home-content {
  padding-bottom: 96px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--ap-green);
  font-size: 0.76rem;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: rgba(255,255,255,.72);
}

.button-row,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-row {
  margin-top: 28px;
}

.ap-button {
  display: inline-block;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.primary-light {
  color: var(--ap-green-dark);
  background: white;
}

.ghost-light {
  color: white;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.05);
}

.intro-statement {
  max-width: 1120px;
  padding: 112px 0 72px;
}

.intro-statement h2,
.closing-simple h2 {
  margin: 0;
  font-size: clamp(2.2rem, 3.8vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.project-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  padding: 88px 0;
  border-top: 1px solid var(--ap-line);
}

.project-feature-reverse {
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
}

.project-copy {
  min-width: 0;
}

.project-copy h2 {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 3.4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.045em;
  overflow-wrap: break-word;
}

.project-copy p {
  max-width: 650px;
  margin: 0 0 22px;
  color: var(--ap-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.project-meta {
  margin: 0 0 14px !important;
  color: var(--ap-green) !important;
  font-size: 0.76rem !important;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-link {
  color: var(--ap-green);
  font-weight: 650;
  text-decoration: none;
}

.project-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 0;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
}

.project-image-forest {
  background-image: url("https://images.unsplash.com/photo-1532415914860-f6ee7c74c9fb?auto=format&fit=crop&q=85&w=2200");
}

.project-image-elephant {
  background-image: url("https://images.unsplash.com/photo-1505148230895-d9a785a555fa?auto=format&fit=crop&q=85&w=2200");
  background-position: center 42%;
}

.pam-gallery {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.pam-gallery img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border: 1px solid rgba(20,32,25,.09);
  border-radius: 12px;
  background: white;
  box-shadow: 0 20px 50px rgba(9,32,22,.12);
}

.profile-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 96px);
  margin-top: 72px;
  padding: clamp(36px, 5vw, 72px);
  border-radius: 18px;
  color: white;
  background: var(--ap-green-dark);
}

.profile-copy {
  min-width: 0;
}

.profile-copy h2 {
  max-width: 850px;
  margin: 0 0 20px;
  font-size: clamp(2rem, 3.2vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  overflow-wrap: break-word;
}

.profile-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255,255,255,.76);
  font-size: 1.08rem;
  line-height: 1.65;
}


.closing-simple {
  max-width: 1120px;
  padding: 112px 0 24px;
}

.dark-button {
  color: white;
  background: var(--ap-green-dark);
}

.outline-dark {
  color: var(--ap-green-dark);
  border: 1px solid var(--ap-green-dark);
}

/* Inner pages retain normal Quarto flow. */
.page-intro {
  max-width: 920px;
  padding: 4rem 0 1.5rem;
}

.page-intro h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
  letter-spacing: -0.05em;
}

.page-intro p {
  color: var(--ap-muted);
  font-size: 1.18rem;
  line-height: 1.65;
}

.timeline-item {
  padding: 1.2rem 0 1.5rem;
  border-bottom: 1px solid var(--ap-line);
}

.timeline-date {
  color: var(--ap-green);
  font-weight: 600;
}

.small-note {
  color: var(--ap-muted);
  font-size: 0.92rem;
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo {
    animation: none;
  }

  .hero-photo-forest {
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .project-feature,
  .project-feature-reverse,
  .profile-band {
    grid-template-columns: 1fr;
  }

  .project-feature-reverse .project-copy {
    order: 2;
  }

  .project-image {
    aspect-ratio: 16 / 10;
  }

}

@media (max-width: 680px) {
  .site-frame {
    width: min(100% - 32px, 1500px);
  }

  .hero-cinematic {
    min-height: 720px;
  }

  .hero-content h1 {
    font-size: clamp(2.25rem, 9vw, 3.5rem);
  }

  .intro-statement {
    padding: 76px 0 48px;
  }

  .project-feature {
    gap: 30px;
    padding: 60px 0;
  }

  .project-copy h2 {
    font-size: clamp(2rem, 8.5vw, 3rem);
  }

  .profile-band {
    padding: 30px 22px;
  }


  .closing-simple {
    padding-top: 76px;
  }
}

/* Inner-page spacing */
body:not(.home-page) .page-intro {
  max-width: 920px;
  margin: 0;
  padding: 5rem 0 2.5rem;
}

body:not(.home-page) .page-intro h1 {
  margin-top: 0;
}

body:not(.home-page) h2,
body:not(.home-page) h3,
body:not(.home-page) p,
body:not(.home-page) ul,
body:not(.home-page) ol {
  max-width: 980px;
}

@media (max-width: 680px) {
  body:not(.home-page) main.content,
  body:not(.home-page) main#quarto-document-content {
    width: min(100% - 32px, 1280px);
  }

  body:not(.home-page) .page-intro {
    padding-top: 3.5rem;
  }
}


/* Four-page site: shared full-width inner-page system */
body.research-page #quarto-content,
body.experience-page #quarto-content,
body.contact-page #quarto-content,
body.research-page #quarto-content.page-columns,
body.experience-page #quarto-content.page-columns,
body.contact-page #quarto-content.page-columns,
body.research-page main.content,
body.experience-page main.content,
body.contact-page main.content,
body.research-page main#quarto-document-content,
body.experience-page main#quarto-document-content,
body.contact-page main#quarto-document-content {
  width: 100%;
  max-width: none;
}

body.research-page #quarto-content.page-columns,
body.experience-page #quarto-content.page-columns,
body.contact-page #quarto-content.page-columns {
  display: block;
}

body.research-page main.content,
body.experience-page main.content,
body.contact-page main.content,
body.research-page main#quarto-document-content,
body.experience-page main#quarto-document-content,
body.contact-page main#quarto-document-content {
  margin: 0 !important;
  padding: 0 !important;
}

body.research-page #title-block-header,
body.experience-page #title-block-header,
body.contact-page #title-block-header {
  display: none;
}

.page-hero {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: white;
  background-size: cover;
  background-position: center;
}

.research-hero {
  background-image: url("https://images.unsplash.com/photo-1511497584788-876760111969?auto=format&fit=crop&q=88&w=2400");
}

.experience-hero {
  background-image: url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&q=88&w=2400");
}

.contact-hero {
  min-height: 560px;
  background-image:
    url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&q=88&w=2400");
}

.page-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4,13,9,.93) 0%, rgba(4,13,9,.66) 50%, rgba(4,13,9,.15) 84%),
    linear-gradient(0deg, rgba(4,13,9,.76) 0%, rgba(4,13,9,.04) 66%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding-block: 90px;
}

.page-hero-content h1 {
  max-width: 1150px;
  margin: 0 0 22px;
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  line-height: .95;
  letter-spacing: -.055em;
}

.page-hero-content > p:last-child {
  max-width: 800px;
  margin: 0;
  color: rgba(255,255,255,.86);
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
  line-height: 1.6;
}

.page-content {
  padding-bottom: 100px;
}

.page-intro-wide {
  max-width: 1180px;
  padding: 110px 0 80px;
}

.page-intro-wide h2 {
  margin: 0 0 24px;
  font-size: clamp(2.2rem, 3.8vw, 4.4rem);
  line-height: 1;
  letter-spacing: -.05em;
}

.page-intro-wide > p:last-child {
  max-width: 840px;
  margin: 0;
  color: var(--ap-muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.research-feature,
.experience-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: clamp(44px, 6vw, 96px);
  align-items: center;
  padding: 90px 0;
  border-top: 1px solid var(--ap-line);
}

.research-feature-software {
  grid-template-columns: minmax(340px, .72fr) minmax(0, 1.28fr);
}

.research-photo,
.experience-visual {
  width: 100%;
  aspect-ratio: 5 / 4;
  min-height: 0;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
}

.forest-research-photo {
  background-image: url("https://images.unsplash.com/photo-1532415914860-f6ee7c74c9fb?auto=format&fit=crop&q=88&w=2200");
}

.elephant-research-photo {
  background-image: url("https://images.unsplash.com/photo-1505148230895-d9a785a555fa?auto=format&fit=crop&q=88&w=2200");
  background-position: center 42%;
}

.founder-photo {
  background-image: url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&q=88&w=2200");
}

.research-copy,
.experience-copy {
  min-width: 0;
}

.research-copy h2,
.experience-copy h2 {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 3.5vw, 4.1rem);
  line-height: 1;
  letter-spacing: -.048em;
}

.research-copy p,
.experience-copy p {
  max-width: 720px;
  color: var(--ap-muted);
  font-size: 1.08rem;
  line-height: 1.68;
}

.research-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
}

.research-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 22px 0 90px;
}

.research-card {
  overflow: hidden;
  border: 1px solid var(--ap-line);
  border-radius: 16px;
  background: white;
}

.research-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}

.traits-image {
  background-image: url("https://images.unsplash.com/photo-1534269222346-5a896154c41d?auto=format&fit=crop&q=86&w=1800");
}

.ecosystem-image {
  background-image: url("https://images.unsplash.com/photo-1473448912268-2022ce9509d8?auto=format&fit=crop&q=86&w=1800");
}

.gibbon-image {
  background-image: url("https://commons.wikimedia.org/wiki/Special:Redirect/file/Lar%20Gibbon%20%2846946767992%29.jpg?width=1800");
}

.field-image {
  background-image: url("https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?auto=format&fit=crop&q=86&w=1800");
}

.research-card-copy {
  padding: 28px;
}

.research-card-copy h3,
.capability-grid h3,
.experience-timeline h3 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 2vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.research-card-copy p,
.capability-grid p,
.experience-timeline p {
  color: var(--ap-muted);
  line-height: 1.65;
}

.pam-gallery-research {
  gap: 18px;
}

.publication-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 50px;
  align-items: end;
  margin-top: 20px;
  padding: clamp(40px, 5vw, 72px);
  border-radius: 18px;
  color: white;
  background: var(--ap-green-dark);
}

.publication-band h2 {
  max-width: 950px;
  margin: 0;
  font-size: clamp(2.1rem, 3.5vw, 4.1rem);
  line-height: 1;
  letter-spacing: -.048em;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


.experience-timeline {
  padding: 30px 0 90px;
  border-top: 1px solid var(--ap-line);
}

.experience-timeline article {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 45px;
  padding: 38px 0;
  border-bottom: 1px solid var(--ap-line);
}

.timeline-year {
  color: var(--ap-green);
  font-size: 1.05rem;
  font-weight: 680;
}

.experience-timeline article > div {
  max-width: 850px;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.capability-grid article {
  padding: 28px;
  border: 1px solid var(--ap-line);
  border-radius: 14px;
  background: white;
}

.experience-closing {
  max-width: 1250px;
}

.contact-content {
  padding-block: 100px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.contact-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  border: 1px solid var(--ap-line);
  border-radius: 16px;
  color: var(--ap-ink);
  background: white;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}

.contact-card:hover {
  color: var(--ap-ink);
  border-color: var(--ap-green);
  transform: translateY(-3px);
}

.contact-label {
  color: var(--ap-green);
  font-size: .76rem;
  font-weight: 680;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.contact-card strong {
  max-width: 620px;
  font-size: clamp(1.45rem, 2.1vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.contact-card > span:last-child {
  color: var(--ap-green);
  font-weight: 650;
}

@media (max-width: 980px) {
  .research-feature,
  .research-feature-software,
  .experience-feature,
  .publication-band {
    grid-template-columns: 1fr;
  }

  .research-feature-software .research-copy {
    order: 2;
  }

  .research-split,
  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .publication-links {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .page-hero {
    min-height: 620px;
  }

  .contact-hero {
    min-height: 520px;
  }

  .page-hero-content {
    padding-block: 70px;
  }

  .page-hero-content h1 {
    font-size: clamp(2.25rem, 9vw, 3.5rem);
  }

  .page-intro-wide {
    padding: 78px 0 56px;
  }

  .research-feature,
  .experience-feature {
    gap: 32px;
    padding: 60px 0;
  }

  .research-split,
  .capability-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .experience-timeline article {
    grid-template-columns: 1fr;
    gap: 12px;
  }


  .contact-content {
    padding-block: 70px;
  }

  .contact-card {
    min-height: 220px;
  }
}


/* Version 14: calmer hero typography */
.hero-content h1,
.page-hero-content h1 {
  max-width: 980px;
}

@media (min-width: 1200px) {
  .hero-content h1 {
    max-width: 900px;
  }

  .page-hero-content h1 {
    max-width: 980px;
  }
}


/* Version 15: genuinely restrained hero typography */
.hero-content h1,
.page-hero-content h1 {
  max-width: 900px;
  font-size: clamp(2.4rem, 3.4vw, 3.5rem) !important;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

@media (max-width: 680px) {
  .hero-content h1,
  .page-hero-content h1 {
    font-size: clamp(2.1rem, 8vw, 2.8rem) !important;
    line-height: 1.04;
  }
}


/* Version 16: expanded research and experience copy */
.research-copy p,
.experience-copy p {
  max-width: 760px;
}

.research-card-copy p {
  margin-bottom: 1rem;
}

.research-card-copy p:last-child,
.research-copy p:last-of-type,
.experience-copy p:last-of-type {
  margin-bottom: 0;
}





/* Version 18: personal photo used once, on the homepage */
.home-profile {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  padding: 0 0 88px;
}

.home-profile-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-width: 420px;
  border-radius: 16px;
  background-image:
    linear-gradient(0deg, rgba(5,18,12,.05), rgba(5,18,12,0)),
    url("images/alastair-field.jpeg");
  background-size: cover;
  background-position: center 34%;
}

.home-profile-copy {
  max-width: 760px;
}

.home-profile-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -.04em;
}

.home-profile-copy p {
  max-width: 700px;
  margin: 0 0 20px;
  color: var(--ap-muted);
  font-size: 1.08rem;
  line-height: 1.68;
}

@media (max-width: 800px) {
  .home-profile {
    grid-template-columns: 1fr;
    padding-bottom: 60px;
  }

  .home-profile-photo {
    aspect-ratio: 16 / 11;
    max-width: none;
    background-position: center 31%;
  }
}


/* Version 19: programme-led homepage and plant bioacoustics */
.programme-block {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: clamp(44px, 6vw, 96px);
  align-items: center;
  padding: 20px 0 100px;
}

.programme-visual {
  width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
}

.macro-visual {
  background-image:
    linear-gradient(0deg, rgba(5,18,12,.08), rgba(5,18,12,0)),
    url("https://images.unsplash.com/photo-1532415914860-f6ee7c74c9fb?auto=format&fit=crop&q=88&w=2200");
}

.programme-copy {
  min-width: 0;
}

.programme-copy h2,
.home-theme-heading h2,
.programme-divider h2 {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 3.5vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.programme-copy p,
.home-theme-heading p {
  max-width: 760px;
  color: var(--ap-muted);
  font-size: 1.08rem;
  line-height: 1.68;
}

.home-theme-heading {
  max-width: 1100px;
  padding: 84px 0 42px;
  border-top: 1px solid var(--ap-line);
}

.bioacoustics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 110px;
}

.bio-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 16px;
  color: white;
  text-decoration: none;
  background-size: cover;
  background-position: center;
}

.bio-card:hover {
  color: white;
}

.bio-card-plant {
  background-image: url("https://images.unsplash.com/photo-1771797573215-caa8884a18c9?auto=format&fit=crop&q=85&w=1800");
}

.bio-card-elephant {
  background-image: url("https://images.unsplash.com/photo-1505148230895-d9a785a555fa?auto=format&fit=crop&q=85&w=1800");
  background-position: center 42%;
}

.bio-card-gibbon {
  background-image: url("https://commons.wikimedia.org/wiki/Special:Redirect/file/Lar%20Gibbon%20%2846946767992%29.jpg?width=1800");
  background-position: center 30%;
}

.bio-card-pam {
  background-image: url("images/pam_validate.png");
  background-position: center;
}

.bio-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(4,14,9,.92) 0%, rgba(4,14,9,.18) 72%);
}

.bio-card-copy {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 26px;
  z-index: 2;
}

.bio-card-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 2.6vw, 2.8rem);
  line-height: 1.04;
  letter-spacing: -.04em;
}

.bio-card-copy p {
  max-width: 620px;
  margin: 0 0 16px;
  color: rgba(255,255,255,.84);
  line-height: 1.55;
}

.bio-card-copy span {
  font-weight: 650;
}

.programme-divider {
  max-width: 1160px;
  padding: 105px 0 56px;
  border-top: 1px solid var(--ap-line);
}

.programme-divider:first-of-type {
  border-top: 0;
  padding-top: 30px;
}

.programme-divider p {
  margin-bottom: 14px;
}

.programme-divider-bio {
  margin-top: 10px;
}

.plant-research-photo {
  background-image:
    linear-gradient(0deg, rgba(5,18,12,.05), rgba(5,18,12,0)),
    url("https://images.unsplash.com/photo-1771797573215-caa8884a18c9?auto=format&fit=crop&q=88&w=2200");
  background-position: center;
}

.plant-feature {
  border-top: 0;
  padding-top: 30px;
}

@media (max-width: 980px) {
  .programme-block {
    grid-template-columns: 1fr;
  }

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

  .bio-card {
    min-height: 390px;
  }
}

@media (max-width: 680px) {
  .programme-block {
    gap: 32px;
    padding-bottom: 70px;
  }

  .home-theme-heading {
    padding-top: 62px;
  }

  .bioacoustics-grid {
    padding-bottom: 78px;
  }

  .bio-card {
    min-height: 350px;
  }

  .programme-divider {
    padding: 76px 0 42px;
  }
}


/* Version 20: research hero consolidation and plant-section alignment */
body.research-page .page-content {
  padding-top: 0;
}

body.research-page #macroecology.programme-divider {
  padding-top: 88px;
}

.plant-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: clamp(44px, 6vw, 96px);
  align-items: start;
  padding: 30px 0 90px;
  border-top: 0;
}

.plant-copy {
  min-width: 0;
}

.plant-feature .plant-research-photo {
  width: 100%;
  aspect-ratio: 5 / 4;
  margin: 0;
  align-self: start;
}

@media (max-width: 980px) {
  .plant-feature {
    grid-template-columns: 1fr;
  }

  .plant-feature .plant-research-photo {
    aspect-ratio: 16 / 10;
  }
}


/* Version 21: tighter programme spacing and homepage ending */
body.research-page .programme-divider {
  padding-bottom: 24px;
}

body.research-page #macroecology.programme-divider {
  padding-top: 64px;
}

body.research-page #macroecology + .research-feature {
  padding-top: 34px;
}

body.research-page #bioacoustics.programme-divider {
  padding-top: 72px;
  padding-bottom: 20px;
}

body.research-page #bioacoustics + .plant-feature {
  padding-top: 28px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.home-profile {
  padding-bottom: 64px;
}

@media (max-width: 680px) {
  body.research-page #macroecology.programme-divider,
  body.research-page #bioacoustics.programme-divider {
    padding-top: 54px;
    padding-bottom: 16px;
  }

  body.research-page #macroecology + .research-feature,
  body.research-page #bioacoustics + .plant-feature {
    padding-top: 22px;
  }
}


/* Version 22: rebalance research programme headings and collaboration CTA */
body.research-page .programme-divider {
  width: 100%;
  max-width: none;
}

body.research-page .programme-divider h2 {
  width: 100%;
  max-width: 1380px;
  margin-bottom: 0;
  font-size: clamp(2rem, 2.8vw, 3rem);
  line-height: 1.06;
  letter-spacing: -.038em;
  text-wrap: balance;
}

body.research-page #macroecology.programme-divider {
  padding-top: 48px;
  padding-bottom: 10px;
}

body.research-page #bioacoustics.programme-divider {
  padding-top: 58px;
  padding-bottom: 8px;
}

body.research-page #macroecology + .research-feature,
body.research-page #bioacoustics + .plant-feature {
  padding-top: 22px;
}

.collaboration-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  margin-top: 24px;
  padding: clamp(36px, 4vw, 58px);
  border-radius: 16px;
  color: white;
  background: var(--ap-green-dark);
}

.collaboration-band h2 {
  max-width: 780px;
  margin: 0 0 14px;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -.04em;
}

.collaboration-band p:last-child {
  max-width: 720px;
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: 1.05rem;
  line-height: 1.65;
}

.collaboration-band > .ap-button {
  align-self: end;
  white-space: nowrap;
}

@media (max-width: 800px) {
  body.research-page .programme-divider h2 {
    font-size: clamp(1.85rem, 7vw, 2.5rem);
  }

  .collaboration-band {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .collaboration-band > .ap-button {
    justify-self: start;
  }
}

@media (max-width: 680px) {
  body.research-page #macroecology.programme-divider,
  body.research-page #bioacoustics.programme-divider {
    padding-top: 42px;
    padding-bottom: 8px;
  }

  body.research-page #macroecology + .research-feature,
  body.research-page #bioacoustics + .plant-feature {
    padding-top: 18px;
  }
}


/* Version 24: consistent typographic hierarchy and full-width homepage headings */

/* Level 1: page heroes */
.hero-content h1,
.page-hero-content h1 {
  font-size: clamp(2.4rem, 3.4vw, 3.5rem) !important;
}

/* Homepage overview statement: supporting, not another hero */
.home-page .intro-statement {
  max-width: 1180px;
}

.home-page .intro-statement h2 {
  max-width: 1100px;
  font-size: clamp(2rem, 2.8vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -.038em;
}

/* Level 2: programme headings, flowing across the full site frame */
.home-page .home-theme-heading {
  width: 100%;
  max-width: none;
}

.home-page .home-theme-heading h2 {
  width: 100%;
  max-width: 1450px;
  font-size: clamp(2.1rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.home-page .home-theme-heading p {
  max-width: 900px;
}

.home-page .home-theme-heading-first {
  padding-top: 24px;
  border-top: 1px solid var(--ap-line);
}

/* Level 3: individual feature titles */
.home-page .programme-copy h2,
.research-page .research-copy h2,
.experience-page .experience-copy h2 {
  font-size: clamp(1.9rem, 2.6vw, 2.55rem);
  line-height: 1.06;
  letter-spacing: -.036em;
}

/* Level 4: image-card and supporting-card titles */
.home-page .bio-card-copy h3,
.research-page .research-card-copy h3,
.experience-page .capability-grid h3,
.experience-page .experience-timeline h3 {
  font-size: clamp(1.45rem, 1.9vw, 2rem);
  line-height: 1.08;
  letter-spacing: -.03em;
}

/* Keep the profile title subordinate to the research programmes */
.home-page .home-profile-copy h2 {
  font-size: clamp(1.9rem, 2.6vw, 2.55rem);
  line-height: 1.06;
}

/* The final contact prompt should not compete with the programme headings */
.research-page .collaboration-band h2 {
  font-size: clamp(1.85rem, 2.4vw, 2.5rem);
}

/* White labels over photographic bioacoustics cards */
.home-page .bio-card .project-meta,
.home-page .bio-card .light-meta {
  color: rgba(255,255,255,.82) !important;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}

/* Dark, high-contrast labels on white research sections */
.research-page .project-meta {
  color: var(--ap-ink) !important;
  opacity: .78;
}

/* Tighten the transition from programme heading to the content beneath it */
.home-page .home-theme-heading + .programme-block {
  padding-top: 16px;
}

@media (max-width: 680px) {
  .home-page .intro-statement h2,
  .home-page .home-theme-heading h2 {
    font-size: clamp(1.9rem, 7.5vw, 2.5rem);
  }

  .home-page .programme-copy h2,
  .research-page .research-copy h2,
  .experience-page .experience-copy h2,
  .home-page .home-profile-copy h2 {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }
}


/* Version 26: matched Macroecology and Bioacoustics homepage programmes */
.programme-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 110px;
}

.programme-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 16px;
  color: white;
  text-decoration: none;
  background-size: cover;
  background-position: center;
}

.programme-card:hover,
.programme-card:focus {
  color: white;
}

.macro-card-communities {
  background-image: url("https://images.unsplash.com/photo-1532415914860-f6ee7c74c9fb?auto=format&fit=crop&q=88&w=1800");
}

.macro-card-traits {
  background-image: url("https://images.unsplash.com/photo-1513836279014-a89f7a76ae86?auto=format&fit=crop&q=88&w=1800");
}

.macro-card-services {
  background-image: url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&q=88&w=1800");
}

.macro-card-viewer {
  background-image:
    linear-gradient(rgba(15,36,27,.12), rgba(15,36,27,.12)),
    url("https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&q=88&w=1800");
}

.home-page .programme-card .project-meta,
.home-page .programme-card .light-meta {
  color: rgba(255,255,255,.84) !important;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}

.home-page .programme-card .bio-card-copy h3 {
  font-size: clamp(1.45rem, 1.9vw, 2rem);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.home-page .home-theme-heading .text-link {
  display: inline-block;
  margin-top: 8px;
}

.research-page .programme-media-link {
  display: inline-block;
  margin-top: 20px;
}

@media (max-width: 980px) {
  .programme-card-grid {
    grid-template-columns: 1fr;
  }

  .programme-card {
    min-height: 390px;
  }
}

@media (max-width: 680px) {
  .programme-card-grid {
    padding-bottom: 78px;
  }

  .programme-card {
    min-height: 350px;
  }
}


/* Version 27: definitive full-width headings and reliable anchor layouts */

/* The first homepage programme now follows the hero directly. */
.home-page .home-theme-heading-first {
  padding-top: clamp(64px, 7vw, 104px);
  border-top: 0;
}

/* Let programme headlines use the actual width available.
   Do not balance lines, as that creates artificially short text blocks. */
.home-page .home-theme-heading h2,
.research-page .programme-divider h2 {
  display: block;
  width: 100%;
  max-width: none !important;
  text-wrap: wrap !important;
}

/* Programme headings remain subordinate to the page hero. */
.home-page .home-theme-heading h2,
.research-page .programme-divider h2 {
  font-size: clamp(2rem, 2.55vw, 2.75rem) !important;
  line-height: 1.08;
  letter-spacing: -.036em;
}

/* Ensure the heading divider itself occupies the complete content frame. */
.research-page .programme-divider,
.home-page .home-theme-heading {
  box-sizing: border-box;
  width: 100%;
  max-width: none !important;
}

/* Anchor-linked research sections must start as coherent rows.
   Vertical centring was creating large blank areas beside longer copy. */
.research-page .research-feature,
.research-page .research-feature-software,
.research-page .plant-feature {
  align-items: start !important;
}

/* Keep both columns aligned from their first visible element. */
.research-page .research-photo,
.research-page .research-copy,
.research-page .pam-gallery {
  align-self: start;
}

/* Provide space below the fixed navigation when following homepage cards. */
.research-page [id] {
  scroll-margin-top: 96px;
}

/* Tight, predictable transitions from programme heading to first project. */
.research-page #macroecology.programme-divider,
.research-page #bioacoustics.programme-divider {
  padding-bottom: 20px !important;
}

.research-page #macroecology + .research-feature,
.research-page #bioacoustics + .plant-feature {
  padding-top: 28px !important;
}

/* Remove inherited large top gaps on directly linked features. */
.research-page #future-forests,
.research-page #plant-bioacoustics {
  margin-top: 0;
}

/* Project headings stay visibly below programme headings. */
.research-page .research-copy h2 {
  font-size: clamp(1.75rem, 2.15vw, 2.3rem) !important;
}

/* Homepage cards use the same subordinate title scale. */
.home-page .programme-card .bio-card-copy h3 {
  font-size: clamp(1.45rem, 1.8vw, 1.95rem) !important;
}

@media (max-width: 680px) {
  .home-page .home-theme-heading h2,
  .research-page .programme-divider h2 {
    font-size: clamp(1.85rem, 7vw, 2.35rem) !important;
  }

  .research-page [id] {
    scroll-margin-top: 78px;
  }
}


/* Version 28: detached fragment anchors for complex research grids */
.research-page .section-anchor {
  display: block;
  position: relative;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  scroll-margin-top: 96px;
  pointer-events: none;
  visibility: hidden;
}

/* The anchor is separate from the grid, so :target cannot alter grid layout. */
.research-page .section-anchor:target {
  display: block;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
}

/* Preserve the intended compact transitions after detached anchors. */
.research-page #future-forests + .research-feature {
  padding-top: 28px !important;
}

.research-page #plant-bioacoustics + .plant-feature {
  padding-top: 28px !important;
}

.research-page #pamalytics + .research-feature,
.research-page #elephant-bioacoustics + .research-feature {
  align-items: start !important;
}

/* Documentary links now belong to the relevant animal research sections. */
.research-page .research-card-copy > .text-link {
  display: inline-block;
  margin-top: 8px;
}

@media (max-width: 680px) {
  .research-page .section-anchor {
    scroll-margin-top: 78px;
  }
}


/* Version 29: current advisory work high in the Experience page */
.advisory-feature {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
  gap: clamp(44px, 7vw, 110px);
  align-items: start;
  padding: 58px 0 76px;
  border-top: 1px solid var(--ap-line);
}

.advisory-feature h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(2rem, 2.75vw, 3rem);
  line-height: 1.06;
  letter-spacing: -.04em;
}

.advisory-copy {
  max-width: 820px;
}

.advisory-copy p {
  margin: 0 0 18px;
  color: var(--ap-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.advisory-copy p:last-child {
  margin-bottom: 0;
}

.experience-page .founder-feature {
  padding-top: 76px;
}

.experience-page .experience-closing > .eyebrow {
  margin-bottom: 14px;
}

@media (max-width: 800px) {
  .advisory-feature {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}


/* Version 30: quieter Experience-page contact prompt */
.experience-page .experience-closing {
  padding-top: 48px;
  padding-bottom: 48px;
}

.experience-page .experience-closing h2 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(1.55rem, 2vw, 2rem) !important;
  line-height: 1.18;
  letter-spacing: -.025em;
}

@media (max-width: 680px) {
  .experience-page .experience-closing h2 {
    font-size: clamp(1.4rem, 6vw, 1.8rem) !important;
  }
}
