:root {
  --paper: #f7f7f4;
  --ink: #101010;
  --muted: #636363;
  --line: #cfcfca;
  --white: #ffffff;
  --data-blue: #1768ac;
  --max-width: 1240px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 244, 0.96);
  backdrop-filter: blur(12px);
}
.header-inner,
.hero-inner,
.section,
.fieldwork,
.page-hero-inner,
.wide-section,
.site-footer {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}
.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  flex: 0 0 auto;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(13px, 1.6vw, 24px);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav a {
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.nav-pending { color: #8a8a86; cursor: not-allowed; }
.nav-pending::after {
  content: "Soon";
  margin-left: 5px;
  padding: 2px 4px;
  border: 1px solid var(--line);
  font-size: 0.5rem;
  vertical-align: 2px;
}
.menu-button {
  display: none;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.hero {
  min-height: min(700px, calc(100vh - 78px));
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.hero-inner { padding-block: clamp(85px, 14vw, 170px); }
.eyebrow,
.section-label,
.item-number,
.kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 940px;
  margin: 24px 0 18px;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 7.5vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.052em;
  line-height: 0.96;
}
.motto {
  margin: 0 0 42px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-style: italic;
}
.text-link,
.button-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.button-link {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
}
.button-link:hover,
.button-link:focus-visible { background: var(--ink); color: var(--white); }

.section {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: clamp(30px, 6vw, 90px);
  padding-block: clamp(72px, 10vw, 125px);
}
.section-rule { border-bottom: 1px solid var(--line); }
.section-label { padding-top: 10px; }
.section-content { max-width: 940px; }
.section-content h2,
.fieldwork h2,
.page-hero h1,
.wide-section h2 {
  margin: 0 0 40px;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 4.3vw, 4.6rem);
  font-weight: 400;
  letter-spacing: -0.043em;
  line-height: 1;
}
.prose p,
.lead {
  max-width: 780px;
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.8vw, 1.42rem);
  line-height: 1.58;
}
.bio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.bio-layout .prose p {
  margin-bottom: 30px;
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
  line-height: 1.62;
}
.portrait {
  position: sticky;
  top: 110px;
  margin: 0;
}
.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 25%;
  filter: grayscale(100%);
}

.research-list { border-top: 1px solid var(--ink); }
.research-list article {
  display: grid;
  grid-template-columns: 65px minmax(190px, 0.75fr) minmax(240px, 1fr);
  gap: 30px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.research-list h3,
.research-list p { margin: 0; }
.research-list h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.2;
}
.research-list article > p:last-child { color: var(--muted); }

.fieldwork { padding-block: clamp(72px, 10vw, 125px); }
.fieldwork-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-bottom: 34px;
}
.carousel-controls { display: flex; align-items: center; gap: 12px; }
.carousel-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.carousel-button:hover,
.carousel-button:focus-visible { background: var(--ink); color: var(--white); }
.carousel-count {
  min-width: 48px;
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.carousel { position: relative; }
.carousel-slide { display: none; margin: 0; }
.carousel-slide.is-active { display: block; }
.carousel-slide img {
  display: block;
  width: 100%;
  height: clamp(430px, 64vw, 760px);
  object-fit: cover;
}
.carousel-slide:nth-child(1) img { object-position: center 42%; }
.carousel-slide:nth-child(2) img { object-position: center 35%; }
.carousel-slide:nth-child(3) img { object-position: center 50%; }
.carousel-slide figcaption {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.publications-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 48px;
}
.publications-heading h2 { margin-bottom: 14px; }
.publication-intro {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.15rem;
}
.scholar-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px 10px 10px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scholar-link:hover,
.scholar-link:focus-visible { background: var(--ink); color: var(--white); }
.scholar-logo { width: 25px; height: 25px; object-fit: contain; }
.publication-list { border-top: 1px solid var(--ink); }
.publication {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  column-gap: 30px;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line);
}
.publication--featured { padding-block: 34px; }
.publication-meta {
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.publication h3,
.publication > p { grid-column: 2; }
.publication h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.28rem, 2.2vw, 1.9rem);
  font-weight: 500;
  line-height: 1.25;
}
.publication h3 a { text-decoration: none; }
.publication h3 a:hover,
.publication h3 a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.publication > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}
.publication strong { color: var(--ink); }
.cofirst { margin-left: 6px; font-style: italic; }

