/* Shared styles for the crew bio pages (crew/<name>/index.html) */
:root{
  --sky:#BBE5FD;--sky-deep:#8CCBF0;--ink:#1D3352;--tabby:#6E4B2E;--fizz:#5CB83C;--coat:#FFFFFF;--card:#F2F9FE;
  --display:"Bricolage Grotesque",system-ui,sans-serif;
  --body:"Atkinson Hyperlegible",system-ui,sans-serif;
}
*{box-sizing:border-box}
body{margin:0;font-family:var(--body);font-size:1.125rem;line-height:1.6;color:var(--ink);background:var(--coat);overflow-x:hidden}
img{max-width:100%;height:auto;display:block}
a{color:inherit}
:focus-visible{outline:3px solid var(--fizz);outline-offset:3px;border-radius:4px}
.wrap{max-width:1120px;margin:0 auto;padding:0 24px}

/* Header, same as the other pages */
.top{background:var(--sky)}
.top .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:20px;padding-bottom:20px}
.brand{display:flex;align-items:center;gap:10px;font-family:var(--display);font-weight:800;font-size:1.25rem;text-decoration:none;white-space:nowrap}
.brand{flex-shrink:0}
.brand img{width:40px;height:40px;border-radius:50%;background:var(--coat)}
.top nav{display:flex;align-items:center;gap:24px}
.top nav a{text-decoration:none;font-weight:700;font-size:1rem;white-space:nowrap}
.top nav a:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
.theme-btn{display:inline-grid;place-items:center;width:42px;height:42px;padding:0;border-radius:50%;border:2px solid var(--ink);background:transparent;color:var(--ink);cursor:pointer;transition:background .3s,transform .4s}
.theme-btn:hover{background:rgba(255,255,255,.35);transform:rotate(-20deg)}
.theme-btn svg{width:22px;height:22px}
.theme-btn .sun{display:none}
html[data-theme="dark"] .theme-btn .sun{display:block}
html[data-theme="dark"] .theme-btn .moon{display:none}

