/* ==========================================
   PIYUSH MANTRI BLOG — Shared Styles
   All blog posts reference this single file.
   Edit here to change design across ALL posts.
   ========================================== */

:root {
    --border: rgba(255, 255, 255, 0.08);
    --surface-glass: rgba(255, 255, 255, 0.03);
    --surface-solid: #111418;
    --text-main: #FFFFFF;
    --text-muted: #98b2bf;
    --accent: #e8b900;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: #050608;
    background-image:
        radial-gradient(circle at 50% -20%, rgba(152, 178, 191, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 100% 80%, rgba(232, 185, 0, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #161a1f 0%, #050608 100%);
    background-attachment: fixed;
    color: var(--text-main); font-family: var(--font-body);
    -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { text-decoration: none; color: inherit; transition: 0.3s var(--ease); }
img { max-width: 100%; display: block; }

.bg-moving-grid {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 60px 60px; animation: panGrid 30s linear infinite;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}
@keyframes panGrid { 0% { transform: translateY(0); } 100% { transform: translateY(60px); } }

.page-wrapper { max-width: 1200px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); min-height: 100vh; }

/* Progress Bar */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); width: 0%; z-index: 9999; transition: width 0.1s linear; box-shadow: 0 0 10px rgba(232, 185, 0, 0.5); }

/* Nav */
nav { position: sticky; top: 0; width: 100%; padding: 1rem 4rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); background: rgba(10, 12, 15, 0.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); z-index: 100; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-family: var(--font-display); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 500; color: var(--text-muted); }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.btn-nav { font-size: 0.85rem; background: var(--text-main); color: #000; padding: 0.5rem 1rem; border-radius: 4px; font-weight: 600; font-family: var(--font-display); }
.btn-nav:hover { background: var(--accent); }
.hamburger { display: none; background: none; border: none; color: var(--text-main); cursor: pointer; padding: 0.5rem; z-index: 1001; }
.close-menu { background: none; border: none; color: var(--text-main); cursor: pointer; position: absolute; top: 1.5rem; right: 1.5rem; z-index: 1002; display: none; }
.mobile-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(10, 12, 15, 0.98); backdrop-filter: blur(20px); z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: 0.4s var(--ease); }
.mobile-menu.active { opacity: 1; pointer-events: auto; }
.mobile-link { font-family: var(--font-display); font-size: 2rem; color: var(--text-main); margin-bottom: 2rem; text-transform: uppercase; font-weight: 600; letter-spacing: 2px; }
.mobile-link:hover { color: var(--accent); }

/* Breadcrumb */
.breadcrumb { padding: 1.2rem 4rem; border-bottom: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb svg { width: 14px; height: 14px; stroke: var(--text-muted); flex-shrink: 0; }
.breadcrumb-current { color: var(--text-main); }

/* Article Hero */
.article-hero { padding: 4rem 4rem 2.5rem; border-bottom: 1px solid var(--border); }
.article-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.article-category { font-family: var(--font-display); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); font-weight: 600; padding: 4px 14px; border: 1px solid rgba(232, 185, 0, 0.3); border-radius: 100px; background: rgba(232, 185, 0, 0.05); }
.article-date, .article-read { font-size: 0.85rem; color: var(--text-muted); }
.meta-dot { width: 3px; height: 3px; background: var(--text-muted); border-radius: 50%; flex-shrink: 0; }
.article-title { font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1.5rem; }
.article-desc { color: var(--text-muted); font-size: 1.15rem; line-height: 1.6; max-width: 720px; margin-bottom: 2rem; }
.article-cover { width: 100%; aspect-ratio: 1200/630; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(30%) contrast(1.05); }

/* TOC */
.toc-wrapper { max-width: 740px; margin: 0 auto; padding: 2.5rem 4rem 0; }
.toc { background: var(--surface-glass); border: 1px solid var(--border); border-radius: 12px; padding: 2rem 2.5rem; }
.toc-title { font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 1.2rem; display: flex; align-items: center; gap: 0.6rem; }
.toc-title svg { width: 16px; height: 16px; }
.toc-list { list-style: none; counter-reset: toc; }
.toc-list li { counter-increment: toc; margin-bottom: 0.6rem; }
.toc-list a { color: var(--text-muted); font-size: 0.95rem; display: flex; align-items: baseline; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid transparent; transition: 0.3s; line-height: 1.4; }
.toc-list a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-display); font-size: 0.75rem; color: rgba(232, 185, 0, 0.5); font-weight: 600; min-width: 1.5rem; }
.toc-list a:hover { color: var(--accent); border-bottom-color: rgba(232, 185, 0, 0.2); }

