/* ════════════════════════════════════════════════
   NOAH BOONE — JOB HUNT INTELLIGENCE DASHBOARD
   Dark terminal aesthetic & premium styling
   ════════════════════════════════════════════════ */

:root {
  --bg: #07090c;
  --bg-alt: #0b0f14;
  --surface: #0e141b;
  --surface-2: #121a23;
  --border: rgba(148, 163, 184, 0.1);
  --border-bright: rgba(0, 229, 160, 0.3);
  --text: #e6edf3;
  --muted: #8b97a5;
  
  /* Glowing Cyberpunk Accents */
  --accent: #00e5a0; /* Green theme accent */
  --accent-dim: rgba(0, 229, 160, 0.12);
  --accent-green: #10b981;
  --accent-green-dim: rgba(16, 185, 129, 0.12);
  --accent-blue: #38bdf8;
  --accent-blue-dim: rgba(56, 189, 248, 0.12);
  --accent-purple: #a78bfa;
  --accent-purple-dim: rgba(167, 139, 250, 0.12);
  
  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  
  --glow: 0 0 30px rgba(0, 229, 160, 0.1);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background layers ── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 50%, transparent 100%);
}

.bg-glow {
  position: fixed;
  z-index: -3;
  pointer-events: none;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  filter: blur(120px);
}

.bg-glow-1 {
  top: -300px;
  left: -150px;
  background: var(--accent-dim);
  opacity: 0.8;
}

.bg-glow-2 {
  bottom: -200px;
  right: -200px;
  background: var(--accent-blue-dim);
  opacity: 0.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #1e2936;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2c3a4b;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 9, 12, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-logo .accent {
  color: var(--accent);
}

.nav-logo .cursor-block {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 5px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.back-btn {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: var(--transition);
}

.back-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-dim);
  background: var(--accent-dim);
}

/* ── Container Layout ── */
.jobs-container {
  padding-top: 100px;
  padding-bottom: 80px;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header Area ── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 20px;
}

.section-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-title {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.section-lede {
  font-size: 1rem;
  color: var(--muted);
  max-width: 800px;
  margin-bottom: 40px;
}

/* ── Agent Status ── */
.agent-status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  box-shadow: var(--glow);
}

.agent-status {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.agent-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.agent-status .blinking {
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px var(--accent); }
  100% { transform: scale(0.9); opacity: 0.5; }
}

.agent-mode {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.agent-last-run {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── KPI Row ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.kpi-card.active {
  background: var(--surface-2);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: var(--glow);
}

.kpi-card.tier-all.active {
  box-shadow: 0 0 25px rgba(0, 229, 160, 0.08);
}
.kpi-card.tier-high.active {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.08);
}
.kpi-card.tier-medium.active {
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.08);
}
.kpi-card.tier-alternative.active {
  box-shadow: 0 0 25px rgba(167, 139, 250, 0.08);
}

.kpi-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.kpi-value {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.kpi-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.4;
  transition: var(--transition);
}

.kpi-card.active .kpi-bar {
  opacity: 1;
}

/* ── Filter Bar ── */
.filter-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.filter-header-title {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
}

.search-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 650px;
}

.search-input {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-family: var(--body);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
}

.company-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-family: var(--body);
  cursor: pointer;
  transition: var(--transition);
}

.company-select:focus {
  outline: none;
  border-color: var(--accent);
}

.active-filter-indicator {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ── Jobs Grid ── */
.jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.jobs-loading, .jobs-empty {
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 229, 160, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Job Card ── */
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(15px);
}

.job-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.job-card:hover {
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 6px 24px rgba(7, 9, 12, 0.5);
}

.job-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.job-meta-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-company {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.job-location {
  font-size: 0.8rem;
  color: var(--muted);
}

.job-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-tier-high {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.05);
}

.badge-tier-medium {
  background: var(--accent-blue-dim);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.badge-tier-alt {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.badge-platform {
  background: rgba(148, 163, 184, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.15);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.job-title {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin-top: -4px;
}

.job-summary {
  font-size: 0.92rem;
  color: #d1d5db;
}

/* ── Fit Block ── */
.job-fit-block {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent-blue);
  border-radius: 4px;
  padding: 14px 18px;
}

.fit-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.fit-content {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ── Enablement Pitch (Terminal Style) ── */
.job-pitch-block {
  background: #05070a;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--mono);
  position: relative;
}

.pitch-header {
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  padding-bottom: 6px;
}

.pitch-content {
  font-size: 0.85rem;
  color: #a8b2bd;
  line-height: 1.5;
}

.job-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.job-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.apply-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.apply-link span {
  transition: transform 0.2s;
}

.apply-link:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--accent-dim);
}

.apply-link:hover span {
  transform: translateX(4px);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 24px 0;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer p {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.footer .accent {
  color: var(--accent);
}

/* ── Responsive adjustments ── */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.8rem;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .agent-status-card {
    min-width: 100%;
  }

  .search-filter-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .active-filter-indicator {
    margin-left: 0;
    margin-top: 8px;
  }
}

/* ── Outreach & Contact Cards ── */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.contact-card:hover {
  border-color: rgba(0, 229, 160, 0.25);
  box-shadow: var(--glow);
}

.contact-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-company {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.contact-name {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.contact-role {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
}

.contact-strategy {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.template-box {
  background: #05070a;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 8px;
  padding: 14px;
  margin-top: 6px;
}

.template-header {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-purple);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  padding-bottom: 6px;
}

.template-body {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #a8b2bd;
  white-space: pre-wrap;
  line-height: 1.5;
}
