:root {
  color-scheme: light;
  --paper: #f5f2eb;
  --paper-bright: #fbfaf6;
  --ink: #1d2622;
  --muted: #5c6a63;
  --sage: #5f776b;
  --sage-dark: #344a40;
  --gold: #bd8737;
  --line: rgba(29, 38, 34, 0.14);
  --shadow: 0 24px 70px rgba(26, 36, 31, 0.14);
  --radius: 24px;
  --shell: min(1180px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 4%, rgba(189, 135, 55, 0.13), transparent 28rem),
    radial-gradient(circle at 3% 38%, rgba(95, 119, 107, 0.1), transparent 30rem);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-color: rgba(29, 38, 34, 0.32);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: currentColor;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
summary {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(189, 135, 55, 0.65);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(29, 38, 34, 0.08);
  background: rgba(245, 242, 235, 0.9);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.55rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav .nav-pill {
  padding: 0.62rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 4px auto;
  background: currentColor;
  content: "";
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.25rem;
  color: var(--sage-dark);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 36px;
  height: 1px;
  background: var(--gold);
  content: "";
}

.hero {
  display: grid;
  min-height: calc(100vh - 78px);
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
  padding-block: clamp(4.5rem, 9vw, 8.5rem);
}

.hero h1,
.photo-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero h1 {
  max-width: 13ch;
  font-size: clamp(3.2rem, 6.2vw, 5.9rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero h1 em {
  color: var(--sage);
  font-style: normal;
  font-weight: 400;
}

.hero-intro {
  max-width: 660px;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

.hero-actions,
.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.portrait-wrap {
  position: relative;
  justify-self: end;
}

.portrait-wrap::before {
  position: absolute;
  right: -10%;
  bottom: -8%;
  width: 72%;
  aspect-ratio: 1;
  border: 1px solid rgba(189, 135, 55, 0.45);
  border-radius: 50%;
  content: "";
}

.portrait {
  position: relative;
  display: block;
  width: min(410px, 38vw);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 46% 46% 24px 24px;
  box-shadow: var(--shadow);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
}

.section {
  padding-block: clamp(5rem, 9vw, 8.5rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(200px, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(2rem, 7vw, 7rem);
  margin-bottom: 3rem;
}

.section-heading h2,
.credentials h2,
.photo-intro h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.section-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.research-list {
  display: grid;
  gap: 1rem;
}

.research-card {
  display: grid;
  grid-template-columns: minmax(170px, 0.38fr) minmax(0, 1.62fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 250, 246, 0.65);
}

.research-meta {
  color: var(--sage-dark);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.research-card h3 {
  max-width: 850px;
  margin: 0 0 0.7rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
}

.coauthors {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.abstract {
  max-width: 820px;
  color: var(--muted);
}

.abstract summary {
  width: fit-content;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
}

.abstract p {
  margin: 1rem 0 0;
}

.paper-actions {
  margin-top: 1.25rem;
}

.paper-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--sage-dark);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
}

.paper-link::after {
  content: "↗";
}

.photo-teaser {
  display: grid;
  overflow: hidden;
  min-height: 610px;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  border-radius: 32px;
  background: #1b201c;
  color: white;
}

.photo-teaser-media {
  min-height: 520px;
}

.photo-teaser-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-teaser-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(2rem, 5vw, 4.5rem);
}

.photo-teaser-copy .eyebrow {
  color: #d8e2dc;
}

.photo-teaser-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 4.6vw, 4.6rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1;
}

.photo-teaser-copy p {
  color: rgba(255, 255, 255, 0.68);
}

.photo-teaser-copy .button {
  border-color: rgba(255, 255, 255, 0.35);
  background: white;
  color: var(--ink);
}

.credentials {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(3rem, 8vw, 8rem);
}

.credential-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.credential-group h3 {
  margin: 0 0 1.3rem;
  color: var(--sage-dark);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.credential-list {
  display: grid;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.credential-list li {
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.credential-list strong,
.credential-list span {
  display: block;
}

.credential-list span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
}

/* Photography */

.photo-page {
  background: #eeeae1;
}

.photo-hero {
  display: grid;
  min-height: calc(100vh - 78px);
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

.photo-hero h1 {
  max-width: none;
  font-size: clamp(3.7rem, 8vw, 8rem);
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.photo-hero-copy p:not(.eyebrow) {
  max-width: 31rem;
  color: var(--muted);
  font-size: 1.04rem;
}

.photo-hero-copy .featured-species {
  display: grid;
  gap: 0.08rem;
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
  font-size: 0.84rem;
  line-height: 1.55;
}

.featured-species strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.featured-species em {
  font-family: Georgia, "Times New Roman", serif;
}

.featured-photo {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  aspect-ratio: 3 / 2;
  border-radius: 3px 38px 3px 3px;
  box-shadow: var(--shadow);
}

.featured-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-caption {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 0.4rem 0.72rem;
  border-radius: 999px;
  background: rgba(21, 27, 23, 0.7);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.photo-intro {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(2rem, 8vw, 8rem);
  padding: clamp(5rem, 9vw, 9rem) 0 clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}

.photo-intro p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2.5rem);
  padding-bottom: clamp(5rem, 10vw, 10rem);
}

.gallery-item {
  grid-column: span 6;
  margin: 0;
}

.gallery-item--portrait {
  grid-column: span 5;
}

.gallery-item--narrow {
  grid-column: span 5;
}

.gallery-item--wide {
  grid-column: span 7;
  margin-top: clamp(4rem, 10vw, 9rem);
}

.gallery-item--centered {
  grid-column: 4 / span 6;
  margin-top: clamp(2rem, 6vw, 6rem);
}

.gallery-open {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: #d7d4cb;
  cursor: zoom-in;
}

.featured-photo.gallery-open {
  border-radius: 3px 38px 3px 3px;
}

.featured-photo.gallery-open::after {
  top: 14px;
  right: 14px;
  bottom: auto;
}

.gallery-open::after {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(251, 250, 246, 0.88);
  color: var(--ink);
  content: "+";
  font-size: 1.35rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.gallery-open:hover::after,
.gallery-open:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.gallery-open img {
  width: 100%;
  height: auto;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery-open:hover img {
  transform: scale(1.015);
}

.gallery-item figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  padding-top: 0.72rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.gallery-item figcaption strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 400;
}

.gallery-item figcaption em {
  display: block;
  margin-top: 0.12rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.86rem;
}

.caption-location {
  max-width: 18rem;
  text-align: right;
}

.gallery-item--portrait figcaption {
  grid-template-columns: 1fr;
  gap: 0.25rem;
}

.gallery-item--portrait .caption-location {
  max-width: none;
  text-align: left;
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(13, 17, 15, 0.96);
  color: white;
}

.lightbox::backdrop {
  background: rgba(13, 17, 15, 0.96);
}

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

.lightbox-figure {
  display: grid;
  max-width: min(92vw, 1440px);
  max-height: 90vh;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.8rem;
  margin: 0;
}

.lightbox img {
  width: auto;
  max-width: 92vw;
  height: auto;
  max-height: calc(90vh - 50px);
  margin: auto;
  object-fit: contain;
}

.lightbox figcaption {
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.lightbox-control {
  position: fixed;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(15, 20, 17, 0.45);
  color: white;
  cursor: pointer;
  font-size: 1.5rem;
}

.lightbox-close {
  top: 22px;
  right: 22px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 22px;
}

.lightbox-next {
  right: 22px;
}

@media (max-width: 900px) {
  :root {
    --shell: min(100% - 36px, 760px);
  }

  .hero,
  .photo-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 5rem;
  }

  .portrait-wrap {
    justify-self: start;
  }

  .portrait {
    width: min(78vw, 430px);
  }

  .section-heading,
  .credentials,
  .photo-intro {
    grid-template-columns: 1fr;
  }

  .photo-teaser {
    grid-template-columns: 1fr;
  }

  .photo-teaser-media {
    min-height: 460px;
  }

  .photo-teaser-copy {
    min-height: 380px;
  }

  .photo-hero-copy {
    padding-top: 1rem;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 16px;
  }

  .nav-wrap {
    min-height: 70px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 18px 1.2rem;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 242, 235, 0.98);
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

  .site-nav a {
    padding: 0.8rem 0;
  }

  .site-nav .nav-pill {
    width: fit-content;
    margin-top: 0.5rem;
    padding: 0.55rem 1rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 14vw, 4.7rem);
  }

  .photo-hero h1 {
    font-size: clamp(3.25rem, 17vw, 5.2rem);
  }

  .hero {
    gap: 3.5rem;
    padding-block: 4rem 5.5rem;
  }

  .hero-actions .button {
    flex: 1 1 auto;
  }

  .portrait {
    width: min(86vw, 390px);
  }

  .research-card {
    grid-template-columns: 1fr;
  }

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

  .photo-teaser-media {
    min-height: 330px;
  }

  .photo-teaser-copy {
    min-height: 340px;
  }

  .footer-wrap,
  .footer-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-hero {
    gap: 2.5rem;
    padding-block: 3.5rem 5rem;
  }

  .featured-photo {
    border-radius: 3px 24px 3px 3px;
  }

  .featured-photo.gallery-open {
    border-radius: 3px 24px 3px 3px;
  }

  .gallery {
    display: block;
  }

  .gallery-item,
  .gallery-item--portrait,
  .gallery-item--narrow,
  .gallery-item--wide,
  .gallery-item--centered {
    margin: 0 0 2.5rem;
  }

  .gallery-item figcaption {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .caption-location {
    max-width: none;
    text-align: left;
  }

  .gallery-open::after {
    opacity: 1;
    transform: none;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
  }

  .lightbox-prev {
    left: calc(50% - 62px);
  }

  .lightbox-next {
    right: calc(50% - 62px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
