/* ═══════════════════════════════════════════════════════
   HolaJob CV Builder — Refined Editorial Design System
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  /* Brand palette */
  --hj-black:    #0e0f0f;
  --hj-ink:      #1a1d1d;
  --hj-slate:    #3d4a45;
  --hj-muted:    #7a8a82;
  --hj-border:   #e2e8e4;
  --hj-surface:  #f7faf8;
  --hj-white:    #ffffff;

  /* Accents */
  --hj-green:    #1a7a55;
  --hj-green-lt: #e6f4ee;
  --hj-green-md: #52b788;
  --hj-amber:    #c4831a;
  --hj-amber-lt: #fef3e2;

  /* Shadow system */
  --shadow-xs:   0 1px 3px rgba(14,15,15,.06);
  --shadow-sm:   0 4px 12px rgba(14,15,15,.08);
  --shadow-md:   0 12px 32px rgba(14,15,15,.1);
  --shadow-lg:   0 24px 60px rgba(14,15,15,.14);

  /* Typography */
  --font-serif:  'DM Serif Display', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-2xl: 40px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--hj-ink);
  background: #f4f6f4;
  background-image:
    radial-gradient(circle at 0% 0%, rgba(26,122,85,.07) 0%, transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(26,122,85,.05) 0%, transparent 40%);
  min-height: 100vh;
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--hj-black);
}

a { text-decoration: none; color: inherit; }

/* ════════════════════════════════════
   NAV — Override Bootstrap
════════════════════════════════════ */
.navbar {
  font-family: var(--font-sans);
  background: rgba(247,250,248,.92) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hj-border);
  padding: 0;
  min-height: 68px;
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--hj-black) !important;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
}

.navbar-brand img {
  border-radius: 8px;
}

.nav-link {
  font-size: .875rem;
  font-weight: 500;
  color: var(--hj-slate) !important;
  padding: 8px 10px !important;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--hj-green) !important;
  background: var(--hj-green-lt);
}

.btn-outline-primary {
  border-color: var(--hj-border);
  color: var(--hj-slate);
  font-size: .82rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 16px;
  transition: all .18s;
}

.btn-outline-primary:hover {
  background: var(--hj-green-lt);
  border-color: var(--hj-green-md);
  color: var(--hj-green);
}

.btn-primary {
  background: var(--hj-green) !important;
  border-color: var(--hj-green) !important;
  font-size: .82rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 18px;
  transition: all .18s;
  letter-spacing: .01em;
}

.btn-primary:hover {
  background: #145e40 !important;
  border-color: #145e40 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,122,85,.3);
}

/* ════════════════════════════════════
   HERO
════════════════════════════════════ */
.cv-hero {
  background: var(--hj-black);
  padding: 108px 0 80px;
  position: relative;
  overflow: hidden;
}

.cv-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 80% 40%, rgba(26,122,85,.22) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 10% 80%, rgba(82,183,136,.1) 0%, transparent 55%);
  pointer-events: none;
}

/* Decorative grid lines */
.cv-hero::after {
  content: '';
  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: 60px 60px;
  pointer-events: none;
}

.cv-hero .container { position: relative; z-index: 2; }

.cv-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(82,183,136,.15);
  border: 1px solid rgba(82,183,136,.3);
  color: var(--hj-green-md);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.cv-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.08;
  color: var(--hj-white);
  margin-bottom: 20px;
  max-width: 14ch;
}

.cv-hero h1 em {
  font-style: italic;
  color: var(--hj-green-md);
}

.cv-hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  max-width: 46ch;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.8);
}

.stat-pill i { color: var(--hj-green-md); font-size: .75rem; }

.hero-cta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-hero-primary {
  background: var(--hj-green);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: 13px 28px;
  border-radius: 12px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
  letter-spacing: -.01em;
  cursor: pointer;
}

.btn-hero-primary:hover {
  background: #145e40;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,122,85,.4);
}

