/* ==========================================================================
   Barber Lab — refresh layer on top of the Hacker theme.
   The theme's style.css loads first; everything here is an override, so the
   original look (near-black, green, monospace) is the base. Plain CSS on
   purpose: no Sass build involved, safe to edit in the GitHub web editor.
   ========================================================================== */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Italic-Latin1.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-SemiBold-Latin1.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --bg: #151515;
  --text: #eaeaea;           /* theme body text */
  --muted: #a3a3a3;          /* secondary text, 7.3:1 on --bg */
  --green: #b5e853;          /* theme heading green */
  --green-dim: rgba(181, 232, 83, 0.6);
  --green-line: rgba(181, 232, 83, 0.28);
  --green-wash: rgba(181, 232, 83, 0.05);
  --amber: #f4bf75;          /* from the theme's own palette; dates + labels */
  --link: #63c0f5;           /* theme link blue */
  --hairline: rgba(255, 255, 255, 0.09);
  --mono: "IBM Plex Mono", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
  --measure: 72ch;           /* comfortable line length */
}

/* ---------- base ---------- */

body {
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
}
h1, h2, h3, h4, h5, h6, header h1 { font-family: var(--mono); }
.container { max-width: 960px; }
img, video { height: auto; }
#main_content { overflow-wrap: break-word; }
#main_content p { max-width: var(--measure); }
em { font-style: italic; }  /* Plex has a real italic: species names now look right */

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: rgba(99, 192, 245, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-shadow: 0 0 4px rgba(99, 192, 245, 0.25);   /* softer than the theme's glow */
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px dashed var(--green); outline-offset: 3px; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 12px; z-index: 10; padding: 6px 10px; background: var(--green); color: var(--bg); text-shadow: none; }

/* ---------- header: same ./ prompt, now with a cursor and a real menu ---------- */

header {
  padding: 30px 0 0;
  margin: 0 0 48px;
  background: rgba(0, 0, 0, 0.18);
}
header h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
header h1::after {                       /* blinking block cursor */
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.9em;
  margin-left: 0.25em;
  vertical-align: -0.08em;
  background: var(--green);
  box-shadow: 0 0 8px rgba(181, 232, 83, 0.55);
  animation: cursor-blink 1.1s step-end infinite;
}
@keyframes cursor-blink { 50% { opacity: 0; } }
header h2 {
  margin: 2px 0 22px;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);                   /* was #666: 3.2:1, failed WCAG AA */
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin-bottom: -1px;                   /* tabs sit on the dashed rule */
  font-size: 15px;
}
.site-nav a {
  padding: 7px 14px 8px;
  color: var(--text);
  text-decoration: none;
  text-shadow: none;
  border: 1px dashed transparent;
  border-bottom: 0;
}
.site-nav a::before { content: "~/"; color: var(--green-dim); }
.site-nav a:hover { color: var(--green); }
.site-nav a[aria-current="page"] {
  color: var(--green);
  background: var(--bg) url("../images/bkg.png") 0 0;
  border-color: var(--green);
  text-shadow: 0 0 6px rgba(181, 232, 83, 0.35);
}

/* ---------- headings: markdown-style prefixes ---------- */

#main_content h1 { font-size: 28px; margin: 0 0 26px; }
#main_content h2 { font-size: 21px; margin: 56px 0 20px; }
#main_content h3 { font-size: 17px; margin: 32px 0 14px; }
#main_content h1 + h2 { margin-top: 8px; }
#main_content h1::before { content: "# ";   color: var(--green-dim); }
#main_content h2::before { content: "## ";  color: var(--green-dim); }
#main_content h3::before { content: "### "; color: var(--green-dim); }

/* ---------- figures ---------- */

figure { margin: 36px 0; }
figure img, figure video, .log img {
  display: block;
  max-width: 100%;
  border: 1px solid var(--hairline);
}
figcaption {
  max-width: 64ch;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
figure.hero { margin: 0 0 32px; }
figure.hero img { width: 100%; }
figure.narrow img { width: 560px; }
figure.small img { width: 420px; }
.figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  align-items: start;
  margin: 36px 0;
}
.figs figure { margin: 0; }
.figs img, .figs video { width: 100%; }

/* ---------- home ---------- */

p.lede {
  font-size: 18px;
  line-height: 1.6;
  color: #f4f4f4;
  max-width: 62ch;
}

