/* =========================================================
   KEOTEACH — CREADOR DE CV CON KEO
========================================================= */

.cvx { --cvx-ease: cubic-bezier(.2, .7, .2, 1); --cvx-spring: cubic-bezier(.34, 1.56, .64, 1); }

/* ---------- Cabecera ---------- */

.cvx-hero {
    position: relative; overflow: hidden;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    margin-bottom: 16px; padding: 26px 28px;
    border: 1px solid rgba(118, 103, 255, .25); border-radius: 22px;
    background:
        radial-gradient(circle at 85% 0%, rgba(67, 217, 255, .14), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(242, 107, 216, .12), transparent 45%),
        linear-gradient(135deg, var(--surface), var(--surface-2));
}
.cvx-hero::after {
    content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
    border: 1px dashed rgba(118, 103, 255, .3); animation: orbitSpin 30s linear infinite; pointer-events: none;
}
.cvx-hero h2 { margin: 4px 0 6px; font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); line-height: 1.1; }
.cvx-hero p { max-width: 620px; margin: 0; color: var(--text-soft); font-size: 14px; }
.cvx-hero-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.cvx-saved { display: inline-flex; align-items: center; gap: 6px; min-width: 96px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.cvx-saved.done { color: var(--green); animation: cvxPop .4s var(--cvx-spring); }
.spinner-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }

/* ---------- Distribución ---------- */

.cvx-layout { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 16px; align-items: start; }
.cvx-switch { display: none; }

.cvx-editor {
    position: sticky; top: calc(var(--topbar-height) + 12px);
    display: flex; flex-direction: column; max-height: calc(100vh - var(--topbar-height) - 28px);
    border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden;
}

.cvx-tabs { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px; gap: 4px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cvx-tab { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px; border-radius: 12px; color: var(--text-muted); font-weight: 700; font-size: 13px; transition: color .25s ease; }
.cvx-tab.active { color: var(--text); }
.cvx-tab:hover { color: var(--text); }
.cvx-tab-ink {
    position: absolute; left: 0; top: 6px; bottom: 6px; border-radius: 12px; z-index: 0;
    background: linear-gradient(135deg, rgba(118, 103, 255, .28), rgba(67, 217, 255, .14));
    border: 1px solid rgba(118, 103, 255, .4);
    transition: transform .45s var(--cvx-spring), width .3s ease;
}

.cvx-panel { overflow-y: auto; padding: 14px; }
.cvx-panel.cvx-swap > * { animation: cvxIn .45s var(--cvx-ease) both; }

/* ---------- Acordeón ---------- */

.cvx-accs { display: flex; flex-direction: column; gap: 8px; }

.cvx-acc { border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); transition: border-color .25s ease, box-shadow .3s ease; }
.cvx-acc[open] { border-color: rgba(118, 103, 255, .4); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.cvx-acc.cvx-flash { animation: cvxFlash 1.4s ease; }

.cvx-acc summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; user-select: none; }
.cvx-acc summary::-webkit-details-marker { display: none; }
.cvx-acc-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(118, 103, 255, .14); color: var(--primary-2); font-size: 13px; transition: transform .4s var(--cvx-spring); }
.cvx-acc[open] .cvx-acc-icon { transform: rotate(-8deg) scale(1.08); }
.cvx-acc-title { font-weight: 700; font-size: 14px; }
.cvx-acc-count { min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; border-radius: 20px; background: var(--surface-3); color: var(--text-soft); font-size: 11px; font-weight: 700; }
.cvx-acc-chev { margin-left: auto; color: var(--text-muted); font-size: 12px; transition: transform .35s var(--cvx-spring); }
.cvx-acc[open] .cvx-acc-chev { transform: rotate(180deg); }
.cvx-acc-body { padding: 4px 14px 14px; animation: cvxIn .35s var(--cvx-ease); }

/* ---------- Campos ---------- */

.cvx-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cvx-grid2 .full, .cvx-field.full { grid-column: 1 / -1; }
.cvx-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cvx-dates.full { grid-column: 1 / -1; }

