/* ============================================================
   PathtoAI Blogs — Shared Styles
   Dark cosmic theme matching academy landing
   ============================================================ */
:root {
  --bg:     #06090f;
  --bg-1:   #0a101c;
  --card:   rgba(14, 22, 40, 0.7);
  --line:   rgba(100, 160, 255, 0.16);
  --text:   #e4edff;
  --text-2: #94a8cc;
  --a1:     #4ecdc4;
  --a2:     #ffd166;
  --a3:     #6e8efb;
  --display: "Bricolage Grotesque", sans-serif;
  --body:    "DM Sans", sans-serif;
  --ease:    cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(900px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ─── Topbar ─── */
.topbar {
  position: sticky;
  top: 0; z-index: 50;
  background: rgba(6, 9, 15, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--a1), var(--a3));
  color: var(--bg);
  font-weight: 800;
  font-size: 0.95rem;
}
.back-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.25s;
}
.back-link:hover { color: var(--text); }

/* ─── Hero (listing) ─── */
.hero {
  padding: 4rem 0 2rem;
}
.eyebrow {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--a2);
  margin-bottom: 0.7rem;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
}
.hero__sub {
  color: var(--text-2);
  font-size: 1.05rem;
  margin-top: 0.8rem;
  max-width: 55ch;
  line-height: 1.65;
}

/* ─── Post Grid (listing page) ─── */
.posts { padding-bottom: 4rem; }
.post-grid {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 1rem;
}
.post-card {
  display: block;
  padding: 1.6rem 1.8rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.post-card:hover {
  border-color: var(--a1);
  transform: translateY(-3px);
}
.post-card__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tag, var(--a1));
  margin-bottom: 0.6rem;
}
.post-card h2 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.post-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
}
.post-card__meta {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.8rem;
  font-size: 0.78rem;
  color: var(--text-2);
  opacity: 0.7;
}

/* ─── Article Page ─── */
.article-header {
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
.article-header .eyebrow { margin-bottom: 0.5rem; }
.article-header h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 0.8rem;
}
.article-header .lead {
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 60ch;
}
.article-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-2);
}

/* ─── Article Body ─── */
.article-body {
  padding-bottom: 4rem;
  line-height: 1.8;
}
.article-body h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.5rem 0 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.article-body h3 {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.8rem 0 0.6rem;
}
.article-body p {
  color: var(--text-2);
  margin-bottom: 1.1rem;
  font-size: 0.95rem;
}
.article-body ul, .article-body ol {
  margin: 0.8rem 0 1.2rem 1.4rem;
  color: var(--text-2);
  font-size: 0.95rem;
}
.article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.article-body strong {
  color: var(--text);
}
.article-body code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.85rem;
  background: rgba(100, 160, 255, 0.1);
  padding: 0.15em 0.45em;
  border-radius: 5px;
  color: var(--a1);
}
.article-body pre {
  background: rgba(10, 16, 28, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  margin: 1.2rem 0;
  font-size: 0.85rem;
  line-height: 1.65;
}
.article-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
}
.article-body blockquote {
  border-left: 3px solid var(--a1);
  padding: 0.8rem 1.2rem;
  margin: 1.2rem 0;
  background: rgba(78, 205, 196, 0.06);
  border-radius: 0 10px 10px 0;
}
.article-body blockquote p {
  margin-bottom: 0;
  font-style: italic;
  color: var(--text);
}

.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
}
.callout strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--a2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--line);
  background: rgba(6, 9, 15, 0.8);
}
.footer__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-2);
}
.footer a {
  color: var(--a1);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .post-card { padding: 1.2rem; }
  .article-header h1 { font-size: 1.4rem; }
  .footer__inner { flex-direction: column; gap: 0.5rem; padding: 1rem 0; }
}
