/* Blog styles (blog home, category archive, single post) */

/* Footer positioning: ensure footer stays at bottom */
body.blog,
body.archive,
body.category,
body.tag,
body.single-post,
body.search,
body.author {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.blog main,
body.archive main,
body.category main,
body.tag main,
body.single-post main,
body.search main,
body.author main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Background continuity (light gradients like mockups) */
body.blog,
body.archive,
body.category,
body.tag,
body.single-post,
body.search,
body.author {
  background:
    radial-gradient(1100px 520px at 22% -8%, rgba(79,70,229,.14), transparent 60%),
    radial-gradient(980px 520px at 78% 0%, rgba(192,38,211,.10), transparent 58%),
    radial-gradient(860px 520px at 55% 22%, rgba(109,93,252,.08), transparent 62%),
    var(--cntx-bg);
  transition: background 0.3s ease;
}

[data-theme="dark"] body.blog,
[data-theme="dark"] body.archive,
[data-theme="dark"] body.category,
[data-theme="dark"] body.tag,
[data-theme="dark"] body.single-post,
[data-theme="dark"] body.search,
[data-theme="dark"] body.author {
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(79,70,229,.26), transparent 60%),
    radial-gradient(900px 520px at 70% 0%, rgba(217,70,239,.20), transparent 55%),
    radial-gradient(900px 520px at 50% 110%, rgba(34,197,94,.10), transparent 60%),
    var(--cntx-bg);
}

.blog-wrap{
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 0;
}

.blog-section {
  min-height: 0;
  padding-bottom: 48px;
  flex-grow: 1;
}

.blog-hero{
  padding: 56px 0 22px;
  position: relative;
  overflow: hidden;
}
.blog-hero::before{
  content:"";
  position:absolute;
  inset:-120px -40px auto -40px;
  height:440px;
  background:
    radial-gradient(closest-side, rgba(79,70,229,.14), transparent 70%),
    radial-gradient(closest-side, rgba(192,38,211,.10), transparent 70%);
  filter: blur(2px);
  pointer-events:none;
}
.blog-hero > .blog-wrap{ position: relative; }

.blog-hero-grid{
  display: grid;
  gap: 18px;
  grid-template-columns: 1.25fr .75fr;
  align-items: stretch;
}
@media (max-width: 980px){
  .blog-hero-grid{ grid-template-columns: 1fr; }
}

.blog-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color: rgba(20, 26, 46, .72);
  font-size:12px;
  padding:7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(79,70,229,.14);
  background: rgba(255,255,255,.75);
  box-shadow: var(--shadow-xs);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .blog-kicker {
  color: var(--cntx-muted);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
}
.blog-kicker i[data-lucide]{ width: 16px; height: 16px; }

/* Ensure Lucide icons are white in dark mode */
[data-theme="dark"] i[data-lucide] {
  color: #ffffff;
  stroke: #ffffff;
}

.blog-hero-title{
  margin:14px 0 10px;
  font-size: clamp(34px, 4.2vw, 44px);
  line-height:1.07;
  letter-spacing:-0.6px;
  color: var(--cntx-neutral-900);
  transition: color 0.3s ease;
}

[data-theme="dark"] .blog-hero-title {
  color: #e9ecff;
}

.blog-hero-sub{
  color: var(--cntx-neutral-600);
  font-size:16px;
  line-height:1.65;
  max-width: 66ch;
  margin: 0;
  transition: color 0.3s ease;
}

[data-theme="dark"] .blog-hero-sub {
  color: rgba(233, 236, 255, 0.92);
}

.blog-hero-cta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 16px;
}

