// Joaquin Jeri — portfolio data
// To add a project: copy a row, set id (must match folder name under images/work or images/editorial),
// set title/client/cat, and set `n` to the number of images in the folder.
// Image filenames must be: images/{cat}/{id}/{id}-1.jpg, {id}-2.jpg, ... up to {id}-{n}.jpg
// Optional: `coverIdx` overrides which image (1-indexed) is used as the cover thumbnail.

const PROJECTS = [
  // WORK — Adidas family first
  { id: 'adidas',                 title: 'Adidas',                       client: 'ADIDAS',           year: '', cat: 'work',      n: 3,  coverIdx: 2 },
  { id: 'sie7e',                  title: 'Sie7e',                        client: 'ADIDAS',           year: '', cat: 'work',      n: 11, coverIdx: 2 },
  { id: 'the-box-x-adidas',       title: 'The Box × Adidas',             client: 'THE BOX × ADIDAS', year: '', cat: 'work',      n: 3,  coverIdx: 2 },
  // Other brand campaigns
  { id: 'levis',                  title: "Levi's",                       client: "LEVI'S",           year: '', cat: 'work',      n: 6,  coverIdx: 2 },
  { id: 'oneill-summer',          title: "O'Neill Summer",               client: "O'NEILL",          year: '', cat: 'work',      n: 11, coverIdx: 4 },
  { id: 'oneill-winter',          title: "O'Neill Winter",               client: "O'NEILL",          year: '', cat: 'work',      n: 6,  coverIdx: 1 },
  { id: 'umbro',                  title: 'Umbro',                        client: 'UMBRO',            year: '', cat: 'work',      n: 4,  coverIdx: 3 },
  { id: 'champion',               title: 'Champion',                     client: 'CHAMPION',         year: '', cat: 'work',      n: 2,  coverIdx: 2 },
  { id: 'dunkelvolk',             title: 'Dunkelvolk',                   client: 'DUNKELVOLK',       year: '', cat: 'work',      n: 6,  coverIdx: 6 },
  // The Box series
  { id: 'the-box-tropical-vibes', title: 'The Box — Tropical Vibes',     client: 'THE BOX',          year: '', cat: 'work',      n: 6,  coverIdx: 2 },
  { id: 'the-box-summer',         title: 'The Box — Summer',             client: 'THE BOX',          year: '', cat: 'work',      n: 5,  coverIdx: 1 },
  { id: 'the-box-jeans',          title: 'The Box — Jeans',              client: 'THE BOX',          year: '', cat: 'work',      n: 2,  coverIdx: 2 },

  // EDITORIAL
  { id: 'ana-k-elite-miami',      title: 'Ana K. — Elite Models Miami',  client: 'ELITE MODELS MIAMI', year: '', cat: 'editorial', n: 7, coverIdx: 5 },
  { id: 'ana-p-mila-elite-miami', title: 'Ana P. & Mila — Elite Models Miami', client: 'ELITE MODELS MIAMI', year: '', cat: 'editorial', n: 4, coverIdx: 4 },
  { id: 'talleres-vol-1',         title: 'Talleres Vol. 1',              client: 'TALLERES',         year: '', cat: 'editorial', n: 5, coverIdx: 3 },
  { id: 'talleres-vol-2',         title: 'Talleres Vol. 2',              client: 'TALLERES',         year: '', cat: 'editorial', n: 6, coverIdx: 2 },
  { id: 'meow-mag',               title: 'Meow Magazine',                client: 'MEOW MAGAZINE',    year: '', cat: 'editorial', n: 7, coverIdx: 5 },
  { id: 'stick-and-stones-mag',   title: 'Sticks & Stones Magazine',     client: 'STICKS & STONES',  year: '', cat: 'editorial', n: 4, coverIdx: 2 },
  { id: 'test-k',                 title: 'Test K',                       client: 'TEST',             year: '', cat: 'editorial', n: 7, coverIdx: 4 },
];

// Hydrate each project with full image arrays + cover
PROJECTS.forEach(p => {
  p.folder = `images/${p.cat}/${p.id}`;
  p.images = Array.from({ length: p.n }, (_, i) => `${p.folder}/${p.id}-${i + 1}.jpg`);
  const coverIdx = p.coverIdx && p.coverIdx >= 1 && p.coverIdx <= p.n ? p.coverIdx : 1;
  p.cover = p.images[coverIdx - 1];
  p.img = p.cover; // backward-compat for components that read `p.img`
});

// Portraits gallery (flat — no sub-projects, just a series of 20 images)
const RETRATOS = {
  folder: 'images/retratos',
  count: 21,
  images: Array.from({ length: 21 }, (_, i) => `images/retratos/retratos-${i + 1}.jpg`),
};

// Curated landing-page order. Each entry is either a project id, or { retratos: N }
// for a single portrait tile that links to the Portraits page.
const HOME_ORDER = [
  'meow-mag',
  'ana-k-elite-miami',
  'stick-and-stones-mag',
  'the-box-x-adidas',
  'talleres-vol-2',
  'adidas',
  'ana-p-mila-elite-miami',
  'levis',
  { retratos: 3 },
  'oneill-summer',
  { retratos: 5 },
  'dunkelvolk',
  'the-box-jeans',
  'the-box-summer',
  'the-box-tropical-vibes',
  'umbro',
  { retratos: 21 },
];

const BIO = `Joaquín Jerí is a Lima-based photographer and videographer specializing in brand campaigns, editorial, portrait, and fine-food photography.`;

const CLIENTS = ['Adidas', "Levi's", "O'Neill", 'Umbro', 'Champion', 'Dunkelvolk', 'The Box', 'Meow Magazine', 'Sticks & Stones', 'Elite Models Miami'];

// Header mark (boca / mouth) — still hosted on zyrosite CDN for now. Replace with a local SVG when one arrives.
const BOCA_SVG_URL = 'https://assets.zyrosite.com/cdn-cgi/image/format=auto,w=200,fit=crop/m6Lj19rWw6fLn3ar/boca-serpiente-mv02XbDKwDSE6o62.png';

window.JJ_DATA = { PROJECTS, RETRATOS, BIO, CLIENTS, BOCA_SVG_URL, HOME_ORDER };
