/* ──────────────────────────────────────────────────────────
   TechieCV — Tech Jobs dashboard
   ────────────────────────────────────────────────────────── */

:root {
  --tcv-primary:    #2563eb;
  --tcv-primary-50: #eff6ff;
  --tcv-primary-100:#dbeafe;
  --tcv-primary-700:#1d4ed8;
  --tcv-accent:     #f59e0b;
  --tcv-ink:        #0f172a;
  --tcv-ink-soft:   #334155;
  --tcv-mute:       #64748b;
  --tcv-surface:    #ffffff;
  --tcv-surface-2:  #f8fafc;
  --tcv-border:     #e2e8f0;
  --tcv-border-soft:#f1f5f9;
  --tcv-radius:     8px;
  --tcv-radius-lg:  12px;

  --vendor-linkedin: #0A66C2;
  --vendor-reddit:   #FF4500;
}

/* ── Page container ───────────────────────────────────────── */
/* Padding matches .nav-inner (0 1.5%) so the dashboard's left/right edges
   line up with the TechieCV logo and the Tech Resume Packages CTA above. */
.jobs-page {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 32px 1.5% 64px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--tcv-ink-soft);
  letter-spacing: -0.005em;
}

/* ── Page header ──────────────────────────────────────────── */
/* The header block spans the full width of .jobs-page, same as the post
   cards below. Top row keeps title left / meta right; the description
   sits on its own line and spans the full width. */
.jobs-page-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
}
.jobs-page-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.jobs-page-header h1 {
  color: var(--tcv-ink);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin: 0;
  text-align: left;
  line-height: 1.2;
}
.jobs-page-sub {
  color: var(--tcv-mute);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
  max-width: none;
}
.jobs-page-sub a {
  color: var(--tcv-primary);
  text-decoration: none;
  font-weight: 600;
}
.jobs-page-sub a:hover { text-decoration: underline; }

.jobs-page-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.jobs-updated {
  color: var(--tcv-mute);
  font-size: 12.5px;
  font-weight: 500;
}

/* ── Share button + dropdown ─────────────────────────────── */
.jobs-share { position: relative; }
.jobs-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tcv-surface);
  border: 1px solid var(--tcv-border);
  border-radius: var(--tcv-radius);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tcv-ink-soft);
  cursor: pointer;
  transition: all 0.12s;
}
.jobs-share-btn:hover {
  background: var(--tcv-primary-50);
  color: var(--tcv-primary);
  border-color: var(--tcv-primary-100);
}
.jobs-share-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--tcv-surface);
  border: 1px solid var(--tcv-border);
  border-radius: var(--tcv-radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  padding: 6px;
  min-width: 180px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jobs-share-menu[hidden] { display: none; }
.jobs-share-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tcv-ink-soft);
  background: transparent;
  border: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.jobs-share-link:hover {
  background: var(--tcv-primary-50);
  color: var(--tcv-primary);
}
.jobs-share-link img {
  width: 14px;
  height: 14px;
}
.jobs-share-link span[aria-hidden="true"] {
  font-size: 14px;
  width: 14px;
  display: inline-flex;
  justify-content: center;
}

/* ── Market filter (segmented) ────────────────────────────── */
.lj-controls-row {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.lj-market-toggle { margin-right: auto; }
.lj-market-toggle {
  display: inline-flex;
  border: 1px solid var(--tcv-border);
  border-radius: var(--tcv-radius);
  overflow: hidden;
  background: var(--tcv-surface);
}
.lj-market-btn {
  background: var(--tcv-surface);
  border: none;
  padding: 7px 14px;
  font-size: 0.82rem;
  color: var(--tcv-ink-soft);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.1s;
  font-family: inherit;
}
.lj-market-btn + .lj-market-btn { border-left: 1px solid var(--tcv-border); }
.lj-market-btn:hover {
  background: var(--tcv-primary-50);
  color: var(--tcv-primary);
}
.lj-market-btn.is-active {
  background: var(--tcv-primary);
  color: #fff;
}

/* ── Category pills ───────────────────────────────────────── */
.lj-category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--tcv-border);
}
.lj-cat-tab {
  background: var(--tcv-surface);
  border: 1px solid var(--tcv-border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--tcv-ink-soft);
  cursor: pointer;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.lj-cat-tab:hover {
  background: var(--tcv-primary-50);
  color: var(--tcv-primary);
  border-color: var(--tcv-primary-100);
}
.lj-cat-tab.is-active {
  background: var(--tcv-primary);
  color: #fff;
  border-color: var(--tcv-primary);
}
.lj-cat-tab.is-muted {
  opacity: 0.45;
}
.lj-cat-tab.is-muted:hover { opacity: 1; }
.lj-cat-tab-count { font-size: 10px; opacity: 0.85; }

/* ── Job list (mosaic grid of roughly-square cards) ───────── */
.pub-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  align-items: stretch;
}

