/* ============================================================
   DATA — all CV content lives here
   ============================================================ */

const PROFILE = {
  name: "Yassine Zenned",
  handle: "yzenned",
  role: "Software Engineer",
  location: "Germany",
  email: "zenned.yassine@gmail.com",
  github: "YASSINE-ZENNED",
  linkedin: "zenned-yassine",
  tagline: "Builds AI-powered backends, scalable microservices, and the occasional dev tool that actually gets used.",
};

/* ----------------------------------------------------------------
   IMAGE CONVENTION
   ----------------------------------------------------------------
   Drop screenshots into portfolio/images/ with predictable names:
     content-engine-1.png … content-engine-5.png
     imaging-platform-1.png … imaging-platform-5.png
     spreadsheet-tool-1.png … spreadsheet-tool-5.png
     log-platform-1.png …
     event-tickets-1.png …
   Then list the slugs below. Missing files just don't render.
   ---------------------------------------------------------------- */

// Helper: build path list from a base name.
//   imageList("content-engine", 5) → ["images/content-engine-1.png", ...]
//   imageList("content-engine", [1,3,4]) → only those indexes
function imageList(base, countOrList = 5, ext = "png") {
  const idxs = Array.isArray(countOrList)
    ? countOrList
    : Array.from({ length: countOrList }, (_, i) => i + 1);
  return idxs.map(i => `images/${base}-${i}.${ext}`);
}

const EXPERIENCE = [
  {
    company: "neuroflash",
    role: "Software Engineer",
    date: "01/2025 — present",
    location: "Germany",
    bullets: [
      { text: "Architected an AI-powered content engine generating SEO-optimized brand analysis reports from simulated audience feedback (\"silicon subjects\"), auto-published to WordPress." },
      { text: "Led the creation of a multi-model AI imaging platform with natural language editing and advanced analysis (heatmaps, focus, contrast)." },
      { text: "Automated internal business workflows via n8n — cost tracking, alerting, reporting, Slack notifications — with minimal manual intervention." },
      { text: "Delivered SEO-focused, login-free AI tools with built-in safeguards, achieving ", metric: "top-3 search rankings", tail: " and driving organic traffic growth." },
    ],
    stack: ["Java", "Spring Boot", "n8n", "Angular", "Python", "WordPress", "TinyDB", "GCP", "OpenRouter"],
    galleries: [
      { label: "content engine", images: [
        "images/neuroflash-brand-report.png",
        "images/neuroflash-spider.png",
        "images/neuroflash-drivers.png",
        "images/neuroflash-ass-graph.png",
      ] },
      { label: "imaging platform", images: [
        "images/img-platform-main-neurolens.png",
        "images/img-platform-improve.png",
        "images/img-platform-cat-with-hat.png",
        "images/img-platform-cat-heatmap.png",
        "images/img-platform-cat-cotrast.png",
      ] },
    ],
  },
  {
    company: "Evergates",
    role: "Software Developer",
    date: "2022 — 2024",
    location: "Tunis",
    bullets: [
      { text: "Built an AI-driven platform generating ", metric: "1,500+", tail: " SEO-optimized product descriptions, increasing conversion rates by ", metric2: "35%", tail2: "." },
      { text: "Developed a RAG-based chatbot and integrated Tavily search, improving response accuracy by ", metric: "40%", tail: " and search relevance by ", metric2: "90%", tail2: "." },
      { text: "Architected scalable Spring Boot microservices with RabbitMQ, Eureka, and Zipkin for communication and observability." },
      { text: "Deployed containerized services using Docker and Kubernetes; AWS S3 for scalable asset management." },
    ],
    stack: ["Java", "Spring Boot", "Flutter", "Angular", "OpenAI", "RAG", "Tavily", "AWS S3", "RabbitMQ", "Eureka", "Zipkin", "Docker", "Kubernetes", "PostgreSQL"],
    // images intentionally omitted
  },
  {
    company: "Electronic Workplace",
    role: "Software Engineer · Internship",
    date: "03/2022 — 09/2022",
    location: "Tunis",
    bullets: [
      { text: "Crafted a responsive mobile UI ensuring functional parity across screen sizes and devices." },
      { text: "Built a cross-platform NFC solution — managers program location tags, staff verify presence with a single scan, creating a digital audit trail." },
      { text: "Conducted QA covering all major app features." },
    ],
    stack: ["Flutter", "NFC", "SQLite"],
  },
];

