[hidden]{display:none!important}
/* Colours and fonts are defined once here. */
:root{
  --ink:#1F2A44; --ink-2:#3B4663; --muted:#5A6484; --muted-2:#626A88; --line:#E3D9C6; --paper:#F6F1E7; --white:#FFFFFF;
  --blue:#1E3A8A; --blue-line:#3B55A8; --on-blue:#F6F1E7; --on-blue-2:#C9CFDF;
  --terracotta:#B5542A; --terracotta-text:#A84B23; --saffron:#D9A21B; --chip:#ECE7DC;
  --serif:'Fraunces',Georgia,serif; --sans:'Manrope',system-ui,-apple-system,'Segoe UI',sans-serif; --mono:'JetBrains Mono',ui-monospace,Menlo,monospace;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:17px;line-height:1.65}
a{color:var(--ink);text-decoration-color:var(--terracotta);text-decoration-thickness:1.5px;text-underline-offset:4px}
a:hover{color:var(--terracotta-text)}
h1,h2,h3{font-family:var(--serif);font-weight:600;margin:0;letter-spacing:-0.01em}
p{margin:0}
p,li,.pub .t{hyphens:auto;-webkit-hyphens:auto;text-wrap:pretty}
.wrap{max-width:1080px;margin:0 auto;padding:0 32px}
.ic{flex:0 0 auto}
:focus-visible{outline:2px solid var(--saffron);outline-offset:2px}

/* ---------- top band and navigation ---------- */
.top{background:var(--blue);color:var(--on-blue)}
.nav{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px 24px;padding:18px 0;border-bottom:1px solid var(--blue-line)}
.brand{font-family:var(--serif);font-weight:600;font-size:20px;color:var(--on-blue);text-decoration:none}
.nav nav{display:flex;flex-wrap:wrap;gap:24px;font-size:15px;font-weight:500}
.nav nav a{color:var(--on-blue-2);text-decoration:none}
.nav nav a:hover{color:var(--on-blue)}
.nav nav a.on{color:var(--on-blue);text-decoration:underline;text-decoration-color:var(--saffron);text-underline-offset:6px}

.hero{display:flex;flex-wrap:wrap;gap:32px 56px;align-items:center;padding:44px 0 48px}
.portrait{flex:0 0 200px;width:200px;height:200px;border-radius:50%;object-fit:cover;border:5px solid var(--white);box-shadow:0 8px 24px rgba(10,20,50,.28);background:#34436A}
.hero-text{flex:1 1 480px;min-width:0;display:flex;flex-direction:column;gap:14px}
.hero h1{font-size:34px;line-height:1.2;font-weight:500}
.rule{display:block;width:56px;height:3px;background:var(--saffron)}
.sub{font-size:17px;color:var(--on-blue-2)}
.hero p{max-width:680px}
.hero .dim{color:var(--on-blue-2)}
.hero a{color:var(--on-blue);text-decoration-color:var(--saffron)}
.links{display:flex;flex-wrap:wrap;gap:8px 22px;font-size:15px;font-weight:500;margin-top:8px}
.links a{display:inline-flex;align-items:center;gap:7px;text-decoration:none}
.links a:hover{text-decoration:underline}
.links .ic{color:var(--saffron)}

.page-title{padding:44px 0 28px;display:flex;flex-direction:column;gap:10px;max-width:740px}
.page-title h1{font-size:34px;line-height:1.2}
.page-title p{color:var(--ink-2)}

/* ---------- rows (title left, content right) ---------- */
.row{display:flex;flex-wrap:wrap;gap:16px 48px;padding:22px 0;border-top:1px solid var(--line)}
.wrap > .row:first-child{border-top:0;padding-top:32px}
.row.last{padding-bottom:48px}
.row h2{flex:0 0 170px;font-size:20px}
.row > *:last-child{flex:1 1 480px;min-width:0}
.row ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:6px;color:var(--ink-2)}
.row ul.inline{list-style:none;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 36px;font-size:17px}
.row ul.inline li{position:relative;padding-left:16px}
.row ul.inline li::before{content:"";position:absolute;left:0;top:.7em;width:6px;height:6px;border-radius:50%;background:var(--saffron)}
@media (max-width:760px){.row ul.inline{grid-template-columns:1fr}}
.row p{color:var(--ink-2)}

