/* ==========================================================================
   FLOWER Lab — site styles
   Layout: one left-aligned column (max ~1120px), a quiet header, one
   illustrated hero on the home page, and plain sections separated by space
   rather than boxes. Color lives in small floral details, not big fills.
   ========================================================================== */

:root {
  /* Color: light theme */
  --paper: #ffffff;         /* page background */
  --paper-2: #f3f7f3;       /* faint green band */
  --ink: #1b2a22;           /* text, deep evergreen */
  --ink-soft: #4b5b52;      /* secondary text */
  --line: #e1e8e3;          /* hairlines and borders */
  --stem: #2e6b4c;          /* links, buttons, stems */
  --leaf: #8dbf9c;          /* leaves, quiet accents */
  --petal: #d2456c;         /* peony pink, main floral accent */
  --petal-soft: #f9e1e8;
  --iris: #6e5cc4;
  --iris-soft: #e9e5f8;
  --marigold: #e8892b;
  --marigold-soft: #fbe9d4;
  --cornflower: #3f7fcf;
  --cornflower-soft: #e1ecfa;
  --pollen: #f2b93b;        /* flower centers */
  --pollen-soft: #fcefcb;
  --seed: #6b4423;
  --focus: #3f7fcf;

  /* Type */
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-hero: "Mobalys", "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Roboto", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.5rem + 1vw, 2.125rem);
  --step-4: clamp(2.25rem, 1.55rem + 2.8vw, 3.5rem);

  /* Space and shape */
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 65ch;
  --radius: 14px;

  /* A small five-petal flower, used as a mask so it can take any color */
  --bloom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23000'%3E%3Ccircle cx='12' cy='6' r='4.6'/%3E%3Ccircle cx='17.71' cy='10.15' r='4.6'/%3E%3Ccircle cx='15.53' cy='16.85' r='4.6'/%3E%3Ccircle cx='8.47' cy='16.85' r='4.6'/%3E%3Ccircle cx='6.29' cy='10.15' r='4.6'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/g%3E%3C/svg%3E");
  /* A scalloped circle for team photos */
  --scallop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23000'%3E%3Ccircle cx='50' cy='50' r='40'/%3E%3Ccircle cx='88' cy='50' r='11'/%3E%3Ccircle cx='82.91' cy='69' r='11'/%3E%3Ccircle cx='69' cy='82.91' r='11'/%3E%3Ccircle cx='50' cy='88' r='11'/%3E%3Ccircle cx='31' cy='82.91' r='11'/%3E%3Ccircle cx='17.09' cy='69' r='11'/%3E%3Ccircle cx='12' cy='50' r='11'/%3E%3Ccircle cx='17.09' cy='31' r='11'/%3E%3Ccircle cx='31' cy='17.09' r='11'/%3E%3Ccircle cx='50' cy='12' r='11'/%3E%3Ccircle cx='69' cy='17.09' r='11'/%3E%3Ccircle cx='82.91' cy='31' r='11'/%3E%3C/g%3E%3C/svg%3E");
}

/* Script face for the home headline and page titles: Mobalys by Alit Design
   (a commercial font, licensed webfont in assets/fonts/). If the file is
   missing, those titles fall back to Bricolage Grotesque. */
@font-face {
  font-family: "Mobalys";
  src: url("../assets/fonts/Mobalys.woff2") format("woff2");
  font-weight: 100 900;   /* one weight; stops browsers faking a bold */
  font-style: normal;
  font-display: swap;
}

