/* ==========================================================================
   Curriculum — "anamnesi radiologica"
   ========================================================================== */

/* clip (non hidden): ritaglia le schede che entrano da destra senza creare un contenitore di scroll */
.cv { position: relative; z-index: 1; overflow-x: clip; }

/* --------------------------------------------------------------------------
   Hero: testo + mappa UK ⇄ Italia
   -------------------------------------------------------------------------- */
.cv-hero { position: relative; padding: calc(var(--header-h) + 56px) 0 40px; overflow: hidden; }
.cv-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.cv-name { margin: 22px 0 6px; font-size: clamp(46px, 6.6vw, 96px); font-weight: 600; line-height: .95; letter-spacing: -.045em; }

.cv-geo { position: relative; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 6px; background: radial-gradient(80% 60% at 60% 45%, rgba(47, 123, 255, .1), transparent 70%), #0a0f16; }
.cv-geo-head { display: flex; justify-content: space-between; gap: 12px; padding: 2px 4px 10px; color: var(--muted); font-size: 9.5px; }
.cv-geo-head span:first-child { color: var(--rl-cyan); }

/* Mappa */
.cv-map { display: block; width: 100%; height: auto; max-height: 520px; }
.cv-map-countries path { fill: rgba(139, 152, 165, .08); stroke: rgba(139, 152, 165, .22); stroke-width: .6; transition: fill .4s, stroke .4s; }
.cv-map-countries .is-uk, .cv-map-countries .is-it { fill: rgba(92, 225, 230, .14); stroke: rgba(92, 225, 230, .7); stroke-width: 1; }
.cv-map.hl-uk .is-uk, .cv-map.hl-it .is-it { fill: rgba(92, 225, 230, .3); }
.cv-map-arc { fill: none; stroke: var(--rl-cyan); stroke-width: 1.6; stroke-dasharray: .012 .012; opacity: .85; filter: drop-shadow(0 0 4px var(--rl-cyan)); }
.cv-map-comet { fill: #fff; filter: drop-shadow(0 0 6px var(--rl-cyan)) drop-shadow(0 0 2px #fff); }
.cv-map-pin .pin-ring { fill: none; stroke: var(--rl-cyan); stroke-width: 1.4; transform-box: fill-box; transform-origin: center; animation: cv-pin 2.4s ease-out infinite; }
.cv-map-pin .pin-dot { fill: var(--rl-cyan); }
.cv-map-pin .pin-halo { opacity: .5; transition: opacity .3s; }
.cv-map-pin .pin-label { fill: var(--heading); font: 500 13px/1 var(--font-mono); letter-spacing: .04em; paint-order: stroke; stroke: #0a0f16; stroke-width: 4px; transition: fill .3s; }
.cv-map-pin.is-active .pin-dot { fill: #fff; }
.cv-map-pin.is-active .pin-halo { opacity: 1; }
.cv-map-pin.is-active .pin-label { fill: var(--rl-cyan); }
.cv-map.has-active .cv-map-pin:not(.is-active) { opacity: .35; }
.cv-map-pin { transition: opacity .3s; }
@keyframes cv-pin { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }

/* Legenda dei due paesi */
.cv-geo-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cv-country { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px; background: rgba(14, 20, 28, .9); color: var(--text); text-align: left; transition: border-color .25s, background-color .25s; }
.cv-country:hover, .cv-country:focus-visible, .cv-country.is-active { border-color: rgba(92, 225, 230, .5); background: rgba(92, 225, 230, .06); }
.cv-country-code { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(92, 225, 230, .45); border-radius: 50%; color: var(--rl-cyan); font-size: 10px; }
.cv-country-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cv-country-name { color: var(--heading); font: 600 15px/1.2 var(--font-head); }
.cv-country-name .mono { margin-left: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }
.cv-country-system { color: var(--rl-cyan); font-size: 9px; text-transform: none; letter-spacing: .02em; }
.cv-country-note { font-size: 12.5px; line-height: 1.4; }

/* Mentre si guarda una slice, il suo paese/pin si evidenzia anche a distanza */
.cv-slice.is-locating .cv-card { border-color: rgba(92, 225, 230, .45); }

.cv-cefr { margin: 10px 0 0; color: var(--muted); font-size: 9.5px; text-transform: none; letter-spacing: .02em; }
.cv-title { margin: 0 0 22px; color: var(--rl-cyan); font-size: 13px; }
.cv-summary { max-width: 640px; margin: 0 0 22px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.65; }
.cv-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 26px; padding: 0; }
.cv-tags li { padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px; background: rgba(14, 20, 28, .7); color: var(--heading); font-size: 10.5px; }
.cv-links { display: flex; flex-wrap: wrap; gap: 10px; }

.cv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 56px 0 0; border: 1px solid var(--border); border-radius: 4px; background: rgba(11, 16, 23, .8); }
.cv-stat { display: flex; flex-direction: column-reverse; gap: 6px; padding: 24px 20px; }
.cv-stat + .cv-stat { border-left: 1px solid var(--border); }
.cv-stat dd { margin: 0; color: var(--rl-cyan); font: 600 clamp(32px, 4vw, 52px)/1 var(--font-head); letter-spacing: -.03em; text-shadow: 0 0 26px rgba(92, 225, 230, .3); font-variant-numeric: tabular-nums; }
.cv-stat:nth-child(even) dd { color: var(--rl-blue); text-shadow: 0 0 26px rgba(47, 123, 255, .3); }
.cv-stat dt { color: var(--muted); font-size: 10px; }

.cv-section { padding-top: clamp(56px, 7vw, 96px); padding-bottom: 0; }
.cv-section:last-child { padding-bottom: clamp(72px, 9vw, 120px); }

/* --------------------------------------------------------------------------
   Esperienza: topogramma verticale
   -------------------------------------------------------------------------- */
.cv-timeline-wrap { position: relative; --axis-x: 168px; }
.cv-axis { position: absolute; left: var(--axis-x); top: 8px; bottom: 8px; width: 2px; background: rgba(92, 225, 230, .12); }
.cv-axis-fill { position: absolute; inset: 0 0 auto; height: 0; background: linear-gradient(var(--rl-cyan), var(--rl-blue)); box-shadow: 0 0 12px var(--rl-cyan); }
.cv-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.cv-slice { position: relative; display: grid; grid-template-columns: var(--axis-x) minmax(0, 1fr); column-gap: 40px; align-items: start; }
.cv-slice-marker { position: absolute; left: calc(var(--axis-x) - 9px); top: 18px; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid rgba(92, 225, 230, .4); border-radius: 50%; background: var(--bg); }
.cv-slice-marker span { width: 8px; height: 8px; border-radius: 50%; background: var(--rl-cyan); box-shadow: 0 0 10px var(--rl-cyan); transform: scale(.4); transition: transform .5s var(--ease); }
.cv-slice.is-on .cv-slice-marker span { transform: scale(1); }
.cv-slice.is-current .cv-slice-marker { animation: cv-pulse 2s ease-out infinite; }
@keyframes cv-pulse { 0% { box-shadow: 0 0 0 0 rgba(92, 225, 230, .5); } 100% { box-shadow: 0 0 0 14px rgba(92, 225, 230, 0); } }
.cv-slice-meta { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; padding-right: 28px; text-align: right; }
.cv-period { color: var(--heading); font: 600 18px/1.2 var(--font-head); }
.cv-slice-meta .mono { color: var(--muted); font-size: 9.5px; }

.cv-card { position: relative; padding: clamp(18px, 2.4vw, 28px); border: 1px solid var(--border); border-radius: 4px; background: linear-gradient(160deg, rgba(17, 24, 33, .95), rgba(11, 16, 23, .9)); }
.cv-slice.is-current .cv-card { border-color: rgba(92, 225, 230, .35); box-shadow: 0 0 0 1px rgba(92, 225, 230, .06), 0 30px 60px -40px rgba(92, 225, 230, .35); }
.cv-live { position: absolute; top: 14px; right: 16px; display: inline-flex; align-items: center; gap: 8px; color: var(--rl-cyan); font-size: 9.5px; }
.cv-live .dot { width: 6px; height: 6px; animation: rl-blink 1.4s steps(1) infinite; }
.cv-role { margin: 0 0 6px; padding-right: 80px; font-size: clamp(18px, 1.8vw, 23px); font-weight: 600; letter-spacing: -.015em; }
.cv-org { margin: 0 0 14px; color: var(--rl-cyan); font-weight: 500; }
.cv-org span { color: var(--muted); font-weight: 400; }
.cv-text { margin: 0 0 12px; font-size: 15.5px; }
.cv-bullets { margin: 0 0 4px; padding-left: 18px; font-size: 14.5px; }
.cv-bullets li { margin: 4px 0; }
.cv-bullets li::marker { color: var(--rl-cyan); }

/* Apparecchiature come header DICOM */
.cv-gear { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed rgba(92, 225, 230, .12); }
.cv-gear > div { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: 3px; background: rgba(92, 225, 230, .04); font-size: 10.5px; text-transform: none; letter-spacing: .02em; }
.cv-gear dt { flex: none; min-width: 34px; padding: 2px 5px; border: 1px solid rgba(92, 225, 230, .35); border-radius: 2px; color: var(--rl-cyan); text-align: center; font-size: 9px; }
.cv-gear dd { margin: 0; color: var(--heading); }
.cv-gear dd span { color: var(--muted); }

/* --------------------------------------------------------------------------
   Formazione
   -------------------------------------------------------------------------- */
.cv-edu { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.cv-edu-card { --acc: var(--rl-cyan); position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--border); border-radius: 4px; background: #0e141c; overflow: hidden; transform-style: preserve-3d; }
.cv-edu-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--rl-cyan), var(--rl-blue)); }
.cv-edu-period { margin: 0; color: var(--rl-cyan); font-size: 10.5px; }
.cv-edu-card h3 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
.cv-edu-detail { margin: 0; flex: 1; font-size: 14px; }
.cv-edu-school { margin: 0; color: var(--muted); font-size: 10px; text-transform: none; letter-spacing: .03em; }