/* ---------- buttons and chips ---------- */
.btn{display:inline-flex;align-items:center;gap:9px;min-height:42px;padding:0 18px;border-radius:4px;background:var(--blue);color:#fff;font-weight:600;font-size:15px;text-decoration:none}
.btn:hover{background:#17307A;color:#fff}
.btn .ic{color:var(--saffron)}
.btn-o{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 12px;border:1px solid #CFC4AD;border-radius:999px;background:var(--white);color:var(--ink-2);font:500 13px/1 var(--sans);text-decoration:none;cursor:pointer}
.btn-o:hover{border-color:var(--terracotta);color:var(--terracotta-text)}
.btn-o .ic{color:var(--muted-2)}
.btn-o.up .ic-down,.read-more.up .ic,.show-more.up .ic{transform:rotate(180deg)}
.acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{display:inline-block;padding:3px 10px;border-radius:999px;background:var(--chip);color:var(--ink-2);font:400 13px/1.5 var(--mono)}
.chip.kw{background:transparent;border:1px solid #D9D1C0;color:var(--muted)}

/* ---------- project cards ---------- */
.band{background:var(--white);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.band .wrap{padding-top:44px;padding-bottom:44px}
.sec-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:22px}
.sec-head h2{font-size:24px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr));gap:36px 28px;align-items:start}
.grid.wide{grid-template-columns:repeat(auto-fill,minmax(min(420px,100%),1fr));gap:56px 44px;padding-bottom:72px}
.card{display:flex;flex-direction:column;gap:12px}
.card .fig{position:relative;border-radius:4px;overflow:hidden;background:#0E0E0E;aspect-ratio:400/250}
.card .fig img{display:block;width:100%;height:100%;object-fit:cover}
.card h3{font-size:20px;line-height:1.35}
.ongoing{font-family:var(--sans);font-weight:500;font-size:15px;color:var(--muted-2);white-space:nowrap}
.clamp{position:relative;display:flex;flex-direction:column;gap:12px;font-size:17px;color:var(--ink-2)}
.clamp.is-clamped{max-height:calc(1.65em * 4);overflow:hidden}
.clamp.is-clamped::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1.8em;background:linear-gradient(rgba(255,255,255,0),var(--card-bg,var(--paper)))}
.band .clamp{--card-bg:var(--white)}
.read-more{align-self:flex-start;display:inline-flex;align-items:center;gap:6px;margin-top:-4px;padding:2px 0;border:0;background:none;color:var(--terracotta-text);font:600 15px/1.4 var(--sans);cursor:pointer}
.read-more:hover{text-decoration:underline}
.foot{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding-top:2px}
.note{font-size:15px;color:var(--muted)}
.funding-line{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:13px;color:var(--muted)}
.funding-line img{height:30px;width:auto;border-radius:3px}
.funding-line img + img{border-radius:50%;height:34px;width:34px}
.media{margin:0;display:flex;flex-direction:column;gap:6px}
.media img{display:block;width:100%;height:auto;border-radius:4px}
.media figcaption{font-size:13px;line-height:1.45;color:var(--muted-2)}

/* ---------- lists (papers, outreach) ---------- */
.list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column}
.list li{display:flex;flex-wrap:wrap;gap:2px 20px;padding:12px 0;border-top:1px solid var(--line)}
.list li:first-child{border-top:0;padding-top:0}
.list .k{flex:0 0 110px;font-family:var(--mono);font-size:13px;color:var(--muted-2);padding-top:3px}
.list .v{flex:1 1 320px;min-width:0}
.stack-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:32px}
.pub{display:flex;flex-direction:column;gap:2px}
.pub .t{font-weight:600;font-size:17px;line-height:1.45}
.pub .t .chip{margin-left:6px;vertical-align:2px;font-weight:400}
.pub .a,.pub .m{font-size:15px;color:var(--muted)}
.pub .me{font-weight:700;color:var(--ink)}
.bib{margin-top:10px;padding:12px 14px;background:var(--white);border:1px solid var(--line);border-radius:4px;display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.bib pre{margin:0;max-width:100%;overflow-x:auto;font:13px/1.5 var(--mono);color:var(--ink-2);white-space:pre}

/* ---------- about ---------- */
.toc{position:sticky;top:0;z-index:5;background:rgba(246,241,231,.94);backdrop-filter:blur(6px);border-bottom:1px solid var(--line)}
.toc .wrap{display:flex;gap:6px;overflow-x:auto;padding-top:10px;padding-bottom:10px;scrollbar-width:none}
.toc .wrap::-webkit-scrollbar{display:none}
.toc a{flex:0 0 auto;padding:6px 14px;border-radius:999px;font-size:15px;font-weight:500;color:var(--ink-2);text-decoration:none;border:1px solid transparent}
.toc a:hover{color:var(--terracotta-text)}
.toc a.active{color:var(--terracotta-text);border-color:rgba(181,84,42,.45);background:rgba(181,84,42,.07)}
.sec{padding:32px 0;border-top:1px solid var(--line);scroll-margin-top:64px}
.row{scroll-margin-top:64px}

.sec.first{border-top:0;padding-top:8px}
.sec h2{font-size:24px;margin-bottom:6px}
.sec .lead{margin:0 0 24px;color:var(--ink-2);font-size:17px}
.sec > h2 + .tl{margin-top:20px}
.plain{margin:12px 0 0;padding-left:18px;display:flex;flex-direction:column;gap:8px;color:var(--ink-2)}

.tl{margin:0;padding:0;list-style:none}
.tl li{display:flex;flex-wrap:wrap}
.tl li.tl-extra{display:none}
.tl.open li.tl-extra{display:flex}
.tl .when{flex:0 0 150px;padding-top:18px;font-family:var(--mono);font-size:13px;color:var(--muted-2)}
.tl .body{flex:1 1 520px;min-width:0;position:relative;border-left:2px solid #CFC4AD;padding:14px 0 30px 32px}
.tl .dot{position:absolute;left:-8px;top:20px;width:14px;height:14px;border-radius:50%;background:var(--white);border:2px solid var(--blue)}
.tl li.now .dot{background:var(--terracotta);border-color:var(--terracotta)}
.tl .inner{display:flex;gap:16px;align-items:flex-start}
.tl .logo{flex:0 0 84px;height:56px;padding:6px;border:1px solid var(--line);border-radius:4px;display:flex;align-items:center;justify-content:center;background:var(--white);font:700 13px var(--serif);color:var(--muted)}
.tl .logo img{max-width:100%;max-height:100%;object-fit:contain}
.tl .logo.multi{flex-direction:column;gap:5px;height:76px}
.tl .logo.multi img{max-height:calc(50% - 3px);min-height:0}
.tl .role{font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.35}
.tl .place{font-size:15px;color:var(--muted)}
.tl p{margin:6px 0 0;font-size:17px;color:var(--ink-2)}
.tl .sup{margin-top:4px;font-size:15px;color:var(--muted)}
.tl .sup b{color:var(--ink-2)}
.show-more{display:inline-flex;align-items:center;gap:6px;margin:-6px 0 0 182px;padding:4px 0;border:0;background:none;color:var(--terracotta-text);font:600 15px/1.4 var(--sans);cursor:pointer}
.show-more:hover{text-decoration:underline}
.show-more.left{margin:18px 0 0}

.fund{display:flex;flex-wrap:wrap;gap:20px;padding:18px 0;border-top:1px solid var(--line)}
.fund:first-of-type{border-top:0}
.logo-box{flex:0 0 150px;height:64px;display:flex;align-items:center;justify-content:center;gap:10px;padding:6px 10px;background:var(--white);border:1px solid var(--line);border-radius:3px}
.logo-box img{max-height:100%;max-width:100%;object-fit:contain;min-width:0}
.logo-box img + img{height:46px;width:46px;border-radius:50%;flex:0 0 46px}
.fund .txt{flex:1 1 420px;min-width:0}
.fund .t{font-weight:600}
.fund .m{font-size:15px;color:var(--muted)}

.certs{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr));gap:36px 24px}
.cert .wall{display:flex;align-items:center;justify-content:center;height:250px;margin-bottom:10px}

