// Individual blog post pages

const BlogPostPage = ({ slug }) => {
  const post = window.BLOG_POSTS.find(p => p.slug === slug);
  if (!post) return (
    <main>
      <section className="page-header"><div className="container-narrow">
        <h1>Post not found.</h1>
        <p><a href="#/blog" onClick={navTo("blog")} style={{ color: "var(--aa-teal-700)" }}>Back to all posts →</a></p>
      </div></section>
    </main>
  );
  const Body = POST_BODIES[slug] || (() => <p>Post coming soon.</p>);
  return (
    <main>
      <section className="section-cream" style={{ paddingTop: 64, paddingBottom: 24 }}>
        <div className="container-narrow" style={{ textAlign: "center" }}>
          <a href="#/blog" onClick={navTo("blog")} style={{ fontFamily: "var(--aa-font-headline)", fontSize: 11, letterSpacing: "0.22em", textTransform: "uppercase", color: "var(--aa-teal-700)", textDecoration: "none" }}>← Back To Journal</a>
          <div className="post-meta" style={{ marginTop: 24, marginBottom: 14 }}>{post.date} &nbsp;|&nbsp; {post.cat} &nbsp;|&nbsp; {post.read} read</div>
          <h1 className="h-display" style={{ fontSize: 52, margin: "0 0 8px" }}>{post.title}</h1>
        </div>
      </section>
      <section style={{ background: "var(--aa-cream-100)" }}>
        <div className="container-narrow" style={{ paddingTop: 32 }}>
          <div style={{ aspectRatio: "5/4", borderRadius: 22, overflow: "hidden", boxShadow: "var(--aa-shadow-card)", marginBottom: 56, maxWidth: 640, marginLeft: "auto", marginRight: "auto" }}>
            <img src={`assets/${post.image}`} alt="" style={{ width: "100%", height: "100%", objectFit: "cover" }}/>
          </div>
        </div>
      </section>
      <section className="section section-white" style={{ paddingTop: 0 }}>
        <article className="post-article"><Body/></article>
      </section>
      <section className="mint-cta">
        <div className="container mint-cta-inner">
          <div>
            <h2>Ready to do this work?</h2>
            <p>Book a free 15-minute consultation to discover your attachment style.</p>
          </div>
          <Btn variant="dark" href="#/services" onClick={navTo("services")}>Reserve Your Spot</Btn>
        </div>
      </section>
    </main>
  );
};

