/* The contact card unfolds in place; the research grid remains below About. */
.shared-contact-card>.contact-photo{display:block;min-width:0;color:inherit}
.shared-contact-card .contact-photo img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover}
:root .shared-contact-card:not(.cv-contact-card) .contact-cv-download{display:none}
:root .shared-contact-card .contact-card-actions{grid-template-columns:minmax(0,1fr) 48px}
:root .shared-contact-card .contact-cv-toggle{display:grid;place-items:center;flex:none;width:48px;min-width:48px;height:48px;min-height:48px;padding:0;border-radius:50%;line-height:1}
:root .shared-contact-card .contact-cv-toggle svg{width:22px;height:22px}
:root .hero.cv-expanded{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:none;gap:24px;max-width:1160px}
:root .hero.cv-expanded>.hero-text[hidden]{display:none!important}
:root .hero.cv-expanded>.shared-contact-card{grid-area:auto;grid-column:1/-1;justify-self:stretch;max-width:none;width:100%;transform:none}
:root .cv-contact-card{display:grid;grid-template-columns:128px minmax(0,1fr);grid-template-rows:64px 64px;max-width:none;margin:0;overflow:hidden;transform:none;border-radius:28px}
:root .cv-contact-card>.contact-photo{grid-column:1;grid-row:1/span 2;width:128px;height:128px;margin:0;overflow:hidden;border-radius:0}
:root .cv-contact-card .contact-photo img{width:100%;height:100%;aspect-ratio:1;object-fit:cover}
:root .cv-contact-card figcaption{display:contents}
:root .cv-contact-card figcaption::before{display:none}
:root .cv-contact-card figcaption>strong{grid-column:2;grid-row:1;align-self:end;margin:0;padding:0 28px 4px;font-size:32px;font-weight:500;letter-spacing:-.025em;line-height:1.2}
:root .cv-contact-card figcaption>span:first-of-type{grid-column:2;grid-row:2;align-self:start;padding:4px 28px 0;font-size:15px}
:root .cv-contact-card .portrait-affiliations{grid-column:1/-1;grid-row:3;display:flex;flex-wrap:wrap;gap:0 24px;margin:0;padding:16px 28px 0}
:root .cv-contact-card .portrait-affiliations a{font-size:14px;min-height:36px}
:root .cv-contact-card figcaption>span:last-of-type{grid-column:1/-1;grid-row:4;padding:4px 28px 0;font-size:12px}
:root .cv-contact-card .hero-socials{grid-column:1/-1;grid-row:5;justify-content:flex-start;margin:0;padding:12px 28px 0;gap:8px}
:root .cv-contact-card .contact-card-actions{grid-column:1/-1;grid-row:6;display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:16px 28px 24px}
:root .cv-contact-card .contact-card-actions .button:not(.contact-cv-toggle){width:auto;min-width:140px;padding-inline:20px}
:root .cv-inline{grid-column:1/-1;min-width:0;width:100%;overflow:visible}
.cv-inline[hidden]{display:none!important}
.cv-inline .cv-layout{padding-top:8px}
.inline-contact-morph{position:fixed!important;z-index:4;pointer-events:none!important;margin:0!important;max-width:none!important;min-width:0!important;display:block!important;transform:none!important;box-sizing:border-box;overflow:hidden;will-change:left,top,width,height}
:root .inline-contact-morph figcaption{display:contents!important}
:root .inline-contact-morph>.contact-photo,:root .inline-contact-morph figcaption>*{position:absolute!important;grid-area:auto!important;margin:0!important;min-width:0!important;min-height:0!important;box-sizing:border-box;max-width:none!important}
:root .inline-contact-morph>.contact-photo{overflow:hidden}
:root .inline-contact-morph .contact-photo img{width:100%;height:100%;aspect-ratio:auto;object-fit:cover}
html.inline-cv-moving{scroll-behavior:auto!important}
@media(max-width:760px){
 :root .hero.cv-expanded{gap:16px}
 :root .cv-contact-card{grid-template-columns:104px minmax(0,1fr);grid-template-rows:52px 52px;border-radius:24px}
 :root .cv-contact-card>.contact-photo{width:104px;height:104px}
 :root .cv-contact-card figcaption>strong{font-size:26px;padding-inline:18px}
 :root .cv-contact-card figcaption>span:first-of-type{font-size:13px;padding-inline:18px}
 :root .cv-contact-card .portrait-affiliations{display:grid;gap:0;padding:14px 20px 0}
 :root .cv-contact-card .portrait-affiliations a{font-size:13px}
 :root .cv-contact-card figcaption>span:last-of-type{padding-inline:20px}
 :root .cv-contact-card .hero-socials{padding-inline:20px;flex-wrap:wrap}
 :root .cv-contact-card .contact-card-actions{padding:16px 20px 20px;gap:8px}
 :root .cv-contact-card .contact-card-actions .button:not(.contact-cv-toggle){min-width:0;padding-inline:14px;flex:1}
 .cv-inline .cv-section-nav{margin-top:0}
}
@media print{
 .cv-contact-card .hero-socials,.cv-contact-card .contact-card-actions{display:none!important}
 .cv-inline{display:block!important}
}

