/* ============================================================
   Hoja de Vida KJIC — Interactiva
   Grupo Ecológico KJIC · Páramo + STEAM
   ============================================================ */
:root {
    --hv-bg: #0b1220;
    --hv-bg-2: #111827;
    --hv-surface: rgba(255, 255, 255, 0.04);
    --hv-surface-2: rgba(255, 255, 255, 0.07);
    --hv-border: rgba(255, 255, 255, 0.08);
    --hv-text: #f1f5f9;
    --hv-muted: #94a3b8;
    --hv-green: #22c55e;
    --hv-green-2: #10b981;
    --hv-blue: #2563eb;
    --hv-cyan: #06b6d4;
    --hv-accent: linear-gradient(135deg, #22c55e 0%, #06b6d4 50%, #2563eb 100%);
    --hv-radius: 18px;
    --hv-radius-sm: 12px;
    --hv-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --hv-nav-w: 260px;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body.hv-body {
    font-family: var(--font-body);
    background: var(--hv-bg);
    color: var(--hv-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.oculto { display: none !important; }

/* ---- Fondo animado ---- */
.hv-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.hv-bg__aurora {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(ellipse 60% 50% at 20% 20%, rgba(34, 197, 94, 0.15), transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 10%, rgba(6, 182, 212, 0.12), transparent 55%),
        radial-gradient(ellipse 45% 35% at 60% 80%, rgba(37, 99, 235, 0.1), transparent 50%);
    animation: hvAurora 18s ease-in-out infinite alternate;
}
.hv-bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black, transparent);
}
@keyframes hvAurora {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-2%, 3%) scale(1.05); }
}

/* ---- Nav lateral ---- */
.hv-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--hv-nav-w);
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    background: rgba(11, 18, 32, 0.85);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--hv-border);
    transition: transform .35s ease;
}
.hv-nav__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}
.hv-nav__logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(34,197,94,.3));
}
.hv-nav__label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--hv-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}
.hv-nav__links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.hv-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--hv-radius-sm);
    color: var(--hv-muted);
    font-size: .92rem;
    font-weight: 500;
    transition: background .2s, color .2s, transform .2s;
}
.hv-nav__link i { width: 18px; text-align: center; font-size: .9rem; }
.hv-nav__link:hover { background: var(--hv-surface); color: var(--hv-text); }
.hv-nav__link--activo {
    background: var(--hv-surface-2);
    color: var(--hv-green);
    box-shadow: inset 3px 0 0 var(--hv-green);
}
.hv-nav__acciones {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--hv-border);
}

.hv-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 110;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(11, 18, 32, 0.9);
    border: 1px solid var(--hv-border);
    backdrop-filter: blur(8px);
    font-size: 1.1rem;
    color: var(--hv-text);
}

/* ---- Main ---- */
.hv-main {
    position: relative;
    z-index: 1;
    margin-left: var(--hv-nav-w);
    max-width: 1100px;
    padding: 40px 48px 80px;
}

/* ---- Botones ---- */
.hv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 99px;
    font-weight: 600;
    font-size: .92rem;
    transition: transform .2s, box-shadow .2s, background .2s;
    white-space: nowrap;
}
.hv-btn:active { transform: scale(.97); }
.hv-btn--primario {
    background: var(--hv-accent);
    color: #fff;
    box-shadow: 0 8px 28px rgba(34, 197, 94, .35);
}
.hv-btn--primario:hover { box-shadow: 0 12px 36px rgba(34, 197, 94, .45); }
.hv-btn--secundario {
    background: var(--hv-surface-2);
    border: 1px solid var(--hv-border);
    color: var(--hv-text);
}
.hv-btn--secundario:hover { background: rgba(255,255,255,.1); }
.hv-btn--ghost {
    background: transparent;
    border: 1px solid var(--hv-border);
    color: var(--hv-muted);
}
.hv-btn--ghost:hover { color: var(--hv-text); border-color: rgba(255,255,255,.2); }
.hv-btn--compacto { padding: 9px 16px; font-size: .85rem; width: 100%; }