.blog-search{
  margin-top: 18px;
  display:flex;
  gap:12px;
  align-items:center;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 999px;
  padding: 12px 14px;
  height: 54px;
  box-shadow: var(--shadow-xs);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .blog-search {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
}
.blog-search i[data-lucide]{ width:18px; height:18px; opacity:.9; }
.blog-search input{
  width:100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--cntx-neutral-900);
  font-size: 14px;
}
.blog-search input::placeholder{ color: rgba(168,176,216,.75); }
.blog-search-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:42px;
  min-width:56px;
  padding:0 16px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background:#fff;
  cursor:pointer;
  box-shadow:none;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.blog-search-btn:hover{ background: #f7f8fc; }

[data-theme="dark"] .blog-search-btn {
  background: rgba(12,15,34,.65);
  border: 1px solid rgba(255,255,255,.12);
}
[data-theme="dark"] .blog-search-btn:hover {
  background: rgba(12,15,34,.78);
}

.blog-sidecard{
  border: 1px solid rgba(15,23,42,.08);
  background:#fff;
  border-radius: 24px;
  padding: 20px;
  display:flex;
  flex-direction:column;
  gap: 14px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .blog-sidecard {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(12,15,34,.60);
}
.blog-mini-title{
  font-size: 14px;
  margin: 0 0 8px;
  color: var(--cntx-neutral-900);
  transition: color 0.3s ease;
}

[data-theme="dark"] .blog-mini-title {
  color: #e9ecff;
}
.blog-mini-list{ display:flex; flex-direction:column; gap:10px; }
.blog-mini-item{
  display:flex;
  gap:10px;
  padding: 7px 12px;
  border-radius: 16px;
  background: transparent;
  transition: background .12s ease;
}
.blog-mini-item:hover{ background: rgba(247,248,252,.85); }

[data-theme="dark"] .blog-mini-item:hover {
  background: rgba(255,255,255,.07);
}
.blog-mini-dot{
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(79,70,229,.75));
  margin-top:5px;
  box-shadow: 0 10px 28px rgba(34,197,94,.18);
  flex:0 0 auto;
}
.blog-mini-item strong{ display:block; font-size:13px; line-height:1.25; }
.blog-mini-item span{ display:block; font-size:12px; color: var(--cntx-neutral-600); margin-top:2px; }
.blog-see-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background:#fff;
  font-size:13px;
  font-weight:600;
  white-space: nowrap;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.blog-see-cta:hover{ background: #f7f8fc; }

[data-theme="dark"] .blog-see-cta {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
[data-theme="dark"] .blog-see-cta:hover {
  background: rgba(255,255,255,.10);
}

.blog-section{ padding: 18px 0; }
.blog-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin: 10px 0 14px;
}
.blog-section-head h2{ margin:0; font-size:18px; letter-spacing:-.2px; color: var(--cntx-neutral-900); transition: color 0.3s ease; }
.blog-section-head p{ margin:0; color: var(--cntx-neutral-600); font-size: 13px; transition: color 0.3s ease; }

[data-theme="dark"] .blog-section-head h2 {
  color: #e9ecff;
}

[data-theme="dark"] .blog-section-head p {
  color: rgba(168, 176, 216, 0.85);
}

.blog-grid-3{
  display:grid;
  gap:12px;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
@media (max-width: 980px){ .blog-grid-3{ grid-template-columns:1fr; } }

.blog-cat-card{
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  border-radius: 24px;
  padding:16px;
  display:flex;
  gap:14px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background 0.3s ease;
  min-height:110px;
}

[data-theme="dark"] .blog-cat-card {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(12,15,34,.62);
}
.blog-cat-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79,70,229,.18);
}
.blog-cat-icon{
  width:44px; height:44px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, rgba(79,70,229,.10), rgba(192,38,211,.06));
  border:1px solid rgba(79,70,229,.14);
  flex:0 0 auto;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .blog-cat-icon {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.20), rgba(217, 70, 239, 0.15));
  border: 1px solid rgba(124, 58, 237, 0.35);
}

.blog-cat-icon-cta {
  background: rgba(255,255,255,.75);
}

