*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #FAFAF7;
  --white: #FFFFFF;
  --ink: #111110;
  --ink-2: #2C2C2A;
  --ink-3: #4A4A47;
  --ink-4: #6B6B68;
  --ink-5: #9A9A96;
  --border: rgba(17, 17, 16, 0.08);
  --border-md: rgba(17, 17, 16, 0.14);
  --accent: #1A56E8;
  --accent-light: #EBF0FD;
  --accent-mid: #3B6FEF;
  --green: #0E8F5A;
  --green-light: #E6F5EE;
  --amber: #C4760A;
  --amber-light: #FDF3E1;
  --red: #C0392B;
  --red-light: #FDECEB;
  --purple: #6B21A8;
  --purple-light: #F5EDFF;
  --r: 12px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.10), 0 4px 12px rgba(0, 0, 0, 0.05);
  --font: 'DM Sans', system-ui, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
}

/* BACKGROUND GRID */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 131, 246, 0.096) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 131, 246, 0.096) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 131, 246, 0.220) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 131, 246, 0.220) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}


html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}

.nav-logo img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-links a {
  padding: .45rem .85rem;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-3);
  transition: background .18s, color .18s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-cta {
  padding: .5rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  transition: background .18s;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--accent-mid);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all .3s;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(20px);
  z-index: 890;
  flex-direction: column;
  padding: 2rem 1.5rem;
  gap: .5rem;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  padding: .85rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
}

.nav-mobile a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-mobile .nav-mobile-cta {
  margin-top: .5rem;
  background: var(--accent);
  color: #fff;
  text-align: center;
  border-radius: var(--r);
  border-bottom: none;
}

/* ─── VIEWS ─── */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* ─── BLOG LIST VIEW ─── */
.blog-hero {
  padding: 112px 2rem 56px;
  background: linear-gradient(155deg, #F8F9FF 0%, var(--white) 50%, #F7FBF9 100%);
}

.blog-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.section-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

.blog-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: .9rem;
  font-weight: 400;
}

.blog-hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.blog-hero p {
  font-size: 1.05rem;
  color: var(--ink-4);
  line-height: 1.7;
}

/* Search + Filter */
.blog-controls {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2rem 2rem 0;
}

.blog-search-wrap {
  position: relative;
  max-width: 440px;
  margin-bottom: 1.4rem;
}

.blog-search {
  width: 100%;
  padding: .7rem 1rem .7rem 2.8rem;
  border: 1.5px solid var(--border-md);
  border-radius: var(--r);
  font-size: .92rem;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.blog-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 86, 232, .08);
}

.blog-search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.blog-search-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--ink-5);
  fill: none;
}

.blog-cats {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.cat-pill {
  padding: .38rem .9rem;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 500;
  border: 1.5px solid var(--border-md);
  color: var(--ink-4);
  background: var(--white);
  transition: all .18s;
  cursor: pointer;
}

.cat-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.cat-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Featured Post */
.blog-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2.5rem 2rem 80px;
}

.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 3rem;
  transition: box-shadow .25s, transform .25s;
  cursor: pointer;
}

.featured-post:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.featured-img {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  background: var(--cream);
}

.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.featured-post:hover .featured-img img {
  transform: scale(1.03);
}

.featured-img-fallback {
  width: 100%;
  height: 100%;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-img-fallback svg {
  width: 60px;
  height: 60px;
  stroke: var(--border-md);
  fill: none;
}

.featured-content {
  padding: 2.8rem 2.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--white);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1rem;
}

.post-tag {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .22rem .65rem;
  border-radius: 6px;
}

.tag-seo {
  background: var(--green-light);
  color: var(--green);
}

.tag-web {
  background: var(--accent-light);
  color: var(--accent);
}

.tag-ai {
  background: var(--purple-light);
  color: var(--purple);
}

.tag-content {
  background: var(--amber-light);
  color: var(--amber);
}

.tag-design {
  background: var(--red-light);
  color: var(--red);
}

.featured-badge .read-time {
  font-size: .78rem;
  color: var(--ink-5);
}

.featured-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: .8rem;
  font-weight: 400;
}