/* Balanced labeled actions: expand is an action icon beside the CV label. */
:root .shared-contact-card:not(.cv-contact-card) .contact-card-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
:root .shared-contact-card .contact-cv-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:auto;min-width:0;padding:10px 14px;border-radius:999px;font-size:13px;line-height:20px}
:root .shared-contact-card .contact-cv-toggle span{min-width:0;white-space:normal;line-height:20px}
:root .shared-contact-card .contact-cv-toggle svg{flex:none;width:20px;height:20px}

/* Expanded mode keeps Download prominent and uses a compact collapse action. */
:root .cv-contact-card .contact-cv-toggle span{display:none}
:root .cv-contact-card .contact-cv-toggle{display:grid;place-items:center;width:48px;min-width:48px;height:48px;padding:0;border-radius:50%;flex:0 0 48px}

/* Desktop: the photograph is the full left side of the expanded contact card. */
@media(min-width:761px){
 :root .cv-contact-card{grid-template-columns:240px minmax(0,1fr);grid-template-rows:repeat(6,auto)}
 :root .cv-contact-card>.contact-photo{grid-column:1;grid-row:1/span 6;width:240px;height:100%;min-height:100%;align-self:stretch}
 :root .cv-contact-card .contact-photo img{width:100%;height:100%;object-fit:cover;object-position:center}
 :root .cv-contact-card figcaption>strong{grid-column:2;grid-row:1;align-self:start;padding:28px 28px 4px}
 :root .cv-contact-card figcaption>span:first-of-type{grid-column:2;grid-row:2}
 :root .cv-contact-card .portrait-affiliations{grid-column:2;grid-row:3;display:grid;gap:0;padding-top:12px}
 :root .cv-contact-card figcaption>span:last-of-type{grid-column:2;grid-row:4}
 :root .cv-contact-card .hero-socials{grid-column:2;grid-row:5}
 :root .cv-contact-card .contact-card-actions{grid-column:2;grid-row:6}
}

/* One physical contact surface retains its color in both layouts and during morphing. */
:root .shared-contact-card{--contact-card-surface:#202e24;background:var(--contact-card-surface)}
:root[data-theme=light] .shared-contact-card{--contact-card-surface:#edf2e7}
:root .shared-contact-card figcaption{background:var(--contact-card-surface)}

/* Let the full photograph set a generous desktop column instead of cropping a strip. */
@media(min-width:761px){
 :root .cv-contact-card{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr)}
 :root .cv-contact-card>.contact-photo{width:100%;height:100%;min-height:0;background:var(--contact-card-surface)}
 :root .cv-contact-card .contact-photo img{width:100%;height:auto;aspect-ratio:1;object-fit:contain;object-position:center top}
}

/* Match the full photograph to the header height without a crop or an empty strip. */
@media(min-width:761px){
 :root .cv-contact-card{grid-template-columns:minmax(0,var(--cv-photo-width,40%)) minmax(0,1fr)}
 :root .cv-contact-card .contact-photo img{height:100%;width:100%;aspect-ratio:auto;object-fit:contain}
}
.hero-text-transit{position:fixed!important;z-index:3;display:block!important;pointer-events:none!important;max-width:none!important;padding:0!important;margin:0!important;border:0!important;gap:0!important;will-change:transform}
.hero-text-transit>.hero-text{width:100%;margin:0}
:root .inline-contact-morph .contact-card-actions{display:block!important;padding:0!important;overflow:visible}
:root .inline-contact-morph .contact-card-actions>a{position:absolute!important;min-width:0!important;max-width:none!important;margin:0!important;box-sizing:border-box;display:flex!important;align-items:center;justify-content:center}
:root .inline-contact-morph .contact-cv-toggle span{display:block!important;flex:0 0 auto;overflow:hidden;white-space:nowrap}
:root .header .nav-links.indicator-ready .nav-indicator{transition-duration:680ms;transition-timing-function:cubic-bezier(.4,0,.2,1)}
@media(prefers-reduced-motion:reduce){:root .header .nav-links.indicator-ready .nav-indicator{transition:none}}
:root[data-motion=reduce] .header .nav-links.indicator-ready .nav-indicator{transition:none}