[data-theme="dark"] .blog-cat-icon-cta {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.blog-cat-icon i[data-lucide]{ width:22px; height:22px; opacity:.95; }
.blog-cat-card h3{ margin:1px 0 6px; font-size:14px; color: var(--cntx-neutral-900); transition: color 0.3s ease; }
.blog-cat-card p{ margin:0; color: var(--cntx-neutral-600); font-size:12.8px; line-height:1.5; transition: color 0.3s ease; }

[data-theme="dark"] .blog-cat-card h3 {
  color: #e9ecff;
}

[data-theme="dark"] .blog-cat-card p {
  color: rgba(168, 176, 216, 0.85);
}

/* CTA section in blog */
.blog-cat-card-cta {
  border-color: rgba(79,70,229,.14) !important;
  background: linear-gradient(135deg, rgba(79,70,229,.10), rgba(217,70,239,.08)) !important;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .blog-cat-card-cta {
  border-color: rgba(124, 58, 237, 0.35) !important;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.20), rgba(217, 70, 239, 0.15)) !important;
}

.blog-cat-card.blog-cat-card-cta h3,
.blog-cat-card.blog-cat-card-cta p {
  transition: color 0.3s ease;
}

[data-theme="dark"] .blog-cat-card.blog-cat-card-cta h3 {
  color: #e9ecff;
}

[data-theme="dark"] .blog-cat-card.blog-cat-card-cta p {
  color: rgba(168, 176, 216, 0.85);
}
.blog-meta{ margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; }
.blog-chip{
  font-size:11px;
  color: rgba(20, 26, 46, .85);
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.75);
  padding:6px 9px;
  border-radius: 999px;
}

.blog-post-card{
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  border-radius: 24px;
  overflow:hidden;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background 0.3s ease;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .blog-post-card {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(12,15,34,.55);
}
.blog-post-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(15,23,42,.12);
  border-color: rgba(79,70,229,.18);
}
/* Featured image + overlay wrapper (J/K/L rotation) */
.cntx-thumb{
  position: relative;
  overflow: hidden;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  height: 160px;
  background:
    radial-gradient(700px 260px at 20% 10%, rgba(79,70,229,.22), transparent 65%),
    radial-gradient(620px 260px at 70% 0%, rgba(217,70,239,.16), transparent 62%),
    rgba(247,248,252,.8);
  border-bottom: 1px solid rgba(79,70,229,.18);
}
@media (min-width: 980px){
  .cntx-thumb{ height: 180px; }
}

.cntx-thumb__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(1.05) contrast(1.02);
  transition: transform .25s ease;
}
.cntx-thumb__overlay{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
}
.cntx-thumb__overlay svg{
  width: 100%;
  height: 100%;
  display: block;
}

/* Hover pep */
.blog-post-card:hover .cntx-thumb__img{ transform: scale(1.02); }
.blog-post-card:hover .cntx-thumb__overlay{ opacity: 1; }

/* Slightly different “feel” per overlay key (optional tuning) */
.cntx-overlay--j .cntx-thumb__overlay{ mix-blend-mode: multiply; opacity: .95; }
.cntx-overlay--k .cntx-thumb__overlay{ mix-blend-mode: overlay; opacity: .90; }
.cntx-overlay--l .cntx-thumb__overlay{ mix-blend-mode: multiply; opacity: .85; }
.blog-post-body{ padding: 14px 14px 16px; }
.blog-post-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.blog-tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color: rgba(20, 26, 46, .85);
  padding:6px 9px;
  border-radius: 999px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.75);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .blog-tag {
  color: rgba(233, 236, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}
.blog-tag i[data-lucide]{ width:14px; height:14px; }
.blog-time{
  font-size:11px;
  color: rgba(20, 26, 46, .56);
  display:inline-flex;
  align-items:center;
  gap:6px;
  transition: color 0.3s ease;
}

[data-theme="dark"] .blog-time {
  color: rgba(168, 176, 216, 0.70);
}
.blog-post-body h3{ margin:0 0 8px; font-size:14px; line-height:1.35; }
.blog-post-body p{ margin:0; color: var(--cntx-neutral-600); font-size:12.8px; line-height:1.55; }

/* Single */
.blog-crumbs{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--cntx-neutral-600);
  font-size:12.5px;
  margin-bottom:16px;
  flex-wrap: wrap;
}
.blog-crumbs .dot{ opacity: .7; }
.blog-crumbs a:hover{ color: var(--cntx-neutral-900); }

