/* ══════════════════════════════════════════════════════
   NewJob Blog Article — V2 Template Stylesheet
   ══════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --bg: #ffffff;
  --bg-alt: #f8faf9;
  --text: #111;
  --text-secondary: #444;
  --text-muted: #888;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --accent: #166534;
  --accent-light: #dcfce7;
  --accent-bg: #f0fdf4;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ── Reading Progress Bar ── */
.progress-bar {
  position: fixed; top: 0; left: 0; z-index: 1001;
  height: 3px; width: 0;
  background: linear-gradient(90deg, #166534, #22c55e);
  transition: width 50ms linear;
  pointer-events: none;
}

/* ══ HEADER (matches main site) ══ */
.nav {
  position: sticky; top: 0; z-index: 100; height: 56px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex; align-items: center; justify-content: center;
}
.nav-inner {
  width: 100%; max-width: 1100px; padding: 0 24px;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; column-gap: 16px;
}
.logo {
  font-size: 1.125rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--text); display: flex; align-items: center; gap: 8px;
}
.logo-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: #0f172a;
  display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06);
}
.logo-mark::after {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.18);
}
.logo-mark::before {
  content: ''; position: absolute; top: 3px; right: 3px;
  width: 4px; height: 4px; border-radius: 50%; background: #dc2626;
  box-shadow: 0 0 0 1.5px rgba(220,38,38,.25);
}
.nav-center { display: flex; justify-content: center; gap: 28px; }
.nav-link {
  font-size: 0.875rem; font-weight: 500; color: #475569;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 12px; justify-self: end; }
.nav-signin {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; font-weight: 500; color: #475569;
  background: none; border: none; cursor: pointer;
  padding: 6px 12px; border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.nav-signin:hover { background: #f1f5f9; color: var(--text); }
.nav-signin svg { flex-shrink: 0; }
.nav-cta {
  display: inline-flex; align-items: center;
  background: #0f172a; color: #fff;
  font-size: 0.8125rem; font-weight: 600;
  padding: 8px 16px; border-radius: 8px;
  transition: opacity 0.15s;
}
.nav-cta:hover { opacity: 0.88; color: #fff; }
/* Mobile burger */
.nav-burger {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: none; border: none; cursor: pointer; color: var(--text);
}
.nav-burger:hover { background: #f8fafc; }
.mobile-menu {
  display: none; position: fixed; top: 56px; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
  z-index: 99; padding: 8px 20px 40px;
  flex-direction: column;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: block; padding: 16px 4px;
  font-size: 16px; font-weight: 500; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-menu .mm-cta {
  margin-top: 16px; padding: 14px; border-radius: 10px;
  background: var(--text); color: #fff; text-align: center;
  font-weight: 600; font-size: 15px; border-bottom: none;
}

/* ── Breadcrumb ── */
.breadcrumb {
  max-width: 1120px; margin: 0 auto; padding: 1rem 2rem 0;
  font-size: 0.8125rem; color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 0.5rem; }
.breadcrumb .current { color: var(--text-secondary); }

/* ── Page Layout: TOC sidebar + Article ── */
.page-grid {
  max-width: 1120px; margin: 0 auto; padding: 0 2rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
}

/* ── TOC Sidebar ── */
.toc-sidebar {
  padding-top: 3rem;
}
.toc-container {
  position: sticky; top: 80px;
}
.toc-title {
  font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.75rem;
}
.toc-nav { list-style: none; }
.toc-link {
  display: block;
  font-size: 0.8125rem; color: var(--text-muted);
  padding: 0.375rem 0.75rem;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: all 0.15s;
  line-height: 1.4;
  margin-bottom: 2px;
}
.toc-link:hover {
  color: var(--text-secondary);
  background: var(--bg-alt);
}
.toc-link.active {
  color: var(--accent); font-weight: 500;
  border-left-color: var(--accent);
  background: var(--accent-bg);
}

/* ── Share Buttons ── */
.share-section {
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}
.share-title {
  font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.75rem;
}
.share-buttons { display: flex; gap: 8px; }
.share-btn {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.15s;
  color: var(--text-muted);
}
.share-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-bg); transform: translateY(-1px);
}
.share-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ── Article Area ── */
.article-area { max-width: 720px; padding-top: 2rem; padding-bottom: 4rem; }

/* ── Article Header ── */
.category-tag {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600; color: var(--accent);
  background: var(--accent-light);
  padding: 0.3rem 0.875rem; border-radius: 100px;
  margin-bottom: 1rem;
}
.article-area h1 {
  font-size: 2.5rem; font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.12;
  margin-bottom: 1.25rem; color: var(--text);
}
.post-meta {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 2rem;
}
.author-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--accent-light);
  object-fit: cover; flex-shrink: 0;
}
.post-meta-text { display: flex; flex-direction: column; }
.author-name { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.post-meta-details {
  font-size: 0.8125rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 0.5rem;
}
.dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-muted); display: inline-block;
}

/* ── Hero Image ── */
.hero-image {
  width: 100%; border-radius: 12px;
  aspect-ratio: 2 / 1; object-fit: cover;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  margin-bottom: 2.5rem;
}

/* ── Article Body ── */
.lead-paragraph {
  font-family: var(--font-serif);
  font-size: 1.25rem; font-style: italic;
  color: var(--text); line-height: 1.7;
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin-bottom: 2rem;
}
.post-content p {
  font-size: 1.0625rem; line-height: 1.85;
  color: var(--text-secondary); margin-bottom: 1.5rem;
}
.post-content h2 {
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 3rem; margin-bottom: 1rem;
  scroll-margin-top: 80px;
  color: var(--text);
}
.post-content h3 {
  font-size: 1.25rem; font-weight: 600;
  margin-top: 2rem; margin-bottom: 0.75rem;
  color: var(--text);
}
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  background: var(--accent-bg);
  border-radius: 0 12px 12px 0;
  margin: 2rem 0;
  position: relative;
}
.post-content blockquote::before {
  content: '\201C';
  font-size: 3rem; color: var(--accent); opacity: 0.2;
  position: absolute; top: 0.25rem; left: 0.75rem;
  font-family: var(--font-serif); line-height: 1;
}
.post-content blockquote p {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-secondary);
  padding-left: 1.5rem;
  margin-bottom: 0;
}
.post-content ol, .post-content ul {
  padding-left: 1.5rem; margin-bottom: 1.5rem;
  color: var(--text-secondary);
}
.post-content li { margin-bottom: 0.5rem; font-size: 1.0625rem; line-height: 1.85; }
.post-content li strong { color: var(--text); }
.post-content strong { color: var(--text); font-weight: 600; }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: #15803d; }