/* Dark theme: follows the visitor's system setting */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111814;
    --paper-2: #17201b;
    --ink: #e7eee9;
    --ink-soft: #a9b8af;
    --line: #2a372f;
    --stem: #7fc79e;
    --leaf: #4f8a65;
    --petal: #f07399;
    --petal-soft: #3a1f2a;
    --iris: #a797f2;
    --iris-soft: #272240;
    --marigold: #f2a257;
    --marigold-soft: #382816;
    --cornflower: #7caef0;
    --cornflower-soft: #1b2a40;
    --pollen: #f5c95c;
    --pollen-soft: #2b2614;
    --seed: #c89a6a;
    --focus: #7caef0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111814;
  --paper-2: #17201b;
  --ink: #e7eee9;
  --ink-soft: #a9b8af;
  --line: #2a372f;
  --stem: #7fc79e;
  --leaf: #4f8a65;
  --petal: #f07399;
  --petal-soft: #3a1f2a;
  --iris: #a797f2;
  --iris-soft: #272240;
  --marigold: #f2a257;
  --marigold-soft: #382816;
  --cornflower: #7caef0;
  --cornflower-soft: #1b2a40;
  --pollen: #f5c95c;
  --pollen-soft: #2b2614;
  --seed: #c89a6a;
  --focus: #7caef0;
  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--stem);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.012em;
}
h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.028em; }
h2 { font-size: var(--step-3); font-weight: 650; }
h3 { font-size: var(--step-1); font-weight: 600; }

p, ul, ol, dl, dd, figure { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--stem);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 20;
}
.skip-link:focus { top: 12px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 58ch;
}
.page-note {
  font-size: var(--step--1);
  color: var(--ink-soft);
  max-width: 68ch;
}

.prose { max-width: var(--measure); display: grid; gap: 1em; }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.brand-name span { font-weight: 450; color: var(--ink-soft); }

.logo-mark { width: 36px; height: 36px; flex: none; overflow: visible; }
.logo-petals {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.7s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.logo-petals ellipse:nth-child(odd) { fill: var(--petal); }
.logo-petals ellipse:nth-child(even) { fill: var(--petal); opacity: 0.72; }
.logo-center { fill: var(--pollen); }
.brand:hover .logo-petals,
.brand:focus-visible .logo-petals { transform: rotate(60deg); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 1px 12px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 1rem;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--petal);
  -webkit-mask: var(--bloom) center / contain no-repeat;
  mask: var(--bloom) center / contain no-repeat;
  transform: scale(0);
  transition: transform 0.25s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scale(0.7); background: var(--leaf); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.site-nav a[aria-current="page"]::after { transform: scale(1); background: var(--petal); }

/* ---------- Buttons and small links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.7em 1.25em;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--stem); color: var(--paper); }
.btn-primary:hover { background: var(--ink); }
.btn-quiet { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn-quiet:hover { border-color: var(--stem); }

.text-link { font-weight: 500; }

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.link-row a,
.link-row button {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: var(--step--1);
  color: var(--stem);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}
.link-row a:hover,
.link-row button:hover { border-color: var(--stem); }

/* ---------- Sections ---------- */

.section { padding-block: clamp(48px, 7vw, 88px); }
.section + .section { padding-top: 0; }

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 44px);
  max-width: var(--measure);
}
.section-head p { color: var(--ink-soft); }

.band { background: var(--paper-2); }

/* ---------- Home: hero ---------- */

