/* About page: team / board cards. Own code; used only on the About pages. */

/* 1) Portraits keep the site's cinematic look (grayscale + sepia + multiply, from site.css) from the very first paint.
   The scroll-reveal fade used to wrap them in a half-transparent group, which made the multiply blend do nothing for the first ~0.5 s (white photo
   background flashing, then turning paper-coloured). Cards with a portrait therefore do not fade; the photo is simply there. */
[data-reveal][data-armed]:has(.portrait){opacity:1!important;transform:none!important;transition:none!important}
/* 2) Real colours only on hover (mouse) or keyboard focus inside the card. Touch screens (no hover) stay cinematic. */
@media (prefers-reduced-motion:no-preference){.portrait{transition:filter .5s ease}}
@media (hover:hover){.portrait:hover,[data-reveal]:hover>.portrait{filter:none}}
[data-reveal]:focus-within>.portrait{filter:none}

/* "Read more" link-button */
.bio-trigger{display:inline-block;margin-top:1rem;padding:0 0 .125rem;border:0;border-bottom:1px solid var(--color-ink);border-radius:0;background:none;color:inherit;font:inherit;line-height:1.4;cursor:pointer;transition:color .2s,border-color .2s}
.bio-trigger:hover,.bio-trigger:focus-visible{color:var(--color-accent);border-color:var(--color-accent)}
.bio-trigger:focus-visible{outline:2px solid var(--color-accent);outline-offset:4px}

/* modal */
.bio-overlay{position:fixed;inset:0;z-index:90;display:none;align-items:center;justify-content:center;padding:1rem;background:rgba(28,26,23,.55);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.bio-overlay.open{display:flex}
body.bio-modal-open{overflow:hidden}
.bio-modal{position:relative;display:grid;grid-template-columns:minmax(0,260px) minmax(0,1fr);gap:2rem;width:min(960px,100%);max-height:calc(100vh - 2rem);max-height:calc(100dvh - 2rem);overflow:auto;padding:2rem;border-radius:1.25rem;background:var(--color-paper);color:var(--color-ink);box-shadow:0 40px 90px -30px #000a}
.bio-photo{display:block;width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:9999px 9999px 0 0;background:var(--color-rule)}
.bio-text h3{margin:0;font-size:clamp(1.6rem,2.6vw,2.25rem);line-height:1.1}
.bio-role{margin:.5rem 0 0;color:var(--color-muted)}
.bio-body{margin-top:1.25rem}
.bio-body p{margin:0 0 1rem;font-size:1.0625rem;line-height:1.7}
.bio-body p:last-child{margin-bottom:0}
.bio-close{position:absolute;inset-block-start:.75rem;inset-inline-end:.75rem;display:grid;place-items:center;width:2.5rem;height:2.5rem;padding:0;border:1px solid var(--color-rule);border-radius:50%;background:var(--color-paper);color:var(--color-ink);font-size:1.5rem;line-height:1;cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.bio-close:hover,.bio-close:focus-visible{background:var(--color-accent);border-color:var(--color-accent);color:var(--color-on-accent,#fff)}
@media (max-width:720px){.bio-modal{grid-template-columns:minmax(0,1fr);gap:1.25rem;padding:1.25rem}.bio-photo{max-width:220px;margin-inline:auto}}

/* Pouria's personal-website button: the same outlined button that fills with the accent colour on hover as the header Donate button (site.css .nav-donate): same colours, timing and curve */
.bio-link{position:relative;overflow:hidden;isolation:isolate;display:inline-flex;align-items:center;gap:.6rem;margin-top:1.5rem;padding:.7rem 1.25rem;border:2px solid var(--color-accent);border-radius:9999px;background:#fff;color:var(--color-ink);font:inherit;font-weight:500;line-height:1.2;text-decoration:none;box-shadow:0 0 0 0 transparent;transition:color .35s ease,box-shadow .35s ease,transform .25s ease}
.bio-link::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:var(--color-accent);transform:scaleX(0);transform-origin:left center;transition:transform .45s cubic-bezier(.65,0,.35,1)}
[dir=rtl] .bio-link::before{transform-origin:right center}
.bio-link svg{flex:none;width:1.1em;height:1.1em;transition:transform .35s cubic-bezier(.65,0,.35,1)}
[dir=rtl] .bio-link svg{transform:scaleX(-1)}
.bio-link:focus-visible{color:var(--color-on-accent);box-shadow:0 10px 24px -12px var(--color-accent);transform:translateY(-1px);outline:2px solid var(--color-accent);outline-offset:3px}
.bio-link:focus-visible::before{transform:scaleX(1)}
.bio-link:active{transform:scale(.97)}
@media (hover:hover) and (pointer:fine){.bio-link:hover{color:var(--color-on-accent);box-shadow:0 10px 24px -12px var(--color-accent);transform:translateY(-1px)}.bio-link:hover::before{transform:scaleX(1)}.bio-link:hover svg{transform:translate(2px,-2px)}[dir=rtl] .bio-link:hover svg{transform:scaleX(-1) translate(2px,-2px)}}
@media (prefers-reduced-motion:reduce){.bio-link,.bio-link::before,.bio-link svg{transition:none}}