.btn-hero-secondary {
  background: transparent;
  color: rgba(255,255,255,.7);
  font-weight: 600;
  font-size: .9rem;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.15);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
  cursor: pointer;
}

.btn-hero-secondary:hover {
  color: rgba(255,255,255,.95);
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.06);
}

/* Hero CV mockup */
.hero-visual {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.cv-mockup-stack {
  position: relative;
  width: 100%;
  max-width: 360px;
}

.cv-mockup {
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: #fff;
}

.cv-mockup-a {
  width: 78%;
  position: absolute;
  top: 0;
  right: 0;
  transform: rotate(3.5deg) translateY(-20px);
  opacity: .85;
}

.cv-mockup-b {
  width: 84%;
  position: relative;
  z-index: 2;
  margin-left: 10%;
}

.cv-mockup-inner {
  padding: 20px;
}

.cv-mockup-bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hj-green), var(--hj-green-md));
  margin-bottom: 14px;
}

.cv-mockup-title {
  height: 16px;
  width: 65%;
  background: var(--hj-black);
  border-radius: 4px;
  margin-bottom: 6px;
}

.cv-mockup-sub {
  height: 10px;
  width: 45%;
  background: #d0dbd6;
  border-radius: 4px;
  margin-bottom: 16px;
}

.cv-mockup-line {
  height: 8px;
  background: #eaf0ec;
  border-radius: 4px;
  margin-bottom: 6px;
}

.cv-mockup-line.w80 { width: 80%; }
.cv-mockup-line.w65 { width: 65%; }
.cv-mockup-line.w90 { width: 90%; }
.cv-mockup-line.w55 { width: 55%; }
.cv-mockup-line.w70 { width: 70%; }

.cv-mockup-section-label {
  height: 8px;
  width: 30%;
  background: var(--hj-green);
  border-radius: 3px;
  margin: 14px 0 8px;
  opacity: .7;
}

/* ════════════════════════════════════
   STEPS BAR
════════════════════════════════════ */
.steps-bar {
  background: var(--hj-white);
  border-bottom: 1px solid var(--hj-border);
  padding: 0;
  position: sticky;
  top: 68px;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.steps-inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 52px;
  gap: 0;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 24px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--hj-muted);
  position: relative;
  cursor: default;
  transition: color .2s;
}

.step-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background .2s;
}

.step-item.active {
  color: var(--hj-green);
}

.step-item.active::after {
  background: var(--hj-green);
}

.step-item.done {
  color: var(--hj-slate);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--hj-border);
  color: var(--hj-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: all .2s;
}

.step-item.active .step-num {
  background: var(--hj-green);
  color: #fff;
}

.step-item.done .step-num {
  background: var(--hj-green-lt);
  color: var(--hj-green);
}

.step-arrow {
  color: var(--hj-border);
  font-size: .7rem;
}