.hero { padding-block: clamp(16px, 2vw, 22px) clamp(24px, 3vw, 32px); }
.hero + .section { padding-top: clamp(32px, 5vw, 56px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-affil { color: var(--ink-soft); font-size: var(--step--1); line-height: 1.45; }

.hero-title,
.page-title { font-family: var(--font-hero); font-synthesis: none; }
/* Applied only once Mobalys has actually loaded (main.js adds the class).
   Script faces run smaller and need room for swashes, and tight tracking
   breaks their joins. */
.has-mobalys .hero-title,
.has-mobalys .page-title {
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
}
.has-mobalys .hero-title { font-size: var(--step-4); line-height: 1.12; }
.has-mobalys .page-title { font-size: calc(var(--step-4) * 1.2); }

/* Acronym and affiliation sit together at the top of the hero */
.hero-id { display: grid; gap: 10px; margin-bottom: 14px; }

.acronym {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0.4em;
  font-size: clamp(1.3rem, 1.05rem + 1vw, 1.7rem);
  line-height: 1.35;
  color: var(--ink-soft);
}
.acronym b {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.16em;
  text-underline-offset: 0.2em;
}
.acronym .u-petal b { text-decoration-color: var(--petal); }
.acronym .u-iris b { text-decoration-color: var(--iris); }
.acronym .u-marigold b { text-decoration-color: var(--marigold); }
.acronym .u-cornflower b { text-decoration-color: var(--cornflower); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* The garden */
.garden { display: grid; gap: 6px; justify-items: center; min-width: 0; }
.garden svg {
  width: 100%;
  max-width: 460px;
  height: auto;
  display: block;
  overflow: visible;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.garden figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 10px;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.plant-btn {
  font: inherit;
  font-weight: 500;
  color: var(--stem);
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.plant-btn:disabled { color: var(--ink-soft); text-decoration: none; cursor: default; }

.g-sun { fill: var(--pollen-soft); }
.g-ground { fill: none; stroke: var(--line); stroke-width: 2; stroke-linecap: round; }
.g-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  fill: var(--ink-soft);
  text-anchor: middle;
}

.stem { fill: none; stroke: var(--stem); stroke-width: 3; stroke-linecap: round; }
.leaf { fill: var(--leaf); }
.petal.c-petal { fill: var(--petal); }
.petal.c-iris { fill: var(--iris); }
.petal.c-marigold { fill: var(--marigold); }
.petal.c-cornflower { fill: var(--cornflower); }
.center.c-pollen { fill: var(--pollen); }
.center.c-seed { fill: var(--seed); }

.flower { transform-box: view-box; }
.flower:hover { animation: sway 1.4s ease-in-out; }
.bloom-inner, .leaf { transform-box: fill-box; transform-origin: center; }

.grow .stem {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 0.9s cubic-bezier(0.4, 0, 0.2, 1) var(--d, 0ms) forwards;
}
.grow .leaf {
  transform: scale(0);
  animation: pop 0.5s ease-out calc(var(--d, 0ms) + 420ms) forwards;
}
.grow .bloom-inner {
  transform: scale(0);
  animation: bloom 0.75s cubic-bezier(0.3, 1.45, 0.5, 1) calc(var(--d, 0ms) + 650ms) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }
@keyframes bloom {
  from { transform: scale(0) rotate(-50deg); }
  to { transform: scale(1) rotate(0deg); }
}
@keyframes sway {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-3.5deg); }
  60% { transform: rotate(2.5deg); }
  100% { transform: rotate(0deg); }
}

/* ---------- Home: research areas ---------- */

.areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(32px, 5vw, 64px);
}
.area {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.area p { color: var(--ink-soft); max-width: 52ch; }
.area h3 a { color: var(--ink); text-decoration: none; }
.area h3 a:hover { color: var(--stem); text-decoration: underline; text-decoration-thickness: 2px; }
.area .area-links { font-size: var(--step--1); color: var(--ink-soft); }

.bloom-icon {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  background: var(--area, var(--petal));
  -webkit-mask: var(--bloom) center / contain no-repeat;
  mask: var(--bloom) center / contain no-repeat;
}
.bloom-icon::after {
  content: "";
  position: absolute;
  inset: 37%;
  border-radius: 50%;
  background: var(--pollen);
}
.area--petal { --area: var(--petal); }
.area--iris { --area: var(--iris); }
.area--marigold { --area: var(--marigold); }
.area--cornflower { --area: var(--cornflower); }

/* ---------- Home: selected publications, news, join band ---------- */

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 48px clamp(40px, 6vw, 88px);
  align-items: start;
}
.home-split > * { min-width: 0; }

.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 28px;
}
.block-head a { font-weight: 500; font-size: var(--step--1); }

.featured-pubs { display: grid; gap: 28px; }

.news-compact .news-item { grid-template-columns: minmax(0, 1fr); padding-left: 22px; gap: 2px; }
.news-compact .news-kind { display: none; }
.news-compact .news-body { font-size: 0.98rem; }