/* ---- Hero ---- */
.hv-hero {
    padding-bottom: 48px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--hv-border);
}
.hv-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 99px;
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    font-size: .82rem;
    color: var(--hv-green);
    margin-bottom: 28px;
}
.hv-hero__fila {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.hv-hero__foto-wrap {
    position: relative;
    flex-shrink: 0;
}
.hv-hero__foto-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: var(--hv-accent);
    opacity: .5;
    animation: hvRing 4s ease-in-out infinite;
}
@keyframes hvRing {
    0%, 100% { transform: scale(1); opacity: .5; }
    50% { transform: scale(1.04); opacity: .75; }
}
.hv-hero__foto {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 4px solid var(--hv-bg);
    box-shadow: var(--hv-shadow);
}
.hv-hero__nombre {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 30%, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hv-hero__titulo {
    font-size: 1.05rem;
    color: var(--hv-muted);
    max-width: 560px;
    margin-bottom: 14px;
}
.hv-hero__dispo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .88rem;
    color: var(--hv-green);
    margin-bottom: 18px;
}
.hv-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hv-green);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
    animation: hvPulse 2s infinite;
}
@keyframes hvPulse {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
    70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.hv-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.hv-chip {
    padding: 5px 12px;
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 500;
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    color: var(--hv-muted);
}
.hv-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---- Métricas ---- */
.hv-metricas {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 40px;
}
.hv-metrica {
    padding: 20px;
    border-radius: var(--hv-radius);
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    text-align: center;
    transition: transform .25s, border-color .25s;
}
.hv-metrica:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 197, 94, .3);
}
.hv-metrica__valor {
    display: block;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--hv-green);
    line-height: 1.2;
}
.hv-metrica__etiq {
    font-size: .78rem;
    color: var(--hv-muted);
    margin-top: 4px;
}

/* ---- Secciones ---- */
.hv-seccion {
    padding: 56px 0;
    scroll-margin-top: 32px;
}
.hv-seccion__head {
    margin-bottom: 28px;
}
.hv-seccion__head--sub { margin-top: 40px; }
.hv-seccion__num {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: var(--hv-green);
    letter-spacing: .12em;
    margin-bottom: 6px;
}
.hv-seccion__titulo {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -.02em;
}
.hv-seccion__subtitulo {
    font-family: var(--font-display);
    font-size: 1.3rem;
}
.hv-seccion__desc {
    color: var(--hv-muted);
    margin-top: 8px;
    max-width: 560px;
}

/* ---- Cards ---- */
.hv-card {
    padding: 28px;
    border-radius: var(--hv-radius);
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    transition: border-color .25s, box-shadow .25s;
}
.hv-card:hover { border-color: rgba(255,255,255,.12); }
.hv-card--glass {
    background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    backdrop-filter: blur(12px);
}
.hv-perfil__texto {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #cbd5e1;
    margin-bottom: 24px;
}
.hv-logros {
    list-style: none;
    display: grid;
    gap: 10px;
}
.hv-logros li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .92rem;
    color: var(--hv-muted);
}
.hv-logros li i {
    color: var(--hv-green);
    margin-top: 4px;
    flex-shrink: 0;
}

/* ---- Timeline ---- */
.hv-timeline { position: relative; padding-left: 28px; }
.hv-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--hv-green), var(--hv-cyan), transparent);
}
.hv-timeline__item { position: relative; margin-bottom: 24px; }
.hv-timeline__punto {
    position: absolute;
    left: -28px;
    top: 28px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--hv-green);
    border: 3px solid var(--hv-bg);
    box-shadow: 0 0 12px rgba(34,197,94,.5);
}
.hv-exp__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.hv-exp__cargo {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.hv-exp__empresa { color: var(--hv-green); font-weight: 600; font-size: .95rem; }
.hv-exp__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .82rem;
    color: var(--hv-muted);
    text-align: right;
}
.hv-exp__meta i { margin-right: 6px; }
.hv-exp__logros {
    list-style: none;
    display: grid;
    gap: 8px;
}
.hv-exp__logros li {
    padding-left: 18px;
    position: relative;
    font-size: .9rem;
    color: #cbd5e1;
}
.hv-exp__logros li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--hv-cyan);
}

.hv-grid { display: grid; gap: 16px; }
.hv-grid--2 { grid-template-columns: repeat(2, 1fr); }
.hv-edu__titulo { font-weight: 700; margin-bottom: 6px; }
.hv-edu__inst { color: var(--hv-green); font-size: .9rem; margin-bottom: 4px; }
.hv-edu__periodo { font-size: .82rem; color: var(--hv-muted); margin-bottom: 8px; }
.hv-edu__detalle { font-size: .88rem; color: #cbd5e1; }

/* ---- Skills ---- */
.hv-skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.hv-skill__head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: .88rem;
}
.hv-skill__nombre { font-weight: 600; }
.hv-skill__pct { color: var(--hv-green); font-weight: 700; }
.hv-skill__bar {
    height: 8px;
    border-radius: 99px;
    background: rgba(255,255,255,.06);
    overflow: hidden;
}
.hv-skill__fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: var(--skill-color, var(--hv-green));
    transition: width 1.2s cubic-bezier(.22, 1, .36, 1);
}