.cvx-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cvx-field > span { color: var(--text-muted); font-size: 11.5px; font-weight: 700; }
.cvx-field input, .cvx-field textarea, .cvx-row input, .cvx-row select, .cvx-keo textarea {
    width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--text); font-size: 13px; line-height: 1.45;
}
.cvx-field textarea, .cvx-keo textarea { resize: vertical; }
.cvx-field input:focus, .cvx-field textarea:focus, .cvx-row input:focus, .cvx-row select:focus, .cvx-keo textarea:focus { outline: none; border-color: var(--primary); }
.cvx-typing { border-color: var(--primary) !important; box-shadow: 0 0 0 4px rgba(118, 103, 255, .18) !important; }

.cvx-card { margin-bottom: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.cvx-card.cvx-new, .cvx-row.cvx-new { animation: cvxDrop .5s var(--cvx-spring); }
.cvx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cvx-card-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.cvx-card-tools { display: flex; gap: 4px; flex-shrink: 0; }

.cvx-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }

.cvx-level { display: flex; gap: 4px; }
.cvx-level button { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); background: transparent; transition: transform .25s var(--cvx-spring), background .2s ease, border-color .2s ease; }
.cvx-level button.on { background: var(--primary); border-color: var(--primary); }
.cvx-level button:hover { transform: scale(1.3); }

.cvx-add {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px;
    border: 1.5px dashed var(--border-strong); border-radius: 12px; color: var(--text-soft); font-weight: 700; font-size: 13px;
    transition: border-color .2s ease, color .2s ease, background .2s ease, transform .3s var(--cvx-spring);
}
.cvx-add:hover { border-color: var(--primary); color: var(--primary-2); background: rgba(118, 103, 255, .07); transform: translateY(-1px); }

.cvx-ai-btn {
    position: relative; overflow: hidden; margin-top: 10px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px;
    border: 1px solid rgba(118, 103, 255, .45); border-radius: 30px;
    background: linear-gradient(135deg, rgba(118, 103, 255, .18), rgba(242, 107, 216, .12));
    color: var(--text); font-size: 12.5px; font-weight: 700;
    transition: transform .3s var(--cvx-spring), box-shadow .3s ease;
}
.cvx-ai-btn i { color: var(--primary-2); }
.cvx-ai-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(118, 103, 255, .3); }
.cvx-ai-btn:hover i { animation: cvxWiggle .6s ease; }
.cvx-ai-btn.is-loading { pointer-events: none; }
.cvx-ai-btn.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .25) 50%, transparent 80%); animation: cvxShimmer 1s linear infinite; }

.cvx-photo-edit { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.cvx-photo-thumb {
    position: relative; width: 74px; height: 74px; flex-shrink: 0; overflow: hidden; display: grid; place-items: center;
    border-radius: 50%; border: 2px dashed var(--border-strong); background: var(--surface); color: var(--text-muted); font-size: 24px;
}
.cvx-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cvx-photo-thumb span { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-size: 16px; opacity: 0; transition: opacity .2s ease; }
.cvx-photo-thumb:hover span { opacity: 1; }
.cvx-photo-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

/* ---------- Diseño ---------- */

.cvx-design h4 { margin: 16px 0 9px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.cvx-design h4:first-child { margin-top: 2px; }
.cvx-hint { margin: -4px 0 10px; color: var(--text-muted); font-size: 12px; display: flex; gap: 7px; align-items: flex-start; }
.cvx-hint i { margin-top: 2px; color: var(--green); }

.cvx-tpls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.cvx-tpl { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 2px solid transparent; border-radius: 13px; background: var(--surface-2); transition: border-color .2s ease, transform .35s var(--cvx-spring), box-shadow .3s ease; }
.cvx-tpl:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, .25); }
.cvx-tpl.active { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(118, 103, 255, .18); }
.cvx-tpl-thumb { position: relative; display: block; aspect-ratio: 210 / 297; overflow: hidden; border-radius: 7px; background: #fff; pointer-events: none; }
.cvx-tpl-thumb .cvx-paper { position: absolute; left: 0; top: 0; transform: scale(var(--thumb, .15)); transform-origin: top left; box-shadow: none; border-radius: 0; }
.cvx-tpl-name { font-size: 12px; font-weight: 700; text-align: center; }
.cvx-tpl-name i { color: var(--primary-2); }

.cvx-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.cvx-swatch { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15); transition: transform .3s var(--cvx-spring); }
.cvx-swatch:hover { transform: scale(1.15); }
.cvx-swatch.active { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--sw); transform: scale(1.08); }
.cvx-swatch.custom { display: grid; place-items: center; overflow: hidden; background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #d946ef, #f43f5e); color: #fff; font-size: 11px; cursor: pointer; }
.cvx-swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.cvx-fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cvx-font { padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 14px; text-align: left; transition: border-color .2s ease, background .2s ease; }
.cvx-font:hover { border-color: var(--border-strong); }
.cvx-font.active { border-color: var(--primary); background: rgba(118, 103, 255, .12); }

.cvx-design-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cvx-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); }
.cvx-seg button { flex: 1; padding: 7px 6px; border-radius: 8px; color: var(--text-muted); font-size: 11.5px; font-weight: 700; white-space: nowrap; transition: background .2s ease, color .2s ease; }
.cvx-seg button.active { background: var(--primary); color: #fff; }

.cvx-secs { display: flex; flex-direction: column; gap: 6px; }
.cvx-secrow { display: grid; grid-template-columns: 20px 1fr auto auto auto; gap: 6px; align-items: center; padding: 7px 8px 7px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); font-size: 13px; font-weight: 600; transition: opacity .2s ease; }
.cvx-secrow > i { color: var(--primary-2); }
.cvx-secrow.off { opacity: .45; }

