/* =============================================================
   paolovigano.it — Curriculum CSS
   ============================================================= */

.cv-main {
  background: var(--surface-2);
  min-height: 100vh;
  padding: var(--space-10) 0 var(--space-20);
}

.cv-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

/* ── HEADER ──────────────────────────────────────────────────── */

.cv-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 16px;
}

.cv-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-muted);
  border: 2px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  font-size: 24px;
  color: var(--accent);
  flex-shrink: 0;
}

.cv-header-mid h1 {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  font-size: 26px;
  letter-spacing: var(--tracking-tight);
  color: var(--text-1);
  margin-bottom: 4px;
}

.cv-ruolo {
  font-size: var(--text-sm);
  color: var(--text-2);
  margin-bottom: var(--space-4);
  line-height: 1.4;
}

.cv-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.cv-contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--text-2);
  text-decoration: none;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.cv-contact-pill:hover { border-color: var(--accent-border); color: var(--accent); opacity: 1; }
.cv-contact-pill svg { flex-shrink: 0; stroke: currentColor; }

.cv-header-right {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-end;
}

.cv-location {
  font-size: var(--text-xs);
  color: var(--text-3);
  text-align: right;
}

.cv-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-2);
  text-decoration: none;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.cv-pdf-btn:hover { border-color: var(--accent-border); color: var(--accent); opacity: 1; }
.cv-pdf-btn svg { stroke: currentColor; }

/* ── BODY ────────────────────────────────────────────────────── */

.cv-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  align-items: start;
}

/* ── SEZIONI ─────────────────────────────────────────────────── */

.cv-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.cv-section:last-child { margin-bottom: 0; }

.cv-section-label {
  font-size: 9px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-4);
}

/* ── BIO ─────────────────────────────────────────────────────── */

.cv-bio {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-2);
}

/* ── ESPERIENZE ──────────────────────────────────────────────── */

.cv-exp-item {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.cv-exp-item:first-child { padding-top: 0; }
.cv-exp-item:last-child  { border-bottom: none; padding-bottom: 0; }

.cv-exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-1);
}

.cv-exp-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
  letter-spacing: 0.04em;
}
.cv-exp-tag.edu  { background: #E1F5EE; color: #085041; }
.cv-exp-tag.dev  { background: #E6F1FB; color: #0C447C; }
.cv-exp-tag.cert { background: #EEEDFE; color: #3C3489; }
.cv-exp-tag.b2b  { background: #FAEEDA; color: #633806; }

.cv-exp-title {
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--text-1);
}

.cv-exp-date {
  font-size: var(--text-xs);
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.cv-exp-company {
  font-size: var(--text-xs);
  color: var(--text-2);
  margin-bottom: var(--space-2);
}

.cv-exp-bullets {
  padding-left: 14px;
  list-style: disc;
}
.cv-exp-bullets li {
  font-size: var(--text-xs);
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 2px;
}

/* ── SKILLS ──────────────────────────────────────────────────── */

.cv-skill-row { margin-bottom: var(--space-3); }
.cv-skill-row:last-child { margin-bottom: 0; }

.cv-skill-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.cv-skill-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-1);
}

.cv-skill-pct {
  font-size: var(--text-xs);
  color: var(--text-3);
}

.cv-skill-track {
  height: 3px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cv-skill-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 0.7s ease;
}

/* ── ISTRUZIONE ──────────────────────────────────────────────── */

.cv-edu-item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.cv-edu-item:first-child { padding-top: 0; }
.cv-edu-item:last-child  { border-bottom: none; padding-bottom: 0; }

.cv-edu-year {
  font-size: 10px;
  color: var(--text-3);
  font-weight: var(--weight-medium);
  margin-bottom: 2px;
}

.cv-edu-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-1);
  margin-bottom: 1px;
  line-height: 1.4;
}

.cv-edu-ente {
  font-size: var(--text-xs);
  color: var(--text-2);
}

/* ── PROGETTI ────────────────────────────────────────────────── */

.cv-proj-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.cv-proj-item:first-child { padding-top: 0; }
.cv-proj-item:last-child  { border-bottom: none; }
.cv-proj-item:hover { opacity: 1; }
.cv-proj-item:hover .cv-proj-name { color: var(--accent); }
.cv-proj-item svg { color: var(--text-3); flex-shrink: 0; stroke: currentColor; }

.cv-proj-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-1);
  margin-bottom: 2px;
  transition: color var(--transition-fast);
}

.cv-proj-tag {
  font-size: 10px;
  color: var(--text-3);
}

.cv-portfolio-link {
  display: block;
  text-align: center;
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-2);
  text-decoration: none;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.cv-portfolio-link:hover { border-color: var(--accent-border); color: var(--accent); opacity: 1; }

/* ── LINGUE ──────────────────────────────────────────────────── */

.cv-lingua-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}
.cv-lingua-row:last-child { border-bottom: none; }

.cv-lingua-nome    { font-weight: var(--weight-medium); color: var(--text-1); }
.cv-lingua-livello { color: var(--text-3); font-size: var(--text-xs); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */

@media (max-width: 768px) {
  .cv-header {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .cv-header-right {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cv-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cv-header {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .cv-avatar { margin: 0 auto; }
  .cv-contacts { justify-content: center; }
  .cv-header-right { justify-content: center; }
}