/* ---- STEAM ---- */
.hv-steam-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
.hv-steam-card {
    padding: 22px 16px;
    border-radius: var(--hv-radius);
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    text-align: center;
    transition: transform .3s, border-color .3s, box-shadow .3s;
    cursor: default;
}
.hv-steam-card:hover, .hv-steam-card:focus-visible {
    transform: translateY(-6px);
    border-color: var(--steam-color, var(--hv-green));
    box-shadow: 0 16px 40px rgba(0,0,0,.25);
    outline: none;
}
.hv-steam-card__letra {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 14px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    background: var(--steam-color, var(--hv-green));
}
.hv-steam-card__nombre { font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.hv-steam-card__desc { font-size: .75rem; color: var(--hv-muted); line-height: 1.45; }

/* ---- Proyectos ---- */
.hv-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.hv-filtro {
    padding: 8px 16px;
    border-radius: 99px;
    font-size: .82rem;
    font-weight: 600;
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    color: var(--hv-muted);
    transition: all .2s;
}
.hv-filtro:hover { color: var(--hv-text); }
.hv-filtro--activo {
    background: rgba(34, 197, 94, .15);
    border-color: rgba(34, 197, 94, .4);
    color: var(--hv-green);
}
.hv-proyectos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.hv-proy {
    padding: 22px;
    border-radius: var(--hv-radius);
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform .25s, border-color .25s, opacity .3s;
}
.hv-proy:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.14); }
.hv-proy.hv-proy--oculto { display: none; }
.hv-proy__top { display: flex; justify-content: space-between; align-items: center; }
.hv-proy__cat {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--cat-color);
    padding: 4px 10px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--cat-color) 15%, transparent);
}
.hv-proy__star { color: #fbbf24; font-size: .85rem; }
.hv-proy__titulo { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.hv-proy__desc { font-size: .85rem; color: var(--hv-muted); flex: 1; line-height: 1.5; }
.hv-proy__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hv-tag {
    font-size: .72rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,.05);
    color: var(--hv-muted);
}
.hv-proy__link {
    font-size: .85rem;
    font-weight: 600;
    color: var(--hv-cyan);
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hv-proy__link:hover { color: var(--hv-green); }

.hv-portal-banner {
    margin-top: 32px;
    padding: 28px 32px;
    border-radius: var(--hv-radius);
    background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(37,99,235,.12));
    border: 1px solid rgba(34,197,94,.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.hv-portal-banner h3 { font-family: var(--font-display); margin-bottom: 6px; }
.hv-portal-banner p { color: var(--hv-muted); font-size: .9rem; }

/* ---- Contacto ---- */
.hv-contacto-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
}
.hv-card--contacto { display: flex; flex-direction: column; gap: 4px; }
.hv-contacto-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--hv-radius-sm);
    transition: background .2s;
    font-size: .92rem;
}
.hv-contacto-item:hover { background: rgba(255,255,255,.04); }
.hv-contacto-item i { width: 20px; color: var(--hv-green); text-align: center; }
.hv-contacto-item--static { color: var(--hv-muted); }
.hv-card--refs h3 { margin-bottom: 14px; font-size: 1rem; }
.hv-card--refs ul { list-style: none; display: grid; gap: 8px; }
.hv-card--refs li { font-size: .88rem; color: var(--hv-muted); padding-left: 14px; border-left: 2px solid var(--hv-green); }

/* ---- Footer ---- */
.hv-footer {
    padding-top: 40px;
    border-top: 1px solid var(--hv-border);
    text-align: center;
    color: var(--hv-muted);
    font-size: .85rem;
}
.hv-footer__links { margin-top: 8px; }
.hv-footer__links a { color: var(--hv-green); }
.hv-footer__links a:hover { text-decoration: underline; }

