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

/* ── Design Tokens ────────────────────────────────────── */
:root {
  color-scheme: light dark;
  --bg-main: #FAFAFA;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;
  --text-primary: #111111;
  --text-secondary: #666666;
  --brand-purple: #111111;
  --brand-pink: #666666;
  --brand-gradient: linear-gradient(135deg, #111111, #444444);
  --border: #E5E5E5;
  --shadow: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.05);
  --radius: 6px;
  --radius-sm: 4px;
  --transition: 0.15s ease;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg-main: #0A0A0A;
    --bg-card: #121212;
    --bg-input: #121212;
    --text-primary: #EDEDED;
    --text-secondary: #A0A0A0;
    --brand-purple: #FFFFFF;
    --brand-pink: #A0A0A0;
    --brand-gradient: linear-gradient(135deg, #FFFFFF, #A0A0A0);
    --border: #262626;
    --shadow: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.4);
  }
}

/* ── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-main); color: var(--text-primary);
  min-height: 100vh; display: flex; flex-direction: column; align-items: center;
  line-height: 1.6; padding: 0 24px;
}
a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; transition: opacity var(--transition); }
a:hover { opacity: 0.7; }
button { font-family: inherit; cursor: pointer; border: none; transition: all var(--transition); }
input, textarea {
  font-family: inherit; font-size: 0.9rem; color: var(--text-primary);
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus { border-color: var(--text-primary); }
pre {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.8rem; white-space: pre-wrap; word-break: break-word;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; line-height: 1.5;
}

/* ── Layout ───────────────────────────────────────────── */
.container { width: min(640px, 100%); display: flex; flex-direction: column; gap: 48px; padding: 48px 0 96px; }

/* ── Navbar ───────────────────────────────────────────── */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  width: min(640px, 100%); padding: 32px 0 16px; flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.navbar-brand { font-size: 1rem; font-weight: 600; text-decoration: none; color: var(--text-primary); letter-spacing: -0.3px; }
.navbar-brand:hover { opacity: 1; }
.navbar-links { display: flex; align-items: center; gap: 20px; font-size: 0.85rem; }
.navbar-links a { color: var(--text-secondary); font-weight: 400; text-decoration: none; }
.navbar-links a:hover { color: var(--text-primary); }
.navbar-user { font-size: 0.8rem; color: var(--text-secondary); }
.navbar-sep { color: var(--border); font-size: 0.85rem; user-select: none; }

/* ── Buttons ──────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; font-size: 0.85rem; font-weight: 500; color: var(--bg-main);
  background: var(--text-primary); border: 1px solid var(--text-primary); border-radius: var(--radius);
  text-decoration: none;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; font-size: 0.82rem; font-weight: 500;
  color: var(--text-primary); background: transparent;
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none;
}
.btn-ghost:hover { background: var(--border); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title { font-size: 0.95rem; font-weight: 600; }

/* ── Badge ────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 8px; font-size: 0.75rem; font-weight: 500; border-radius: var(--radius-sm); white-space: nowrap; border: 1px solid transparent; }
.badge-success { background: transparent; border-color: #00c853; color: #00c853; }
.badge-warning { background: transparent; border-color: #ffab00; color: #ffab00; }
.badge-error   { background: transparent; border-color: #ff5252; color: #ff5252; }
.badge-info    { background: transparent; border-color: var(--text-primary); color: var(--text-primary); }
.badge-neutral { background: transparent; border-color: var(--border); color: var(--text-secondary); }

/* ── Loading Spinner ──────────────────────────────────── */
.loading-spinner { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 0; color: var(--text-secondary); }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--brand-purple); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error & Empty States ─────────────────────────────── */
.error-message {
  background: rgba(255,82,82,0.08); border: 1px solid rgba(255,82,82,0.2);
  border-radius: var(--radius); padding: 20px 24px; color: #ff5252; text-align: center;
}
.error-message p { margin-bottom: 12px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 24px; color: var(--text-secondary); text-align: center; }
.empty-state-icon { font-size: 2.5rem; }