/* ── Inline figures ── */
.post-content figure { margin: 2rem 0; }
.post-content figure img { width: 100%; border-radius: 12px; }
.post-content figcaption {
  font-size: 0.8125rem; color: var(--text-muted);
  margin-top: 0.75rem; font-style: italic; line-height: 1.5;
}

/* ── Tables ── */
.post-content table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.9375rem; }
.post-content th { text-align: left; padding: 0.75rem 1rem; border-bottom: 2px solid var(--border); font-weight: 600; color: var(--text); }
.post-content td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.post-content tr:last-child td { border-bottom: none; }

/* ── Author Bio ── */
.author-bio {
  display: flex; align-items: flex-start; gap: 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: 12px; padding: 1.75rem;
  margin-top: 3rem;
  transition: border-color 0.15s;
}
.author-bio:hover { border-color: var(--border); }
.author-bio-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--accent-light);
  object-fit: cover; flex-shrink: 0;
}
.author-bio-info h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.author-bio-info p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ── CTA Box ── */
.cta-box {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%);
  border-radius: 12px; padding: 2.25rem 2.5rem;
  box-shadow: 0 8px 32px rgba(22,101,52,0.15);
  margin-top: 1rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
}
.cta-box-text h3 {
  color: #fff; font-size: 1.25rem; font-weight: 700;
  margin-bottom: 0.5rem;
}
.cta-box-text p {
  color: rgba(255,255,255,0.85); font-size: 0.9375rem;
  line-height: 1.6; margin: 0;
}
.cta-btn {
  display: inline-flex; align-items: center;
  background: #fff; color: var(--accent);
  font-weight: 700; font-size: 0.9375rem;
  padding: 0.75rem 1.5rem; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  white-space: nowrap;
  transition: all 0.15s;
}
.cta-btn:hover {
  background: #f0fdf4; transform: translateY(-1px);
  color: var(--accent);
}