/* ════════════════════════════════════
   SECTION LABELS
════════════════════════════════════ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--hj-green-lt);
  color: var(--hj-green);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--hj-black);
  margin: 10px 0 8px;
  line-height: 1.2;
}

/* ════════════════════════════════════
   TEMPLATE SELECTOR
════════════════════════════════════ */
.templates-section {
  background: var(--hj-white);
  padding: 60px 0;
  border-bottom: 1px solid var(--hj-border);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.template-card {
  background: var(--hj-surface);
  border: 1.5px solid var(--hj-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all .22s cubic-bezier(.25,.46,.45,.94);
  position: relative;
}

.template-card:hover:not(.locked) {
  border-color: var(--hj-green-md);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.template-card.selected {
  border-color: var(--hj-green);
  box-shadow: 0 0 0 3px rgba(26,122,85,.15), var(--shadow-md);
}

.template-card.selected::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  background: var(--hj-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10' fill='white'%3E%3Cpath d='M1 5l3.5 3.5L11 1'/%3E%3C/svg%3E") center / 11px no-repeat;
  border-radius: 50%;
  z-index: 3;
}

.template-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: top;
  display: block;
  border-bottom: 1px solid var(--hj-border);
}

.template-thumb-ph {
  height: 140px;
  background: linear-gradient(135deg, var(--hj-green-lt), #d4ede2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  border-bottom: 1px solid var(--hj-border);
}

.template-info {
  padding: 14px 16px 16px;
}

.template-info h5 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--hj-black);
  margin: 0 0 3px;
}

.template-info p {
  font-size: .76rem;
  color: var(--hj-muted);
  margin: 0 0 8px;
  line-height: 1.4;
}

.tmpl-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.badge-free {
  background: var(--hj-green-lt);
  color: var(--hj-green);
}

.badge-premium {
  background: var(--hj-amber-lt);
  color: var(--hj-amber);
}

.template-card.locked { cursor: default; opacity: .75; }

.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(247,250,248,.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  border-radius: calc(var(--r-xl) - 2px);
  backdrop-filter: blur(2px);
}

.lock-overlay i {
  font-size: 1.5rem;
  color: var(--hj-amber);
}

.lock-overlay span {
  font-size: .74rem;
  font-weight: 700;
  color: var(--hj-amber);
}

/* ════════════════════════════════════
   BUILDER SECTION
════════════════════════════════════ */
.builder-section {
  background: var(--hj-surface);
  padding: 56px 0 80px;
}

.builder-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── Form Panel ── */
.builder-form-panel {
  background: var(--hj-white);
  border: 1px solid var(--hj-border);
  border-radius: var(--r-2xl);
  padding: 28px;
  position: sticky;
  top: 132px;
  max-height: calc(100vh - 152px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.builder-form-panel::-webkit-scrollbar {
  width: 4px;
}

.builder-form-panel::-webkit-scrollbar-track {
  background: transparent;
}

.builder-form-panel::-webkit-scrollbar-thumb {
  background: var(--hj-border);
  border-radius: 4px;
}

/* Form section headings */
.form-section-title {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--hj-green);
  padding: 18px 0 10px;
  margin-top: 4px;
  border-top: 1px solid var(--hj-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title:first-child {
  border-top: none;
  padding-top: 0;
}

.form-section-title i {
  font-size: .85rem;
  width: 22px;
  height: 22px;
  background: var(--hj-green-lt);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hj-green);
  flex-shrink: 0;
}

/* Form controls */
.form-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--hj-slate);
  margin-bottom: 4px;
  display: block;
}

.form-control,
.form-select {
  font-family: var(--font-sans);
  font-size: .875rem;
  border: 1.5px solid var(--hj-border);
  border-radius: var(--r-md);
  padding: 9px 13px;
  background: var(--hj-surface);
  color: var(--hj-ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
  width: 100%;
  outline: none;
}

.form-control:hover,
.form-select:hover {
  border-color: #c0ccc6;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--hj-green-md);
  background: var(--hj-white);
  box-shadow: 0 0 0 3px rgba(26,122,85,.1);
  outline: none;
}

.form-control::placeholder {
  color: #b0bdb8;
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}

.field-hint {
  font-size: .72rem;
  color: var(--hj-muted);
  margin-top: 4px;
  line-height: 1.45;
}

.mb-3 { margin-bottom: 14px; }
.mb-4 { margin-bottom: 18px; }
.row  { margin-left: -6px; margin-right: -6px; }
.col-6 { padding-left: 6px; padding-right: 6px; width: 50%; float: left; }
.g-2  { gap: 8px; }

/* ── Preview Panel ── */
.builder-preview-panel {
  position: sticky;
  top: 132px;
  background: #dce8e0;
  border-radius: var(--r-2xl);
  padding: 28px;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image:
    linear-gradient(rgba(26,122,85,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,122,85,.06) 1px, transparent 1px);
  background-size: 28px 28px;
}

.preview-panel-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hj-green);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
}

#cv-preview {
  width: 100%;
  max-width: 660px;
  box-shadow: var(--shadow-lg);
  border-radius: 16px;
  overflow: hidden;
}

