"""
Build the Stripe Campaign Operations Manager cover letter DOCX.
Uses the Lumen 2026-07-25 reframe pattern: depth disclosures, not gap admissions.
"""
import os
from docx import Document
from docx.shared import Pt, RGBColor, Inches, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH

NAVY = RGBColor(0x1F, 0x38, 0x64)
BLACK = RGBColor(0x00, 0x00, 0x00)
DARK = RGBColor(0x33, 0x33, 0x36)

NAME = "ROB BLAKE"
CONTACT = "Phone: 303-800-7628  •  rkblake@gmail.com  •  LinkedIn.com/in/robkblake"
DATE = "July 25, 2026"
COMPANY = "Stripe"
TITLE = "Campaign Operations Manager — Req 7584016"

PARA_1 = (
    "I am applying for the Campaign Operations Manager role on Stripe's global demand campaigns team (req 7584016). "
    "I have spent the last decade running the operational backbone of large B2B demand programs — owning the "
    "campaign production supply chain, surfacing handoff friction between channels, and documenting the "
    "processes that turn a strategy brief into a measured launch. Bringing that muscle to a team that is "
    "actively reimagining the campaign lifecycle through AI-powered automation is the exact intersection I "
    "want to be working in."
)

PARA_2 = (
    "The strongest fit for this role is the throughline I have on the campaign operations engine. At Lumen "
    "Technologies, I owned end-to-end email and nurture campaign operations across the global demand gen and "
    "brand teams, integrating Marketo, Google Analytics, Marketo Analytics, and Salesforce reporting, and "
    "defining the tracking events, conversion goals, and segmentation logic that kept every campaign "
    "measurable from launch. At Trimble, I integrated a $140K/month B2B SaaS paid program with lead scoring, "
    "nurture sequencing, and Adobe Analytics instrumentation, surfacing the operational handoff gaps between "
    "paid, marketing automation, and CRM. At PMI, I owned the global measurement backbone and translated "
    "operational findings into actionable roadmap recommendations for content, UX, and engineering. Across "
    "those roles, I have routinely partnered with global, regional, and channel teams to design and "
    "operationalize scalable end-to-end workflows."
)

PARA_3 = (
    "On the AI and process automation side, my current consulting practice builds production AI marketing "
    "agents and workflow automations in Claude Code, n8n, Zapier, and MCP connectors. I already design "
    "agentic workflows that translate directly into faster campaign-execution cycles, clearer A/B test "
    "cadence, and better change management for new process rollouts. I pair that with concrete experience "
    "in the operating model itself: Adobe Analytics, Adobe Target, and Marketo integrations at Lumen and "
    "earlier in my career, and AEM hands-on during the CenturyLink to Lumen rebrand — where the Marketo "
    "team was not the day-to-day owner but we partnered with the dev team on critical website changes "
    "for the launch, so I know the authoring and component model well enough to ramp quickly to daily "
    "ownership. I am honest about which depth each tool currently sits at."
)

PARA_4 = (
    "I am reaching out to former colleagues and familiar recruiters for any warm introduction. Thank you "
    "for the consideration. I am flexible on time zone for a quick conversation and would welcome the "
    "chance to walk through the resume and answer questions."
)

doc = Document()
section = doc.sections[0]
section.top_margin = Cm(1.8)
section.bottom_margin = Cm(1.8)
section.left_margin = Cm(2.0)
section.right_margin = Cm(2.0)

p = doc.add_paragraph(); p.paragraph_format.space_after = Pt(2)
run = p.add_run(NAME); run.bold = True; run.font.size = Pt(14); run.font.color.rgb = NAVY; run.font.name = "Calibri"
p = doc.add_paragraph(); p.paragraph_format.space_after = Pt(12)
run = p.add_run(CONTACT); run.font.size = Pt(10); run.font.color.rgb = DARK; run.font.name = "Calibri"

p = doc.add_paragraph(); p.paragraph_format.space_after = Pt(8)
run = p.add_run(DATE); run.font.size = Pt(11); run.font.color.rgb = DARK; run.font.name = "Calibri"

p = doc.add_paragraph(); p.paragraph_format.space_after = Pt(2)
run = p.add_run(f"{COMPANY} — Talent Acquisition"); run.bold = True; run.font.size = Pt(11); run.font.color.rgb = DARK; run.font.name = "Calibri"
p = doc.add_paragraph(); p.paragraph_format.space_after = Pt(2)
run = p.add_run("Global Demand Campaigns Team"); run.font.size = Pt(11); run.font.color.rgb = DARK; run.font.name = "Calibri"
p = doc.add_paragraph(); p.paragraph_format.space_after = Pt(12)
run = p.add_run(f"Re: {TITLE}"); run.font.size = Pt(11); run.font.color.rgb = DARK; run.font.name = "Calibri"

def body(text, space_after=8):
    p = doc.add_paragraph(); p.paragraph_format.space_after = Pt(space_after); p.paragraph_format.line_spacing = Pt(14)
    run = p.add_run(text); run.font.size = Pt(11); run.font.color.rgb = DARK; run.font.name = "Calibri"

body("Dear Hiring Team,")
body(PARA_1)
body(PARA_2)
body(PARA_3)
body(PARA_4)
body("Best regards,")

p = doc.add_paragraph(); p.paragraph_format.space_after = Pt(0)
run = p.add_run("Rob Blake"); run.bold = True; run.font.size = Pt(11); run.font.color.rgb = NAVY; run.font.name = "Calibri"

out_path = "/root/.hermes/vault/01_Job_Seeker/Rob_Blake_Cover_Stripe_Campaign-Operations-Manager.docx"
os.makedirs(os.path.dirname(out_path), exist_ok=True)
doc.save(out_path)
print(f"Saved: {out_path}")
print(f"Size: {os.path.getsize(out_path)} bytes")
print(f"Paragraphs: {len(doc.paragraphs)}")
print(f"Words: {len((' '.join(p.text for p in doc.paragraphs)).split())}")
