/* =========================================================
   IWantFreeResume.com — Global Stylesheet
   Design: Clean Professional Light Premium
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #f8fafc;
  --white: #ffffff;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #0ea5e9;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #93c5fd;
  --card-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --card-shadow-lg: 0 4px 16px rgba(0,0,0,.1);
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.18s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
ul { list-style: none; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-line { display: flex; align-items: baseline; gap: 0; }
.logo-iwantfree { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.logo-resume { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.logo-dot { font-size: 1.05rem; font-weight: 500; color: var(--text-muted); }
.logo-tagline { font-size: 0.68rem; color: var(--text-muted); margin-top: 1px; font-weight: 400; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav a:hover { color: var(--text); background: var(--bg); text-decoration: none; }
.btn-nav-cta {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
}
.btn-nav-cta:hover { background: var(--primary-hover) !important; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; transition: var(--transition); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; color: var(--white); }
.btn-secondary { background: var(--white); color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover { background: #eff6ff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: #94a3b8; color: var(--text); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-danger { background: #fee2e2; color: var(--error); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #059669; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 50%, #f8fafc 100%);
  padding: 80px 0 60px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto 16px;
  line-height: 1.2;
}
.hero h1 span { color: var(--primary); }
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.65;
}
.trust-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--card-shadow);
}
.trust-badge .badge-icon { font-size: 1rem; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.hero-social-proof { font-size: 0.875rem; color: var(--text-muted); }
.hero-social-proof strong { color: var(--text); }

/* ── How it works ── */
.how-it-works { padding: 64px 0; background: var(--white); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 1.75rem; margin-bottom: 8px; }
.section-header p { color: var(--text-muted); font-size: 1rem; }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.step-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
}
.step-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step-card p { font-size: 0.9rem; color: var(--text-muted); }

/* ── Template Preview ── */
.templates-preview { padding: 64px 0; }
.template-preview-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.template-preview-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.template-preview-card:hover { border-color: var(--primary); box-shadow: var(--card-shadow-lg); }
.template-preview-thumb {
  height: 200px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.template-mini { transform: scale(0.38); transform-origin: top center; width: 260%; position: absolute; top: 8px; left: -80%; }
.template-preview-info { padding: 16px; border-top: 1px solid var(--border); }
.template-preview-info h3 { font-size: 0.95rem; margin-bottom: 4px; }
.template-preview-info p { font-size: 0.8rem; color: var(--text-muted); }

/* ── Builder Section ── */
.builder-section { padding: 48px 0 80px; }
.builder-header { text-align: center; margin-bottom: 32px; }
.builder-header h2 { font-size: 1.75rem; margin-bottom: 8px; }
.builder-header p { color: var(--text-muted); }

.builder-layout {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 24px;
  align-items: start;
}

/* Editor Panel */
.editor-panel {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.progress-bar-wrap {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.progress-label .progress-strength { color: var(--primary); }
.progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.4s ease;
}

.save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  font-size: 0.8rem;
  color: #166534;
  display: none;
}
.save-row.visible { display: flex; }

.section-tabs {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
  overflow: visible;
}
.section-tabs-inner {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: visible;
  padding: 8px 0 0 12px;
  gap: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
}
.section-tabs-inner::-webkit-scrollbar { display: none; }
/* trailing spacer so last tab is never clipped by overflow */
.section-tabs-inner::after {
  content: '';
  flex-shrink: 0;
  width: 12px;
}
.tab-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); background: var(--bg); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; background: var(--bg); }
.tab-icon { display: none; }

.section-pane { display: none; padding: 20px; }
.section-pane.active { display: block; }

/* Form styles */
.field-group { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}
.field-label .optional { font-weight: 400; color: var(--text-muted); }
.field-input, .field-select, .field-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.field-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.field-hint {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.char-count { font-size: 0.75rem; color: var(--text-muted); text-align: right; margin-top: 3px; }

/* Experience / entry cards */
.entry-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
}
.entry-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  cursor: grab;
}
.entry-card-header:active { cursor: grabbing; }
.entry-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.drag-handle { color: var(--text-muted); font-size: 1.1rem; cursor: grab; }
.entry-card-actions { display: flex; gap: 6px; }
.entry-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.entry-toggle:hover { color: var(--text); background: var(--border); }
.entry-body { display: block; }
.entry-body.collapsed { display: none; }

