/* Faculty directory + profile. Tokens and shared classes come from site.css. */

/* ---------- Directory ---------- */
.fdir{padding-block:22px 72px}
.fbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding-bottom:16px}
.fbar .lbl{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--sub);margin-right:4px}
.fgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(212px,1fr));gap:22px 18px}
.fcard{position:relative;background:var(--card);border:1px solid var(--rule);border-radius:12px;overflow:hidden;display:flex;flex-direction:column;transition:border-color .18s,box-shadow .18s}
.fcard:hover{border-color:var(--ink);box-shadow:0 14px 30px -20px rgba(15,52,96,.55)}
.fcard:has(h2 a:focus-visible){outline:3px solid var(--pen);outline-offset:2px}
.fcard .ph{aspect-ratio:5/6;background:var(--tint);overflow:hidden}
.fcard .ph img{width:100%;height:100%;object-fit:cover;object-position:50% 12%;transition:transform .35s ease}
.fcard:hover .ph img{transform:scale(1.03)}
.ini{display:grid;place-items:center;width:100%;height:100%;background:var(--tint);color:var(--ink);
  background-image:repeating-linear-gradient(0deg,transparent 0 27px,var(--rule) 27px 28px)}
.ini span{font-family:var(--f-num);font-weight:800;font-size:68px;line-height:1;letter-spacing:.02em}
.fcard .bd{padding:14px 16px 16px;display:flex;flex-direction:column;gap:8px;flex:1}
.fcard h2{font-size:17px;font-weight:800;line-height:1.25;letter-spacing:-.01em}
.fcard h2 a{color:var(--text);text-decoration:none}
.fcard h2 a::after{content:"";position:absolute;inset:0}
.fcard h2 a:focus-visible{outline:none}
.fcard:hover h2 a{color:var(--ink)}
.fcard .subj{margin:0;font-size:14px;color:var(--sub);line-height:1.4}
.fcard .subj span{font-weight:700;color:var(--ink)}
.lvls{display:flex;gap:6px;flex-wrap:wrap}
.lvls span{font-size:12px;font-weight:700;padding:2px 8px;border:1.5px solid var(--ink);color:var(--ink);border-radius:5px;white-space:nowrap}
.fcard .n{margin:auto 0 0;padding-top:10px;border-top:1px dashed var(--rule);display:flex;align-items:center;gap:6px;font-size:14px;font-weight:700;color:var(--ink)}
.fcard .n .num{font-size:24px;line-height:1;color:var(--text)}
.fcard .n .ico{margin-left:auto;width:18px;height:18px}

/* ---------- Profile ---------- */
.prof{display:grid;grid-template-columns:240px minmax(0,1fr);grid-template-areas:"ph name" "ph body";grid-template-rows:auto 1fr;column-gap:36px;padding-block:18px 36px}
.prof-ph{grid-area:ph;align-self:start;aspect-ratio:5/6;border-radius:12px;overflow:hidden;background:var(--tint)}
.prof-ph img{width:100%;height:100%;object-fit:cover;object-position:50% 12%}
.prof-ph .ini span{font-size:104px}
.prof-name{grid-area:name;min-width:0}
.prof-name h1{margin:0 0 4px}
.prof .role{margin:0;font-size:17px;font-weight:700;color:var(--sub)}
.prof-body{grid-area:body;min-width:0}
.prof .bio{margin:14px 0 22px;font-size:17px;max-width:62ch;color:var(--text)}
.fstats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 22px;border-top:1.5px solid var(--ink)}
.fstats>div{padding:14px 16px 4px 0;min-width:0}
.fstats>div+div{padding-left:16px;border-left:1px solid var(--rule)}
.fstats dt{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--sub);margin-bottom:4px}
.fstats dd{margin:0;font-weight:700;font-size:15.5px;line-height:1.35}
.fstats dd .num{font-size:26px;line-height:1;color:var(--ink)}
.fstats dd small{display:block;font-weight:500;color:var(--sub);font-size:13px}
.prof .acts,.nf-acts{display:flex;gap:10px;flex-wrap:wrap}
.nf-acts{padding-bottom:40px}
.fbatches .levels{margin-bottom:22px}