/* ---------- Keo ---------- */

.cvx-keo { display: flex; flex-direction: column; gap: 12px; }
.cvx-keo-hello { display: flex; align-items: flex-end; gap: 10px; }
.cvx-keo-bot { width: 74px; flex-shrink: 0; animation: robotFloat 4s ease-in-out infinite; }
.cvx-keo-bot .keo-bot { width: 100%; height: auto; }
.cvx-robot-fallback { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(118, 103, 255, .15); color: var(--primary-2); font-size: 24px; }
.cvx-bubble {
    position: relative; margin: 0 0 14px; padding: 12px 14px; border: 1px solid rgba(118, 103, 255, .35); border-radius: 16px 16px 16px 4px;
    background: rgba(118, 103, 255, .1); font-size: 13px; line-height: 1.5; animation: cvxBubble .6s var(--cvx-spring) both .15s;
}

.cvx-usage { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 20px; background: rgba(66, 211, 146, .12); color: var(--green); font-size: 12px; font-weight: 700; }
.cvx-usage.full { background: rgba(255, 107, 131, .12); color: var(--red); }

.cvx-keo-card { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.cvx-keo-card h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-family: var(--font-display); font-size: 16px; }
.cvx-keo-card h4 i { color: var(--primary-2); }
.cvx-keo-card > p { margin: 0 0 12px; color: var(--text-soft); font-size: 13px; }
.cvx-keo-card .cvx-field { margin: 10px 0 12px; }
.cvx-keo-card .cvx-hint { margin: 10px 0 0; }