.pub-item {
  position: relative;
  background: var(--tcv-surface);
  border: 1px solid var(--tcv-border);
  border-radius: var(--tcv-radius-lg);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;       /* grid items default to min-width: auto; without this
                         a long nowrap child (like a LinkedIn headline) forces
                         the whole card past its grid cell's width. */
  min-height: 340px;
  overflow: hidden;    /* belt + braces: clip anything that still tries. */
  transition: border-color 0.12s, box-shadow 0.12s;
}
.pub-item:hover {
  border-color: var(--tcv-primary-100);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

/* Header: title (+ company · location) on the left, tag row on the right. */
.pub-item-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.pub-item-titlewrap {
  flex: 1 1 auto;
  min-width: 0;
}
.pub-item-title {
  color: var(--tcv-ink);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0 0 4px;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pub-item-sub {
  color: var(--tcv-mute);
  font-size: 13.5px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pub-item-company { font-weight: 600; color: var(--tcv-ink-soft); }
.pub-item-loc { color: var(--tcv-mute); }
.pub-item-sep { color: var(--tcv-border); margin: 0 2px; }

/* Tags: horizontal row pinned to the right of the header. */
.pub-item-tags {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  max-width: 55%;
}

/* ── Chips ────────────────────────────────────────────────── */
.lj-chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.lj-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tcv-surface-2);
  color: var(--tcv-ink-soft);
  border: 1px solid var(--tcv-border);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.lj-chip--market    { background: var(--tcv-primary-50); color: var(--tcv-primary); border-color: var(--tcv-primary-100); }
.lj-chip--remote    { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.lj-chip--hybrid    { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.lj-chip--onsite    { background: var(--tcv-surface-2); color: var(--tcv-ink-soft); border-color: var(--tcv-border); }
.lj-chip--seniority { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.lj-chip--cat       { background: var(--tcv-primary-50); color: var(--tcv-primary); border-color: var(--tcv-primary-100); }

/* ── Embedded LinkedIn post block ─────────────────────────── */
/* Author row on top (brand · name/headline · time), body below. */
.pub-post {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--tcv-surface-2);
  border: 1px solid var(--tcv-border-soft);
  border-left: 3px solid var(--vendor-linkedin);
  border-radius: var(--tcv-radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.pub-post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
a.pub-post-head:hover .pub-post-name { color: var(--tcv-primary); }
.pub-post-brand {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pub-post-brand svg { width: 20px; height: 20px; display: block; }
.pub-post-identity {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}
.pub-post-name {
  display: block;
  color: var(--tcv-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.12s;
  text-align: left;
}
.pub-post-headline {
  display: block;
  color: var(--tcv-mute);
  font-size: 11.5px;
  line-height: 1.35;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.pub-post-time {
  flex: 0 0 auto;
  color: var(--tcv-mute);
  font-size: 11.5px;
  white-space: nowrap;
}
.pub-post-body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  color: var(--tcv-ink);
  font-size: 16.5px;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* ── Footer: CTAs (right-aligned) ─────────────────────────── */
.pub-item-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--tcv-border-soft);
}
.pub-item-ctas {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Card CTA buttons ─────────────────────────────────────── */
.pub-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--tcv-radius);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.12s;
  white-space: nowrap;
  font-family: inherit;
}
.pub-cta svg { width: 12px; height: 12px; }
.pub-cta--ghost {
  color: var(--tcv-ink-soft);
  background: var(--tcv-surface);
  border-color: var(--tcv-border);
}
.pub-cta--ghost:hover {
  color: var(--tcv-primary);
  border-color: var(--tcv-primary-100);
  background: var(--tcv-primary-50);
}
.pub-cta--primary {
  color: #fff;
  background: var(--tcv-primary);
  border-color: var(--tcv-primary);
}
.pub-cta--primary:hover {
  background: var(--tcv-primary-700);
  border-color: var(--tcv-primary-700);
}

/* ── Empty state ──────────────────────────────────────────── */
.pub-empty {
  background: var(--tcv-surface);
  border: 1px dashed var(--tcv-border);
  border-radius: var(--tcv-radius-lg);
  padding: 48px 24px;
  text-align: center;
  color: var(--tcv-mute);
  margin-top: 8px;
}
.pub-empty p { margin: 0; font-size: 14px; }

/* ── CTA callout (share + toolkit) ────────────────────────── */
/* Sits as a sibling of .pub-list inside .jobs-page, so its outer width
   matches .pub-item cards above. box-sizing + radius kept identical so
   the left/right edges line up exactly. */
.jobs-callout {
  box-sizing: border-box;
  width: 100%;
  margin-top: 20px;
  background: linear-gradient(135deg, #172554, #1E3A8A);
  border: 1px solid transparent;
  border-radius: var(--tcv-radius-lg);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: #fff;
}
.jobs-callout-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  margin: 0 0 6px;
}
.jobs-callout h2 {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 6px;
  text-align: left;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.jobs-callout-copy p {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  max-width: 540px;
}
.jobs-callout-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.jobs-social-row { gap: 12px; }
.jobs-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}
.jobs-social-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.jobs-social-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.jobs-social-btn.linkedin { background: #fff; }
.jobs-social-btn.twitter  { background: #fff; }
.jobs-social-btn.reddit   { background: #fff; }
.jobs-social-btn.facebook { background: #fff; }
.jobs-social-btn.email    { background: #fff; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--tcv-radius);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 9px 18px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.12s;
  letter-spacing: -0.005em;
  font-family: inherit;
  text-decoration: none;
}
.btn--primary {
  background: #fff;
  color: var(--tcv-primary);
  border-color: #fff;
}
.btn--primary:hover {
  background: var(--tcv-primary-50);
}
.btn--ghost {
  color: #fff;
  border-color: rgba(255,255,255,0.25);
  background: transparent;
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 720px) {
  .jobs-page { padding: 20px 4% 48px; }
  .jobs-page-header-top { flex-direction: column; align-items: flex-start; }
  .jobs-page-meta { align-self: stretch; justify-content: space-between; }
  .pub-list { grid-template-columns: 1fr; gap: 12px; }
  .pub-item { padding: 14px 16px; min-height: 0; }
  /* Stack title / tags so chips don't squeeze the title on phones. */
  .pub-item-head { flex-direction: column; gap: 8px; }
  .pub-item-tags { max-width: none; justify-content: flex-start; }
  .pub-post { padding: 10px 12px; }
  .pub-post-body { -webkit-line-clamp: 5; }
  .pub-item-foot { justify-content: stretch; }
  .pub-item-ctas { flex: 1 1 auto; justify-content: stretch; }
  .pub-cta { flex: 1 1 auto; justify-content: center; }
  .jobs-callout { flex-direction: column; align-items: flex-start; padding: 22px 20px; }
}


/* ── About the Author (breathing room before footer) ──────── */
.tcv-author-section {
  padding: 64px 1.5%;
  display: flex;
  justify-content: center;
  background: #fff;
}
.tcv-author-section .about-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  max-width: 640px;
  width: 100%;
  text-align: center;
}
.tcv-author-section .author-photo {
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  overflow: hidden;
  background: linear-gradient(90deg, #3B82F6 0%, #2563EB 100%);
  border-radius: 50%;
}
.tcv-author-section .author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tcv-author-section .author-details { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.tcv-author-section .author-details h3 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  color: #3B82F6;
  font-weight: 700;
  text-align: center;
}
.tcv-author-section .author-name {
  font-weight: 700;
  color: #1a1a1a;
}
.tcv-author-section .author-details p {
  color: #334155;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}
.tcv-author-section .author-details a.text-underline-blue {
  color: #3B82F6;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tcv-author-section .author-cta {
  display: inline-block;
  color: #3B82F6;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
  transition: color 0.2s ease-in-out;
}
.tcv-author-section .author-cta:hover { color: var(--tcv-primary-700); }

@media (max-width: 720px) {
  .tcv-author-section { padding: 48px 5%; }
  .tcv-author-section .author-photo { width: 88px; height: 88px; }
  .tcv-author-section .author-details h3 { font-size: 1.25rem; }
}
