/* ============================================================ tokens
   Palette + type taken from refuel.world: a single dark blue-charcoal
   canvas (#252531) with white text, the ERC orange as the one accent,
   a cool blue as a quiet secondary. Type is Jost (Futura PT stand-in,
   used the way refuel.world uses Futura: wordmark, headings, nav,
   labels) over Figtree (Proxima Nova stand-in) for running text.
   The site commits to one dark theme, like refuel.world itself. */
:root {
  color-scheme: dark;

  --bg:        #252531;   /* refuel.world background */
  --bg-sink:   #1f1f29;   /* alternating sections, footer */
  --surface:   #2c2c3a;   /* raised blocks */
  --ink:       #f5f4f1;   /* body text (near-white) */
  --head:      #ffffff;   /* headings */
  --muted:     #a6a7b6;   /* secondary text */
  --faint:     #838496;   /* faint labels */
  --line:      #3b3b4a;   /* hairlines */
  --line-soft: #32323f;

  --erc:       #ef7d00;   /* ERC orange - the accent */
  --erc-lift:  #ff9526;
  --eu:        #6f8cff;   /* EU blue, lightened for a dark ground */

  --maxw: 1180px;
  --readw: 63ch;

  --f-display: "Jost", "Futura", "Century Gothic", "Trebuchet MS", sans-serif;
  --f-body: "Figtree", "Helvetica Neue", Arial, system-ui, sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.36rem + 0.7vw, 1.95rem);
  --step-3:  clamp(2rem, 1.7rem + 1.5vw, 3rem);
  --step-4:  clamp(2.7rem, 2rem + 3.4vw, 5rem);
}