.blog-single-grid{
  display:grid;
  grid-template-columns: 1fr 340px;
  gap:18px;
  align-items:start;
}
.blog-sidebar-sticky{ position: sticky; top: 96px; }
@media (max-width: 980px){
  .blog-single-grid{ grid-template-columns:1fr; }
  .blog-sidebar-sticky{ position: static; top: auto; }
}

.blog-article-card{
  margin-top: 18px;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  border-radius: 24px;
  padding: 22px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .blog-article-card {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(12,15,34,.60);
}
.blog-prose{
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--cntx-neutral-700);
  transition: color 0.3s ease;
}

[data-theme="dark"] .blog-prose {
  color: rgba(233, 236, 255, 0.90);
}
.blog-prose p{ margin: 0 0 14px; }
/* Typography hierarchy according to CntX Design System */
.blog-prose h1{ 
  margin: 28px 0 12px; 
  font-size: 26px; 
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--cntx-neutral-900); 
}
.blog-prose h2{ 
  margin: 24px 0 10px; 
  font-size: 21px; 
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--cntx-neutral-900); 
}
.blog-prose h3{ 
  margin: 20px 0 8px; 
  font-size: 15px; 
  font-weight: 600;
  line-height: 1.4;
  color: var(--cntx-neutral-900); 
}
.blog-prose h4{ 
  margin: 16px 0 6px; 
  font-size: 13px; 
  font-weight: 600;
  line-height: 1.5;
  color: var(--cntx-neutral-900); 
}
.blog-prose ul, .blog-prose ol{ margin: 0 0 14px 18px; }
.blog-prose li{ margin: 6px 0; }

.blog-toc{ display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.blog-toc a{ font-size:13px; color: var(--cntx-neutral-600); }
.blog-toc a:hover{ color: var(--cntx-neutral-900); }

.blog-icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  color: var(--cntx-neutral-900);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, color 0.3s ease;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
}

.blog-icon-btn:hover{ 
  background:#f7f8fc; 
  border-color: rgba(79,70,229,.18);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,23,42,.10);
}

.blog-icon-btn i[data-lucide]{ 
  width:16px; 
  height:16px; 
  color: inherit;
  stroke: currentColor;
}

[data-theme="dark"] .blog-icon-btn {
  background: rgba(12, 15, 34, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e9ecff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.30);
}

[data-theme="dark"] .blog-icon-btn:hover {
  background: rgba(12, 15, 34, 0.85);
  border-color: rgba(124, 58, 237, 0.40);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.40);
}

[data-theme="dark"] .blog-icon-btn i[data-lucide] {
  color: #e9ecff;
  stroke: #e9ecff;
}

.blog-author-box{
  margin-top:14px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  border-radius: 24px;
  padding:16px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .blog-author-box {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(12,15,34,.60);
}

.blog-author-box-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.blog-author-box-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(15,23,42,.12);
  border-color: rgba(79,70,229,.18);
}

.blog-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  object-fit: cover;
  flex: 0 0 auto;
}
.blog-avatar{
  width:44px;
  height:44px;
  border-radius:16px;
  background: rgba(79,70,229,.10);
  border:1px solid rgba(79,70,229,.14);
}

/* Single post: Deck (excerpt) */
.cntx-deck{
  margin: 10px 0 0;
  color: rgba(20,26,46,.70);
  font-size: 16px;
  line-height: 1.65;
  max-width: 70ch;
  transition: color 0.3s ease;
}

[data-theme="dark"] .cntx-deck {
  color: rgba(233, 236, 255, 0.92);
}