.contact { min-height: 460px; }
.email-link {
  display: inline-block;
  max-width: 100%;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
  overflow-wrap: anywhere;
}
.contact-note { margin: 28px 0 0; color: var(--muted); }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 28px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.site-footer p { margin: 0; }

/* Interior pages */
.page-hero { border-bottom: 1px solid var(--line); }
.page-hero-inner { padding-block: clamp(86px, 12vw, 150px); }
.page-hero h1 { max-width: 970px; margin: 20px 0 28px; }
.page-hero .lead { max-width: 850px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.wide-section { padding-block: clamp(70px, 9vw, 115px); border-bottom: 1px solid var(--line); }
.wide-section > h2 { max-width: 800px; }
.stats-grid,
.resource-grid,
.figure-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}
.stat,
.resource-card,
.blog-card {
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat:last-child,
.resource-card:last-child,
.blog-card:last-child { border-right: 0; }
.stat strong {
  display: block;
  margin-bottom: 7px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 400;
  line-height: 1;
}
.stat span { color: var(--muted); font-size: 0.85rem; }
.figure-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 54px;
  max-width: 1000px;
  margin-inline: auto;
  border-top: 0;
}
.science-figure {
  width: 100%;
  margin: 0 auto;
}
.science-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
}
.science-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}
.explorer-intro {
  max-width: 820px;
  margin: -18px 0 38px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
}
.explorer-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.explorer-controls label {
  display: grid;
  gap: 7px;
}
.explorer-controls label > span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.explorer-controls select {
  width: 100%;
  min-height: 46px;
  padding: 9px 34px 9px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 0.88rem var(--sans);
}
.explorer-controls select:disabled {
  border-color: var(--line);
  color: var(--muted);
}
.explorer-summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}
.explorer-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.abundance-legend {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
}
.abundance-size-key {
  min-width: 76px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: space-around;
}
.abundance-size-key i {
  display: inline-block;
  border-radius: 50%;
  background: var(--data-blue);
}
.abundance-size-key i:nth-child(1) {
  width: 6px;
  height: 6px;
}
.abundance-size-key i:nth-child(2) {
  width: 12px;
  height: 12px;
}
.abundance-size-key i:nth-child(3) {
  width: 20px;
  height: 20px;
}
.interactive-figure {
  margin: 52px 0 0;
}
.interactive-figure + .interactive-figure {
  margin-top: 88px;
}
.interactive-figure-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}
.interactive-figure-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  font-weight: 500;
}
.interactive-figure-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}
.chart-frame {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.chart-frame svg {
  display: block;
  width: 100%;
  height: auto;
}
#grump-map {
  cursor: grab;
  touch-action: none;
}
#grump-map:active { cursor: grabbing; }
.interactive-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}
.map-graticule {
  fill: none;
  stroke: #d8d8d2;
  stroke-width: 0.7;
}
.map-land {
  fill: #ecece7;
  stroke: #94948e;
  stroke-width: 0.8;
}
.map-sample-points circle,
.depth-sample-points circle {
  fill: #c8c8c3;
  fill-opacity: 1;
}
.map-abundance-points circle,
.depth-abundance-points circle {
  fill: var(--data-blue);
  stroke: var(--white);
  stroke-width: 0.8;
  fill-opacity: 0.88;
}
.chart-grid line {
  stroke: #deded9;
  stroke-width: 1;
}
.chart-grid path { display: none; }
.chart-axis path,
.chart-axis line {
  stroke: #777772;
}
.chart-axis text,
.chart-axis-label {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
}
.resource-card h3,
.blog-card h3,
.tutorial-step h2 {
  margin: 8px 0 12px;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.2;
}
.section-title-only { margin-bottom: 34px !important; }
.resource-card p,
.blog-card p { color: var(--muted); }
.resource-card a,
.blog-card a { text-underline-offset: 4px; }
.updates-list { border-top: 1px solid var(--ink); }
.update-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 30px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.update-item time,
.post-meta { color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.update-item h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.update-item p { margin: 0; color: var(--muted); }
.tutorial-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(35px, 6vw, 85px);
  align-items: start;
}
.tutorial-nav {
  position: sticky;
  top: 110px;
  display: grid;
  border-top: 1px solid var(--ink);
}
.tutorial-nav a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}
.tutorial-nav a:hover { color: var(--ink); }
.tutorial-step { padding: 0 0 72px; }
.tutorial-step + .tutorial-step { padding-top: 72px; border-top: 1px solid var(--line); }
.tutorial-step > p { max-width: 780px; }
.taxonomy-tool {
  margin-top: 42px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--ink);
  background: var(--white);
}
.taxonomy-tool label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.45rem;
}
.taxonomy-tool > p {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--muted);
}
.taxonomy-input {
  width: 100%;
  padding: 15px 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 1.1rem var(--sans);
  outline: none;
}
.taxonomy-input:focus { border-bottom-width: 4px; }
.taxonomy-status {
  min-height: 24px;
  margin: 13px 0 0 !important;
  font-size: 0.78rem;
}
.taxonomy-results { border-top: 1px solid var(--line); }
.taxonomy-result {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.taxonomy-result:hover,
.taxonomy-result:focus-visible { padding-inline: 10px; background: var(--ink); color: var(--white); }
.taxonomy-result span:last-child {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.taxonomy-result:hover span:last-child,
.taxonomy-result:focus-visible span:last-child { color: var(--white); }
.generated-code {
  margin-top: 38px;
  padding-top: 38px;
  border-top: 1px solid var(--line);
}
.generated-code h3 {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
}
.generated-code > p:not(.kicker) { max-width: 760px; color: var(--muted); }
.code-shell { position: relative; margin-top: 24px; }
.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid #4b4b4b;
  background: #191919;
  color: #f4f4f4;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}
.copy-button:hover,
.copy-button:focus-visible { background: #f4f4f4; color: #191919; }
pre {
  margin: 0;
  padding: 52px 22px 24px;
  overflow-x: auto;
  background: #151515;
  color: #f3f3ed;
  font: 0.82rem/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  tab-size: 2;
}
.blog-intro {
  max-width: 780px;
  color: var(--ink) !important;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
}
.blog-card { min-height: 250px; }
.blog-card .post-meta { margin: 0 0 36px; }
.blog-card h3 { font-size: 1.8rem; }
.empty-state {
  padding: 36px;
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.25rem;
}

@media (max-width: 1040px) {
  .site-nav { gap: 12px; font-size: 0.65rem; }
  .nav-pending::after { display: none; }
  .explorer-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .menu-button { display: block; }
  .site-nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    display: none;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }
  .site-nav.is-open { display: grid; }
  .site-nav a,
  .nav-pending { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .section { grid-template-columns: 1fr; gap: 30px; }
  .bio-layout { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 440px; grid-row: 1; }
  .research-list article { grid-template-columns: 45px 1fr; }
  .research-list article > p:last-child { grid-column: 2; }
  .publications-heading { display: grid; }
  .scholar-link { width: fit-content; }
  .publication { grid-template-columns: 1fr; }
  .publication-meta,
  .publication h3,
  .publication > p { grid-column: 1; }
  .publication-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
  .figure-grid,
  .stats-grid,
  .resource-grid,
  .blog-grid { grid-template-columns: 1fr; }
  .stat,
  .resource-card,
  .blog-card { border-right: 0; }
  .tutorial-layout { grid-template-columns: 1fr; }
  .tutorial-nav { position: static; grid-template-columns: repeat(2, 1fr); column-gap: 20px; margin-bottom: 30px; }
  .update-item { grid-template-columns: 1fr; gap: 8px; }
  .explorer-summary,
  .interactive-figure-heading {
    display: grid;
  }
}
@media (max-width: 620px) {
  .header-inner,
  .hero-inner,
  .section,
  .fieldwork,
  .page-hero-inner,
  .wide-section,
  .site-footer { width: min(calc(100% - 28px), var(--max-width)); }
  .hero { min-height: 620px; }
  .hero h1 { font-size: clamp(2.9rem, 15vw, 5rem); }
  .fieldwork-heading { display: grid; }
  .carousel-slide img { height: 62vh; min-height: 400px; }
  .site-footer { display: grid; }
  .tutorial-nav { grid-template-columns: 1fr; }
  .explorer-controls { grid-template-columns: 1fr; }
  .abundance-legend { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