.featured-content p {
  font-size: .93rem;
  color: var(--ink-4);
  line-height: 1.7;
  margin-bottom: 1.6rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.meta-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.meta-name {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-2);
}

.meta-date {
  font-size: .78rem;
  color: var(--ink-5);
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 1.2rem;
  transition: gap .2s;
}

.read-link:hover {
  gap: .7rem;
}

.read-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

/* Post Grid */
.posts-heading {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-5);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 1.4rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.post-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  cursor: pointer;
  background: var(--white);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.post-card-img {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--cream);
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.post-card:hover .post-card-img img {
  transform: scale(1.05);
}

.post-card-img-fallback {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-img-fallback svg {
  width: 40px;
  height: 40px;
  stroke: var(--border-md);
  fill: none;
}

.post-card-body {
  padding: 1.5rem;
}

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
}

.post-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: .55rem;
}

.post-card p {
  font-size: .87rem;
  color: var(--ink-4);
  line-height: 1.65;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
}

.post-date-small {
  font-size: .78rem;
  color: var(--ink-5);
}

/* No results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink-5);
}

.no-results svg {
  width: 48px;
  height: 48px;
  stroke: var(--border-md);
  fill: none;
  margin: 0 auto 1rem;
}

/* ─── ARTICLE VIEW ─── */
.article-view {
  max-width: 100%;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink-4);
  padding: .5rem .9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  transition: all .2s;
  cursor: pointer;
}

.article-back:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.article-back svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.article-header {
  max-width: 900px;
  margin: 100px auto 0;
  margin-top: 100px;
}

.article-header-inner {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 56px 2rem 0;

}

.article-cats {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.2rem;
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  color: var(--ink);
  line-height: 1.18;
  margin-bottom: 1rem;
  font-weight: 400;
}

.article-header h1 em {
  font-style: italic;
  color: var(--accent);
}

.article-excerpt {
  font-size: 1.1rem;
  color: var(--ink-4);
  line-height: 1.7;
  margin-bottom: 1.6rem;
  font-weight: 300;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  /* flex-wrap: wrap; */
}

.byline-author {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.byline-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.byline-name {
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink-2);
}

.byline-org {
  font-size: .78rem;
  color: var(--ink-5);
}

.byline-sep {
  width: 1px;
  height: 32px;
  background: var(--border-md);
}

.byline-meta {
  font-size: .82rem;
  color: var(--ink-5);
}

.byline-meta span {
  display: block;
}

.byline-meta strong {
  color: var(--ink-3);
  font-weight: 500;
}

/* Reading progress */
.reading-progress-wrap {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  z-index: 800;
  height: 3px;
  background: var(--border);
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-mid));
  width: 0%;
  transition: width .1s linear;
}

/* Hero image */
.article-hero-img {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 0 2rem;
}

.article-hero-img img {
  width: 100%;
  border-radius: var(--r-lg);
  object-fit: cover;
  max-height: 440px;
}

.article-hero-img-fallback {
  width: 100%;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--cream) 100%);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-hero-img-fallback svg {
  width: 60px;
  height: 60px;
  stroke: var(--accent);
  fill: none;
  opacity: .3;
}

/* Article layout with TOC */
.article-layout {
  max-width: 1160px;
  margin: 0 auto;
  padding: 3rem 2rem 80px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
}

/* FAQ section */
.faq-bg {
  background: var(--white);
}

.faq-list {
  max-width: 720px;
  margin: 3.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.open {
  border-color: var(--accent);
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  user-select: none;
}

.faq-q-text {
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--ink);
  padding-right: 1rem;
}

.faq-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 0.2s,
    transform 0.3s;
}

.faq-icon svg {
  width: 12px;
  height: 12px;
  stroke: var(--ink-3);
  fill: none;
  transition: stroke 0.2s;
}

.faq-item.open .faq-icon {
  background: var(--accent);
  transform: rotate(45deg);
}

.faq-item.open .faq-icon svg {
  stroke: #fff;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-a-inner {
  padding: 0 1.3rem 1.2rem;
  font-size: 0.9rem;
  color: var(--ink-4);
  line-height: 1.7;
}

