// themes.jsx — visual definitions for the 3 prototype variants
// Each theme drives: rain palette, chrome colors, fonts, glow, scanlines.

const THEMES = {
  classic: {
    id: 'classic',
    name: 'Classic Green',
    blurb: 'Polished digital-rain reference',
    bg: '#000000',
    bgDeep: '#000000',
    fg: '#00ff41',
    fgDim: '#127a35',
    fgGlow: '#b4ffc1',
    accent: '#00ff41',
    accentSoft: 'rgba(0,255,65,0.18)',
    redPill: '#ff2240',
    redPillGlow: 'rgba(255,34,64,0.55)',
    bluePill: '#3aa0ff',
    bluePillGlow: 'rgba(58,160,255,0.55)',
    rainHead: '#80ff80',
    rainBody: '#00ff41',
    rainTail: '#00190a',
    rainAlpha: 0.085,       // bg fade alpha — higher = crisper, less smear
    rainGlowAmount: 10,
    chars: 'classic',
    font: '"VT323", "JetBrains Mono", "Courier New", monospace',
    fontMono: '"JetBrains Mono", "Courier New", monospace',
    scanlines: 0.16,
    vignette: 0.55,
    curvature: false,
    flicker: 0.025,
    cursorTrail: '#b4ffc1',
    bootLines: [
      '> WAKE UP...',
      '> uplink established — node 0xA1F2',
      '> visitor identified',
      '> rendering reality_choice.exe',
    ],
  },
  cyber: {
    id: 'cyber',
    name: 'Neon Cyber',
    blurb: 'Magenta/cyan duotone, retrowave grid',
    bg: '#05030d',
    bgDeep: '#02010a',
    fg: '#00f6ff',
    fgDim: '#0a6e75',
    fgGlow: '#b8fbff',
    accent: '#ff2bd6',
    accentSoft: 'rgba(255,43,214,0.18)',
    redPill: '#ff2bd6',
    redPillGlow: 'rgba(255,43,214,0.65)',
    bluePill: '#00f6ff',
    bluePillGlow: 'rgba(0,246,255,0.6)',
    rainHead: '#ffffff',
    rainBody: '#00f6ff',
    rainTail: '#0b0524',
    rainAlpha: 0.07,
    rainGlowAmount: 10,
    rainAccent: '#ff2bd6',  // sprinkled accent stream color
    chars: 'mixed',         // katakana + hex + binary
    font: '"Space Mono", "IBM Plex Mono", "Courier New", monospace',
    fontMono: '"IBM Plex Mono", "Courier New", monospace',
    scanlines: 0.10,
    vignette: 0.65,
    curvature: false,
    flicker: 0.015,
    cursorTrail: '#ff2bd6',
    bootLines: [
      '> netrunner.bin loaded',
      '> handshake :: oleksiukstepan@grid',
      '> auth: visitor // token issued',
      '> jacking in...',
    ],
  },
  amber: {
    id: 'amber',
    name: 'Amber CRT',
    blurb: 'Phosphor terminal, heavy CRT',
    bg: '#100600',
    bgDeep: '#0a0400',
    fg: '#ffb000',
    fgDim: '#7a5400',
    fgGlow: '#ffd680',
    accent: '#ffb000',
    accentSoft: 'rgba(255,176,0,0.16)',
    redPill: '#ff5b1f',
    redPillGlow: 'rgba(255,91,31,0.6)',
    bluePill: '#ffb000',     // amber world — "blue" pill stays amber but slower glow
    bluePillGlow: 'rgba(255,176,0,0.55)',
    rainHead: '#fff2c8',
    rainBody: '#ffb000',
    rainTail: '#3a1a00',
    rainAlpha: 0.05,
    rainGlowAmount: 14,
    chars: 'amber',          // hex, ascii, code fragments
    font: '"VT323", "Courier New", monospace',
    fontMono: '"VT323", "Courier New", monospace',
    scanlines: 0.28,
    vignette: 0.85,
    curvature: true,
    flicker: 0.05,
    cursorTrail: '#ffd680',
    bootLines: [
      '> SYS-86 :: boot ok',
      '> tape loaded :: oleksiukstepan.tape',
      '> phosphor stable @ 60Hz',
      '> awaiting operator',
    ],
  },
};

// Character pools for the rain. Kept here so prototypes can pick by theme.id.
// Classic gets a wide katakana + half-width katakana + digits + math/punct
// pool so the rain feels less repetitive — references show real-Matrix rain
// is much richer than ASCII numbers alone.
const RAIN_CHARS = {
  classic: 'アィイゥウェエォオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン0123456789¦§±µ¹½¾¿×ßｦｧｨｩｪｫｬｭｮｯｰｱｲｳｴｵｶｷｸｹｺｻｼｽｾｿﾀﾁﾂﾃﾄﾅﾆﾇﾈﾉﾊﾋﾌﾍﾎﾏﾐﾑﾒﾓﾔﾕﾖﾗﾘﾙﾚﾛﾜﾝ¢£¥€‰*+-=<>[]/\|',
  mixed: 'アイウエオカキクケコサシスセソ0123456789ABCDEF#@$%&*<>{}[]()=+-_/',
  amber: '0123456789ABCDEF*+-=<>{}[]()/\|:;.,!?#@$%&^~`',
};