/* --------------------------------------------------------------------------
   Didattica e congressi
   -------------------------------------------------------------------------- */
.cv-teach { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.cv-teach li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--border); transition: background-color .3s; }
.cv-teach li:hover { background: linear-gradient(90deg, rgba(92, 225, 230, .05), transparent 60%); }
.cv-teach-year { padding-top: 4px; color: var(--rl-cyan); font-size: 12px; }
.cv-teach h3 { margin: 0 0 6px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; }
.cv-teach p { margin: 0; font-size: 14.5px; }

/* --------------------------------------------------------------------------
   Certificazioni · lingue · strumenti
   -------------------------------------------------------------------------- */
.cv-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.cv-split--single { grid-template-columns: minmax(0, 1fr); }
.cv-certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.cv-cert { --k: var(--rl-cyan); display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-left: 2px solid var(--k); border-radius: 3px; background: #0e141c; }
.cv-cert.kind-heart { --k: var(--rl-coral); }
.cv-cert.kind-uk, .cv-cert.kind-lang { --k: var(--rl-blue); }
.cv-cert.kind-wave { --k: #6fb7ff; }
.cv-cert-name { color: var(--heading); font-weight: 500; font-size: 14.5px; line-height: 1.3; }
.cv-cert-detail { color: var(--muted); font-size: 9.5px; text-transform: none; letter-spacing: .02em; }

.cv-langs { display: flex; flex-direction: column; gap: 14px; }
.cv-lang { padding: 16px 18px; border: 1px solid var(--border); border-radius: 4px; background: #0e141c; }
.cv-lang-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; color: var(--heading); font: 600 17px/1 var(--font-head); }
.cv-lang-head .mono { color: var(--rl-cyan); font-size: 10.5px; }
.cv-meters { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.cv-meters li { display: grid; grid-template-columns: 72px 1fr 26px; align-items: center; gap: 10px; }
.cv-meters .mono { color: var(--muted); font-size: 9.5px; }
.cv-meter-lvl { color: var(--heading) !important; text-align: right; }
.cv-meter { position: relative; display: block; height: 6px; border-radius: 3px; background: rgba(92, 225, 230, .08); overflow: hidden; }
/* 6 tacche come i livelli QCER; il riempimento parte da 0 e scala a --v via JS (classe is-on) */
.cv-meter::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 6 - 2px), rgba(10, 14, 20, .9) calc(100% / 6 - 2px) calc(100% / 6)); }
.cv-meter > span { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--v)); background: linear-gradient(90deg, var(--rl-cyan), var(--rl-blue)); box-shadow: 0 0 10px rgba(92, 225, 230, .5); }
.motion .cv-meter > span { transform: scaleX(0); transition: transform 1.2s var(--ease); }
.motion .cv-lang.is-on .cv-meter > span { transform: scaleX(var(--v)); }
.cv-meter--full { height: 6px; }