@media (max-width:900px){
  .fstats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fstats>div:nth-child(3){padding-left:0;border-left:0}
  .fstats>div:nth-child(n+3){border-top:1px solid var(--rule)}
}
@media (max-width:640px){
  .fbar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-inline:calc(-1 * max(16px,env(safe-area-inset-left,0px)));padding-inline:max(16px,env(safe-area-inset-left,0px))}
  .fbar::-webkit-scrollbar{display:none}
  .fbar .chip{flex:none}
  .fgrid{grid-template-columns:1fr;gap:12px}
  .fcard{flex-direction:row}
  .fcard .ph{width:104px;flex:none;aspect-ratio:auto;min-height:124px}
  .fcard .ini span{font-size:40px}
  .fcard .bd{padding:12px 14px;gap:6px}
  .fcard h2{font-size:16px}
  .fcard .n{padding-top:6px;min-height:32px}
  .prof{grid-template-columns:112px minmax(0,1fr);grid-template-areas:"ph name" "body body";column-gap:16px;padding-bottom:28px}
  .prof-name{align-self:center}
  .prof-name h1{font-size:26px}
  .prof .role{font-size:15px}
  .prof-ph .ini span{font-size:52px}
  .prof .bio{font-size:16px;margin-top:16px}
  .prof .acts .btn{flex:1 1 auto}
}
@media (prefers-reduced-motion:reduce){.fcard .ph img{transition:none}.fcard:hover .ph img{transform:none}}
.fbar .chip[hidden]{display:none}
.fbar .chip.more{border-style:dashed;color:var(--ink)}

