:root {
  --bg: #0b1120;
  --surface: rgba(15, 23, 42, 0.85);
  --card: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --radius: 16px;
  --border-subtle: rgba(148, 163, 184, 0.18);
  --chip-bg: rgba(255,255,255,0.06);
  --chip-bg-active: rgba(56,189,248,0.14);
}

[data-theme="light"] {
  --bg: #ffffff;
  --surface: rgba(248, 250, 252, 0.9);
  --card: #e2e8f0;
  --text: #020617;
  --muted: #475569;
  --border-subtle: rgba(2, 6, 23, 0.14);
  --chip-bg: rgba(2, 6, 23, 0.06);
  --chip-bg-active: rgba(56,189,248,0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav { display: flex; align-items: center; gap: 16px; }

nav a {
  font-weight: 500;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  transition: background .2s ease, color .2s ease;
}

nav a:hover { color: var(--text); background: rgba(148,163,184,0.12); }

#themeToggle {
  border: 1px solid rgba(148,163,184,0.25);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 64px 18px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 36px;
  align-items: center;
}

.hero img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid rgba(148,163,184,0.18);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 14px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.section { margin-top: 56px; }
.section h2 { margin: 0 0 16px; font-size: 1.5rem; }

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid rgba(148,163,184,0.14);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 55px rgba(0,0,0,.28);
}

.card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.card .pad { padding: 16px; }
.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #020617;
  padding: 12px 18px;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 700;
  margin-right: 10px;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(148,163,184,0.25);
  color: var(--text);
}


/* ================================
   Button micro-interactions (premium)
   ================================ */
.btn{
  transition: transform 120ms ease, box-shadow 180ms ease, filter 180ms ease;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  will-change: transform;
}
.btn:hover{
  filter: brightness(1.03);
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}
.btn:active{
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}
.btn:focus-visible{
  outline: 3px solid rgba(56,189,248,0.45);
  outline-offset: 3px;
}

.btn.ghost{
  transition: transform 120ms ease, background-color 180ms ease, border-color 180ms ease;
}
.btn.ghost:hover{
  background: rgba(56,189,248,0.08);
  border-color: rgba(56,189,248,0.35);
}
.btn.ghost:active{
  transform: translateY(1px) scale(0.98);
}
.muted { color: var(--muted); font-size: .95rem; }

footer {
  padding: 40px 18px;
  text-align: center;
  color: var(--muted);
}

/* Blog typography */
.blog-content { max-width: 760px; margin: auto; }
.blog-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 18px; }
.blog-content h1 { font-size: 2.2rem; line-height: 1.2; margin-bottom: 16px; }
.blog-content h2 { margin-top: 40px; }
.blog-content p { margin-bottom: 18px; }