// Static contact + resume info — same across all variants. Lives here so the
// terminal commands can read it without duplicating across themes.
const PROFILE = {
  name: 'Stepan Oleksiuk',
  handle: 'stepan',
  title: 'Backend Developer',
  location: 'Ivano-Frankivsk, Ukraine',
  email: 'stepan.oleksiuk.dev@gmail.com',
  phone: '+380 (68) 263-72-36',
  github: 'https://github.com/OleksiukStepan',
  githubLabel: 'github.com/OleksiukStepan',
  linkedin: 'https://www.linkedin.com/in/stepan-oleksiuk-0a32252b4/',
  linkedinLabel: 'linkedin.com/in/stepan-oleksiuk-0a32252b4',
  telegram: 'https://t.me/stepan_oleksiuk',
  telegramLabel: '@stepan_oleksiuk',
  resumeUrl: 'https://drive.google.com/file/d/1u8qEJyLBd_KkXBAN9PuqxDBmFvh5zrIh/view?usp=sharing',
  tagline: 'I build scalable backends, async pipelines, and AI-powered automation.',
  longBio: 'Backend Engineer focused on scalable backend systems, async processing, and AI-powered automation. Architected and shipped production-grade backends from scratch, improved API performance by up to 70%, and reduced AI operation costs by ~50% through pipeline optimization. Experienced with FastAPI, Django, PostgreSQL, MongoDB, Redis, Celery, RabbitMQ, Docker, and OpenAI integrations.',
  education: [
    {
      title: 'Python Developer',
      place: 'Mate Academy',
      year:  '2024',
      mode:  'Online',
      desc:  'Python development at Mate Academy with mentor support, practical projects, databases, and testing.',
    },
    {
      title: 'Stanford CSA106 + CSB106',
      place: 'Ш++',
      year:  '2023',
      mode:  'Online',
      desc:  'Java-based Computer Science at School++ with peer reviews, media processing, and interactive UI projects.',
    },
    {
      title: 'CS50: Introduction to Computer Science',
      place: 'Harvard University',
      year:  '2022',
      mode:  'Online',
      desc:  'Algorithmic thinking, problem-solving efficiency, and hands-on problem sets across C, Python, and web.',
    },
  ],
};

// Tech keywords + cryptic flavor strings that occasionally drop as a vertical
// readable stream inside the matrix rain. Currently focused on a single
// phrase — 'WAKE_UP' — so the recurring reveal reads as the same nudge
// across the whole field, in the spirit of the film's opening line.
const RAIN_WORDS = ['WAKE_UP'];

const SKILLS = [
  { label: 'Web Frameworks',        items: ['Django', 'Django REST Framework', 'FastAPI'] },
  { label: 'Databases',             items: ['PostgreSQL', 'MongoDB', 'Redis', 'AWS S3', 'Cloudflare R2', 'Cloudinary'] },
  { label: 'Async & Messaging',     items: ['Celery', 'RabbitMQ', 'AsyncIO', 'WebSockets'] },
  { label: 'AI & Automation',       items: ['OpenAI API', 'ElevenLabs', 'AI workflow automation', 'prompt pipelines', 'structured outputs', 'batching', 'rate limiting'] },
  { label: 'Web Scraping & Automation', items: ['Playwright', 'Selenium', 'Scrapy', 'BeautifulSoup'] },
  { label: 'DevOps & Infrastructure', items: ['Docker', 'Docker Compose', 'NGINX', 'CI/CD (GitLab)', 'Linux (SSH, cron, logs)'] },
  { label: 'Monitoring & Observability', items: ['Sentry', 'Grafana', 'Prometheus'] },
  { label: 'Testing',               items: ['Pytest', 'unittest', 'integration testing', 'API testing', 'mocking'] },
  { label: 'Tools',                 items: ['Git', 'GitHub', 'GitLab', 'Postman', 'Swagger/OpenAPI'] },
];

const PROJECTS = [
  {
    id: 1,
    name: 'Multi-Service Backend Platform',
    stack: ['FastAPI', 'MongoDB', 'RabbitMQ'],
    role: 'Backend Developer @ :DTeam',
    period: '2025 — Present',
    bullets: [
      'Eliminated ~50% message loss — diagnosed and fixed a critical RabbitMQ consumer bug causing event drops across services.',
      'Reduced startup migration module by ~70% — moved logic to DAO/model layer, eliminating boot-time DB inconsistencies.',
      'Hardened codebase security — dependency audit surfaced 5–7 vulnerabilities including 2 critical severity issues, all escalated and resolved.',
    ],
  },
  {
    id: 2,
    name: 'Mobile App Backend',
    stack: ['Django', 'DRF', 'PostgreSQL', 'Celery', 'Redis', 'Docker', 'NGINX', 'GitLab CI/CD'],
    role: 'Backend Developer @ :DTeam',
    period: '2025 — Present',
    bullets: [
      'Architected and solely built a production Django/DRF backend from scratch: 16 modular apps, 60+ REST endpoints, 33+ DB models, deployed with Docker, NGINX, and GitLab CI/CD.',
      'Improved critical endpoint performance by up to 70% — eliminated N+1 queries with select_related / prefetch_related and applied bulk operations.',
      'Built a 4-level fallback recommendation engine: social graph → geo-proximity → verified pool → global.',
      'Integrated RevenueCat handling 10 webhook event types (subscription lifecycle + one-time purchases).',
      'Delivered 6 real-time FCM notification types with per-device language localization.',
    ],
  },
  {
    id: 3,
    name: 'AI Market Intelligence Tool',
    stack: ['Python', 'TypeScript', 'React', 'Gemini API', 'Playwright'],
    role: 'Backend / AI @ :DTeam',
    period: '2025 — Present',
    bullets: [
      'Cut client ad costs by 20–30% — automated keyword and campaign monitoring with auto-disabling of underperforming ads.',
      'Reduced AI generation costs by ~50% by migrating to Batch API; cut data collection time by ~67% through pipeline optimization.',
      'Shipped seller workflow automation across multiple production shops: AI replies enriched with live CRM order context and batch fulfillment flows.',
    ],
  },
];

Object.assign(window, { THEMES, RAIN_CHARS, RAIN_WORDS, PROFILE, SKILLS, PROJECTS });