/* ---- Reveal animations ---- */
.hv-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}
.hv-reveal.hv-reveal--visible {
    opacity: 1;
    transform: none;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .hv-proyectos-grid { grid-template-columns: repeat(2, 1fr); }
    .hv-steam-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .hv-nav {
        transform: translateX(-100%);
        box-shadow: var(--hv-shadow);
    }
    .hv-nav.hv-nav--abierto { transform: none; }
    .hv-menu-toggle { display: flex; align-items: center; justify-content: center; }
    .hv-main { margin-left: 0; padding: 80px 24px 60px; }
    .hv-metricas { grid-template-columns: repeat(2, 1fr); }
    .hv-skills { grid-template-columns: 1fr; }
    .hv-grid--2 { grid-template-columns: 1fr; }
    .hv-contacto-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .hv-hero__fila { flex-direction: column; align-items: center; text-align: center; }
    .hv-hero__cta { justify-content: center; }
    .hv-proyectos-grid { grid-template-columns: 1fr; }
    .hv-steam-grid { grid-template-columns: repeat(2, 1fr); }
    .hv-exp__meta { text-align: left; }
}

/* ============================================================
   EDITOR
   ============================================================ */
.hv-editor-body { background: #0f172a; }
.hv-editor {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}
.hv-editor__head {
    text-align: center;
    margin-bottom: 32px;
}
.hv-editor__head h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 8px;
}
.hv-editor__head p { color: var(--hv-muted); font-size: .9rem; }
.hv-form-section {
    margin-bottom: 28px;
    padding: 24px;
    border-radius: var(--hv-radius);
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
}
.hv-form-section h2 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--hv-green);
}
.hv-form-section__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.hv-form-section__toolbar h2 { margin-bottom: 0; }
.hv-grid--editor { gap: 12px; }
.hv-field-hint {
    margin-top: 6px;
    font-size: .78rem;
    color: var(--hv-muted);
}
.hv-foto-upload {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.hv-foto-upload__preview-wrap {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(34, 197, 94, .4);
    background: rgba(0,0,0,.2);
}
.hv-foto-upload__preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.hv-foto-upload__controls { flex: 1; min-width: 220px; }
.hv-exp-editor,
.hv-edu-editor {
    padding: 20px;
    margin-bottom: 16px;
    border-radius: var(--hv-radius-sm);
    background: rgba(0,0,0,.18);
    border: 1px solid var(--hv-border);
}
.hv-exp-editor:last-child,
.hv-edu-editor:last-child { margin-bottom: 0; }
.hv-exp-editor__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.hv-exp-editor__titulo {
    font-size: .92rem;
    font-weight: 700;
    color: var(--hv-text);
}
.hv-exp-editor__num { color: var(--hv-green); }
.hv-logros-editor { margin-top: 8px; }
.hv-logros-editor__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.hv-logros-editor__head label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--hv-muted);
}
.hv-logros-editor__lista { display: grid; gap: 8px; }
.hv-logro-fila {
    display: flex;
    gap: 8px;
    align-items: center;
}
.hv-logro-fila input { flex: 1; }
.hv-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hv-surface-2);
    border: 1px solid var(--hv-border);
    color: var(--hv-muted);
    flex-shrink: 0;
    transition: background .2s, color .2s;
}
.hv-btn-icon:hover:not(:disabled) { background: rgba(255,255,255,.1); color: var(--hv-text); }
.hv-btn-icon:disabled { opacity: .35; cursor: not-allowed; }
.hv-btn-icon--danger:hover:not(:disabled) { background: rgba(239,68,68,.15); color: #f87171; }
.hv-btn-text {
    font-size: .8rem;
    font-weight: 600;
    color: var(--hv-cyan);
    padding: 4px 8px;
    border-radius: 8px;
}
.hv-btn-text:hover { background: rgba(6,182,212,.1); }
.hv-field input[type="file"] {
    padding: 8px;
    font-size: .85rem;
}
.hv-field { margin-bottom: 14px; }
.hv-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--hv-muted);
    margin-bottom: 6px;
}
.hv-field input,
.hv-field textarea,
.hv-field select {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--hv-radius-sm);
    border: 1px solid var(--hv-border);
    background: rgba(0,0,0,.25);
    color: var(--hv-text);
    font: inherit;
    font-size: .9rem;
}
.hv-field textarea { min-height: 100px; resize: vertical; }
.hv-field input:focus,
.hv-field textarea:focus { outline: 2px solid rgba(34,197,94,.4); border-color: transparent; }
.hv-form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}
.hv-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 22px;
    border-radius: var(--hv-radius-sm);
    background: var(--hv-green);
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
    box-shadow: var(--hv-shadow);
    transform: translateY(80px);
    opacity: 0;
    transition: transform .35s, opacity .35s;
    z-index: 200;
}
.hv-toast.hv-toast--visible { transform: none; opacity: 1; }
.hv-toast--error { background: #ef4444; }
.hv-pin-gate {
    max-width: 400px;
    margin: 80px auto;
    padding: 32px;
    border-radius: var(--hv-radius);
    background: var(--hv-surface);
    border: 1px solid var(--hv-border);
    text-align: center;
}
.hv-pin-gate h1 { font-family: var(--font-display); margin-bottom: 12px; }
.hv-pin-gate p { color: var(--hv-muted); margin-bottom: 20px; font-size: .9rem; }

/* ============================================================
   PDF / IMPRESIÓN — barra lateral azul (repite en cada hoja)
   ============================================================ */
.hv-pdf-body {
    --pdf-side-w: 68mm;
    --pdf-blue-950: #0a1628;
    --pdf-blue-900: #0f2347;
    --pdf-blue-800: #1e3a8a;
    --pdf-blue-700: #1d4ed8;
    --pdf-blue-500: #3b82f6;
    --pdf-blue-400: #60a5fa;
    --pdf-blue-300: #93c5fd;
    --pdf-blue-100: #dbeafe;
    --pdf-blue-50: #eff6ff;
    background: #e8edf5;
    color: #1e293b;
    font-family: 'DM Sans', system-ui, sans-serif;
    min-height: 100vh;
}

.hv-pdf-screen-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 50% 40% at 10% 20%, rgba(37, 99, 235, 0.1), transparent 55%),
        radial-gradient(ellipse 40% 35% at 90% 80%, rgba(6, 182, 212, 0.08), transparent 50%),
        #e8edf5;
    pointer-events: none;
}