.join {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 24px 48px;
  padding-block: clamp(40px, 6vw, 64px);
}
.join h2 { margin-bottom: 10px; }
.join p { color: var(--ink-soft); max-width: 60ch; }

/* ---------- Interior page header ---------- */

.page-head { border-bottom: 1px solid var(--line); }
.page-head-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-block: clamp(36px, 6vw, 64px) clamp(24px, 4vw, 40px);
}
.page-head-inner > div:first-child { display: grid; gap: 14px; min-width: 0; }
.sprig { width: 150px; flex: none; margin-bottom: -1px; }
.sprig svg { width: 100%; height: auto; display: block; overflow: visible; }

/* ---------- Research ---------- */

.jump-links { margin-top: 6px; }

.research-area {
  padding-block: clamp(44px, 6vw, 72px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 8px;
}
.page-head + .research-area { border-top: 0; }

.ra-grid {
  display: grid;
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr);
  gap: 20px clamp(32px, 6vw, 80px);
}
.ra-head { display: grid; gap: 12px; align-content: start; }
.ra-head h2 { font-size: var(--step-2); }
.ra-body { display: grid; gap: 36px; min-width: 0; }

.project {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 20px 28px;
  align-items: start;
  scroll-margin-top: 8px;
}
.project-media {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--radius);
  background: var(--area-soft, var(--petal-soft));
  overflow: hidden;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.project-media .bloom-icon { width: 64px; height: 64px; margin: 0; }
/* A real screenshot or video: keep its own shape and frame it lightly */
.project-media.project-media--image {
  aspect-ratio: auto;
  background: var(--paper);
  border: 1px solid var(--line);
}
.project-media--image img,
.project-media--image video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}
.media--petal { --area-soft: var(--petal-soft); }
.media--iris { --area-soft: var(--iris-soft); }
.media--marigold { --area-soft: var(--marigold-soft); }
.media--cornflower { --area-soft: var(--cornflower-soft); }

.project-body { display: grid; gap: 8px; align-content: start; }
.project-body h3 { font-size: var(--step-2); }
.project-tagline { color: var(--ink-soft); font-size: var(--step--1); margin-top: -4px; }
.project-body .link-row { margin-top: 6px; }

.related h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 12px;
}
.related ul { display: grid; gap: 10px; }
.related li { color: var(--ink-soft); max-width: 70ch; }
.related li a { font-weight: 500; }

/* ---------- Team ---------- */

.avatar {
  display: grid;
  place-items: center;
  width: 128px;
  aspect-ratio: 1;
  max-width: 100%;
  object-fit: cover;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--ink);
  background: var(--petal-soft);
  -webkit-mask: var(--scallop) center / contain no-repeat;
  mask: var(--scallop) center / contain no-repeat;
}
.avatar--iris { background: var(--iris-soft); }
.avatar--marigold { background: var(--marigold-soft); }
.avatar--cornflower { background: var(--cornflower-soft); }

/* A photo sits as a circle in the middle of the flower, so the colored
   petals show around it. The petals take a slightly stronger tint here. */
.avatar--photo { --petal-tint: var(--petal); background: var(--petal-soft); }
.avatar--photo.avatar--iris { --petal-tint: var(--iris); background: var(--iris-soft); }
.avatar--photo.avatar--marigold { --petal-tint: var(--marigold); background: var(--marigold-soft); }
.avatar--photo.avatar--cornflower { --petal-tint: var(--cornflower); background: var(--cornflower-soft); }
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .avatar--photo { background: color-mix(in srgb, var(--petal-tint) 55%, var(--paper)); }
}
.avatar--photo img {
  display: block;
  width: 78%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--paper);
}

/* Everyone, PI included, gets the same centered card */
.team { display: grid; gap: clamp(44px, 6vw, 64px); }

