/* ==========================================================================
   CINV — Ficha de perfil
   Fuente: cinv-ficha-plantilla.html.
   ========================================================================== */

.profile { padding: var(--sp-6) 0 96px; }
.profile-topline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--sp-3);
	margin-bottom: 32px;
}
.profile-topline .lang-switch { margin-bottom: 0; }

.h2 { font-size: 1.3rem; line-height: 1.3; }
/* 16 px y no los 18 del diseño (definido con CINV): con los textos reales, largos,
   el párrafo se veía desproporcionado frente a listas y publicaciones (16 px). */
.body-text p { font-size: 16px; color: var(--text-body); text-align: justify; margin-bottom: 14px; }
.body-text p:last-child { margin-bottom: 0; }

/* ── Identidad ───────────────────────────────────────────────────────────── */

.profile-id { padding: 32px; overflow: visible; }
.profile-id__top { display: flex; gap: var(--sp-6); align-items: flex-start; }
.profile-id__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-5); }
.profile-id__links { display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-2); flex-shrink: 0; }
.profile-id__body { flex: 1; min-width: 0; }
.profile-id .h1 { font-size: 2.4rem; line-height: 1.15; margin-bottom: var(--sp-2); }

.profile-photo {
	flex-shrink: 0;
	width: 216px; height: 232px;
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
	background: linear-gradient(135deg, #16233a, #0f1a2b);
	overflow: hidden;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }

.profile-badges { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.profile-role { font-size: 18px; color: var(--text); margin-bottom: var(--sp-3); }
.profile-inst { color: var(--text); margin-bottom: var(--sp-4); }
.profile-nodes .mono-label { display: block; margin-bottom: 12px; letter-spacing: .12em; }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tag-list .badge { font-size: 11px; padding: 6px 14px; }

.profile-contact {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-5) 56px;
	margin-top: 32px;
	padding-top: var(--sp-5);
	border-top: 1px solid var(--border);
}
.contact-item small { display: block; font-size: 12px; color: var(--text-dim); }
.contact-item p { font-size: 13.5px; line-height: 1.5; }
.contact-item .is-mono { font-size: 12.5px; color: var(--text); letter-spacing: 0; }
.contact-item a { text-decoration: none; }

/* ── Pestañas ────────────────────────────────────────────────────────────── */

.profile-tabs {
	display: flex;
	gap: 32px;
	margin-top: 56px;
	border-bottom: 1px solid var(--border);
	overflow-x: auto;
}
.profile-tab {
	padding: 0 0 14px;
	border-bottom: 1px solid transparent;
	margin-bottom: -1px;
	color: var(--text-dim);
	font-family: var(--mono);
	font-size: 13px;
	white-space: nowrap;
	transition: color var(--transicion);
}
.profile-tab:hover { color: var(--text); }
.profile-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

.profile-panel { padding-top: var(--sp-6); }
.profile-panel[hidden] { display: none; }

/* ── Trayectoria ─────────────────────────────────────────────────────────── */

.profile-bio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: var(--sp-5); align-items: start; }
.profile-bio-grid--sin-hitos { grid-template-columns: 1fr; }
.profile-aside { display: flex; flex-direction: column; gap: var(--sp-5); }

.profile-timeline-box { padding: 32px; }
.profile-timeline-box .mono-label { display: block; margin-bottom: var(--sp-5); }

.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.timeline li { position: relative; margin-bottom: 32px; }
.timeline li:last-child { margin-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); }
/* Verde = vigente. Lo anterior va en gris. */
.timeline li.is-current::before { background: var(--accent); }
.timeline time { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.timeline li.is-current time { color: var(--accent); }
.timeline h3 { font-size: 1.05rem; font-weight: 600; margin: var(--sp-1) 0 2px; }
.timeline p { font-size: 14px; color: var(--text-dim); }

.info-box { padding: var(--sp-5); }
.info-box > .mono-label { display: block; margin-bottom: 16px; }
.award { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.award:last-child { border-bottom: none; padding-bottom: 0; }
.award p { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.award span { font-size: 12.5px; color: var(--text-dim); }
.collab li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.collab li:last-child { border-bottom: none; padding-bottom: 0; }
.collab p { font-size: 13.5px; font-weight: 600; }
.collab span { font-size: 12.5px; color: var(--text-dim); }

/* ── Paneles de contenido ────────────────────────────────────────────────── */

.panel-card { padding: 32px; }
.panel-card .h2 { color: var(--accent); margin-bottom: 18px; }

.research-line { margin-top: 28px; padding-top: var(--sp-5); border-top: 1px solid var(--border); }
.research-line + .research-line { margin-top: var(--sp-4); }
.research-line h3 { font-size: 1.05rem; margin-bottom: 10px; }
.line-list li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--border); font-size: 16px; color: var(--text-body); }
.line-list li:last-child { border-bottom: none; }
.line-list li::before { content: ""; position: absolute; left: 0; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.pub-list li { padding: 18px 0; border-bottom: 1px solid var(--border); }
.pub-list li:first-child { padding-top: 0; }
.pub-list li:last-child { border-bottom: none; padding-bottom: 0; }
.pub-title { font-size: 16px; font-weight: 600; line-height: 1.45; margin-bottom: 6px; }
.pub-authors { font-size: 13.5px; color: var(--text-dim); margin-bottom: 6px; }
.pub-meta { display: flex; flex-wrap: wrap; gap: var(--sp-2) 16px; align-items: center; font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); }
.pub-meta a { color: var(--accent-secondary); text-decoration: none; }

.grant-list li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--sp-4); padding: 18px 0; border-bottom: 1px solid var(--border); }
.grant-list li:first-child { padding-top: 0; }
.grant-list li:last-child { border-bottom: none; padding-bottom: 0; }
.grant-list time { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.grant-list h3 { font-size: 15.5px; font-weight: 600; line-height: 1.45; margin-bottom: var(--sp-2); }
.grant-meta { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); }

.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.team-group .mono-label { display: block; margin-bottom: 14px; }
.team-group li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.team-group li:last-child { border-bottom: none; }
.team-group p { font-size: 14.5px; font-weight: 600; }
.team-group span { font-size: 13px; color: var(--text-dim); }

/* ── Responsive (del HTML de diseño) ─────────────────────────────────────── */

@media (max-width: 1024px) {
	.profile-bio-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
	.profile-id, .profile-timeline-box, .panel-card { padding: 22px; }
	.profile-id__head { flex-direction: column; gap: 16px; }
	.profile-id__links { align-items: flex-start; }
	.profile-id__top { flex-direction: column; gap: var(--sp-5); }
	.profile-photo { width: 100%; max-width: 216px; }
	.profile-id .h1 { font-size: 2rem; }
	.grant-list li { grid-template-columns: 1fr; gap: 6px; }
	.team-grid { grid-template-columns: 1fr; }
}