/* Article Body */
.article-body { max-width: 740px; margin: 0 auto; padding: 3rem 4rem 4rem; }
.article-body h2 { font-family: var(--font-display); font-size: 1.65rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 3.5rem; margin-bottom: 1rem; padding-top: 2.5rem; border-top: 1px solid var(--border); color: var(--text-main); scroll-margin-top: 5rem; }
.article-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.article-body h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-top: 2.5rem; margin-bottom: 0.75rem; color: var(--text-main); scroll-margin-top: 5rem; }
.article-body h4 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.5rem; color: var(--text-main); }
.article-body p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.85; margin-bottom: 1.5rem; }
.article-body strong { color: var(--text-main); font-weight: 500; }
.article-body em { color: var(--accent); font-style: italic; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(232, 185, 0, 0.3); }
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body ul, .article-body ol { margin: 1rem 0 1.5rem 1.5rem; color: var(--text-muted); }
.article-body li { font-size: 1.05rem; line-height: 1.85; margin-bottom: 0.6rem; padding-left: 0.5rem; }
.article-body li strong { color: var(--text-main); }
.article-body li::marker { color: var(--accent); }
.article-body blockquote { border-left: 3px solid var(--accent); margin: 2.5rem 0; padding: 1.5rem 2rem; background: rgba(232, 185, 0, 0.03); border-radius: 0 10px 10px 0; border: 1px solid rgba(232, 185, 0, 0.1); border-left: 3px solid var(--accent); }
.article-body blockquote p { color: var(--text-main); margin-bottom: 0; font-style: italic; font-size: 1.1rem; }
.article-body code { background: rgba(255,255,255,0.06); padding: 2px 8px; border-radius: 4px; font-size: 0.9rem; color: var(--accent); }
.article-body pre { background: rgba(0,0,0,0.5); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; margin: 2rem 0; overflow-x: auto; }
.article-body pre code { background: none; padding: 0; color: var(--text-muted); }
.article-body img { border-radius: 10px; border: 1px solid var(--border); margin: 2rem 0; }
.article-body figcaption, .img-caption { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: -1rem; margin-bottom: 2rem; font-style: italic; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

/* Tables */
.article-body table { width: 100%; border-collapse: collapse; margin: 2rem 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.article-body thead { background: rgba(232, 185, 0, 0.06); }
.article-body th { font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid rgba(232, 185, 0, 0.2); }
.article-body td { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:hover td { background: rgba(255,255,255,0.02); color: var(--text-main); }
.article-body td strong { color: var(--text-main); }
.table-wrap { overflow-x: auto; margin: 2rem 0; border-radius: 12px; border: 1px solid var(--border); }
.table-wrap table { margin: 0; border: none; }

/* Callout */
.callout { background: var(--surface-glass); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; margin: 2.5rem 0; display: flex; gap: 1rem; align-items: flex-start; }
.callout-icon { width: 24px; height: 24px; min-width: 24px; color: var(--accent); margin-top: 2px; }
.callout p { margin: 0; color: var(--text-main); font-size: 1rem; }
.callout-tip { border-color: rgba(232, 185, 0, 0.2); background: rgba(232, 185, 0, 0.03); }
.callout-warning { border-color: rgba(239, 68, 68, 0.2); background: rgba(239, 68, 68, 0.03); }
.callout-warning .callout-icon { color: #ef4444; }

/* Tags */
.article-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; padding-top: 2.5rem; border-top: 1px solid var(--border); margin-top: 3rem; }
.tag-pill { padding: 0.4rem 1.1rem; border: 1px solid var(--border); border-radius: 100px; font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.5px; transition: 0.3s; }
.tag-pill:hover { border-color: rgba(232, 185, 0, 0.3); color: var(--accent); }

/* Author */
.author-box { display: flex; align-items: center; gap: 1.5rem; padding: 2rem; background: var(--surface-glass); border: 1px solid var(--border); border-radius: 12px; margin-top: 2.5rem; }
.author-avatar { width: 68px; height: 68px; min-width: 68px; border-radius: 50%; overflow: hidden; border: 2px solid rgba(232, 185, 0, 0.3); }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) contrast(1.1); }
.author-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin-bottom: 0.3rem; }
.author-title { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.author-link { margin-top: 0.5rem; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--accent); font-family: var(--font-display); font-weight: 600; }

/* Share */
.share-bar { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.share-label { font-family: var(--font-display); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 600; }
.share-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-glass); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: 0.3s var(--ease); cursor: pointer; }
.share-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(232, 185, 0, 0.05); transform: translateY(-2px); }
.share-btn svg { width: 18px; height: 18px; }