.cert{display:flex;flex-direction:column;gap:6px}
/* certificate shown as a framed document under glass: the frame follows the certificate's shape */
.cert .thumb{display:inline-block;max-width:calc(100% - 32px);padding:12px;background:#FFFDF8;border:1px solid #CDBF9F;border-radius:2px;box-shadow:inset 0 0 0 4px #FFFDF8,inset 0 0 0 5px #E3D6B8,0 1px 2px rgba(31,42,68,.06),0 8px 22px rgba(31,42,68,.12);transition:transform .2s,box-shadow .2s}
.cert .thumb:hover{transform:translateY(-3px);box-shadow:inset 0 0 0 4px #FFFDF8,inset 0 0 0 5px #E3D6B8,0 2px 4px rgba(31,42,68,.08),0 14px 30px rgba(31,42,68,.18)}
.cert .mat{position:relative;display:block;padding:4px;border:1px solid var(--saffron);background:#fff;overflow:hidden}
.cert .thumb img{display:block;height:190px;width:auto;max-width:100%;object-fit:contain}
.cert .mat::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(118deg,rgba(255,255,255,.55) 0%,rgba(255,255,255,.16) 26%,rgba(255,255,255,0) 40%,rgba(255,255,255,0) 72%,rgba(255,255,255,.14) 100%)}
.cert .mat::before{content:"";position:absolute;top:-20%;bottom:-20%;left:-60%;width:35%;z-index:1;pointer-events:none;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.45),rgba(255,255,255,0));transform:skewX(-18deg);transition:left .7s ease}
.cert .thumb:hover .mat::before{left:130%}
.cert .t{font-family:var(--serif);font-size:17px;font-weight:600;line-height:1.35}
.cert .i{font-size:15px;color:var(--muted)}

