/* =========================================================
   本我AI求职助手 — "Authentic Edge" Design System
   Distinctive dark palette: teal intelligence + amber success + seal-red authenticity
   ========================================================= */

:root, [data-theme="dark"] {
  /* Dark palette — warm charcoal base, ink-wash accents */
  --bg: #0A0A10;
  --bg-elevated: #12121A;
  --bg-hover: #1A1A24;
  --surface: #181820;
  --surface-hover: #20202C;
  --surface-glass: rgba(18, 18, 26, 0.75);

  --text: #F0F0F5;
  --text-secondary: #A0A0B8;
  --text-tertiary: #68687E;
  --text-inverse: #0A0A10;

  /* Primary accent — Electric Teal (intelligence, clarity, fresh) */
  --accent: #2DD4BF;
  --accent-soft: rgba(45, 212, 191, 0.10);
  --accent-hover: #5EEAD4;
  --accent-glow: rgba(45, 212, 191, 0.2);
  --accent-gradient: linear-gradient(135deg, #2DD4BF, #14B8A6);

  /* CTA accent — Warm Amber (success, career, premium) */
  --cta: #F59E0B;
  --cta-soft: rgba(245, 158, 11, 0.12);
  --cta-hover: #FBBF24;
  --cta-glow: rgba(245, 158, 11, 0.25);

  /* Brand accent — Deep Chinese Red (authenticity, seal/stamp — used sparingly) */
  --brand: #C2514B;
  --brand-soft: rgba(194, 81, 75, 0.12);

  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;

  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.10);
  --border-accent: rgba(45, 212, 191, 0.25);

  --shadow-xs: 0 0 0 1px rgba(255,255,255,0.03);
  --shadow-sm: 0 0 0 1px rgba(255,255,255,0.04), 0 2px 12px rgba(0,0,0,0.4);
  --shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 4px 20px rgba(0,0,0,0.5);
  --shadow-md: 0 0 0 1px rgba(255,255,255,0.05), 0 8px 40px rgba(0,0,0,0.6);
  --shadow-lg: 0 0 0 1px rgba(255,255,255,0.06), 0 16px 60px rgba(0,0,0,0.7);
  --shadow-xl: 0 0 0 1px rgba(255,255,255,0.07), 0 24px 80px rgba(0,0,0,0.8);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Typography — serif for literary/authentic weight, sans for UI clarity */
  --font-display: 'Noto Serif SC', 'Noto Serif', Georgia, 'PingFang SC', serif;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, ui-monospace, monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration: 0.25s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Scrollbar dark ---------- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ---------- Animation ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px var(--accent-glow); }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes stamp-reveal {
  0% { width: 0; opacity: 0; }
  30% { opacity: 1; }
  60% { width: 100%; }
  100% { width: 100%; opacity: 0.7; }
}
@keyframes stroke-draw {
  0% { height: 0; opacity: 0; }
  40% { opacity: 1; }
  100% { height: 100%; opacity: 0.6; }
}
@keyframes float-glow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); transform: translateY(0); }
  50% { box-shadow: 0 0 40px var(--accent-glow); transform: translateY(-4px); }
}

