/* ==========================================================================
   Kaveesh Kapoor — Blog (Premium Editorial)
   ========================================================================== */

:root {
    --ink: #0a1424;
    --navy: #0d1f38;
    --navy-2: #12294a;
    --gold: #c8a24c;
    --gold-soft: #e7d3a1;
    --accent: #2563eb;
    --accent-2: #1d4ed8;
    --paper: #ffffff;
    --bg: #f7f8fb;
    --muted: #64748b;
    --line: #e8ebf1;
    --text: #1f2937;
    --serif: 'Inter', 'Open Sans', system-ui, sans-serif;
    --sans: 'Inter', 'Open Sans', system-ui, sans-serif;
    --shadow-sm: 0 2px 10px rgba(16, 24, 40, .05);
    --shadow: 0 18px 44px rgba(16, 24, 40, .10);
    --shadow-lg: 0 34px 80px rgba(9, 20, 40, .16);
}

* { box-sizing: border-box; }

body.blog-page {
    margin: 0;
    font-family: var(--sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--serif); color: var(--ink); }

a { text-decoration: none; }

/* ---------- Navbar ---------- */
.blog-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.blog-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
}

.blog-nav .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.blog-brand {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--ink);
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-brand .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    display: inline-block;
}

.blog-nav .nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-nav .nav-links a {
    color: var(--muted);
    font-weight: 500;
    font-size: .86rem;
    letter-spacing: .6px;
    text-transform: uppercase;
    padding: 9px 14px;
    border-radius: 9px;
    transition: all .18s ease;
}

.blog-nav .nav-links a:hover,
.blog-nav .nav-links a.active {
    color: var(--accent);
    background: rgba(37, 99, 235, .07);
}

.nav-toggle {
    margin-left: auto;
    display: none;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    width: 42px;
    height: 42px;
    color: var(--ink);
}

/* ---------- Hero ---------- */
.blog-hero {
    padding: 168px 0 64px;
    background:
        radial-gradient(700px 320px at 85% 0, rgba(37, 99, 235, .10), transparent 60%),
        radial-gradient(500px 320px at 10% 100%, rgba(200, 162, 76, .12), transparent 60%),
        #fff;
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.eyebrow-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 18px;
}

.eyebrow-line::before,
.eyebrow-line::after {
    content: '';
    width: 34px;
    height: 1px;
    background: var(--gold);
    opacity: .6;
}

.blog-hero h1 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 14px;
    letter-spacing: -.3px;
}

.blog-hero p {
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto;
    font-size: .96rem;
}

/* ---------- Layout ---------- */
.blog-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px 90px;
}

/* ---------- Featured ---------- */
.featured {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 48px;
}

.featured-media {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #f4f6fb;
}

.featured-media img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .7s ease;
}

.featured:hover .featured-media img { transform: scale(1.05); }

.featured-media .ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(500px 300px at 20% 10%, rgba(37, 99, 235, .35), transparent 60%),
        linear-gradient(135deg, #0d1f38, #16304f);
    color: rgba(231, 211, 161, .55);
    font-size: 2.6rem;
}

.featured-media .ph::after {
    content: 'Kaveesh Kapoor';
    position: absolute;
    bottom: 26px;
    left: 28px;
    font-family: var(--serif);
    font-size: 1.15rem;
    letter-spacing: .5px;
    color: rgba(255, 255, 255, .35);
}

.featured-body {
    padding: 28px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge-featured {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(200, 162, 76, .16), rgba(200, 162, 76, .06));
    color: #a9812f;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.featured-body h2 {
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
    line-height: 1.3;
    margin: 0 0 10px;
    font-weight: 700;
}

.featured-body h2 a { color: var(--ink); transition: color .2s; }
.featured-body h2 a:hover { color: var(--accent); }

.featured-body .excerpt {
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: 15px;
}

/* ---------- Meta ---------- */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    color: #8592a6;
    font-size: .82rem;
    font-weight: 500;
}

.post-meta i { color: var(--gold); margin-right: 5px; }

.read-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--accent);
    font-weight: 600;
    font-size: .9rem;
}

.read-link i { transition: transform .2s; }
.read-link:hover { color: var(--accent-2); }
.read-link:hover i { transform: translateX(4px); }

/* ---------- Grid ---------- */
.section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.section-head h3 {
    font-size: 1.12rem;
    margin: 0;
    font-weight: 700;
}

.section-head .rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line), transparent);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.post-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.post-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow);
    border-color: transparent;
}

