const focusMode = (import.meta.env?.VITE_HOMEPAGE_FOCUS || "sdet").trim().toLowerCase();

const focusProfiles = {
  devops: {
    eyebrow: "AVAILABLE FOR REMOTE DEVOPS AUTOMATION AND PLATFORM WORK",
    role: "DevOps Automation Engineer / Senior SDET",
    shortRole: "DevOps Automation / Platform",
    summary:
      "I build custom software, tooling, and infrastructure that make development and test workflows easier, safer, and more repeatable: platform tools, CI/CD, Docker, Kubernetes, Linux systems, Python automation, observability, and release gates.",
    experienceLine:
      "Engineering experience across Boeing, IBM, deployment automation, infrastructure tooling, system testing, and production-minded platform operations.",
    techStack: [
      "Kubernetes",
      "Docker",
      "Linux",
      "Terraform",
      "Ansible",
      "Flux",
      "Helm",
      "Jenkins",
      "Harbor",
      "Keycloak",
      "Vault",
      "Grafana",
      "Prometheus",
      "Python",
      "Bash",
      "Pytest",
      "Selenium",
      "Playwright",
    ],
    capabilityOrder: [
      "CI/CD & Release Flow",
      "Docker & Kubernetes",
      "Python & Operational Automation",
      "Observability & Reliability",
      "Platform Tooling & GitOps",
      "Test Automation & SDET",
    ],
    serviceOrder: [
      "Platform bring-up and GitOps operating model",
      "AWS and dedicated-host Kubernetes buildouts",
      "Cluster recovery, bootstrap, and outage drills",
      "CI/CD quality gates and release machinery",
      "Storage, backup, and restore operations",
      "Operational tools for real infrastructure",
    ],
    capabilitySection: {
      kicker: "Capabilities",
      heading: "Where I Add Platform Value",
      description:
        "Delivery automation, infrastructure operations, and platform troubleshooting across the full path from commit to running service.",
    },
    serviceSection: {
      kicker: "Platform problem solving",
      heading: "From 0 to 100",
      description:
        "Beyond ticket-sized fixes, I build the operating machinery around delivery: cloud or dedicated-host Kubernetes, source-of-truth repositories, CI/CD gates, GitOps, recovery automation, backups, observability, and operator tools.",
    },
    workSection: {
      kicker: "Projects & Experience",
      heading: "Platform Showcase",
      description:
        "Inspectable repos, live services, and professional work samples that show how I approach real infrastructure.",
    },
    selectedWorkOrder: ["Titan Lab + titan-iac", "Atlas operator tools", "IBM", "Boeing", "Cassandra"],
    engagementOrder: [
      "Fixed-Scope Technical Rescue",
      "Short-Term Remote Contract",
      "Ongoing Engineering Support",
      "Senior Remote Engineering Role",
    ],
    contactSection: {
      heading: "Have a Platform, Pipeline, Deployment, or Automation Problem?",
      description:
        "Send the problem, technical stack, expected outcome, and timeline. I will respond with whether it is a fit, what information is needed, and the most practical next step.",
    },
    cassandra: {
      description:
        "Homegrown AI playtester for Magic: The Gathering deck construction, deployed for the community on Atlas with backend orchestration and disposable simulation workers.",
      points: ["community AI service", "Kubernetes deployment", "worker orchestration", "job cleanup"],
    },
    about: {
      role: "DevOps Automation Engineer / Senior SDET",
      focusLine: "Platform Engineering · CI/CD · Reliability",
      summary: [
        "DevOps Automation Engineer and Senior SDET with experience across CI/CD pipelines, Kubernetes, Docker, Linux infrastructure, Python automation, observability, release gates, and system testing.",
        "I build deployment workflows, infrastructure utilities, dashboards, operator tools, and test automation that make complex delivery environments easier to run and safer to change.",
        "My projects and dashboards run on Atlas, the live bstein.dev platform.",
      ],
      skillGroups: [
        {
          label: "Platform / Cloud",
          items: ["AWS", "GCP", "Kubernetes", "Helm", "Docker Compose", "Harbor", "Artifactory", "IronBank", "Keycloak", "Vault"],
        },
        {
          label: "CI/CD & GitOps",
          items: ["Jenkins", "Flux CD", "Argo CD", "GitHub Actions", "Drone", "Terraform", "Ansible"],
        },
        {
          label: "Observability / Data",
          items: ["Grafana", "Prometheus", "OpenSearch", "Zabbix", "LogDNA", "ELK", "PostgreSQL", "MySQL", "Redis", "Kafka"],
        },
        {
          label: "Automation",
          items: ["Python", "Bash", "Go", "Groovy", "SQL", "Rust"],
        },
        {
          label: "Testing",
          items: ["Pytest", "Selenium", "Playwright", "Jest", "API", "E2E", "System", "Chaos", "Load", "Performance", "Contract"],
        },
        {
          label: "Web & AI",
          items: ["Vue", "React", "Django", "Flask", "Tailwind", "JQuery", "Codex", "Cursor", "Claude Code"],
        },
      ],
    },
  },
  sdet: {
    eyebrow: "AVAILABLE FOR REMOTE SDET AND QA AUTOMATION WORK",
    role: "Senior SDET / DevOps Automation Engineer",
    shortRole: "SDET / QA Automation",
    summary:
      "I diagnose, automate, and stabilize the systems between code and production: test automation, CI/CD, Docker and Kubernetes, Linux infrastructure, Python tooling, and observability.",
    experienceLine:
      "Engineering experience across Boeing, IBM, system and end-to-end testing, deployment automation, infrastructure tooling, and production-minded platform operations.",
    techStack: [
      "Python",
      "Pytest",
      "Selenium",
      "Playwright",
      "API Testing",
      "E2E Testing",
      "CI/CD",
      "Jenkins",
      "Docker",
      "Kubernetes",
      "Linux",
      "Grafana",
      "Prometheus",
    ],
    capabilityOrder: [
      "Test Automation & SDET",
      "CI/CD & Release Flow",
      "Docker & Kubernetes",
      "Python & Operational Automation",
      "Observability & Reliability",
      "Platform Tooling & GitOps",
    ],
    serviceOrder: [
      "CI/CD quality gates and release machinery",
      "Platform bring-up and GitOps operating model",
      "AWS and dedicated-host Kubernetes buildouts",
      "Cluster recovery, bootstrap, and outage drills",
      "Operational tools for real infrastructure",
      "Storage, backup, and restore operations",
    ],
    capabilitySection: {
      kicker: "Capabilities",
      heading: "Where I Add Quality Value",
      description:
        "Test engineering, delivery automation, and release confidence across the full path from code to operating system.",
    },
    serviceSection: {
      kicker: "Delivery confidence",
      heading: "Quality Systems I Can Take From Zero to Reliable",
      description:
        "I build the checks, diagnostics, release gates, and automation that help teams know whether a system is actually ready to ship.",
    },
    workSection: {
      kicker: "Projects & Experience",
      heading: "Testing, Automation, and Platform Work",
      description:
        "Engineering work across system testing, cloud validation, delivery gates, and live platform operations.",
    },
    selectedWorkOrder: ["Boeing", "IBM", "Titan Lab + titan-iac", "Atlas operator tools", "Cassandra"],
    engagementOrder: [
      "Short-Term Remote Contract",
      "Fixed-Scope Technical Rescue",
      "Ongoing Engineering Support",
      "Senior Remote Engineering Role",
    ],
    contactSection: {
      heading: "Have a Test, Release, or Automation Problem?",
      description:
        "Send the problem, technical stack, expected outcome, and timeline. I will respond with whether it is a fit, what information is needed, and the most practical next step.",
    },
    cassandra: {
      description:
        "Homegrown AI playtester with simulation flows, backend service boundaries, and useful surfaces for API, worker, regression, and result-quality testing.",
      points: ["simulation flows", "API coverage", "regression surfaces", "result checks"],
    },
    about: {
      role: "Senior SDET / DevOps Automation Engineer",
      focusLine: "Test Automation · Release Quality · CI/CD",
      summary: [
        "Senior SDET and DevOps Automation Engineer with experience across Python automation, system and end-to-end testing, chaos testing, CI/CD pipelines, Kubernetes, Docker, Linux infrastructure, and observability.",
        "I build test frameworks, API and browser automation, release gates, diagnostics, dashboards, and delivery workflows that help teams understand whether a system is ready to ship.",
        "My projects and dashboards run on Atlas, the live bstein.dev platform.",
      ],
      skillGroups: [
        {
          label: "Testing",
          items: ["Selenium", "Pytest", "Playwright", "Jest", "SonarQube", "Postman", "API", "E2E", "System", "Chaos", "Load", "Performance", "Stress", "Contract"],
        },
        {
          label: "Automation",
          items: ["Python", "Go", "Bash", "Groovy", "SQL", "JavaScript", "TypeScript"],
        },
        {
          label: "CI/CD & GitOps",
          items: ["Jenkins", "Drone", "Flux CD", "Argo CD", "GitHub Actions", "Terraform", "Ansible"],
        },
        {
          label: "Platform / Cloud",
          items: ["AWS", "GCP", "Kubernetes", "Helm", "Docker Compose", "Harbor", "Artifactory", "IronBank", "Keycloak", "Vault"],
        },
        {
          label: "Observability / Data",
          items: ["Grafana", "Prometheus", "OpenSearch", "Zabbix", "LogDNA", "ELK", "PostgreSQL", "MySQL", "Redis", "Kafka"],
        },
        {
          label: "Web & AI",
          items: ["Vue", "React", "Django", "Flask", "Tailwind", "JQuery", "Codex", "Cursor", "Claude Code"],
        },
      ],
    },
  },
  developer: {
    eyebrow: "AVAILABLE FOR REMOTE PRODUCT, PLATFORM, AND AI SERVICE WORK",
    role: "Full-Stack Platform Engineer / Senior SDET",
    shortRole: "Product / Platform Engineering",
    summary:
      "I build useful software on real infrastructure: Vue frontends, Python services, AI integrations, CI/CD, Kubernetes, observability, and testable delivery paths.",
    experienceLine:
      "Engineering experience across live product delivery, Boeing, IBM, AI services, infrastructure tooling, and production-minded platform operations.",
    techStack: [
      "Vue",
      "Python",
      "Flask",
      "API Design",
      "PostgreSQL",
      "Redis",
      "Workers",
      "AI Integration",
      "Docker",
      "Kubernetes",
      "CI/CD",
      "Pytest",
      "Selenium",
      "Playwright",
    ],
    capabilityOrder: [
      "Python & Operational Automation",
      "Docker & Kubernetes",
      "Platform Tooling & GitOps",
      "CI/CD & Release Flow",
      "Test Automation & SDET",
      "Observability & Reliability",
    ],
    serviceOrder: [
      "Operational tools for real infrastructure",
      "Platform bring-up and GitOps operating model",
      "CI/CD quality gates and release machinery",
      "AWS and dedicated-host Kubernetes buildouts",
      "Cluster recovery, bootstrap, and outage drills",
      "Storage, backup, and restore operations",
    ],
    capabilitySection: {
      kicker: "Capabilities",
      heading: "Where I Add Product and Platform Value",
      description:
        "Application engineering, AI service integration, infrastructure automation, and release quality across the full path from idea to running service.",
    },
    serviceSection: {
      kicker: "Product-to-platform delivery",
      heading: "From 0 to 100",
      description:
        "I can help turn a useful idea into a running service: application workflow, API boundaries, background jobs, CI/CD, Kubernetes deployment, observability, and test coverage.",
    },
    workSection: {
      kicker: "Projects & Experience",
      heading: "Product and Platform Showcase",
      description:
        "Inspectable repos, live services, and professional work samples that show product engineering backed by real operations.",
    },
    selectedWorkOrder: ["Cassandra", "Titan Lab + titan-iac", "Atlas operator tools", "IBM", "Boeing"],
    engagementOrder: [
      "Short-Term Remote Contract",
      "Fixed-Scope Technical Rescue",
      "Ongoing Engineering Support",
      "Senior Remote Engineering Role",
    ],
    contactSection: {
      heading: "Have a Product, AI Service, Platform, or Automation Problem?",
      description:
        "Send the idea or problem, technical stack, expected outcome, and timeline. I will respond with whether it is a fit, what information is needed, and the most practical next step.",
    },
    cassandra: {
      description:
        "Homegrown AI service for Magic: The Gathering deck construction, with product workflow, AI integration, backend orchestration, content seeding, and disposable simulation jobs.",
      points: ["AI integration", "product workflow", "service boundaries", "simulation workers"],
    },
    about: {
      role: "Full-Stack Platform Engineer / Senior SDET",
      focusLine: "AI Services · Vue · Python · Kubernetes",
      summary: [
        "Full-stack platform engineer with experience across Vue frontends, Python services, AI integration, CI/CD, Kubernetes, Docker, Linux infrastructure, observability, and testable delivery paths.",
        "I build product workflows, APIs, dashboards, background jobs, deployment automation, and test surfaces that turn useful ideas into systems people can actually run.",
        "My projects and dashboards run on Atlas, the live bstein.dev platform.",
      ],
      skillGroups: [
        {
          label: "Product / Web",
          items: ["Vue", "Quasar", "React", "Tailwind", "JavaScript", "TypeScript", "JQuery", "FusionCharts"],
        },
        {
          label: "Backend / AI",
          items: ["Python", "Django", "Flask", "API design", "AI integration", "workers", "PostgreSQL", "Redis"],
        },
        {
          label: "Platform",
          items: ["Kubernetes", "Docker Compose", "Helm", "Flux CD", "Jenkins", "Harbor", "Keycloak", "Vault"],
        },
        {
          label: "Testing",
          items: ["Pytest", "Selenium", "Playwright", "Jest", "API", "E2E", "Regression", "Contract"],
        },
        {
          label: "Observability",
          items: ["Grafana", "Prometheus", "OpenSearch", "Zabbix", "ELK", "LogDNA"],
        },
        {
          label: "Tools",
          items: ["GitHub Actions", "Terraform", "Ansible", "Go", "Bash", "Codex", "Cursor", "Claude Code"],
        },
      ],
    },
  },
};

