/* Basic reset and sensible defaults */
:root{
  --bg:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --accent:#0f62fe;
  --container:1100px;
  --radius:8px;
  --card-bg:#ffffff;
  --gap:1.25rem;
  --max-width:1200px;
  --shadow: 0 6px 18px rgba(15,23,42,0.08);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color-scheme: light;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-size:16px;
}

/* Utility container */
.container{
  max-width:var(--container);
  margin:0 auto;
  padding:0 1rem;
}

/* Header */
.site-header{
  border-bottom:1px solid #eef2f7;
  background:linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.85));
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(6px);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1rem 0;
}
.site-brand h1{
  margin:0;
  font-size:1.125rem;
  letter-spacing:0.2px;
}
.site-brand .tagline{
  margin:0;
  font-size:0.9rem;
  color:var(--muted);
}

/* Main nav */
.main-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:0.75rem;
}
.main-nav a{
  text-decoration:none;
  color:var(--text);
  padding:0.4rem 0.6rem;
  border-radius:6px;
}
.main-nav a:hover,
.main-nav a:focus{
  background:rgba(15,98,254,0.06);
  outline:none;
}

/* Hero / featured */
.hero{padding:1rem 0}
.featured{
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
  background:linear-gradient(180deg,#f8fafc,#fff);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.featured img{
  width:100%;
  height:auto;
  display:block;
  object-fit:cover;
}
.featured-body{
  padding:1.25rem;
}
.featured .lead{font-size:1.05rem; color:var(--muted)}

/* Layout with main + sidebar */
.layout{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:2rem;
  margin:2rem auto;
  align-items:start;
  max-width:var(--max-width);
}

/* Content & cards */
.content .section-head h2{margin:0 0 0.75rem 0}
.cards{
  display:grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap:1rem;
}
.card{
  display:flex;
  flex-direction:column;
  background:var(--card-bg);
  border-radius:10px;
  overflow:hidden;
  box-shadow: 0 6px 18px rgba(15,23,42,0.04);
  transition:transform .18s ease, box-shadow .18s ease;
}
.card img{
  width:100%;
  height:160px;
  object-fit:cover;
  display:block;
}
.card-body{
  padding:1rem;
  display:flex;
  flex-direction:column;
  gap:0.5rem;
  flex:1 1 auto;
}
.card h3{margin:0;font-size:1.05rem}
.card p{margin:0}
.card .meta{font-size:0.9rem;color:var(--muted)}
.card:hover{transform:translateY(-6px); box-shadow:0 12px 36px rgba(15,23,42,0.08)}
.read-more{color:var(--accent); text-decoration:none}

/* Sidebar */
.sidebar .widget{
  background: #fff;
  padding:1rem;
  border-radius:8px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.04);
  margin-bottom:1rem;
}
.search{display:flex; gap:0.5rem}
.search input{
  flex:1;
  padding:0.6rem;
  border:1px solid #e6e9ef;
  border-radius:6px;
}
.search button{
  padding:0.6rem 0.9rem;
  background:var(--accent);
  color:#fff;
  border:none;
  border-radius:6px;
  cursor:pointer;
}
.categories, .recent-posts{list-style:none; padding:0; margin:0}
.categories li + li, .recent-posts li + li{margin-top:0.5rem}
.categories a, .recent-posts a{color:var(--text); text-decoration:none}
.newsletter form{display:flex; gap:0.5rem}
.newsletter input{flex:1;padding:0.6rem;border:1px solid #e6e9ef;border-radius:6px}
.newsletter button{padding:0.6rem 0.75rem;background:var(--accent);color:#fff;border:none;border-radius:6px}

/* Footer */
.site-footer{border-top:1px solid #eef2f7;padding:1.5rem 0;background:#fff}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.footer-inner p{margin:0;color:var(--muted)}
.footer-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:0.75rem}
.footer-nav a{color:var(--muted); text-decoration:none}

/* Accessibility utilities */
.visually-hidden{
  position:absolute!important;
  height:1px;width:1px;
  overflow:hidden;clip:rect(1px,1px,1px,1px);
  white-space:nowrap;border:0;padding:0;margin:-1px;
}

/* Responsive */
@media (max-width: 980px){
  .layout{grid-template-columns:1fr 300px;padding:0 1rem}
}
@media (max-width: 800px){
  .layout{grid-template-columns:1fr; padding:0 1rem}
  .sidebar{order:2}
  .content{order:1}
  .featured img{height:220px;object-fit:cover}
  .card img{height:180px}
  .header-inner{flex-direction:column;align-items:flex-start;gap:0.5rem}
  .main-nav ul{flex-wrap:wrap; gap:0.5rem}
}

/* Small tweaks for focus states */
a:focus, button:focus, input:focus{
  outline:3px solid rgba(15,98,254,0.15);
  outline-offset:2px;
  border-radius:6px;
}
/* Article-specific styles — include after your main styles.css */

/* Post container */
.post{
  grid-column: 1 / -1;
  max-width: 820px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.breadcrumb{font-size:0.95rem;color:var(--muted);margin-bottom:0.5rem}
.breadcrumb a{color:var(--muted); text-decoration:none}
.post-header{margin-bottom:1rem}
.post-header h1{font-size:2rem;margin:0 0 0.5rem}
.post-meta{color:var(--muted); margin-bottom:0.75rem; font-size:0.95rem}

/* Hero image */
.post-hero{margin:0 0 1rem; border-radius:10px; overflow:hidden}
.post-hero img{width:100%;height:auto;display:block;object-fit:cover}
.post-hero figcaption{font-size:0.9rem;color:var(--muted);padding:0.5rem 0}

/* Article content */
.post-content{font-size:1rem;line-height:1.65;color:var(--text)}
.post-content .lede{font-size:1.125rem;color:var(--muted);margin-bottom:1rem}
.post-content h2{font-size:1.25rem;margin-top:1.25rem}
.post-content h3{font-size:1.05rem;margin-top:1rem}
.post-content p{margin:0 0 1rem}
.post-content img{max-width:100%;height:auto;border-radius:8px}
.inline-figure{margin:0 0 1rem}
blockquote{
  margin:1rem 0;
  padding:0.75rem 1rem;
  border-left:4px solid rgba(15,98,254,0.12);
  background: #fbfdff;
  color:var(--muted);
  border-radius:6px;
}

/* Tags and sharing */
.tags-share{display:flex;justify-content:space-between;flex-wrap:wrap;gap:0.5rem;margin:1rem 0}
.tags a{background:#f3f4f6;padding:0.25rem 0.5rem;border-radius:6px;text-decoration:none;color:var(--text);font-size:0.95rem}

/* Author box */
.author-box{
  display:flex;
  gap:1rem;
  align-items:flex-start;
  background:#fff;
  padding:0.9rem;
  border-radius:8px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.04);
  margin-top:1rem;
}
.author-avatar{width:15rem;height:15rem;border-radius:999px;object-fit:cover}
.author-bio h4{margin:0 0 0.35rem 0}

/* Pagination */
.post-pagination{display:flex;justify-content:space-between;gap:1rem;margin:1.25rem 0}
.post-pagination a{color:var(--accent);text-decoration:none}

/* Related posts */
.related-posts ul{list-style:none;padding:0;margin:0}
.related-posts li + li{margin-top:0.5rem}

/* Comments */
.comments .muted{color:var(--muted)}

/* Responsive tweaks */
@media (max-width: 900px){
  .post{padding:0 1rem}
  .post-header h1{font-size:1.6rem}
  .post-hero img{height:220px;object-fit:cover}
  .layout{grid-template-columns:1fr} /* ensure single column on small screens */
}
iframe {
  width: 100%;
  height: 35rem;
  border: none;
  border-radius: 8px;
}