.add-entry-btn {
  width: 100%;
  padding: 10px;
  border: 2px dashed var(--border);
  background: transparent;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.add-entry-btn:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }

/* Bullet helper */
.bullet-helper {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 6px;
  font-size: 0.8rem;
}
.bullet-helper-title { font-weight: 600; color: #92400e; margin-bottom: 6px; }
.bullet-formula { color: #78350f; margin-bottom: 6px; }
.verb-suggestions { display: flex; flex-wrap: wrap; gap: 5px; }
.verb-chip {
  background: var(--white);
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #92400e;
  cursor: pointer;
  transition: background var(--transition);
}
.verb-chip:hover { background: #fef3c7; }

/* Skills section */
.skills-input-wrap { position: relative; }
.skills-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  border-top: none;
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--card-shadow-lg);
}
.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background var(--transition);
}
.autocomplete-item:hover { background: #eff6ff; }
.skills-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; min-height: 36px; }
.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary);
}
.skill-tag-remove {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  opacity: 0.6;
}
.skill-tag-remove:hover { opacity: 1; }

.industry-suggestions {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 12px;
}
.industry-suggestions h4 { font-size: 0.82rem; color: #166534; margin-bottom: 8px; font-weight: 600; }
.suggested-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.suggested-skill {
  background: var(--white);
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  color: #166534;
  transition: background var(--transition);
}
.suggested-skill:hover { background: #dcfce7; }
.suggested-skill.added { opacity: 0.4; cursor: default; }

/* Singapore section */
.sg-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.sg-section-header h3 { font-size: 0.95rem; color: #0369a1; }
.sg-section-header p { font-size: 0.78rem; color: #0284c7; margin-top: 2px; }
.sg-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.8rem;
  color: #9a3412;
  margin-top: 8px;
}

/* Checkbox styles */
.checkbox-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.checkbox-wrap input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.checkbox-wrap label { font-size: 0.875rem; font-weight: 500; color: var(--text); cursor: pointer; }
.ns-fields { margin-top: 8px; padding: 12px; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* Language tags */
.language-entries { margin-top: 8px; }
.lang-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.lang-entry .field-select { flex: 1; }
.lang-remove { background: none; border: none; color: var(--error); cursor: pointer; font-size: 1.1rem; padding: 4px; flex-shrink: 0; }

/* Editor footer */
.editor-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.download-btn {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
  border-radius: var(--radius);
}
.resume-saves {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.save-slot-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  font-family: var(--font);
}
.save-slot-btn:hover { border-color: var(--primary); color: var(--primary); }
.save-slot-btn.active { border-color: var(--primary); background: #eff6ff; color: var(--primary); font-weight: 600; }
.reset-link { font-size: 0.775rem; color: var(--text-muted); text-align: center; cursor: pointer; text-decoration: underline; }
.reset-link:hover { color: var(--error); }

/* Preview Panel */
.preview-panel {
  position: sticky;
  top: 80px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.preview-title { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.template-switcher { display: flex; gap: 6px; }
.tpl-btn {
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  font-family: var(--font);
}
.tpl-btn:hover { border-color: var(--primary); color: var(--primary); }
.tpl-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

.resume-preview-wrap {
  height: 520px;
  overflow-y: auto;
  padding: 12px;
  background: #f1f5f9;
}
.resume-preview-inner {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
  min-height: 400px;
}

/* ATS Score Panel */
.ats-panel {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
}
.ats-panel-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ats-score-value { color: var(--primary); font-size: 1rem; font-weight: 700; }
.ats-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.ats-fill { height: 100%; border-radius: 3px; background: var(--primary); transition: width 0.4s ease; }
.ats-checks { display: flex; flex-direction: column; gap: 4px; }
.ats-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ats-check .ck-icon { font-size: 0.9rem; flex-shrink: 0; }
.ats-check.pass { color: #166534; }
.ats-check.warn { color: #92400e; }
.ats-check.fail { color: #991b1b; }

/* ── Tools Section ── */
.tools-section { padding: 64px 0; background: var(--white); }
.tools-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.tool-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  display: block;
}
.tool-card:hover { border-color: var(--primary); box-shadow: var(--card-shadow-lg); text-decoration: none; }
.tool-icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.tool-card h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text); }
.tool-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }
.tool-card .tool-link { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--primary); margin-top: 10px; }

/* ── Resume Templates CSS ── */
.resume-template { font-family: Georgia, 'Times New Roman', serif; font-size: 10pt; color: #111; }

/* Classic */
.template-classic { padding: 32px 36px; }
.template-classic .r-header { text-align: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid #111; }
.template-classic .r-name { font-size: 22pt; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 4px; }
.template-classic .r-headline { font-size: 10.5pt; color: #444; font-style: italic; margin-bottom: 8px; }
.template-classic .r-contact { font-size: 9pt; color: #333; }
.template-classic .r-section { margin-bottom: 16px; }
.template-classic .r-section-title {
  font-size: 10pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #111;
  border-bottom: 1px solid #ddd;
  padding-bottom: 3px;
  margin-bottom: 10px;
}
.template-classic .r-summary { font-size: 10pt; line-height: 1.5; color: #222; }
.template-classic .r-exp-item { margin-bottom: 12px; }
.template-classic .r-exp-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.template-classic .r-exp-title { font-weight: 700; font-size: 10.5pt; }
.template-classic .r-exp-dates { font-size: 9pt; color: #444; white-space: nowrap; }
.template-classic .r-exp-desc ul { padding-left: 16px; list-style: disc; margin-top: 4px; }
.template-classic .r-exp-desc li { margin-bottom: 2px; font-size: 9.5pt; line-height: 1.45; }
.template-classic .r-exp-desc p { font-size: 9.5pt; line-height: 1.45; }
.template-classic .r-edu-item { margin-bottom: 10px; }
.template-classic .r-edu-detail { font-size: 9pt; color: #555; margin-top: 2px; }
.template-classic .r-skills-classic { font-size: 9.5pt; line-height: 1.6; }
.template-classic .r-certs { font-size: 9.5pt; }
.template-classic .r-cert-item { margin-bottom: 4px; }
.template-classic .r-project-item { margin-bottom: 10px; }
.template-classic .r-project-desc { font-size: 9pt; color: #333; margin-top: 3px; }
.template-classic .r-project-skills { font-size: 8.5pt; color: #555; }
.template-classic .r-vol-item { margin-bottom: 8px; }
.template-classic .r-info-list { font-size: 9.5pt; }
.template-classic .r-info-item { margin-bottom: 3px; }
.template-classic .r-memberships { font-size: 9.5pt; }
.template-classic .r-mem-item { margin-bottom: 3px; }

/* Modern */
.template-modern { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #111; }
.template-modern .rm-header {
  background: #1e3a5f;
  color: white;
  padding: 24px 28px 20px;
}
.template-modern .rm-name { font-size: 20pt; font-weight: 700; color: white; margin-bottom: 4px; }
.template-modern .rm-headline { font-size: 10.5pt; color: #93c5fd; }
.template-modern .rm-body { display: flex; min-height: 400px; }
.template-modern .rm-sidebar { width: 200px; flex-shrink: 0; background: #f0f4f8; padding: 16px; }
.template-modern .rm-main { flex: 1; padding: 16px 20px; }
.template-modern .rm-section { margin-bottom: 14px; }
.template-modern .rm-sidebar-title {
  font-size: 7.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1e3a5f;
  border-bottom: 1.5px solid #1e3a5f;
  padding-bottom: 3px;
  margin-bottom: 8px;
}
.template-modern .rm-contact-item { font-size: 8pt; color: #333; margin-bottom: 4px; word-break: break-all; }
.template-modern .rm-main-title {
  font-size: 10pt;
  font-weight: 700;
  color: #1e3a5f;
  border-bottom: 1.5px solid #1e3a5f;
  padding-bottom: 3px;
  margin-bottom: 10px;
}
.template-modern .rm-summary { font-size: 9.5pt; line-height: 1.5; }
.template-modern .rm-skills { display: flex; flex-wrap: wrap; gap: 4px; }
.template-modern .rm-skill-tag {
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 7.5pt;
  font-weight: 500;
}
.template-modern .rm-lang-item { font-size: 8pt; margin-bottom: 5px; }
.template-modern .rm-detail { font-size: 8pt; color: #333; margin-bottom: 4px; }
.template-modern .rm-exp-item { margin-bottom: 11px; }
.template-modern .rm-exp-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.template-modern .rm-exp-title { font-weight: 700; font-size: 10pt; }
.template-modern .rm-exp-company { font-size: 9.5pt; color: #444; }
.template-modern .rm-exp-location { font-size: 9pt; color: #666; }
.template-modern .rm-exp-dates { font-size: 8.5pt; color: #555; white-space: nowrap; flex-shrink: 0; }
.template-modern .rm-exp-desc ul { padding-left: 14px; list-style: disc; margin-top: 3px; }
.template-modern .rm-exp-desc li { font-size: 9pt; margin-bottom: 2px; line-height: 1.4; }
.template-modern .rm-exp-desc p { font-size: 9pt; line-height: 1.4; }
.template-modern .rm-edu-item { margin-bottom: 10px; }
.template-modern .rm-edu-detail { font-size: 8.5pt; color: #555; margin-top: 2px; }

/* Minimal */
.template-minimal { font-family: Helvetica, Arial, sans-serif; font-size: 10pt; color: #111; padding: 36px 40px; }
.template-minimal .rmin-header { text-align: center; margin-bottom: 20px; }
.template-minimal .rmin-name { font-size: 20pt; font-weight: 700; letter-spacing: -0.5px; color: #111; margin-bottom: 4px; }
.template-minimal .rmin-headline { font-size: 10pt; color: #666; margin-bottom: 6px; }
.template-minimal .rmin-contact { font-size: 8.5pt; color: #555; }
.template-minimal .rmin-section { margin-bottom: 16px; padding-bottom: 4px; }
.template-minimal .rmin-title {
  font-size: 8pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #888;
  margin-bottom: 10px;
}
.template-minimal .rmin-summary { font-size: 9.5pt; line-height: 1.6; color: #333; border-left: 2px solid #ddd; padding-left: 12px; }
.template-minimal .rmin-item { margin-bottom: 12px; }
.template-minimal .rmin-item-header { display: flex; justify-content: space-between; align-items: baseline; }
.template-minimal .rmin-item-main { font-size: 10pt; font-weight: 600; }
.template-minimal .rmin-item-date { font-size: 8.5pt; color: #777; white-space: nowrap; }
.template-minimal .rmin-desc ul { padding-left: 14px; list-style: disc; margin-top: 4px; }
.template-minimal .rmin-desc li { font-size: 9pt; margin-bottom: 2px; line-height: 1.45; }
.template-minimal .rmin-desc p { font-size: 9pt; line-height: 1.45; }
.template-minimal .rmin-detail { font-size: 8.5pt; color: #666; }
.template-minimal .rmin-skills { font-size: 9.5pt; color: #333; line-height: 1.6; }

/* ── Footer ── */
.site-footer {
  background: var(--text);
  color: #94a3b8;
  padding: 48px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand .logo-iwantfree { color: var(--white); }
.footer-brand p { font-size: 0.875rem; margin-top: 8px; line-height: 1.6; }
.footer-col h4 { color: var(--white); font-size: 0.875rem; font-weight: 600; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #94a3b8; font-size: 0.875rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--white); text-decoration: none; }
.footer-divider { border: none; border-top: 1px solid #1e293b; margin-bottom: 20px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.8rem; }
.footer-family { font-size: 0.8rem; }
.footer-family a { color: #64748b; transition: color var(--transition); }
.footer-family a:hover { color: #94a3b8; }

/* ── Blog ── */
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.blog-card:hover { box-shadow: var(--card-shadow-lg); }
.blog-card-thumb { height: 140px; background: linear-gradient(135deg, #eff6ff, #f0f9ff); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.blog-card-body { padding: 16px; }
.blog-tag { display: inline-block; background: #eff6ff; color: var(--primary); padding: 3px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; margin-bottom: 8px; }
.blog-card-body h3 { font-size: 0.95rem; margin-bottom: 6px; }
.blog-card-body h3 a { color: var(--text); }
.blog-card-body h3 a:hover { color: var(--primary); text-decoration: none; }
.blog-card-body p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.blog-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; }

/* Article content */
.article-hero { background: linear-gradient(135deg, #eff6ff, #f0f9ff); padding: 48px 0; }
.article-hero h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); max-width: 700px; margin-bottom: 10px; }
.article-meta { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 8px; }
.article-body { padding: 48px 0; }
.article-body h2 { font-size: 1.4rem; margin: 32px 0 12px; color: var(--text); }
.article-body h3 { font-size: 1.1rem; margin: 24px 0 10px; }
.article-body p { margin-bottom: 16px; line-height: 1.75; font-size: 1rem; color: #334155; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 6px; line-height: 1.65; font-size: 1rem; color: #334155; }
.article-callout { background: #eff6ff; border-left: 4px solid var(--primary); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 24px 0; }
.article-callout p { margin: 0; font-weight: 500; color: #1e3a5f; }
.article-cta { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; padding: 32px; border-radius: var(--radius); text-align: center; margin: 40px 0; }
.article-cta h3 { color: white; margin-bottom: 8px; }
.article-cta p { color: rgba(255,255,255,.85); margin-bottom: 16px; }
.btn-white { background: white; color: var(--primary); }
.btn-white:hover { background: #f0f9ff; color: var(--primary); text-decoration: none; }

/* ── Tools pages ── */
.tool-hero { background: linear-gradient(135deg, #eff6ff, #f0f9ff); padding: 48px 0; text-align: center; }
.tool-hero h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 8px; }
.tool-hero p { color: var(--text-muted); font-size: 1rem; max-width: 560px; margin: 0 auto; }
.tool-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 40px 0; }
.tool-panel { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; box-shadow: var(--card-shadow); }
.tool-panel h2 { font-size: 1.1rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.tool-result { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; min-height: 200px; }
.score-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0%, var(--border) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* ── Page hero (about, privacy, etc) ── */
.page-hero { background: linear-gradient(135deg, #eff6ff, #f0f9ff); padding: 48px 0; }
.page-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.page-body { padding: 48px 0; }
.page-body h2 { font-size: 1.3rem; margin: 28px 0 10px; }
.page-body p { margin-bottom: 14px; line-height: 1.75; color: #334155; }
.page-body ul { margin: 0 0 14px 24px; list-style: disc; }
.page-body li { margin-bottom: 6px; line-height: 1.65; color: #334155; }

/* ── Mobile Preview Toggle ── */
.preview-mobile-toggle {
  display: none;
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  margin-top: 16px;
  border-radius: var(--radius);
}

/* ── Notification toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  z-index: 999;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── Salary Guide ── */
.salary-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.salary-table th { background: var(--bg); padding: 10px 14px; text-align: left; font-weight: 600; border-bottom: 2px solid var(--border); color: var(--text); }
.salary-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.salary-table tr:hover td { background: #f8fafc; }
.salary-range { font-weight: 600; color: var(--primary); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .builder-layout { grid-template-columns: 1fr; }
  .preview-panel { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--border); padding: 12px; z-index: 100; }
  .hamburger { display: block; }
  .steps-grid, .template-preview-grid, .tools-grid, .blog-grid { grid-template-columns: 1fr; }
  .tool-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .hero { padding: 48px 0 40px; }
  .preview-mobile-toggle { display: block; }
  .builder-layout .preview-panel { display: none; }
  .builder-layout .preview-panel.mobile-visible { display: block; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
}

/* ── Narrow mobile: compact tabs, hide emoji icons ── */
@media (max-width: 640px) {
  .tab-btn {
    padding: 10px 10px;
    font-size: 0.75rem;
  }
  .tab-icon {
    display: none;
  }
}

/* ── Print / PDF ── */
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; position: fixed; top: 0; left: 0; width: 100%; z-index: 9999; }
  @page {
    size: A4;
    margin: 15mm;
  }
  .resume-template { font-size: 10pt; }
  a { color: inherit; text-decoration: none; }
  .template-modern .rm-sidebar { background: #f0f4f8 !important; }
  .template-modern .rm-header { background: #1e3a5f !important; }
  .template-modern .rm-skill-tag { background: #dbeafe !important; }
}
