/* =====================================================================
   Weaver Lab — Option 06 · "The Heritage"
   Serif-led, warm, unhurried. Distinction through craft, not costume:
   generous scale, wide margins, hairlines instead of boxes, one green.
   Type: Source Serif 4 (display + body) · Inter (small UI only).
   ===================================================================== */

:root {
  --bg: #faf9f6;
  --bg-deep: #f4f2ec;
  --ink: #201f1c;
  --body: #33312c;
  --muted: #6b665c;
  --green: #1c5420;
  --green-deep: #153f19;
  --gold: #d9a41b; /* used exactly once: the ribbon at the top of the page */
  --hairline: #e8e5df;
  --sage: #e7e9e0;
  --sage-deep: #d9ded1;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* the single gold detail: a fine ribbon at the very top of every page */
body::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--gold);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(1.4rem, 5vw, 3rem);
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 400;
  margin: 0 0 1rem;
}
h1 {
  font-size: clamp(2.5rem, 5.2vw, 3.8rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
}
h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.008em;
}
h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
}
p { margin: 0 0 1.2rem; max-width: 65ch; }
a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(28, 84, 32, 0.4);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--green-deep); text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 2px;
}
em { font-style: italic; }
.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  z-index: 50;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ============================= header ============================= */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  position: relative;
}
.brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.05rem;
}
.nav {
  display: flex;
  gap: clamp(1.1rem, 2.4vw, 2rem);
  font-family: var(--sans);
  font-size: 0.92rem;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0;
}
.nav a:hover { color: var(--ink); }
.nav a.active {
  color: var(--ink);
  box-shadow: 0 2px 0 var(--green);
}
.nav-toggle {
  display: none;
  font-size: 1.3rem;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  color: var(--ink);
}