.cvx-or { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--text-muted); font-size: 12px; }
.cvx-or::before, .cvx-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.cvx-drop {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px;
    border: 1.5px dashed var(--border-strong); border-radius: 12px; color: var(--text-soft); font-size: 13px; font-weight: 700;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.cvx-drop i { font-size: 17px; color: var(--primary-2); }
.cvx-drop:hover { border-color: var(--primary); background: rgba(118, 103, 255, .07); color: var(--text); }
.cvx-file { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid rgba(66, 211, 146, .4); border-radius: 12px; background: rgba(66, 211, 146, .08); font-size: 13px; animation: cvxDrop .45s var(--cvx-spring); }
.cvx-file i { color: var(--green); }
.cvx-file strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvx-file.reading { border-color: var(--border); background: var(--surface); color: var(--text-soft); }

.cvx-glow { box-shadow: 0 10px 30px rgba(118, 103, 255, .35); }
.cvx-glow:not(:disabled) { animation: cvxBreath 2.8s ease-in-out infinite; }

.cvx-tips { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(247, 201, 93, .1); border: 1px solid rgba(247, 201, 93, .3); animation: cvxIn .5s var(--cvx-ease); }
.cvx-tips strong { display: flex; gap: 7px; align-items: center; font-size: 13px; }
.cvx-tips i { color: var(--yellow); }
.cvx-tips ul { margin: 7px 0 0; padding-left: 18px; color: var(--text-soft); font-size: 12.5px; }

.cvx-suggest { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(118, 103, 255, .1); font-size: 12.5px; animation: cvxIn .5s var(--cvx-ease); }
.cvx-suggest .keo-bot, .cvx-suggest .cvx-robot-fallback { width: 30px; height: auto; flex-shrink: 0; font-size: 14px; }
.cvx-suggest span { flex: 1; }

/* Revisión */

.cvx-review { margin-top: 14px; animation: cvxIn .5s var(--cvx-ease); }
.cvx-score { position: relative; width: 120px; height: 120px; margin: 4px auto 8px; display: grid; place-items: center; }
.cvx-score svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.cvx-score circle { fill: none; stroke-width: 9; }
.cvx-score .track { stroke: var(--surface-3); }
.cvx-score .fill { stroke: var(--green); stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: cvxRing 1.3s var(--cvx-ease) .1s forwards; }
.cvx-score.mid .fill { stroke: var(--yellow); }
.cvx-score.low .fill { stroke: var(--red); }
.cvx-score strong { font-family: var(--font-display); font-size: 34px; line-height: 1; }
.cvx-score small { position: absolute; bottom: 32px; color: var(--text-muted); font-size: 11px; }
.cvx-score strong { margin-top: -10px; }
.cvx-verdict { margin: 0 0 12px; text-align: center; color: var(--text-soft); font-size: 13px; }
.cvx-review h5 { display: flex; align-items: center; gap: 7px; margin: 14px 0 7px; font-size: 13px; }
.cvx-review h5 .fa-circle-check { color: var(--green); }
.cvx-review h5 .fa-arrow-trend-up { color: var(--primary-2); }
.cvx-strengths { margin: 0; padding-left: 18px; color: var(--text-soft); font-size: 12.5px; }
.cvx-improve { margin: 0; padding: 0; list-style: none; counter-reset: imp; display: flex; flex-direction: column; gap: 8px; }
.cvx-improve li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); animation: cvxIn .5s var(--cvx-ease) both; animation-delay: calc(var(--i) * 90ms + .3s); }
.cvx-improve-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.cvx-tag { padding: 2px 9px; border-radius: 20px; background: rgba(118, 103, 255, .14); color: var(--primary-2); font-size: 11px; font-weight: 800; }
.cvx-improve p { margin: 0; font-size: 13px; }
.cvx-improve blockquote { position: relative; margin: 8px 0 0; padding: 8px 40px 8px 10px; border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0; background: var(--surface-2); color: var(--text-soft); font-size: 12.5px; font-style: italic; }
.cvx-improve blockquote .icon-btn { position: absolute; right: 6px; top: 6px; }

/* ---------- Vista previa ---------- */

.cvx-preview { min-width: 0; }
.cvx-preview .cv-preview-wrap {
    position: relative; padding: 26px; border-radius: 20px; overflow: hidden;
    background:
        radial-gradient(circle at 20% 10%, rgba(118, 103, 255, .16), transparent 45%),
        radial-gradient(circle at 80% 90%, rgba(67, 217, 255, .12), transparent 45%),
        var(--bg-2);
    border: 1px solid var(--border);
}
.cvx-preview .cv-scaler { margin: 0 auto; }

.cvx-example {
    display: flex; align-items: center; justify-content: center; gap: 8px; margin: -8px 0 14px;
    color: var(--text-soft); font-size: 12.5px; font-weight: 600;
}
.cvx-example i { color: var(--yellow); animation: cvxWiggle 2s ease infinite; }

.cvx-writing { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(7, 10, 18, .55); animation: kxFade .3s ease both; }
.cvx-writing-card { width: min(320px, 86%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid rgba(118, 103, 255, .4); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: modalIn .5s var(--cvx-spring) both; }
.cvx-writing-card .keo-bot { width: 64px; height: auto; animation: robotFloat 2s ease-in-out infinite; }
.cvx-writing-lines { width: 100%; display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.cvx-writing-lines span { height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3) 0%, rgba(118, 103, 255, .5) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: cvxShimmerBg 1.2s linear infinite; }
.cvx-writing-lines span:nth-child(2) { width: 82%; animation-delay: .15s; }
.cvx-writing-lines span:nth-child(3) { width: 92%; animation-delay: .3s; }
.cvx-writing-lines span:nth-child(4) { width: 60%; animation-delay: .45s; }

.cvx-confetti { position: fixed; z-index: 600; pointer-events: none; overflow: hidden; }
.cvx-confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: cvxConfetti 2s cubic-bezier(.2, .6, .4, 1) forwards; }

