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

:root {
  --bg:      #05050A;
  --bg-card: #0F0F17;
  --border:  rgba(255,255,255,0.07);
  --accent:  #7F77DD;
  --accent-s:#A79FEF;
  --text:    #F1F1F5;
  --muted:   #A8A8BF;
  --faint:   #6C6C86;
  --sans:    'Inter', system-ui, sans-serif;
  --mono:    'JetBrains Mono', monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  padding: 0 0 4rem;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(5,5,10,0.9);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.topbar a { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); text-decoration: none; }
.topbar a:hover { color: var(--accent-s); }
.topbar-actions { display: flex; gap: 1rem; align-items: center; }
.btn-print {
  background: var(--accent);
  color: #05050A;
  border: none;
  border-radius: 30px;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.2s;
}
.btn-print:hover { background: var(--accent-s); }
.lang-switch {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 0.3rem 0.8rem;
  transition: color 0.2s, border-color 0.2s;
}
.lang-switch:hover { color: var(--accent); border-color: var(--accent); }

/* ── Header ── */
.cv-header {
  max-width: 800px;
  margin: 3rem auto 0;
  padding: 0 2rem 2rem;
  border-bottom: 1px solid var(--border);
}
.cv-name {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #fff, #C4BFFF);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 0.3rem;
}
.cv-title { font-size: 1rem; color: var(--accent); font-weight: 500; margin-bottom: 1rem; }
.cv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--mono);
  margin-bottom: 1.25rem;
}
.cv-meta a { color: var(--accent); text-decoration: none; }
.cv-meta a:hover { color: var(--accent-s); }
.cv-summary { font-size: 0.9rem; color: var(--muted); line-height: 1.75; max-width: 680px; }

/* ── Body layout ── */
.cv-body { max-width: 800px; margin: 0 auto; padding: 0 2rem; }

/* ── Section ── */
.cv-section { margin-top: 2.5rem; }
.cv-section-title {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Experience ── */
.exp-item { margin-bottom: 1.75rem; }
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 0.2rem;
}
.exp-role  { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.exp-period { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); white-space: nowrap; }
.exp-company { font-size: 0.78rem; color: var(--accent); font-family: var(--mono); margin-bottom: 0.5rem; }
.exp-desc  { font-size: 0.82rem; color: var(--muted); line-height: 1.65; }
.exp-tags  { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.6rem; }
.tag {
  font-size: 0.65rem;
  font-family: var(--mono);
  background: rgba(127,119,221,0.12);
  color: var(--accent-s);
  border-radius: 30px;
  padding: 2px 8px;
}

/* ── Skills ── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.skill-group h4 { font-size: 0.72rem; font-family: var(--mono); color: var(--accent); margin-bottom: 0.4rem; }
.skill-group p  { font-size: 0.78rem; color: var(--muted); line-height: 1.6; }

/* ── Recommendations ── */
.rec-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.rec-text   { font-size: 0.82rem; color: var(--muted); line-height: 1.7; font-style: italic; margin-bottom: 0.75rem; }
.rec-author { font-size: 0.72rem; font-family: var(--mono); color: var(--accent); }
.rec-author span { color: var(--faint); font-style: normal; }

/* ── Rec toggle ── */
.rec-extra { display: none; }
.rec-extra.visible { display: block; }
.rec-toggle {
  display: block;
  margin: 1.25rem auto 0;
  background: transparent;
  border: 1px solid rgba(127,119,221,0.35);
  border-radius: 20px;
  padding: 0.4rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--mono);
  transition: background 0.2s;
}
.rec-toggle:hover { background: rgba(127,119,221,0.1); }

/* ── Print ── */
@media print {
  @page { margin: 1cm; size: letter; }
  body { background: #fff; color: #111; padding: 0; zoom: 0.7; }
  .topbar, .rec-toggle { display: none; }
  .cv-name { color: #111; background: none; -webkit-background-clip: unset; }
  .cv-section-title, .exp-company, .cv-title, .rec-author { color: #5B55B8; }
  .cv-summary, .exp-desc, .rec-text, .skill-group p, .cv-meta { color: #444; }
  .rec-item { background: #f9f9f9; border-color: #ddd; }
  .tag { background: #eeedf8; color: #5B55B8; }
  .exp-item, .rec-item { page-break-inside: avoid; }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .cv-name { font-size: 1.75rem; }
  .exp-header { flex-direction: column; }
}
