/*
Theme Name: Asad Dev Theme v2
Theme URI: https://asadali.dev
Author: Asad
Description: Custom dev blog theme – responsive, fast, and Gutenberg-friendly.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: asad-dev-theme
*/

/* =========================================
   1. DESIGN TOKENS (CSS VARIABLES)
   ========================================= */

:root {
  /* Brand Colors */
  --color-primary: #2563eb;
  --color-primary-strong: #1d4ed8;
  --color-primary-gradient-from: #6366f1;
  --color-primary-gradient-to: #4f46e5;

  /* Neutrals */
  --color-text: #0f172a;
  --color-muted: #6b7280;
  --color-muted-strong: #475569;
  --color-border: #e2e8f0;
  --color-border-soft: #eef2f7;
  --color-surface: #ffffff;
  --color-surface-soft: #f8fafc;
  --color-surface-alt: #e8eef5;

  /* Dark surfaces */
  --color-dark-bg: #0a0f1c;
  --color-dark-bg-alt: #0b1220;
  --color-dark-text: #e6eef8;

  /* Typography */
  --font-base: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;

  /* Layout */
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-medium: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 16px 30px rgba(15, 23, 42, 0.1);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
}

/* =========================================
   2. BASE / RESET
   ========================================= */

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  display: block;
}



/* Links (component-specific overrides below) */
a {
  color: var(--color-primary);
  text-decoration: none;
}

/* =========================================
   3. LAYOUT HELPERS
   ========================================= */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Sticky page wrapper (for footer at bottom) */
.asad-page-wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* =========================================
   4. GLOBAL COMPONENTS
   ========================================= */

/* Buttons */

.btn,
.asad-hero-btn,
.see-more-btn,
.asad-topic-cta,
.asad-header-cta,
.asad-mobile-cta {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.btn:hover,
.asad-hero-btn:hover,
.see-more-btn:hover,
.asad-topic-cta:hover,
.asad-header-cta:hover,
.asad-mobile-cta:hover {
  background: var(--color-primary-strong);
  transform: translateY(-2px);
}

/* Card shell – reused for blog posts */
.card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.asad-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: #fff !important;
    cursor: pointer;
}

.asad-header-brand:hover {
    text-decoration: none !important;
    color: #fff !important; /* Prevent color change */
}


.card .thumb {
  height: 160px;
  overflow: hidden;
}

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

.card .card-body {
  padding: var(--space-md);
}

.card .card-title {
  font-size: 18px;
  margin: 0 0 var(--space-sm);
  font-weight: 700;
  color: var(--color-text);
}

.card .card-meta {
  font-size: 14px;
  color: #64748b;
  margin-top: var(--space-xs);
}

/* Card hover – bottom bar + lift */
.card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: #6366f1;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.card:hover::after {
  width: 100%;
}

/* Grid helpers */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: var(--space-lg);
  margin-bottom: 30px;
}

/* =========================================
   5. SITE CHROME
   ========================================= */

/* 5.1 Announcement Bar */

.asad-announcement {
  background: linear-gradient(90deg, #8b5cf6, #6366f1, #3b82f6);
  color: #fff;
  text-align: center;
  padding: 4px 20px;
  font-size: 15px;
  font-weight: 500;
}

/* 5.2 Header & Navigation */

.asad-header {
  background: var(--color-dark-bg);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 9999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.asad-header-inner {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Left: Avatar + Name */

.asad-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asad-header-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  object-fit: cover;
}

.asad-header-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

/* Middle: Menu */

.asad-menu,
.asad-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.asad-menu {
  display: flex;
  gap: 28px;
}

.asad-menu a {
  position: relative;
  color: #e5e7eb;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.25s ease;
}

/* Menu hover: color + underline animation */

.asad-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: #6366f1;
  transition: width 0.25s ease;
  border-radius: 2px;
}

.asad-menu a:hover {
  color: #fff;
}

.asad-menu a:hover::after {
  width: 100%;
}

/* Right: CTA */

.asad-header-cta {
  padding: 10px 22px;
  border-radius: 24px;
  background: linear-gradient(90deg, var(--color-primary-gradient-from), var(--color-primary-gradient-to));
  color: #fff !important;
  font-size: 15px;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.asad-header-cta:hover {
  opacity: 0.9;
}

/* Desktop-only header elements */

.desktop-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* 5.3 Mobile Menu */

.asad-hamburger {
  display: none;
  width: 32px;
  height: 24px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10001;
}

.asad-hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}

.asad-hamburger span:nth-child(1) {
  top: 0;
}

.asad-hamburger span:nth-child(2) {
  top: 10px;
}

.asad-hamburger span:nth-child(3) {
  top: 20px;
}

.asad-hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.asad-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.asad-hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Drawer */

.asad-mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 260px;
  height: 100%;
  background: var(--color-dark-bg-alt);
  color: #fff;
  transition: right 0.35s ease;
  padding-top: 80px;
  z-index: 10000;
}

