/* ==========================================================================
   RODEM — stylesheet
   Colours and sizes are set once, here, as variables. Change a value in
   :root below and it updates everywhere on the site.
   ========================================================================== */

:root {
  --bg:        #fdfdfc;
  --bg-soft:   #f5f4f1;
  --text:      #1c1c1a;
  --muted:     #62615c;
  --rule:      #e3e1db;
  --accent:    #8c1d33;
  --accent-sm: #a63b50;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;

  --measure: 68ch;
  --wide: 1080px;
  --pad: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #16161a;
    --bg-soft:   #1e1e23;
    --text:      #ececea;
    --muted:     #a3a29c;
    --rule:      #32323a;
    --accent:    #e8879b;
    --accent-sm: #f0a8b8;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-sm); }

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

.wrap { max-width: var(--wide); margin: 0 auto; padding-inline: var(--pad); }

/* Visible only to screen readers, until focused (skip link). */
.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* --------------------------------------------------------------- header --- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); /* fallback for browsers without color-mix() */
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4rem; flex-wrap: wrap;
}
.brand {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
  color: var(--text); text-decoration: none; letter-spacing: .02em;
}
.brand span { color: var(--accent); }

.site-nav { display: flex; gap: clamp(.9rem, 3vw, 1.9rem); flex-wrap: wrap; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: .95rem;
  padding-block: .3rem; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* ----------------------------------------------------------------- hero --- */

.hero { padding-block: clamp(3.5rem, 10vw, 7rem) clamp(2.5rem, 7vw, 4.5rem); }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); margin: 0 0 .4em; max-width: 20ch; }
.hero .lede {
  font-size: clamp(1.1rem, 2.2vw, 1.32rem); color: var(--muted);
  max-width: var(--measure); margin: 0 0 1.4em;
}
.hero .lede strong { color: var(--text); font-weight: 600; }
.hero .affil { font-size: .95rem; color: var(--muted); margin: 0; }

/* -------------------------------------------------------------- section --- */

.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); border-top: 1px solid var(--rule); }
.section-head { margin-bottom: 2.25rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin: 0 0 .35em; }
.section-head p { color: var(--muted); max-width: var(--measure); margin: 0; }

.eyebrow {
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 .7rem;
}

/* ------------------------------------------------------------- research --- */

.grid-research {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}
.card {
  background: var(--bg-soft); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1.6rem 1.5rem;
}
.card h3 { font-size: 1.2rem; margin: 0 0 .5em; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ----------------------------------------------------------------- team --- */

.team-group + .team-group { margin-top: 2.75rem; }
.team-group > h3 {
  font-family: var(--sans); font-size: .8rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 1.4rem; padding-bottom: .6rem; border-bottom: 1px solid var(--rule);
}
.grid-team {
  display: grid; gap: 2rem 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
}
.member { text-align: center; }
.member .avatar {
  width: 118px; height: 118px; border-radius: 50%; margin: 0 auto .9rem;
  object-fit: cover; background: var(--bg-soft); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 2.1rem; color: var(--accent);
  user-select: none;
}
img.avatar { display: block; } /* photos are replaced elements, not flex boxes */
.member .name { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; margin: 0 0 .15em; }
.member .role { font-size: .84rem; color: var(--accent); margin: 0 0 .4em; }
.member .blurb { font-size: .85rem; color: var(--muted); margin: 0 0 .5em; line-height: 1.5; }
.member .links { display: flex; gap: .7rem; justify-content: center; font-size: .8rem; }

/* ----------------------------------------------------------------- news --- */

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding-block: 1.4rem; border-top: 1px solid var(--rule); }
.news-list li:first-child { border-top: none; padding-top: 0; }
.news-list .date {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .3em;
}
.news-list h3 { font-size: 1.15rem; margin: 0 0 .3em; }
.news-list p { margin: 0; color: var(--muted); max-width: var(--measure); }

/* --------------------------------------------------------- publications --- */