.faq-item.open .faq-a {
  max-height: 300px;
}

/* Article body */
.article-body {
  min-width: 0;
  background: var(--cream);
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-align: justify;
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  color: var(--ink);
  line-height: 1.25;
  margin: 2.6rem 0 1rem;
  font-weight: 400;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-2);
  margin: 1.8rem 0 .6rem;
}

.article-body p {
  font-size: 1.02rem;
  color: var(--ink-3);
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.article-body p:first-child {
  font-size: 1.08rem;
  color: var(--ink-2);
}

.article-body ul,
.article-body ol {
  margin: .8rem 0 1.4rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.article-body ul {
    list-style: none;
    padding-left: 1.3rem;
}

.article-body ul li {
    position: relative;
}

.article-body ul li::before {
    content: "";
    position: absolute;
    left: -1rem;
    top: .75em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.article-body ol {
  list-style: decimal;
}

.article-body ol li {
  font-size: .97rem;
  color: var(--ink-3);
  line-height: 1.65;
  padding-left: .3rem;
}

.article-body strong {
  font-weight: 600;
  color: var(--ink-2);
}

.article-body em {
  font-style: italic;
}

.article-body a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-light);
  transition: border-color .2s;
}

.article-body a:hover {
  border-color: var(--accent);
}

/* Callout boxes */
.callout {
  border-radius: var(--r);
  padding: 1.3rem 1.5rem;
  margin: 1.8rem 0;
  display: flex;
  gap: .9rem;
}

.callout-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout-body p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.65;
}

.callout-body p+p {
  margin-top: .5rem;
}

.callout.tip {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
}

.callout.tip .callout-body p {
  color: var(--accent-mid);
}

.callout.cta {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
}

.callout.cta .callout-body p {
  color: var(--accent-mid);
}

.callout.warning {
  background: var(--amber-light);
  border-left: 3px solid var(--amber);
}

.callout.warning .callout-body p {
  color: var(--amber);
}

.callout.success {
  background: var(--green-light);
  border-left: 3px solid var(--green);
}

.callout.success .callout-body p {
  color: var(--green);
}

.callout.insight {
  background: var(--purple-light);
  border-left: 3px solid var(--purple);
}

.callout.insight .callout-body p {
  color: var(--purple);
}

/* Stat highlight */
.stat-block {
  background: var(--ink);
  border-radius: var(--r-lg);
  padding: 2rem;
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  margin-bottom: .3rem;
}

.stat-label {
  font-size: .8rem;
  color: rgba(255, 255, 255, .5);
  line-height: 1.4;
}

/* Table */
.article-table-wrap {
  overflow-x: auto;
  margin: 1.6rem 0;
  border-radius: var(--r);
  border: 1px solid var(--border);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.article-table th {
  background: var(--cream);
  padding: .8rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 1px solid var(--border-md);
  white-space: nowrap;
}

.article-table td {
  padding: .8rem 1rem;
  color: var(--ink-3);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.article-table tr:last-child td {
  border-bottom: none;
}

.article-table tr:nth-child(even) td {
  background: #FAFAF9;
}

.td-green {
  color: var(--green);
  font-weight: 500;
}

.td-amber {
  color: var(--amber);
  font-weight: 500;
}

.td-red {
  color: var(--red);
  font-weight: 500;
}

/* Pull quote */
.pull-quote {
  border-left: 4px solid var(--accent);
  padding: 1.2rem 1.8rem;
  margin: 2rem 0;
  background: var(--accent-light);
  border-radius: 0 var(--r) var(--r) 0;
}

.pull-quote p {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent-mid);
  line-height: 1.5;
  font-style: italic;
  margin: 0;
}

/* Checklist */
.checklist {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  margin: 1.8rem 0;
}

.checklist-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
}

.checklist-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.check-box {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--border-md);
  background: var(--white);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}

.check-box.checked {
  background: var(--green);
  border-color: var(--green);
}

.check-box svg {
  width: 11px;
  height: 11px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
  opacity: 0;
  transition: opacity .2s;
}

.check-box.checked svg {
  opacity: 1;
}

