/* =================================================================
   1. Font Definitions (Local Fonts)
   ================================================================= */
   @font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400; /* Normal */
    font-style: normal;
    font-display: swap; /* Important for performance */
  }
  
  @font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700; /* Bold */
    font-style: normal;
    font-display: swap;
  }
  


/* =================================================================
   1. Global Variables & Styles (Consistent with main site)
   ================================================================= */
   :root {
    --text-color: #333;
    --primary-color: #007BFF;
    --secondary-color: #5a6268;
    --bg-color: #f8f9fa;
    --code-bg-color: #2d2d2d;
    --border-color: #dee2e6;
}

[data-theme="dark"] {
    --text-color: #c9d1d9;
    --primary-color: #58a6ff;
    --secondary-color: #8b949e;
    --bg-color: #0d1117;
    --code-bg-color: #1e1e1e;
    --border-color: #30363d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.9;
    padding: 20px;
}

/* =================================================================
   2. Blog Layout & Typography
   ================================================================= */

/* Simple header for navigation */
.blog-header {
    max-width: 750px;
    margin: 0 auto 40px auto;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}

.blog-header a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.2s;
}

.blog-header a:hover {
    color: var(--secondary-color);
}


/* Main article content */
article {
    max-width: 750px;
    margin: 0 auto;
}

h1 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    line-height: 1.3;
}

h2 {
    font-size: 2rem;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

p, ul {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

ul {
    padding-right: 25px;
}

li {
    margin-bottom: 10px;
}

strong {
    color: var(--text-color);
    font-weight: 600;
}

/* =================================================================
   3. Code Block Styling
   ================================================================= */

/* Styling for inline code `<code>` */
code:not([class*="language-"]) {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Styling for code blocks `<pre><code>` */
pre {
    background-color: var(--code-bg-color);
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    overflow-x: auto; /* For horizontal scroll on long code lines */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    line-height: 1.6;
}

/* =================================================================
   4. Responsive Design
   ================================================================= */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    p, ul { font-size: 1rem; }
}