/* ════════════════════════════════════
   CV TEMPLATES (the actual CV output)
════════════════════════════════════ */

/* ── CV color tokens (overridden per palette) ── */
#cv-preview {
  --cv-accent:      #1a7a55;
  --cv-accent-lt:   #d4ede2;
  --cv-accent-md:   #52b788;
  --cv-header-bg:   #162720;
  --cv-sidebar-bg:  #1a2e28;
  --cv-side-bg:     #f7faf8;
}

/* Shared CV base */
.cv-preview {
  background: #ffffff;
  color: #1a1d1d;
  font-family: 'DM Sans', Georgia, sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  min-height: 1000px;
}

/* ── TEMPLATE: EXECUTIVE ── */
.template-executive {
  padding: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.template-executive .preview-header {
  background: var(--cv-header-bg);
  color: #fff;
  padding: 36px 40px 28px;
}

.template-executive .preview-header h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  color: #fff;
  letter-spacing: -.01em;
  margin: 0 0 4px;
}

.template-executive .preview-header p {
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .8rem;
  margin: 0 0 18px;
  color: var(--cv-accent-md);
}

.template-executive .preview-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: .78rem;
  color: rgba(255,255,255,.65);
}

.template-executive .preview-contact span::before {
  display: none;
}

.template-executive .preview-contact span:empty { display: none; }

.template-executive .preview-body {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 0;
  min-height: 0;
  align-items: stretch;
}

.template-executive .preview-main {
  padding: 28px 32px;
  border-right: 1px solid #e8eeeb;
}

.template-executive .preview-side {
  padding: 28px 20px;
  background: var(--cv-side-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.template-executive .preview-side::after {
  content: '';
  flex: 1;
}

.template-executive .preview-section {
  margin-bottom: 22px;
}

.template-executive .preview-section-title {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--cv-accent);
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--cv-accent-lt);
}

.template-executive .preview-section p,
.template-executive .preview-section #preview-summary {
  font-size: .86rem;
  color: #3d4a45;
  line-height: 1.65;
}

/* ── TEMPLATE: MINIMAL ── */
.template-minimal {
  padding: 44px 44px 36px;
}

.template-minimal .preview-header {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 2px solid #1a1d1d;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.template-minimal .preview-header h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 400;
  color: #1a1d1d;
  margin: 0 0 4px;
  letter-spacing: -.02em;
}

.template-minimal .preview-header p {
  font-size: .82rem;
  color: #7a8a82;
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.template-minimal .preview-contact {
  text-align: right;
  font-size: .77rem;
  color: #7a8a82;
  flex-shrink: 0;
  line-height: 1.8;
}

.template-minimal .preview-contact span { display: block; }
.template-minimal .preview-contact span:empty { display: none; }

.template-minimal .preview-section-title {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--cv-accent);
  margin: 0 0 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--cv-accent-lt);
}

/* ── TEMPLATE: CREATIVE ── */
.template-creative {
  padding: 0;
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 1000px;
}

.template-creative .preview-sidebar {
  background: var(--cv-sidebar-bg);
  padding: 36px 22px;
  color: rgba(255,255,255,.85);
}

.template-creative .preview-sidebar h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 5px;
  letter-spacing: -.01em;
}

.template-creative .preview-sidebar .sidebar-title {
  font-size: .72rem;
  color: var(--cv-accent-md);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 20px;
}

.template-creative .preview-sidebar-section {
  margin-bottom: 22px;
}

.template-creative .preview-sidebar-label {
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--cv-accent-md);
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.template-creative .preview-sidebar p,
.template-creative .preview-sidebar #preview-contact-sidebar {
  font-size: .77rem;
  color: rgba(255,255,255,.7);
  line-height: 1.65;
}

.template-creative .preview-sidebar #preview-skills-sidebar .chip,
.template-creative .preview-sidebar #preview-languages-sidebar {
  font-size: .74rem;
  color: rgba(255,255,255,.8);
}

