from docx import Document
from docx.shared import Pt, Inches
from docx.enum.text import WD_ALIGN_PARAGRAPH

def create_resume():
    doc = Document()

    # Styles
    style = doc.styles['Normal']
    font = style.font
    font.name = 'Calibri'
    font.size = Pt(11)

    # --- Header ---
    header = doc.add_paragraph()
    header.alignment = WD_ALIGN_PARAGRAPH.CENTER
    
    name_run = header.add_run('MICHAEL ARGO')
    name_run.bold = True
    name_run.font.size = Pt(18)
    name_run.font.name = 'Calibri' 
    
    contact_info = header.add_run('\nAustin, TX | 707-701-3375 | mike@setup.repair | mike.argo@gmail.com')
    contact_info.font.size = Pt(10)
    
    links = header.add_run('\nlinkedin.com/in/michaeljargo | github.com/setuprepairllc')
    links.font.size = Pt(10)

    doc.add_paragraph() # Spacer

    # --- Professional Summary ---
    head_summary = doc.add_paragraph()
    run_sum = head_summary.add_run('PROFESSIONAL SUMMARY')
    run_sum.bold = True
    run_sum.font.size = Pt(12)
    head_summary.paragraph_format.space_after = Pt(4)
    doc.add_paragraph('___' * 30).alignment = WD_ALIGN_PARAGRAPH.CENTER # Visual divider

    summary_text = (
        "Solutions Architect and Security professional with over 20 years of experience in cloud infrastructure, "
        "enterprise automation, and application security. Proven expertise in designing and securing complex systems "
        "in AWS and Azure for major financial institutions and government agencies. Adept at root cause analysis, "
        "CI/CD pipeline integration, and scripting with PowerShell and Python to drive operational efficiency. "
        "Currently pursuing AWS Solutions Architect and OSCP certifications to further deepen cloud and offensive security expertise."
    )
    doc.add_paragraph(summary_text)

    # --- Technical Skills ---
    head_skills = doc.add_paragraph()
    run_skills = head_skills.add_run('\nCORE COMPETENCIES & TECHNICAL SKILLS')
    run_skills.bold = True
    run_skills.font.size = Pt(12)
    doc.add_paragraph('___' * 30).alignment = WD_ALIGN_PARAGRAPH.CENTER

    skills_table = doc.add_table(rows=1, cols=2)
    skills_table.autofit = True
    
    # Row 1
    c1 = skills_table.row_cells(0)[0]
    c1.text = "Cloud Platforms:"
    c1.paragraphs[0].runs[0].bold = True
    c1.add_paragraph("AWS (EC2, VPC, S3, RDS, Lambda), Azure (Entra ID, DevOps, Synapse, ADLS), GCP, Linode")

    c2 = skills_table.row_cells(0)[1]
    c2.text = "Security & Pen Testing:"
    c2.paragraphs[0].runs[0].bold = True
    c2.add_paragraph("Metasploit, Nmap, Nessus, Burp Suite, Veracode (SAST/DAST), Vulnerability Remediation")
    
    # Row 2
    row2 = skills_table.add_row().cells
    row2[0].text = "DevOps & CI/CD:"
    row2[0].paragraphs[0].runs[0].bold = True
    row2[0].add_paragraph("Ansible, Jenkins, Docker, Kubernetes, Red Hat OpenShift, Git, GitHub, GitLab, Azure DevOps")

    row2[1].text = "Automation & Languages:"
    row2[1].paragraphs[0].runs[0].bold = True
    row2[1].add_paragraph("PowerShell (Expert), Python, Go, Blue Prism RPA, Bizagi Studio")

    # Row 3
    row3 = skills_table.add_row().cells
    row3[0].text = "Databases:"
    row3[0].paragraphs[0].runs[0].bold = True
    row3[0].add_paragraph("MS SQL Server, Oracle, Azure Data Factory, Azure Databricks")

    row3[1].text = "Networking:"
    row3[1].paragraphs[0].runs[0].bold = True
    row3[1].add_paragraph("Azure Network Architecture, MPLS, BGP, DNS, Genesys Cloud, AWS Connect, Cisco")

    # --- Experience ---
    head_exp = doc.add_paragraph()
    run_exp = head_exp.add_run('\nPROFESSIONAL EXPERIENCE')
    run_exp.bold = True
    run_exp.font.size = Pt(12)
    doc.add_paragraph('___' * 30).alignment = WD_ALIGN_PARAGRAPH.CENTER

    # Helper function for jobs
    def add_job(title, company, location, dates, bullets):
        p = doc.add_paragraph()
        p.space_before = Pt(8)
        p.space_after = Pt(2)
        
        run_company = p.add_run(f"{company} | {location}")
        run_company.bold = True
        
        run_dates = p.add_run(f"\t{dates}")
        run_dates.italic = True
        p.tab_stops.add_tab_stop(Inches(6.5), 2) # Right align dates

        p2 = doc.add_paragraph()
        run_title = p2.add_run(title)
        run_title.bold = True
        run_title.italic = True
        
        for b in bullets:
            b_para = doc.add_paragraph(b, style='List Bullet')
            b_para.paragraph_format.space_after = Pt(0)

    # Setup.Repair
    add_job(
        "Owner & Technical Consultant", 
        "Setup.Repair, LLC", 
        "Austin, TX", 
        "Feb 2025 – Present",
        [
            "Provide platform architecture and technical consulting services demonstrating flexibility in C2C, 1099, and W2 arrangements.",
            "Manage security and network setup/repair projects for small businesses and residential clients, focusing on robust WFH environments and DNS configuration.",
            "Leverage technical and creative writing skills to deliver high-quality client documentation and communication for IT projects."
        ]
    )

    # Veracode
    add_job(
        "Customer Success Engineer",
        "Veracode",
        "Austin, TX",
        "Sep 2024 – Feb 2025",
        [
            "Integrated Veracode’s security scanning suite (SAST, DAST, IAST) into customer SDLCs using AWS, Azure DevOps, GitHub, and Jenkins.",
            "Automated CI/CD processes and system integrations to streamline application security testing.",
            "Provided expert code review and remediation guidance to development teams, accelerating vulnerability patching."
        ]
    )

    # Usio
    add_job(
        "Platform Support Engineer",
        "Usio",
        "San Antonio, TX",
        "Apr 2024 – Jul 2024",
        [
            "Developed PowerShell and Golang scripts to automate interactions with backend financial databases.",
            "Administered and configured GitLab CI/CD pipelines and performed manual SQL database administration.",
            "Supported AWS infrastructure, including VPC, RDS, S3, EC2, Kubernetes, and ELB configurations."
        ]
    )

    # SEC
    add_job(
        "Enterprise Solutions Architect (Contract)",
        "U.S. Securities and Exchange Commission",
        "Washington, D.C. (Remote)",
        "Jun 2023 – Feb 2024",
        [
            "Engineered AWS Lambda functions to aggregate Linux/Windows logs into Splunk for centralized monitoring.",
            "Mitigated critical CVEs and POAMs identified by Nessus and Veracode scans, hardening system security.",
            "Deployed PowerShell scripts in AWS to patch speculative execution vulnerabilities across Windows environments."
        ]
    )

    # TRS
    add_job(
        "Platform Engineer (Contract)",
        "Teacher Retirement System of Texas",
        "Austin, TX",
        "May 2023 – Nov 2023",
        [
            "Led solution architecture for Azure and on-premise systems, including Azure AADC, Entra ID, and Active Directory.",
            "Architected and supported a Red Hat OpenShift Kubernetes environment for containerized application deployment.",
            "Automated data workflows by implementing Azure Databricks, Synapse, and ADLS solutions."
        ]
    )

    # Lateetud
    add_job(
        "Solutions Architect",
        "Lateetud",
        "Austin, TX",
        "Dec 2021 – Apr 2023",
        [
            "Redesigned the Blue Prism RPA network architecture for RBC Bank, resolving performance bottlenecks and optimizing connectivity.",
            "Engineered PowerShell, Azure Resource Manager (ARM), and Bicep scripts to automate deployment of Azure environments.",
            "Designed Azure site-to-site BGP VPNs and scoped ExpressRoute for financial services automation.",
            "Developed a PowerShell framework to automate WMI data collection from servers and bots, feeding results into a custom MS SQL database."
        ]
    )

    # Blue Prism
    add_job(
        "Senior Software Support Engineer",
        "Blue Prism LLC",
        "Austin, TX",
        "Sep 2019 – Sep 2021",
        [
            "Provided Tier-3 production support for Fortune 500 clients, performing root cause analysis on complex automation, database, and cloud networking issues.",
            "Developed C# code stages to parse data sets and control hardware emulators.",
            "Created knowledge base articles and SharePoint content to facilitate internal and external self-assistance."
        ]
    )

    # Planview
    add_job(
        "Integrations Infrastructure Analyst",
        "Planview, Inc.",
        "Austin, TX",
        "Jan 2018 – Sep 2019",
        [
            "Integration and Root Cause Analysis (RCA) of OpenSuite, SnapLogic, and application interfaces between Planview, Jira, SAP, and other products.",
            "Performed log analysis using SumoLogic and Splunk; administered MSSQL 2008-2016 and Oracle 12 databases.",
            "Developed workarounds and integrations using Batch, PowerShell, and C#."
        ]
    )

    # ClearData (Summarized)
    add_job(
        "System Administrator",
        "ClearData",
        "Austin, TX",
        "May 2017 – Dec 2017",
        [
            "Supported applications utilizing AWS stack (EC2, S3, Route 53, IAM, CloudFormation) focusing on high-availability and fault tolerance.",
            "Managed VMware administration, Linux/Windows server migration, and Salt implementation."
        ]
    )

    # --- Certifications ---
    head_cert = doc.add_paragraph()
    run_cert = head_cert.add_run('\nCERTIFICATIONS & EDUCATION')
    run_cert.bold = True
    run_cert.font.size = Pt(12)
    doc.add_paragraph('___' * 30).alignment = WD_ALIGN_PARAGRAPH.CENTER

    cert_p = doc.add_paragraph()
    cert_p.add_run("Certifications: ").bold = True
    cert_p.add_run("Blue Prism Certified Developer, Bizagi Certified Professional Associate.")
    
    study_p = doc.add_paragraph()
    study_p.add_run("Currently Pursuing: ").bold = True
    study_p.add_run("AWS Solutions Architect, Offensive Security Certified Professional (OSCP).")

    edu_p = doc.add_paragraph()
    edu_p.add_run("Education: ").bold = True
    edu_p.add_run("Colorado Technical University (Computer Science), Pikes Peak State College (Computer Science).")

    # Save
    file_path = "Michael_Argo_Resume.docx"
    doc.save(file_path)
    print(file_path)

create_resume()