/* Contact */
.contact-card {
  max-width: 560px;
  margin-top: 28px;
  background: var(--card);
  border: 1px solid rgba(148,163,184,0.14);
  padding: 22px;
  border-radius: var(--radius);
}
.field { display: flex; flex-direction: column; margin-bottom: 16px; }
.field label { color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
.field input, .field textarea {
  background: transparent;
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 12px;
  padding: 12px 12px;
  color: var(--text);
  font-family: inherit;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Animations (safe) */
.reveal { opacity: 1; transform: none; }
.reveal.animate { opacity: 1; transform: none; transition: all .6s ease; }
/* ===== Responsive Header + Mobile Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148,163,184,0.15);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand a {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
  padding: 12px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  transition: background .2s ease, color .2s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(148,163,184,0.12);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(148,163,184,0.25);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 16px;
  cursor: pointer;
}

.theme-btn {
  border: 1px solid rgba(148,163,184,0.25);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

/* ===== Mobile ===== */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero img {
    max-height: 360px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid rgba(148,163,184,0.15);
    padding: 14px 16px;
    display: grid;
    gap: 10px;
    transform: translateY(-120%);
    transition: transform .25s ease;
  }

  .site-nav.open {
    transform: translateY(0);
  }

  .site-nav a,
  .theme-btn {
    width: 100%;
    padding: 14px 14px;
    font-size: 16px;
  }
}

/* lock scroll when menu open */
body.nav-open {
  overflow: hidden;
}


/* Blog listing */
.blog-grid{
  display:grid;
  /* Default to 2 columns for mobile (better balance),
     and fall back to 1 column for very small phones below. */
  grid-template-columns: 1fr;
  gap:16px;
  margin-top:18px;
}

@media (min-width: 480px) and (max-width: 719px){
  .blog-grid{ grid-template-columns: 1fr; }
  
  .blog-card h3{ font-size: 1.02rem; }
}

@media (min-width: 720px){
  .blog-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px){
  .blog-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.blog-card{
  border:1px solid rgba(255,255,255,0.14);
  border-radius:16px;
  overflow:hidden;
  background: rgba(255,255,255,0.06);
  width:100%;
  display:flex;
  flex-direction:column;
  height:100%;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

/* Premium hover lift (more visible in dark mode) */
.blog-card:hover,
.blog-card:focus-within{
  transform: translateY(-4px);
  border-color: rgba(56,189,248,0.35);
  background: rgba(255,255,255,0.075);
  box-shadow: 0 18px 44px rgba(0,0,0,0.34), 0 0 0 1px rgba(56,189,248,0.12);
}

.blog-card .pad{
  padding: 14px 14px 16px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  flex:1;
}
.blog-card h3{
  margin:0;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 2.5em; /* keeps button row aligned */
}
.blog-card .meta{
  margin:0;
}
.blog-card .summary{
  margin:0;
  display:-webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 3.6em;
}
.blog-card .summary--empty{
  min-height: 3.6em;
}
.blog-card .btn{
  margin-top:auto;
  width:100%;
  text-align:center;
}
.blog-card .pad{ padding:16px; }

/* Equal height cards: allow content to stretch and align consistently */
.blog-card .pad{
  display:flex;
  flex-direction:column;
  flex:1;
  gap:10px;
}

/* Title + summary polish (wider card look even when grid is tight) */
.blog-card h3{
  margin:0;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.blog-card .meta{
  font-size: 13px;
  opacity: 0.9;
}

/* Post summary as a rounded rectangle card */
.blog-card .summary{
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.14);
  border-radius: 14px;
  padding: 10px 12px;
  line-height: 1.45;
  font-size: 14px;
  display:-webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.blog-card p{ margin:0; 
  line-height: 1.6;
}
/* Let the summary take the extra height so buttons align across cards */
.blog-card .summary{ flex:1; }

/* Keep button rows aligned even when a post has no excerpt */
.blog-card .summary--empty{ min-height: 3.8em; border: 1px solid transparent; background: transparent; padding: 0; }

/* Card thumbnail (prevents huge/tall images taking over the page) */
.blog-card .thumb{
  aspect-ratio: 16 / 9;
  width:100%;
  overflow:hidden;
  background: rgba(0,0,0,0.18);
}
.blog-card .thumb img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition: transform 220ms ease;
}

/* Tiny image zoom on hover/focus (premium feel, Lighthouse-safe) */
.blog-card:hover .thumb img,
.blog-card:focus-within .thumb img{
  transform: scale(1.04);
}

/* Pinned post (latest) */
.pinned-wrap{
  margin: 8px 0 18px;
}
.pinned-label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.pinned-card{
  border:1px solid var(--border-subtle);
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  overflow:hidden;
  display:grid;
  grid-template-columns: 1fr;
}

/* When pinned card is inside the blog grid, make it span full grid but keep a max width */
.blog-grid .pinned-card{
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
}
[data-theme="light"] .pinned-card{ background: rgba(2,6,23,0.02); }

@media (min-width: 760px){
  .pinned-card{
    grid-template-columns: 1.2fr 1fr;
    max-width: 100%; /* keep within column to avoid overlap */
  }
  .pinned-wrap{ display:flex; flex-direction:column; align-items:flex-start; }
}

.pinned-card .thumb{ margin:0; border-radius:0; }
.pinned-card .pin-pad{
  padding: 16px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.pinned-card h2{ margin:0; font-size: 1.25rem; line-height:1.2; }
.pinned-card .summary{ color: var(--muted); margin:0; }

/* Date group headers */
.group{
  margin-top: 14px;
}
.group-title{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0;
}
.group-title::after{
  content:"";
  flex:1;
  height:1px;
  background: var(--border-subtle);
}

/* Share bar at end of posts */
.share-bar{
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.share-bar strong{ font-size: 13px; color: var(--muted); margin-right: 6px; }
.share-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  transition: transform 120ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
[data-theme="light"] .share-btn{ background: rgba(2,6,23,0.03); }
.share-btn:hover{ transform: translateY(-1px); box-shadow: 0 12px 22px rgba(0,0,0,0.18); }
.share-btn:active{ transform: translateY(0) scale(0.98); }

/* Blog page layout (Linear/Now-inspired, but aligned to your site) */
.blog-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 980px){
  .blog-layout{ grid-template-columns: 1fr 320px; align-items:start; }
}

.blog-controls{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  margin: 14px 0 18px;
}

.search{
  flex: 1 1 240px;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border:1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--chip-bg);
}

.search input{
  width:100%;
  background: transparent;
  border: none;
  color: inherit;
  outline: none;
  font: inherit;
}

.chip-row{ display:flex; flex-wrap:wrap; gap:8px; }

.chip{
  border:1px solid var(--border-subtle);
  background: var(--chip-bg);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  user-select:none;
  color: var(--text);
}

.chip[aria-pressed="true"]{
  border-color: rgba(56,189,248,0.38);
  background: var(--chip-bg-active);
}

.blog-sidebar{
  position: sticky;
  top: 90px;
  border:1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px;
  background: var(--chip-bg);
}

.follow-cta{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.follow-cta .btn{
  width:100%;
  display:flex;
  justify-content:center;
  text-align:center;
  margin-right: 0; /* prevent odd spacing when full-width */
}

/* Blog post layout (Rise-science style: rich article + helpful sidebar) */
.post-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 980px){
  .post-layout{ grid-template-columns: minmax(0, 1fr) 320px; }
}

.post-hero{
  border-radius: 18px;
  overflow:hidden;
  position:relative;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.18);
}

.post-hero img{
  width:100%;
  height: 340px;
  object-fit: cover;
  display:block;
  filter: saturate(1.02) contrast(1.02);
}

@media (max-width: 768px){
  .post-hero img{ height: 240px; }
}

.post-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0.10), rgba(0,0,0,0.55));
}

