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

:root {
  --bg: #fafaf9;
  --surface: #fff;
  --border: #e5e5e0;
  --text: #1a1a1a;
  --text-dim: #666;
  --accent: #4f46e5;
  --accent-light: #ede9fe;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --content-w: 760px;
}

body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.7; }

/* ── Hero ── */
.hero {
  background: var(--surface); border-bottom: 1px solid var(--border); padding: 80px 24px 60px;
}
.hero-inner { max-width: var(--content-w); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.tagline { color: var(--text-dim); font-size: 18px; margin-bottom: 20px; }
.company-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { background: var(--accent-light); color: var(--accent); font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 100px; }
.chat-btn {
  background: var(--accent); color: #fff; border: none; padding: 12px 28px;
  border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chat-btn:hover { background: #3730a3; }

/* ── Sections ── */
.section { max-width: var(--content-w); margin: 0 auto; padding: 56px 24px; border-bottom: 1px solid var(--border); }
.section h2 { font-size: 22px; font-weight: 700; margin-bottom: 32px; }

/* Experience */
.exp-item { margin-bottom: 32px; }
.exp-header { font-size: 15px; margin-bottom: 6px; }
.exp-dates { color: var(--text-dim); font-size: 13px; margin-left: 8px; }
.exp-body { color: var(--text-dim); font-size: 15px; }

/* Skills matrix */
.skills-matrix { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skills-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.skills-strong h3 { color: #16a34a; }
.skills-moderate h3 { color: #d97706; }
.skills-gap h3 { color: #dc2626; }
.skills-col ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.skills-col li { font-size: 14px; }

/* JD analyser */
#jd-input {
  width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 14px; resize: vertical; background: var(--surface);
  margin-bottom: 12px;
}
#jd-input:focus { outline: 2px solid var(--accent); }
#analyse-btn {
  background: var(--accent); color: #fff; border: none; padding: 10px 24px;
  border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
#analyse-btn:hover { background: #3730a3; }
.jd-result { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); padding: 24px; border-radius: 12px; font-size: 15px; }
.jd-result p { margin-bottom: 10px; }

/* ── Chat drawer ── */
.chat-drawer {
  position: fixed; right: 0; top: 0; height: 100vh; width: 380px;
  background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.25s ease;
  z-index: 200;
}
.chat-drawer.open { transform: translateX(0); }
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.3);
  opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 199;
}
.drawer-overlay.active { opacity: 1; pointer-events: auto; }
.drawer-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; font-weight: 600;
}
.drawer-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-dim); }
.drawer-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.drawer-msg { font-size: 14px; }
.drawer-msg-user .msg-content {
  background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 14px 14px 4px 14px;
  display: inline-block; max-width: 90%;
}
.drawer-msg-assistant .msg-content { color: var(--text); }
.drawer-input {
  padding: 16px; border-top: 1px solid var(--border); display: flex; gap: 8px;
}
.drawer-input input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-family: var(--font); font-size: 14px;
}
.drawer-input input:focus { outline: 2px solid var(--accent); }
#drawer-send {
  background: var(--accent); color: #fff; border: none; padding: 10px 18px;
  border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px;
}

@media (max-width: 600px) {
  .chat-drawer { width: 100vw; }
  .skills-matrix { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column; align-items: flex-start; }
}
