/* ============================================
   Blog Styles — Champ Patyatawee
   Matches design system from design.json
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css');

:root {
    --bg: #F7F7F4;
    --surface: #FFFFFF;
    --text: #111111;
    --text-muted: #555555;
    --primary: #1E50FF;
    --secondary: #F5A9D6;
    --accent: #D9FF2A;
    --cyan: #3BE8F6;
    --yellow: #FFD84D;
    --black: #111111;
    --white: #FFFFFF;
    --border: #111111;
    --success: #00D084;
    --warning: #FFC93C;
    --danger: #FF4D4F;
    --shadow-card: 4px 4px 0 0 #111111;
    --shadow-btn: 3px 3px 0 0 #111111;
    --radius-card: 20px;
    --radius-btn: 16px;
    --radius-tag: 8px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

p {
    line-height: 1.7;
}

a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

a:hover {
    color: #0040cc;
}

/* ============================================
   Navigation
   ============================================ */
nav {
    display: flex;
    align-items: center;
    padding: 0 2rem;
    height: 72px;
    border: 2px solid var(--border);
    border-radius: 24px;
    gap: 2rem;
    position: sticky;
    top: 16px;
    z-index: 1000;
    background-color: var(--white);
    max-width: 1280px;
    margin: 0 auto;
    margin-top: 16px;
    box-shadow: 4px 4px 0 0 #111111;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo a {
    text-decoration: none;
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.2s;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 12px 28px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: var(--radius-btn);
    background: transparent;
    color: var(--text);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 4px 4px 0 0 #111111;
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 0 #111111;
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 0 #111111;
}

.btn-hire-me {
    color: var(--text);
    background-color: var(--accent);
    border: 2px solid var(--border);
    border-radius: var(--radius-btn);
    font-weight: 600;
    padding: 10px 24px;
    font-size: 13px;
    box-shadow: 4px 4px 0 0 #111111;
}

.btn-hire-me:hover {
    background: var(--accent);
    color: var(--text);
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 0 #111111;
}

/* Mobile menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: 2px solid var(--border);
    border-radius: var(--radius-tag);
    cursor: pointer;
    font-size: 22px;
    color: var(--text);
    padding: 8px;
    transition: all 0.2s;
    margin-left: auto;
}

.mobile-menu-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-menu-btn svg {
    stroke: var(--text);
}

.mobile-menu-btn:hover svg {
    stroke: var(--primary);
}

.mobile-menu {
    display: none;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--surface);
    border-radius: var(--radius-card);
    border: 2px solid var(--border);
    box-shadow: 8px 8px 0 0 #111111;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    transform: translateY(-20px) scale(0.97);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 2px solid var(--border);
    border-radius: var(--radius-tag);
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.modal .contact-info p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.contact-details {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.contact-icon {
    width: 44px;
    height: 44px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-tag);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    color: var(--primary);
}

.contact-label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.modal .social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-link {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border);
    border-radius: var(--radius-tag);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-link svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.social-link:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 3px 3px 0 0 #111111;
}

/* ============================================
   Footer
   ============================================ */
.blog-footer {
    padding: 4rem 2rem 2rem;
    background-color: var(--black);
    color: #e2e8f0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto 2rem auto;
}

.footer-info h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-info p {
    color: #94a3b8;
    max-width: 300px;
    line-height: 1.7;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-nav h4,
.footer-connect h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 0.6rem;
}

.footer-nav a {
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--accent);
}

.footer-connect .social-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-connect .social-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-connect .social-links a:hover {
    color: var(--accent);
}

.footer-social-icon {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    max-width: 1280px;
    margin: 0 auto;
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border: 2px solid var(--border);
    border-radius: var(--radius-tag);
    background: var(--primary);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 4px 0 0 #111111;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary);
    color: var(--white);
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 0 #111111;
}

.back-to-top svg {
    width: 22px;
    height: 22px;
}

