/* Referentes: cabecera con órbita de avatares, filtros ES/EN + temas, tarjetas de perfil */

/* ---------- Cabecera ---------- */
html body .page-hero.ref-hero { --orb:min(640px,92vw); max-width:none; margin:0; padding:130px 24px 56px; min-height:min(78vh,720px); overflow:visible; isolation:isolate; }
html body .page-hero.ref-hero::before { content:''; position:absolute; left:50%; top:50%; width:calc(var(--orb) * 1.5); height:calc(var(--orb) * 1.5); border:1px solid rgba(247,147,26,.08); border-radius:50%; transform:translate(-50%,-50%); pointer-events:none; z-index:-1; animation:refOrbit 70s linear infinite reverse; }
@keyframes refOrbit { to { transform:translate(-50%,-50%) rotate(360deg); } }
.page-hero h1 { background:linear-gradient(180deg,#fff 30%,#F7931A 130%); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.page-hero h1 span { -webkit-text-fill-color:#F7931A; }

html body .page-hero.ref-hero > .ref-orbit { position:absolute; left:50%; top:50%; width:var(--orb); height:var(--orb); margin:calc(var(--orb) / -2) 0 0 calc(var(--orb) / -2); z-index:-1; pointer-events:none; border:1px dashed rgba(247,147,26,.22); border-radius:50%; animation:refSpin 90s linear infinite; opacity:1; transform:none; }
.ref-orbit-dot { position:absolute; left:50%; top:50%; width:52px; height:52px; margin:-26px 0 0 -26px; border-radius:50%; padding:2px; background:conic-gradient(from 140deg,#F7931A,#ffcf8a,#F7931A 60%,#7a4709); transform:rotate(var(--a)) translateY(calc(var(--orb) / -2)) rotate(calc(var(--a) * -1)); opacity:.5; animation:refFloat 6s ease-in-out infinite; animation-delay:calc(var(--i) * -.45s); }
.ref-orbit-dot img { width:100%; height:100%; border-radius:50%; object-fit:cover; object-position:center 20%; display:block; border:2px solid #000; filter:grayscale(.3); animation:refCounter 90s linear infinite; }
@keyframes refSpin { to { transform:rotate(360deg); } }
@keyframes refCounter { to { rotate:-360deg; } }
@keyframes refFloat { 50% { margin-top:-32px; } }

.ref-stats { list-style:none; display:flex; justify-content:center; gap:12px; margin:36px 0 0; padding:0; flex-wrap:wrap; }
.ref-stats li { display:flex; flex-direction:column; align-items:center; min-width:96px; padding:12px 20px; border:1px solid var(--border); border-radius:16px; background:rgba(0,0,0,.55); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.ref-stats b { font-family:'JetBrains Mono',monospace; font-weight:600; font-size:1.7rem; line-height:1.1; color:#F7931A; }
.ref-stats span { font-size:.72rem; letter-spacing:.14em; text-transform:uppercase; color:var(--text-secondary); margin-top:4px; }

/* ---------- Filtros ---------- */
.ref-filters { max-width:1100px; display:flex; flex-direction:column; align-items:center; gap:14px; margin-bottom:32px; }
.ref-chips { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.ref-chip { font:inherit; font-size:.85rem; font-weight:600; padding:9px 18px; border-radius:999px; border:1px solid var(--border); background:rgba(255,255,255,.03); color:var(--text-secondary); cursor:pointer; transition:background .25s, color .25s, border-color .25s, transform .2s; }
.ref-chip:hover { color:var(--text-primary); border-color:rgba(247,147,26,.5); }
.ref-chip:active { transform:scale(.96); }
.ref-chip:focus-visible, .ref-more:focus-visible { outline:2px solid #F7931A; outline-offset:2px; }
.ref-chip.active { background:#F7931A; border-color:#F7931A; color:#000; }
.ref-chips-topics .ref-chip { font-size:.78rem; padding:7px 14px; font-weight:500; }
.ref-chips-topics .ref-chip.active { background:rgba(247,147,26,.16); color:#F7931A; border-color:#F7931A; }
.ref-tools { width:100%; display:flex; flex-direction:column; align-items:center; gap:8px; margin-top:6px; }
.ref-search { width:100%; max-width:420px; background:rgba(255,255,255,.04); border:1px solid var(--border); border-radius:999px; padding:12px 20px; color:var(--text-primary); font:inherit; font-size:.95rem; transition:border-color .25s, box-shadow .25s; }
.ref-search:focus { outline:none; border-color:var(--btc-orange); box-shadow:0 0 0 3px rgba(247,147,26,.18); }
.ref-count { font-size:.78rem; color:var(--text-secondary); letter-spacing:1px; min-height:1em; }

/* ---------- Cuadrícula y tarjetas ---------- */
.referentes-section.tab-panel { display:grid; grid-template-columns:repeat(3,1fr); gap:22px; max-width:1240px; margin:0 auto 50px; padding:0 40px; align-items:start; position:relative; z-index:1; }
.referentes-section[hidden], .referentes-section .ref-card[hidden] { display:none; }
.referentes-section .ref-card { --mx:50%; --my:0%; position:relative; display:flex; flex-direction:column; gap:14px; margin:0; padding:76px 24px 24px; border-radius:24px; overflow:hidden; background:radial-gradient(360px circle at var(--mx) var(--my),rgba(247,147,26,.13),transparent 60%),linear-gradient(180deg,rgba(247,147,26,.10) 0,rgba(247,147,26,0) 96px),var(--bg-card); border:1px solid var(--border); transition:border-color .3s, transform .3s, box-shadow .3s; }
.referentes-section .ref-card::before { display:block; content:''; position:absolute; inset:0 0 auto 0; width:auto; height:96px; background:repeating-linear-gradient(115deg,rgba(247,147,26,.07) 0 2px,transparent 2px 14px); opacity:1; -webkit-mask-image:linear-gradient(180deg,#000,transparent); mask-image:linear-gradient(180deg,#000,transparent); pointer-events:none; }
.referentes-section .ref-card:hover { transform:translateY(-5px); border-color:rgba(247,147,26,.45); box-shadow:0 22px 50px rgba(0,0,0,.55); }
.referentes-section .ref-card::after { content:attr(data-n); position:absolute; right:18px; top:10px; font-family:'JetBrains Mono',monospace; font-weight:600; font-size:2.6rem; line-height:1; color:transparent; -webkit-text-stroke:1px rgba(247,147,26,.35); pointer-events:none; }
.ref-lang { position:absolute; left:24px; top:18px; font-family:'JetBrains Mono',monospace; font-size:.7rem; font-weight:600; letter-spacing:.12em; color:#F7931A; border:1px solid rgba(247,147,26,.4); border-radius:999px; padding:3px 9px; background:rgba(0,0,0,.5); }

.referentes-section .ref-photo { position:absolute; left:24px; top:46px; width:84px; height:84px; border-radius:50%; padding:3px; overflow:visible; background:conic-gradient(from 140deg,#F7931A,#ffcf8a,#F7931A 60%,#7a4709); box-shadow:0 0 0 6px var(--bg-card),0 10px 28px rgba(0,0,0,.55); z-index:1; display:flex; align-items:center; justify-content:center; transition:transform .4s; }
.referentes-section .ref-card:hover .ref-photo { transform:scale(1.06) rotate(-3deg); }
.referentes-section .ref-photo img { width:100%; height:100%; border-radius:50%; object-fit:cover; object-position:center 20%; border:3px solid var(--bg-card); filter:none; }
.ref-photo.no-img { font-weight:800; font-size:1.5rem; color:#000; }
.referentes-section .ref-card { padding-top:140px; }
.referentes-section .ref-info { gap:10px; min-width:0; }
.referentes-section .ref-number { font-size:.68rem; color:var(--text-secondary); letter-spacing:.14em; }
.referentes-section .ref-name { font-size:1.35rem; letter-spacing:-.5px; overflow-wrap:anywhere; }
.referentes-section .ref-role { font-size:.84rem; line-height:1.4; color:#F7931A; font-weight:600; }
.ref-tags { list-style:none; display:flex; flex-wrap:wrap; gap:6px; margin:0; padding:0; }
.ref-tags li { font-size:.7rem; padding:3px 10px; border-radius:999px; background:rgba(255,255,255,.05); border:1px solid var(--border); color:var(--text-secondary); }
.ref-why { margin-top:6px; font-size:.7rem; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:var(--text-primary); display:flex; align-items:center; gap:8px; }
.ref-why::before { content:''; width:18px; height:2px; background:#F7931A; }
.referentes-section .ref-description { font-size:.92rem; line-height:1.7; color:#b5b5b5; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.ref-card.open .ref-description { display:block; overflow:visible; }
.ref-more { align-self:flex-start; background:none; border:0; padding:2px 0; font:inherit; font-size:.8rem; font-weight:600; color:#F7931A; cursor:pointer; }
.ref-more:hover { text-decoration:underline; }
.ref-more .m-less, .ref-more[aria-expanded="true"] .m-more { display:none; }
.ref-more[aria-expanded="true"] .m-less { display:inline; }
.referentes-section .ref-socials { margin-top:auto; padding-top:6px; gap:8px; }
.referentes-section .social-link { padding:7px 13px; font-size:.78rem; }
.referentes-section .social-link svg { width:14px; height:14px; fill:currentColor; }
.ref-empty { text-align:center; color:var(--text-secondary); padding:40px 20px; }

@media (max-width:1020px) { .referentes-section.tab-panel { grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px) {
    html body .page-hero.ref-hero { --orb:128vw; padding:104px 20px 36px; min-height:0; overflow:hidden; }
    .referentes-section.tab-panel { grid-template-columns:1fr; padding:0 20px; }
    .ref-filters { padding:0 20px; }
    .ref-chips { justify-content:flex-start; flex-wrap:nowrap; overflow-x:auto; max-width:100%; padding-bottom:4px; scrollbar-width:none; }
    .ref-chips::-webkit-scrollbar { display:none; }
    .ref-chip { flex:none; }
    .ref-stats li { min-width:84px; padding:10px 14px; }
    .ref-orbit-dot { width:40px; height:40px; margin:-20px 0 0 -20px; }
}
@media (prefers-reduced-motion:reduce) {
    .page-hero.ref-hero::before, .ref-orbit, .ref-orbit-dot, .ref-orbit-dot img { animation:none; }
    .referentes-section .ref-card, .referentes-section .ref-photo { transition:none; }
    .referentes-section .ref-card:hover, .referentes-section .ref-card:hover .ref-photo { transform:none; }
}