.checklist-item label {
  font-size: .9rem;
  color: var(--ink-3);
  line-height: 1.55;
  cursor: pointer;
  flex: 1;
}

.checklist-item.done label {
  text-decoration: line-through;
  color: var(--ink-5);
}

/* TOC sidebar */
.article-sidebar {
  position: sticky;
  top: 90px;
}

.toc-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.4rem;
  margin-bottom: 1.4rem;
}

.toc-title {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-5);
  margin-bottom: 1rem;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.toc-item {
  font-size: .83rem;
  color: var(--ink-4);
  padding: .35rem .6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background .18s, color .18s;
  line-height: 1.4;
}

.toc-item:hover {
  background: var(--white);
  color: var(--accent);
}

.toc-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

.share-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.4rem;
}

.share-title {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-5);
  margin-bottom: .9rem;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .6rem .9rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: .5rem;
  transition: background .18s;
}

.share-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.share-wa {
  background: #E8F9EE;
  color: #128C7E;
}

.share-wa:hover {
  background: #d4f5e2;
}

.share-tw {
  background: #E7F0FF;
  color: #1A56E8;
}

.share-tw:hover {
  background: #d8e8ff;
}

.share-copy {
  background: var(--cream);
  color: var(--ink-3);
}

.share-copy:hover {
  background: var(--border);
}

/* Reading time progress */
.reading-stats {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--ink-5);
  margin-top: 1rem;
}

.reading-stats svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
}

/* Related posts */
.related-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem 80px;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.related-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.4rem;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.related-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem;
  cursor: pointer;
  transition: all .2s;
}

.related-card:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.related-tag {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .4rem;
}

.related-card h4 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

/* Article CTA */
.article-cta {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.article-cta-box {
  background: var(--ink);
  border-radius: var(--r-lg);
  padding: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.article-cta-box h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: #fff;
  font-weight: 400;
  margin-bottom: .4rem;
}

.article-cta-box p {
  font-size: .88rem;
  color: rgba(255, 255, 255, .5);
}

.btn-white-sm {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.3rem;
  background: #fff;
  color: var(--ink);
  border-radius: var(--r);
  font-weight: 500;
  font-size: .88rem;
  white-space: nowrap;
  transition: background .2s;
}

.btn-white-sm:hover {
  background: #F0F0EE;
}

/* CTA section */
.cta-section {
  background: var(--ink);
  padding: 80px 2rem;
}

.cta-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.cta-inner h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #fff;
  line-height: 1.2;
  margin-bottom: .9rem;
  font-weight: 400;
}

.cta-inner h2 em {
  font-style: italic;
  color: rgba(255, 255, 255, .45);
}

.cta-inner p {
  font-size: 1rem;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 2rem;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.6rem;
  background: #fff;
  color: var(--ink);
  border-radius: var(--r);
  font-weight: 500;
  font-size: .95rem;
  transition: background .2s, transform .15s;
}

.btn-white:hover {
  background: #F0F0EE;
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  background: transparent;
  color: rgba(255, 255, 255, .75);
  border: 1.5px solid rgba(255, 255, 255, .2);
  border-radius: var(--r);
  font-weight: 500;
  font-size: .95rem;
  transition: all .2s;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
}

/* Footer */
.footer {
  background: #2C2C2A;
  color: rgba(255, 255, 255, .75);
  padding: 48px 2rem 28px;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand-name {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-brand-name img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.footer-brand p {
  font-size: .88rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, .8);
  max-width: 260px;
  margin-bottom: 1.2rem;
}

.footer-social {
  display: flex;
  gap: .6rem;
}

.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.footer-social a svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: fill .2s ease;
}

.footer-social a[aria-label*="LinkedIn"] {
  color: #0077b5;
  background: rgba(0, 119, 181, 0.12);
}

.footer-social a[aria-label*="LinkedIn"]:hover {
  color: #fff;
  background: #0077b5 !important;
}

.footer-social a[aria-label*="Instagram"] {
  color: #e1306c;
  background: rgba(225, 48, 108, 0.12);
}

.footer-social a[aria-label*="Instagram"]:hover {
  color: #fff;
  background: #e1306c !important;
}

