/*
Theme Name: Lateef Maleek
Theme URI: https://lateefmaleek.com
Description: Astra child theme that renders the single blog-post view as the locked Lateef Maleek design. Single-post only — the rest of the site stays on Astra. All custom CSS is scoped under .lm-article so nothing collides with Astra.
Author: Lateef Maleek
Template: astra
Version: 1.0.1
Requires at least: 6.0
Tested up to: 7.0
Text Domain: lateef-maleek
*/

/* =========================================================================
   Design tokens — lifted verbatim from blog-post-template.html :root.
   Kept global: custom properties render nothing on their own, so they
   cannot bleed into Astra. Everything that RENDERS is scoped under
   .lm-article below.
   ========================================================================= */
:root{
  --ink:#0A0E14;
  --ink-raised:#0F141C;
  --ink-card:#11161F;
  --line:#1E2530;
  --line-soft:#161C25;
  --green:#44FFA4;
  --green-ink:#0A0E14;
  --green-wash:rgba(68,255,164,.13);
  --green-glow:rgba(68,255,164,.30);
  --text:#C4CDD6;
  --prose:#D7DEE2;          /* article body text */
  --prose-strong:#F2F6F4;
  --text-dim:#717C8B;
  --text-faint:#4B5563;
  --white:#F6FAF8;
  --display:'Space Grotesk',sans-serif;
  --mono:'Space Mono',monospace;
  --serif:'Newsreader',Georgia,serif;
  --pad:clamp(20px,5vw,48px);
}

/* Page-level: only on the Lateef Maleek single-post body. */
html{-webkit-text-size-adjust:100%}
body.lm-single{font-family:var(--display);background:var(--ink);color:var(--text);-webkit-font-smoothing:antialiased;overflow-x:hidden}

/* The dark canvas is anchored on the wrapper too, not just <body>, so it holds
   up even when a parent theme or host strips/overrides the body background. The
   wrapper contains the whole page, so it paints the full dark surface. */
.lm-article{background:var(--ink);color:var(--text);font-family:var(--display);min-height:100vh;-webkit-font-smoothing:antialiased;overflow-x:hidden}

.lm-article *{margin:0;padding:0;box-sizing:border-box}
.lm-article ::selection{background:var(--green);color:var(--green-ink)}
.lm-article a{color:inherit;text-decoration:none}
.lm-article img{max-width:100%;display:block}

/* reading progress */
.lm-article .progress{position:fixed;top:0;left:0;height:2px;width:0;background:var(--green);z-index:200;box-shadow:0 0 12px var(--green-glow);transition:width .08s linear}

/* Offset the fixed nav/progress under the WP admin bar (logged-in view only). */
body.admin-bar.lm-single .lm-article nav{top:32px}
body.admin-bar.lm-single .lm-article .progress{top:32px}
@media screen and (max-width:782px){
  body.admin-bar.lm-single .lm-article nav{top:46px}
  body.admin-bar.lm-single .lm-article .progress{top:46px}
}

/* nav */
.lm-article nav{position:fixed;top:0;left:0;right:0;z-index:100;transition:background .35s,border-color .35s,backdrop-filter .35s;border-bottom:1px solid transparent}
.lm-article nav.scrolled{background:rgba(10,14,20,.82);backdrop-filter:blur(14px);border-bottom-color:var(--line)}
.lm-article .nav-inner{max-width:1180px;margin:0 auto;padding:0 var(--pad);height:64px;display:flex;align-items:center;justify-content:space-between}
.lm-article .logo{display:flex;align-items:center;gap:10px;font-weight:600;color:var(--white)}
.lm-article .logo .dot{width:10px;height:10px;border-radius:50%;background:var(--green);box-shadow:0 0 14px var(--green-glow);flex:none}
.lm-article .logo .mono{font-family:var(--mono);font-size:11px;color:var(--text-dim);letter-spacing:.1em}
.lm-article .nav-right{display:flex;align-items:center;gap:24px}
.lm-article .nav-link{font-family:var(--mono);font-size:13px;color:var(--text);position:relative}
.lm-article .nav-link::after{content:"";position:absolute;left:0;bottom:-4px;width:0;height:1px;background:var(--green);transition:width .3s}
.lm-article .nav-link:hover{color:var(--white)}.lm-article .nav-link:hover::after{width:100%}
.lm-article .btn{font-family:var(--mono);font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;display:inline-flex;align-items:center;gap:9px;padding:10px 18px;border-radius:2px;cursor:pointer;border:1px solid transparent;transition:transform .25s,box-shadow .3s,border-color .25s,color .25s}
.lm-article .btn .arr{transition:transform .3s cubic-bezier(.16,1,.3,1)}.lm-article .btn:hover .arr{transform:translateX(4px)}
.lm-article .btn-primary{background:var(--green);color:var(--green-ink)}.lm-article .btn-primary:hover{transform:translateY(-2px);box-shadow:0 8px 28px -8px var(--green-glow)}
.lm-article .btn-ghost{border-color:var(--line);color:var(--white)}.lm-article .btn-ghost:hover{border-color:var(--green);color:var(--green);transform:translateY(-2px)}