/* ============================================================ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--f-display); font-weight: 500; line-height: 1.12;
  text-wrap: balance; margin: 0; letter-spacing: 0.005em; color: var(--head);
}

a { color: var(--erc); text-underline-offset: 0.16em; text-decoration-thickness: from-font; }
a:hover { color: var(--erc-lift); }

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

::selection { background: var(--erc); color: #1a1a22; }

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

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.2rem, 5vw, 4rem); }

.eyebrow {
  font-family: var(--f-display); font-weight: 500;
  font-size: var(--step--1); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--erc); margin: 0 0 1.1rem;
}

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink); max-width: 54ch; }
.prose { max-width: var(--readw); }
.prose p { margin: 0 0 1.1rem; }
.prose ol, .prose ul { max-width: 62ch; margin: 0 0 1.1rem; padding-left: 1.3rem; }
.prose li { margin: 0 0 0.5rem; }

/* ============================================================ nav */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(9px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar__in {
  max-width: var(--maxw); margin-inline: auto;
  padding: 0.85rem clamp(1.2rem, 5vw, 4rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: block; flex: none; line-height: 0; }
.brand img { height: 46px; width: auto; display: block; }
@media (max-width: 600px) { .brand img { height: 36px; } }

.nav {
  display: flex; gap: clamp(0.7rem, 2vw, 1.9rem); flex-wrap: wrap;
  font-family: var(--f-display); font-weight: 500; font-size: var(--step--1);
  letter-spacing: 0.11em; text-transform: uppercase;
}
.nav a { color: var(--muted); text-decoration: none; padding: 0.2rem 0; white-space: nowrap; }
.nav a:hover { color: #fff; }

/* ============================================================ hero */
.hero { background: var(--bg); overflow: hidden; }
.hero__in {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(3rem, 8vw, 6.5rem) clamp(1.2rem, 5vw, 4rem) 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.hero h1 { font-size: var(--step-4); color: #fff; margin: 0.2rem 0 0;
  letter-spacing: 0.01em; font-weight: 500; }
.hero__thesis {
  font-family: var(--f-body); font-weight: 400;
  font-size: var(--step-2); line-height: 1.35; color: var(--ink);
  max-width: 24ch; margin: 1.4rem 0 1.8rem;
}
.hero__cta { font-family: var(--f-display); font-weight: 500; font-size: var(--step--1);
  letter-spacing: 0.12em; text-transform: uppercase; color: #fff; text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, #fff 40%, transparent); padding-bottom: 3px; }
.hero__cta:hover { color: var(--erc); border-color: var(--erc); }
.hero__fig { align-self: center; position: relative; }
.hero__fig img {
  display: block;
  width: clamp(320px, 40vw, 540px); height: auto;
  aspect-ratio: 1 / 1; object-fit: cover; object-position: center 47%;
  margin-inline: auto;
  -webkit-mask-image: radial-gradient(circle at 50% 49%, #000 55%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 49%, #000 55%, transparent 74%);
  animation: rise 1.5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: scale(1.08) translateY(16px); } }
@media (prefers-reduced-motion: reduce) { .hero__fig img { animation: none; } }
@media (max-width: 760px) {
  .hero__in { grid-template-columns: 1fr; padding-top: 2.4rem; }
  .hero__fig { order: -1; }
  .hero__fig img { width: min(80vw, 380px); }
}

/* ============================================================ sections */
.section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.section--sink { background: var(--bg-sink); }
.section__head { max-width: 54ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section__head h2 { font-size: var(--step-3); margin-top: 0.2rem; }

/* research: labelled argument */
.beats { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.beat { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.4rem); }
.beat__no { font-family: var(--f-display); font-weight: 500; font-size: var(--step--1);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--erc); padding-top: 0.5rem; }
.beat__no::before { content: ""; display: block; width: 1.9rem; height: 2px;
  background: var(--erc); margin-bottom: 0.7rem; }
.beat h3 { font-size: var(--step-2); margin-bottom: 0.7rem; }
.beat .prose { max-width: 60ch; }
.beat .prose + .checklist { margin-top: 0.2rem; }
.beat .checklist + .prose { margin-top: 1.4rem; }
@media (max-width: 720px) {
  .beat { grid-template-columns: 1fr; gap: 0.6rem; }
  .beat__no { padding-top: 0; }
  .beat__no::before { display: none; }
}

.checklist { list-style: none; margin: 0.4rem 0 0; padding: 0;
  display: grid; gap: 0.55rem; max-width: 58ch; }
.checklist li { position: relative; padding-left: 1.5rem; }
.checklist li::before { content: "\203A"; position: absolute; left: 0; top: -0.05em;
  color: var(--erc); font-family: var(--f-display); font-size: 1.05em; }

/* ============================================================ team */
.team-grid {
  display: grid; gap: clamp(1.8rem, 3.5vw, 2.6rem) clamp(2rem, 4vw, 3.2rem);
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.person { border-top: 2px solid var(--line); padding-top: 1rem; }
.person__photo {
  aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: center 30%;
  background: var(--surface); filter: grayscale(0.18) contrast(1.03);
  border-bottom: 2px solid var(--erc); margin-bottom: 0.85rem;
}
.person__name { font-family: var(--f-display); font-weight: 500; font-size: var(--step-1);
  color: var(--head); margin: 0 0 0.4rem; }
.person__bio { font-size: var(--step--1); line-height: 1.58; color: var(--muted); margin: 0; }
.subhead { font-family: var(--f-display); font-weight: 500; font-size: var(--step--1);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--erc);
  margin: clamp(3rem,7vw,4.5rem) 0 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }

/* ============================================================ publications */
.pub-list { border-top: 1px solid var(--line); max-width: 62rem; }
.pub { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.pub__title { font-family: var(--f-display); font-weight: 500; font-size: var(--step-1);
  line-height: 1.3; margin: 0 0 0.4rem; }
.pub__title a { color: var(--head); text-decoration: none;
  background-image: linear-gradient(var(--erc), var(--erc));
  background-size: 0% 2px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size 0.25s ease; }
.pub__title a:hover { color: var(--erc); background-size: 100% 2px; }
.pub__meta { font-size: var(--step--1); color: var(--ink); margin: 0 0 0.15rem; }
.pub__venue { font-family: var(--f-display); font-size: var(--step--1); color: var(--muted);
  letter-spacing: 0.02em; font-variant-numeric: tabular-nums; margin: 0; }

/* ============================================================ people list (research associates) */
.board-list {
  display: grid; gap: clamp(1.6rem, 3vw, 2.4rem) clamp(2rem, 5vw, 4rem);
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.bmember { border-top: 2px solid var(--line); padding-top: 1rem; }
.bmember__name { font-family: var(--f-display); font-weight: 500; font-size: var(--step-1);
  color: var(--head); margin: 0 0 0.4rem; }
.bmember__bio { font-size: var(--step--1); line-height: 1.58; color: var(--muted); margin: 0; }

/* ============================================================ blog */
.wrap--narrow { max-width: 46rem; }
.blog-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line);
  max-width: 52rem; }
.blog-index li { border-bottom: 1px solid var(--line); }
.blog-index a { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.5rem 1.4rem;
  padding: 0.95rem 0; text-decoration: none; color: var(--ink);
  font-family: var(--f-display); font-weight: 400; font-size: var(--step-0); line-height: 1.32; }
.blog-index a:hover { color: var(--erc); }
.blog-index span { font-family: var(--f-display); font-size: var(--step--1); color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase; padding-top: 0.2rem; }
@media (max-width: 560px) { .blog-index a { grid-template-columns: 1fr; gap: 0.15rem; } }

.post { padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--line); }
.post:first-of-type { border-top: 0; }
.post__date { font-family: var(--f-display); font-weight: 500; font-size: var(--step--1);
  color: var(--erc); letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 0.6rem; }
.post__title { font-size: var(--step-2); margin: 0 0 1.6rem; max-width: 26ch; font-weight: 500; }
.post p { margin: 0 0 1.1rem; }
.post a { color: var(--erc); }
.post a:hover { color: var(--erc-lift); }
.post__h { font-size: var(--step-1); margin: 2rem 0 0.8rem; }
.post__ul { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.post blockquote { margin: 1.4rem 0; padding-left: 1.2rem; border-left: 2px solid var(--erc);
  font-family: var(--f-body); font-style: italic; font-size: var(--step-1); color: var(--ink); }
.post__back { margin-top: 2rem; font-family: var(--f-display); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; font-size: var(--step--1); }
.post__back a { color: var(--muted); text-decoration: none; }
.post__back a:hover { color: var(--erc); }

/* ============================================================ footer */
.foot { background: var(--bg-sink); color: var(--ink); border-top: 1px solid var(--line); }
.foot__in {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.2rem, 5vw, 4rem);
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr);
  gap: clamp(2rem, 6vw, 4rem);
}
.foot h2 { font-size: var(--step-2); color: #fff; }
.foot a { color: #fff; }
.foot a:hover { color: var(--erc); }
.foot .eyebrow { color: var(--erc); }
.foot__contact p { margin: 0.2rem 0; color: var(--ink); }
.foot__email { margin-top: 0.9rem !important; }
.foot__funding p { color: var(--ink); max-width: 42ch; }
.foot__logos { display: flex; align-items: center; gap: 1.8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.foot__logos img { height: 44px; width: auto; }
.foot__logos img.tall { height: 56px; }
.foot__fine { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 1.5rem; margin-top: 0.5rem;
  font-family: var(--f-body); font-size: var(--step--1); color: var(--muted); line-height: 1.6; }
@media (max-width: 720px) { .foot__in { grid-template-columns: 1fr; } }

/* ============================================================ reveal */
.reveal { opacity: 0; transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }
