:root{
  --surface-bg: #f9fafb;         /* page background */
  --surface-panel: #ffffff;      /* sidebar panels */
  --surface-card: #ffffff;       /* cards */
  --text-muted: #6b7280;
  --color-primary: #4f46e5;      /* accent for headings/pagination */
  --color-secondary: #06b6d4;
  --surface-glass: rgba(0,0,0,0.03);
  --radius-lg: 14px;
  --shadow-md: 0 6px 20px rgba(0,0,0,0.08);
  --layout-width: 1100px;
  --layout-gap: 20px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

/* Blog Grid Layout */
.layout-grid{
  max-width: var(--layout-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--layout-gap);
  align-items: start;
  padding-bottom: 70px; /* space for bottom nav */
}

/* Blog Heading */
.blog-heading {
  font-size: 22px;
  margin: 10px 0 20px;
  color: var(--color-primary);
  font-weight: 600;
}

/* Feed & Cards */
main.blog-feed{
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card-post{
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform .18s ease, box-shadow .18s ease;
}

.card-post:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

/* Card Link Layout */
.card-post a {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 16px;
  color: inherit;
}

.card-thumb{
  width: 100%;
  height: 0;
  padding-bottom: 70%;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.card-post h3.post-title {
  margin: 0;
  font-size: 16px;
  color: #520000;
}

.post-meta{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  color: #000;
  font-size: 13px;
  margin-top: 8px;
}

.post-excerpt{
  margin-top: 8px;
  color: #000205;
}

.post-tags{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.post-tag{
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.05);
}

/* Sidebar */
aside.sidebar{position: relative;}
.sidebar-box{
  position: sticky;
  top: 28px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--shadow-md);
}



/* RESPONSIVE BREAKPOINTS */
@media (max-width:1200px){
  .layout-grid {grid-template-columns: 1fr 280px;}
}

@media (max-width:980px){
  .layout-grid {grid-template-columns: 1fr;}
  aside.sidebar{order:2}
  main.blog-feed{order:1}
  .card-post a{grid-template-columns: 1fr;}
  .card-thumb{padding-bottom:56%}
}

@media (max-width:600px){
  .card-post a{padding:12px}
}