.asad-mobile-drawer.open {
  right: 0;
}

.asad-mobile-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.asad-mobile-menu li {
  margin: 12px 0;
}

.asad-mobile-menu a {
  color: #e5e7eb;
  font-size: 18px;
  font-weight: 600;
  padding: 8px 20px;
  display: block;
}

.asad-mobile-menu a:hover {
  color: #fff;
}

.asad-mobile-cta {
  margin: 24px 20px;
  text-align: center;
  border-radius: 24px;
  background: linear-gradient(90deg, var(--color-primary-gradient-from), var(--color-primary-gradient-to));
}

/* 5.4 Footer */

.site-footer {
  background: var(--color-dark-bg-alt);
  color: var(--color-dark-text);
  padding: 40px 0;
  margin-top: 64px;
  text-align: center;
}

.site-footer a {
  color: rgba(230, 238, 248, 0.9);
  text-decoration: none;
  font-weight: 600;
}

/* =========================================
   6. PAGE SECTIONS
   ========================================= */

/* 6.1 Hero (text-focused) */

.asad-hero {
  padding: 50px 20px 50px;
  background: var(--color-surface-alt);
}

.asad-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.asad-hero-title {
  font-size: 40px;
  margin: 0 0 12px;
  font-weight: 800;
  color: var(--color-text);
}

.asad-hero-sub {
  font-size: 20px;
  color: var(--color-muted-strong);
  margin-bottom: 32px;
  line-height: 1.6;
}

.asad-hero-heading {
  font-size: 40px;
    font-weight: 800;
    margin-bottom: 28px;
    color: var(--color-text);
    letter-spacing: -1px;
}

.asad-hero-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 32px;
  max-width: 650px;
  text-align: left;
  color: #334155;
  font-size: 18px;
  line-height: 1.7;
}

.asad-hero-list li {
  margin-bottom: 5px;
}

.asad-hero-btn {
  background: var(--color-primary);
  font-size: 18px;
  padding: 14px 28px;
}

/* Highlight for ".NET" */
.highlight-dotnet {
  color: #3a3ddf;
  font-weight: 800;
  font-family: sans-serif;
}

/* 6.2 Latest Posts */

.latest-posts-section {
  padding: 20px 0 40px;
}

.latest-posts-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--color-text);
}

/* Post title links */

.posts-grid .card-title a {
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1.4;
  display: inline-block;
  transition: color 0.25s ease, transform 0.25s ease;
}

.posts-grid .card-title a:hover {
  color: #6366f1;
  transform: translateY(-2px);
}

/* Meta already styled in global .card */

/* See More button */

.see-more-wrapper {
  text-align: center;
  margin-top: 20px;
}

.see-more-btn {
  background: var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
}

.see-more-btn:hover {
  background: #1e40af;
}

/* 6.3 Topics Section */

.asad-topics {
  background: var(--color-surface-alt);
  padding: 80px 20px;
  border-radius: var(--radius-lg);
  margin-top: 5px;
}

.asad-topics-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.asad-topics-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-text);
}

.asad-topics-subtitle {
  font-size: 18px;
  color: #64748b;
  margin-top: 10px;
  margin-bottom: 40px;
}

.asad-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}

