/* ==========================================================================
   UpskillNow Blog — Design tokens
   Ink navy + growth lime, built around the logo's upward-arrow mark.
   ========================================================================== */
:root {
  --ink: #12142B;
  --ink-soft: #1B1E40;
  --ink-line: rgba(255,255,255,0.12);
  --paper: #F1EEE5;
  --paper-raised: #FFFFFF;
  --lime: #CFFF4D;
  --lime-dim: #A7D93C;
  --violet: #6C5CE7;
  --text: #1B1D2E;
  --text-muted: #656885;
  --text-on-ink: #E9E9F4;
  --text-on-ink-muted: #9B9EC2;
  --border: rgba(18,20,43,0.10);
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --maxw: 1180px;
  --shadow-card: 0 1px 0 rgba(18,20,43,0.04), 0 10px 24px rgba(18,20,43,0.06);
}

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&display=swap');

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', 'Manrope', sans-serif;
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(207,255,77,0.35); }
.btn-outline { background: transparent; color: var(--text-on-ink); border: 1.5px solid var(--ink-line); }
.btn-outline:hover { border-color: var(--lime); color: var(--lime); }
.btn-outline-dark { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline-dark:hover { border-color: var(--ink); }

.pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.active { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--violet);
  background: rgba(108,92,231,0.1);
  padding: 5px 11px;
  border-radius: 999px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--ink);
  color: var(--text-on-ink);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--ink-line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { height: 30px; width: auto; }
.brand-fallback {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 1.25rem; color: var(--text-on-ink);
}
.brand-fallback span { color: var(--lime); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-size: 0.92rem; font-weight: 600; color: var(--text-on-ink-muted);
  transition: color .15s ease;
}
.main-nav a:hover, .main-nav a.current { color: var(--lime); }
.header-cta { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .site-header .wrap { height: 72px; }
}

/* ---------- Hero (home) ---------- */
.hero {
  background: var(--ink);
  color: var(--text-on-ink);
  padding: 72px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-eyebrow-row { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--text-on-ink-muted); font-size: 0.9rem; font-weight: 600; }
.hero-arrow { width: 22px; height: 22px; flex-shrink: 0; }
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  max-width: 15ch;
  color: var(--text-on-ink);
}
.hero h1 em { font-style: normal; color: var(--lime); }
.hero-sub {
  max-width: 56ch;
  font-size: 1.15rem;
  color: var(--text-on-ink-muted);
  margin: 20px 0 36px;
}
.hero-decor {
  position: absolute; right: -60px; top: -40px; opacity: 0.5; z-index: 1;
  width: 420px; height: 420px;
}
@media (max-width: 700px) { .hero-decor { display: none; } }

.course-strip {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
}

/* ---------- Hero: big featured post + editorial side list (no card, no thumbnails) ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}
.hero-feature { display: block; }
.hero-feature .cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
}
.hero-feature .cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-feature .body { padding: 26px 4px 0; }
.hero-feature .tag { background: rgba(207,255,77,0.12); color: var(--lime); }
.hero-feature h3 {
  font-family: 'Playfair Display', 'Bricolage Grotesque', serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  color: var(--text-on-ink);
  margin: 16px 0 12px;
}
.hero-feature .excerpt { color: var(--text-on-ink-muted); font-size: 1.02rem; max-width: 62ch; }
.hero-feature .meta-row { color: var(--text-on-ink-muted); margin-top: 16px; }

.hero-side-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-on-ink-muted); margin-bottom: 10px;
}
.hero-side-rule { width: 44px; height: 2px; background: var(--lime); margin-bottom: 22px; }
.hero-side { display: flex; flex-direction: column; }
.hero-side-item { padding: 20px 0; border-top: 1px solid var(--ink-line); }
.hero-side-item:first-child { border-top: none; padding-top: 0; }
.hero-side-item .tag { display: inline-block; margin-bottom: 10px; }
.hero-side-item h4 {
  font-family: 'Playfair Display', 'Bricolage Grotesque', serif;
  font-style: italic;
  font-size: 1.08rem; font-weight: 700; color: var(--text-on-ink); margin: 0 0 8px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-side-item:hover h4 { color: var(--lime); }
.hero-side-item .meta-row { font-size: 0.78rem; color: var(--text-on-ink-muted); }
.tag-on-dark { background: rgba(207,255,77,0.12); color: var(--lime); }

.hero-grid-solo { grid-template-columns: 1fr; max-width: 900px; }
.hero-grid-solo .hero-feature .cover { aspect-ratio: 21/9; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Category showcase sections (one per category, 3 posts + View all) ---------- */
.cat-section { margin-bottom: 8px; }
.cat-section .section-head { margin-bottom: 28px; }
.cat-section .post-grid { margin-bottom: 0; }
.cat-section-empty {
  background: var(--paper-raised); border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  padding: 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cat-section-empty p { margin: 0; color: var(--text-muted); }
.section-divider { height: 1px; background: var(--border); margin: 56px 0; border: none; }

/* ---------- Section headings ---------- */
.section { padding: 72px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 40px; flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); max-width: 26ch; }
.section-head p { color: var(--text-muted); margin: 0; max-width: 46ch; }