.group-title {
  font-size: var(--step-1);
  font-weight: 600;
  margin-bottom: 24px;
}

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 40px 24px;
}
.person {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  text-align: center;
}
.person .avatar { width: 120px; font-size: 1.9rem; margin-bottom: 10px; }
.person h3 { font-size: 1.125rem; font-weight: 600; }
.role { color: var(--ink-soft); font-size: var(--step--1); }
.person .focus { font-size: var(--step--1); color: var(--ink-soft); max-width: 24ch; }
.person .years {
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* Plain text links under each person */
.person-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 14px;
  margin-top: 6px;
  font-size: var(--step--1);
}
.person-links a { font-weight: 500; text-decoration: none; }
.person-links a:hover,
.person-links a:focus-visible { text-decoration: underline; }

.person--open a {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}
.person--open .avatar {
  background: transparent;
  -webkit-mask: none;
  mask: none;
  border: 2px dashed var(--line);
  border-radius: 50%;
  color: var(--stem);
  font-size: 2.2rem;
  transition: border-color 0.2s ease;
}
.person--open a:hover .avatar { border-color: var(--stem); }
.person--open h3 { color: var(--stem); }

.alumni { display: grid; gap: 8px; color: var(--ink-soft); }

/* ---------- Publications ---------- */

.pub-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-bottom: 14px;
}
.pub-tools input[type="search"] {
  flex: 1 1 280px;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
}
.pub-tools input[type="search"]:focus { border-color: var(--stem); outline: none; box-shadow: 0 0 0 3px var(--cornflower-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit;
  font-size: var(--step--1);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
}
.chip:hover { border-color: var(--stem); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--stem); border-color: var(--stem); color: var(--paper); font-weight: 700; }

.pub-count { color: var(--ink-soft); font-size: var(--step--1); margin-bottom: 36px; }

.year-group {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px 32px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.year-group > h2 {
  font-size: var(--step-2);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  align-self: start;
  position: sticky;
  top: 16px;
}
.pub-list { display: grid; gap: 30px; }

.pub { display: grid; gap: 6px; max-width: 72ch; }
.pub-title { font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.pub-authors { color: var(--ink-soft); }
.pub-authors strong { color: var(--ink); font-weight: 700; }
.pub-venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--ink-soft);
  font-size: var(--step--1);
}
.pub-venue em { font-style: italic; }
.pub .link-row { margin-top: 6px; }

.tag {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper-2);
}
.tag--conference { background: var(--iris-soft); }
.tag--journal { background: var(--petal-soft); }
.tag--workshop { background: var(--marigold-soft); }
.tag--preprint { background: var(--cornflower-soft); }

.award {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--ink);
}
.award::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--pollen);
  -webkit-mask: var(--bloom) center / contain no-repeat;
  mask: var(--bloom) center / contain no-repeat;
}

.empty { color: var(--ink-soft); padding-block: 24px; }

/* ---------- News ---------- */

.news-list { display: grid; gap: 0; }
.news-item {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 4px 24px;
  padding: 0 0 26px 28px;
  border-left: 2px solid var(--line);
  margin-left: 7px;
}
.news-item:last-child { padding-bottom: 4px; }
.news-item::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 4px;
  width: 16px;
  height: 16px;
  background: var(--bud, var(--petal));
  -webkit-mask: var(--bloom) center / contain no-repeat;
  mask: var(--bloom) center / contain no-repeat;
}
.news-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.news-body { display: grid; gap: 2px; max-width: 64ch; }
.news-kind { font-size: 0.8rem; font-weight: 500; color: var(--ink-soft); }

.news-item[data-kind="paper"] { --bud: var(--iris); }
.news-item[data-kind="award"] { --bud: var(--pollen); }
.news-item[data-kind="team"] { --bud: var(--petal); }
.news-item[data-kind="talk"] { --bud: var(--cornflower); }
.news-item[data-kind="service"] { --bud: var(--marigold); }
.news-item[data-kind="workshop"] { --bud: var(--cornflower); }
.news-item[data-kind="lab"] { --bud: var(--stem); }