export const homepageModes = [
  { id: "sdet", label: "SDET", path: "/" },
  { id: "devops", label: "DevOps", path: "/devops" },
  { id: "developer", label: "Developer", path: "/developer" },
];

const focusAliases = {
  dev: "developer",
  development: "developer",
  qa: "sdet",
  test: "sdet",
  testing: "sdet",
};

export function normalizeHomepageFocus(mode = "") {
  const normalized = String(mode || "").trim().toLowerCase();
  const aliased = focusAliases[normalized] || normalized;
  return focusProfiles[aliased] ? aliased : "sdet";
}

export const homepageFocus = normalizeHomepageFocus(focusMode);

export function homepagePathForMode(mode = homepageFocus) {
  return homepageModes.find((item) => item.id === normalizeHomepageFocus(mode))?.path || "/";
}

export function homepageAboutPathForMode(mode = homepageFocus) {
  const focus = normalizeHomepageFocus(mode);
  return focus === "sdet" ? "/about" : `/${focus}/about`;
}

export function homepageModeFromRoute(route) {
  return normalizeHomepageFocus(route?.params?.focus || route?.meta?.homepageFocus || route?.query?.focus || homepageFocus);
}

const capabilities = [
  {
    icon: "TA",
    title: "Test Automation & SDET",
    description:
      "System, end-to-end, API, browser, and release-gate testing using Python, Pytest, Selenium, Playwright, and related tooling. Includes test architecture, coverage strategy, flaky-test diagnosis, and CI integration.",
  },
  {
    icon: "CI",
    title: "CI/CD & Release Flow",
    description:
      "Jenkins pipelines, build and test stages, promotion workflows, GitOps delivery, artifact handling, deployment gates, and failure diagnosis.",
  },
  {
    icon: "K8",
    title: "Docker & Kubernetes",
    description:
      "Docker and Docker Compose troubleshooting, Kubernetes workloads, Helm deployments, Flux or Argo CD workflows, service routing, configuration, storage, and deployment debugging.",
  },
  {
    icon: "PY",
    title: "Python & Operational Automation",
    description:
      "Python and Bash tools that replace repetitive work, connect APIs, validate systems, manage configuration, and make operational processes more reliable.",
  },
  {
    icon: "OB",
    title: "Observability & Reliability",
    description:
      "Metrics, dashboards, logs, alerting, and root-cause investigation using Grafana, Prometheus, Zabbix, OpenSearch, ELK, and related systems.",
  },
  {
    icon: "GT",
    title: "Platform Tooling & GitOps",
    description:
      "Internal tools, infrastructure utilities, configuration-drift prevention, environment management, GitOps workflows, and production-minded platform operations.",
  },
];