/* ══ BOTTOM SECTIONS (full width) ══ */
.bottom-sections {
  max-width: 1120px; margin: 0 auto; padding: 0 2rem;
}

/* ── Related Posts ── */
.related-posts {
  border-top: 1px solid var(--border);
  padding-top: 3rem; margin-top: 3rem;
}
.related-posts h3 {
  font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem;
}
.related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.related-card {
  display: block; border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  transition: all 0.2s;
}
.related-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  transform: translateY(-3px);
}
.related-card-img {
  height: 160px; width: 100%; object-fit: cover;
}
.related-card-body { padding: 1.25rem; }
.related-card-category {
  font-size: 0.6875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent); margin-bottom: 0.5rem;
}
.related-card-title {
  font-size: 1rem; font-weight: 600; color: var(--text);
  margin-bottom: 0.5rem; line-height: 1.35;
}
.related-card-desc {
  font-size: 0.8125rem; color: var(--text-muted);
  line-height: 1.5; margin: 0;
}


/* ══ FOOTER (matches main site) ══ */
.site-footer {
  background: #0f172a; color: #94a3b8;
  padding: 56px 0 0; margin-top: 4rem;
}
.site-footer a { color: #94a3b8; transition: color 0.15s; }
.site-footer a:hover { color: #e2e8f0; }
.ft-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.ft-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, 1fr);
  gap: 32px 24px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ft-col h4 {
  color: #e2e8f0; font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.ft-col ul { list-style: none; }
.ft-col li { margin-bottom: 7px; }
.ft-col li a { font-size: 13px; }
.ft-brand { display: flex; flex-direction: column; gap: 12px; }
.ft-brand .brand-name {
  font-size: 18px; font-weight: 700; color: #e2e8f0;
  letter-spacing: -0.03em;
  display: flex; align-items: center; gap: 8px;
}
.ft-brand p { font-size: 12.5px; line-height: 1.6; max-width: 260px; }
.ft-social { display: flex; gap: 10px; margin-top: 4px; }
.ft-social a {
  width: 32px; height: 32px; border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.ft-social a:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.ft-social svg { width: 15px; height: 15px; fill: #94a3b8; }
.ft-browse {
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ft-browse h4 {
  color: #e2e8f0; font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.ft-browse-links { display: flex; flex-wrap: wrap; gap: 0; font-size: 13px; line-height: 2; }
.ft-browse-links a { white-space: nowrap; }
.ft-browse-links .sep { color: rgba(255,255,255,0.15); margin: 0 10px; user-select: none; }
.ft-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; font-size: 12px; flex-wrap: wrap; gap: 12px;
}
.ft-legal { display: flex; gap: 16px; flex-wrap: wrap; }

/* ══ RESPONSIVE ══ */
@media (max-width: 900px) {
  .page-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toc-sidebar { display: none; }
  .article-area h1 { font-size: 2rem; }
  .related-grid { grid-template-columns: 1fr; }
  .cta-box {
    flex-direction: column; text-align: center;
    padding: 2rem 1.5rem;
  }
  .cta-box-text { text-align: center; }
  .breadcrumb { padding: 0.75rem 1.5rem 0; }
  .page-grid { padding: 0 1.5rem; }
  .bottom-sections { padding: 0 1.5rem; }
  .nav-center, .nav-signin { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 1000px) {
  .ft-grid { grid-template-columns: 1fr 1fr 1fr; gap: 28px 20px; }
  .ft-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .ft-grid { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .ft-brand { grid-column: 1 / -1; }
  .article-area h1 { font-size: 1.75rem; }
  .hero-image { border-radius: 8px; }
  .page-grid { padding: 0 1rem; }
  .bottom-sections { padding: 0 1rem; }
  .breadcrumb { padding: 0.75rem 1rem 0; }
}
