// Shared content data — topics.jsx and article.jsx both import
const TOPICS = [
  { slug: "exercise", label: "Exercise", accent: "#c9a961" },
  { slug: "nutrition", label: "Nutrition", accent: "#d9bd7a" },
  { slug: "sleep", label: "Sleep", accent: "#8fb0c4" },
  { slug: "medication", label: "Medication & Supplements", accent: "#a88b5c" },
  { slug: "risks", label: "Risks", accent: "#b05a3c" },
];

const CONTENT_TYPES = [
  { slug: "article", label: "Article" },
  { slug: "podcast", label: "Podcast" },
  { slug: "ama", label: "AMA" },
  { slug: "video", label: "Video" },
  { slug: "newsletter", label: "Newsletter" },
];

const CONTENT = [
  {
    id: "pod-247", contentType: "podcast", topic: "exercise", premium: false,
    title: "The Myostatic Ceiling: why most lifters plateau at intermediate and how to break through",
    excerpt: "A long conversation with Dr. Andrew Huberman on effective volume, failure mechanics, and the accounting problem behind every intermediate plateau.",
    date: "Apr 14, 2026", read: "2 hr 12 min",
    episodeNum: 247, guest: "with Dr. Andrew Huberman", duration: "2h 12m",
    art: "linear-gradient(135deg,#1a1a1e 0%,#2a241a 60%,#3a2e18 100%)",
  },
  {
    id: "pod-246", contentType: "podcast", topic: "nutrition", premium: false,
    title: "Peak week, decoded: sodium, water, carbs and the 72-hour protocol I ran on Kai",
    excerpt: "Kai Greene joins to walk through the exact 72-hour peak-week protocol we ran together, what we measured, and the mistakes most competitors repeat.",
    date: "Apr 07, 2026", read: "1 hr 48 min",
    episodeNum: 246, guest: "with Kai Greene", duration: "1h 48m",
    art: "linear-gradient(135deg,#0f1014 0%,#1c1a20 55%,#2c2220 100%)",
  },
  {
    id: "pod-245", contentType: "podcast", topic: "medication", premium: false,
    title: "Insulin sensitivity in the off-season: the blood panel every serious lifter should run",
    excerpt: "Dr. Gabrielle Lyon on the quarterly panel I run on enhanced athletes — the markers that matter, the ones that don't, and when to intervene.",
    date: "Mar 31, 2026", read: "1 hr 34 min",
    episodeNum: 245, guest: "with Dr. Gabrielle Lyon", duration: "1h 34m",
    art: "linear-gradient(135deg,#131418 0%,#221d16 60%,#3a2c18 100%)",
  },
  {
    id: "pod-244", contentType: "podcast", topic: "exercise", premium: false,
    title: "Why your 'heavy' isn't heavy enough — internal load vs. external load on the bar",
    excerpt: "A solo episode on the distinction between the weight on the bar and the stimulus the muscle actually receives, and the two cues I use to bridge the two.",
    date: "Mar 24, 2026", read: "58 min",
    episodeNum: 244, guest: "Solo episode", duration: "58m",
    art: "linear-gradient(135deg,#0c0d11 0%,#1b1a1d 60%,#2b2620 100%)",
  },
  {
    id: "pod-243", contentType: "podcast", topic: "risks", premium: false,
    title: "Gut health for the enhanced athlete — a conversation 20 years in the making",
    excerpt: "Dr. Mark Hyman and I finally sit down for the conversation we've circled for two decades: gut health in the context of high-volume training and PEDs.",
    date: "Mar 17, 2026", read: "1 hr 21 min",
    episodeNum: 243, guest: "with Dr. Mark Hyman", duration: "1h 21m",
    art: "linear-gradient(135deg,#111216 0%,#1f1a1e 55%,#2a2018 100%)",
  },
  {
    id: "pod-242", contentType: "podcast", topic: "exercise", premium: false,
    title: "Posing is training: what stage-craft teaches about neuromuscular control",
    excerpt: "Dana Linn Bailey on why posing is one of the most underrated training modalities — the neuromuscular control it builds, and how we integrate it off-season.",
    date: "Mar 10, 2026", read: "1 hr 06 min",
    episodeNum: 242, guest: "with Dana Linn Bailey", duration: "1h 06m",
    art: "linear-gradient(135deg,#0e0e12 0%,#1d1a1d 60%,#2e2820 100%)",
  },
  {
    id: "ama-12", contentType: "ama", topic: "exercise", premium: true,
    title: "AMA #12 — Zone 2, VO₂ max, and the minimum effective dose for cardio",
    excerpt: "Listeners ask: how much zone-2 cardio is actually enough if you already lift? George walks through the weekly minimum, how to program it around resistance training, and the common mistake that wastes most of the hour.",
    date: "Mar 18, 2026", read: "38 min",
  },
  {
    id: "sleep-protocol", contentType: "article", topic: "sleep", premium: false,
    title: "The sleep protocol I give every new athlete",
    excerpt: "A short, unsexy set of rules that moves an athlete's HRV inside of three weeks. Why the inputs are simple, and why most people still get them wrong.",
    date: "Mar 11, 2026", read: "9 min",
  },
  {
    id: "creatine-truth", contentType: "article", topic: "medication", premium: true,
    title: "Creatine, finally discussed without the nonsense",
    excerpt: "The most studied supplement on earth is also the one athletes most commonly dose wrong. The loading question, the timing question, and when I actually cycle it off.",
    date: "Mar 04, 2026", read: "12 min",
  },
  {
    id: "pod-47", contentType: "podcast", topic: "nutrition", premium: false,
    title: "Ep. 47 — What a bodybuilder eats in the off-season, and why it's not what you think",
    excerpt: "A full episode on real off-season nutrition. Why calories are almost never the thing I adjust first, and the sequencing that actually drives body composition.",
    date: "Feb 25, 2026", read: "1 hr 12 min",
  },
  {
    id: "stress-risk", contentType: "article", topic: "risks", premium: true,
    title: "The under-measured risk factor: chronic low-grade stress",
    excerpt: "The blood marker I care about more than LDL, and the three behaviors that move it. A case study from a client who fixed the marker without changing his diet.",
    date: "Feb 18, 2026", read: "10 min",
  },
  {
    id: "newsletter-84", contentType: "newsletter", topic: "exercise", premium: false,
    title: "Weekly Rounds №84 — the rep range debate, settled",
    excerpt: "A short field note on why the 5-rep vs 15-rep argument misses the point, and the simple way I split the work across a training week.",
    date: "Feb 15, 2026", read: "5 min",
  },
  {
    id: "vid-glucose", contentType: "video", topic: "nutrition", premium: true,
    title: "Watching my glucose for 30 days — what I changed",
    excerpt: "A 14-minute walk-through of my own CGM data. The three meals I dropped, the one I kept, and the pattern that surprised me more than anything.",
    date: "Feb 08, 2026", read: "14 min",
  },
  {
    id: "ama-11", contentType: "ama", topic: "medication", premium: true,
    title: "AMA #11 — Statins, PCSK9, and the question I get every week",
    excerpt: "Whether to take a statin. When I recommend it, when I don't, and the honest conversation I've had with clients who decided the other way.",
    date: "Feb 01, 2026", read: "42 min",
  },
  {
    id: "sleep-temp", contentType: "article", topic: "sleep", premium: false,
    title: "Bedroom temperature is more important than your mattress",
    excerpt: "On the single environmental variable I'd change before anything else. A short, actionable read from a coach who spent ten years ignoring it himself.",
    date: "Jan 28, 2026", read: "6 min",
  },
  {
    id: "pod-46", contentType: "podcast", topic: "risks", premium: false,
    title: "Ep. 46 — What actually kills most of us, and what doesn't",
    excerpt: "A data-forward conversation with a cardiologist on cause-of-death statistics, and the gap between what people fear and what the numbers say.",
    date: "Jan 21, 2026", read: "1 hr 28 min",
  },
  {
    id: "nutri-protein", contentType: "article", topic: "nutrition", premium: false,
    title: "Protein, without the religion",
    excerpt: "The minimum, the optimum, and the point of diminishing returns. What I put on the plate of a 40-year-old client who isn't trying to get on a stage.",
    date: "Jan 14, 2026", read: "8 min",
  },
  {
    id: "vid-squat", contentType: "video", topic: "exercise", premium: false,
    title: "The squat pattern I fix on 90% of intake calls",
    excerpt: "A ten-minute video on the single mechanical issue that shows up on nearly every intake, and the two cues I use to fix it in one session.",
    date: "Jan 07, 2026", read: "10 min",
  },
];

// Lookup helpers
const topicLabel = (slug) => TOPICS.find(t => t.slug === slug)?.label || slug;
const topicAccent = (slug) => TOPICS.find(t => t.slug === slug)?.accent || "#c9a961";
const ctypeLabel = (slug) => CONTENT_TYPES.find(c => c.slug === slug)?.label || slug;
const contentById = (id) => CONTENT.find(c => c.id === id);

Object.assign(window, { TOPICS, CONTENT_TYPES, CONTENT, topicLabel, topicAccent, ctypeLabel, contentById });