.lm-article .eyebrow{font-family:var(--mono);font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--green);display:inline-flex;align-items:center;gap:10px}
.lm-article .eyebrow::before{content:"";width:22px;height:1px;background:var(--green)}

/* ---------- article header ---------- */
.lm-article .article-header{max-width:760px;margin:0 auto;padding:128px var(--pad) 0;text-align:left}
.lm-article .back{font-family:var(--mono);font-size:12px;color:var(--text-dim);display:inline-flex;align-items:center;gap:8px;margin-bottom:30px;transition:color .2s}
.lm-article .back:hover{color:var(--green)}
.lm-article .cat-row{display:flex;align-items:center;gap:14px;margin-bottom:22px}
.lm-article .article-header h1{font-family:var(--display);font-weight:600;font-size:clamp(32px,5vw,52px);line-height:1.06;letter-spacing:-.025em;color:var(--white)}
.lm-article .lm-dek{font-family:var(--serif);font-style:italic;font-size:clamp(19px,2.5vw,24px);line-height:1.45;color:var(--text);margin-top:24px;max-width:38ch}
.lm-article .meta{display:flex;align-items:center;gap:18px;margin-top:34px;padding-top:26px;border-top:1px solid var(--line);font-family:var(--mono);font-size:12.5px;color:var(--text-dim);flex-wrap:wrap}
.lm-article .meta .author{display:flex;align-items:center;gap:10px;color:var(--text)}
.lm-article .meta .avatar{width:30px;height:30px;border-radius:50%;border:1px solid var(--green);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:var(--green);background:var(--green-wash);flex:none;overflow:hidden}
.lm-article .meta .avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.lm-article .meta .sep{width:3px;height:3px;border-radius:50%;background:var(--text-faint)}

