/* =========================================================
   HUMANBOTS — TEAM (tm-*)
   /team/ and /team/<slug>/, rendered by public/admin/lib/team-render.js
   (published from Admin → Team Directory). Loads after global.css and
   service.css: labels, titles, hero, buttons and section rhythm come from
   service.css (svc-*). Everything is scoped under .tm.

   1. Base, breadcrumbs      4. Profile hero
   2. Hero                   5. Profile body: prose, chips, timeline, aside
   3. Cards and groups       6. Story, related, responsive, motion
========================================================= */

/* ---------- 1. BASE, BREADCRUMBS ---------- */
.tm{--tm-card:linear-gradient(160deg,#0e0e0e,#050505);--tm-photo:#0b0b0b}
.tm :where(ul,ol,dl,dd,figure){margin:0;padding:0}
.tm :where(ul,ol){list-style:none}
.tm svg{flex:none;width:16px;height:16px}
.tm-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.tm .svc-btn{text-decoration:none}
.tm-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:0 10px;margin-bottom:24px;color:#666;font-size:12px}
.tm-crumbs a{color:#999;transition:color .2s ease}
.tm-crumbs a:hover{color:#fff}
.tm-crumbs span[aria-hidden]{color:#3a3a3a}
.tm-crumbs [aria-current]{color:#777}

/* ---------- 2. HERO ---------- */
.tm-hero{padding:150px 0 90px}
.tm-hero .svc-container{position:relative;z-index:1}
.tm-hero .svc-h1{max-width:900px;font-size:clamp(44px,6vw,84px)}

/* ---------- 3. CARDS AND GROUPS ---------- */
.tm-lead .svc-title,.tm-team .svc-title,.tm-related .svc-title{margin-bottom:48px}
.tm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px}
.tm-grid--lead{grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:22px}
.tm-card a{display:flex;flex-direction:column;height:100%;border:1px solid var(--line);border-radius:24px;overflow:hidden;background:var(--tm-card);color:inherit;text-decoration:none;
  transition:border-color .35s ease,transform .5s var(--ease),box-shadow .5s var(--ease)}
.tm-card a:hover,.tm-card a:focus-visible{border-color:rgba(255,77,22,.38);transform:translateY(-4px);box-shadow:0 30px 70px rgba(0,0,0,.55)}
.tm-card a:focus-visible{outline:2px solid var(--orange);outline-offset:3px}
.tm-photo{position:relative;display:block;aspect-ratio:4/5;overflow:hidden;background:var(--tm-photo)}
.tm-card--lead .tm-photo{aspect-ratio:5/4}
.tm-photo picture,.tm-photo img{display:block;width:100%;height:100%}
.tm-photo img{object-fit:cover;object-position:50% 22%;filter:grayscale(.15) contrast(1.02);transform:scale(1.01);transition:transform 1.2s var(--ease),filter .6s ease}
.tm-card a:hover .tm-photo img{transform:scale(1.05);filter:none}
.tm-photo::after{content:"";position:absolute;inset:auto 0 0;height:45%;background:linear-gradient(180deg,transparent,rgba(5,5,5,.85));pointer-events:none}
.tm-placeholder{display:grid;place-items:center;width:100%;height:100%;aspect-ratio:inherit;
  background:radial-gradient(circle at 70% 20%,rgba(255,77,22,.16),transparent 55%),linear-gradient(160deg,#141414,#060606)}
.tm-placeholder span{color:rgba(255,255,255,.82);font-family:var(--font-display);font-size:clamp(40px,6vw,72px);font-weight:600;letter-spacing:-.04em}
.tm-card-body{display:flex;flex:1;flex-direction:column;gap:6px;padding:22px 24px 24px}
.tm-card--lead .tm-card-body{padding:28px 30px 30px}
.tm-tag{align-self:flex-start;margin-bottom:6px;padding:4px 10px;border:1px solid rgba(255,77,22,.35);border-radius:999px;color:var(--orange);font-size:10px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.tm-name{color:#fff;font-family:var(--font-display);font-size:22px;font-weight:650;letter-spacing:-.03em;line-height:1.15}
.tm-card--lead .tm-name{font-size:clamp(26px,2.6vw,34px)}
.tm-role{color:#a3a3a3;font-size:14px}
.tm-short{margin-top:8px;color:var(--dim);font-size:14.5px;line-height:1.65}
.tm-cta{display:inline-flex;align-items:center;gap:8px;margin-top:auto;padding-top:18px;color:#fff;font-size:13px;font-weight:600}
.tm-cta svg{transition:transform .35s var(--ease)}
.tm-card a:hover .tm-cta svg{transform:translateX(4px)}
.tm-group+.tm-group{margin-top:56px}
.tm-group-title{margin-bottom:20px;color:#d6d6d6;font-size:15px;font-weight:600;letter-spacing:-.01em}

/* ---------- 4. PROFILE HERO ---------- */
.tm-hero--profile{padding:140px 0 70px}
.tm-preview{margin-bottom:22px;padding:12px 16px;border:1px solid rgba(255,77,22,.4);border-radius:14px;background:rgba(255,77,22,.08);color:#ffd2c2;font-size:13px}
.tm-profile-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:64px;align-items:center}
.tm-portrait{position:relative;aspect-ratio:4/5;border:1px solid var(--line);border-radius:28px;overflow:hidden;background:var(--tm-photo);box-shadow:0 40px 100px rgba(0,0,0,.55)}
.tm-portrait picture,.tm-portrait img{display:block;width:100%;height:100%}
.tm-portrait img{object-fit:cover;object-position:50% 20%}
.tm-portrait .tm-placeholder{aspect-ratio:4/5}
.tm-h1{margin-bottom:10px}
.tm-title{color:#d0d0d0;font-size:clamp(18px,1.6vw,22px);letter-spacing:-.01em}
.tm-headline{margin:26px 0 18px;color:#fff;font-family:var(--font-display);font-size:clamp(22px,2.2vw,30px);font-weight:600;letter-spacing:-.03em;line-height:1.2}

/* ---------- 5. PROFILE BODY ---------- */
.tm-profile-body{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:72px;align-items:start}
.tm-block+.tm-block{margin-top:64px}
.tm-block-title{margin-bottom:22px;color:#fff;font-size:clamp(22px,2vw,28px);font-weight:650;letter-spacing:-.035em}
.tm-prose{color:var(--text);font-size:16.5px;line-height:1.8}
.tm-prose p+p,.tm-prose p+ul,.tm-prose ul+p{margin-top:16px}
.tm-prose h3,.tm-prose h4{margin:28px 0 10px;color:#fff;font-size:18px;font-weight:600}
.tm-prose ul{list-style:disc;padding-left:20px}
.tm-prose a{color:#fff;text-decoration:underline;text-decoration-color:rgba(255,77,22,.6);text-underline-offset:3px}
.tm-chips{display:flex;flex-wrap:wrap;gap:8px}
.tm-chips li{padding:9px 15px;border:1px solid var(--line);border-radius:999px;background:#0a0a0a;color:#e5e5e5;font-size:13.5px}
.tm-chips--quiet li{color:#a3a3a3;font-size:12.5px}
.tm-timeline{position:relative;display:grid;gap:4px;padding-left:28px}
.tm-timeline::before{content:"";position:absolute;left:5px;top:8px;bottom:8px;width:1px;background:linear-gradient(180deg,var(--orange),#222 30%,#1a1a1a)}
.tm-timeline li{position:relative;padding:14px 0 22px}
.tm-dot{position:absolute;left:-28px;top:20px;width:11px;height:11px;border:1px solid #3a3a3a;border-radius:50%;background:#000}
.tm-timeline li.is-current .tm-dot{border-color:var(--orange);background:var(--orange);box-shadow:0 0 0 5px rgba(255,77,22,.14)}
.tm-exp-head{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.tm-exp-head h3{color:#fff;font-size:18px;font-weight:600;letter-spacing:-.02em}
.tm-now{padding:3px 9px;border-radius:999px;background:rgba(255,77,22,.12);color:var(--orange);font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.tm-exp-org{margin-top:4px;color:#a3a3a3;font-size:14.5px}
.tm-exp-org:empty{display:none}
.tm-exp-dates{margin-top:6px;color:#6d6d6d}
.tm-exp-desc{margin-top:10px;color:var(--text);font-size:15px;line-height:1.7}
.tm-exp-list{margin-top:10px;display:grid;gap:6px}
.tm-exp-list li{position:relative;padding:0 0 0 16px;color:var(--text);font-size:14.5px}
.tm-exp-list li::before{content:"";position:absolute;left:0;top:.7em;width:6px;height:1px;background:var(--orange)}
.tm-list{display:grid;gap:10px}
.tm-list li{padding:14px 18px;border:1px solid var(--line);border-radius:16px;color:#d6d6d6;font-size:15px}
.tm-list a{color:#fff}
.tm-side{position:sticky;top:110px;display:grid;gap:22px;padding:26px;border:1px solid var(--line);border-radius:24px;background:var(--tm-card)}
.tm-facts{display:grid;gap:16px}
.tm-facts dt{color:#6d6d6d;font-size:11px;letter-spacing:.12em;text-transform:uppercase}
.tm-facts dd{margin-top:4px;color:#fff;font-size:15px}
.tm-facts a{color:#fff}
.tm-social{display:grid;gap:8px}
.tm-social a,.tm-side-link{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;color:#e5e5e5;font-size:14px;text-decoration:none;transition:border-color .25s ease,background .25s ease}
.tm-social a:hover,.tm-side-link:hover{border-color:rgba(255,77,22,.45);background:rgba(255,255,255,.02)}

/* ---------- 6. STORY, RELATED, RESPONSIVE, MOTION ---------- */
.tm-story-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:64px;align-items:end}
.tm-story-links p{color:var(--text);font-size:16px;line-height:1.75}
.tm-links{display:grid;margin-top:22px;border-top:1px solid var(--line)}
.tm-links a{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 2px;border-bottom:1px solid var(--line);color:#fff;font-size:16px;text-decoration:none;transition:color .2s ease,padding .35s var(--ease)}
.tm-links a:hover{color:var(--orange);padding-left:8px}
.tm-all{margin-top:36px}

@media (max-width:900px){
  .tm-hero{padding:130px 0 64px}
  .tm-profile-grid,.tm-profile-body,.tm-story-grid{grid-template-columns:1fr;gap:40px}
  .tm-portrait{max-width:440px}
  .tm-side{position:static}
}
@media (max-width:600px){
  .tm-grid{grid-template-columns:1fr}
  .tm-card-body,.tm-card--lead .tm-card-body{padding:20px}
  .tm-block+.tm-block{margin-top:48px}
}
@media (prefers-reduced-motion:reduce){
  .tm-card a,.tm-photo img,.tm-cta svg,.tm-links a{transition:none}
  .tm-card a:hover,.tm-card a:hover .tm-photo img{transform:none}
}