.asad-topic-card {
  background: #ffffff;
  padding: 28px;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.asad-topic-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.asad-topic-icon {
  font-size: 34px;
  display: block;
  margin-bottom: 12px;
}

.asad-topic-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.asad-topic-card p {
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
}

/* Topics CTA */

.asad-topic-cta-wrapper {
  margin-top: 40px;
}

.asad-topic-cta {
  background: linear-gradient(90deg, var(--color-primary-gradient-from), var(--color-primary-gradient-to));
  border-radius: 12px;
  font-size: 17px;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* 6.4 Newsletter Widget (dark card) */

.asad-newsletter-box {
  background: #0f172a;
  padding: 48px 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 812px;
  margin: 40px auto;
  color: #e2e8f0;
  font-family: var(--font-base);
  box-shadow: var(--shadow-soft);
}

.asad-newsletter-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #f8fafc;
}

.asad-newsletter-title .highlight {
  color: #6366f1;
}

.asad-newsletter-text {
  font-size: 16px;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 36px;
}

.asad-newsletter-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

.asad-newsletter-form input {
  padding: 14px 16px;
  width: 300px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #ffffff;
  font-size: 16px;
  outline: none;
}

.asad-newsletter-form button {
  background: linear-gradient(90deg, var(--color-primary-gradient-from), var(--color-primary-gradient-to));
  color: #fff;
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.asad-newsletter-form button:hover {
  opacity: 0.85;
}

.asad-newsletter-note {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
}

/* Compact Blog Card Refinements */
.card {
    padding-bottom: 8px; /* more compact bottom */
}

.card .card-body {
    padding: 14px 16px !important; /* slightly tighter */
}

.card .card-title {
    margin-bottom: 6px !important;
}

.card .card-meta {
    margin-bottom: 10px !important;
}

/* Excerpt text lighter + smaller */
.card .card-body p {
    color: #64748b;         /* light gray */
    font-size: 15px;        /* smaller */
    line-height: 1.55;
    margin-top: 6px;
}

/* Make entire card clickable */
.card {
    position: relative;
}

.card-full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; 
    text-indent: -9999px;
    overflow: hidden;
}

/* Ensure inner links still appear above overlay */
.card-title a,
.card-meta a {
    position: relative;
    z-index: 10;
}

/* Ensure title hover still works above overlay */
.card-title a {
    position: relative;
    z-index: 20; /* above the overlay */
    pointer-events: auto; /* allow hover */
}

/* Ensure the overlay only handles click, not hover */
.card-full-link {
    z-index: 5;
    pointer-events: auto; /* keeps card clickable */
}

/* Make title hover style trigger when card is hovered */
.card:hover .card-title a {
    color: #6366f1 !important; /* Same brand hover color */
    transform: translateY(-2px);
}

/* Category Filter Section */
.asad-category-filter-container {
    margin-bottom: 40px;
	padding: 0px;
}

.asad-category-heading {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #0f172a;
}

/* Pill Wrapper */
.asad-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Category Pills */
.asad-category-pill {
    display: inline-block;
    padding: 8px 16px;
    background: #f1f5f9;
    color: #334155;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
}

/* Hover */
.asad-category-pill:hover {
    background: #6366f1;
    color: #fff;
    transform: translateY(-2px);
}

/* Active (when user is viewing category) */
.asad-category-pill.active {
    background: #6366f1;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}

/* Newsletter Section Heading (Matches "What I Write About" styling) */
.asad-newsletter-heading-container {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

.asad-newsletter-main-heading {
    font-size: 36px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.asad-newsletter-subtext {
    font-size: 18px;
    color: #64748b; /* soft muted gray */
    max-width: 760px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

/* Recent Posts Heading Section */
.asad-recentposts-heading-container {
    text-align: left;          /* or center — choose style below */
    margin-bottom: 30px;
    padding-left: 8px;         /* small soft align */
}

.asad-recentposts-main-heading {
    font-size: 32px;           /* large heading */
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.asad-recentposts-subtext {
    font-size: 17px;
    color: #64748b;            /* soft muted gray */
    line-height: 1.6;
}

/* -------------------------------------
   Custom 404 Page
-------------------------------------- */
.asad-404-container {
    text-align: center;
    padding: 120px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.asad-404-title {
    font-size: 48px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
}

.asad-404-subtext {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 32px;
}

.asad-404-btn {
    display: inline-block;
    background: linear-gradient(90deg, #6366f1, #4f46e5);
    padding: 14px 28px;
    border-radius: 10px;
    color: #fff;
    font-size: 18px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity .25s ease, transform .25s ease;
}

.asad-404-btn:hover {
    opacity: .9;
    transform: translateY(-2px);
}

/* Blog Page Header Styling */
.asad-blog-header {
}

.asad-blog-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 0px;
    color: #0f172a;
}

.asad-blog-subtitle {
    font-size: 17px;
    color: #64748b;
    margin-bottom: 50px;
    line-height: 1.6;
}

.asad-category-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}



/* ------------------------------------------------------------
   ARTICLE WRAPPER — SAFE SCOPE
------------------------------------------------------------ */
.single-post .entry-content {
/*     max-width: 780px; */
    margin: 0 auto;
/*     padding: 40px 20px; */
    font-size: 16px;
    line-height: 1.5;
    color: #0f172a;
}

/* ------------------------------------------------------------
   HEADINGS
------------------------------------------------------------ */
.single-post .entry-content h1, .single-post article h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 24px;
}

.single-post .entry-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-top: 60px;
    margin-bottom: 20px;
    color: #1e293b;
    position: relative;
}

.single-post .entry-content h2::after {
    content: "";
    width: 48px;
    height: 3px;
    background: #6366f1;
    display: block;
    margin-top: 8px;
    border-radius: 4px;
}

.single-post .entry-content h3 {
    font-size: 26px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 18px;
}

/* ------------------------------------------------------------
   PARAGRAPHS
------------------------------------------------------------ */
.single-post .entry-content p {
    margin-bottom: 22px;
    color: #334155;
}

/* ------------------------------------------------------------
   LISTS
------------------------------------------------------------ */
.single-post .entry-content ul,
.single-post .entry-content ol {
    margin: 20px 0;
    padding-left: 26px;
}

.single-post .entry-content li {
    margin-bottom: 10px;
}

/* ------------------------------------------------------------
   INLINE CODE
------------------------------------------------------------ */
.single-post .entry-content code {
    background: #eef2ff;
    padding: 2px 6px;
    border-radius: 6px;
    font-family: Menlo, Monaco, Consolas, monospace;
    font-size: 15px;
    color: #4338ca;
    border: 1px solid #e0e7ff;
}

/* ------------------------------------------------------------
   CODE BLOCKS
------------------------------------------------------------ */
.single-post .entry-content pre code {
    display: block;
    padding: 28px 20px;
    border-radius: 12px;
    background: #0f172a !important;
    color: #e2e8f0;
    font-size: 15px;
    overflow-x: auto;
}

/* ------------------------------------------------------------
   BLOCKQUOTES
------------------------------------------------------------ */
.single-post .entry-content blockquote {
    border-left: 4px solid #6366f1;
    background: #f1f5f9;
    padding: 18px 24px;
    margin: 30px 0;
    border-radius: 8px;
    color: #334155;
    font-style: italic;
}

.single-post .entry-content blockquote p {
    margin: 0;
}

/* ------------------------------------------------------------
   TABLES
------------------------------------------------------------ */
.single-post .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 16px;
}

.single-post .entry-content table th {
    background: #eef2ff;
    color: #4338ca;
    font-weight: 700;
    padding: 12px;
}

.single-post .entry-content table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.single-post .entry-content table tr:nth-child(even) {
    background: #f8fafc;
}

.single-post .entry-content table {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* ------------------------------------------------------------
   IMAGES
------------------------------------------------------------ */
.single-post .entry-content img {
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
    margin: 28px 0;
}

.single-post .entry-content .wp-caption-text {
    text-align: center;
    font-size: 15px;
    color: #64748b;
    margin-top: 8px;
}

/* ------------------------------------------------------------
   CALLOUTS
------------------------------------------------------------ */
.single-post .entry-content .callout {
    border-left: 4px solid #6366f1;
    background: #eef2ff;
    padding: 16px 45px;
    border-radius: 10px;
    margin: 26px 0;
}

.single-post .entry-content .callout.warning {
    border-left-color: #f59e0b;
    background: #fff7ed;
}

.single-post .entry-content .callout.success {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.single-post h1 {
    margin-bottom: 14px !important;
}

.single-post .card-meta {
    margin-bottom: 28px !important;
    color: #64748b;
    font-size: 15px;
}

.single-post .entry-content .callout.tip {
    border-left: 4px solid #3b82f6; /* blue */
    background: #eff6ff; /* soft blue background */
    padding: 16px 45px;
    border-radius: 10px;
    margin: 26px 0;
}


.single-post .entry-content .callout.debug {
    border-left: 4px solid #06b6d4; /* cyan */
    background: #ecfeff; /* very light cyan */
    padding: 16px 45px;
    border-radius: 10px;
    margin: 26px 0;
    font-family: Menlo, Consolas, monospace; /* debugging feel */
    font-size: 15px;
}


.single-post .entry-content .callout.error {
    border-left: 4px solid #dc2626; /* red */
    background: #fef2f2; /* very light red */
    padding: 16px 45px;
    border-radius: 10px;
    margin: 26px 0;
}


.single-post .entry-content .callout.bestpractice {
    border-left: 4px solid #16a34a; /* strong green */
    background: #f0fdf4; /* light green */
    padding: 16px 45px;
    border-radius: 10px;
    margin: 26px 0;
    font-weight: 500;
}

.single-post .entry-content .callout.arch {
    border-left: 4px solid #7c3aed; /* purple */
    background: #f5f3ff; /* soft purple */
    padding: 16px 45px;
    border-radius: 10px;
    margin: 26px 0;
}

/* ---------------------------------------------------
   Base callout styling
--------------------------------------------------- */
.callout {
    padding: 16px 45px;
    border-radius: 12px;
    margin: 24px 0;
    border-left: 5px solid transparent;
    position: relative;
    font-size: 17px;
    line-height: 1.6;
}

/* Icon placement */
.callout::before {
    position: absolute;
    left: 14px;
    top: 14px;
    font-size: 20px;
}

/* Add extra padding-left to make room for icon */
.callout {
    padding-left: 48px;
}

/* ---------------------------------------------------
   Callout types
--------------------------------------------------- */

/* INFO */
.callout.info {
    background: #eef6ff;
    border-left-color: #3b82f6;
}
.callout.info::before {
    content: "💡";
}

/* SUCCESS */
.callout.success {
    background: #ecfdf5;
    border-left-color: #10b981;
}
.callout.success::before {
    content: "✅";
}

/* WARNING */
.callout.warning {
    background: #fff7ed;
    border-left-color: #f59e0b;
}
.callout.warning::before {
    content: "⚠️";
}

/* ERROR */
.callout.error {
    background: #fef2f2;
    border-left-color: #ef4444;
}
.callout.error::before {
    content: "❌";
}

/* TIP */
.callout.tip {
    background: #f3f4ff;
    border-left-color: #6366f1; /* your brand color */
}
.callout.tip::before {
    content: "🧠";
}

/* DEBUG */
.callout.debug {
    background: #faf5ff;
    border-left-color: #a855f7;
}
.callout.debug::before {
    content: "🐞";
}

/* BEST PRACTICE */
.callout.bestpractice {
    background: #eefdfb;
    border-left-color: #14b8a6;
}
.callout.bestpractice::before {
    content: "🎯";
}

.callout.arch::before {
    content: "🧩";
}



.asad-post-newsletter-cta {
    background: #0f172a;
    padding: 48px;
    border-radius: 20px;
    margin: 80px auto 40px;
    color: #e2e8f0;
    text-align: center;
    max-width: 820px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.asad-post-newsletter-cta .cta-title {
    font-size: 32px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 12px;
}

.asad-post-newsletter-cta .cta-subtitle {
    font-size: 18px;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 28px;
}

.asad-post-newsletter-cta .cta-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.asad-post-newsletter-cta input {
    padding: 14px 16px;
    width: 280px;
    border-radius: 10px;
    border: 1px solid #334155;
    font-size: 16px;
    outline: none;
}

.asad-post-newsletter-cta button {
    background: linear-gradient(90deg, #6366f1, #4f46e5);
    padding: 14px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 16px;
    font-weight: 600;
    transition: opacity .25s, transform .25s;
}

.asad-post-newsletter-cta button:hover {
    opacity: .9;
    transform: translateY(-2px);
}

.asad-post-newsletter-cta .cta-note {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 10px;
}

/* =========================================
   CLEAN CHECKLIST (UL/LI VERSION)
   ========================================= */
.single-post article ul.asad-checklist {
  list-style: none;
  margin: 28px 0;
  padding: 0;
}

.single-post article ul.asad-checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
}

/* Tick icon */
.single-post article ul.asad-checklist li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0px;
  font-size: 18px;
  font-weight: 800;
  color: #6366f1;
}

/* Optional cross variant */
.single-post article ul.asad-checklist li.cross::before {
  content: "✘";
  color: #dc2626;
}























/* =========================================
   7. RESPONSIVE BREAKPOINTS
   ========================================= */

/* Tablet and down */

@media (max-width: 980px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Header & mobile nav */

@media (max-width: 900px) {
  .desktop-menu {
    display: none !important;
  }

  .asad-hamburger {
    display: block;
  }
}

/* Small screens */

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

  .asad-topic-grid {
    grid-template-columns: 1fr;
  }

  .asad-hero-title {
    font-size: 25px;
  }

  .asad-hero-heading {
    font-size: 30px;
	  margin: 0 0 10px;
  }

  .asad-hero-sub {
    font-size: 18px;
  }
	
	.asad-hero-list li{
		font-size:14px;
		margin-bottom:0px;
	}

  .asad-newsletter-form {
    flex-direction: column;
  }

  .asad-newsletter-form input {
    width: 100%;
  }

  .asad-newsletter-form button {
    width: 100%;
  }
}

@media (max-width: 640px) {
	.asad-hero {
		padding: 20px 20px 20px
	}
}

/* Fix mobile left-right spacing on blog page */
@media (max-width: 640px) {

    .container,
    .asad-category-filter-container,
    .latest-posts-section,
	.posts-grid{
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    /* Fix category pills alignment */
    .asad-category-filter {
        padding-left: 4px;
        padding-right: 4px;
    }

    /* Ensure cards don't touch screen edges */
    .posts-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Close Button inside Mobile Drawer */
.asad-mobile-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
    z-index: 11000;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.asad-mobile-close:hover {
    opacity: 1;
}



/* =============================
   READING PROGRESS BAR
============================= */
#asad-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: #6366f1;
  width: 0%;
  z-index: 99999;
  transition: width 0.15s ease-out;
  opacity: 0;
}

/* Only show on single blog posts */
.single-post #asad-progress-bar {
    opacity: 1;
}

/* =============================
   TOC TOGGLE BUTTON (Mobile)
============================= */
#asad-toc-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0f172a;
  color: #fff;
  font-size: 22px;
  border: none;
  padding: 12px 18px;
  border-radius: 50%;
  z-index: 10001;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

@media (max-width: 900px) {
  .single-post #asad-toc-toggle {
    display: block;
  }
}

/* =============================
   TABLE OF CONTENTS PANEL
============================= */
#asad-toc-panel {
  position: fixed;
  right: -320px;
  top: 0;
  width: 300px;
  height: 100%;
  background: #ffffff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  padding: 24px;
  overflow-y: auto;
  z-index: 10002;
  transition: right .25s ease-out;
}

#asad-toc-panel.open {
  right: 0;
}

#asad-toc-panel h3 {
  margin-top: 0;
  font-weight: 700;
  font-size: 20px;
}

#asad-toc a {
  display: block;
  padding: 6px 0;
  color: #475569;
  text-decoration: none;
  font-size: 15px;
  border-left: 2px solid transparent;
  margin-left: 0;
  transition: .2s;
}