const services = [
  {
    title: "Platform bring-up and GitOps operating model",
    investigation:
      "Turn ad hoc services into a source-controlled platform: Kubernetes layout, Kustomize or Flux structure, environments, ingress, identity, storage, secrets, and validation workflow.",
    outcome:
      "A platform that can be changed through reviewable commits, reconciled by automation, and recovered without mystery manual edits.",
  },
  {
    title: "Cluster recovery, bootstrap, and outage drills",
    investigation:
      "Encode startup and shutdown order, node reachability, Flux health, workload convergence, ingress checks, service checklists, critical endpoints, and stability soaks.",
    outcome:
      "Repeatable recovery runs with status reports and gaps converted into automation instead of tribal knowledge.",
  },
  {
    title: "AWS and dedicated-host Kubernetes buildouts",
    investigation:
      "Design and stand up Kubernetes where the work actually lives: AWS VPCs, subnets, IAM, security groups, EKS or k3s on EC2, plus dedicated-host clusters with ingress, storage, identity, observability, and Terraform-backed repeatability.",
    outcome:
      "A documented cluster path from empty account or bare host to running services, with the foundations needed for CI/CD, GitOps, monitoring, and future handoff.",
  },
  {
    title: "CI/CD quality gates and release machinery",
    investigation:
      "Build Jenkins pipelines, container/image promotion, coverage floors, lint and security gates, artifact publishing, branch-aware metrics, and failure reporting.",
    outcome:
      "A delivery path that tells teams what failed, blocks unsafe changes, and produces evidence for every release.",
  },
  {
    title: "Storage, backup, and restore operations",
    investigation:
      "Map stateful workloads, PVCs, Longhorn volumes, policy backups, namespace restore flows, auth boundaries, and backup freshness metrics.",
    outcome:
      "Recoverable data paths, visible backup health, safer restore testing, and fewer surprise gaps around stateful services.",
  },
  {
    title: "Operational tools for real infrastructure",
    investigation:
      "Build CLIs, web UIs, diagnostics, logs, Prometheus metrics, remote-control surfaces, and admin workflows around the parts operators actually touch.",
    outcome:
      "A platform that is easier to operate under pressure because the important actions and evidence are available in one place.",
  },
];