/* Single post: Featured image with overlay */
.cntx-featured{
  margin: 24px 0 32px;
  max-width: 100%;
}
.cntx-featuredWrap{
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.08);
  background: #fff;
}
.cntx-featuredImg{
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.01);
}
.cntx-featuredNoise{
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,.035) 0px, rgba(0,0,0,.035) 1px, rgba(0,0,0,0) 2px, rgba(0,0,0,0) 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0px, rgba(255,255,255,.02) 1px, rgba(0,0,0,0) 2px, rgba(0,0,0,0) 5px);
  opacity: .22;
  mix-blend-mode: overlay;
}
.cntx-featuredWrap .cntx-thumb__overlay{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
}
.cntx-featuredWrap .cntx-thumb__overlay svg{
  width: 100%;
  height: 100%;
  display: block;
}

/* Single post: Content wrapper */
.cntx-content{
  /* Content styles are inherited from .blog-prose */
}

/* Newsletter form (sidebar) */
.ctaForm{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ctaForm input{
  flex: 1;
  min-width: 200px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  color: var(--cntx-neutral-900);
  outline: none;
  height: 44px;
  font-size: 14px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .ctaForm input {
  background: rgba(7,8,20,.40);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--cntx-neutral-900);
}
.ctaForm input::placeholder{
  color: rgba(168,176,216,.8);
}
.ctaForm .btn{
  height: 44px;
  padding: 0 18px;
  white-space: nowrap;
}

/* Sidebar buttons: ensure consistent sizing */
.blog-sidecard .btn-primary,
.blog-sidecard .blog-see-cta{
  height: 44px;
  padding: 0 18px;
  white-space: nowrap;
}

/* HubSpot form styling (newsletter subscription) */
.hs-form-wrapper{
  min-height: 60px; /* Reserve space while form loads */
}
.hs-form-frame{
  width: 100%;
}
/* Override HubSpot default styles to match our design */
.hs-form-wrapper .hs-form fieldset{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  border: none;
}
.hs-form-wrapper .hs-form .hs-email{
  flex: 1;
  min-width: 200px;
}

/* Custom newsletter form (no iframe) */
.cntx-newsletter-form {
  width: 100%;
}

.cntx-form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.cntx-form-input {
  flex: 1;
  min-width: 200px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  color: #0f172a;
  outline: none;
  height: 44px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  margin: 0;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .cntx-form-input {
  background: rgba(7,8,20,.40);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--cntx-neutral-900);
}

.cntx-form-input::placeholder {
  color: rgba(168,176,216,.8);
}

.cntx-form-input:focus {
  border-color: var(--cntx-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.cntx-form-input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1) !important;
}

.cntx-form-submit {
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6d5dfc);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(79,70,229,0.20);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  margin: 0;
  width: auto;
  min-width: auto;
  -webkit-appearance: none;
  appearance: none;
}

.cntx-form-submit:hover {
  background: linear-gradient(135deg, #4338ca, #5b52e5);
  box-shadow: 0 14px 34px rgba(79,70,229,0.30);
  transform: translateY(-1px);
}

.cntx-form-submit:active {
  transform: translateY(1px);
  box-shadow: 0 10px 24px rgba(79,70,229,0.20);
}

.cntx-form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.cntx-form-message {
  margin-top: 0;
  font-size: 12px;
  min-height: 0;
  height: 0;
  overflow: hidden;
}

.cntx-form-message:not(:empty) {
  margin-top: 8px;
  height: auto;
  min-height: auto;
}

.cntx-form-message.success {
  color: #2563EB;
}

.cntx-form-message.error {
  color: #dc2626;
}

/* Newsletter modal */
.cntx-newsletter-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.cntx-newsletter-modal[aria-hidden="false"] {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cntx-newsletter-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .cntx-newsletter-modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.cntx-newsletter-modal-content {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  max-width: 480px;
  width: calc(100% - 48px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
  transform: scale(0.95);
  transition: transform 0.2s ease, background-color 0.3s ease;
}

[data-theme="dark"] .cntx-newsletter-modal-content {
  background: var(--cntx-surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cntx-newsletter-modal[aria-hidden="false"] .cntx-newsletter-modal-content {
  transform: scale(1);
}

.cntx-newsletter-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--cntx-neutral-600);
  transition: background 0.15s ease, color 0.15s ease;
  z-index: 1;
}

.cntx-newsletter-modal-close:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--cntx-neutral-900);
}

.cntx-newsletter-modal-close i {
  width: 20px;
  height: 20px;
}

.cntx-newsletter-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--cntx-neutral-900);
  margin: 0 0 20px 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cntx-newsletter-modal-form-wrapper {
  margin-bottom: 16px;
}