.hv-pdf-toolbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(10, 22, 40, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.hv-pdf-toolbar .hv-btn { font-size: .88rem; }

.hv-pdf-doc {
    position: relative;
    z-index: 1;
    max-width: 210mm;
    min-height: 297mm;
    margin: 28px auto 48px;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 35, 71, 0.2);
}

.hv-pdf-doc--sidebar {
    display: grid;
    grid-template-columns: var(--pdf-side-w) 1fr;
}

/* ---- Barra lateral (fija al imprimir = aparece en todas las hojas) ---- */
.hv-pdf-aside {
    position: relative;
    background: linear-gradient(175deg, var(--pdf-blue-950) 0%, var(--pdf-blue-900) 35%, var(--pdf-blue-800) 70%, var(--pdf-blue-700) 100%);
    color: #eff6ff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}
.hv-pdf-aside__patron {
    position: absolute;
    inset: 0;
    opacity: .07;
    background-image: radial-gradient(circle at 20% 30%, #fff 1px, transparent 1px);
    background-size: 18px 18px;
    pointer-events: none;
}
.hv-pdf-aside__inner {
    position: relative;
    padding: 10mm 5mm 8mm;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
}
.hv-pdf-aside__mid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
}
.hv-pdf-aside__bottom {
    flex-shrink: 0;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hv-pdf-aside__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.hv-pdf-aside__logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}
.hv-pdf-aside__brand span {
    font-size: .58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    line-height: 1.3;
    color: var(--pdf-blue-300);
}
.hv-pdf-aside__foto {
    display: flex;
    justify-content: center;
}
.hv-pdf-aside__foto img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid rgba(255,255,255,.9);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.hv-pdf-aside__nombre {
    font-family: 'Fraunces', Georgia, serif;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    color: #fff;
}
.hv-pdf-aside__cargo-mini {
    font-size: .5rem;
    line-height: 1.35;
    text-align: center;
    color: var(--pdf-blue-300);
    margin-bottom: 2px;
}
.hv-pdf-aside__titulo {
    font-size: .6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--pdf-blue-400);
    margin-bottom: 6px;
}
.hv-pdf-aside__lista {
    list-style: none;
    display: grid;
    gap: 5px;
}
.hv-pdf-aside__lista li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: .58rem;
    line-height: 1.4;
    color: #bfdbfe;
    word-break: break-word;
}
.hv-pdf-aside__lista i {
    width: 12px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--pdf-blue-400);
    font-size: .55rem;
}
.hv-pdf-aside__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}
.hv-pdf-aside__stat {
    padding: 6px 5px;
    border-radius: 6px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    text-align: center;
}
.hv-pdf-aside__stat strong {
    display: block;
    font-family: 'Fraunces', Georgia, serif;
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}
.hv-pdf-aside__stat span {
    font-size: .5rem;
    color: var(--pdf-blue-300);
    line-height: 1.2;
    display: block;
    margin-top: 2px;
}
.hv-pdf-aside__skills { display: grid; gap: 5px; }
.hv-pdf-aside__skill-head {
    display: flex;
    justify-content: space-between;
    font-size: .52rem;
    margin-bottom: 2px;
    color: #eff6ff;
}
.hv-pdf-aside__skill-head em {
    font-style: normal;
    font-weight: 700;
    color: var(--pdf-blue-400);
}
.hv-pdf-aside__skill-bar {
    height: 4px;
    border-radius: 99px;
    background: rgba(0,0,0,.25);
    overflow: hidden;
}
.hv-pdf-aside__skill-bar span {
    display: block;
    height: 100%;
    width: calc(var(--nivel, 0) * 1%);
    background: var(--skill-color, var(--pdf-blue-400));
    border-radius: 99px;
}
.hv-pdf-aside__steam {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.hv-pdf-aside__steam-pill {
    font-size: .5rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--steam-color) 35%, transparent);
    border: 1px solid color-mix(in srgb, var(--steam-color) 55%, transparent);
    color: #fff;
}
.hv-pdf-aside__qr {
    padding: 10px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    text-align: center;
}
.hv-pdf-aside__qr canvas,
.hv-pdf-aside__qr img {
    display: block;
    margin: 0 auto 6px;
    border-radius: 6px;
    background: #fff;
    padding: 3px;
}
.hv-pdf-aside__qr p {
    font-size: .55rem;
    font-weight: 700;
    color: var(--pdf-blue-300);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.hv-pdf-aside__qr a {
    font-size: .48rem;
    color: #fff;
    word-break: break-all;
    opacity: .9;
}
.hv-pdf-aside__foot {
    padding-top: 0;
    text-align: center;
}
.hv-pdf-aside__foot-line {
    display: block;
    width: 40px;
    height: 2px;
    margin: 0 auto 6px;
    background: linear-gradient(90deg, transparent, var(--pdf-blue-400), transparent);
    border-radius: 99px;
}
.hv-pdf-aside__foot p {
    font-size: .52rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .04em;
    margin-bottom: 2px;
}
.hv-pdf-aside__foot span {
    font-size: .48rem;
    color: var(--pdf-blue-300);
}

/* ---- Contenido principal ---- */
.hv-pdf-main {
    padding: 9mm 10mm 8mm 9mm;
    background: #f8fafc;
}
.hv-pdf-main__head {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--pdf-blue-700);
}
.hv-pdf-main__etiq {
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--pdf-blue-700);
    margin-bottom: 4px;
}
.hv-pdf-main__nombre {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--pdf-blue-950);
    line-height: 1.1;
    letter-spacing: -.02em;
    margin-bottom: 5px;
}
.hv-pdf-main__cargo {
    font-size: .82rem;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 6px;
}
.hv-pdf-main__dispo {
    font-size: .68rem;
    color: var(--pdf-blue-700);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hv-pdf-main__dispo i { font-size: .45rem; color: var(--pdf-blue-500); }
.hv-pdf-main__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.hv-pdf-main__chips span {
    font-size: .55rem;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 99px;
    background: var(--pdf-blue-50);
    color: var(--pdf-blue-800);
    border: 1px solid var(--pdf-blue-300);
}

/* ---- Bloques de sección ---- */
.hv-pdf-block {
    margin-bottom: 12px;
    break-inside: avoid;
}
.hv-pdf-block__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: .82rem;
    font-weight: 700;
    color: var(--pdf-blue-950);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e8f0;
}
.hv-pdf-block__icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--pdf-blue-700), #06b6d4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .55rem;
    flex-shrink: 0;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}
