:root {
  --bg-color: #0d1117;
  --surface: #141a23;
  --surface-elevated: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.08);
  --text-main: #e8edf5;
  --text-muted: #86a6c3;
  --accent: #56ccf2;
  --accent-strong: #4ade80;
  --danger: #f87171;
  --warning: #facc15;
  --success: #34d399;
  --font: Inter, system-ui, sans-serif;
}

.light-mode {
  --bg-color: #ffffff;
  --surface: #f8fafc;
  --surface-elevated: rgba(0,0,0,0.05);
  --border: rgba(0,0,0,0.08);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent: #0ea5e9;
  --accent-strong: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text-main);
  background: radial-gradient(circle at top, rgba(86,204,242,0.16), transparent 28%),
              radial-gradient(circle at bottom right, rgba(52,211,153,0.12), transparent 20%),
              linear-gradient(180deg, #080a10 0%, #10151f 100%);
  transition: background 0.3s ease, color 0.3s ease;
}

.light-mode body {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 1rem;
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-btn span {
  width: 24px;
  height: 3px;
  background: var(--text-main);
  transition: 0.3s;
}

.menu-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0;
  display: none;
  min-width: 220px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
}

.menu-dropdown.show {
  display: block;
}

.menu-dropdown a,
.menu-dropdown button {
  width: 100%;
  display: block;
  padding: 0.85rem 1rem;
  background: none;
  border: none;
  color: var(--text-main);
  text-decoration: none;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.menu-dropdown a:hover,
.menu-dropdown button:hover {
  background: var(--surface-elevated);
}

.menu-dropdown a {
  color: var(--text-main);
}

.menu-dropdown button {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  padding-top: 4rem; /* Account for fixed nav */
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(18, 24, 37, 0.92);
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  margin-bottom: 2rem;
}

.light-mode .hero-card {
  background: rgba(255, 255, 255, 0.9);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-size: 0.78rem;
  margin: 0 0 0.5rem;
}

.hero-card h1 {
  margin: 0;
  font-size: clamp(2.4rem, 2.75vw, 3.4rem);
  line-height: 1.02;
}

.hero-copy {
  margin: 1rem 0 0;
  max-width: 640px;
  color: var(--text-muted);
  line-height: 1.75;
}

.hero-badge {
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.grid-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
}

.section-card {
  background: rgba(20, 26, 39, 0.96);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}

.light-mode .section-card {
  background: rgba(255, 255, 255, 0.96);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-label,
.result-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.section-card h2,
.result-card h3 {
  margin: 0;
  font-size: 1.6rem;
}

.input-form {
  display: grid;
  gap: 1rem;
}

.input-form label {
  font-size: 0.92rem;
  color: var(--text-main);
}

.input-form input,
.input-form textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  padding: 1rem 1.1rem;
  font-size: 1rem;
}

.light-mode .input-form input,
.light-mode .input-form textarea {
  background: rgba(0,0,0,0.04);
}

.input-form textarea {
  min-height: 180px;
  resize: vertical;
}

.input-form input::placeholder,
.input-form textarea::placeholder {
  color: rgba(232, 237, 245, 0.55);
}

.light-mode .input-form input::placeholder,
.light-mode .input-form textarea::placeholder {
  color: rgba(30, 41, 59, 0.55);
}

.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #22c55e);
  color: #07101a;
  padding: 1rem 1.4rem;
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.16);
}

.secondary-btn {
  background: rgba(255,255,255,0.08);
  color: var(--text-main);
  padding: 1rem 1.4rem;
  border: 1px solid rgba(255,255,255,0.08);
}

.light-mode .secondary-btn {
  background: rgba(0,0,0,0.08);
  color: var(--text-main);
  border: 1px solid rgba(0,0,0,0.08);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
}

.status-pill {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.status-neutral { background: rgba(255,255,255,0.07); color: var(--text-main); }
.status-info { background: rgba(56, 189, 248, 0.14); color: var(--accent); }

.result-card {
  margin-top: 1.75rem;
  padding: 1.5rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}

.light-mode .result-card {
  background: rgba(0,0,0,0.04);
}

.result-card.result-low { border-color: rgba(52, 211, 153, 0.2); }
.result-card.result-medium { border-color: rgba(250, 204, 21, 0.2); }
.result-card.result-high { border-color: rgba(248, 113, 113, 0.25); }

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.score-badge {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(135deg, #22c55e, #4ade80);
}

.reason-list ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.reason-list li {
  margin-bottom: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.light-mode .reason-list li {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.08);
}

.reason-title {
  margin: 0 0 0.75rem;
  font-weight: 700;
  color: var(--text-main);
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

.mini-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 1.4rem;
}

.light-mode .mini-card {
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
}

.mini-card h3 {
  margin: 0 0 0.45rem;
}

.mini-card .tag {
  display: inline-flex;
  margin-bottom: 0.9rem;
}

.profile-card {
  grid-column: span 2;
  border: 2px solid var(--border);
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

.light-mode .profile-card {
  border: 2px solid rgba(0,0,0,0.1);
  box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.auto-suggestions {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--border);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.light-mode .auto-suggestions {
  background: rgba(0,0,0,0.05);
  border: 2px solid rgba(0,0,0,0.1);
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.auto-suggestions h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.auto-suggestions ul {
  list-style: none;
  padding: 0;
}

.auto-suggestions li {
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.auto-suggestions li:last-child {
  border-bottom: none;
}

/* Profile page styles */
.profile-info {
  margin-bottom: 1.5rem;
}

.profile-info p {
  margin: 0.5rem 0;
  font-size: 1rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.light-mode .profile-info p {
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.edit-profile {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
}

.light-mode .edit-profile {
  background: rgba(0,0,0,0.05);
  border: 2px solid rgba(0,0,0,0.1);
}

.edit-profile h3 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-item {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--border);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.light-mode .history-item {
  background: rgba(0,0,0,0.05);
  border: 2px solid rgba(0,0,0,0.1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.history-item h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.history-item p {
  margin: 0.5rem 0;
  color: var(--text-muted);
}

.risk-level {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: inline-block;
}

.risk-low {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.risk-medium {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.risk-high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.suggestions-card .auto-suggestions {
  margin-top: 0;
}

@media (max-width: 980px) {
  .grid-layout { grid-template-columns: 1fr; }
  .hero-card { flex-direction: column; }
  .profile-card { grid-column: span 1; }
}

@media (max-width: 640px) {
  .page-shell { padding: 1.2rem; }
  .section-card { padding: 1.5rem; }
}