img {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img.loaded {
    opacity: 1;
}

/* ============================================
   Blog Listing Page
   ============================================ */
.blog-listing {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 2rem;
    min-height: 70vh;
    opacity: 0;
    transform: translateY(24px);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 3rem;
}

.blog-header h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 2.5rem;
    color: var(--text);
}

.blog-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
}

.post-card {
    background-color: var(--surface);
    border-radius: var(--radius-card);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-card);
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(24px);
}

.post-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 0 #111111;
}

.post-card.visible:hover {
    transform: translate(-2px, -2px);
}

.post-card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text);
    line-height: 1.3;
}

.post-card-title a {
    text-decoration: none;
    color: inherit;
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    flex: 1;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.post-card-footer {
    margin-top: auto;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.read-more:hover {
    gap: 0.7rem;
    color: #0040cc;
}

/* ============================================
   Blog Post Page
   ============================================ */
.blog-post-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    opacity: 0;
    transform: translateY(24px);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.blog-post {
    background-color: var(--surface);
    border-radius: var(--radius-card);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-card);
    padding: 3rem;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary);
}

.back-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Post header */
.post-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.post-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text);
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-date,
.post-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.meta-icon {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--primary);
    background-color: #EEF0FF;
    border: 2px solid var(--border);
    border-radius: var(--radius-tag);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

/* ============================================
   Post Content Typography
   ============================================ */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

.post-content h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.post-content li strong {
    color: var(--text);
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: #F0F0ED;
    border-radius: var(--radius-tag);
    font-style: italic;
    color: var(--text-muted);
    border: 2px solid var(--border);
    border-left: 4px solid var(--primary);
}

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

.post-content blockquote strong {
    color: var(--text);
}

.post-content hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 2rem 0;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: #0040cc;
}

/* ============================================
   Images
   ============================================ */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-card);
    margin: 1.5rem 0;
    display: block;
}

.post-content figure {
    margin: 1.5rem 0;
}

.post-content figure img {
    margin: 0;
}

.post-content figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

/* ============================================
   Code Blocks
   ============================================ */
.post-content pre {
    background: #F0F0ED;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    position: relative;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text);
}

.post-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    background: #F0F0ED;
    border: 2px solid var(--border);
    border-radius: 6px;
    padding: 2px 8px;
    color: var(--text);
}

.post-content pre::-webkit-scrollbar {
    height: 8px;
}

.post-content pre::-webkit-scrollbar-track {
    background: #E0E0DD;
    border-radius: 4px;
}

.post-content pre::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* ============================================
   Prism.js Theme Overrides — Brand Light Theme
   ============================================ */
code[class*="language-"],
pre[class*="language-"] {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text);
    text-shadow: none;
    direction: ltr;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    tab-size: 2;
    hyphens: none;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
    background: #F0F0ED;
}

/* Keywords - brand blue */
.token.keyword,
.token.boolean,
.token.constant,
.token.operator.keyword {
    color: #1E50FF;
}

/* Strings - brand green/success */
.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.url {
    color: #00D084;
}

/* Comments - gray */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #A8A8A8;
    font-style: italic;
}

/* Functions */
.token.function,
.token.class-name {
    color: var(--text);
    font-weight: 600;
}

/* Numbers, booleans */
.token.number,
.token.boolean {
    color: #1E50FF;
}

/* Punctuation - black */
.token.punctuation,
.token.operator {
    color: #111111;
}

/* Tags (HTML/JSX) */
.token.tag,
.token.selector {
    color: #1E50FF;
}

/* Attributes */
.token.attr-name {
    color: var(--text);
}

/* Builtins */
.token.builtin {
    color: #00D084;
}

/* Property names (YAML keys) */
.token.key.atrule {
    color: #1E50FF;
}

/* Property (YAML) */
.token.property {
    color: var(--text);
}

/* ============================================
   Post Footer / Share Links
   ============================================ */