#asad-toc a:hover,
#asad-toc a.active {
  color: #6366f1;
  border-left-color: #6366f1;
  padding-left: 6px;
}

/* =============================
   OVERLAY WHEN TOC IS OPEN
============================= */
#asad-toc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: .25s ease;
}

#asad-toc-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* =============================
   HEADING ANCHOR LINKS
============================= */
.entry-content h2:hover a.anchor-link,
.entry-content h3:hover a.anchor-link {
  opacity: 1;
}

.anchor-link {
  opacity: 0;
  margin-left: 6px;
  text-decoration: none;
  color: #6366f1;
  font-weight: 600;
}

/* =============================
   COPY BUTTON FOR CODE BLOCKS
============================= */
.code-copy-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 4px 10px;
  font-size: 12px;
  color: #6366f1;
  background: #eef2ff;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #c7d2fe;
  transition: .2s;
}

.code-copy-btn:hover {
  background: #c7d2fe;
}

/* Code block wrapper */
pre {
  position: relative;
}

/* Optional Language Badge */
.code-badge {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 12px;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 600;
  opacity: 0.7;
}

/* ==========================================
   DESKTOP STICKY TOC SIDEBAR
========================================== */
#asad-toc-desktop {
  position: sticky;
  top: 110px; /* stays below your fixed header */
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-left: 40px;
  flex-shrink: 0;
  width: 260px;
  display: none; /* hidden until desktop */
}