/* Name tag, as on the homepage */
.tag{display:inline-block;font-family:var(--display);font-weight:800;font-size:1.15rem;letter-spacing:.08em;text-transform:uppercase;color:#FFFFFF;background:#1B1B1F;padding:6px 16px;border-radius:6px;border:2px solid #3A3A40;box-shadow:0 3px 0 rgba(29,51,82,.25)}
.role{font-size:1rem;font-weight:700;color:var(--tabby);line-height:1.3}

/* Hero: big portrait + name */
.hero{background:var(--sky);padding:56px 0 72px}
.hero .wrap{display:grid;grid-template-columns:.9fr 1.1fr;gap:56px;align-items:center}
.portrait{display:flex;flex-direction:column;align-items:center}
.portrait img{width:100%;max-width:440px;aspect-ratio:1;object-fit:cover;border-radius:50%;background:var(--coat);border:6px solid var(--coat);box-shadow:0 18px 30px rgba(29,51,82,.18);animation:pop .6s cubic-bezier(.2,.8,.2,1)}
.portrait .tag{position:relative;margin-top:-28px;font-size:1.4rem;padding:8px 22px}
@keyframes pop{from{opacity:0;transform:scale(.9) rotate(-4deg)}to{opacity:1;transform:none}}
.back{display:inline-flex;gap:8px;font-weight:700;font-size:1rem;text-decoration:none;margin-bottom:20px}
.back:hover{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
h1{font-family:var(--display);font-weight:800;font-size:clamp(3rem,8vw,6rem);line-height:.92;letter-spacing:-.03em;margin:0 0 16px}
.badge{display:inline-block;margin:0 0 24px;font-weight:700;font-size:1rem;background:var(--ink);color:var(--coat);padding:6px 16px;border-radius:999px}
.lead{font-size:1.3rem;max-width:34ch;margin:0}

/* Bio */
section{padding:88px 0}
h2{font-family:var(--display);font-weight:800;font-size:clamp(1.6rem,3.5vw,2.25rem);line-height:1.1;letter-spacing:-.02em;margin:0 0 14px}
.bio .wrap{display:grid;grid-template-columns:1fr 1fr;gap:32px}
.bio article{background:var(--card);border-radius:24px;padding:32px 32px 36px;border-top:6px solid var(--fizz)}
.bio article + article{border-top-color:var(--sky-deep)}
.bio p{margin:0;max-width:60ch}

/* Previous / next */
.step{display:flex;justify-content:space-between;gap:16px;padding-bottom:8px}
.step a{font-weight:700;text-decoration:none;padding:12px 22px;border-radius:999px;border:2px solid var(--ink)}
.step a:hover{background:var(--ink);color:var(--coat)}

/* The rest of the crew */
.others{padding-top:64px}
.others ul{list-style:none;margin:24px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:32px 20px}
.mini{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;text-decoration:none}
.mini img{width:120px;height:120px;border-radius:50%;background:var(--coat);box-shadow:0 10px 20px rgba(29,51,82,.16);transition:transform .25s ease}
.mini:hover img,.mini:focus-visible img{transform:translateY(-6px) rotate(-2deg)}
.mini .tag{position:relative;margin-top:-20px;font-size:.9rem;padding:4px 12px}
.mini .role{font-size:.9rem;max-width:18ch}

footer{padding:32px 0;font-size:.95rem}
footer .wrap{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}
footer a{font-weight:700;text-decoration-color:var(--fizz);text-decoration-thickness:2px;text-underline-offset:4px}
footer a:hover{color:var(--tabby)}

@media (max-width:820px){
  .hero{padding:32px 0 56px}
  .hero .wrap{grid-template-columns:1fr;gap:32px;text-align:center}
  .portrait img{max-width:300px}
  .lead{margin:0 auto}
  .bio .wrap{grid-template-columns:1fr}
  section{padding:56px 0}
  .top nav{gap:16px}
  /* Let long tabs ("Dave's Personal Projects") wrap so the whole menu fits */
  .top nav a{white-space:normal;line-height:1.2}
}
@media (max-width:760px){ .top nav a.hide-sm{display:none} .theme-btn{flex-shrink:0} }
@media (max-width:560px){
  .top nav a.hide-sm{display:none}
  .brand span{display:none}
  .top nav{gap:14px}
  .top nav a{font-size:.95rem;white-space:normal;line-height:1.2}
  .bio article{padding:24px 22px 28px}
  .step a{padding:10px 16px;font-size:.95rem}
  .others ul{grid-template-columns:repeat(2,1fr)}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}

body,.top,.hero,.bio article,.step a{transition:background-color .4s ease,color .4s ease,border-color .4s ease}

/* Dark theme: the lab after hours */
html[data-theme="dark"]{color-scheme:dark;--ink:#E6F0FA;--sky:#16304F;--sky-deep:#3F77A8;--tabby:#E8B98C;--card:#16263D}
html[data-theme="dark"] body{background:#0D1726}
html[data-theme="dark"] .theme-btn:hover{background:rgba(255,255,255,.1)}
html[data-theme="dark"] .badge{background:#BBE5FD;color:#0D1726}
html[data-theme="dark"] .step a:hover{background:#BBE5FD;color:#0D1726;border-color:#BBE5FD}
html[data-theme="dark"] .portrait img{border-color:#DCEAF7;box-shadow:0 18px 40px rgba(0,0,0,.45)}
html[data-theme="dark"] .mini img{box-shadow:0 10px 24px rgba(0,0,0,.5)}
html[data-theme="dark"] .tag{background:#05080F;border-color:#4A5568}

/* Page-to-page fade (browsers without View Transitions just load normally) */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.35s}
@media (prefers-reduced-motion:reduce){ @view-transition{navigation:none} }

/* Small phones: tighten the top menu so every tab fits */
@media (max-width:420px){.top .wrap{gap:10px;padding-left:16px;padding-right:16px}.top nav{gap:10px}.top nav>a,.top nav .menu-btn{font-size:.88rem}}
@media (max-width:360px){.top .wrap{gap:8px;padding-left:12px;padding-right:12px}.top nav{gap:8px}.top nav>a,.top nav .menu-btn{font-size:.82rem}.theme-btn{width:34px;height:34px}.theme-btn svg{width:18px;height:18px}}
