/* IPERFrag – shared styles for all pages */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f7f7f5;
  --ink: #1b1f24;
  --muted: #5b6470;
  --line: #e3e4e1;
  --accent: #b4321f;      /* fracture red */
  --accent-soft: #f6e4df;
  --hero-bg: #ffffff;
  --hero-ink: #1b1f24;
  --hero-muted: #5b6470;
  --radius: 10px;
  --maxw: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
img { max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 700; letter-spacing: .02em; color: var(--ink); text-decoration: none; font-size: 18px; display: inline-flex; align-items: center; }
.brand img { display: block; margin-right: 9px; }
.brand span { color: var(--accent); }
nav { margin-left: auto; display: flex; gap: 22px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
nav a:hover { color: var(--ink); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  color: var(--ink); border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 14px; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column;
    gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
  nav.open { display: flex; }
  nav a { padding: 12px 16px; border-top: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--hero-bg); color: var(--hero-ink); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .wrap { position: relative; padding-top: 88px; padding-bottom: 80px; }
.eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--hero-muted); }
.hero h1 { font-family: "Source Serif 4", Georgia, serif; font-weight: 600;
  font-size: clamp(44px, 8vw, 84px); line-height: 1; margin: 14px 0 18px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { max-width: 640px; font-size: clamp(17px, 2.2vw, 20px); color: #3a4149; margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  font-size: 13px; color: var(--ink); background: rgba(255,255,255,.85); }

/* ---------- Sections ---------- */
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
h2 { font-family: "Source Serif 4", Georgia, serif; font-weight: 600; font-size: 32px;
  margin: 0 0 8px; letter-spacing: -.005em; }
.kicker { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.intro { color: var(--muted); max-width: 720px; margin: 0 0 36px; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.about-grid p { margin: 0 0 16px; }
.keyfacts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; align-self: start; }
.keyfacts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.keyfacts dt { color: var(--muted); }
.keyfacts dd { margin: 0; font-weight: 500; }
.outcomes { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.outcomes li { padding-left: 28px; position: relative; }
.outcomes li::before { content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 2px; background: var(--accent); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; }
.task-num { font-family: "Source Serif 4", Georgia, serif; font-size: 40px; line-height: 1; color: var(--accent); }
.card h3 { font-size: 18px; margin: 12px 0 10px; line-height: 1.3; }
.card p { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.leader { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.leader span { color: var(--muted); }

.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .people { grid-template-columns: 1fr; } }
.person { display: flex; gap: 16px; align-items: flex-start; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.person h3 { margin: 0; font-size: 17px; }
.role { font-size: 13px; color: var(--accent); font-weight: 600; margin: 2px 0 6px; }
.person p { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.person a { font-size: 14px; }
.person p.thesis { color: var(--ink); font-size: 13.5px; line-height: 1.45; }

h3.group { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin: 36px 0 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
#team .kicker + h2 + h3.group { margin-top: 24px; }
.labs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .labs { grid-template-columns: 1fr; } }
.lab { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); font-size: 14px; color: var(--ink);
  display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.lab:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.lab-main { padding: 20px 20px 16px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.lab-inst { display: flex; flex-direction: column; gap: 6px; padding: 12px 20px 16px; border-top: 1px solid var(--line);
  background: var(--surface); text-decoration: none; color: var(--ink); }
.lab-inst small { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lab-inst .inst { display: flex; align-items: center; gap: 12px; }
.lab-inst img { height: 40px; width: auto; max-width: 130px; display: block; }
.lab-inst .inst span { font-weight: 600; font-size: 14px; color: var(--ink); }
.lab-inst:hover .inst span { color: var(--accent); }
.lab-logo { height: 84px; display: flex; align-items: center; margin-bottom: 10px; }
.lab-logo img { max-height: 84px; max-width: 170px; width: auto; height: auto; }
.lab-logo img.rounded { border-radius: 6px; }
.lab-main b { font-size: 16px; }
.lab-main span { color: var(--muted); }
.lab-main em { font-style: normal; color: var(--accent); margin-top: 8px; font-weight: 500; }

.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pub { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  display: grid; grid-template-columns: 70px 1fr; gap: 16px; }
.pub .year { font-family: "Source Serif 4", Georgia, serif; font-size: 22px; color: var(--accent); }
.pub .tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; margin-bottom: 6px; }
.pub .title { font-weight: 600; margin: 0 0 4px; }
.pub .authors { font-size: 14px; color: var(--muted); margin: 0 0 4px; }
.pub .venue { font-size: 14px; font-style: italic; margin: 0 0 8px; }
.pub .links { display: flex; gap: 14px; font-size: 14px; }
@media (max-width: 560px) { .pub { grid-template-columns: 1fr; gap: 4px; } }
.more { margin-top: 22px; font-size: 15px; }

.tool { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
@media (max-width: 560px) { .tool { grid-template-columns: 1fr; } }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; }

/* ---------- Events ---------- */
.event { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: grid; grid-template-columns: 96px 1fr; gap: 24px; }
.event-date { background: var(--accent); color: #fff; border-radius: 8px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; align-self: start; line-height: 1.1; }
.event-date .d { font-family: "Source Serif 4", Georgia, serif; font-size: 24px; font-weight: 600; }
.event-date .m { text-transform: uppercase; font-size: 13px; letter-spacing: .1em; margin-top: 4px; }
.event-date .y { font-size: 13px; opacity: .85; }
.event .tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.event h3 { font-size: 20px; margin: 8px 0 4px; }
.event p { margin: 0 0 12px; font-size: 15px; }
.event-where { color: var(--muted); }
.event-meta { font-size: 14px !important; color: var(--muted); }
.event-meta b { color: var(--ink); }
.event-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
@media (max-width: 560px) {
  .event { grid-template-columns: 1fr; gap: 14px; }
  .event-date { flex-direction: row; gap: 8px; justify-self: start; padding: 8px 14px; align-items: baseline; }
  .event-date .m { margin-top: 0; }
}

/* ---------- Main + news column ---------- */
.layout { max-width: 1280px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
.layout main .wrap { max-width: none; padding: 0; }
.layout main section:last-child { border-bottom: 0; }
.feed { border-left: 1px solid var(--line); padding-left: 28px; }
.feed-inner { position: sticky; top: 76px; padding: 72px 0 40px;
  max-height: calc(100vh - 76px); overflow-y: auto; scrollbar-width: thin; }
.feed-title { font-size: 24px; margin-bottom: 20px; }
.posts { list-style: none; margin: 0; padding: 0; position: relative; }
.posts::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.post { position: relative; padding: 0 0 22px 22px; }
.post::before { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); }
.post time { font-size: 12px; color: var(--muted); font-weight: 500; }
.post .ptag { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.post h3 { font-size: 15px; line-height: 1.35; margin: 4px 0 4px; }
.post p { font-size: 13.5px; line-height: 1.5; color: var(--muted); margin: 0 0 4px; }
.post a { font-size: 13px; font-weight: 500; }
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .feed { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .feed-inner { position: static; max-height: none; overflow: visible; padding: 56px 0; }
}

footer { padding: 48px 0 56px; background: var(--surface); border-top: 1px solid var(--line); }
.funding { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.anr-logo { background: #fff; border-radius: 8px; padding: 12px 16px; border: 1px solid var(--line); line-height: 0; }
.anr-logo img { height: 52px; width: auto; }
.funding p { margin: 0; max-width: 620px; font-size: 14px; color: var(--muted); }
.legal { margin-top: 28px; font-size: 13px; color: var(--muted); }

/* ---------- Links from the home page to the task pages ---------- */
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.task-link { font-size: 14px; font-weight: 600; text-decoration: none; margin: -6px 0 16px; }
.task-link:hover { text-decoration: underline; }
.pub .links .task-badge { margin-left: auto; font-weight: 600; text-decoration: none; }

/* ---------- Task pages ---------- */
.hero.compact .wrap { padding-top: 56px; padding-bottom: 52px; }
.hero.compact h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; max-width: 760px; margin: 10px 0 14px; }
.hero.compact .num { font-family: "Source Serif 4", Georgia, serif; color: var(--accent); font-size: 22px; font-weight: 600; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.task-tabs { border-bottom: 1px solid var(--line); background: #fff; }
.task-tabs .wrap { display: flex; gap: 6px; overflow-x: auto; }
.task-tabs a { padding: 14px 16px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent; white-space: nowrap; }
.task-tabs a:hover { color: var(--ink); }
.task-tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.task-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
@media (max-width: 860px) { .task-grid { grid-template-columns: 1fr; } }
.task-grid p { margin: 0 0 16px; }
.members { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; align-self: start; }
.members h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.members ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.members li span { display: block; color: var(--muted); font-size: 13px; }

.details { display: grid; gap: 28px; }
.detail { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.detail-head { background: var(--surface); padding: 20px 24px; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 70px 1fr; gap: 16px; }
.detail-head .year { font-family: "Source Serif 4", Georgia, serif; font-size: 22px; color: var(--accent); }
.detail-head .tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; margin-bottom: 6px; background: #fff; }
.detail-head h3 { margin: 0 0 4px; font-size: 18px; line-height: 1.35; }
.detail-head .authors { font-size: 14px; color: var(--muted); margin: 0 0 2px; }
.detail-head .venue { font-size: 14px; font-style: italic; margin: 0 0 8px; }
.detail-head .links { display: flex; gap: 14px; font-size: 14px; }
.detail-body { padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.detail-body.with-figure { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
@media (max-width: 760px) { .detail-body.with-figure { grid-template-columns: 1fr; } .detail-head { grid-template-columns: 1fr; gap: 4px; } }
.detail-body h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.detail-body p { margin: 0 0 12px; }
.detail-body ul { margin: 0; padding-left: 20px; }
.detail-body figure { margin: 0; }
.detail-body figure img { border-radius: 8px; border: 1px solid var(--line); display: block; }
.detail-body figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.placeholder { border: 1.5px dashed var(--line); border-radius: 8px; padding: 18px; color: var(--muted); font-size: 14px; background: var(--surface); }
.empty { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }
/* Grouped box: list of the contributions it covers */
.contribs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.contribs li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; font-size: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.contribs .c-year { font-weight: 600; color: var(--accent); }
.contribs .c-type { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.contribs .c-venue { font-style: italic; }
.contribs .c-title { display: block; color: var(--muted); margin-top: 2px; }
.contribs .links { display: flex; gap: 14px; margin-top: 3px; }
.status-note { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 6px; padding: 10px 14px; font-size: 15px; }
.horizon { margin: 14px 0 4px !important; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.abstract { margin: 8px 0 36px; }
.abstract img { width: 100%; height: auto; display: block; }
.abstract figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
/* Wide result figures, full width under the summary */
.detail-figures { padding: 0 24px 24px; display: grid; gap: 22px; }
.detail-figures figure { margin: 0; }
.detail-figures img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.detail-figures figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.math { font-family: "Source Serif 4", Georgia, "Times New Roman", serif; font-size: 1.08em; }
/* Join us page: one card per open position */
.job { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; margin-bottom: 28px; }
.job-head { background: var(--surface); padding: 22px 24px; border-bottom: 1px solid var(--line); }
.job-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.job .tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; background: #fff; }
.job .tag.open { color: #1f7a3d; border-color: #b9dfc5; background: #eef8f1; }
.job h3 { font-size: 20px; line-height: 1.35; margin: 10px 0 14px; }
.job-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0; font-size: 14px; }
.job-facts dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.job-facts dd { margin: 2px 0 0; }
@media (max-width: 760px) { .job-facts { grid-template-columns: 1fr; } }
.job-body { padding: 22px 24px; }
.job-body h4 { margin: 18px 0 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.job-body h4:first-child { margin-top: 0; }
.job-body p { margin: 0 0 10px; }
.job-body ul { margin: 0 0 10px; padding-left: 20px; }
.job-phd { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 6px; padding: 10px 14px; margin-top: 14px !important; }
.job .actions { margin-top: 18px; }
#join .tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #1f7a3d; border: 1px solid #b9dfc5; border-radius: 4px; padding: 1px 6px; background: #eef8f1; }
/* Home page header: full title on the left, logo on the right */
.hero-brand .wrap { padding-top: 64px; padding-bottom: 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1.hero-title { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -.01em; margin: 14px 0 18px; max-width: 720px; }
.hero-logo { width: 100%; max-width: 380px; height: auto; justify-self: center; display: block; }
@media (max-width: 860px) {
  .hero-brand .wrap { padding-top: 36px; padding-bottom: 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-logo { order: -1; max-width: 220px; }
}
/* Footer: project logo next to the ANR funding block */
.footer-top { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.footer-logo { line-height: 0; flex: none; }
.footer-top .funding { flex: 1 1 380px; }
.footer-logo img { height: 126px; width: auto; display: block; }
@media (max-width: 560px) { .footer-top { gap: 24px; } .footer-logo img { height: 104px; } }
/* Footer: QR code and media kit */
.footer-share { display: flex; gap: 14px; align-items: center; flex: none; }
.footer-share img { width: 96px; height: 96px; display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.footer-share p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.footer-share strong { color: var(--ink); }
/* Compact page header: the fragmented disc of the logo on the right */
.hero-disc { position: absolute; top: 50%; transform: translateY(-50%); right: max(16px, calc((100vw - var(--maxw)) / 2 + 16px));
  height: 84%; max-height: 300px; width: auto; pointer-events: none; }
@media (max-width: 860px) { .hero-disc { height: 62%; right: -24px; opacity: .22; } }
@media (min-width: 861px) { .hero.compact .wrap > * { max-width: calc(100% - 270px); } }