.cv-skills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; }
.cv-skills li { padding: 7px 12px; border: 1px solid var(--border); border-radius: 3px; color: var(--heading); font-size: 10.5px; }

/* --------------------------------------------------------------------------
   Volontariato
   -------------------------------------------------------------------------- */
.cv-volunteer { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); padding: clamp(24px, 4vw, 48px); border: 1px solid var(--border); border-radius: 4px; background: radial-gradient(70% 120% at 0% 0%, rgba(255, 107, 74, .1), transparent 60%), #0e141c; }
.cv-volunteer .vp-corner { border-color: var(--rl-coral); }
.cv-volunteer .section-kicker { color: var(--rl-coral); }
.cv-volunteer .section-heading { margin: 10px 0 16px; font-size: clamp(26px, 3vw, 38px); }
.cv-steps { list-style: none; margin: 0; padding: 0; border-left: 1px solid rgba(255, 107, 74, .3); }
.cv-steps li { position: relative; padding: 0 0 18px 22px; color: var(--heading); font-size: 15px; }
.cv-steps li::before { content: ""; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--rl-coral); box-shadow: 0 0 8px var(--rl-coral); }
.cv-steps .mono { display: block; margin-bottom: 2px; color: var(--rl-coral); font-size: 10px; }

/* Stato iniziale animazioni */
.motion [data-cv-chip] { opacity: 0; transform: translateY(10px); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
	.cv-hero-grid { grid-template-columns: 1fr; }
	.cv-map { max-height: 420px; }
	.cv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cv-stat:nth-child(3) { border-left: 0; }
	.cv-stat:nth-child(n+3) { border-top: 1px solid var(--border); }
	.cv-split, .cv-volunteer { grid-template-columns: 1fr; }
	.cv-timeline-wrap { --axis-x: 10px; }
	.cv-slice { grid-template-columns: 1fr; padding-left: 34px; row-gap: 10px; }
	.cv-slice-marker { left: 1px; top: 4px; }
	.cv-slice-meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 0; text-align: left; }
}
@media (max-width: 560px) {
	.cv-teach li { grid-template-columns: 1fr; gap: 6px; }
	.cv-role { padding-right: 0; }
	.cv-live { position: static; margin-bottom: 8px; }
	.cv-geo-legend { grid-template-columns: 1fr; }
	.cv-geo { padding: 10px; }
}