.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.share-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-radius: var(--radius-tag);
    color: var(--text);
    transition: all 0.2s ease;
    text-decoration: none;
}

.share-link:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 2px 2px 0 0 #111111;
}

.share-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* ============================================
   Language Tabs
   ============================================ */
.lang-tabs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.lang-tab {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.lang-tab:hover {
    background: #EEF0FF;
    color: var(--primary);
}

.lang-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.lang-tab.active:hover {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   Language Content Visibility
   ============================================ */
.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}

/* ============================================
   Language Badge on Listing Cards
   ============================================ */
.post-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.post-card-title-row .post-card-title {
    margin-bottom: 0;
    flex: 1;
}

.lang-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 3px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    color: var(--primary);
    background: transparent;
    white-space: nowrap;
}

.lang-badge-both {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
    nav {
        padding: 0 1.5rem;
        margin-top: 12px;
        margin-left: 12px;
        margin-right: 12px;
    }

    .blog-listing {
        padding: 3rem 1.5rem;
    }

    .blog-post-container {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }

    .blog-post {
        padding: 2rem;
    }

    .post-title {
        font-size: 1.8rem;
    }

    .blog-header h1 {
        font-size: 2.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links {
        gap: 2rem;
    }

    .blog-footer {
        padding: 3rem 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-buttons {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem;
        border: 2px solid var(--border);
        border-top: none;
        border-radius: 0 0 var(--radius-card) var(--radius-card);
        box-shadow: 4px 4px 0 0 #111111;
        z-index: 100;
        margin-top: 2px;
    }

    .mobile-menu.active {
        display: flex;
    }

    .mobile-menu a {
        padding: 0.85rem 0;
        text-decoration: none;
        color: var(--text);
        font-weight: 500;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 1px;
        border-bottom: 1px solid var(--border);
        transition: color 0.2s;
    }

    .mobile-menu a:hover {
        color: var(--primary);
    }

    .mobile-menu a:last-child {
        border-bottom: none;
    }

    #hire-me-mobile-btn {
        margin-top: 0.5rem;
        width: 100%;
        text-align: center;
        padding: 0.85rem;
        border: 2px solid var(--border);
        border-radius: var(--radius-btn);
        font-weight: 600;
        color: var(--text);
        background-color: var(--accent);
        cursor: pointer;
        box-shadow: 4px 4px 0 0 #111111;
    }

    #hire-me-mobile-btn:hover {
        transform: translate(-2px, -2px);
        box-shadow: 8px 8px 0 0 #111111;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .blog-post {
        padding: 1.5rem;
    }

    .post-title {
        font-size: 1.5rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-header {
        margin-bottom: 2rem;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    nav {
        padding: 0 1rem;
        margin-top: 8px;
        margin-left: 8px;
        margin-right: 8px;
    }

    .blog-listing {
        padding: 2rem 1rem;
    }

    .blog-post-container {
        padding: 1.5rem 1rem;
    }

    .blog-post {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .post-title {
        font-size: 1.3rem;
    }

    .blog-header h1 {
        font-size: 1.75rem;
    }

    .post-grid {
        gap: 1.25rem;
    }

    .post-card {
        padding: 1.5rem;
    }

    .blog-footer {
        padding: 2rem 1rem;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }

    .modal {
        padding: 1.5rem;
        border-radius: var(--radius-card);
    }
}

/* ============================================
   Prism.js Autoloader
   ============================================ */
/* Ensure code blocks have proper background */
div.code-toolbar > .toolbar {
    opacity: 0;
}

div.code-toolbar:hover > .toolbar {
    opacity: 1;
}

/* ============================================
   Mermaid Diagrams
   ============================================ */
.post-content pre.mermaid {
    background: #FFFFFF;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: inherit;
    font-size: 1rem;
    line-height: normal;
    text-align: center;
}

.post-content pre.mermaid svg {
    max-width: 100%;
    height: auto;
}