.post-meta{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  margin: 14px 0 10px;
}

.post-meta .pill{
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.post-actions{ display:flex; gap:10px; flex-wrap:wrap; margin: 10px 0 16px; }

.post-actions button{
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: inherit;
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
}

.toc{
  border:1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,0.05);
}

.toc .toc-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:10px 0 6px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.12);
  color: inherit;
  cursor: pointer;
}

.toc .toc-list{
  margin-top: 6px;
  max-height: 50vh;
  overflow:auto;
  padding-right: 6px;
}

/* Mobile: collapse TOC by default to avoid very long lists */
@media (max-width: 768px){
  .toc{ padding: 12px; }
  .toc.is-collapsed .toc-list{ display:none; }
}

.toc a{ display:block; padding: 6px 0; color: inherit; text-decoration:none; opacity:0.9; }
.toc a:hover{ opacity:1; text-decoration:underline; }

.progress{
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: rgba(56,189,248,0.9);
  z-index: 9999;
}


/* Skills cards */
.skills-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
  margin-top:16px;
}

.skill-card{
  border:1px solid rgba(255,255,255,0.14);
  border-radius:16px;
  padding:16px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
}

.skill-card h3{
  margin:0 0 10px;
  font-size:16px;
  letter-spacing:0.2px;
}

.skill-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.skill-tag{
  font-size:13px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.12);
}

.skill-tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.skill-badge{
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  opacity:0.9;
}

.skill-badge.primary{ opacity:1; }
.skill-badge.secondary{ opacity:0.9; }
.skill-badge.learning{ opacity:0.8; }

.skill-tag.is-focus{
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.10);
}

.skill-tag.is-dim{
  opacity:0.55;
}


/* ===== Performance: content-visibility for below-the-fold sections ===== */
@supports (content-visibility: auto) {
  .cv { content-visibility: auto; contain-intrinsic-size: 800px; }
}

.hero-photo{
  width: min(480px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(0,0,0,0.18);
  justify-self: end;
}
.hero-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}