/* hero image */
.lm-article .hero-fig{max-width:980px;margin:48px auto 0;padding:0 var(--pad)}
.lm-article .hero-fig .frame{border:1px solid var(--line);border-radius:4px;aspect-ratio:16/8;background:
  radial-gradient(120% 140% at 70% 0%,#161d28 0%,#0c1118 70%);position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center}
.lm-article .hero-fig .frame.is-empty::after{content:"[ featured image ]";font-family:var(--mono);font-size:11px;color:var(--text-faint);letter-spacing:.14em}
.lm-article .hero-fig .frame .grid{position:absolute;inset:0;background-image:linear-gradient(var(--line-soft) 1px,transparent 1px),linear-gradient(90deg,var(--line-soft) 1px,transparent 1px);background-size:42px 42px;opacity:.5}
.lm-article .hero-fig .frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

/* ---------- layout: TOC + body ---------- */
.lm-article .article-body{max-width:1180px;margin:0 auto;padding:64px var(--pad) 0;display:grid;grid-template-columns:200px minmax(0,720px) 1fr;gap:56px;align-items:start}

/* TOC */
.lm-article .toc{position:sticky;top:96px;font-family:var(--mono)}
.lm-article .toc .label{font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--text-faint);margin-bottom:16px}
.lm-article .toc ol{list-style:none;counter-reset:t}
.lm-article .toc li{counter-increment:t;margin-bottom:2px}
.lm-article .toc a{display:flex;gap:9px;font-size:12.5px;color:var(--text-dim);padding:7px 0 7px 12px;border-left:1px solid var(--line);transition:color .2s,border-color .2s;line-height:1.4}
.lm-article .toc a::before{content:counter(t,decimal-leading-zero);color:var(--text-faint);transition:color .2s}
.lm-article .toc a:hover{color:var(--text)}
.lm-article .toc a.active{color:var(--green);border-left-color:var(--green)}
.lm-article .toc a.active::before{color:var(--green)}

/* ---------- prose ---------- */
.lm-article .lm-prose{font-family:var(--serif);font-size:19px;line-height:1.78;color:var(--prose);font-weight:400}
.lm-article .lm-prose>p{margin-bottom:1.45em}
.lm-article .lm-prose>p:first-of-type{font-size:21px;line-height:1.7}
.lm-article .lm-prose strong{color:var(--prose-strong);font-weight:600}
.lm-article .lm-prose em{font-style:italic}
.lm-article .lm-prose a{color:var(--green);text-decoration:none;border-bottom:1px solid rgba(68,255,164,.35);transition:border-color .2s}
.lm-article .lm-prose a:hover{border-bottom-color:var(--green)}
.lm-article .lm-prose h2{font-family:var(--display);font-weight:600;font-size:clamp(25px,3.4vw,32px);line-height:1.12;letter-spacing:-.02em;color:var(--white);margin:2.4em 0 .6em;scroll-margin-top:96px}
.lm-article .lm-prose h2 .ix{font-family:var(--mono);font-size:13px;color:var(--green);font-weight:400;display:block;margin-bottom:10px;letter-spacing:.08em}
.lm-article .lm-prose h3{font-family:var(--display);font-weight:600;font-size:21px;color:var(--white);margin:1.9em 0 .5em;letter-spacing:-.01em}
.lm-article .lm-prose ul,.lm-article .lm-prose ol{margin:0 0 1.45em 0;padding-left:1.5em}
.lm-article .lm-prose li{margin-bottom:.6em;padding-left:.3em}
.lm-article .lm-prose ul li::marker{color:var(--green)}
.lm-article .lm-prose ol li::marker{color:var(--green);font-family:var(--mono);font-size:.85em}
.lm-article .lm-prose blockquote{margin:2em 0;padding:4px 0 4px 28px;border-left:2px solid var(--green);
  font-family:var(--display);font-weight:500;font-size:clamp(22px,3vw,28px);line-height:1.32;letter-spacing:-.015em;color:var(--white)}
.lm-article .lm-prose blockquote cite{display:block;margin-top:14px;font-family:var(--mono);font-size:12px;font-style:normal;color:var(--text-dim);letter-spacing:.04em}
.lm-article .lm-prose code{font-family:var(--mono);font-size:.82em;background:var(--ink-card);border:1px solid var(--line);border-radius:2px;padding:1px 6px;color:var(--green)}
.lm-article .lm-prose figure{margin:2.4em 0}
.lm-article .lm-prose figure .frame{border:1px solid var(--line);border-radius:4px;aspect-ratio:16/9;background:radial-gradient(120% 140% at 70% 0%,#161d28,#0c1118);display:flex;align-items:center;justify-content:center;font-family:var(--mono);font-size:11px;color:var(--text-faint);letter-spacing:.14em}
.lm-article .lm-prose figcaption{font-family:var(--mono);font-size:11.5px;color:var(--text-dim);margin-top:12px;letter-spacing:.02em;line-height:1.5}

/* the signature, used once */
.lm-article .lm-mark{position:relative;color:var(--white);white-space:nowrap;padding:0 .1em}
.lm-article .lm-mark::before{content:"";position:absolute;left:0;right:0;bottom:.04em;top:.06em;background:var(--green-wash);border-bottom:2px solid var(--green);z-index:-1}

/* TL;DR / key takeaways box */
.lm-article .lm-keybox{max-width:760px;margin:48px auto 8px;padding:0 var(--pad)}
.lm-article .lm-keybox .inner{border:1px solid var(--line);border-radius:4px;background:var(--ink-raised);padding:26px 28px;position:relative;overflow:hidden}
.lm-article .lm-keybox .inner::before{content:"";position:absolute;top:0;left:0;width:3px;height:100%;background:var(--green)}
.lm-article .lm-keybox .lbl{font-family:var(--mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--green);margin-bottom:16px}
.lm-article .lm-keybox ul{list-style:none}
.lm-article .lm-keybox li{font-family:var(--display);font-size:15px;color:var(--text);padding-left:22px;position:relative;margin-bottom:11px;line-height:1.5}
.lm-article .lm-keybox li:last-child{margin-bottom:0}
.lm-article .lm-keybox li::before{content:"";position:absolute;left:0;top:8px;width:7px;height:7px;border-radius:1px;background:var(--green)}
.lm-article .lm-keybox li strong{color:var(--white);font-weight:600}

/* callout */
.lm-article .lm-prose .lm-callout{border:1px solid var(--line);border-radius:4px;background:var(--green-wash);padding:20px 24px;margin:2.2em 0;font-family:var(--display);font-size:15.5px;line-height:1.6;color:var(--text)}
.lm-article .lm-prose .lm-callout .clbl{font-family:var(--mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--green);display:block;margin-bottom:8px}
.lm-article .lm-prose .lm-callout strong{color:var(--white)}

/* comparison table */
.lm-article .lm-prose .table-scroll{overflow-x:auto;margin:2.2em 0;border:1px solid var(--line);border-radius:4px}
.lm-article .lm-prose table{width:100%;border-collapse:collapse;font-family:var(--display);font-size:14.5px;min-width:520px}
.lm-article .lm-prose thead th{background:var(--ink-raised);text-align:left;padding:14px 18px;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-dim);border-bottom:1px solid var(--line);font-weight:400}
.lm-article .lm-prose thead th:first-child{color:var(--green)}
.lm-article .lm-prose tbody td{padding:14px 18px;border-bottom:1px solid var(--line-soft);color:var(--text);vertical-align:top}
.lm-article .lm-prose tbody tr:last-child td{border-bottom:none}
.lm-article .lm-prose tbody td:first-child{color:var(--white);font-weight:500}
.lm-article .lm-prose .yes{color:var(--green)}.lm-article .lm-prose .no{color:var(--text-faint)}

/* inline mid-article CTA */
.lm-article .lm-midcta{margin:2.6em 0;border:1px solid var(--line);border-radius:4px;padding:22px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:var(--ink-card);flex-wrap:wrap}
.lm-article .lm-midcta p{font-family:var(--display);font-size:15.5px;color:var(--white);font-weight:500;max-width:40ch}
.lm-article .lm-midcta p span{color:var(--text-dim);font-weight:400}

/* ---------- author bio ---------- */
.lm-article .bio{max-width:760px;margin:72px auto 0;padding:0 var(--pad)}
.lm-article .bio .inner{border-top:1px solid var(--line);padding-top:32px;display:flex;gap:20px;align-items:flex-start}
.lm-article .bio .av{width:56px;height:56px;border-radius:50%;border:1px solid var(--green);display:flex;align-items:center;justify-content:center;font-family:var(--mono);font-weight:700;font-size:18px;color:var(--green);background:var(--green-wash);flex:none;overflow:hidden}
.lm-article .bio .av img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.lm-article .bio .who{font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--green);margin-bottom:8px}
.lm-article .bio h4{font-family:var(--display);font-size:19px;color:var(--white);font-weight:600;margin-bottom:8px}
.lm-article .bio p{font-family:var(--display);font-size:14.5px;color:var(--text-dim);line-height:1.6;max-width:52ch}
.lm-article .bio a{color:var(--green);border-bottom:1px solid rgba(68,255,164,.35)}

/* ---------- final cta ---------- */
.lm-article .final{margin-top:90px;background:var(--green);color:var(--green-ink);text-align:center;padding:clamp(60px,8vw,90px) var(--pad);position:relative;overflow:hidden}
.lm-article .final::before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(10,14,20,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(10,14,20,.06) 1px,transparent 1px);background-size:46px 46px;mask-image:radial-gradient(ellipse 70% 90% at 50% 50%,#000,transparent 75%);-webkit-mask-image:radial-gradient(ellipse 70% 90% at 50% 50%,#000,transparent 75%)}
.lm-article .final-in{position:relative;z-index:2;max-width:640px;margin:0 auto}
.lm-article .final .eyebrow{color:rgba(10,14,20,.6);justify-content:center}.lm-article .final .eyebrow::before{background:rgba(10,14,20,.6)}
.lm-article .final h2{font-family:var(--display);font-weight:600;color:var(--green-ink);font-size:clamp(26px,4vw,42px);margin:18px 0 16px;letter-spacing:-.02em}
.lm-article .final p{color:rgba(10,14,20,.72);font-size:16px;margin-bottom:30px;font-weight:500}
.lm-article .final .btn-dark{background:var(--green-ink);color:var(--green)}.lm-article .final .btn-dark:hover{transform:translateY(-2px);box-shadow:0 12px 30px -10px rgba(10,14,20,.5)}

/* ---------- related ---------- */
.lm-article .related{max-width:1180px;margin:0 auto;padding:clamp(64px,8vw,96px) var(--pad)}
.lm-article .related .eyebrow{margin-bottom:30px}
.lm-article .rgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.lm-article .rcard{border:1px solid var(--line);border-radius:4px;padding:24px;transition:transform .35s cubic-bezier(.16,1,.3,1),border-color .35s;background:var(--ink-raised);position:relative;overflow:hidden}
.lm-article .rcard::before{content:"";position:absolute;top:0;left:0;width:100%;height:2px;background:var(--green);transform:scaleX(0);transform-origin:left;transition:transform .35s}
.lm-article .rcard:hover{transform:translateY(-5px);border-color:#2a3340}.lm-article .rcard:hover::before{transform:scaleX(1)}
.lm-article .rcard .rc-cat{font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--green);margin-bottom:14px}
.lm-article .rcard h3{font-family:var(--display);font-size:17px;color:var(--white);font-weight:600;line-height:1.25;margin-bottom:16px;letter-spacing:-.01em}
.lm-article .rcard .rc-meta{font-family:var(--mono);font-size:11px;color:var(--text-dim)}

/* footer */
.lm-article footer{background:var(--ink);padding:46px 0;border-top:1px solid var(--line)}
.lm-article .foot-inner{max-width:1180px;margin:0 auto;padding:0 var(--pad);display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:18px}
.lm-article .foot-links{display:flex;gap:24px;font-family:var(--mono);font-size:12px;color:var(--text-dim)}
.lm-article .foot-links a:hover{color:var(--green)}
.lm-article .foot-copy{font-family:var(--mono);font-size:11px;color:var(--text-faint);letter-spacing:.06em}

/* responsive */
@media(max-width:1000px){
  .lm-article .article-body{grid-template-columns:1fr;gap:0;max-width:760px}
  .lm-article .toc{display:none}
  .lm-article .rgrid{grid-template-columns:1fr}
}
@media(max-width:560px){
  .lm-article .nav-right .nav-link{display:none}
  .lm-article .meta{gap:12px}
  .lm-article .lm-prose{font-size:18px}
}
@media(prefers-reduced-motion:reduce){.lm-article *{animation:none!important;transition:none!important}}

/* =========================================================================
   Core-block integration — make ordinary block-editor output match the
   .lm-prose look with zero manual class-adding. The selectors above already
   target bare p/h2/h3/ul/ol/li/blockquote/code/figure/table; these map the
   extra wrappers core adds (wp-block-*) onto the same look.
   ========================================================================= */
/* Patterns (keybox/callout/midcta) are authored inside post content, so they
   render inside .lm-prose. Reset the full-width framing the standalone keybox
   uses and let it flow in the column. */
.lm-article .lm-prose .lm-keybox{max-width:none;margin:2.4em 0;padding:0}
.lm-article .lm-prose .lm-keybox p.lbl{margin-bottom:16px}
.lm-article .lm-prose .lm-keybox ul{margin:0;padding-left:0}
.lm-article .lm-prose .lm-keybox li{margin-bottom:11px}
.lm-article .lm-prose .lm-callout p{margin:0}
.lm-article .lm-prose .lm-midcta p{margin:0}

/* Core table block wraps the table in <figure class="wp-block-table"> — give
   it the .table-scroll frame. */
.lm-article .lm-prose figure.wp-block-table{overflow-x:auto;margin:2.2em 0;border:1px solid var(--line);border-radius:4px}
.lm-article .lm-prose figure.wp-block-table table{margin:0}
.lm-article .lm-prose figure.wp-block-table figcaption{padding:0 18px 14px;margin-top:0}

/* Core list/quote/image blocks add wrapper classes; keep our spacing. */
.lm-article .lm-prose ul.wp-block-list,.lm-article .lm-prose ol.wp-block-list{margin:0 0 1.45em 0;padding-left:1.5em}
.lm-article .lm-prose .wp-block-quote{margin:2em 0}
.lm-article .lm-prose figure.wp-block-image{margin:2.4em 0}
.lm-article .lm-prose figure.wp-block-image img{border:1px solid var(--line);border-radius:4px}

/* Pattern blocks are built from core group/list/button blocks. Neutralise
   core's layout spacing so our component CSS above controls the look, and give
   the mid-CTA's core button the .btn-primary treatment. */
.lm-article .lm-keybox .inner > * + *{margin-top:0}
.lm-article .lm-midcta > * + *{margin-top:0}
.lm-article .lm-midcta .wp-block-buttons,
.lm-article .lm-midcta .wp-block-button{margin:0}
.lm-article .lm-midcta .wp-block-button__link{
	font-family:var(--mono);font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
	display:inline-flex;align-items:center;gap:9px;padding:10px 18px;border-radius:2px;
	background:var(--green);color:var(--green-ink);border:1px solid transparent;transition:transform .25s,box-shadow .3s}
.lm-article .lm-midcta .wp-block-button__link:hover{transform:translateY(-2px);box-shadow:0 8px 28px -8px var(--green-glow)}

/* Code block (multi-line) — keep it readable and on-brand without inventing
   new tokens. */
.lm-article .lm-prose pre.wp-block-code{font-family:var(--mono);font-size:13.5px;line-height:1.6;background:var(--ink-card);border:1px solid var(--line);border-radius:4px;padding:18px 20px;color:var(--prose);overflow-x:auto;margin:2.2em 0}
.lm-article .lm-prose pre.wp-block-code code{background:none;border:0;padding:0;color:inherit;font-size:inherit}
