/* Olivier Coulon — personal site. Same design language as the BaboFet site (v3):
   white, Helvetica, navy accent, booktabs tables, citation-style references. */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --fg-2: #3d3d3d;
  --muted: #6e6e6e;
  --rule: #dcdcdc;
  --rule-2: #ececec;
  --panel: #f4f4f4;
  --band: #f4f5f7;
  --link: #1d4f91;
  --accent: #1d4f91;
  --fig: #000000;
  --ph: #fff3bf;
  --ph-fg: #5c4a00;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: Menlo, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.ph { background: var(--ph); color: var(--ph-fg); padding: 0 3px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; height: 64px; gap: 22px; position: relative; }
.brand { color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.brand-sub { font-size: 13.5px; color: var(--muted); padding-left: 14px; border-left: 1px solid var(--rule); line-height: 1.3; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--fg-2); font-size: 15px; padding: 21px 0 20px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--fg); text-decoration: none; }
.nav a.active { color: var(--fg); font-weight: 600; border-bottom-color: var(--accent); }
.burger { display: none; margin-left: auto; width: 36px; height: 36px; border: 1px solid var(--rule); align-items: center; justify-content: center; background: none; cursor: pointer; padding: 0; }
.burger span { display: block; width: 16px; height: 1.5px; background: var(--fg); box-shadow: 0 5px 0 var(--fg), 0 -5px 0 var(--fg); }