.template-creative .preview-main-content {
  padding: 32px 28px;
  background: #fff;
}

.template-creative .preview-section-title {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--cv-accent);
  margin: 0 0 12px;
  padding-bottom: 5px;
  border-bottom: 1.5px solid #e6f4ee;
}

/* Shared preview items */
.preview-section {
  margin-bottom: 20px;
}

.preview-item {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f4f2;
}

.preview-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.preview-item strong {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: #1a1d1d;
  margin-bottom: 1px;
}

.preview-item .preview-meta {
  font-size: .77rem;
  color: #7a8a82;
  margin-bottom: 4px;
  font-weight: 500;
}

.preview-item .preview-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .7rem;
  font-weight: 600;
  color: #1a7a55;
  background: #e6f4ee;
  padding: 1px 7px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.preview-item p {
  font-size: .82rem;
  color: #3d4a45;
  line-height: 1.6;
  margin: 0;
}

/* Chips */
.chips, .chip-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
  background: #eaf2ee;
  color: #2a5a45;
}

.template-minimal .chip {
  background: #f2f4f6;
  color: #3d4a58;
}

.template-creative .chip {
  background: rgba(82,183,136,.18);
  color: rgba(255,255,255,.9);
}

/* Empty state in preview */
.preview-empty {
  font-size: .8rem;
  color: #b0bdb8;
  font-style: italic;
}

/* CV Watermark */
.cv-watermark {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: .6rem;
  color: #d0d8d4;
  letter-spacing: .03em;
  pointer-events: none;
  z-index: 10;
}

#cv-preview {
  position: relative;
}

/* ════════════════════════════════════
   STRUCTURED ENTRY BLOCKS (exp/edu)
════════════════════════════════════ */
.entry-block {
  background: var(--hj-surface);
  border: 1.5px solid var(--hj-border);
  border-radius: var(--r-md);
  padding: 14px 14px 10px;
  margin-bottom: 10px;
  position: relative;
}

.entry-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.entry-block-title {
  font-size: .75rem;
  font-weight: 700;
  color: var(--hj-green);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.btn-remove-entry {
  background: none;
  border: none;
  color: var(--hj-muted);
  cursor: pointer;
  font-size: .8rem;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color .15s, background .15s;
  line-height: 1;
}

.btn-remove-entry:hover {
  color: #c0392b;
  background: #fdf0ee;
}

.entry-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.entry-dates > div {
  min-width: 0;
}

.entry-dates label,
.entry-block label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--hj-slate);
  display: block;
  margin-bottom: 3px;
}

.entry-dates input[type="month"] {
  font-family: var(--font-sans);
  font-size: .82rem;
  border: 1.5px solid var(--hj-border);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  background: var(--hj-white);
  color: var(--hj-ink);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.entry-dates input[type="month"]:focus {
  border-color: var(--hj-green-md);
  box-shadow: 0 0 0 3px rgba(26,122,85,.1);
}

.entry-current-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.entry-current-wrap input[type="checkbox"] {
  accent-color: var(--hj-green);
  width: 14px;
  height: 14px;
}

.entry-current-wrap label {
  font-size: .75rem;
  color: var(--hj-muted);
  margin: 0;
  cursor: pointer;
}

.btn-add-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 600;
  color: var(--hj-green);
  background: var(--hj-green-lt);
  border: 1.5px dashed var(--hj-green-md);
  border-radius: var(--r-md);
  padding: 8px 16px;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  margin-bottom: 4px;
  transition: background .15s, border-color .15s;
}

.btn-add-entry:hover {
  background: #d2ede1;
  border-color: var(--hj-green);
}

/* ════════════════════════════════════
   ACTION BAR
════════════════════════════════════ */
.builder-actions {
  background: var(--hj-white);
  border-top: 1px solid var(--hj-border);
  padding: 14px 0;
  position: sticky;
  bottom: 0;
  z-index: 99;
  box-shadow: 0 -4px 20px rgba(14,15,15,.07);
}