/* =========================================================
   PAPEL Y PLANTILLAS (794 × 1123 px = A4 a 96 ppp)
========================================================= */

.cvx-paper {
    --c: #6d5dfc;
    --c-soft: color-mix(in srgb, var(--c) 11%, #fff);
    --c-mid: color-mix(in srgb, var(--c) 35%, #fff);
    --c-dark: color-mix(in srgb, var(--c) 72%, #000);
    --c-deep: color-mix(in srgb, var(--c) 58%, #0b1020);
    --ink: #1c2230; --muted: #5d6677; --line: #e4e7ee;
    --gap: 20px; --pad: 44px;
    position: relative; width: 794px; min-height: 1123px; overflow: hidden;
    background: #fff; color: var(--ink);
    font-family: var(--cv-font, "Inter", Arial, sans-serif); font-size: 12.5px; line-height: 1.5;
    text-align: left; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); border-radius: 4px;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cvx-paper.d-compact { --gap: 14px; --pad: 36px; font-size: 12px; line-height: 1.42; }
.cvx-paper.d-airy { --gap: 26px; --pad: 52px; font-size: 13px; line-height: 1.6; }

.cvx-paper h1, .cvx-paper h3, .cvx-paper p, .cvx-paper ul { margin: 0; }
.cvx-paper i { font-style: normal; }

.cvx-name { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; color: var(--ink); }
.cvx-title { margin-top: 6px; color: var(--c); font-size: 15px; font-weight: 600; }
.cvx-contact { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 12px; color: var(--muted); font-size: 11.5px; }
.cvx-contact span { display: inline-flex; align-items: center; gap: 6px; }
.cvx-contact i { color: var(--c); font-size: 11px; }
.cvx-contact.col { flex-direction: column; gap: 7px; margin-top: 0; }
.cvx-contact.col span { word-break: break-word; }

.cvx-sec { margin-top: var(--gap); }
.cvx-sec h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--c-dark); font-size: 13px; font-weight: 800; }
.cvx-paper.h-caps .cvx-sec h3 { text-transform: uppercase; letter-spacing: .13em; font-size: 11.5px; }
.cvx-sec h3::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }

.cvx-summary { color: #333b4b; }
.cvx-item { margin-bottom: 12px; break-inside: avoid; }
.cvx-item:last-child { margin-bottom: 0; }
.cvx-item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cvx-role { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.cvx-org { color: var(--c-dark); font-weight: 600; font-size: 12px; }
.cvx-date { flex-shrink: 0; padding: 2px 8px; border-radius: 20px; background: var(--c-soft); color: var(--c-dark); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.cvx-details { margin-top: 3px; color: var(--muted); font-size: 12px; }
.cvx-bullets { margin-top: 5px !important; padding-left: 17px; }
.cvx-bullets li { margin: 2px 0; }
.cvx-bullets li::marker { color: var(--c); }

.cvx-skills { display: flex; flex-direction: column; gap: 7px; }
.cvx-skill { display: grid; grid-template-columns: minmax(0, 1fr) 84px; align-items: center; gap: 10px; font-size: 12px; }
.cvx-bar { height: 6px; border-radius: 6px; background: var(--c-soft); overflow: hidden; }
.cvx-bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--c), var(--c-mid)); }
.cvx-dots { display: flex; gap: 4px; justify-content: flex-end; }
.cvx-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c-soft); border: 1.5px solid var(--c-mid); }
.cvx-dots i.on { background: var(--c); border-color: var(--c); }
.cvx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cvx-skills + .cvx-chips { margin-top: 10px; }
.cvx-chip { padding: 3px 10px; border-radius: 20px; background: var(--c-soft); color: var(--c-dark); font-size: 11.5px; font-weight: 600; }
.cvx-chip.soft { background: transparent; border: 1px solid var(--c-mid); }