/* Only show on desktop */
@media (min-width: 1050px) {
  #asad-toc-desktop {
    display: block;
  }

  /* Layout adjustment: put article + TOC side by side */
  .single-post main.container {
    display: flex;
    gap: 40px;
  }

  .single-post article {
    flex: 1;
    max-width: 780px;
  }
}

#asad-toc-desktop .toc-inner {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}

#asad-toc-desktop h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 18px;
  color: #0f172a;
}

#asad-toc-desktop-list a {
  display: block;
  padding: 6px 0;
  color: #475569;
  text-decoration: none;
  font-size: 15px;
  border-left: 2px solid transparent;
  padding-left: 6px;
  transition: .2s ease;
}

#asad-toc-desktop-list a:hover,
#asad-toc-desktop-list a.active {
  color: #6366f1;
  border-left-color: #6366f1;
/*   font-weight: 600; */
}

/* Indentation for H3 items */
#asad-toc-desktop-list a.is-h3 {
  margin-left: 12px;
  font-size: 14px;
}

/* ==========================================
   PREMIUM DESKTOP TOC STYLING
========================================== */
#asad-toc-desktop {
  position: sticky;
  top: 120px;
  width: 260px;
  flex-shrink: 0;
  display: none;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  animation: fadeIn .4s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Desktop breakpoint */
