:root{
  --bg:#f8fafc;
  --text:#0f172a;
  --muted:#475569;
  --muted-2:#64748b;
  --border:#e2e8f0;
  --dark:#171717;
  --accent:#d83f53;
  --accent-dark:#a62639;
  --white:#ffffff;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
}

img{max-width:100%;display:block}
a{text-decoration:none}
.container{max-width:1200px;margin:0 auto;padding:0 16px}
.container-narrow{max-width:1100px;margin:0 auto;padding:0 16px}
.container-article{max-width:1150px;margin:0 auto;padding:48px 16px}

.site-header{
  background:var(--dark);
  color:var(--white);
  border-bottom:1px solid rgba(255,255,255,.08);
}

.site-header-inner{
  min-height:88px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:var(--white);
  font-weight:900;
  letter-spacing:-.02em;
}

.brand .accent{color:var(--accent)}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 18px;
  border-radius:14px;
  font-weight:900;
  transition:.2s ease;
  cursor:pointer;
}

.btn-primary{
  background:var(--accent);
  color:var(--white);
}
.btn-primary:hover{background:var(--accent-dark)}

.btn-outline-light{
  border:1px solid rgba(255,255,255,.24);
  color:var(--white);
}
.btn-outline-light:hover{background:rgba(255,255,255,.08)}

.btn-outline-dark{
  border:1px solid var(--border);
  color:var(--text);
}
.btn-outline-dark:hover{background:#f1f5f9}

.breadcrumbs{
  font-size:14px;
  color:var(--muted-2);
  margin-bottom:12px;
}
.breadcrumbs a{
  color:var(--text);
  font-weight:800;
}
.breadcrumbs a:hover{color:var(--accent)}

.section-title{
  font-size:clamp(2rem,4vw,3rem);
  line-height:1.08;
  margin:0 0 12px;
  font-weight:900;
  letter-spacing:-.03em;
  color:var(--dark);
}

.section-subtitle{
  max-width:720px;
  color:var(--muted);
  margin:0;
}

.section-bar{
  width:96px;
  height:4px;
  border-radius:999px;
  background:var(--accent);
  margin-top:24px;
}

.posts-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:32px;
  margin-top:40px;
}

.card{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:20px;
  overflow:hidden;
  transition:.2s ease;
}
.card:hover{
  border-color:var(--accent);
  box-shadow:0 20px 45px rgba(15,23,42,.08);
}

.card-body{padding:28px}
.card-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(216,63,83,.10);
  color:var(--text);
  font-size:12px;
  font-weight:900;
}
.time{
  font-size:12px;
  color:var(--muted-2);
}
.card h2{
  margin:0 0 10px;
  font-size:1.25rem;
  line-height:1.3;
  font-weight:900;
  color:var(--text);
}
.card p{
  margin:0 0 22px;
  color:var(--muted);
}
.card-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--accent);
  font-weight:900;
}
.card-link:hover{color:var(--accent-dark)}

.card-accent{
  height:4px;
  width:100%;
  background:linear-gradient(90deg,var(--accent),#fff,var(--accent));
  opacity:.3;
}

.blog-cta{
  margin-top:48px;
  background:var(--dark);
  color:var(--white);
  border:1px solid rgba(255,255,255,.08);
  border-radius:20px;
  padding:28px;
}
.blog-cta-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.blog-cta h2{
  margin:0 0 8px;
  font-size:clamp(1.5rem,3vw,2rem);
  line-height:1.15;
  font-weight:900;
}
.blog-cta p{
  margin:0;
  color:rgba(255,255,255,.82);
}
.blog-cta-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.back-link-wrap{
  margin-top:48px;
  text-align:center;
}
.back-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  color:var(--text);
}
.back-link:hover{color:var(--accent)}

.site-footer{
  padding:40px 16px;
  text-align:center;
  font-size:14px;
  color:var(--muted-2);
  border-top:1px solid var(--border);
  margin-top:32px;
}

/* Article pages */
.article-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:40px;
  align-items:start;
}

.article-card,
.sidebar-card{
  background:var(--white);
  border:1px solid var(--border);
  border-radius:20px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}

.article-card{overflow:hidden}
.article-inner{padding:40px}

.article-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 12px;
  color:var(--muted-2);
  font-size:14px;
}
.article-sep{color:#cbd5e1}

.article-title{
  font-size:clamp(2rem,4vw,3.25rem);
  line-height:1.08;
  margin:12px 0 0;
  font-weight:900;
  letter-spacing:-.03em;
  color:var(--text);
}

.content p{
  margin:16px 0;
  color:#334155;
}
.content h2{
  margin:36px 0 14px;
  font-size:1.75rem;
  line-height:1.2;
  color:var(--text);
  font-weight:900;
}
.content h3{
  margin:24px 0 10px;
  font-size:1.2rem;
  line-height:1.3;
  color:var(--text);
  font-weight:800;
}
.content ul,
.content ol{
  margin:14px 0 18px 22px;
  color:#334155;
}
.content li{margin:8px 0}
.content a{
  color:var(--accent);
  font-weight:800;
}
.content a:hover{color:var(--accent-dark)}

.toc,
.info-box,
.recommended-card,
.sidebar-card,
.cta-box{
  border:1px solid var(--border);
  border-radius:16px;
}

.toc,
.info-box{
  padding:20px;
}

.info-box{
  background:#f8fafc;
}

.info-box p:last-child,
.sidebar-card p:last-child,
.cta-box p:last-child{margin-bottom:0}

.recommended-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-top:16px;
}

.recommended-card{
  display:block;
  padding:16px;
  color:inherit;
  background:#fff;
  transition:.2s ease;
}
.recommended-card:hover{
  border-color:var(--accent);
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}

.cta-box{
  margin-top:32px;
  padding:24px;
  background:var(--dark);
  color:var(--white);
}
.cta-box .cta-title{
  margin:0 0 8px;
  font-size:1.25rem;
  font-weight:900;
}
.cta-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:16px;
}

.sidebar-stack{
  display:flex;
  flex-direction:column;
  gap:16px;
  position:sticky;
  top:24px;
}
.sidebar-card{padding:24px}
.sidebar-card p{
  margin:0 0 12px;
  color:var(--muted);
}
.sidebar-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:16px;
}

.icon{
  display:inline-flex;
  width:18px;
  height:18px;
  vertical-align:-3px;
}
.icon svg{
  width:18px;
  height:18px;
  fill:currentColor;
}

@media (max-width: 1024px){
  .posts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .article-layout{grid-template-columns:1fr}
  .sidebar-stack{position:static}
}

@media (max-width: 768px){
  .site-header-inner,
  .blog-cta-inner{
    flex-direction:column;
    align-items:flex-start;
  }
  .posts-grid{grid-template-columns:1fr}
  .blog-cta-actions,
  .cta-actions{
    width:100%;
    flex-direction:column;
  }
  .btn{width:100%}
  .article-inner{padding:28px 22px}
  .recommended-grid{grid-template-columns:1fr}
}