/* ── Form ─────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.form-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.char-count { font-size: 0.82rem; color: var(--text-secondary); }
.char-count.warn { color: #ffab00; }
.char-count.over { color: #ff5252; }
textarea { width: 100%; resize: vertical; min-height: 130px; line-height: 1.6; }

/* ── Results ──────────────────────────────────────────── */
.results-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.results-count { font-size: 0.9rem; color: var(--text-secondary); }
.job-card { cursor: pointer; transition: all var(--transition); }
.job-card .card-header { margin-bottom: 0; }
.job-rank { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); min-width: 28px; }
.job-score { font-size: 0.85rem; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-sm); }
.job-preview { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; margin-top: 8px; }
.job-expanded { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.job-expanded.hidden { display: none; }
.job-company { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.score-breakdown { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; }
.score-item { display: flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.score-item strong { color: var(--text-primary); }
.chevron { display: inline-block; transition: transform var(--transition); font-size: 0.75rem; }
.chevron.open { transform: rotate(180deg); }

/* ── Hero (Landing) ───────────────────────────────────── */
.hero { text-align: left; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.6px; color: var(--text-primary); }
.hero h1 span { background: none; -webkit-background-clip: unset; -webkit-text-fill-color: unset; background-clip: unset; color: inherit; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--border); }
.hero p { font-size: 1.05rem; color: var(--text-secondary); max-width: 520px; line-height: 1.7; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-top: 4px; }
.step-card { text-align: left; background: transparent; border: none; border-top: 2px solid var(--text-primary); border-radius: 0; box-shadow: none; padding: 20px 0 0; }
.step-card:hover { box-shadow: none; }
.step-number { display: block; font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; font-family: monospace; }
.step-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.step-card p { font-size: 0.85rem; color: var(--text-secondary); }
.code-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }

/* ── Footer ───────────────────────────────────────────── */
.footer { text-align: left; padding: 48px 0 24px; font-size: 0.8rem; color: var(--text-secondary); border-top: 1px solid var(--border); width: min(640px, 100%); display: flex; flex-direction: column; gap: 12px; }
.footer p { margin: 0; }

/* ── Usage banner ─────────────────────────────────────── */
.usage-banner { display: flex; align-items: center; justify-content: space-between; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; font-size: 0.8rem; color: var(--text-secondary); }
.usage-banner.warn { border-color: rgba(255,171,0,0.4); background: transparent; }
.usage-banner.exhausted { border-color: rgba(255,82,82,0.4); background: transparent; color: #ff5252; }
.usage-banner #countdown-timer { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── FAQ ─────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 0; border-top: 2px solid var(--text-primary); }
.faq-item {
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  border-radius: 0; padding: 18px 0;
}
.faq-item:hover { box-shadow: none; }
.faq-item summary {
  font-weight: 500; font-size: 0.9rem; cursor: pointer;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  color: var(--text-primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 1rem; color: var(--text-secondary);
  transition: transform var(--transition); margin-left: 12px;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  margin-top: 10px; font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6;
}

/* ── Testimonials ─────────────────────────────────────── */
.testimonials-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px;
}
.testimonial-card {
  background: transparent; border: none; border-left: 2px solid var(--border);
  border-radius: 0; box-shadow: none;
  padding: 4px 0 4px 16px;
  quotes: none;
}
.testimonial-card:hover { box-shadow: none; }
.testimonial-card p {
  font-size: 0.85rem; color: var(--text-primary); line-height: 1.6; font-style: normal;
}
.testimonial-card footer {
  margin-top: 8px; font-size: 0.75rem; color: var(--text-secondary); font-style: normal; font-family: monospace;
}

/* ── Share Modal ──────────────────────────────────────── */
.share-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px);
}
.share-modal-content {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px; max-width: 380px; width: 90vw; position: relative;
  text-align: left;
}
.share-modal-content h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 16px; }
.share-buttons { display: flex; flex-direction: column; gap: 8px; }
.share-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500; text-decoration: none;
  cursor: pointer; border: 1px solid var(--border); transition: all var(--transition);
  color: var(--text-primary); background: transparent;
}
.share-twitter:hover, .share-linkedin:hover { background: var(--bg-main); border-color: var(--text-primary); }
.share-copy {
  background: var(--text-primary); color: var(--bg-main);
  border-color: var(--text-primary); font-family: inherit;
}
.share-copy:hover { opacity: 0.9; }
.share-close {
  position: absolute; top: 12px; right: 12px;
  font-size: 1.2rem; background: none; border: none;
  color: var(--text-secondary); cursor: pointer; padding: 4px;
}
.share-close:hover { color: var(--text-primary); }

/* ── Skip Link (accessibility) ────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 2000;
  background: var(--text-primary); color: var(--bg-main); padding: 8px 16px;
  border-radius: var(--radius-sm); font-weight: 500; text-decoration: none; font-size: 0.85rem;
}
.skip-link:focus { top: 8px; }

/* ── Back to Top ──────────────────────────────────────── */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 50;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--text-primary); color: var(--bg-main); border: 1px solid var(--text-primary);
  border-radius: var(--radius); font-size: 1rem; cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  opacity: 0; pointer-events: none;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { opacity: 0.9; }

/* ── Copy Prompt Button ───────────────────────────────── */
.copy-prompt-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; font-size: 0.75rem; font-weight: 500;
  color: var(--text-secondary); background: transparent;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.copy-prompt-btn:hover { border-color: var(--text-primary); color: var(--text-primary); }

/* ── Job Count Banner ─────────────────────────────────── */
.job-count-banner {
  text-align: center; padding: 10px; font-size: 0.8rem;
  color: var(--text-secondary); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ── Navbar Logo ─────────────────────────────────────── */
.navbar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  margin-right: 4px;
  vertical-align: middle;
  color: var(--text-primary);
}
.navbar-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Minimal Landing Utilities ─────────────────────────── */
.section-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 20px; letter-spacing: -0.3px; color: var(--text-primary); }
.testimonials-section { margin: 8px 0; }
.faq-section { margin: 8px 0; }
.example-prompts { display: flex; flex-direction: column; gap: 12px; }
.last-updated-section { padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.last-updated-text { font-size: 0.8rem; color: var(--text-secondary); text-align: left; }
.cta-section { text-align: left; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
.footer-nav a { text-decoration: none; color: var(--text-secondary); }
.footer-nav a:hover { color: var(--text-primary); }
.copyright { margin-top: 6px; font-size: 0.75rem; color: var(--text-secondary); }
.copyright span { opacity: 0.5; margin-left: 4px; }

/* ── Utility ─────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Focus visible (accessibility) ────────────────────── */
:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 480px) {
  body { padding: 0 16px; }
  .container { width: 100%; padding: 24px 0 64px; }
  .navbar { width: 100%; }
  .navbar-links { gap: 16px; font-size: 0.8rem; }
  .navbar-links .nav-text { display: inline; }
  .hero { padding: 0; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 0.9rem; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .step-card { padding: 12px 0; }
  .card { padding: 16px; }
  .form-footer { flex-direction: column; gap: 12px; align-items: stretch; }
  .form-footer .btn-primary { justify-content: center; }
  .results-header { flex-direction: column; align-items: flex-start; }
}