.hv-pdf-block__texto {
    font-size: .72rem;
    line-height: 1.65;
    color: #44403c;
    margin-bottom: 8px;
    text-align: justify;
}
.hv-pdf-block__checks {
    list-style: none;
    display: grid;
    gap: 4px;
}
.hv-pdf-block__checks li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: .66rem;
    color: #57534e;
    line-height: 1.45;
}
.hv-pdf-block__checks i {
    color: var(--pdf-blue-700);
    font-size: .55rem;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ---- Experiencia ---- */
.hv-pdf-exp-list { display: grid; gap: 8px; }
.hv-pdf-exp-row {
    display: grid;
    grid-template-columns: 22mm 1fr;
    gap: 8px;
    break-inside: avoid;
}
.hv-pdf-exp-row__periodo {
    font-size: .58rem;
    font-weight: 700;
    color: #fff;
    background: var(--pdf-blue-800);
    border-radius: 6px;
    padding: 6px 5px;
    text-align: center;
    line-height: 1.3;
    align-self: start;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}
.hv-pdf-exp-row__body h3 {
    font-size: .74rem;
    font-weight: 700;
    color: var(--pdf-blue-950);
    margin-bottom: 2px;
}
.hv-pdf-exp-row__empresa {
    font-size: .62rem;
    font-weight: 600;
    color: var(--pdf-blue-700);
    margin-bottom: 4px;
}
.hv-pdf-exp-row__body ul {
    list-style: none;
    display: grid;
    gap: 2px;
}
.hv-pdf-exp-row__body li {
    font-size: .62rem;
    color: #57534e;
    line-height: 1.4;
    padding-left: 10px;
    position: relative;
}
.hv-pdf-exp-row__body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #06b6d4;
}