/* ---------- Faculty card v2 ---------- */
.fgrid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:20px}
.fc2{border:0;border-radius:20px;box-shadow:var(--elev-1);background:var(--card);transition:box-shadow .2s,transform .2s}
.fc2:hover{border:0;box-shadow:var(--elev-2)}
@media (hover:hover) and (prefers-reduced-motion:no-preference){.fc2:hover{transform:translateY(-3px)}}
.fc2 .ph{position:relative;aspect-ratio:auto;height:210px;margin:8px 8px 0;border-radius:14px;background:var(--hb);display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
.fc2 .ph::before{content:"";position:absolute;left:50%;bottom:-70px;width:240px;height:240px;margin-left:-120px;border-radius:50%;background:color-mix(in srgb,var(--hi) 14%,transparent)}
.fc2 .ph img{position:relative;width:auto;height:94%;max-width:96%;object-fit:contain;object-position:bottom;background:none!important;transform:none!important;filter:drop-shadow(0 10px 14px rgba(0,0,0,.18));transition:transform .3s}
@media (prefers-reduced-motion:no-preference){.fc2:hover .ph img{transform:scale(1.04)!important;transform-origin:bottom}}
.fc2-ini{position:relative;align-self:center;width:96px;height:96px;border-radius:50%;background:var(--card);color:var(--hi);display:grid;place-items:center;font-size:32px;font-weight:800;letter-spacing:-.02em}
.fc2-n{position:absolute;top:10px;left:10px;z-index:1;background:var(--card);color:var(--text);font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;box-shadow:0 2px 6px rgba(0,0,0,.08)}
.fc2-n b{font-weight:800;color:var(--hi)}
.fc2 .bd{padding:14px 16px 16px;gap:4px}
.fc2 h2{font-size:17px;font-weight:800;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fc2-s{margin:0;font-size:14px;font-weight:600;color:var(--hi);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fc2-s span{font-weight:500;color:var(--sub)}
.fc2-l{margin:0;font-size:13px;color:var(--sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fc2-go{margin-top:12px;display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-radius:12px;background:var(--paper);font-size:14px;font-weight:700;color:var(--text);transition:background-color .2s,color .2s}
.fc2-go .ico{width:16px;height:16px}
.fc2:hover .fc2-go{background:var(--cta);color:#fff}
@media (max-width:640px){.fgrid{grid-template-columns:1fr 1fr;gap:12px}.fc2 .ph{height:160px}.fc2 h2{font-size:15px}.fc2-go{padding:8px 10px;font-size:13px}}
@media (max-width:640px){
  .fgrid .fc2{flex-direction:column;display:flex}
  .fgrid .fc2 .ph{width:auto;height:150px;flex:none;margin:6px 6px 0}
  .fgrid .fc2 .bd{padding:10px 12px 12px}
  .fc2-n{font-size:11px;padding:3px 8px;top:6px;left:6px}
  .fc2-s{font-size:13px}.fc2-l{font-size:12px}
  .fc2-go{margin-top:8px}
}

/* ---------- Profile header v2 ---------- */
.pf{background:var(--card);padding-block:18px 28px;box-shadow:0 1px 0 var(--rule)}
.pf-card{margin-top:14px;position:relative;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.8fr);gap:24px;align-items:end;background:var(--hb);border-radius:26px;padding:34px 0 0 36px;overflow:hidden}
.pf-card::after{content:"";position:absolute;right:-90px;top:-90px;width:380px;height:380px;border-radius:50%;background:color-mix(in srgb,var(--hi) 10%,transparent)}
.pf-copy{position:relative;z-index:1;padding-bottom:34px;display:flex;flex-direction:column;gap:12px;min-width:0}
.pf-role{align-self:flex-start;font-size:13px;font-weight:700;color:var(--hi);background:var(--card);padding:5px 12px;border-radius:999px}
.pf h1{font-size:clamp(32px,4vw,52px);font-weight:800;letter-spacing:-.04em;line-height:1.02;color:var(--text);margin:0}
.pf-bio{margin:0;font-size:16.5px;line-height:1.6;color:var(--text);opacity:.85;max-width:56ch}
.pf-subj{display:flex;flex-wrap:wrap;gap:8px}
.pf-subj a{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:0 6px 0 14px;border-radius:999px;background:var(--card);color:var(--text);text-decoration:none;font-size:13.5px;font-weight:600;box-shadow:var(--elev-1)}
.pf-subj a small{min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:var(--hb);color:var(--hi);font-size:12px;font-weight:800;display:grid;place-items:center}
.pf-subj a:hover{box-shadow:var(--elev-2)}
.pf-acts{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.pf-acts .btn-line{background:var(--card)}
.pf-art{position:relative;z-index:1;height:360px;display:flex;align-items:flex-end;justify-content:center}
.pf-art img{height:100%;width:auto;max-width:100%;object-fit:contain;object-position:bottom;background:none!important;filter:drop-shadow(0 20px 26px rgba(0,0,0,.2))}
.pf-ini{align-self:center;width:180px;height:180px;border-radius:50%;background:var(--card);color:var(--hi);display:grid;place-items:center;font-size:60px;font-weight:800}
.pf-stats{margin:16px 0 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.pf-stats>div{background:var(--paper);border-radius:16px;padding:16px 18px;display:flex;flex-direction:column;min-width:0}
.pf-stats dt{font-size:12.5px;font-weight:600;color:var(--sub)}
.pf-stats dd{margin:2px 0 0;font-size:26px;font-weight:800;letter-spacing:-.03em;color:var(--text);line-height:1.15}
.pf-stats small{font-size:12.5px;color:var(--sub);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:900px){.pf-card{grid-template-columns:1fr 200px;padding:24px 0 0 22px}.pf-art{height:260px}.pf-stats{grid-template-columns:1fr 1fr}}
@media (max-width:640px){.pf-card{grid-template-columns:1fr;padding:20px 18px 0}.pf-copy{padding-bottom:0}.pf-art{height:230px}.pf h1{font-size:30px}.pf-bio{font-size:15px}.pf-stats dd{font-size:22px}}
@media (max-width:640px){.pf-subj a{min-height:44px}}