/* ---------- Glass dark ---------- */
.glass {
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

/* ---------- Bento Grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}
.span-12 { grid-column: span 12; }
.span-8  { grid-column: span 8; }
.span-7  { grid-column: span 7; }
.span-6  { grid-column: span 6; }
.span-5  { grid-column: span 5; }
.span-4  { grid-column: span 4; }
.span-3  { grid-column: span 3; }

@media (max-width: 768px) {
  .bento { grid-template-columns: 1fr; }
  .span-12, .span-8, .span-7, .span-6, .span-5, .span-4, .span-3 { grid-column: span 1; }
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 40%);
  pointer-events: none;
  opacity: 0.6;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}
.card-padded { padding: var(--space-6); }
.card-padded-lg { padding: var(--space-8); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: none;
  outline: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--text);
  color: var(--text-inverse);
}
.btn-primary:hover {
  background: #E4E4E7;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,255,255,0.1);
}

.btn-accent {
  background: var(--cta);
  color: #0A0A10 !important;
  font-weight: 600;
  box-shadow: 0 0 20px var(--cta-glow);
}
.btn-accent:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--cta-glow);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-tertiary);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: var(--space-4); }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: all var(--duration) var(--ease);
}
.form-group input:hover,
.form-group textarea:hover { border-color: var(--border-hover); }
.form-group input:focus,
.form-group textarea:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- Typography ---------- */
.heading-xl {
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.heading-lg {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.heading-md {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.heading-sm {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.body-lg {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.caption {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}
.label-upper {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

/* ---------- Tags ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--duration) var(--ease);
}
.pill:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: var(--border-accent);
}
.pill-accent {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: var(--border-accent);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 12, 0.8);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.navbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--space-6);
}
.nav-brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  position: relative;
}
.nav-brand-stamp {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--brand);
  border-radius: 3px;
  color: var(--brand);
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  opacity: 0.7;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(0,0,0,0.04);
}

/* ---------- Flash ---------- */
.flash-messages {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6) 0;
}
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--space-3);
  border: 1px solid transparent;
  animation: fadeUp 0.3s var(--ease-out);
}
.flash-success { background: rgba(16, 185, 129, 0.1); color: #34D399; border-color: rgba(16, 185, 129, 0.2); }
.flash-error   { background: rgba(239, 68, 68, 0.1); color: #F87171; border-color: rgba(239, 68, 68, 0.2); }
.flash-info    { background: rgba(99, 102, 241, 0.1); color: #A5B4FC; border-color: rgba(99, 102, 241, 0.2); }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: var(--space-10) var(--space-6);
  font-size: 13px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
}

/* =========================================================
   Landing Page — "Authentic Edge" Hero
   ========================================================= */
.landing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Atmospheric background accent */
.hero-ambient {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.06) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: var(--space-12) 0;
  position: relative;
}
.hero-left {
  animation: fadeUp 0.7s var(--ease-out);
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.hero-eyebrow-line {
  width: 32px;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
  opacity: 0.6;
}
.hero-eyebrow-text {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.hero-left .headline-wrap {
  margin-bottom: var(--space-5);
}
.hero-left .headline-wrap h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: var(--space-3);
}
.hero-left .headline-wrap .headline-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.8vw, 34px);
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: var(--text-secondary);
  display: block;
}
.hero-left .body-lg {
  margin-bottom: var(--space-8);
  max-width: 460px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.hero-actions .btn-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: var(--cta);
  color: #0A0A10;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  box-shadow: 0 0 24px var(--cta-glow);
}
.hero-actions .btn-primary-action:hover {
  background: var(--cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 32px var(--cta-glow);
}

/* Preview card on right — more atmospheric */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeUp 0.9s var(--ease-out);
  position: relative;
  z-index: 1;
}
.hero-right::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse at center, rgba(45, 212, 191, 0.05) 0%, transparent 70%);
  pointer-events: none;
}
.preview-device {
  width: 100%;
  max-width: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.5s var(--ease);
}
.preview-device:hover {
  box-shadow: var(--shadow-xl), 0 0 60px var(--accent-glow);
}
.preview-device::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(45, 212, 191, 0.06) 0%, transparent 50%);
  pointer-events: none;
}
.preview-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.preview-avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.preview-header-text { flex: 1; }
.preview-header-text .name { font-size: 14px; font-weight: 600; }
.preview-header-text .role { font-size: 12px; color: var(--text-tertiary); }

.preview-chat {
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 240px;
}
.preview-bubble-ai,
.preview-bubble-user {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
}
.preview-bubble-ai {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-bottom-left-radius: var(--space-1);
  align-self: flex-start;
}
.preview-bubble-user {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-bottom-right-radius: var(--space-1);
  align-self: flex-end;
}
.preview-input {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-2);
}
.preview-input-box {
  flex: 1;
  height: 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
  position: relative;
}
.section-header-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-3);
  display: block;
}
.section-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin-bottom: var(--space-3);
}
.section-header p {
  max-width: 480px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 15px;
}