.action-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.action-left, .action-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: .84rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1.5px solid var(--hj-border);
  background: var(--hj-surface);
  color: var(--hj-slate);
  cursor: pointer;
  transition: all .18s;
}

.btn-action:hover {
  border-color: var(--hj-green-md);
  color: var(--hj-green);
  background: var(--hj-green-lt);
}

.btn-action-primary {
  background: var(--hj-green);
  border-color: var(--hj-green);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 10px;
  letter-spacing: -.01em;
}

.btn-action-primary:hover {
  background: #145e40;
  border-color: #145e40;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,122,85,.3);
}

#print-cv {
  background: var(--hj-green);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}

#print-cv:hover {
  background: #145e40;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,122,85,.3);
}

#fill-demo, #save-json, .btn-load-json {
  background: var(--hj-surface);
  color: var(--hj-slate);
  border: 1.5px solid var(--hj-border);
  border-radius: 10px;
  padding: 9px 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .84rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all .18s;
}

#fill-demo:hover, #save-json:hover, .btn-load-json:hover {
  border-color: var(--hj-green-md);
  color: var(--hj-green);
  background: var(--hj-green-lt);
}

/* ── Palette picker ── */
.palette-picker {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--hj-surface);
  border: 1.5px solid var(--hj-border);
  border-radius: 10px;
  padding: 6px 10px;
}

.palette-label {
  font-size: .8rem;
  color: var(--hj-muted);
  margin-right: 2px;
}

.palette-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
  padding: 0;
  flex-shrink: 0;
}

.palette-swatch:hover {
  transform: scale(1.2);
}

.palette-swatch.active {
  border-color: var(--hj-ink);
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--hj-ink);
}