/* Comments */
.comments-section { max-width: 740px; margin: 0 auto; padding: 0 4rem 3rem; }
.comments-header { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin-bottom: 2rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.75rem; }
.comments-header svg { width: 22px; height: 22px; color: var(--accent); }
.comment-form { background: var(--surface-glass); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; }
.comment-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.comment-field label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.4rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 1px; }
.comment-field input, .comment-field textarea { width: 100%; background: rgba(0,0,0,0.4); border: 1px solid var(--border); padding: 0.9rem 1rem; color: var(--text-main); font-family: var(--font-body); border-radius: 8px; transition: 0.3s var(--ease); font-size: 0.95rem; }
.comment-field input:focus, .comment-field textarea:focus { outline: none; border-color: var(--accent); background: rgba(0,0,0,0.7); }
.comment-field textarea { height: 120px; resize: vertical; }
.comment-submit { background: var(--text-main); color: #000; border: none; padding: 0.9rem 2rem; font-family: var(--font-display); font-weight: 600; border-radius: 8px; cursor: pointer; transition: 0.3s var(--ease); font-size: 0.95rem; margin-top: 0.5rem; }
.comment-submit:hover { background: var(--accent); transform: translateY(-2px); }
.comments-list { margin-top: 2rem; }
.comment-item { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-author-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(232, 185, 0, 0.1); border: 1px solid rgba(232, 185, 0, 0.3); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: var(--accent); }
.comment-name { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.comment-time { font-size: 0.8rem; color: var(--text-muted); }
.comment-text { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* CTA */
.post-cta { margin: 0 4rem; padding: 3.5rem; text-align: center; border: 1px solid rgba(232, 185, 0, 0.15); border-radius: 16px; background: rgba(232, 185, 0, 0.02); position: relative; overflow: hidden; }
.post-cta::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at center, rgba(232, 185, 0, 0.04) 0%, transparent 50%); pointer-events: none; }
.post-cta h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; margin-bottom: 0.75rem; position: relative; letter-spacing: -0.02em; }
.post-cta p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 1.05rem; position: relative; }
.post-cta-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--accent); color: #000; padding: 1rem 2.5rem; border-radius: 6px; font-family: var(--font-display); font-weight: 600; font-size: 1rem; transition: 0.3s; position: relative; }
.post-cta-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(232, 185, 0, 0.3); }

/* Related */
.related-section { padding: 4rem; border-top: 1px solid var(--border); margin-top: 3rem; }
.related-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 2rem; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.related-card { padding: 2rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-glass); transition: 0.3s var(--ease); }
.related-card:hover { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.04); transform: translateY(-3px); }
.related-card-cat { font-family: var(--font-display); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); font-weight: 600; margin-bottom: 0.75rem; }
.related-card-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; line-height: 1.3; color: var(--text-main); margin-bottom: 0.5rem; transition: 0.3s; }
.related-card:hover .related-card-title { color: var(--accent); }
.related-card-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 2rem 4rem; display: flex; justify-content: space-between; align-items: center; }
.footer-logo { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.footer-logo span { color: var(--accent); }
.footer-copy { color: var(--text-muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }

/* Mobile */
@media (max-width: 900px) {
    nav { padding: 1rem 1.5rem; }
    .nav-links { display: none; }
    .hamburger { display: block; }
    .close-menu { display: block; }
    .breadcrumb { padding: 1rem 2rem; font-size: 0.8rem; }
    .article-hero { padding: 2.5rem 2rem 2rem; }
    .article-cover { aspect-ratio: 1200/630; border-radius: 8px; }
    .toc-wrapper { padding: 2rem 2rem 0; }
    .toc { padding: 1.5rem; }
    .article-body { padding: 2rem 2rem 3rem; }
    .article-body h2 { font-size: 1.35rem; margin-top: 2.5rem; padding-top: 2rem; }
    .article-body h3 { font-size: 1.1rem; }
    .article-body table { font-size: 0.85rem; }
    .article-body th, .article-body td { padding: 0.75rem 1rem; }
    .author-box { flex-direction: column; text-align: center; }
    .share-bar { justify-content: center; }
    .comments-section { padding: 0 2rem 2rem; }
    .comment-row { grid-template-columns: 1fr; }
    .post-cta { margin: 0 2rem; padding: 2.5rem 2rem; }
    .related-section { padding: 3rem 2rem; }
    .related-grid { grid-template-columns: 1fr; }
    footer { padding: 1.5rem 2rem; flex-direction: column; gap: 1rem; text-align: center; }
}