/* ---- Formación ---- */
.hv-pdf-edu-list { display: grid; gap: 7px; }
.hv-pdf-edu-row {
    display: grid;
    grid-template-columns: 18mm 1fr;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px dashed #e7e5e4;
    break-inside: avoid;
}
.hv-pdf-edu-row:last-child { border-bottom: none; }
.hv-pdf-edu-row time {
    font-size: .58rem;
    font-weight: 700;
    color: var(--pdf-blue-700);
    line-height: 1.3;
}
.hv-pdf-edu-row h3 {
    font-size: .7rem;
    font-weight: 700;
    color: var(--pdf-blue-950);
    margin-bottom: 2px;
}
.hv-pdf-edu-row__inst {
    font-size: .62rem;
    font-weight: 600;
    color: var(--pdf-blue-700);
    margin-bottom: 2px;
}
.hv-pdf-edu-row__det {
    font-size: .6rem;
    color: #78716c;
    line-height: 1.4;
}

/* ---- Proyectos ---- */
.hv-pdf-proy-list { display: grid; gap: 6px; }
.hv-pdf-proy-row {
    display: grid;
    grid-template-columns: 20mm 1fr;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 8px;
    background: #f5f5f4;
    border-left: 3px solid var(--cat-color, var(--pdf-blue-700));
    break-inside: avoid;
}
.hv-pdf-proy-row__cat {
    font-size: .5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--cat-color);
    line-height: 1.3;
    align-self: start;
}
.hv-pdf-proy-row h4 {
    font-size: .68rem;
    font-weight: 700;
    color: var(--pdf-blue-950);
    margin-bottom: 2px;
}
.hv-pdf-proy-row p {
    font-size: .6rem;
    color: #78716c;
    line-height: 1.4;
}
.hv-pdf-main__nota {
    margin-top: 6px;
    font-size: .6rem;
    color: #78716c;
}
.hv-pdf-main__nota a { color: var(--pdf-blue-700); font-weight: 600; }
.hv-pdf-main__nota i { margin-right: 4px; color: var(--pdf-blue-500); }

/* ---- Banner interactivo ---- */
.hv-pdf-interlink {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 12px;
    margin: 10px 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pdf-blue-50), #f0f9ff);
    border: 1px solid var(--pdf-blue-300);
    break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}
.hv-pdf-interlink__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--pdf-blue-800);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}
.hv-pdf-interlink strong {
    display: block;
    font-size: .72rem;
    color: var(--pdf-blue-950);
    margin-bottom: 3px;
}
.hv-pdf-interlink p {
    font-size: .62rem;
    color: #57534e;
    line-height: 1.4;
    margin-bottom: 4px;
}
.hv-pdf-interlink a {
    font-size: .6rem;
    color: var(--pdf-blue-700);
    font-weight: 600;
    word-break: break-all;
}