/* ---------- buttons ---------- */
.btn { display: inline-block; font-size: 15px; font-weight: 600; padding: 9px 18px; border-radius: 3px; border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.btn:hover { text-decoration: none; background: #eef3fa; }
.btn.solid { background: var(--accent); color: #fff; }
.btn.solid:hover { background: #163e74; }

/* ---------- home: hero ---------- */
.hero { background: var(--band); border-bottom: 1px solid var(--rule); padding: 44px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 132px minmax(0, 1fr) 400px; gap: 36px; align-items: start; }
.portrait { width: 132px; height: 132px; object-fit: cover; object-position: 50% 75%; border-radius: 50%; filter: grayscale(1); border: 1px solid var(--rule); background: #fff; }
.hero h1 { font-size: 40px; letter-spacing: -0.025em; margin-bottom: 6px; }
.hero .role { font-size: 19px; color: var(--fg); margin-bottom: 4px; }
.hero .aff { font-size: 15px; color: var(--fg-2); margin-bottom: 16px; }
.hero .aff a { color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 2px; }
.hero .aff a:hover { color: var(--accent); text-decoration-color: currentColor; }
.hero .statement { font-size: 18px; line-height: 1.55; color: var(--fg); max-width: 36em; margin-bottom: 20px; }
.hero-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profiles { display: inline-flex; flex-wrap: wrap; gap: 4px 18px; margin-left: 10px; font-size: 14.5px; }
.hero-fig { margin: 0; background: #fff; border: 1px solid var(--rule); padding: 10px 10px 8px; }
.hero-fig img { width: 100%; height: auto; }
.hero-fig figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.hero-fig figcaption a { color: var(--muted); text-decoration: underline; }

/* ---------- home: research summary ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; padding: 48px 0 8px; align-items: start; }
.intro h2 { font-size: 26px; margin-bottom: 14px; }
.intro p { font-size: 17px; color: var(--fg-2); line-height: 1.65; max-width: 42em; }
.intro aside { border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; font-size: 14.5px; color: var(--fg-2); }
.intro aside div + div { margin-top: 12px; }
.intro aside b { display: block; color: var(--fg); font-weight: 600; font-size: 13.5px; }

/* ---------- sections ---------- */
.section { padding: 34px 0; }
.h2 { font-size: 21px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.h2.split { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.h2.split a { font-size: 14.5px; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }

/* ---------- themes ---------- */
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 44px; }
.theme { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.theme .fig { aspect-ratio: 4 / 3; background: var(--fig); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.theme .fig.empty { background: var(--panel); border: 1px dashed #b9b9b9; }
.theme .fig.white { background: #fff; border: 1px solid var(--rule); }
.theme .fig a.one { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.theme .fig img.one { width: 100%; height: 100%; object-fit: contain; }
.ph-fig { font-size: 12.5px; line-height: 1.4; color: var(--muted); padding: 12px 14px; text-align: center; font-style: italic; }
.mini-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 8px 6px; width: 100%; }
.mini-strip div { text-align: center; }
.mini-strip img { width: 100%; height: auto; }
.mini-strip span { display: block; color: #cfcfcf; font-size: 11.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.theme h3 { font-size: 18px; margin-bottom: 7px; }
.theme p { font-size: 15px; color: var(--fg-2); margin-bottom: 10px; }
.theme .key { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 3px; }
ul.srefs { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; }
ul.srefs li { padding: 2px 0; }
a.sref { color: var(--fg-2); }
a.sref span { color: var(--link); }
a.sref i { color: var(--muted); }
.more { font-size: 14.5px; font-weight: 600; }

/* ---------- projects & software ---------- */
.project { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; padding: 4px 0 20px; }
.project + .project { border-top: 1px solid var(--rule-2); padding-top: 18px; }
.project img { width: 64px; height: auto; }
.logo-ph { width: 64px; height: 64px; border: 1px dashed #b9b9b9; background: var(--panel); }
.project h3 { font-size: 18px; margin-bottom: 5px; }
.project p { font-size: 15px; color: var(--fg-2); margin-bottom: 8px; }
.project .meta { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13.5px; color: var(--muted); }
.project .meta > * + *::before { content: "·"; margin: 0 8px; color: var(--muted); }
.project .more { display: inline-block; margin-top: 6px; font-size: 14px; }
table.bt { width: 100%; border-collapse: collapse; font-size: 14.5px; border-top: 1.5px solid var(--fg); border-bottom: 1.5px solid var(--fg); }
table.bt td { padding: 9px 14px 9px 0; color: var(--fg-2); border-bottom: 1px solid var(--rule-2); vertical-align: top; }
table.bt tr:last-child td { border-bottom: 0; }
table.bt td.name { white-space: nowrap; font-weight: 600; width: 1%; padding-right: 22px; }
.refs-mini { font-size: 13px; margin-top: 2px; }

/* ---------- page title block ---------- */
.title-block { padding: 38px 0 28px; background: var(--band); border-bottom: 1px solid var(--rule); }
.title-block h1 { font-size: 34px; margin-bottom: 12px; }
.title-block .lead { font-size: 17.5px; color: var(--fg-2); max-width: 48em; margin-bottom: 8px; }
.title-block .byline { font-size: 14.5px; color: var(--muted); margin: 0; }

/* ---------- publications ---------- */
.pubs { padding-top: 26px; }
.pub-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; margin-bottom: 14px; }
.input { flex: 1; min-width: 220px; border: 1px solid var(--rule); padding: 8px 10px; font: inherit; font-size: 14.5px; color: var(--fg); background: var(--bg); border-radius: 0; }
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.seg { display: inline-flex; border: 1px solid var(--rule); }
.seg button { font: inherit; font-size: 14px; background: var(--bg); color: var(--fg-2); border: 0; padding: 7px 13px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button.on { background: var(--fg); color: var(--bg); }
.seg .n { opacity: .6; font-variant-numeric: tabular-nums; margin-left: 2px; }
.bib { font-weight: 600; }
.years { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 13.5px; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.years a { padding: 2px 7px; color: var(--fg-2); }
.years a:hover { background: var(--panel); text-decoration: none; }
.years a.off { color: #c4c4c4; pointer-events: none; }
.count { font-size: 13.5px; min-height: 1.4em; margin: 4px 0 0; }
.year { font-size: 20px; font-weight: 600; margin: 26px 0 2px; padding-bottom: 6px; border-bottom: 1px solid var(--fg); display: flex; justify-content: space-between; align-items: baseline; }
.year small { font-size: 13px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
ol.refs { list-style: none; margin: 0; padding: 0; }
ol.refs li { display: grid; grid-template-columns: 40px minmax(0, 1fr) 22px; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule-2); font-size: 15px; color: var(--fg-2); }
ol.refs .n { color: #a2a2a2; font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
ol.refs .t { color: var(--fg); font-weight: 600; }
ol.refs .t a { color: inherit; text-decoration: none; }
ol.refs .t a:hover { color: var(--link); text-decoration: underline; }
ol.refs b { color: var(--fg); font-weight: 600; }
ol.refs .na, ol.refs .note-inline { color: var(--muted); font-size: 13.5px; }
ol.refs .lk { font-size: 13.5px; margin-top: 3px; }
ol.refs .lk a.doi { overflow-wrap: anywhere; }
ol.refs .lk a + a::before { content: " · "; color: var(--muted); }
ol.refs .star { color: #c98a00; font-size: 14px; text-align: right; padding-top: 1px; }
.tag { display: inline-block; font-size: 11.5px; line-height: 1; padding: 3px 6px 2px; border: 1px solid #c98a00; color: #8a5f00; border-radius: 2px; vertical-align: 1px; }
.latest { padding-bottom: 10px; }
.latest ol.refs li { grid-template-columns: minmax(0, 1fr) 22px; }
.latest ol.refs .n { display: none; }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding: 36px 0 8px; }
.contact h2 { font-size: 21px; margin-bottom: 14px; }
table.facts { width: 100%; border-collapse: collapse; font-size: 15px; }
table.facts th { text-align: left; font-weight: 600; color: var(--fg); padding: 10px 14px 10px 0; vertical-align: top; width: 32%; border-bottom: 1px solid var(--rule-2); }
table.facts td { color: var(--fg-2); padding: 10px 0; vertical-align: top; border-bottom: 1px solid var(--rule-2); }
table.facts tr:first-child th, table.facts tr:first-child td { border-top: 1.5px solid var(--fg); }
table.facts tr:last-child th, table.facts tr:last-child td { border-bottom: 1.5px solid var(--fg); }
.map { margin-top: 6px; font-size: 14px; }
ul.profile-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--fg); border-bottom: 1.5px solid var(--fg); font-size: 15px; }
ul.profile-list li { display: grid; grid-template-columns: 32% minmax(0, 1fr); padding: 10px 0; border-bottom: 1px solid var(--rule-2); }
ul.profile-list li:last-child { border-bottom: 0; }
ul.profile-list .lbl { font-weight: 600; color: var(--fg); }
ul.profile-list a { overflow-wrap: anywhere; }
.prose p { max-width: 46em; color: var(--fg-2); font-size: 15px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); margin-top: 44px; padding: 28px 0; background: var(--band); font-size: 13.5px; color: var(--muted); }
.site-footer .top { display: flex; gap: 40px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.site-footer .k { color: var(--fg); font-weight: 600; margin-bottom: 2px; }
.logos { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.logos img { height: 44px; width: auto; }
.logos img.wide { height: 34px; }
.site-footer .bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--rule); }
.site-footer .bottom a { color: var(--fg-2); }
.site-footer .sep { margin: 0 8px; }

/* ---------- medium screens ---------- */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 120px minmax(0, 1fr); }
  .portrait { width: 120px; height: 120px; }
  .hero-fig { grid-column: 1 / -1; max-width: 520px; }
  .themes { grid-template-columns: 1fr; }
}

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { height: 56px; }
  .brand-sub, .nav { display: none; }
  .burger { display: flex; }
  body.nav-open .nav { display: flex; flex-direction: column; gap: 0; position: absolute; top: 56px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 6px 16px 10px; z-index: 20; box-shadow: 0 8px 16px rgba(0,0,0,0.06); }
  body.nav-open .nav a { padding: 11px 0; border-bottom: 1px solid var(--rule-2); }
  .hero { padding: 28px 0 26px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .portrait { width: 84px; height: 84px; }
  .hero h1 { font-size: 30px; }
  .hero .role { font-size: 16.5px; }
  .hero .statement { font-size: 16.5px; }
  .profiles { margin-left: 0; width: 100%; }
  .intro, .grid-2, .contact { grid-template-columns: 1fr; gap: 28px; }
  .intro { padding-top: 32px; }
  .theme { grid-template-columns: 1fr; gap: 12px; }
  .theme .fig { max-width: 420px; }
  .title-block h1 { font-size: 27px; }
  ol.refs li { grid-template-columns: 30px minmax(0, 1fr); }
  ol.refs .star { display: none; }
  table.bt td.name { white-space: normal; width: 30%; }
  .site-footer .top { gap: 20px; }
}
ul.profile-list .ph { justify-self: start; }