blockquote.callout {                     /* recruiting box, styled as a terminal pane */
  max-width: var(--measure);
  margin: 32px 0 8px;
  padding: 0;
  color: var(--text);
  background: var(--green-wash);
  border: 1px solid var(--green-line);
}
blockquote.callout::before {
  content: "$ cat join_us.txt";
  display: block;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--green);
  border-bottom: 1px dashed var(--green-line);
}
blockquote.callout p { margin: 0; padding: 14px 16px 16px; }
blockquote.callout strong { color: var(--green); font-weight: 600; }

ul.log { margin: 0 0 24px; padding: 0; }
ul.log > li {
  position: relative;
  max-width: calc(var(--measure) + 8.5em);
  padding: 0 0 20px 8.5em;
  list-style: none;
}
ul.log > li > strong:first-child {       /* the date */
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 400;
  color: var(--amber);
}
ul.log img { width: 560px; margin: 14px 0 4px; }

/* ---------- people ---------- */

ul.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 36px 28px;
  margin: 0 0 16px;
  padding: 0;
}
ul.people > li {
  list-style: none;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);                   /* role */
}
ul.people img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: 12px;
  border: 1px solid var(--green-line);
  transition: border-color 0.15s, box-shadow 0.15s;
}
ul.people li:hover img {
  border-color: var(--green);
  box-shadow: 0 0 18px rgba(181, 232, 83, 0.22);
}
ul.people strong {                       /* name */
  display: block;
  margin-bottom: 2px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
ul.people strong a { color: var(--text); text-shadow: none; text-decoration-color: var(--green-dim); }
ul.people strong a:hover { color: var(--green); }

/* ---------- contact block (home) ---------- */

ul.contact { margin: 0 0 24px; padding: 0; }
ul.contact > li { position: relative; padding: 0 0 6px 7em; list-style: none; }
ul.contact > li > strong:first-child {    /* label column */
  position: absolute;
  left: 0;
  font-weight: 400;
  color: var(--amber);
}

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

ol.pubs { margin: 0 0 32px; padding: 0; counter-reset: pub; }
ol.pubs > li {
  position: relative;
  max-width: calc(var(--measure) + 3.5em);
  padding: 0 0 24px 3.5em;
  list-style: none;
  counter-increment: pub;
}
ol.pubs > li::before {
  content: "[" counter(pub, decimal-leading-zero) "]";
  position: absolute;
  left: 0;
  color: var(--green-dim);
}
ol.pubs strong { color: #fff; font-weight: 600; }
ol.pubs a {                              /* [doi] / [bioRxiv] / [research briefing] chips */
  margin-right: 4px;
  padding: 1px 6px;
  font-size: 13px;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: none;
  border: 1px solid rgba(99, 192, 245, 0.4);
}
ol.pubs a:hover { color: var(--bg); background: var(--link); }

/* ---------- press ---------- */

ul.press { margin: 0 0 32px; padding: 0; max-width: var(--measure); }
ul.press > li {
  list-style: none;
  padding: 14px 0;
  border-bottom: 1px dashed var(--hairline);
}
ul.press > li > strong:first-child {     /* outlet */
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 80px;
  padding: 26px 0 40px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px dashed var(--green);
}
.site-footer p { margin: 0 0 10px; }
.site-footer strong { color: var(--green); font-weight: 600; }
.footer-links a { margin-right: 14px; text-decoration: none; text-shadow: none; }
.footer-links a::before { content: "["; color: var(--muted); }
.footer-links a::after  { content: "]"; color: var(--muted); }
.footer-links a:hover { color: var(--green); }
.build-stamp { color: #8a8a8a; }

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  body { font-size: 15px; }
  header { padding-top: 22px; margin-bottom: 32px; }
  header h1 { font-size: 25px; }
  header h2 { font-size: 13px; margin-bottom: 16px; }
  .site-nav { flex-wrap: nowrap; overflow-x: auto; gap: 0; font-size: 13px; scrollbar-width: none; }
  .site-nav a { flex: none; padding: 6px 7px 7px; }
  .site-nav a::before { content: ""; }
  #main_content h1 { font-size: 23px; }
  #main_content h2 { font-size: 19px; margin-top: 44px; }
  p.lede { font-size: 16px; }
  ul.log > li { padding-left: 0; }
  ul.log > li > strong:first-child { position: static; display: block; }
  ul.people { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  ol.pubs > li { padding-left: 2.8em; }
  ul.contact > li { padding-left: 5.5em; }
}

@media (prefers-reduced-motion: reduce) {
  header h1::after { animation: none; }
  ul.people img { transition: none; }
}
