/* =============================================================
   Resumé Tool — original clean design system
   Material-inspired structure, original brand identity.
   ============================================================= */

:root {
  /* Neutrals */
  --bg:        #ffffff;
  --surface:   #f8f9fa;
  --surface-2: #f1f3f4;
  --border:    #e2e5e9;
  --ink:       #1f2024;
  --muted:     #5b6168;

  /* Brand */
  --primary:        #1f6feb;
  --primary-dark:   #1559c4;
  --primary-tint:   #e9f1fe;
  --accent:         #f2643c;  /* warm secondary, used sparingly */
  --ok:             #1f9d57;
  --danger:         #d93b3b;

  /* Radii */
  --r-card:  12px;
  --r-input: 8px;
  --r-pill:  24px;

  /* Elevation */
  --shadow-card: 0 1px 2px rgba(31,32,36,.18), 0 2px 8px rgba(31,32,36,.08);
  --shadow-lift: 0 4px 10px rgba(31,32,36,.16), 0 8px 28px rgba(31,32,36,.10);

  --maxw: 1280px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Roboto", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .display {
  font-family: "Plus Jakarta Sans", "Roboto", sans-serif;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: var(--primary); text-decoration: none; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  font-size: 20px;
  line-height: 1;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===================== NAV ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  transition: box-shadow .2s ease;
}
.nav.scrolled { box-shadow: 0 1px 0 var(--border), 0 4px 14px rgba(31,32,36,.06); }
.nav__inner {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Original wordmark — coordinating document glyph + playful multi-colour text.
   Palette is an original coordinated set (blue / coral / amber / green / violet),
   not a copy of any existing brand's logo colours. */
:root {
  --w-blue:   #1f6feb;
  --w-coral:  #f2643c;
  --w-amber:  #eaa321;
  --w-green:  #1f9d57;
  --w-violet: #7b5cff;
}
.brand { display: flex; align-items: baseline; gap: 11px; }
.brand__mark {
  align-self: center;
  display: grid; place-items: center;
  color: var(--w-blue);
}
.brand__mark .material-symbols-outlined {
  font-size: 27px;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.brand__word {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.brand__word .c1 { color: var(--w-blue); }
.brand__word .c2 { color: var(--w-coral); }
.brand__word .c3 { color: var(--w-amber); }
.brand__word .c4 { color: var(--w-green); }
.brand__word .c5 { color: var(--w-violet); }
.brand__word .tool { color: var(--ink); font-weight: 600; }
.brand__tag {
  font-family: "Roboto", sans-serif;
  font-size: 14px; font-weight: 400; color: var(--muted);
  padding-left: 13px; margin-left: 2px;
  border-left: 1px solid var(--border);
  align-self: center;
}
@media (max-width: 720px) { .brand__tag { display: none; } }

/* ===================== BUTTONS ===================== */
.btn {
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: var(--r-pill);
  padding: 10px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn .material-symbols-outlined { font-size: 18px; }
.btn--filled { background: var(--primary); color: #fff; }
.btn--filled:hover { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(31,111,235,.35); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--surface); border-color: #cfd4da; }
.btn--outline { background: #fff; color: var(--primary); border: 1px solid #c5d8f7; }
.btn--outline:hover { background: var(--primary-tint); }
.btn--text { background: transparent; color: var(--primary); padding: 8px 10px; border-radius: var(--r-input); }
.btn--text:hover { background: var(--primary-tint); }
.btn[disabled] { opacity: .55; cursor: default; pointer-events: none; }

/* ===================== TOOL SECTION ===================== */
.tool {
  background: var(--surface);
  padding: 80px 24px;
}
.tool__head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.tool__head h1 { font-size: 36px; font-weight: 700; color: var(--ink); }
.tool__head p { font-size: 16px; color: var(--muted); margin-top: 10px; }

.card {
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 42% 58%;
  overflow: hidden;
}
.divider-v { /* the vertical rule is the editor's right border */ }

/* ---- Editor (left) ---- */
.editor {
  border-right: 1px solid var(--border);
  max-height: 1100px;
  overflow-y: auto;
  padding: 24px 28px 40px;
}
.editor::-webkit-scrollbar { width: 10px; }
.editor::-webkit-scrollbar-thumb { background: #d7dbe0; border-radius: 8px; border: 3px solid #fff; }

/* Sample banner chip */
.banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--primary-tint);
  color: #14418f;
  border: 1px solid #cfe0fb;
  border-radius: var(--r-pill);
  padding: 9px 10px 9px 16px;
  font-size: 13px;
  margin-bottom: 22px;
}
.banner .material-symbols-outlined { font-size: 18px; color: var(--primary); }
.banner button {
  margin-left: auto; background: transparent; border: none; cursor: pointer;
  color: #14418f; display: grid; place-items: center; border-radius: 50%;
  width: 26px; height: 26px;
}
.banner button:hover { background: rgba(20,65,143,.1); }

/* Collapsible section */
.section { border-bottom: 1px solid var(--border); }
.section__header {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 4px;
  background: transparent; border: none; cursor: pointer;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px; font-weight: 600; color: var(--ink);
  text-align: left;
}
.section__header .lead { color: var(--primary); }
.section__header .count { color: var(--muted); font-weight: 400; font-size: 13px; }
.section__header .chev {
  margin-left: auto; color: var(--muted);
  transition: transform .25s ease;
}
.section.open .section__header .chev { transform: rotate(180deg); }
.section__body {
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
}
.section.open .section__body { max-height: 4000px; }
.section__inner { padding: 4px 4px 22px; }

/* Form fields */
.field { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2 .field { margin-bottom: 0; }
label.lbl {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--muted); margin-bottom: 5px; letter-spacing: .01em;
}
.inp, textarea.inp {
  width: 100%;
  font-family: "Roboto", sans-serif; font-size: 14px; color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  padding: 10px 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.inp:focus, textarea.inp:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
  outline: none;
}
textarea.inp { resize: vertical; min-height: 60px; line-height: 1.5; }

/* Dynamic bullet rows */
.bullets { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.bullet-row { display: flex; align-items: flex-start; gap: 8px; }
.bullet-row .inp { flex: 1; }
.icon-btn {
  flex: none; width: 36px; height: 36px;
  border: 1px solid var(--border); background: #fff; border-radius: var(--r-input);
  cursor: pointer; display: grid; place-items: center; color: var(--muted);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: #fdecea; color: var(--danger); border-color: #f5c6c0; }
.add-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary); font-weight: 500; font-size: 13px;
  background: transparent; border: none; cursor: pointer; padding: 8px 4px; margin-top: 4px;
}
.add-link:hover { text-decoration: underline; }
.add-link .material-symbols-outlined { font-size: 18px; }

/* Skill chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; margin-bottom: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-tint); color: var(--primary);
  border-radius: var(--r-pill); padding: 5px 6px 5px 12px;
  font-size: 13px; font-weight: 500;
}
.chip button {
  background: transparent; border: none; cursor: pointer; color: var(--primary);
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
}
.chip button:hover { background: rgba(31,111,235,.18); }
.chip .material-symbols-outlined { font-size: 16px; }

/* Repeatable entry block */
.entry {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; margin-bottom: 14px; background: #fff;
  position: relative;
}
.entry__top { display: flex; align-items: center; margin-bottom: 12px; }
.entry__top .ttl { font-weight: 600; font-size: 13px; color: var(--muted); }
.entry__del {
  margin-left: auto; background: transparent; border: none; cursor: pointer;
  color: var(--muted); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
}
.entry__del:hover { background: #fdecea; color: var(--danger); }

/* Present toggle chip */
.toggle-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: var(--r-pill); padding: 8px 14px; cursor: pointer; font-size: 13px; font-weight: 500;
  user-select: none;
}
.toggle-chip.on { background: var(--primary-tint); border-color: #c5d8f7; color: var(--primary); }
.toggle-chip .material-symbols-outlined { font-size: 16px; }

/* AI button + states */
.ai-btn { margin-top: 12px; }
.ai-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid var(--primary-tint); border-top-color: var(--primary);
  animation: spin .7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.snackbar {
  display: none; align-items: center; gap: 8px;
  background: #fdecea; color: var(--danger); border: 1px solid #f5c6c0;
  border-radius: var(--r-input); padding: 8px 12px; font-size: 13px; margin-top: 10px;
}
.snackbar.show { display: flex; }
.snackbar .material-symbols-outlined { font-size: 18px; }

/* ---- Preview (right) ---- */
.preview-col {
  display: flex; flex-direction: column;
  background: var(--surface-2);
  max-height: 1100px;
}
.preview-controls { padding: 24px 24px 12px; }
.ctrl-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }

/* Template picker */
.templates { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.tpl-card {
  flex: none; width: 96px; cursor: pointer; text-align: center;
}
.tpl-card .thumb {
  height: 110px; width: 96px;
  border: 1.5px solid var(--border); border-radius: var(--r-input);
  background: #fff; overflow: hidden; position: relative;
  transition: border-color .15s, box-shadow .15s;
}
.tpl-card.active .thumb { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); background: var(--primary-tint); }
.tpl-card .lbl2 { font-size: 12px; color: var(--muted); margin-top: 7px; font-weight: 500; }
.tpl-card.active .lbl2 { color: var(--primary); }
/* mini thumb skeleton */
.thumb .mini { padding: 9px 8px; }
.thumb .mini .l { height: 3px; border-radius: 2px; background: #d7dbe0; margin-bottom: 4px; }
.thumb .mini .l.name { height: 6px; background: #9aa0a6; width: 70%; margin-bottom: 6px; }
.thumb .mini .l.acc { background: var(--tpl-accent, var(--primary)); }
.thumb .mini.modern { padding-left: 16px; }
.thumb .mini.modern::before { content:""; position:absolute; left:0; top:0; bottom:0; width:9px; background: var(--tpl-accent, var(--primary)); }
.thumb .mini.exec { text-align:center; }
.thumb .mini.exec .l.name { margin: 0 auto 6px; }
.thumb .mini.exec .l { margin-left:auto; margin-right:auto; }

/* Accent swatches */
.accent-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border);
  transition: transform .12s, box-shadow .12s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
.hex-wrap { display: inline-flex; align-items: center; gap: 6px; }
.hex-input {
  width: 92px; font-family: "Roboto Mono", monospace; font-size: 12px;
  border: 1px solid var(--border); border-radius: var(--r-input); padding: 7px 9px;
}
.hex-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-tint); }

/* Ad slots */
.ad-wrap { margin: 18px 0 4px; }
.ad-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; letter-spacing: .03em; }
.ad-box {
  background: repeating-linear-gradient(45deg, #f1f3f4, #f1f3f4 10px, #ececee 10px, #ececee 20px);
  border: 1px dashed #cfd4da; border-radius: var(--r-input);
  display: grid; place-items: center; color: #9aa0a6;
  font-family: "Roboto Mono", monospace; font-size: 12px;
}
#ad-sidebar { width: 300px; height: 250px; max-width: 100%; }
#ad-footer-box { width: 100%; height: 110px; }
.ad-sidebar-wrap { display: block; }

/* Live preview surround */
.preview-scroll {
  flex: 1; overflow: auto; padding: 8px 24px 24px;
  display: flex; justify-content: center;
}
.page-frame {
  background: #fff;
  box-shadow: var(--shadow-lift);
  transform-origin: top center;
}

/* Export bar */
.export-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px; background: #fff; border-top: 1px solid var(--border);
}
.export-bar .spacer { flex: 1; }

/* ===================== RESUME PAGE (8.5x11) ===================== */
.resume {
  width: 816px;        /* 8.5in @ 96dpi */
  min-height: 1056px;  /* 11in */
  padding: 64px 68px;
  font-family: "Roboto", Arial, sans-serif;
  color: #1a1a1a;
  font-size: 13px;
  line-height: 1.5;
  --rc: var(--primary); /* resume accent color, set inline */
}
.resume h2.r-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 30px; font-weight: 700; letter-spacing: -0.01em; color: #161616;
}
.resume .r-contact { color: #555; font-size: 12px; margin-top: 6px; }
.resume .r-section { margin-top: 22px; }
.resume .r-sec-title {
  font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--rc); margin-bottom: 8px;
}
.resume .r-item { margin-bottom: 13px; }
.resume .r-item .row1 { display: flex; justify-content: space-between; gap: 12px; }
.resume .r-item .role { font-weight: 700; color: #1a1a1a; font-size: 13.5px; }
.resume .r-item .org { color: #333; }
.resume .r-item .dates { color: #777; font-size: 12px; white-space: nowrap; }
.resume .r-item .rsum { color: #444; font-style: italic; margin: 2px 0 4px; }
.resume ul.r-bul { margin: 4px 0 0; padding-left: 18px; }
.resume ul.r-bul li { margin-bottom: 3px; }
.resume .r-skills { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.resume .r-skills span { background: #f0f2f4; border-radius: 4px; padding: 3px 9px; font-size: 12px; color: #333; }
.resume .r-tagline { color: #333; margin-bottom: 8px; }
.resume .r-divider { height: 1px; background: #e0e0e0; margin: 4px 0 0; }

/* template: google-doc (default) — already styled above */

/* template: modern — left accent sidebar stripe */
.resume.t-modern { padding-left: 92px; position: relative; }
.resume.t-modern::before { content:""; position:absolute; left:0; top:0; bottom:0; width:14px; background: var(--rc); }
.resume.t-modern .r-name { font-size: 27px; }
.resume.t-modern .r-section { margin-top: 18px; }

/* template: executive — centered serif header, divider lines */
.resume.t-exec { font-family: Georgia, "Times New Roman", serif; }
.resume.t-exec .r-name { font-family: Georgia, serif; text-align: center; font-weight: 700; letter-spacing: .02em; }
.resume.t-exec .r-contact { text-align: center; }
.resume.t-exec .r-sec-title { text-align: center; border-bottom: 1.5px solid var(--rc); padding-bottom: 4px; letter-spacing: .12em; }
.resume.t-exec ul.r-bul, .resume.t-exec .r-skills span { font-family: Georgia, serif; }

/* template: classic — all black, tabular dates */
.resume.t-classic { color: #000; }
.resume.t-classic .r-name { color: #000; font-family: "Times New Roman", Georgia, serif; }
.resume.t-classic .r-sec-title { color: #000; border-bottom: 1px solid #000; padding-bottom: 3px; }
.resume.t-classic .r-skills span { background: transparent; border: 1px solid #000; border-radius: 0; }
.resume.t-classic .dates { color: #000; }

/* ===================== FOOTER ===================== */
.footer {
  background: #fff; border-top: 1px solid var(--border);
  min-height: 48px; display: flex; align-items: center;
}
.footer__inner {
  max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 13px; gap: 16px; flex-wrap: wrap;
}
.footer__inner .heart { color: var(--accent); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .card { grid-template-columns: 1fr; }
  .editor { border-right: none; border-bottom: 1px solid var(--border); max-height: none; }
  .preview-col { max-height: none; }
  .ad-sidebar-wrap { display: none; } /* sidebar ad desktop-only */
}
@media (max-width: 768px) {
  .tool { padding: 48px 14px; }
  .tool__head h1 { font-size: 28px; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ===================== PRINT ===================== */
@media print {
  @page { margin: 0; size: letter; }
  body { background: #fff; }
  .nav, .tool__head, .editor, .preview-controls, .export-bar,
  .footer, .ad-wrap, .templates, .accent-row, .ctrl-label,
  .banner { display: none !important; }
  .tool { padding: 0 !important; background: #fff !important; }
  .card { box-shadow: none !important; max-width: none !important; display: block !important; border-radius: 0 !important; }
  .preview-col { background: #fff !important; max-height: none !important; }
  .preview-scroll { overflow: visible !important; padding: 0 !important; display: block !important; }
  .page-frame { box-shadow: none !important; transform: none !important; }
  .resume { width: 100% !important; min-height: auto !important; padding: 0.5in 0.6in !important; }
}