.cvx-langs { display: flex; flex-direction: column; gap: 6px; }
.cvx-lang { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.cvx-lang b { color: var(--c-dark); font-weight: 700; }
.cvx-cert { margin-bottom: 8px; }
.cvx-cert .cvx-role { font-size: 12.5px; }

.cvx-photo { flex-shrink: 0; width: 118px; height: 118px; overflow: hidden; background: var(--c-soft); }
.cvx-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cvx-paper.p-circle .cvx-photo { border-radius: 50%; }
.cvx-paper.p-rounded .cvx-photo { border-radius: 22px; }
.cvx-paper.p-square .cvx-photo { border-radius: 2px; }

.cvx-grid { display: grid; }
.cvx-head { display: flex; align-items: center; gap: 24px; }

/* ---------- Aurora: barra lateral de color ---------- */

.cvx-paper.t-aurora { background: linear-gradient(90deg, var(--c-deep) 0 262px, #fff 262px); }
.t-aurora .cvx-grid { grid-template-columns: 262px 1fr; min-height: 1123px; }
.t-aurora .cvx-side { padding: var(--pad) 26px; color: #eef0ff; }
.t-aurora .cvx-side .cvx-photo { width: 150px; height: 150px; margin: 0 auto 6px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .18); }
.t-aurora .cvx-side .cvx-sec h3 { color: #fff; }
.t-aurora .cvx-side .cvx-sec h3::after { background: rgba(255, 255, 255, .22); }
.t-aurora .cvx-side .cvx-contact { color: rgba(255, 255, 255, .85); }
.t-aurora .cvx-side .cvx-contact i { color: #fff; opacity: .8; }
.t-aurora .cvx-side .cvx-bar { background: rgba(255, 255, 255, .18); }
.t-aurora .cvx-side .cvx-bar span { background: #fff; }
.t-aurora .cvx-side .cvx-dots i { background: transparent; border-color: rgba(255, 255, 255, .45); }
.t-aurora .cvx-side .cvx-dots i.on { background: #fff; border-color: #fff; }
.t-aurora .cvx-side .cvx-chip { background: rgba(255, 255, 255, .14); color: #fff; }
.t-aurora .cvx-side .cvx-chip.soft { border-color: rgba(255, 255, 255, .35); background: transparent; }
.t-aurora .cvx-side .cvx-lang b, .t-aurora .cvx-side .cvx-org { color: rgba(255, 255, 255, .8); }
.t-aurora .cvx-side .cvx-role { color: #fff; }
.t-aurora .cvx-main { padding: var(--pad) 40px var(--pad) 36px; }
.t-aurora .cvx-main .cvx-head { padding-bottom: 18px; border-bottom: 3px solid var(--c); }
.t-aurora .cvx-name { font-size: 36px; }

/* ---------- Nova: banda de color arriba ---------- */

.t-nova .cvx-head {
    position: relative; padding: 40px var(--pad) 34px; color: #fff; overflow: hidden;
    background: linear-gradient(125deg, var(--c) 0%, var(--c-deep) 100%);
}
.t-nova .cvx-head::after { content: ""; position: absolute; right: -80px; top: -90px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.t-nova .cvx-head::before { content: ""; position: absolute; right: 120px; bottom: -120px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.t-nova .cvx-name { color: #fff; font-size: 38px; }
.t-nova .cvx-title { color: rgba(255, 255, 255, .88); }
.t-nova .cvx-contact { color: rgba(255, 255, 255, .85); }
.t-nova .cvx-contact i { color: #fff; }
.t-nova .cvx-head .cvx-photo { order: 2; margin-left: auto; position: relative; z-index: 1; box-shadow: 0 0 0 5px rgba(255, 255, 255, .3); }
.t-nova .cvx-id { position: relative; z-index: 1; }
.t-nova .cvx-grid { grid-template-columns: 1fr 236px; gap: 26px; padding: 6px var(--pad) var(--pad); }
.t-nova .cvx-side { margin-top: var(--gap); padding: 4px 18px 18px; border-radius: 16px; background: var(--c-soft); align-self: start; }

/* ---------- Minimal: una columna elegante ---------- */

.t-minimal { padding: calc(var(--pad) + 8px) calc(var(--pad) + 16px); }
.t-minimal .cvx-head { flex-direction: column; text-align: center; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.t-minimal .cvx-photo { width: 96px; height: 96px; }
.t-minimal .cvx-name { font-size: 38px; font-weight: 300; letter-spacing: .02em; }
.t-minimal .cvx-title { text-transform: uppercase; letter-spacing: .22em; font-size: 12px; }
.t-minimal .cvx-contact { justify-content: center; }
.t-minimal .cvx-sec h3 { justify-content: center; }
.t-minimal .cvx-sec h3::before { content: ""; flex: 1; height: 1px; background: var(--line); }
.t-minimal .cvx-sec h3::after { height: 1px; }
.t-minimal .cvx-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 28px; }
.t-minimal .cvx-langs { flex-direction: row; flex-wrap: wrap; gap: 6px 26px; }

/* ---------- Ejecutivo: títulos a la izquierda ---------- */

.t-executive { padding: var(--pad) calc(var(--pad) + 6px); }
.t-executive .cvx-head { padding-bottom: 20px; border-bottom: 4px solid var(--c); align-items: flex-end; }
.t-executive .cvx-photo { width: 96px; height: 96px; }
.t-executive .cvx-name { font-size: 36px; letter-spacing: -.01em; }
.t-executive .cvx-id { flex: 1; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name contact" "title contact"; column-gap: 20px; align-items: end; }
.t-executive .cvx-name { grid-area: name; }
.t-executive .cvx-title { grid-area: title; }
.t-executive .cvx-contact { grid-area: contact; flex-direction: column; align-items: flex-end; gap: 4px; margin: 0; }
.t-executive .cvx-sec { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding-top: var(--gap); margin-top: 0; border-bottom: 1px solid var(--line); padding-bottom: var(--gap); }
.t-executive .cvx-sec:last-child { border-bottom: 0; }
.t-executive .cvx-sec h3 { align-items: flex-start; margin: 2px 0 0; }
.t-executive .cvx-sec h3::after { display: none; }
.t-executive .cvx-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 24px; }

/* ---------- Creativo: formas y títulos en píldora ---------- */

.t-creative::before { content: ""; position: absolute; right: -120px; top: -140px; width: 380px; height: 380px; border-radius: 50%; background: var(--c); opacity: .92; }
.t-creative::after { content: ""; position: absolute; right: 150px; top: -60px; width: 170px; height: 170px; border-radius: 50%; background: var(--c-mid); opacity: .7; }
.t-creative .cvx-head { position: relative; z-index: 1; padding: calc(var(--pad) + 6px) var(--pad) 18px; }
.t-creative .cvx-photo { order: 2; margin-left: auto; width: 140px; height: 140px; box-shadow: 0 0 0 6px #fff, 0 14px 30px rgba(0, 0, 0, .18); }
.t-creative .cvx-name { font-size: 44px; font-weight: 800; color: var(--c-dark); line-height: .98; max-width: 430px; }
.t-creative .cvx-title { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 20px; background: var(--ink); color: #fff; font-size: 12.5px; }
.t-creative .cvx-grid { position: relative; z-index: 1; grid-template-columns: 1fr 230px; gap: 28px; padding: 0 var(--pad) var(--pad); }
.t-creative .cvx-sec h3 { display: inline-flex; padding: 5px 14px; border-radius: 30px; background: var(--c); color: #fff; }
.t-creative .cvx-sec h3::after { display: none; }
.t-creative .cvx-main .cvx-item { padding: 10px 12px; border-left: 4px solid var(--c); border-radius: 0 12px 12px 0; background: var(--c-soft); }
.t-creative .cvx-date { background: #fff; }

/* ---------- Trayectoria: línea de tiempo ---------- */

.t-timeline .cvx-head { padding: var(--pad) var(--pad) 22px calc(var(--pad) - 4px); border-left: 12px solid var(--c); background: linear-gradient(90deg, var(--c-soft), #fff 70%); }
.t-timeline .cvx-grid { grid-template-columns: 1fr 224px; gap: 30px; padding: 0 var(--pad) var(--pad) var(--pad); }
.t-timeline .cvx-sec-experience .cvx-item,
.t-timeline .cvx-sec-education .cvx-item { position: relative; padding-left: 22px; margin-bottom: 0; padding-bottom: 14px; }
.t-timeline .cvx-sec-experience .cvx-item::before,
.t-timeline .cvx-sec-education .cvx-item::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: -6px; width: 2px; background: var(--c-mid); }
.t-timeline .cvx-sec-experience .cvx-item:last-child::before,
.t-timeline .cvx-sec-education .cvx-item:last-child::before { bottom: auto; height: 0; }
.t-timeline .cvx-sec-experience .cvx-item::after,
.t-timeline .cvx-sec-education .cvx-item::after { content: ""; position: absolute; left: 0; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--c); }
.t-timeline .cvx-side { margin-top: var(--gap); padding-left: 22px; border-left: 1px solid var(--line); }

/* ---------- Animaciones del papel ---------- */

.cvx-paper.is-sample { opacity: .88; }

.cvx-paper.cvx-build .cvx-head,
.cvx-paper.cvx-build .cvx-sec,
.cvx-paper.cvx-build .cvx-side > .cvx-photo { animation: cvxSection .7s var(--cvx-ease) both; animation-delay: calc(var(--i, 0) * 110ms); }

.cvx-paper .cvx-sec.cvx-glowing { animation: cvxGlowSec 1.6s ease; border-radius: 8px; }

#cvPaper { transition: box-shadow .3s ease; }

/* =========================================================
   KEYFRAMES
========================================================= */

@keyframes cvxIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cvxDrop { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes cvxPop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes cvxWiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg) scale(1.15); } 75% { transform: rotate(10deg); } }
@keyframes cvxShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes cvxShimmerBg { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes cvxBreath { 0%, 100% { box-shadow: 0 10px 30px rgba(118, 103, 255, .3); } 50% { box-shadow: 0 10px 40px rgba(118, 103, 255, .6), 0 0 0 4px rgba(118, 103, 255, .12); } }
@keyframes cvxBubble { from { opacity: 0; transform: translateY(10px) scale(.9); transform-origin: bottom left; } to { opacity: 1; transform: none; } }
@keyframes cvxRing { to { stroke-dashoffset: var(--off); } }
@keyframes cvxFlash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px rgba(118, 103, 255, .45); } }
@keyframes cvxSection { from { opacity: 0; transform: translateY(26px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes cvxGlowSec { 0% { background: transparent; } 25% { background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 14%, transparent); } 100% { background: transparent; box-shadow: none; } }
@keyframes cvxConfetti {
    0% { transform: translate(0, 0) rotate(0); opacity: 1; }
    100% { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: 0; }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {
    .cvx-layout { grid-template-columns: 1fr; }
    .cvx-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); position: sticky; top: calc(var(--topbar-height) + 6px); z-index: 20; }
    .cvx-switch button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px; border-radius: 10px; color: var(--text-muted); font-weight: 700; font-size: 13px; transition: background .2s ease, color .2s ease; }
    .cvx-switch button.active { background: var(--primary); color: #fff; }
    .cvx-layout.m-edit .cvx-preview { display: none; }
    .cvx-layout.m-preview .cvx-editor { display: none; }
    .cvx-editor { position: static; max-height: none; }
    .cvx-panel { overflow: visible; }
}

@media (max-width: 560px) {
    .cvx-hero { padding: 20px 18px; }
    .cvx-hero-actions { width: 100%; }
    .cvx-hero-actions .btn-primary { flex: 1; }
    .cvx-grid2, .cvx-design-grid { grid-template-columns: 1fr; }
    .cvx-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cvx-preview .cv-preview-wrap { padding: 12px; }
    .cvx-tab span { font-size: 12px; }
}

/* =========================================================
   IMPRESIÓN / PDF
========================================================= */

@media print {
    #page-cv .cvx-hero, #page-cv .cvx-editor, #page-cv .cvx-switch, #page-cv .cvx-example, #page-cv .cvx-writing, .cvx-confetti { display: none !important; }
    #page-cv .cvx-layout { display: block !important; }
    #page-cv .cvx-preview { display: block !important; }
    #page-cv .cvx-preview .cv-preview-wrap { padding: 0 !important; border: 0 !important; background: none !important; border-radius: 0 !important; overflow: visible !important; }
    #cvPaper.cvx-paper { border-radius: 0; box-shadow: none; opacity: 1; }
    #cvPaper .cvx-head, #cvPaper .cvx-sec { animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .cvx *, .cvx-paper * { animation: none !important; }
    .cvx-score .fill { stroke-dashoffset: var(--off); }
}