.cntx-newsletter-modal-footer {
  margin: 0;
  color: var(--cntx-neutral-600);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 768px) {
  .cntx-newsletter-modal-content {
    padding: 24px;
    border-radius: 20px;
  }
  
  .cntx-newsletter-modal-title {
    font-size: 20px;
    margin-bottom: 16px;
  }
}

@media (max-width: 768px) {
  .cntx-form-row {
    flex-direction: column;
  }
  
  .cntx-form-input,
  .cntx-form-submit {
    width: 100%;
  }
}

/* Author page */
.author-page {
  padding: 34px 0 0;
}

.author-inner {
  max-width: 980px;
  margin: 0 auto;
}

/* Author page headings */
.author-page h1 {
  color: var(--cntx-neutral-900);
  transition: color 0.3s ease;
}

[data-theme="dark"] .author-page h1 {
  color: #e9ecff;
}

.author-page .blog-section-head h2 {
  color: var(--cntx-neutral-900);
  transition: color 0.3s ease;
}

[data-theme="dark"] .author-page .blog-section-head h2 {
  color: #e9ecff;
}

.author-card {
  padding: 22px;
}

.author-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(79,70,229,.10);
  border: 1px solid rgba(79,70,229,.14);
  flex: 0 0 auto;
  object-fit: cover;
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .author-avatar {
  background: rgba(124, 58, 237, 0.20);
  border: 1px solid rgba(124, 58, 237, 0.35);
}

.author-avatar-placeholder {
  background: rgba(79,70,229,.10);
  border: 1px solid rgba(79,70,229,.14);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .author-avatar-placeholder {
  background: rgba(124, 58, 237, 0.20);
  border: 1px solid rgba(124, 58, 237, 0.35);
}

.author-title-block {
  min-width: 0;
  flex: 1;
}

.author-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.author-name {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.5px;
  color: var(--cntx-neutral-900);
  transition: color 0.3s ease;
}

[data-theme="dark"] .author-name {
  color: #e9ecff;
}

.author-role {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(15,23,42,.75);
  transition: color 0.3s ease;
}

[data-theme="dark"] .author-role {
  color: rgba(168, 176, 216, 0.85);
}

.author-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease, color 0.3s ease;
  color: var(--cntx-neutral-900);
}

[data-theme="dark"] .author-linkedin {
  background: rgba(12, 15, 34, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.30);
  color: #e9ecff;
}

.author-linkedin:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
  border-color: rgba(79,70,229,.18);
  background: var(--cntx-bg);
}

[data-theme="dark"] .author-linkedin:hover {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.40);
  border-color: rgba(124, 58, 237, 0.35);
  background: rgba(12, 15, 34, 0.78);
}

.author-linkedin i {
  width: 16px;
  height: 16px;
}

.author-bio {
  margin-top: 12px;
  color: rgba(15,23,42,.72);
  font-size: 16px;
  line-height: 1.68;
  transition: color 0.3s ease;
}

[data-theme="dark"] .author-bio {
  color: rgba(233, 236, 255, 0.92);
}

.author-bio p {
  margin: 0 0 14px;
  transition: color 0.3s ease;
}

[data-theme="dark"] .author-bio p {
  color: rgba(233, 236, 255, 0.92);
}

