#!/usr/bin/env python3
"""Just blur the remaining visible client name headers."""

from PIL import Image, ImageFilter
import os

input_path = "/Users/assafdagan/clawd/output/blurred-final.jpg"  # Start from already blurred version
output_path = "/Users/assafdagan/clawd/output/blurred-complete.jpg"

img = Image.open(input_path)
w, h = img.size

# Target ONLY the remaining visible headers - be very aggressive
blur_regions = [
    # "*1. Phat Foods Deadline Approaching*" - try going much higher y=350-395
    (0, 350, 620, 395),
    
    # "*2. Spoken Project (Dovi Remarks)*" - try y=550-600
    (0, 550, 660, 600),
    
    # "1. *Phat Foods check-in*" and "2. *Complete Dovi review*" in Tomorrow section
    # These are at the bottom - try y=1050-1175
    (25, 1040, 430, 1175),
]

result = img.copy()

for (x1, y1, x2, y2) in blur_regions:
    cropped = img.crop((x1, y1, x2, y2))
    blurred = cropped.filter(ImageFilter.GaussianBlur(radius=30))
    result.paste(blurred, (x1, y1))

os.makedirs(os.path.dirname(output_path), exist_ok=True)
result.save(output_path, quality=95)
print(f"Saved: {output_path}")