function orderedBy(items, order) {
  const rank = new Map(order.map((title, index) => [title, index]));
  return [...items].sort((a, b) => (rank.get(a.title) ?? 99) - (rank.get(b.title) ?? 99));
}

const workDetailsByFocus = {
  devops: {
    titan: {
      kind: "Live platform",
      description:
        "Public IaC for bstein.dev: k3s, Flux, CI/CD, identity, ingress, Longhorn, observability, hosted services, recovery paths, and member onboarding.",
      points: [
        "IaC repo",
        "Kubernetes",
        "GitOps",
        "CI/CD",
        "identity",
        "registry",
        "storage",
        "observability",
        "backups",
        "recovery",
      ],
    },
    operators: {
      kind: "Public tooling",
      description:
        "Public tools for real Atlas operations: remote control, job reporting, backups, recovery image creation, sentinels, and UPS orchestration.",
      points: ["remote control", "job reporting", "backup status", "recovery images", "sentinels", "UPS orchestration"],
    },
    ibm: {
      description:
        "IBM Cloud automation across infrastructure validation, GPU environments, Terraform workflows, API health, and operational monitoring.",
      points: ["Terraform", "cloud validation", "RHEL/SUSE", "GPU environments", "Zabbix", "API health", "autoscaling"],
    },
    boeing: {
      description:
        "DevSecOps-adjacent automation, Flux-controlled environments, Jenkins promotion gates, Docker Compose drift protection, and infrastructure diagnosis.",
      points: ["Flux envs", "Jenkins gates", "Docker Compose", "drift protection", "infra diagnosis", "Lanterna", "Python tools"],
    },
  },
  sdet: {
    titan: {
      kind: "Live platform",
      description:
        "A running member platform with authentication, onboarding, dashboards, service boundaries, metrics, health checks, and failure modes that can be tested end to end.",
      points: ["auth flows", "onboarding", "service checks", "dashboard smoke", "metrics", "failure fallback", "release gates"],
    },
    operators: {
      kind: "Automation tooling",
      description:
        "Operational tools with repeatable checks, job status, failure reporting, and validation surfaces useful for system-level testing.",
      points: ["state checks", "job reports", "failure diagnosis", "repeatable jobs", "validation flows", "safe actions"],
    },
    ibm: {
      description:
        "IBM Cloud test automation across system validation, GPU environments, API workflows, Go and Terraform tests, and operational health checks.",
      points: ["Python E2E", "Go tests", "Terraform tests", "GPU validation", "API workflows", "data-center validation", "Zabbix"],
    },
    boeing: {
      description:
        "System and end-to-end testing, Python and Selenium automation, microservice and web UI validation, release gates, and failure diagnostics.",
      points: ["Python", "Selenium", "system E2E", "microservices", "web UI", "quality gates", "test architecture"],
    },
  },
  developer: {
    titan: {
      kind: "Live platform",
      description:
        "A productized platform surface with member accounts, service catalog, OAuth, dashboards, hosted applications, AI workloads, and delivery automation.",
      points: ["Vue frontend", "member system", "service catalog", "OAuth", "AI workloads", "CI/CD", "observability"],
    },
    operators: {
      kind: "Operator products",
      description:
        "Small internal products for real operations: admin workflows, job surfaces, status reporting, remote actions, and automation APIs.",
      points: ["admin workflows", "job surfaces", "status reports", "remote actions", "automation APIs", "operator UX"],
    },
    ibm: {
      description:
        "IBM Cloud engineering across Python, Go, Terraform, API workflows, platform health dashboards, feature demos, and knowledge transfer.",
      points: ["Python", "Go", "Terraform", "API workflows", "health dashboards", "feature demos", "knowledge transfer"],
    },
    boeing: {
      description:
        "Engineering automation around system workflows, Python tools, release visualization, environment state, and complex integration surfaces.",
      points: ["Python tools", "Lanterna", "workflow visibility", "system integration", "environment state", "automation"],
    },
  },
};