@media (min-width: 1100px) {
  #asad-toc-desktop {
    display: block;
  }
  
  .single-post main.container {
    display: flex;
    gap: 50px;
  }

  .single-post article {
    flex: 1;
    max-width: 820px;
  }
}

#asad-toc-desktop .toc-inner {
  background: #ffffff;
  padding: 22px 20px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  border: 1px solid #e2e8f0;
}

#asad-toc-desktop h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

/* TOC links */
#asad-toc-desktop-list a {
  display: block;
  padding: 6px 0;
  font-size: 15px;
  text-decoration: none;
  color: #475569;
  transition: color 0.18s ease, font-weight 0.18s ease;
  border-left: 2px solid transparent;
  padding-left: 10px;
}

#asad-toc-desktop-list a:hover {
  color: #6366f1;
}

#asad-toc-desktop-list a.active {
  font-weight: 600;
  color: #6366f1;
  border-left-color: #6366f1;
}

/* H3 indented nicely */
#asad-toc-desktop-list a.is-h3 {
  margin-left: 12px;
  font-size: 14px;
  opacity: 0.9;
}

/* Heading anchor links */
.single-post article h2:hover .anchor-link,
.single-post article h3:hover .anchor-link {
  opacity: 1;
  transform: translateX(0);
}

.anchor-link {
  margin-left: 6px;
  opacity: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  transition: .2s ease;
  cursor: pointer;
  transform: translateX(-4px);
}