/* ============================= hero ============================= */
.hero { padding: clamp(4.5rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero h1 { max-width: 22ch; }
.hero .lede {
  font-size: clamp(1.15rem, 1.8vw, 1.3rem);
  line-height: 1.65;
  color: var(--body);
  max-width: 58ch;
  margin-top: 1.4rem;
}
.hero-meta {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2.2rem;
}
.hero-meta strong { color: var(--ink); font-weight: 600; }

.btn-row { display: flex; gap: 1.6rem; align-items: center; margin-top: 2.4rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  background: var(--green);
  color: #fdfdfb;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--green-deep); color: #fff; }
.link-arrow {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================= sections ============================= */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section + .section { border-top: 1px solid var(--hairline); }
.section--deep { background: var(--bg-deep); border-top: 1px solid var(--hairline); }

.kicker {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 1rem;
}

/* asymmetric two-column moment: heading left, prose right */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.split h2 { max-width: 16ch; }
.split .lead-in p:first-child { margin-top: 0.35rem; }

/* stacked hairline entries (people, news, openings) — no cards */
.entry-list { border-top: 1px solid var(--hairline); }
.entry {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 1rem 2.5rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--hairline);
}
.entry-key {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
  padding-top: 0.3rem;
}
.entry-body h3 { margin-bottom: 0.4rem; }
.entry-body p { margin-bottom: 0.4rem; }
.entry-body p:last-child { margin-bottom: 0; }

/* ============================= people ============================= */
.pi-feature {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.portrait {
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  background: linear-gradient(165deg, var(--sage), var(--sage-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 2.6rem;
  color: #7a8270;
}
.person {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 1.6rem;
  align-items: center;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--hairline);
}
.person .avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(165deg, var(--sage), var(--sage-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: #7a8270;
  overflow: hidden;
}
.person .avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { margin: 0 0 0.15rem; font-size: 1.15rem; }
.person .role { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); margin: 0; }
.person .links { font-family: var(--sans); font-size: 0.88rem; margin-top: 0.3rem; }
.person .links a { margin-right: 1rem; }

/* ============================= news ============================= */
.news-item {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 0.5rem 2.5rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--hairline);
}
.news-item:first-child { border-top: 1px solid var(--hairline); }
.news-date {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
  padding-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.news-body h3 { margin: 0 0 0.35rem; font-size: 1.18rem; font-weight: 600; }
.news-body h3 a { color: var(--ink); text-decoration: none; }
.news-body h3 a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.news-body p { margin: 0; color: var(--body); }

/* ============================= publications ============================= */
.pub-search {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  padding: 0.6rem 0.1rem;
  width: min(420px, 100%);
  margin-bottom: 0.4rem;
}
.pub-search:focus { outline: none; border-bottom-color: var(--green); }
.pub-count { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }

.pub-year-group {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 0.5rem 2.5rem;
  padding: 2.2rem 0 1rem;
  border-bottom: 1px solid var(--hairline);
}
.pub-year {
  font-family: var(--serif);
  font-size: 1.7rem;
  color: var(--ink);
  line-height: 1;
  padding-top: 0.2rem;
}
.pub-year-group .pub { grid-column: 2; }
.pub { margin-bottom: 1.7rem; }
.pub-title { font-size: 1.08rem; line-height: 1.5; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.pub-authors {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.55;
}
.pub-authors .self { color: var(--ink); font-weight: 500; }
.pub-meta { font-size: 0.95rem; color: var(--muted); margin-top: 0.15rem; }
.pub-links { font-family: var(--sans); font-size: 0.84rem; margin-top: 0.3rem; }
.pub-links a { margin-right: 0.9rem; }
.badge {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 0.12rem 0.42rem;
  margin-left: 0.5rem;
  vertical-align: 2px;
}
.badge--review { background: #f4e5b2; color: #6b5310; }
.badge--featured { background: var(--sage); color: #40522f; }
.review-banner {
  font-family: var(--sans);
  font-size: 0.92rem;
  background: #faf1d4;
  border: 1px solid #ecd9a0;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 2rem;
}

/* ============================= figures / gallery ============================= */
.figure-ph {
  border-radius: 8px;
  background: linear-gradient(160deg, var(--sage), var(--sage-deep));
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.2rem;
  color: #6d7562;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}
.gallery-item { margin: 0; }
.gallery-item figcaption {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
  padding-top: 0.7rem;
  line-height: 1.5;
}
.gallery-item figcaption strong {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

/* ============================= footer ============================= */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 3.5rem 0 2.5rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}
.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.site-footer address {
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.6rem;
  line-height: 1.6;
}
.foot-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: var(--sans);
  font-size: 0.92rem;
}
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.site-footer small {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2.5rem;
}

/* ======================= the interactive atlas ======================= */
/* The dark stage is inherited from option_01 (the categorical palette was
   CVD-validated on #10151d). The chrome around and over it is recast in
   the site's ivory: quiet light panels resting on the image. */

.exhibit { margin: 2.5rem 0 0; }
.exhibit-stage {
  position: relative;
  background: #10151d;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  min-height: 420px;
}
.exhibit-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
.exhibit-stage canvas.dragging { cursor: grabbing; }

.exhibit-controls {
  position: absolute;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  pointer-events: none;
  z-index: 3;
}
.exhibit-controls--top { top: 1rem; }
.exhibit-controls--bottom { bottom: 1rem; }
.chipgroup {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.chipgroup-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(250, 249, 246, 0.6);
  white-space: nowrap;
}
.chips {
  display: inline-flex;
  background: rgba(250, 249, 246, 0.92);
  border: 1px solid rgba(32, 31, 28, 0.12);
  border-radius: 999px;
  padding: 2px;
  backdrop-filter: blur(8px) saturate(120%);
}
.chip {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}
.chip:hover { color: var(--ink); }
.chip.is-on {
  background: var(--green);
  color: #fdfdfb;
  font-weight: 500;
}
.chip:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.chip .gene { font-style: italic; font-family: var(--serif); font-size: 0.84rem; }

.exhibit-legend {
  position: absolute;
  top: 3.6rem;
  right: 1rem;
  z-index: 2;
  background: rgba(250, 249, 246, 0.93);
  border: 1px solid rgba(32, 31, 28, 0.12);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  backdrop-filter: blur(8px) saturate(120%);
  max-width: 250px;
  font-family: var(--sans);
}
/* atlas.js writes one inline white color for the gene-mode title; the
   panel here is light, so re-ink anything inline-styled inside it. */
.exhibit-legend [style] { color: var(--ink) !important; }
.exhibit-legend .lg-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--body);
  padding: 0.14rem 0.1rem;
  border: 0;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  border-radius: 6px;
}
.exhibit-legend .lg-item:hover { background: rgba(32, 31, 28, 0.05); }
.exhibit-legend .lg-item.off { opacity: 0.4; }
.exhibit-legend .lg-item.off .lg-name { text-decoration: line-through; }
.exhibit-legend .lg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.exhibit-legend .lg-count {
  margin-left: auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
}
.exhibit-legend .lg-ramp {
  width: 170px;
  height: 10px;
  border-radius: 5px;
  margin: 0.35rem 0 0.3rem;
}
.exhibit-legend .lg-ramp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
}
.exhibit-legend .lg-note {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.exhibit-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.exhibit-labels .glabel {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 0 5px rgba(6, 9, 14, 0.95), 0 0 12px rgba(6, 9, 14, 0.9);
  white-space: nowrap;
}

.exhibit-zoom {
  position: absolute;
  right: 1rem;
  bottom: 3.6rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.exhibit-zoom button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(32, 31, 28, 0.14);
  background: rgba(250, 249, 246, 0.92);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.exhibit-zoom button:hover { background: #fff; }
.exhibit-zoom button.is-on {
  background: var(--green);
  border-color: var(--green);
  color: #fdfdfb;
}
.exhibit-readout {
  position: absolute;
  left: 1rem;
  bottom: 3.4rem;
  z-index: 2;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink);
  background: rgba(250, 249, 246, 0.94);
  border: 1px solid rgba(32, 31, 28, 0.12);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  max-width: 60%;
}
.exhibit-readout.show { opacity: 1; }
.exhibit-hint {
  position: absolute;
  left: 50%;
  bottom: 3.4rem;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(250, 249, 246, 0.9);
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.exhibit-hint.hide { opacity: 0; }

.exhibit figcaption {
  margin-top: 1.1rem;
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.65;
}
.exhibit-status {
  display: block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--body);
  margin-bottom: 0.45rem;
}

/* ============================= responsive ============================= */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 1rem; }
  .pi-feature { grid-template-columns: 1fr; }
  .pi-feature .portrait { max-width: 260px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .entry, .news-item, .pub-year-group { grid-template-columns: 1fr; gap: 0.3rem 0; }
  .pub-year-group .pub { grid-column: 1; }
  .pub-year { margin-bottom: 0.8rem; }
}

@media (max-width: 760px) {
  .nav {
    position: absolute;
    top: 82px;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
    padding: 0.5rem clamp(1.4rem, 5vw, 3rem) 1rem;
    display: none;
    z-index: 20;
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: 0.75rem 0; border-bottom: 1px solid var(--hairline); }
  .nav a.active { box-shadow: none; color: var(--green); }
  .nav-toggle { display: inline-block; }
  .exhibit-stage { aspect-ratio: auto; height: 76vh; }
  .exhibit-legend { max-width: 46%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