const POST_BODIES = {
  "unavailable-partners": () => (
    <>
      <p>If you've done the work — journaled, gone to therapy, read every attachment style book under the sun — but still find yourself drawn to people who leave you feeling unseen, unsafe, or not enough, you're not alone.</p>
      <p>You are not broken. You are not "bad at love." You are loyal — at the nervous system level — to a pattern that once kept you safe.</p>
      <h2>Why this keeps happening</h2>
      <p>Your subconscious doesn't optimize for <em>healthy</em>. It optimizes for <em>familiar</em>. If the love you grew up around was inconsistent — affection that came and went without warning, or care that had to be earned — your nervous system learned that uncertainty <em>is</em> love. And so, as an adult, when you meet someone steady and available, your body interprets it as boring, suspicious, or "no chemistry."</p>
      <p>Meanwhile, the partner who pulls away, runs hot and cold, keeps you guessing? Your body lights up. <em>This</em>, your nervous system says, <em>is the one I know how to love.</em></p>
      <blockquote>The pattern isn't an attraction. It's a familiarity. And that's actually good news — because anything that's been programmed can be reprogrammed.</blockquote>
      <h2>What to do instead</h2>
      <h3>1. Name the pattern out loud</h3>
      <p>Get specific. Not "I keep dating jerks," but "I keep choosing partners who are loving when they're around but inconsistent about when they're around." Specificity gives the subconscious something to work with.</p>
      <h3>2. Track the early body signals</h3>
      <p>Within the first three dates, your nervous system has already cast its vote. The flutter of "oh this one might disappear" feels exciting — until you realize it's the exact same feeling you had at seven years old waiting for a parent to come home. That isn't chemistry. That's an old, familiar fear getting reactivated.</p>
      <h3>3. Practice tolerating "boring"</h3>
      <p>The first time someone secure shows up — texts when they say they will, doesn't disappear after a hard conversation, isn't punishing you with silence — your nervous system will ring the alarm. <strong>Stay.</strong> Boring isn't the absence of love. Boring is the absence of panic.</p>
      <h3>4. Reparent the seven-year-old</h3>
      <p>The part of you that keeps choosing unavailable partners is younger than you think. She's not trying to sabotage you — she's trying to win the love she didn't get. You can give her that love now, on purpose, instead of asking strangers to.</p>
      <p>This is the work I do with clients in 1:1 coaching: not just naming the pattern, but actually rewiring the body's response to safety so you stop running from the people who could love you well.</p>
      <p><strong>You're not broken. You're patterned.</strong> And patterns can change.</p>
    </>
  ),
  "ignoring-needs": () => (
    <>
      <p>Have you ever felt unseen, unheard, or like your needs don't matter? Maybe you're always the one showing up for others, but when it comes to asking for what <em>you</em> need, you hesitate. You shrink. You tell yourself it's not a big deal. You wait — sometimes for years — for someone to notice on their own.</p>
      <p>Here's the truth: if you grew up in a home where having needs got you in trouble, of course this is hard. Your nervous system learned early that needs were dangerous. Asking for too much got you punished, dismissed, or ignored. So you stopped asking.</p>
      <h2>The first 90 seconds is the hardest</h2>
      <p>When you finally start honoring your needs, the first 90 seconds feels unbearable. Your throat tightens. Your face flushes. The voice inside says, <em>"You're being too much. Take it back."</em></p>
      <blockquote>That voice isn't truth. That's an old protector trying to keep you safe in a system that no longer exists.</blockquote>
      <h3>Honor a need this week</h3>
      <ul>
        <li><strong>Name it.</strong> Out loud or on paper: "I need rest. I need quiet. I need to not be the one who plans this time."</li>
        <li><strong>Ask for it small.</strong> Not the biggest need first. Pick the smallest one that still matters.</li>
        <li><strong>Tolerate the discomfort.</strong> The shame after asking is not feedback. It's an echo.</li>
        <li><strong>Receive what comes back.</strong> If they meet you — let them. Don't deflect. Practice taking it in.</li>
      </ul>
      <p>Honoring your needs is not selfish. It's the practice of becoming a person you can finally rely on.</p>
    </>
  ),
  "5-signs": () => (
    <>
      <p>Have you ever felt like no matter how hard you try, you keep ending up in the same painful relationship cycles? You're not imagining it. Your attachment style runs underneath every connection — picking partners, interpreting silences, and writing the script for what love is supposed to feel like.</p>
      <p>Here are five signs your attachment style is calling the shots — and what to do about each one.</p>
      <h2>1. You overthink every text</h2>
      <p>If you're rereading messages, calculating response time, and inventing meaning in punctuation — that's not a "communication style." That's an anxious nervous system looking for evidence of abandonment.</p>
      <h2>2. You shut down the second things get close</h2>
      <p>Right when a relationship gets vulnerable, you find yourself nitpicking, distancing, or "needing space." Avoidance isn't lack of feeling — it's protection from too much feeling.</p>
      <h2>3. You give too much, too fast</h2>
      <p>You're already planning the future on the third date. You over-invest before someone has shown you who they are. This is anxious attachment trying to lock down certainty before there's any.</p>
      <h2>4. You confuse anxiety with chemistry</h2>
      <p>The nerves, the butterflies, the "I can't stop thinking about them" — much of that is just your nervous system reading inconsistency as love.</p>
      <h2>5. You can't tolerate stable</h2>
      <p>When someone secure shows up, you find them boring. You pick at them. You start a fight to feel something. Stable feels foreign because your body learned love as turbulence.</p>
      <h2>What to do</h2>
      <p>You can't out-think an attachment pattern. You have to <strong>down-regulate</strong> it — slow your nervous system down enough that secure starts to feel survivable. That's the work. Not insight. Integration.</p>
    </>
  ),
  "rewire-subconscious": () => (
    <>
      <p>Affirmations don't work. Not really. Saying "I am worthy of love" 100 times in the mirror and then going home to scroll your ex's Instagram doesn't rewire anything. Here's what actually does.</p>
      <h2>The subconscious is a body, not a vocabulary</h2>
      <p>Your subconscious mind doesn't update through repetition of words. It updates through repeated <em>experiences of safety</em>. Affirmations only work when they're paired with what neuroscientists call <strong>state change</strong> — a felt-sense shift in the body at the moment the new belief is being installed.</p>
      <h2>The four ingredients of real subconscious change</h2>
      <h3>1. State</h3>
      <p>You can't reprogram a nervous system that's in fight-or-flight. Step one is downshifting: slow breath, ground in the body, get the heart rate below 70.</p>
      <h3>2. Specificity</h3>
      <p>"I am loved" is vague. "When my partner needs space, I am still safe" is specific. Specific beliefs get installed; vague ones don't.</p>
      <h3>3. Sensation</h3>
      <p>Notice where in the body the new belief lives. Warmth in the chest? Looseness in the jaw? That's the imprint. The subconscious learns through somatic anchoring, not vocabulary.</p>
      <h3>4. Repetition under safety</h3>
      <p>Repeat the new pattern in moments your nervous system feels resourced — not when you're triggered. Triggered repetition <em>reinforces</em> the trigger. Safe repetition rewires it.</p>
      <blockquote>You are not broken. You are programmed. And anything that's been programmed can be reprogrammed.</blockquote>
      <p>This is the framework inside my <a href="#/free-workbook" style={{ color: "var(--aa-teal-700)", fontWeight: 600 }}>free Subconscious Reprogramming Workbook</a>. Download it to walk through the full process step by step.</p>
    </>
  ),
};

window.BlogPostPage = BlogPostPage;