.action-hint {
  font-size: .76rem;
  color: var(--hj-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.mobile-preview-btn {
  background: var(--hj-green-lt);
  color: var(--hj-green);
  border: 1.5px solid rgba(26,122,85,.3);
  border-radius: 10px;
  padding: 9px 16px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .84rem;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 6px;
  transition: all .18s;
}

.mobile-preview-btn:hover {
  background: var(--hj-green);
  color: #fff;
}

/* ════════════════════════════════════
   MOBILE MODAL
════════════════════════════════════ */
.mobile-preview-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(14,15,15,.8);
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.mobile-preview-modal.open {
  display: flex;
}

.mobile-preview-inner {
  background: var(--hj-white);
  border-radius: var(--r-xl);
  overflow: auto;
  max-height: 92vh;
  width: 100%;
  max-width: 600px;
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.close-modal {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--hj-muted);
  background: var(--hj-border);
  border: none;
  font-weight: 700;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.close-modal:hover {
  background: var(--hj-ink);
  color: #fff;
}

/* ════════════════════════════════════
   FEATURES SECTION
════════════════════════════════════ */
.features-section {
  background: var(--hj-white);
  padding: 60px 0;
  border-top: 1px solid var(--hj-border);
}

.feature-item {
  background: var(--hj-surface);
  border: 1px solid var(--hj-border);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  height: 100%;
  transition: box-shadow .2s, transform .2s;
}

.feature-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 16px;
}

.icon-green  { background: var(--hj-green-lt); color: var(--hj-green); }
.icon-orange { background: #fef3e2; color: #c4831a; }
.icon-blue   { background: #e8f0fe; color: #1a5aaa; }

.feature-item h5 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.feature-item p {
  font-size: .82rem;
  color: var(--hj-muted);
  margin: 0;
  line-height: 1.5;
}

/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
.footer {
  background: var(--hj-black);
  color: rgba(255,255,255,.6);
  padding: 56px 0 36px;
}

.footer img { filter: brightness(0) invert(1); opacity: .85; }

.footer p { font-size: .84rem; line-height: 1.65; color: rgba(255,255,255,.55); }

.footer-title {
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.9);
  margin-bottom: 14px;
}

.footer a {
  font-size: .84rem;
  color: rgba(255,255,255,.5);
  transition: color .15s;
}

.footer a:hover { color: var(--hj-green-md); }

.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.social-icons a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  transition: all .18s;
}

.social-icons a:hover {
  background: var(--hj-green);
  color: #fff;
}

.copyright {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.copyright p { font-size: .78rem; color: rgba(255,255,255,.35); }
.copyright a { color: rgba(255,255,255,.35); }
.copyright a:hover { color: var(--hj-green-md); }

/* ════════════════════════════════════
   AD UNIT
════════════════════════════════════ */
.ad-unit {
  background: var(--hj-surface);
  border: 1px dashed var(--hj-border);
  border-radius: var(--r-lg);
  padding: 16px;
  text-align: center;
}

.ad-unit small {
  display: block;
  font-size: .68rem;
  color: var(--hj-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ════════════════════════════════════
   PRINT DOCUMENT
════════════════════════════════════ */
body.print-document {
  margin: 0;
  background: #e8ece9;
  font-family: var(--font-sans);
}

.print-shell {
  min-height: 100vh;
  padding: 28px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.print-sheet {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  box-shadow: 0 24px 70px rgba(14,15,15,.16);
  position: relative;
  overflow: hidden;
}

body.print-document #cv-preview {
  width: 210mm;
  max-width: none;
  min-height: 297mm;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body.print-document .template-executive,
body.print-document .template-creative {
  min-height: 297mm;
}

body.print-document .template-executive .preview-body {
  min-height: 0;
}

body.print-document .preview-section,
body.print-document .preview-item,
body.print-document .preview-sidebar-section,
body.print-document .chips {
  break-inside: avoid;
  page-break-inside: avoid;
}

.cv-print-footer {
  position: fixed;
  right: 10mm;
  bottom: 7mm;
  font-size: 8.5pt;
  color: #bcc5bf;
  letter-spacing: .01em;
}

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

@media print {
  body.print-document {
    background: #fff;
  }

  .print-shell {
    min-height: auto;
    padding: 0;
  }

  .print-sheet {
    width: 210mm;
    min-height: 297mm;
    box-shadow: none;
  }

  body.print-document #cv-preview {
    min-height: 297mm;
  }
}

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 1100px) {
  .builder-layout { grid-template-columns: 380px 1fr; }
}

@media (max-width: 991px) {
  .builder-layout { grid-template-columns: 1fr; }
  .builder-preview-panel { display: none; }
  .mobile-preview-btn { display: flex !important; }
  .builder-form-panel { position: static; max-height: none; }
}

@media (max-width: 768px) {
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .action-bar-inner { flex-direction: column; align-items: stretch; }
  .action-left, .action-right { justify-content: center; flex-wrap: wrap; }
  .hero-visual { display: none; }
  .cv-hero { padding: 96px 0 60px; }
  .steps-inner { justify-content: flex-start; overflow-x: auto; padding: 0 16px; }
}

@media (max-width: 480px) {
  .template-grid { grid-template-columns: 1fr; }
  .builder-form-panel { padding: 20px; }
  .template-creative { grid-template-columns: 1fr; }
  .template-creative .preview-sidebar { display: none; }
  .entry-dates { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════
   ANIMATIONS
════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.cv-hero .col-lg-6:first-child > * {
  animation: fadeUp .55s cubic-bezier(.25,.46,.45,.94) both;
}

.cv-hero .cv-hero-eyebrow  { animation-delay: .05s; }
.cv-hero h1                { animation-delay: .13s; }
.cv-hero .cv-hero-desc     { animation-delay: .2s; }
.cv-hero .hero-stats       { animation-delay: .27s; }
.cv-hero .hero-cta-group   { animation-delay: .33s; }

.hero-visual { animation: fadeIn .7s .4s both; }

/* Row clearfix */
.row::after { content: ''; display: table; clear: both; }