.news-year {
  font-size: var(--step-2);
  color: var(--ink-soft);
  margin: 8px 0 22px;
}
.news-year:not(:first-child) { margin-top: 40px; }

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 48px clamp(32px, 6vw, 80px);
  align-items: start;
}
.contact-grid > * { min-width: 0; }

.details { display: grid; gap: 22px; }
.details dt { font-weight: 700; margin-bottom: 4px; }
.details dd { color: var(--ink-soft); }
.details dd a { word-break: break-word; }
.details dd.email-text { color: var(--ink); font-size: 1.05rem; }

.paths { display: grid; gap: 34px; }
.path { display: grid; gap: 8px; }
.path h3 { display: flex; align-items: center; gap: 10px; }
.path h3 .bloom-icon { width: 22px; height: 22px; margin: 0; }
.path p { color: var(--ink-soft); max-width: 60ch; }
.path ul { padding-left: 1.2em; color: var(--ink-soft); display: grid; gap: 4px; }

.note {
  margin-top: 6px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--pollen-soft);
  color: var(--ink);
  font-size: var(--step--1);
  max-width: 60ch;
}

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

.notfound {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: 32px clamp(32px, 6vw, 80px);
  padding-block: clamp(48px, 8vw, 104px);
}
.notfound-copy { display: grid; gap: 20px; justify-items: start; min-width: 0; }
.notfound-note { color: var(--ink-soft); font-size: var(--step--1); }

.wilted { display: grid; gap: 8px; justify-items: center; width: 100%; max-width: 280px; justify-self: center; }
.wilted svg { width: 100%; height: auto; display: block; overflow: visible; }
.wilted figcaption { font-size: var(--step--1); }

/* The top of the stem hinges at the joint, drooped until watered */
.wilt-top {
  transform-box: view-box;
  transform-origin: 122px 130px;
  transform: rotate(118deg);
  transition: transform 1.3s cubic-bezier(0.3, 1.35, 0.5, 1);
}
.revived .wilt-top { transform: rotate(0deg); }
.fallen { transition: opacity 0.5s ease; }
.revived .fallen { opacity: 0; }
.regrow { opacity: 0; transition: opacity 0.5s ease 0.8s; }
.revived .regrow { opacity: 1; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(32px, 5vw, 56px);
  color: var(--ink-soft);
  font-size: var(--step--1);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px 48px;
  padding-block: 32px 40px;
}
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand .logo-mark { width: 28px; height: 28px; margin-top: 2px; }
.footer-brand strong { color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--ink-soft); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .garden svg { max-width: 400px; }
  .home-split { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .ra-grid { grid-template-columns: minmax(0, 1fr); }
  .project { grid-template-columns: minmax(0, 1fr); }
  .project-media { width: 100%; max-width: 420px; }
  .join { grid-template-columns: minmax(0, 1fr); justify-items: start; }
}

@media (max-width: 680px) {
  .areas { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .pi { grid-template-columns: minmax(0, 1fr); }
  /* On phones the sprig tucks into the top-right corner beside the short page title */
  .page-head-inner { position: relative; display: block; }
  .page-head .sprig {
    position: absolute;
    top: clamp(36px, 6vw, 64px);
    right: max(var(--gutter), env(safe-area-inset-right, 0px));
    width: 64px;
  }
  .project-media { aspect-ratio: 16 / 9; }
  .notfound { grid-template-columns: minmax(0, 1fr); }
  .wilted { max-width: 220px; justify-self: start; }
  .year-group { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-block: 22px; }
  .year-group > h2 { position: static; }
  .news-item { grid-template-columns: minmax(0, 1fr); padding-left: 22px; }
  .header-inner { padding-block: 14px 6px; }
  .site-nav ul {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 0 24px;
  }
  .site-nav a { padding-block: 6px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .grow .stem { stroke-dashoffset: 0; }
  .grow .leaf, .grow .bloom-inner { transform: none; }
}