.footer-social a[aria-label*="Reddit"] {
  color: #ff4500;
  background: rgba(255, 69, 0, 0.12);
}

.footer-social a[aria-label*="Reddit"]:hover {
  color: #fff;
  background: #ff4500 !important;
}

.footer-social a[aria-label*="Facebook"] {
  color: #1877f2;
  background: rgba(24, 119, 242, 0.12);
}

.footer-social a[aria-label*="Facebook"]:hover {
  color: #fff;
  background: #1877f2 !important;
}

.footer-social a[aria-label*="Twitter"],
.footer-social a[aria-label*="X"] {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.footer-social a[aria-label*="Twitter"]:hover,
.footer-social a[aria-label*="X"]:hover {
  color: #000;
  background: #ffffff !important;
}

.footer-social a[aria-label*="WhatsApp"] {
  color: #25d366;
  background: rgba(37, 211, 102, 0.12);
}

.footer-social a[aria-label*="WhatsApp"]:hover {
  color: #fff;
  background: #25d366 !important;
}

.footer-col h4 {
  font-size: .88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .9);
  margin-bottom: 1rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.footer-col ul li a {
  font-size: .85rem;
  color: rgba(255, 255, 255, .8);
  transition: color .2s;
}

.footer-col ul li a:hover {
  color: rgba(255, 255, 255, .9);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: .75rem;
  font-size: .85rem;
  color: rgba(255, 255, 255, .8);
}

.footer-contact-item svg {
  width: 15px;
  height: 15px;
  stroke: rgba(255, 255, 255, .4);
  fill: none;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact-item a {
  color: rgba(255, 255, 255, .8);
  transition: color .2s;
}

.footer-contact-item a:hover {
  color: rgba(255, 255, 255, .9);
}

.footer-bottom {
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, .06);
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  color: rgba(255, 255, 255, .3);
  flex-wrap: wrap;
  gap: .5rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, .3);
}

.footer-bottom a:hover {
  color: rgba(255, 255, 255, .7);
}

/* WA float */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 800;
  width: 54px;
  height: 54px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
  transition: transform .2s;
  cursor: pointer;
}

.wa-float:hover {
  transform: scale(1.1);
}

.wa-float svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}
.pagination {
  display: flex;
  justify-content: center;
  list-style: none; /* remove list bullets */
  padding: 0px;
  margin-bottom: 10px;
}
.pagination li a.active{
  background-color: var(--accent);
  color: var(--white);
}
.pagination li a {
  background-color: var(--white);
  display: block; /* let links fill the list item */
  padding: 8px 12px;
  text-decoration: none;
  border: 1px solid gray;
  color: black;  
  margin: 0 4px;
  border-radius: 5px; /* add rounded borders */
}
.pagination li a:hover{
  cursor: pointer;
  background-color: var(--accent);
  color: var(--white);}
/* Responsive */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-sidebar {
    position: static;
  }

  .toc-card {
    display: none;
  }

  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-img {
    min-height: 240px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .post-card {
    box-shadow: var(--shadow-md);
  }
}

@media (max-width: 768px) {
  .featured-post {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 2.4rem;
    box-shadow: var(--shadow-lg);
  }

  .nav {
    padding: 0 1.25rem;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .blog-controls {
    padding: 1.5rem 1.25rem 0;
  }

  .blog-main {
    padding: 2rem 1.25rem 60px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .stat-block {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-cta-box {
    flex-direction: column;
    text-align: center;
  }

  .article-header {
    padding: 88px 1.25rem 0;
    margin-top: 50px;

  }

  .article-hero-img {
    padding: 0 1.25rem;
  }

  .article-layout {
    padding: 2rem 1.25rem 60px;
  }

  .related-section {
    padding: 0 1.25rem 60px;
  }

  .article-cta {
    padding: 0 1.25rem 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .blog-hero {
    padding: 96px 1.25rem 48px;
  }

  .post-card {
    box-shadow: var(--shadow-md);
  }
}

@media (max-width: 480px) {
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .featured-post {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 2.4rem;
    box-shadow: var(--shadow-lg);
  }

  .post-card {
    box-shadow: var(--shadow-md);
  }
}