.post-card .thumb {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: #eef2f8;
}

.post-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.post-card:hover .thumb img { transform: scale(1.07); }

.post-card .thumb .ph {
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0d1f38, #16304f);
    color: rgba(231, 211, 161, .5);
    font-size: 1.8rem;
}

.post-card .body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.chip {
    align-self: flex-start;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(37, 99, 235, .08);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.post-card h3 {
    font-size: 1rem;
    line-height: 1.36;
    margin: 0 0 9px;
    font-weight: 700;
}

.post-card h3 a { color: var(--ink); transition: color .2s; }
.post-card h3 a:hover { color: var(--accent); }

.post-card .excerpt {
    color: var(--muted);
    font-size: .82rem;
    margin: 0 0 18px;
    flex: 1;
}

.post-card .foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: .78rem;
    color: #8592a6;
}

/* ---------- Empty ---------- */
.empty-state {
    text-align: center;
    padding: 90px 20px;
}

.empty-state .ico {
    width: 78px;
    height: 78px;
    margin: 0 auto 20px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    color: var(--accent);
    background: rgba(37, 99, 235, .08);
}

.empty-state h3 { font-size: 1.4rem; margin-bottom: 8px; }
.empty-state p { color: var(--muted); }

/* ---------- Article ---------- */
.article-hero {
    padding: 160px 0 0;
    background:
        radial-gradient(700px 320px at 85% 0, rgba(37, 99, 235, .09), transparent 60%),
        #fff;
}

.article-hero-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.breadcrumb-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: .78rem;
    color: #8592a6;
    margin-bottom: 22px;
}

.breadcrumb-row a { color: var(--accent); font-weight: 600; }
.breadcrumb-row span { color: #c3ccd8; }

.article-hero h1 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.22;
    font-weight: 700;
    margin: 0 0 20px;
    letter-spacing: -.3px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    color: #7c8899;
    font-size: .85rem;
    padding-bottom: 44px;
}

.article-meta i { color: var(--gold); margin-right: 6px; }

.article-cover-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    transform: translateY(46px);
}

.article-cover {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.article-shell {
    max-width: 820px;
    margin: 0 auto;
    padding: 110px 24px 80px;
}

.article-body {
    font-size: 1rem;
    line-height: 1.85;
    color: #2c3647;
}

.article-body > *:first-child { margin-top: 0; }

/* Remove stray inline background colors pasted from Word/Google Docs */
.article-body [style*="background"] {
    background: transparent !important;
}

.article-body h2 {
    font-size: 1.35rem;
    margin: 2rem 0 .8rem;
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.12rem;
    margin: 1.6rem 0 .6rem;
}

.article-body p { margin: 0 0 1.25rem; }

.article-body a {
    color: var(--accent);
    border-bottom: 1px solid rgba(37, 99, 235, .3);
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 1.4rem 0;
    box-shadow: var(--shadow-sm);
}

.article-body blockquote {
    border-left: 4px solid var(--gold);
    background: rgba(200, 162, 76, .06);
    margin: 1.8rem 0;
    padding: 20px 26px;
    border-radius: 0 14px 14px 0;
    font-family: var(--serif);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--ink);
}

.article-body ul,
.article-body ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.article-body li { margin-bottom: .5rem; }

.article-body code {
    background: #f1f4f9;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: .92em;
}

.article-body hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 2.4rem 0;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 40px;
}

.tag-row .tag {
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--line);
    padding: 7px 15px;
    border-radius: 999px;
    transition: all .18s;
}

.tag-row .tag:hover {
    color: var(--accent);
    border-color: rgba(37, 99, 235, .4);
}

.article-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 36px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--accent);
    font-weight: 600;
    font-size: .92rem;
}

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

/* ---------- Related ---------- */
.related {
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 72px 0;
}

.related .post-grid { grid-template-columns: repeat(3, 1fr); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .featured { grid-template-columns: 1fr; }
    .featured-media { min-height: 300px; }
    .post-grid, .related .post-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-nav .nav-links { display: none; }
    .nav-toggle { display: grid; place-items: center; }
    .blog-nav .nav-links.open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border-bottom: 1px solid var(--line);
        padding: 12px;
        gap: 4px;
        box-shadow: var(--shadow);
    }
}

@media (max-width: 640px) {
    .post-grid, .related .post-grid { grid-template-columns: 1fr; }
    .featured-body { padding: 32px 26px; }
    .blog-hero { padding-top: 138px; }
    .article-hero { padding-top: 132px; }
}