/* Section divider — subtle teal hairline */
.section-divider {
  width: 40px;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-8);
  opacity: 0.4;
}

/* Pricing dark — teal + amber treatment */
.pricing-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
}
.pricing-card .price {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: var(--space-3) 0 var(--space-5);
  color: var(--text);
}
.pricing-card .price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-tertiary);
}
.pricing-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: var(--space-6);
  flex: 1;
}
.pricing-card ul li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.pricing-card ul li:last-child { border-bottom: none; }
.price-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: var(--space-3) 0 var(--space-5);
}
.price-strike {
  font-size: 18px;
  color: var(--text-tertiary);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.badge-popular {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  padding: 4px 12px;
  background: var(--cta);
  color: #0A0A10;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
}

/* Pricing recommended card — amber accent border */
.pricing-card-recommended {
  border-color: rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 0 30px var(--cta-glow);
}

/* =========================================================
   Auth Pages
   ========================================================= */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  padding: var(--space-10) var(--space-6);
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.auth-card h1 {
  text-align: center;
  margin-bottom: var(--space-1);
}
.auth-card .body {
  text-align: center;
  margin-bottom: var(--space-8);
}
.auth-card form { margin-bottom: var(--space-6); }
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}
.auth-footer a {
  color: var(--accent-hover);
  font-weight: 600;
}

/* =========================================================
   Dashboard
   ========================================================= */
.dashboard {
  display: flex;
  min-height: calc(100vh - 64px);
  max-width: 1400px;
  margin: 0 auto;
  background: var(--bg);
}
.dash-sidebar {
  width: 260px;
  padding: var(--space-6);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 64px;
  align-self: flex-start;
  height: fit-content;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.dash-profile {
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.dash-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #818CF8);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  flex-shrink: 0;
}
.dash-name { font-size: 15px; font-weight: 600; color: var(--text); }
.dash-nav { display: flex; flex-direction: column; gap: var(--space-1); }
.dash-nav a {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
  position: relative;
}
.dash-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: height var(--duration) var(--ease);
}
.dash-nav a:hover {
  background: var(--bg-elevated);
  color: var(--text);
}
.dash-nav a.active {
  background: var(--accent-soft);
  color: var(--accent-hover);
}
.dash-nav a.active::before {
  height: 20px;
}
.dash-main {
  flex: 1;
  padding: var(--space-6);
  overflow-y: auto;
  background: var(--bg);
}
.dash-section { margin-bottom: var(--space-6); }
.dash-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.dash-section > .caption {
  margin-bottom: var(--space-5);
  display: block;
}

.url-row {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.url-row input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--text);
  outline: none;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.stat-box {
  text-align: center;
  padding: var(--space-6);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-hover);
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

/* Upload area */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  text-align: center;
  transition: all var(--duration) var(--ease);
  cursor: pointer;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-zone .icon {
  font-size: 18px;
  opacity: 0.6;
  line-height: 1;
}
.upload-zone .title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
#pdf-input {
  display: none;
}

.paste-area {
  margin-top: var(--space-3);
}
.paste-area textarea {
  width: 100%;
  min-height: 100px;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  font-family: var(--font);
  resize: vertical;
  outline: none;
}
.paste-area textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.parse-result {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
}


/* =========================================================
   Public Resume + Chat
   ========================================================= */
.resume-chat-wrap {
  display: flex;
  height: calc(100vh - 64px);
  max-width: 1440px;
  margin: 0 auto;
  gap: var(--space-4);
  padding: var(--space-4);
}
.resume-scroll {
  width: 44%;
  overflow-y: auto;
  padding-right: var(--space-2);
}
.chat-frame {
  width: 56%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Resume Header */
.r-header {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeUp 0.4s var(--ease-out);
}
.r-header-main {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.r-avatar {
  width: 72px; height: 72px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent), #818CF8);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.r-name h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-1);
}
.r-name .title {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}
.r-contact {
  text-align: right;
  font-size: 13px;
  color: var(--text-secondary);
}
.r-contact p { margin-bottom: var(--space-1); }
.r-print {
  margin-top: var(--space-2);
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.r-print:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text);
}