/* Footer */
.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding: 18px 22px;
  background: transparent;
}
.footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.social-links {
  display: flex;
  gap: 12px;
  align-items: center;
}
.social-links a {
  color: var(--muted);
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.social-links svg{ width:18px; height:18px; display:block; }
.social-links .sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.social-links a:hover {
  color: var(--text);
  background: rgba(148,163,184,0.12);
}


/* --- SEO content sections (designed, not 'plain text') --- */
.section-head{ margin-bottom: 14px; }
.section-head .muted{ max-width: 70ch; }

.feature-grid{
  display: grid;
  gap: 16px;
  margin-top: 14px;
  align-items: stretch;
}
@media (min-width: 860px){
  .feature-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.feature-card{
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  min-height: 160px;
}
.feature-card h3{ margin-top: 0; margin-bottom: 8px; font-size: 1.05rem; }
.feature-card p{ margin-top: 0; }

.ticks{
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}
.ticks li{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
}
.ticks li::before{
  content: "✓";
  font-weight: 700;
  opacity: 0.9;
}

.callout{
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border:1px solid rgba(56,189,248,0.25);
  background: linear-gradient(180deg, rgba(56,189,248,0.12), rgba(255,255,255,0.04));
}

.steps{
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.step{
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 12px 14px;
}
.step .num{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(56,189,248,0.16);
  border: 1px solid rgba(56,189,248,0.28);
  font-weight: 800;
}
.step h3{ margin: 0 0 4px; font-size: 1.05rem; }
.step p{ margin: 0; color: var(--muted); }

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

/* Blog card compact variant for homepage */
.blog-card.compact h3{
  font-size: 1.02rem;
  -webkit-line-clamp: 2;
  min-height: 2.6em; /* keeps buttons aligned across the row */
}
.blog-card.compact .muted{ min-height: 1.2em; }
.blog-card.compact .thumb img{ aspect-ratio: 16/9; object-fit: cover; }

/* ================================
   Hero image overlay + glow (premium)
   ================================ */
.hero-image{ position: relative; overflow: hidden; }

/* soft blurred glow behind the image */
.hero-image::before{
  content:"";
  position:absolute;
  inset:-22%;
  pointer-events:none;
  background: radial-gradient(closest-side,
    rgba(56,189,248,0.38) 0%,
    rgba(56,189,248,0.18) 35%,
    rgba(11,17,32,0.00) 70%);
  filter: blur(26px);
  opacity: 0.55;
  transform: translateZ(0);
  z-index: 0;
}

/* keep image above glow */
.hero-image img{ position: relative; z-index: 1; }

/* subtle gradient overlay on top for depth */
.hero-image::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(180deg,
    rgba(11,17,32,0.08) 0%,
    rgba(11,17,32,0.28) 45%,
    rgba(11,17,32,0.55) 75%,
    rgba(11,17,32,0.72) 100%);
  z-index: 2;
}

/* tune overlay/glow for light theme */
[data-theme="light"] .hero-image::before{
  opacity: 0.35;
}
[data-theme="light"] .hero-image::after{
  background: linear-gradient(180deg,
    rgba(255,255,255,0.00) 0%,
    rgba(255,255,255,0.10) 35%,
    rgba(2,6,23,0.10) 70%,
    rgba(2,6,23,0.16) 100%);
}
/* ================================
   Mobile Hero Image – Cover Style
   ================================ */
@media (max-width: 768px) {
  .hero { display:flex; flex-direction: column; gap: 1.25rem; }

  .hero-image {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    border-radius: 0;
  }

  .hero-image img{
    width: 100%;
    height: 60vh;
    object-fit: cover;
    object-position: center top;
    border-radius: 0;
    display:block;
  }
}

/* ================================
   Very small phones (≤360px)
   ================================ */
@media (max-width: 360px){
  .container{ padding-left: 14px; padding-right: 14px; }
  .hero h1{ font-size: 2.05rem; line-height: 1.05; }
  .hero p{ font-size: 1rem; }
  .cta-row{ gap: 8px; }
  .hero-image img{ height: 54vh; }
}

/* ================================
   Scroll reveal animation
   ================================ */
.reveal{
  opacity: 1;
  transform: none;
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible{
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
}

@media (max-width: 360px){
  .blog-grid{ grid-template-columns: 1fr; }
}


/* Pinned card layout: keep title/details visible (prevents 'image-only' feel) */
.pinned-card .thumb img{
  width:100%;
  height: 360px;
  object-fit: cover;
  object-position: center;
}
@media (min-width: 900px){
  .pinned-card{
    grid-template-columns: 1.35fr 1fr;
    align-items: stretch;
  }
  .pinned-card .thumb{
    height: 100%;
  }
  .pinned-card .thumb img{
    height: 100%;
    min-height: 360px;
  }
  .pin-pad{
    padding: 18px 18px 18px;
  }
}


/* Blog page: bottom CTA block (moved from sidebar) */
@media (min-width: 980px){
  .blog-layout{ grid-template-columns: 1fr; }
}

.follow-cta-block{
  margin: 28px auto 0;
  /* Keep this CTA panel the same visual width as the 2-column blog grid */
  width: calc(100% - 40px);
  max-width: 1100px;
  border:1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px;
  background: var(--chip-bg);
}

@media (max-width: 520px){
  .follow-cta-block{ width: calc(100% - 28px); }
}

.follow-cta-block hr{
  border-top: 1px solid var(--border-subtle) !important;
}

@media (min-width: 980px){
  .follow-cta-block{
    display:grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items:center;
  }
  .follow-cta-block .follow-cta{
    max-width: 520px;
  }
  .follow-cta-block .follow-cta .btn,
  .follow-cta-block .follow-cta .btn.ghost{
    width: auto;
    min-width: 220px;
  }
}


/* Blog follow CTA: keep actions on one line on desktop */
.follow-cta-actions{
  display:flex;
  gap:12px;
  flex-wrap: wrap;
}
.follow-cta-actions .btn{
  width:auto;
  margin-right:0;
}
@media (max-width: 620px){
  .follow-cta-actions{ flex-direction: column; }
  .follow-cta-actions .btn{ width:100%; }
}


@media (min-width: 640px){
  .follow-cta-actions{ flex-wrap: nowrap; }
  .follow-cta-actions .btn{ flex: 1; }
}


/* Follow CTA */
.follow-cta{
  margin: 2.25rem 0;
  padding: 1.25rem 1.25rem;
  border-radius: var(--radius, 16px);
  background: var(--surface, rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.follow-cta__title{
  margin: 0 0 .35rem 0;
  font-size: 1.1rem;
}
.follow-cta__text{
  margin: 0 0 .85rem 0;
  color: var(--muted, #94a3b8);
}
.follow-cta__actions{
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* Buttons (re-using existing .btn if present) */
.btn-hashnode{
  background: #22c55e;
  color: #062b14;
  border: 1px solid rgba(34,197,94,.35);
  font-weight: 700;
}
.btn-hashnode:hover{
  filter: brightness(0.95);
}
.btn-medium{
  background: rgba(255,255,255,.08);
  color: var(--text, #e5e7eb);
  border: 1px solid rgba(148,163,184,.25);
  font-weight: 700;
}
.btn-medium:hover{
  background: rgba(255,255,255,.12);
}


/* Follow sidebar */
.follow-sidebar{
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius, 16px);
  background: var(--surface, rgba(15, 23, 42, 0.85));
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.follow-sidebar__title{
  margin: 0 0 .75rem 0;
  font-size: .95rem;
  letter-spacing: .02em;
}
.follow-sidebar__actions{
  display: grid;
  gap: .6rem;
}
.btn-block{ width: 100%; text-align: center; }

@media (max-width: 768px){
  .follow-sidebar{ display:none; }
}

/* Improve CTA buttons layout */
.follow-cta--post .follow-cta__actions{
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}
@media (min-width: 900px){
  .follow-cta--post .follow-cta__actions{
    grid-template-columns: 1fr 1fr;
  }
}


/* --- Follow CTA overrides (final) --- */
.follow-cta{
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.follow-cta__actions .btn{
  flex: 1 1 220px;
  text-align: center;
  padding: .9rem 1rem;
  border-radius: 14px;
}
.follow-cta--post .follow-cta__actions .btn{
  flex: 1 1 260px;
}
.follow-sidebar .btn-block{
  width: 100%;
  text-align: center;
  padding: .75rem 1rem;
  border-radius: 12px;
}
@media (max-width: 640px){
  .follow-cta{
    padding: 1rem;
  }
}
/* --- end overrides --- */