export function homepageContentForMode(mode = homepageFocus) {
  const focus = normalizeHomepageFocus(mode);
  const selectedFocus = focusProfiles[focus];
  const workDetails = workDetailsByFocus[focus] || workDetailsByFocus.devops;

  return {
  professionalName: "Brad Stein",
  role: selectedFocus.role,
  shortRole: selectedFocus.shortRole,
  focus,
  eyebrow: selectedFocus.eyebrow,
  title: "Brad Stein | SDET, DevOps Automation & Platform Engineering",
  description:
    "Senior SDET and DevOps Automation Engineer helping teams improve test automation, CI/CD, Docker and Kubernetes reliability, Python tooling, Linux systems, and observability. Available for remote project and contract work.",
  summary: selectedFocus.summary,
  experienceLine: selectedFocus.experienceLine,
  availability: {
    visible: true,
    label: "Available for remote project, contract, and engineering opportunities",
    timeZone: "Remote, US-friendly time zones",
    updatedAt: "2026-06-19",
  },
  primaryContact: {
    email: "brad@bstein.dev",
    subject: "Project, contract, or engineering inquiry from bstein.dev",
  },
  resumeUrl: homepageAboutPathForMode(focus),
  resumePdfUrl: "",
  linkedInUrl: "https://www.linkedin.com/in/steinbradley/",
  sourceUrl: "https://scm.bstein.dev/bstein",
  platformMetricsUrl: "https://metrics.bstein.dev",
  techStack: selectedFocus.techStack,
  credibility: [
    "Professional experience: Boeing",
    "Professional experience: IBM",
    "Python automation",
    "Kubernetes and CI/CD",
    "Remote availability",
  ],
  capabilitySection: selectedFocus.capabilitySection,
  capabilities: orderedBy(capabilities, selectedFocus.capabilityOrder),
  serviceSection: selectedFocus.serviceSection,
  services: orderedBy(services, selectedFocus.serviceOrder),
  workSection: selectedFocus.workSection,
  contactSection: selectedFocus.contactSection,
  about: selectedFocus.about,
  selectedWork: [
    {
      icon: "IaC",
      kind: workDetails.titan.kind,
      title: "Titan Lab + titan-iac",
      description: workDetails.titan.description,
      points: workDetails.titan.points,
      links: [
        {
          label: "IaC repo",
          href: "https://scm.bstein.dev/bstein/titan-iac",
        },
      ],
    },
    {
      icon: "OPS",
      kind: workDetails.operators.kind,
      title: "Atlas operator tools",
      description: workDetails.operators.description,
      points: workDetails.operators.points,
      links: [
        { label: "lesavka", href: "https://scm.bstein.dev/bstein/lesavka" },
        { label: "ariadne", href: "https://scm.bstein.dev/bstein/ariadne" },
        { label: "soteria", href: "https://scm.bstein.dev/bstein/soteria" },
        { label: "metis", href: "https://scm.bstein.dev/bstein/metis" },
        { label: "ananke", href: "https://scm.bstein.dev/bstein/ananke" },
      ],
    },
    {
      icon: "IBM",
      kind: "Professional experience",
      title: "IBM",
      description: workDetails.ibm.description,
      points: workDetails.ibm.points,
    },
    {
      icon: "BA",
      kind: "Professional experience",
      title: "Boeing",
      description: workDetails.boeing.description,
      points: workDetails.boeing.points,
    },
    {
      icon: "AI",
      kind: "Community AI service",
      title: "Cassandra",
      description: selectedFocus.cassandra.description,
      points: selectedFocus.cassandra.points,
      weight: "minor",
      links: [
        {
          label: "Live app",
          href: "https://cassandra.bstein.dev/",
        },
        {
          label: "Content seed",
          href: "https://scm.bstein.dev/bstein/cassandra-content",
        },
      ],
    },
  ].sort((a, b) => {
    const rank = new Map(selectedFocus.selectedWorkOrder.map((title, index) => [title, index]));
    return (rank.get(a.title) ?? 99) - (rank.get(b.title) ?? 99);
  }),
  engagementTypes: [
    {
      title: "Fixed-Scope Technical Rescue",
      duration: "Several hours to several days.",
      description:
        "A bounded diagnosis or repair for a failing pipeline, deployment, automation workflow, test suite, or infrastructure problem.",
    },
    {
      title: "Short-Term Remote Contract",
      duration: "Several weeks to several months.",
      description:
        "Focused engineering capacity for test automation, CI/CD, infrastructure tooling, platform quality, release flow, or technical backlog reduction.",
    },
    {
      title: "Ongoing Engineering Support",
      duration: "Recurring support based on the operating need.",
      description:
        "Recurring help with automation, quality engineering, operational tooling, release systems, and platform reliability.",
    },
    {
      title: "Senior Remote Engineering Role",
      duration: "Full-time remote roles where the fit is strong.",
      description:
        focus === "devops"
          ? "I am open to well-aligned remote DevOps Automation, platform engineering, CI/CD, infrastructure automation, Kubernetes, Linux, or systems reliability roles. SDET and test automation depth comes with it."
          : focus === "developer"
            ? "I am open to well-aligned remote developer, full-stack, platform product, AI service, Python, Vue, automation, or internal tooling roles. SDET and DevOps depth comes with it."
            : "I am open to well-aligned remote SDET, QA Automation, systems testing, release quality, CI/CD, or DevOps Automation roles. Platform engineering depth comes with it.",
    },
  ].sort((a, b) => {
    const rank = new Map(selectedFocus.engagementOrder.map((title, index) => [title, index]));
    return (rank.get(a.title) ?? 99) - (rank.get(b.title) ?? 99);
  }),
  processSteps: [
    {
      title: "Share the Problem",
      description:
        "Send a concise description, relevant stack, desired outcome, timeline, and any safe logs, screenshots, or links.",
    },
    {
      title: "Confirm Fit and Scope",
      description:
        "Review the problem, identify missing information, and determine whether it fits a fixed-scope diagnostic, project, or contract engagement.",
    },
    {
      title: "Diagnose and Implement",
      description:
        "Work proceeds through a written scope, bounded investigation, implementation, testing, and documented findings.",
    },
    {
      title: "Handoff",
      description:
        "Receive the fix or deliverable, root-cause notes, operational guidance, and a concise handoff appropriate to the project.",
    },
  ],
  memberAccessCopy: {
    heading: "Titan Lab Member Access",
    description:
      "Titan Lab member accounts are for family, friends, and the lucky few with an invite: register for access or sign in here.",
    authenticated:
      "Use the existing member tools for dashboards, account management, onboarding, and approved service access.",
    restricted:
      "If access is pending or restricted, use the existing request-access status and onboarding flow. No platform permissions are bypassed here.",
  },
  memberServices: [
    {
      name: "Keycloak",
      icon: "🔐",
      href: "https://sso.bstein.dev",
      description: "Use one account to sign in across bstein.dev.",
    },
    {
      name: "Nextcloud",
      icon: "☁️",
      href: "https://cloud.bstein.dev",
      description: "Keep files, photos, office docs, and personal cloud data in sync.",
    },
    {
      name: "Mailu",
      icon: "✉️",
      href: "https://mail.bstein.dev",
      description: "Use your bstein.dev mailbox and webmail.",
    },
    {
      name: "Element",
      icon: "💬",
      href: "https://live.bstein.dev",
      description: "Chat in private rooms and join voice or video calls.",
    },
    {
      name: "Vaultwarden",
      icon: "🔑",
      href: "https://vault.bstein.dev",
      description: "Store passwords, secure notes, and shared secrets privately.",
    },
    {
      name: "Outline",
      icon: "📝",
      href: "https://notes.bstein.dev",
      description: "Read and write shared notes, guides, and docs.",
    },
    {
      name: "Planka",
      icon: "🧭",
      href: "https://tasks.bstein.dev",
      description: "Track shared projects and personal task boards.",
    },
    {
      name: "Jellyfin",
      icon: "🎬",
      href: "https://stream.bstein.dev",
      description: "Stream the family media library from your devices.",
    },
    {
      name: "Pegasus",
      icon: "📤",
      href: "https://pegasus.bstein.dev",
      description: "Upload media into the shared streaming library.",
    },
    {
      name: "Wger",
      icon: "🏋️",
      href: "https://health.bstein.dev",
      description: "Track workouts, routines, and nutrition.",
    },
    {
      name: "Actual Budget",
      icon: "💸",
      href: "https://budget.bstein.dev",
      description: "Plan budgets with private, local-first finance tracking.",
    },
    {
      name: "Firefly III",
      icon: "💵",
      href: "https://money.bstein.dev",
      description: "Review accounts, spending, and personal finance history.",
    },
    {
      name: "Gitea",
      icon: "🍵",
      href: "https://scm.bstein.dev",
      description: "Host Git repos and collaborate on code projects.",
    },
    {
      name: "Jenkins",
      icon: "🏗️",
      href: "https://ci.bstein.dev",
      description: "Run builds and automation for lab projects.",
    },
    {
      name: "Harbor",
      icon: "⚓",
      href: "https://registry.bstein.dev",
      description: "Publish and pull container images for projects.",
    },
    {
      name: "Grafana",
      icon: "📈",
      href: "https://metrics.bstein.dev",
      description: "Check dashboards for lab and service health.",
    },
    {
      name: "AI Chat",
      icon: "🤖",
      href: "https://bstein.dev/ai/chat",
      description: "Ask the Titan Lab AI assistant for help.",
    },
    {
      name: "Cassandra",
      icon: "🃏",
      href: "https://cassandra.bstein.dev/",
      description: "Test Magic: The Gathering deck ideas with AI playtesting.",
    },
    {
      name: "Monero",
      icon: "🪙",
      href: "https://bstein.dev/monero",
      description: "Use the private RPC endpoint through the Monero guide.",
    },
  ],
  };
}

export const homepageContent = homepageContentForMode(homepageFocus);

export function contactMailto(content = homepageContent) {
  const email = content.primaryContact.email;
  const subject = encodeURIComponent(content.primaryContact.subject);
  return `mailto:${email}?subject=${subject}`;
}