/* ---- Referencias ---- */
.hv-pdf-refs {
    list-style: none;
    display: grid;
    gap: 4px;
}
.hv-pdf-refs li {
    font-size: .62rem;
    color: #57534e;
    padding-left: 10px;
    border-left: 2px solid var(--pdf-blue-700);
    line-height: 1.4;
}

.hv-pdf-main__foot {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e7e5e4;
    text-align: center;
    font-size: .58rem;
    color: #a8a29e;
}

/* ---- Impresión: barra lateral fija en TODAS las hojas ---- */
@media print {
    .hv-pdf-toolbar,
    .hv-pdf-screen-bg,
    .no-print { display: none !important; }

    .hv-pdf-body { background: #fff; }

    .hv-pdf-doc {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        max-width: none;
        min-height: auto;
    }

    .hv-pdf-doc--sidebar {
        display: block;
    }

    .hv-pdf-aside {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--pdf-side-w);
        height: 297mm;
        min-height: 297mm;
        max-height: 297mm;
        z-index: 100;
        overflow: hidden;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .hv-pdf-aside__inner {
        padding: 4mm 3.5mm 3.5mm;
        gap: 4px;
        height: 297mm;
        max-height: 297mm;
        overflow: hidden;
    }

    .hv-pdf-aside__mid {
        gap: 4px;
        overflow: hidden;
        flex: 1;
        min-height: 0;
    }

    .hv-pdf-aside__bottom {
        flex-shrink: 0;
        gap: 4px;
    }

    .hv-pdf-aside__brand {
        padding-bottom: 4px;
    }

    .hv-pdf-aside__foto img {
        width: 68px;
        height: 68px;
    }

    .hv-pdf-aside__nombre { font-size: .58rem; }
    .hv-pdf-aside__cargo-mini {
        font-size: .44rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .hv-pdf-aside__opt { display: none !important; }
    .hv-pdf-aside__bloque { margin-bottom: 0; }
    .hv-pdf-aside__titulo { font-size: .5rem; margin-bottom: 3px; }
    .hv-pdf-aside__lista { gap: 3px; }
    .hv-pdf-aside__lista li { font-size: .48rem; }
    .hv-pdf-aside__stats { gap: 3px; }
    .hv-pdf-aside__stat { padding: 4px 3px; }
    .hv-pdf-aside__stat strong { font-size: .76rem; }
    .hv-pdf-aside__stat span { font-size: .42rem; }
    .hv-pdf-aside__skills { gap: 3px; }
    .hv-pdf-aside__skill:nth-child(n+5) { display: none; }
    .hv-pdf-aside__skill-head { font-size: .44rem; }
    .hv-pdf-aside__skill-bar { height: 3px; }
    .hv-pdf-aside__steam { gap: 2px; }
    .hv-pdf-aside__steam-pill { font-size: .42rem; padding: 2px 4px; }
    .hv-pdf-aside__qr { padding: 5px; }
    .hv-pdf-aside__qr canvas { display: none !important; }
    .hv-pdf-aside__qr-img { display: block !important; }
    .hv-pdf-aside__qr canvas,
    .hv-pdf-aside__qr img { width: 52px !important; height: 52px !important; }
    .hv-pdf-aside__qr p { font-size: .48rem; margin-bottom: 2px; }
    .hv-pdf-aside__qr a { font-size: .42rem; }
    .hv-pdf-aside__foot p { font-size: .46rem; }
    .hv-pdf-aside__foot span { font-size: .42rem; }

    .hv-pdf-main {
        margin-left: var(--pdf-side-w);
        padding: 7mm 9mm 7mm 7mm;
        background: #fff;
    }

    .hv-pdf-aside,
    .hv-pdf-exp-row__periodo,
    .hv-pdf-block__icon,
    .hv-pdf-aside__skill-bar span,
    .hv-pdf-interlink,
    .hv-pdf-interlink__icon {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .hv-pdf-block,
    .hv-pdf-exp-row,
    .hv-pdf-edu-row,
    .hv-pdf-proy-row { break-inside: avoid; }

    @page {
        margin: 0;
        size: A4;
    }
}

@media screen and (max-width: 800px) {
    .hv-pdf-doc--sidebar {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
    .hv-pdf-aside__inner {
        padding: 16px;
    }
    .hv-pdf-exp-row,
    .hv-pdf-edu-row,
    .hv-pdf-proy-row {
        grid-template-columns: 1fr;
    }
    .hv-pdf-exp-row__periodo {
        text-align: left;
        width: fit-content;
    }
}