/* Resume Sections */
.r-section {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: var(--space-4);
  animation: fadeUp 0.5s var(--ease-out);
  animation-fill-mode: both;
}
.r-section:nth-child(2) { animation-delay: 0.05s; }
.r-section:nth-child(3) { animation-delay: 0.10s; }
.r-section:nth-child(4) { animation-delay: 0.15s; }
.r-section:nth-child(5) { animation-delay: 0.20s; }

.r-section h2 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-5);
}

.r-entry {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}
.r-entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.r-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-1);
}
.r-entry-company {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.r-entry-date {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  font-family: var(--font-mono);
}
.r-entry-role {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  font-weight: 500;
}
.r-entry-list {
  list-style: none;
  padding: 0;
}
.r-entry-list li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  padding-left: 18px;
  position: relative;
  margin-bottom: var(--space-2);
}
.r-entry-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: var(--radius-full);
  opacity: 0.5;
}

.r-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Chat */
.chat-head {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.chat-head h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.chat-head .caption { display: block; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.msg {
  display: flex;
  max-width: 88%;
  animation: fadeUp 0.3s var(--ease-out);
}
.msg-user { margin-left: auto; justify-content: flex-end; }
.msg-ai { margin-right: auto; }

.msg-bubble {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  position: relative;
}
.msg-user .msg-bubble {
  background: var(--text);
  color: var(--text-inverse);
  border-bottom-right-radius: var(--space-1);
}
.msg-ai .msg-bubble {
  background: var(--bg-elevated);
  color: var(--text);
  border-bottom-left-radius: var(--space-1);
  border: 1px solid var(--border);
}

.msg-copy {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 4px 8px;
  background: rgba(20,20,20,0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  transition: all var(--duration) var(--ease);
  line-height: 1;
}
.msg-ai:hover .msg-copy { opacity: 1; }
.msg-copy:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.chat-presets {
  padding: var(--space-3) var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.preset-chip {
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.preset-chip:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: var(--border-accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.chat-input-row {
  padding: var(--space-4) var(--space-6);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-3);
}
.chat-input-row input {
  flex: 1;
  padding: 12px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all var(--duration) var(--ease);
  font-family: var(--font);
}
.chat-input-row input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.chat-input-row input::placeholder { color: var(--text-tertiary); }
.chat-input-row button {
  padding: 12px 24px;
  background: var(--text);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}
.chat-input-row button:hover {
  background: #E4E4E7;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,255,255,0.1);
}
.chat-input-row button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: var(--space-3) var(--space-4);
}
.typing-dots span {
  width: 6px; height: 6px;
  background: var(--text-tertiary);
  border-radius: var(--radius-full);
  animation: bounce 1.4s infinite ease-in-out both;
}
.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; text-align: center; }
  .hero-eyebrow { justify-content: center; }
  .hero-left .body-lg { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-right { display: none; }
  .resume-chat-wrap {
    flex-direction: column;
    height: auto;
    padding: var(--space-3);
  }
  .resume-scroll, .chat-frame { width: 100%; height: auto; }
  .chat-frame { min-height: 520px; }
  .dashboard { flex-direction: column; }
  .dash-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); position: static; }
  .dash-main { padding: var(--space-4); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .r-header {
    flex-direction: column;
    gap: var(--space-5);
    text-align: center;
  }
  .r-header-main { flex-direction: column; }
  .r-contact { text-align: center; }
}

@media (max-width: 768px) {
  .navbar-inner { padding: 0 var(--space-4); height: 56px; }
  .landing { padding: 0 var(--space-4); }
}

/* =========================================================
   Print
   ========================================================= */
@media print {
  .navbar, .chat-frame, .r-print, .site-footer { display: none !important; }
  .resume-scroll {
    width: 100% !important;
    padding: 0 !important;
  }
  .r-section {
    box-shadow: none;
    border: 1px solid #333;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  body { background: #fff; color: #000; }
}

/* ---------- Light Mode Variables ---------- */
[data-theme="light"] {
  --bg: #FAFAFA;
  --bg-elevated: #F3F4F6;
  --bg-hover: #F0F1F3;
  --surface: #FFFFFF;
  --surface-hover: #FAFAFA;
  --surface-glass: rgba(255,255,255,0.75);

  --text: #111827;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --text-inverse: #FFFFFF;

  --accent: #0D9488;
  --accent-soft: #F0FDFA;
  --accent-hover: #14B8A6;
  --accent-glow: rgba(13, 148, 136, 0.15);

  --cta: #D97706;
  --cta-soft: #FFFBEB;
  --cta-hover: #F59E0B;
  --cta-glow: rgba(217, 119, 6, 0.2);

  --brand: #C2514B;
  --brand-soft: #FEF2F2;

  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;

  --border: rgba(0,0,0,0.06);
  --border-hover: rgba(0,0,0,0.12);
  --border-accent: rgba(13, 148, 136, 0.2);

  --shadow-xs: 0 0 0 1px rgba(0,0,0,0.03);
  --shadow-sm: 0 0 0 1px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.02);
  --shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
  --shadow-md: 0 0 0 1px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.04);
  --shadow-lg: 0 0 0 1px rgba(0,0,0,0.06), 0 16px 48px rgba(0,0,0,0.06);
  --shadow-xl: 0 0 0 1px rgba(0,0,0,0.06), 0 24px 64px rgba(0,0,0,0.08);
}

/* Light mode overrides */
[data-theme="light"] .navbar {
  background: rgba(250,250,250,0.85);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .navbar::after {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
[data-theme="light"] .preview-device:hover {
  box-shadow: var(--shadow-xl), 0 0 40px rgba(13, 148, 136, 0.12);
}
[data-theme="light"] .btn-accent,
[data-theme="light"] .hero-actions .btn-primary-action {
  color: #fff !important;
  background: var(--cta);
}
[data-theme="light"] .badge-popular {
  color: #fff;
}
[data-theme="light"] .pricing-card-recommended {
  border-color: rgba(217, 119, 6, 0.25) !important;
}
[data-theme="light"] .dark-card {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border);
}
[data-theme="light"] .dark-card .body,
[data-theme="light"] .dark-card p {
  color: var(--text-secondary) !important;
}
[data-theme="light"] .msg-ai .msg-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
[data-theme="light"] .msg-copy {
  background: rgba(255,255,255,0.9);
  color: var(--text-secondary);
}
[data-theme="light"] .msg-copy:hover {
  background: var(--accent);
  color: #fff;
}
[data-theme="light"] .glass {
  background: var(--surface-glass);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* Theme toggle button */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
}
.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-hover);
}


/* ========== User Dropdown Menu ========== */
.user-menu-wrap {
  position: relative;
}
.user-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), #818CF8);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.user-avatar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), #818CF8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.user-avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s var(--ease);
  z-index: 200;
}
.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}
.user-dropdown-info {
  flex: 1;
  min-width: 0;
}
.user-dropdown-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  flex-wrap: wrap;
}
.user-tier {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.user-expire {
  color: var(--text-tertiary);
  font-size: 11px;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-2) var(--space-4);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s ease;
}
.user-dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--text);
}
.user-dropdown-item-danger:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.08);
}
.user-dropdown-item span:first-child {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}


/* ========== Theme Float Button (Left Bottom) ========== */
.theme-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
  z-index: 100;
  box-shadow: var(--shadow);
}
.theme-float:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-hover);
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .theme-float {
    bottom: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}