.single-post article h2 {
  position: relative;
  padding-bottom: 10px;
}

.single-post article h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  border-radius: 3px;
  background: #6366f1;
}

/* Ensure headings are not hidden behind sticky header */
.single-post article h1,
.single-post article h2,
.single-post article h3,
.single-post article h4,
.single-post article h5,
.single-post article h6 {
  scroll-margin-top: 120px; /* Adjust based on header height */
}




@media (max-width: 768px) {
  .container,
  main.container,
  article {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
}

.single-post-body,
.single-post article,
.entry-content {
  overflow-x: hidden;
}

.entry-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

.entry-content code {
    word-break: break-word;
}

.entry-content table {
    display: block;
    overflow-x: auto;
    width: 100%;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}
@media (max-width: 768px) {
  .asad-toc-sidebar {
    display: none !important;
  }
}

/* =========================================
   MOBILE TYPOGRAPHY IMPROVEMENTS
   Smaller sizes for easier reading on phones
========================================= */

@media (max-width: 640px) {

  /* Article container already responsive — now adjust text sizes */

  .single-post article h1 {
    font-size: 28px !important;
    line-height: 1.25;
  }

  .single-post article h2 {
    font-size: 22px !important;
    margin-top: 40px;
  }

  .single-post article h3 {
    font-size: 18px !important;
  }

  .single-post article p {
    font-size: 17px;
    line-height: 1.65;
  }

  .single-post article li {
    font-size: 17px;
    line-height: 1.6;
  }

  .single-post article code {
    font-size: 14px;
  }

  .single-post article pre code {
    font-size: 14px;
    padding: 22px 16px;
  }

  .single-post article blockquote {
    padding: 16px 18px;
    font-size: 15px;
  }

  .single-post .entry-content table {
    font-size: 14px;
  }

  .single-post .entry-content table th {
    font-size: 14px;
  }

  .single-post .entry-content table td {
    font-size: 14px;
  }
}