/* ---------- Category filter row ---------- */
.filter-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 44px;
}

/* ---------- Featured post ---------- */
.featured-post {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px;
  align-items: center;
  background: var(--paper-raised);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 56px;
}
.featured-post .cover { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/3; }
.featured-post .cover img { width: 100%; height: 100%; object-fit: cover; }
.featured-post .body { padding: 12px 28px 12px 4px; }
.featured-post h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 14px 0 12px; }
.featured-post .excerpt { color: var(--text-muted); font-size: 1.02rem; }
.meta-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--text-muted); margin-top: 18px;
}
.meta-row .dot { opacity: 0.5; }

@media (max-width: 780px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-post .body { padding: 8px 8px 4px; }
}

/* ---------- Post grid ---------- */
.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  background: var(--paper-raised);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: transform .18s ease;
}
.post-card:hover { transform: translateY(-4px); }
.post-card .cover { aspect-ratio: 16/10; overflow: hidden; background: var(--ink); }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.post-card h3 { font-size: 1.15rem; margin: 12px 0 8px; }
.post-card .excerpt { color: var(--text-muted); font-size: 0.92rem; flex: 1; }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
  background: var(--paper-raised); border-radius: var(--radius-md);
}

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 700; font-size: 0.9rem; border: 1.5px solid var(--border);
}
.pagination a:hover { border-color: var(--ink); }
.pagination .current { background: var(--ink); color: var(--lime); border-color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--violet), #4B3FB8);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; max-width: 22ch; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.8); margin: 0; max-width: 40ch; }

/* ---------- Post detail page ---------- */
.post-hero { background: var(--ink); color: var(--text-on-ink); padding: 44px 0 0; }
.breadcrumb { font-size: 0.85rem; color: var(--text-on-ink-muted); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--lime); }
.post-hero h1 { font-size: clamp(1.5rem, 3vw, 2.5rem); max-width: 100%; white-space: normal; line-height: 1.2; }
.post-hero-meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin: 22px 0 40px; color: var(--text-on-ink-muted); font-size: 0.9rem; }
.post-cover { aspect-ratio: 21/9; overflow: hidden; border-radius: var(--radius-md) var(--radius-md) 0 0; margin-top: 12px; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 56px;
  padding: 56px 0 80px;
}
@media (max-width: 900px) { .post-layout { grid-template-columns: 1fr; } }

.post-content { max-width: 70ch; font-size: 1.06rem; }
.post-content h2 { font-size: 1.5rem; margin-top: 1.6em; }
.post-content h3 { font-size: 1.2rem; margin-top: 1.4em; }
.post-content p { margin-bottom: 1.3em; color: var(--text); }
.post-content img { border-radius: var(--radius-sm); margin: 1.4em 0; }
.post-content ul, .post-content ol { padding-left: 1.4em; margin-bottom: 1.3em; }
.post-content li { margin-bottom: 0.5em; }
.post-content a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.post-content blockquote {
  border-left: 4px solid var(--lime);
  margin: 1.6em 0; padding: 4px 0 4px 22px;
  font-style: italic; color: var(--text-muted); font-size: 1.1rem;
}
.post-content pre {
  background: var(--ink); color: var(--text-on-ink); padding: 18px; border-radius: var(--radius-sm);
  overflow-x: auto; font-size: 0.88rem;
}

.sidebar-card {
  background: var(--paper-raised); border-radius: var(--radius-md);
  padding: 26px; box-shadow: var(--shadow-card); margin-bottom: 24px;
}
.sidebar-card h4 { font-size: 1rem; margin-bottom: 14px; }
.sidebar-card.dark { background: var(--ink); color: var(--text-on-ink); }
.sidebar-card.dark p { color: var(--text-on-ink-muted); font-size: 0.9rem; }
.related-link { display: block; padding: 12px 0; border-top: 1px solid var(--border); font-weight: 600; font-size: 0.92rem; }
.related-link:first-of-type { border-top: none; padding-top: 0; }
.related-link:hover { color: var(--violet); }
.share-row { display: flex; gap: 10px; margin-top: 8px; }
.share-row a {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700;
}
.share-row a:hover { background: var(--ink); color: var(--lime); border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--text-on-ink-muted); padding: 64px 0 28px; margin-top: 64px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--ink-line); }
.footer-top img { height: 28px; margin-bottom: 14px; }
.footer-top p { max-width: 34ch; font-size: 0.92rem; }
.footer-col h5 { color: var(--text-on-ink); font-size: 0.85rem; letter-spacing: 0.03em; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 0.9rem; padding: 6px 0; }
.footer-col a:hover { color: var(--lime); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 0.82rem; flex-wrap: wrap; gap: 12px; }
@media (max-width: 780px) { .footer-top { grid-template-columns: 1fr; } }