const PROJECTS = [
  {
    name: "agents.tn",
    url: "https://agents.tn",
    urlLabel: "agents.tn",
    tagline: "A multilingual registry and launchpad for AI agents in Tunisia.",
    bullets: [
      { text: "Built a multilingual landing and registration platform helping Tunisian businesses discover AI agents and submit deployment requests through a clean, low-friction flow." },
      { text: "Structured the experience around agent discovery, registration, and custom deployment inquiries so teams can move from interest to action quickly." },
      { text: "Shipped the platform on a Vercel-powered workflow with a strong focus on clarity, conversion, and easy bilingual/trilingual navigation." },
    ],
    stack: ["Vercel", "Multilingual UX", "Landing Pages", "Registration Flow", "AI Agents"],
  },
  {
    name: "Spreadsheet-Based Prompt Engineering Tool",
    url: "https://gomyprompt.com",
    urlLabel: "gomyprompt.com",
    tagline: "LLM workflows in a spreadsheet — streamed, dependency-resolved, collaborative.",
    bullets: [
      { text: "Spreadsheet-like platform for designing and executing LLM workflows with real-time streaming (SSE) and dependency-based execution — reduced prompt iteration time by ", metric: "60%", tail: "." },
      { text: "Template engine resolving dynamic references and enabling parallel prompt execution." },
      { text: "Multi-user collaboration, workspace management, and OpenRouter-based LLM integration." },
    ],
    stack: ["Java", "Next.js", "TypeScript", "Spring Boot", "JPA/Hibernate", "OpenRouter", "SSE"],
    galleries: [
      { label: "gomyprompt", images: [
        "images/gmp-1.png",
        "images/gmp-2.png",
        "images/gmp-3.png",
        "images/gmp-4.png",
        "images/gmp-5.png",
        "images/gmp-6.png",
        "images/gmp-7.png",
        "images/gmp-8.png",
        "images/gmp-9.png",
      ] },
    ],
  },
  {
    name: "Universal Log Aggregation & AI Intelligence Platform",
    tagline: "Query every log source at once. Ask it questions in English.",
    bullets: [
      { text: "High-performance log aggregation querying AWS CloudWatch, Grafana Loki concurrently, achieving ", metric: "sub-200ms", tail: " response times." },
      { text: "Unified log normalization with PostgreSQL + Redis caching — repeat queries under ", metric: "10ms", tail: "." },
      { text: "Go-based REST API using goroutines and channels for efficient parallel data processing." },
      { text: "AI-powered log analysis via MCP — natural-language querying across distributed systems." },
    ],
    stack: ["Go", "PostgreSQL", "Redis", "Docker", "AWS CloudWatch", "Grafana Loki", "MCP", "AWS SDK"],
  },
  {
    name: "TicketForge",
    tagline: "Event ticketing built on a microservice mesh — auth, gateway, async messaging, the works.",
    bullets: [
      { text: "Integrated a Keycloak auth service for centralized login and access control, hardening security across the platform." },
      { text: "Used Krakend as a single API gateway, giving clients one entry point and a streamlined experience." },
      { text: "Configured Kafka for asynchronous messaging, enabling scalable inter-service communication." },
      { text: "Deployed Eureka-Server for service discovery — less config, fewer mistakes, faster development." },
    ],
    stack: ["Spring Boot", "Angular", "Flutter", "PostgreSQL", "PgAdmin", "Keycloak", "Krakend", "Kafka", "Eureka", "Docker"],
  },
];

const TECH = {
  languages: ["Java", "JavaScript", "TypeScript", "Python", "Go"],
  frameworks: ["Spring Boot", "Flutter", "Angular", "Next.js", "Express", "Node.js"],
  databases: ["PostgreSQL", "MySQL", "MongoDB", "SQL Server", "TinyDB", "Redis", "SQLite"],
  cloud: ["AWS (CCP)", "Docker", "Kubernetes", "GitHub Actions", "GCP", "Keycloak", "Kafka"],
};

// Flat list for marquee
const TECH_FLAT = [
  "Java", "Spring Boot", "Go", "Next.js", "TypeScript", "Python", "Angular",
  "PostgreSQL", "Redis", "Docker", "Kubernetes", "AWS", "GCP", "RabbitMQ",
  "OpenAI", "RAG", "MCP", "Flutter", "n8n", "JavaScript", "MongoDB",
  "Zipkin", "Eureka", "Tavily", "OpenRouter", "GitHub Actions",
  "Kafka", "Keycloak", "Krakend", "NFC",
];

const LANGUAGES = [
  { name: "Arabic",  level: "Native / Bilingual", value: 1.0 },
  { name: "English", level: "Fluent",             value: 0.92 },
  { name: "French",  level: "Proficient",         value: 0.82 },
  { name: "German",  level: "Basic",              value: 0.35 },
];

const EDUCATION = [
  { degree: "Master's in Computer Science", school: "TEK-UP University", note: "Advanced software engineering." },
  { degree: "Bachelor's in Computer Science", school: "Higher Institute of Computer Science", note: "Foundations & systems." },
];

Object.assign(window, { PROFILE, EXPERIENCE, PROJECTS, TECH, TECH_FLAT, LANGUAGES, EDUCATION, imageList });