.events{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr));gap:28px 22px}
.events .ev-extra{display:none}
.events.open .ev-extra{display:flex}
.event{display:flex;flex-direction:column;gap:4px;padding:0;border:0;background:none;text-align:left;font:inherit;color:inherit;cursor:pointer}
.event[disabled]{cursor:default}
.event .cover{position:relative;display:block;aspect-ratio:4/3;border-radius:4px;overflow:hidden;background:#D9D3C4;margin-bottom:6px}
/* the whole photo is always visible; the empty space is filled with a blurred copy of it */
.event .cover .fill{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:blur(18px) brightness(.8) saturate(1.1);transform:scale(1.2)}
.event .cover .main{position:relative;display:block;width:100%;height:100%;object-fit:contain;transition:transform .3s}
.event:not([disabled]):hover .cover .main{transform:scale(1.03)}
.event .ph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#9C9480}
.event .count{position:absolute;right:8px;bottom:8px;padding:3px 9px;border-radius:999px;background:rgba(20,26,40,.72);color:#fff;font-size:13px;font-weight:600}
.event .c1{font-size:17px;font-weight:600}
.event .c2{font-size:15px;color:var(--muted-2)}

.lb{position:fixed;inset:0;z-index:50;display:none;align-items:center;justify-content:center;gap:12px;padding:24px;background:rgba(12,16,28,.92)}
.lb.open{display:flex}
.lb figure{margin:0;max-width:min(1100px,100%);display:flex;flex-direction:column;gap:10px;align-items:center}
.lb img{max-width:100%;max-height:78vh;border-radius:4px;object-fit:contain}
.lb figcaption{color:#E9ECF3;font-size:15px;text-align:center}
.lb-c{margin-left:10px;color:#AEB6C8;font-family:var(--mono);font-size:13px}
.lb button{border:0;background:rgba(255,255,255,.1);color:#fff;border-radius:50%;width:48px;height:48px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:0 0 auto}
.lb button:hover{background:rgba(255,255,255,.22)}
.lb-x{position:absolute;top:16px;right:16px}

/* ---------- footer ---------- */
footer{background:var(--blue);color:var(--on-blue-2);border-top:4px solid var(--terracotta);margin-top:24px}
footer .wrap{padding:22px 32px 30px;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px 24px;font-size:15px}
footer nav{display:flex;flex-wrap:wrap;gap:8px 18px}
footer nav a{display:inline-flex;align-items:center;gap:6px;color:var(--on-blue);text-decoration:none;font-weight:500}
footer nav a:hover{text-decoration:underline;text-decoration-color:var(--saffron);color:var(--on-blue)}
footer nav .ic{color:var(--saffron)}

@media (max-width:640px){
  .wrap{padding:0 20px}
  .hero{padding:28px 0 36px;gap:20px}
  .portrait{flex-basis:150px;width:150px;height:150px}
  .hero h1{font-size:30px}
  .row h2{flex-basis:100%}
  .tl .when{flex-basis:100%;padding:0 0 6px}
  .tl .body{padding-left:24px}
  .tl .inner{flex-direction:column;gap:10px}
  .show-more{margin-left:0}
  .tl .logo{flex:0 0 auto;width:84px;height:48px}
  .card h3{min-height:0}
  .lb{padding:12px;gap:4px}
  .lb button{width:40px;height:40px}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}
.clamp p,.card h3{hyphens:manual;-webkit-hyphens:manual}
.sub,.hero h1,.row h2,.sec h2{hyphens:manual;-webkit-hyphens:manual}
.contact{display:flex;flex-direction:column;gap:6px}
.contact .acts{margin:6px 0 4px}
.contact .addr{font-size:15px;color:var(--muted)}
.row ul.inline li{hyphens:manual;-webkit-hyphens:manual}
.row ul.stack-list{padding-left:0;gap:26px}
.hero p,.pub .t{hyphens:manual;-webkit-hyphens:manual}
.fund .where{font-family:var(--mono);font-size:13px;color:var(--muted-2);margin:1px 0 4px}

/* monogram shown instead of the name in the top bar of the home page */
.monogram{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1.5px solid rgba(246,241,231,.45);border-radius:8px;font-family:var(--serif);font-weight:600;font-size:17px;color:var(--on-blue);letter-spacing:.02em;text-decoration:none}
.brandlink{display:inline-flex;align-items:center;gap:12px;text-decoration:none;color:var(--on-blue)}
.brandlink:hover{color:var(--on-blue)}
.brandlink:hover .monogram{border-color:var(--saffron)}

/* short fade when the content changes (browsers that support it; the others swap instantly) */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.2s}
@media (prefers-reduced-motion:reduce){@view-transition{navigation:none}}
/* While a page is first built, the blue top bar is already painted (it sits under the real bar afterwards). */
body{background:linear-gradient(var(--blue) 0 77px,var(--paper) 77px) no-repeat,var(--paper)}
@media (max-width:640px){body{background:linear-gradient(var(--blue) 0 113px,var(--paper) 113px) no-repeat,var(--paper)}}
body:has(#app[data-page="home"]){background:var(--paper)}

/* pause / play button on project animations */
.anim-toggle{position:absolute;right:7px;bottom:7px;width:28px;height:28px;padding:0;border-radius:50%;border:1px solid rgba(255,255,255,.35);
  background:rgba(22,32,64,.62);color:#fff;display:grid;place-items:center;cursor:pointer;opacity:.7;transition:opacity .15s,background .15s}
.anim-toggle:hover,.anim-toggle:focus-visible{opacity:1;background:var(--blue)}
.anim-toggle:focus-visible{outline:2px solid var(--saffron);outline-offset:2px}
/* with a mouse, the button shows when the pointer is on the figure (or while paused) */
@media (hover:hover){.anim-toggle{opacity:0}.card .fig:hover .anim-toggle,.anim-toggle:focus-visible,.anim-toggle[aria-pressed="true"]{opacity:1}}
@media (prefers-reduced-motion:reduce){.anim-toggle{display:none}}

/* project cards: full summary, details behind "Read more" */
.card .summary{margin:0;font-size:17px;line-height:1.65;color:var(--ink-2);hyphens:manual;-webkit-hyphens:manual}
.clamp.is-more.is-clamped{max-height:0;margin-top:-12px}
.clamp.is-more.is-clamped::after{display:none}

/* small slideshow in project details (several pictures) */
.slides-view{position:relative;display:block;width:100%;aspect-ratio:3/2;padding:0;border:0;border-radius:4px;overflow:hidden;background:var(--paper-2,#EDE6D8);cursor:pointer}
.slides-view img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:0;opacity:0;transition:opacity .6s ease}
.slides-view img.on{opacity:1}
.slides-view:focus-visible{outline:2px solid var(--saffron);outline-offset:2px}
.slides-bar{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.slides .dots{display:flex;gap:7px;flex:none;padding-top:4px}
.slides .dot{width:9px;height:9px;padding:0;border-radius:50%;border:1px solid var(--muted-2);background:transparent;cursor:pointer}
.slides .dot.on{background:var(--terracotta);border-color:var(--terracotta)}
@media (prefers-reduced-motion:reduce){.slides-view img{transition:none}}