.author-bio p:last-child {
  margin-bottom: 0;
}

.author-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.author-stat {
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 46px rgba(15,23,42,.08);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .author-stat {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(12,15,34,.60);
  box-shadow: 0 18px 60px rgba(0,0,0,.30);
}

.author-stat strong {
  display: block;
  font-size: 22px;
  color: var(--cntx-neutral-900);
  line-height: 1.2;
  transition: color 0.3s ease;
}

[data-theme="dark"] .author-stat strong {
  color: #e9ecff;
}

.author-stat span {
  display: block;
  margin-top: 4px;
  color: rgba(15,23,42,.60);
  font-size: 13px;
  transition: color 0.3s ease;
}

[data-theme="dark"] .author-stat span {
  color: rgba(168, 176, 216, 0.80);
}

/* Pagination styles */
.page-numbers,
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  color: var(--cntx-neutral-700);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.3s ease;
  margin: 0 4px;
}

.page-numbers:hover,
.nav-links a:hover {
  background: var(--cntx-border-subtle);
  border-color: rgba(79,70,229,.18);
  color: var(--cntx-neutral-900);
}

.page-numbers.current,
.nav-links .current {
  background: var(--cntx-primary);
  border-color: var(--cntx-primary);
  color: #fff;
}

[data-theme="dark"] .page-numbers,
[data-theme="dark"] .nav-links a,
[data-theme="dark"] .nav-links span {
  background: rgba(12, 15, 34, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(168, 176, 216, 0.85);
}

[data-theme="dark"] .page-numbers:hover,
[data-theme="dark"] .nav-links a:hover {
  background: rgba(12, 15, 34, 0.78);
  border-color: rgba(124, 58, 237, 0.35);
  color: #e9ecff;
}

[data-theme="dark"] .page-numbers.current,
[data-theme="dark"] .nav-links .current {
  background: var(--cntx-primary);
  border-color: var(--cntx-primary);
  color: #fff;
}

@media (max-width: 980px) {
  .author-card {
    padding: 18px;
  }
  
  .author-top {
    gap: 14px;
  }
  
  .author-name {
    font-size: 26px;
  }
  
  .author-avatar {
    width: 64px;
    height: 64px;
  }
  
  .author-stats {
    grid-template-columns: 1fr;
  }
}
.hs-form-wrapper .hs-form input[type="email"]{
  width: 100%;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  color: var(--cntx-neutral-900);
  outline: none;
  height: 44px;
  font-size: 14px;
  font-family: inherit;
}
.hs-form-wrapper .hs-form input[type="email"]::placeholder{
  color: rgba(168,176,216,.8);
}
.hs-form-wrapper .hs-form .hs-submit{
  margin: 0;
}
.hs-form-wrapper .hs-form input[type="submit"],
.hs-form-wrapper .hs-form .hs-button{
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6d5dfc);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(79,70,229,0.20);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.hs-form-wrapper .hs-form input[type="submit"]:hover,
.hs-form-wrapper .hs-form .hs-button:hover{
  background: linear-gradient(135deg, #4338ca, #5b52e5);
  box-shadow: 0 14px 34px rgba(79,70,229,0.30);
}
.hs-form-wrapper .hs-form .hs-error-msgs{
  margin-top: 8px;
  font-size: 12px;
  color: #dc2626;
}
.hs-form-wrapper .hs-form .submitted-message{
  margin-top: 8px;
  font-size: 13px;
  color: var(--cntx-neutral-600);
}
.ctaForm .btn{
  height: 44px;
  padding: 0 18px;
  white-space: nowrap;
}

/* Ensure tag pages have proper footer positioning */
body.tag main {
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

body.tag main .blog-section {
  flex-grow: 1 !important;
  min-height: 0 !important;
}

/* Reset font-weight for footer on tag pages (inherited from .tag class) */
body.tag footer,
body.tag footer * {
  font-weight: 400 !important;
}

/* footer strong font-weight is handled globally in cntx-home.css */