/* filter chips */
.pub-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.chip {
  font: inherit; font-size: .85rem; cursor: pointer;
  background: transparent; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 999px; padding: .35rem .95rem;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.is-active { color: #16161a; } }

/* category sections */
.pub-cat + .pub-cat { margin-top: 3rem; }
.pub-cat-title {
  font-size: 1.35rem; margin: 0 0 1rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--rule);
}

.star { color: var(--accent); }

/* citation metrics — a KPI row, not a chart */
.metrics {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 2rem;
}
.kpi-group {
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-radius: 10px; padding: 1.3rem 1.4rem;
}
.kpi-group-title { font-family: var(--sans); font-size: .95rem; margin: 0 0 .2em; }
.kpi-group-title a { text-decoration: none; }
.kpi-group-title a:hover { text-decoration: underline; }
.kpi-note { margin: 0 0 1.1rem; font-size: .84rem; color: var(--muted); }
.kpi-row { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.kpi-value {
  font-family: var(--sans); font-size: 1.85rem; font-weight: 600;
  line-height: 1.1; color: var(--text);
}
.kpi-label {
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-top: .25rem;
}
.metrics-source {
  grid-column: 1 / -1; margin: 0; font-size: .8rem; color: var(--muted);
}

.pub-stats {
  margin: 0 0 1.75rem; padding: .9rem 1.1rem;
  background: var(--bg-soft); border: 1px solid var(--rule); border-radius: 8px;
  font-size: .9rem; color: var(--muted);
}
.pub-stats strong { color: var(--text); }

.cites {
  font-size: .76rem; color: var(--muted);
  padding: .16rem .2rem; align-self: center;
}

/* talks */
.talk-meta {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin: 0 0 .35em; font-size: .8rem; color: var(--muted);
}
.kind {
  font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--rule); border-radius: 999px;
  padding: .12rem .6rem;
}
.talk-list li[hidden], .pub-cat[hidden] { display: none; }

/* cv */
.cv-section + .cv-section { margin-top: 3rem; }
.cv-row {
  display: grid; gap: .2rem 1.5rem;
  grid-template-columns: 9.5rem 1fr;
  padding-block: .75rem;
}
.cv-row + .cv-row { border-top: 1px solid var(--rule); }
.cv-period { color: var(--accent); font-size: .88rem; padding-top: .1rem; }
.cv-title { display: block; font-weight: 600; }
.cv-where { display: block; color: var(--muted); font-size: .92rem; }

@media (max-width: 34rem) {
  .cv-row { grid-template-columns: 1fr; }   /* stack the year above the entry */
}

.tag-btn { font-family: inherit; cursor: pointer; background: transparent; }
.tag-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .tag-btn.is-active { color: #16161a; } }

.bibtex {
  margin: .8rem 0 0; padding: .9rem 1rem; overflow-x: auto;
  background: var(--bg-soft); border: 1px solid var(--rule); border-radius: 8px;
  font-size: .8rem; line-height: 1.5; white-space: pre;
}
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li { padding-block: 1rem; }
.pub-list li + li { border-top: 1px solid var(--rule); }
.pub-list .title { font-weight: 600; margin: 0 0 .25em; }
.pub-list .authors { font-size: .92rem; color: var(--muted); margin: 0 0 .25em; }
.pub-list .journal { font-size: .88rem; color: var(--muted); font-style: italic; margin: 0 0 .4em; }
.pub-list .tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.tag {
  font-size: .76rem; text-decoration: none; border: 1px solid var(--rule);
  border-radius: 999px; padding: .16rem .7rem; color: var(--accent);
}
.tag:hover { border-color: var(--accent); }

/* ----------------------------------------------------------------- misc --- */

.contact-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.contact-grid h3 { font-family: var(--sans); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.contact-grid p { margin: 0; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--rule); margin-top: 2rem;
  padding-block: 2.5rem; font-size: .88rem; color: var(--muted);
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
/* The plain-HTML list of every page. flex-basis:100% gives it the whole first
   row of the footer, leaving the copyright and outside links side by side
   underneath as before. */
.footer-sitemap {
  flex-basis: 100%; display: flex; gap: 1.25rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.empty { color: var(--muted); font-style: italic; }


/* ==========================================================================
   ADDITIONS — brand block, responsive nav, doors, FORGE letters, spotlights,
   positions, events, funding, outreach. Everything below reuses the variables
   in :root, so it follows the palette (including dark mode) automatically.
   ========================================================================== */

/* ------------------------------------------------------------- brand ----- */
.brand { display: flex; align-items: center; gap: .55rem; }
.brand .brand-mark { width: 1.9rem; height: 1.9rem; flex: none; }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand .brand-sub {
  font-family: var(--sans); font-size: .66rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
}

/* -------------------------------------------------- nav on small screens -- */
#nav-toggle {
  display: none; background: none; border: 1px solid var(--rule); border-radius: 6px;
  color: var(--text); font: inherit; font-size: .85rem; padding: .3rem .65rem; cursor: pointer;
}
@media (max-width: 860px) {
  #nav-toggle { display: block; }
  .site-header .site-nav {
    display: none; width: 100%; flex-direction: column; gap: 0;
    padding-block: .5rem; border-top: 1px solid var(--rule); margin-top: .6rem;
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-header .site-nav a { padding-block: .5rem; border-bottom: none; }
  .site-header .wrap { flex-wrap: wrap; }
}

/* -------------------------------------------------------------- doors ---- */
.doors {
  display: grid; gap: 1rem; padding-bottom: clamp(2rem, 6vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.door {
  display: block; text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.door:hover { border-color: var(--accent); transform: translateY(-2px); }
.door .eyebrow { margin-bottom: .35rem; }
.door h3 { font-size: 1.15rem; margin: 0 0 .4em; color: var(--text); }
@media (prefers-reduced-motion: reduce) { .door:hover { transform: none; } }

/* ------------------------------------------------------------- figures --- */
figure.band { margin: 0; }
figure.band img { width: 100%; height: auto; border-radius: 10px; }
figure.band figcaption {
  font-size: .8rem; color: var(--muted); margin-top: .6rem; max-width: var(--measure);
}
.figure-split {
  display: grid; gap: 1.6rem; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
}
@media (max-width: 760px) { .figure-split { grid-template-columns: 1fr; } }

/* ------------------------------------------------- FORGE research letters - */
.forge-strip {
  display: flex; flex-wrap: wrap; gap: .45rem 1.6rem; align-items: baseline;
  margin: 0 0 1.2rem; padding: 0; list-style: none;
}
.forge-strip a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.forge-strip a:hover { color: var(--accent); }
.forge-strip .g { font-family: var(--serif); font-size: 1.35rem; color: var(--accent); }
.forge-strip li { white-space: nowrap; }

.letter { position: relative; padding-block: 2.4rem; border-top: 1px solid var(--rule); }
.letter:first-child { border-top: none; }
.letter-head { display: flex; align-items: baseline; gap: .9rem; margin-bottom: .7rem; }
.letter-glyph {
  font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1;
  color: var(--accent); font-weight: 600;
}
.letter-head h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin: 0; }
.letter-body { max-width: var(--measure); }
.letter-body > p { margin: 0 0 1rem; }
.letter-examples { margin: 0 0 .9rem; padding-left: 1.1rem; color: var(--muted); font-size: .93rem; }
.letter-examples li { margin-bottom: .25rem; }
.letter-more { margin: 0; font-size: .93rem; }
.letter-mark {
  position: absolute; top: 2.2rem; right: 0; width: 112px; opacity: .6; pointer-events: none;
}
@media (max-width: 900px) { .letter-mark { display: none; } }

/* The hardware frontier, on research.html. Set apart from the five FORGE
   letters on purpose: it is a different kind of thing, not a sixth letter.
   Must come after .letter:first-child above, which would otherwise strip the
   top border and let this block blend into Exploration. */
.letter.is-detector {
  background: var(--bg-soft); border: 1px solid var(--rule);
  border-top: 2px solid var(--accent); border-radius: 10px;
  padding: 1.7rem 1.7rem 1.9rem; margin-top: 2rem;
}
.letter.is-detector .eyebrow { margin: 0 0 .4rem; }
.letter.is-detector .letter-head { margin-bottom: .6rem; }
.letter.is-detector .letter-more { color: var(--muted); }

/* --------------------------------------------------------- news spotlight - */
.news-list li.spotlight {
  position: relative; background: var(--bg-soft); border-radius: 10px;
  padding: 1.6rem 1.7rem; border-top: none; margin-block: 1.4rem;
}
.news-list li.spotlight .date { color: var(--accent); }
.news-list li.spotlight p { color: var(--text); }
.news-mark { position: absolute; top: 1.4rem; right: 1.4rem; width: 62px; opacity: .55; }
@media (max-width: 620px) { .news-mark { display: none; } }

/* ------------------------------------------------------------ positions -- */
.position { padding-block: 1.6rem; border-top: 1px solid var(--rule); max-width: var(--measure); }
.position:first-child { border-top: none; padding-top: .4rem; }
.position h3 { font-size: 1.18rem; margin: 0 0 .5em; }
.position > p { margin: 0 0 1rem; color: var(--muted); }
.position-meta { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.1rem; margin: 0; font-size: .9rem; }
.position-meta dt { color: var(--accent); }
.position-meta dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .position-meta { grid-template-columns: 1fr; } .position-meta dd { margin-bottom: .5rem; } }
.empty { color: var(--muted); font-style: italic; }

/* --------------------------------------------------------------- events -- */
.event { padding-block: 1.5rem; border-top: 1px solid var(--rule); max-width: var(--measure); }
.event:first-child { border-top: none; padding-top: 0; }
.event-year {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .3em;
}
.event.is-upcoming .event-year { color: var(--accent); }
.event h3 { font-size: 1.12rem; margin: 0 0 .25em; }
.event-where { margin: 0 0 .5em; font-size: .92rem; color: var(--muted); }
.event > p { margin: 0 0 .5em; color: var(--muted); }
.event-speakers { font-size: .88rem; color: var(--muted); margin: 0; }
.event-speakers span { color: var(--accent); }

/* -------------------------------------------------------------- funding -- */
.funding-list { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.funding-list li {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem;
  padding-block: .85rem; border-top: 1px solid var(--rule); font-size: .95rem;
}
.funding-list li:first-child { border-top: none; }
.funding-years { color: var(--muted); font-variant-numeric: tabular-nums; }
.funding-who { display: block; color: var(--muted); font-size: .88rem; }
@media (max-width: 560px) { .funding-list li { grid-template-columns: 1fr; gap: .15rem; } }

/* ------------------------------------------------------------- outreach -- */
.prose { max-width: var(--measure); }
.prose h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin: 2.4rem 0 .6em; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1rem; }
.prose .pull {
  font-family: var(--serif); font-size: clamp(1.2rem, 2.6vw, 1.5rem); line-height: 1.35;
  color: var(--accent); margin: 1.8rem 0; padding-left: 1.1rem; border-left: 3px solid var(--accent);
}
.backronyms { background: var(--bg-soft); border-radius: 10px; padding: 1.4rem 1.6rem; margin: 1.8rem 0; }
.backronyms p { margin: 0 0 .5rem; }
.backronyms ul { margin: 0 0 .5rem; padding-left: 1.1rem; color: var(--muted); }

/* -------------------------------------------------------------- vision --- */
.vision-block { max-width: var(--measure); }
.vision-block h2 { font-size: clamp(1.25rem, 2.8vw, 1.6rem); margin: 2.2rem 0 .5em; }
.vision-block h2:first-child { margin-top: 0; }
.record { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 1rem; }
.record div { border-top: 2px solid var(--accent); padding-top: .7rem; }
.record strong { display: block; font-family: var(--serif); font-size: 1.02rem; margin-bottom: .2em; }
.record span { color: var(--muted); font-size: .88rem; }

/* ------------------------------------------------------ output sub-nav ---- */
.subnav { display: flex; gap: 1.2rem; font-size: .93rem; margin-bottom: 1.8rem; }
.reviewed { color: var(--muted); font-size: .85rem; margin-top: 2.5rem; }

/* The landing headline is a sentence, not a noun phrase — give it room. */
.hero h1 { max-width: 24ch; }
