// data.jsx - Samuel Doane portfolio content (verified; no invented metrics).
// Real media lives in /assets. p.image = hero/card image; p.gallery = case-study
// media (image | video | videoControls | embed | pdf). p.imageFit 'contain'
// shows charts/scorecards/CAD in full; default 'cover' fills the frame.

const PROFILE = {
  name: 'Samuel Doane',
  location: 'Los Angeles, CA',
  positioning: 'Engineer-builder spanning mechanical design, robotics, AI/ML, and quant.',
  micro: 'USC Mechanical Engineering (B.S.) and a M.S. in AI/ML. I take ideas from CAD and machined hardware to RL robots, real-time computer vision, and research-grade quant tooling.',
  short: 'USC Mechanical Engineering (B.S.) and a M.S. in AI/ML. I take ideas from CAD and machined hardware to reinforcement-learning robots, real-time computer vision, and research-grade quantitative tooling, end to end, and I keep the numbers honest.',
  long: [
    "I'm a USC engineer finishing a B.S. in Mechanical Engineering and a M.S. in Artificial Intelligence & Machine Learning. My work lives at the seams between disciplines: I design and machine real hardware, train reinforcement-learning policies and computer-vision systems, and build research-grade quantitative tooling.",
    "That range shows up in what I build: an adjustable pediatric prosthetic that reached the finals of a $125K venture competition; a series-elastic jumping robot where the hardest engineering was catching the simulator cheating its own reward; a research-grade equity backtester with combinatorial purged cross-validation and ~790 tests. I like problems that need both a wrench and a model.",
    "Across three internships I've moved from product development at a Series-C medical-device company, to investment analysis at an early-stage VC, to incoming technology and management consulting, a deliberately cross-disciplinary path. I care about rigor, intellectual honesty, and building things that hold up under scrutiny.",
  ],
  email: 'sjdoane@usc.edu',
  linkedin: 'https://www.linkedin.com/in/samdoane',
  github: 'https://github.com/sjdoane',
  site: 'https://www.samueldoaneportfolio.com',
  disciplines: ['Mechanical', 'Robotics', 'AI/ML', 'Quant'],
  // Résumé PDF to be supplied by Sam; null keeps it a clearly-marked placeholder.
  resume: null,
  headshot: 'assets/headshot.jpg',
  status: 'USC senior · B.S. Mechanical Engineering + M.S. AI/ML · graduating spring 2027',
};

const EDUCATION = {
  school: 'University of Southern California',
  location: 'Los Angeles, CA',
  dates: 'Aug 2023 – May 2027',
  degrees: [
    { d: 'B.S. Mechanical Engineering', gpa: 'GPA 3.93 / 4.0' },
    { d: 'M.S. Artificial Intelligence & Machine Learning', gpa: 'GPA 4.0 / 4.0' },
  ],
  honors: ['Presidential Scholarship', "6× Dean's List"],
  coursework: ['Machine Learning', 'Bio-Inspired Robotics', 'Mechatronics', 'CAD', 'Electronics & Wearables', 'Heat Transfer', 'Fluid Dynamics'],
};

const SKILLS = [
  { group: 'Mechanical & Hardware', items: ['SolidWorks', 'Siemens NX', 'Fusion 360', 'FEA', '3D Printing', 'CNC', 'Lathe', 'Mill', 'Mechatronics', 'Sensor Integration', 'Arduino / C++'] },
  { group: 'AI / ML', items: ['Python', 'PyTorch & Keras', 'Reinforcement Learning (PPO)', 'Computer Vision', 'MuJoCo MJX', 'scikit-learn', 'Transfer Learning'] },
  { group: 'Quant & Analysis', items: ['Backtesting', 'Combinatorial Purged CV', 'Deflated Sharpe / PSR', 'Market-Impact Modeling', 'MATLAB', 'Statistics', 'Design of Experiments', 'NumPy / Polars'] },
  { group: 'Product & Venture', items: ['Product Strategy', 'User Research', 'Human-Centered Design', 'Customer Discovery (NSF I-Corps)', 'Rapid Prototyping', 'Technical Communication'] },
];

const EXPERIENCE = [
  { org: 'Qvest', role: 'Consultant Intern', dates: 'Jun 2026 – Aug 2026', loc: 'Summer 2026',
    incoming: true, context: 'Technology & management consulting.',
    points: ['Incoming summer 2026 internship in technology and management consulting.'],
    tags: ['Consulting', 'Strategy'] },
  { org: 'Safar Partners', role: 'Investment Analyst Intern', dates: 'Jun 2025 – Aug 2025', loc: 'Boston, MA',
    context: 'Early-stage VC (with Link Ventures), >$1B AUM, primarily MIT/Harvard spinouts.',
    points: [
      'Analyzed 100+ early-stage startups across AI, cleantech, life sciences, and robotics (primarily MIT/Harvard spinouts) within >$1B-AUM portfolios, reviewing CEO pitches, ICMs, and technical documentation.',
      "Surfaced 20+ cross-portfolio technical partnerships and benchmarked the fund's online presence, delivering a data-backed SEO strategy to grow deal flow.",
    ], tags: ['Venture', 'Diligence', 'Analysis'] },
  { org: 'Magnolia Medical Technologies', role: 'Product Development Intern', dates: 'Jun 2024 – Aug 2024', loc: 'Seattle, WA',
    context: 'Series-C medical-device company (blood-collection / Steripath); FDA 510(k) environment.',
    points: [
      'Ran PPQ, design-verification, and root-cause tests on 1,000+ blood-collection devices, supporting QA and scale-up readiness in an FDA 510(k) clinical-grade environment.',
      'Ran video-based imaging, fluid-analysis, leak, and tensile tests to validate device performance under stress.',
      'Saved $6,000+ by repairing VATA venipuncture practice kits in-house.',
    ], tags: ['Product Dev', 'Medical Device', 'QA'] },
];

const PROJECTS = [
  // ---------------- FEATURED (6) ----------------
  {
    id: 'adaprosthetics', featured: true, mode: 'dark', name: 'ADAProsthetics',
    tagline: 'Adjustable pediatric prosthetic, venture-pitch finalist',
    year: '2023 – Present', role: 'Co-Leader · Lead CAD & Product Design', org: 'USC MEDesign',
    tags: ['Venture', 'Product', 'Mechanical'],
    tech: ['SolidWorks', 'Fusion 360', 'Machining', 'NSF I-Corps', 'Customer Discovery'],
    panel: 'linear-gradient(150deg,#c9c2b6,#8d8474)', media: 'CAD renders · prototype photos',
    image: 'assets/ADAProsthetics/Full%20assembled%20Prototype.webp',
    gallery: [
      { type: 'image', src: 'assets/ADAProsthetics/AdjustmentDrawing.webp', caption: 'Adjustment-mechanism engineering drawing' },
      { type: 'image', src: 'assets/ADAProsthetics/foot.webp', caption: 'Prosthetic foot with a standard pyramid adapter, machined for testing', fit: 'cover', ratio: '4 / 3' },
      { type: 'image', src: 'assets/ADAProsthetics/FirstPrototype.webp', caption: 'First prototype' },
      { type: 'embed', src: 'https://drive.google.com/file/d/1wIW_wUwBy198mBvNNF8RkcpCVB0TD1QD/preview', caption: 'Finals pitch video, Maseeh Entrepreneurship Prize (Google Drive)', span: true },
      { type: 'pdf', src: 'assets/ADAProsthetics/ADA%20Pitch%20Deck.pdf', label: 'Pitch deck (PDF)', note: 'The deck presented at the finals', span: true },
    ],
    summary: "An adjustable lower-limb prosthetic that grows with pediatric amputees, cutting the cost and clinic visits of constant replacements. One of 6 finalists from 90+ teams in USC's $125K Maseeh Entrepreneurship Prize.",
    problem: 'Kids outgrow prosthetics fast, forcing frequent, costly replacements and prosthetist visits. ADAProsthetics is an adjustable mechanism, compatible with standard industry adapters, that lets a prosthetic grow with the child in 0.13-inch increments, extending usable life and lowering treatment cost.',
    did: [
      'Co-led the team and owned all CAD and product design across two years and multiple prototype iterations: the adjustment mechanisms in SolidWorks and a prosthetic foot in Fusion 360.',
      'Designed and machined functional prototypes on a lathe and drill press; presented to the USC Board of Councilors.',
      'Ran 60+ customer-discovery interviews (patients, prosthetists, manufacturers, angel investors) using NSF I-Corps methodology to validate pain points and product-market fit.',
      'Turned interview findings into the design direction and an ISO-compliant testing plan.',
    ],
    results: [{ v: '1 of 6', l: 'finalists from 90+ teams' }, { v: '$125K', l: 'Maseeh Prize competition' }, { v: '60+', l: 'customer-discovery interviews' }],
    links: [],
  },
  {
    id: 'pit-backtest', featured: true, mode: 'dark', name: 'PIT Backtesting Framework',
    tagline: 'Research-grade U.S.-equity backtester',
    year: '2026', role: 'Sole Author · Personal Project', org: '',
    tags: ['Quant'],
    tech: ['Python', 'Polars', 'NumPy', 'Pydantic', 'mypy-strict', 'pytest'],
    panel: 'linear-gradient(150deg,#3a5a7a,#1d2c3c)', media: 'scorecard screenshots · plots',
    image: 'assets/pit-backtest-scorecard.png', imageFit: 'contain',
    summary: "A U.S.-equity daily-bar backtester for systematic-trading research, now shipped through a full capstone study. It enforces four research-grade properties together: structural point-in-time discipline, a CPCV-first validation API, Almgren-calibrated costs with honest uncertainty bounds, and engine self-validation against SSGA's published SPY total return. The headline is integrity: when a dividend-basis bug inflated the Deflated Sharpe to 0.971, I fixed it and reported the lower, honest 0.955.",
    problem: 'Most open-source backtesters either permit lookahead bias by convention rather than by construction, or overstate returns by under-modeling execution costs. PIT is an opinionated response: an event-driven daily-bar engine where common leakage patterns are hard to write, where the default scorecard is the López de Prado chapter-14 analytics rather than a bare Sharpe, and where the default cost model is Almgren-2005 square-root impact with mandatory sensitivity bands.',
    did: [
      'Built a CPCV-first validation API (purged and embargoed combinatorial cross-validation) with the Probabilistic and Deflated Sharpe Ratios and Minimum Track Record Length as the default scorecard, reproducing the Bailey and López de Prado (2014) worked example to 1e-3.',
      'Built a structural point-in-time data layer (dual-timestamp records, persistent-identifier resolution, point-in-time S&P 500 membership, corporate-action and delisting handling) so common lookahead-leak patterns are hard to write by construction.',
      'Modeled transaction costs with an Almgren-2005 square-root impact model (calibrated to eta 0.142, beta 0.6, gamma 0.314) and required cost-sensitivity bands on every report.',
      'Ran a full 12-1 momentum capstone study end to end, then caught a dividend-basis bug that had inflated the Deflated Sharpe from 0.971 to 0.955 and reported the lower, honest number.',
      'Added deterministic engine self-validation: buy-and-hold SPY reconciles to SSGA\'s published total return within 5 bps annualized, and a 20-year, 500-name backtest runs in under 60 seconds on a laptop.',
    ],
    results: [{ v: '0.955', l: 'honest Deflated Sharpe (corrected from 0.971)' }, { v: '~790', l: 'passing tests · 66 modules · mypy-strict' }, { v: '+494 bps', l: 'survivorship CAGR the point-in-time layer removes' }],
    status: 'v1 is shipped (milestones M1 through M5), including a full 12-1 momentum capstone study; v1.1 is in progress. The aim is methodological integrity over a profitable strategy: the milestone passes whether or not the study clears a Deflated Sharpe of 0.95.',
    links: [{ label: 'GitHub', url: 'https://github.com/sjdoane/pit-backtest' }],
  },
  {
    id: 'sea-quadruped', featured: true, mode: 'light', name: 'SEA Quadruped',
    tagline: 'RL jumping robot with series-elastic knees',
    year: '2026', role: 'Sole Author · AME 456 Capstone', org: 'USC',
    tags: ['Robotics', 'AI/ML'],
    tech: ['MuJoCo MJX', 'Brax PPO', 'JAX', 'Python', 'FEA', '3D Printing'],
    panel: 'linear-gradient(150deg,#2f7d70,#123b35)', media: 'simulation render · CAD · FEA plots',
    image: 'assets/SEA-quadruped/FullCAD.png', imageFit: 'contain',
    gallery: [
      { type: 'video', src: 'assets/SEA-quadruped/ks_15_XM430.mp4', caption: 'Jumping in MuJoCo with the XM430 motor (spring ks = 15)', ratio: '16 / 9' },
      { type: 'video', src: 'assets/SEA-quadruped/ks_5_xl430.mp4', caption: 'Jumping with the weaker XL430 motor (spring ks = 5)', ratio: '16 / 9' },
      { type: 'image', src: 'assets/SEA-quadruped/3Springs.png', caption: 'The three torsion-spring designs' },
      { type: 'image', src: 'assets/SEA-quadruped/FEA_setup.png', caption: 'FEA setup: RBE2 and fixed constraints' },
      { type: 'image', src: 'assets/SEA-quadruped/FEA_Results.png', caption: 'FEA results across the three printed springs' },
      { type: 'pdf', src: 'assets/SEA-quadruped/final_report.pdf', label: 'Final report (PDF)', note: 'Full capstone writeup and results', span: true },
    ],
    summary: 'A ~0.64 kg 3D-printed quadruped that stores energy in torsion-spring "series-elastic" knees to jump with weak servos, taught to jump by a PPO policy in MuJoCo MJX. The headline work: catching and fixing a simulator exploit that was inflating the policy\'s jump height.',
    problem: 'The robot\'s servos (1.4 N·m stall, 5.97 rad/s no-load) are far too weak to launch the body directly; peak jump power exceeds the motor\'s continuous rating several times over. The fix is biological: put a torsion spring in series at each knee, wind energy into it during a crouch, and release it explosively, the same power-amplification trick used by fleas and the MIT Cheetah.',
    did: [
      'Designed the quadruped (MuJoCo MJCF model, leg and series-elastic-spring geometry) and built the full simulation and training pipeline.',
      'Trained a PPO jumping policy in MuJoCo MJX (Brax PPO, 1,024 parallel GPU environments, 50M steps) for repeatable pogo-stick jumps.',
      'Ran FEA on the torsion springs (loads, displacement, spring constant) to size the series-elastic elements.',
      'Diagnosed a simulator reward-hacking exploit (the policy drove joints at 3.46× the motor\'s real no-load speed to fake height) and eliminated it three ways: one-sided backdrive damping, a 20× stronger action-smoothness penalty, and a 5 Hz action low-pass filter.',
    ],
    results: [{ v: '~8.5 cm', l: 'honest open-loop sim jump' }, { v: '3.46×', l: 'reward-hack overspeed caught & fixed' }, { v: '50M', l: 'PPO steps · 1,024 parallel envs' }],
    status: 'Designed and simulation-validated with a sim-to-real deployment plan; the physical robot is not yet fully assembled.',
    links: [{ label: 'GitHub', url: 'https://github.com/sjdoane/SEA-Quadruped' }],
  },
  {
    id: 'dj-mixer', featured: true, mode: 'dark', name: 'Gesture-Controlled DJ Mixer',
    tagline: 'A webcam becomes a contactless DJ controller',
    year: '2025', role: 'Computer-Vision & Gesture Pipeline', org: 'USC SEP Hackathon · a16z-sponsored',
    tags: ['AI/ML', 'Product'],
    tech: ['MediaPipe', 'TypeScript', 'React', 'Tone.js', 'Web Audio'],
    panel: 'linear-gradient(150deg,#5a4fc4,#2a2470)', media: 'demo video/GIF · UI screenshots',
    image: 'assets/sysArchDJ.png', imageFit: 'contain',
    gallery: [
      { type: 'embed', src: 'https://www.loom.com/embed/e117bfbee3cc49d792e500d042e64269', caption: 'Live demo: driving the dual-deck mixer with hand gestures', span: true },
    ],
    summary: 'A browser turns a webcam into a contactless dual-deck DJ controller: MediaPipe tracks both hands, a five-mode gesture state machine classifies postures into DJ commands, and a Web-Audio engine performs real-time multi-stem mixing. I built the computer-vision and gesture-recognition pipeline.',
    problem: 'DJ equipment is expensive and physical. This project turns any laptop with a webcam into a dual-deck mixer: each hand drives a deck, and gestures map to play/pause, tempo, filter sweeps, stem toggles, and crossfades.',
    did: [
      'Built the computer-vision pipeline with Google MediaPipe (two hands, 21 landmarks each) feeding a five-mode gesture state machine (transport, pinch-2D, stems, blend, idle) with priority arbitration.',
      'Engineered a scale-invariant recognition pipeline: hand-relative coordinate normalization, pinch hysteresis, EMA smoothing, and rate limiting for stable, jitter-free real-time control.',
      'Drove real-time dual-deck mixing: multi-stem playback, dynamic EQ filter sweeps (400–8000 Hz), equal-power crossfades, and tempo control (0.8×–1.2×).',
    ],
    results: [{ v: '2 hands', l: '21 landmarks each · MediaPipe' }, { v: '5 modes', l: 'gesture classifier' }, { v: 'real-time', l: 'gesture → audio control' }],
    links: [{ label: 'GitHub (team)', url: 'https://github.com/mhrmich/Tech_Week' }],
  },
  {
    id: 'achordion', featured: true, mode: 'light', name: 'A(Chord)ion',
    tagline: 'An electronic accordion built from scratch',
    year: '2025 – Present', role: 'Mechanical Lead · USC Makers', org: 'USC Makers',
    tags: ['Mechanical', 'Product'],
    tech: ['Siemens NX', 'Sensor Integration', 'Ultrasonic (HC-SR04)', 'Fabrication', 'Embedded'],
    panel: 'linear-gradient(150deg,#d8cbb0,#a8895e)', media: 'CAD renders · build photos · demo video',
    image: 'assets/Achordion/Assembled%20Achordion.png', imageFit: 'cover',
    gallery: [
      { type: 'embed', src: 'https://drive.google.com/file/d/1ha6ESMLFX7uYU3qBKd_YSuFY2RAlHd0d/preview', caption: 'Final presentation: a team skit ending with a live accordion demo (Google Drive)', span: true },
      { type: 'image', src: 'assets/Achordion/internal.png', caption: 'Inside the box: a Qualcomm Rubik Pi, the custom PCB, and wiring; the ultrasonic transducer routes to the other side', fit: 'cover', ratio: '4 / 3' },
      { type: 'image', src: 'assets/Achordion/ButtonSide.png', caption: 'CAD of the button side, printed as two tolerance-matched halves to eliminate overhangs in the print' },
      { type: 'image', src: 'assets/Achordion/OtherSide.png', caption: 'CAD of the opposite side; the two halves assemble together accounting for tolerances' },
    ],
    summary: 'A working electronic accordion built from scratch for under $50: a full mechanical system in Siemens NX, an ultrasonic "bellows" squeeze sensor, and a live demo on Qualcomm hardware. I owned the mechanical design and sensor integration.',
    problem: 'A maker-team instrument that recreates accordion playing without traditional reeds and bellows: sing a pitch and the system detects it and voices a chord, while an ultrasonic sensor reads the squeeze of the bellows to control expression and volume.',
    did: [
      'Designed the complete mechanical system from scratch in Siemens NX (housing, collapsible bellows with a custom hinge, and piano-key assembly), fabricated from ABS and ripstop nylon for under $50.',
      'Led sensor integration: mapped an HC-SR04 ultrasonic transducer into a real-time bellows-velocity → volume-expression pipeline (median filtering, smoothed velocity estimation, hysteresis deadband).',
      'Built modular, detachable housings for PCBs, sensors, and wiring across both sides of the instrument.',
      'Collaborated with EE/CS teammates on system integration (FFT pitch detection) and presented a live demo to a board of Qualcomm engineers.',
    ],
    results: [{ v: '<$50', l: 'in materials, built from scratch' }, { v: 'Qualcomm', l: 'live hardware demo' }],
    links: [{ label: 'GitHub (team)', url: 'https://github.com/frawgmanman/a-chord-ion' }],
  },
  {
    id: 'pendulum-drag', featured: true, mode: 'light', name: 'Pendulum Drag Extraction',
    tagline: 'Drag coefficients from a sub-$100 pendulum, fed into a rocket-reentry sim',
    year: '2026', role: 'USC AME 341b',
    tags: ['Quant', 'Mechanical'], tech: ['MATLAB', 'Nonlinear Least-Squares', 'CAD', '3D Printing', 'Arduino DAQ'],
    panel: 'linear-gradient(150deg,#b8c2cc,#6f7e8c)', media: 'plots · CAD',
    image: 'assets/PendulumDrag/dragresults.png', imageFit: 'contain',
    gallery: [
      { type: 'image', src: 'assets/PendulumDrag/bobshells.png', caption: 'The four 3D-printed bob shells tested (sphere, cylinder, cube, anemometer cup), each with its measured mass, pivot inertia, and reference frontal area.', fit: 'cover', ratio: '4 / 3' },
      { type: 'image', src: 'assets/PendulumDrag/modelfits.png', caption: 'Measured angular position (black) overlaid with all four nested damping models (M1 linear, M2 nonlinear restoring, M3 +Coulomb, M4 +quadratic drag) at amplitudes from 10° to 60°, showing where the small-angle model breaks down.', span: true },
      { type: 'video', src: 'assets/PendulumDrag/rocketsim.mp4', caption: 'Rocket-reentry simulation for all four stabilizer shapes; each panel marks STABILIZED once it settles below 2°. The bowl settles roughly 3x faster than the sphere.', ratio: '16 / 9', span: true },
      { type: 'image', src: 'assets/PendulumDrag/reentrydecay.png', caption: 'Reentry outputs using the pendulum-measured drag coefficients: angle-of-attack trajectory and peak-amplitude decay for all four shapes from a 30° perturbation.' },
      { type: 'image', src: 'assets/PendulumDrag/stabilitybasin.png', caption: 'Basin of attraction in initial-condition space for each stabilizer shape (green stable, red tumble). Higher-drag shapes have visibly larger stable regions.' },
      { type: 'image', src: 'assets/PendulumDrag/CAD_Diagram.png', caption: 'Apparatus CAD and diagram', span: true },
      { type: 'pdf', src: 'assets/PendulumDrag/JP_Presentation_Doane.pdf', label: 'Final presentation (PDF)', note: 'The full deck presented in the final review', span: true },
    ],
    summary: 'A free-decay pendulum that extracts bluff-body drag coefficients by fitting a nested four-model damping hierarchy (MATLAB nonlinear least-squares) to encoder-measured swing decay, landing within 0-15% of literature for three independently-predicted shapes (the sphere is the calibration anchor), then feeds them into a rocket-reentry stabilization simulation. I did the CAD and all 3D printing, the drag-extraction analysis, the reentry simulation, and the writeup.',
    problem: 'A clean, sub-$100 apparatus can recover bluff-body drag if the model captures the right physics. Most teaching setups stop at the small-angle linear model; this one fits a nested hierarchy (linear, nonlinear restoring, Coulomb friction, quadratic aerodynamic drag) so the aerodynamic term is identified rather than assumed, then validates it against literature and applies it downstream.',
    did: [
      'Designed the apparatus and 3D-printed four interchangeable bob shells (sphere, cylinder, cube, anemometer cup), then logged free-decay swing with an encoder DAQ.',
      'Fit a nested four-model damping hierarchy by nonlinear least-squares in MATLAB and recovered drag coefficients for three bluff bodies as independent predictions within 0-15% of Hoerner literature, calibrated against a sphere anchor with under ~1% apparatus error.',
      'Fed the measured coefficients into a rocket-reentry stabilization simulation, mapping each shape\'s basin of attraction and settling time from a perturbation.',
    ],
    results: [{ v: '0-15%', l: 'of literature for 3 independent drag predictions' }, { v: '<1%', l: 'sphere-anchor apparatus error' }, { v: '4 models', l: 'nested damping hierarchy fit' }],
    links: [{ label: 'GitHub', url: 'https://github.com/sjdoane/pendulum-drag-extraction' }],
  },

  // ---------------- MORE WORK (8) ----------------
  {
    id: 'kalshi-bot', featured: false, name: 'Kalshi Trading Bot',
    tagline: 'A live, automated favorite-longshot maker bot', year: '2026', role: 'Personal Project',
    tags: ['Quant', 'AI/ML'], tech: ['Python', 'Kalshi API (RSA-PSS)', 'scikit-learn', 'Backtesting'],
    panel: 'linear-gradient(150deg,#3a5a7a,#1d2c3c)', media: 'scorecard',
    image: 'assets/proj-kalshi.png', imageFit: 'contain',
    summary: 'A live, real-money algorithmic trading bot on Kalshi (a CFTC-regulated prediction market) that harvests a favorite-longshot maker edge, validated out-of-sample across five sports on 72M settled trades, running fully automated with Kelly-fractional sizing and multi-trigger risk kill-switches.',
    results: [{ v: '72M', l: 'settled trades analyzed' }, { v: '5 sports', l: 'out-of-sample validation' }, { v: 'Live', l: 'fully automated, real money' }],
    status: 'Live and fully automated, with out-of-sample validation across five sports, Kelly-fractional position sizing, and multi-trigger kill-switches. Framed honestly: a specific, validated maker edge, not a guarantee.',
    links: [{ label: 'GitHub', url: 'https://github.com/sjdoane/KalshiBot' }],
  },
  {
    id: 'reward-sculptor', featured: false, name: 'Reward Sculptor',
    tagline: 'An LLM agent that rewrites RL reward functions', year: '2025', role: 'Personal Project',
    tags: ['AI/ML'], tech: ['Python', 'Claude API', 'FastAPI', 'React', 'Knowledge Graph'],
    panel: 'linear-gradient(150deg,#5a4fc4,#2a2470)', media: 'UI screenshots',
    image: 'assets/reward-sculptor/pipeline.png', imageFit: 'contain',
    gallery: [
      { type: 'image', src: 'assets/reward-sculptor/reward_authoring.png', caption: 'The rewards panel: a plain-English instruction prompts Claude to rewrite the reward function into a new auditable, diffed version (branching v3 to v4).', span: true },
      { type: 'image', src: 'assets/reward-sculptor/knowledge_graph.png', caption: 'The shared knowledge graph of ~1,400 RL papers, techniques, failure modes, and reward components that grounds every automated edit in cited literature.', span: true },
      { type: 'image', src: 'assets/reward-sculptor/rollout_hipsway.png', caption: 'Frames from a real policy rollout: a trained Unitree G1 humanoid performing the learned lateral hip-sway, the first sub-skill of a "floss" dance.', span: true },
    ],
    summary: 'An autonomous agent that improves reinforcement-learning reward functions in a closed loop (train, diagnose the failure with an LLM, retrieve a fix from a knowledge graph of RL papers, rewrite the reward), where every edit cites the arXiv paper that justified it. A natural-language goal is auto-decomposed into a staged curriculum (stand → squat → launch), wrapped in a FastAPI and React control panel.',
    results: [{ v: '~1,400', l: 'RL papers in the knowledge graph' }, { v: '60+', l: 'tests; verified end-to-end' }],
    links: [{ label: 'GitHub', url: 'https://github.com/sjdoane/RL-Sculptor' }],
  },
  {
    id: 'riskpremia', featured: false, name: 'Risk-Premia Survival Study',
    tagline: 'Ten cross-asset premia, one honest survivor', year: '2026', role: 'Sole Author · Personal Project',
    tags: ['Quant'], tech: ['Python', 'Purged CPCV', 'Deflated Sharpe / PSR', 'Block Bootstrap', 'mypy-strict'],
    panel: 'linear-gradient(150deg,#1d2c3c,#0f1922)', media: 'scorecards · equity curves',
    image: 'assets/riskpremia/defensive_trend_wealth.png', imageFit: 'contain',
    gallery: [
      { type: 'image', src: 'assets/riskpremia/defensive_trend_scorecard.png', caption: 'The one passing study: conditional PSR(0) of the cross-asset defensive-trend strategy across seven windows and sleeves against the 0.95 deflated gate. Full-sample (1.000) and non-overlapping monthly (0.997) pass and survive deflation; the honest caveats in red (2022-onward 0.40, CPCV worst fold 0.72, long-Treasury sleeve 0.85) show the edge is regime-dependent and equity-sleeve-driven.', span: true },
      { type: 'image', src: 'assets/riskpremia/quality_tilt_scorecard.png', caption: 'A disciplined near-miss: a genuine, significant quality premium (Fama-French alpha +0.65%/yr, t = 2.76) whose every deployable bar (net of ETF expense 0.93, post-2010 0.81, deflated for mining 0.35) falls under the 0.95 gate, so it is correctly rejected before any capital is committed.', span: true },
      { type: 'image', src: 'assets/riskpremia/vol_managed_wealth.png', caption: 'An honest null: a real +1.78%/yr gross volatility-timing alpha entirely consumed by a 2.0x retail leverage cap and trading costs (difference PSR 0.46), replicating Cederburg et al. (2020).', span: true },
      { type: 'image', src: 'assets/riskpremia/btc_variance_premium.png', caption: 'BTC 30-day implied volatility (Deribit DVOL) vs subsequently-realized volatility, 2022-2025: implied exceeds realized on ~70% of days, a real variance risk premium (mean +0.087 annualized) that is non-viable to harvest at retail once a short-straddle\'s costs and crash-tail are charged.', span: true },
    ],
    summary: 'A cross-asset hunt for real, harvestable risk premia, run as ten pre-registered studies behind a cost-model-first kill gate (purged CPCV, deflated Sharpe / PSR, block-bootstrap effective sample size). The thesis is the same as my backtester: an honest null is a success, an oversold backtest is a failure. Of ten candidates, exactly one clears the deflated gate.',
    problem: 'Most published premia evaporate once you charge realistic costs and correct for the number of strategies you tried. This project tests crypto and macro premia (BTC and ETH variance, momentum, quality, volatility-managed equity, cross-asset defensive trend) against pre-registered gates (PSR / Deflated Sharpe >= 0.95) with purged CPCV and an honest trial count, so a candidate has to survive deflation before it is called real.',
    did: [
      'Built a reproducible apparatus on free, US-reachable, checksum-pinned data (Binance Vision, Deribit DVOL, Kenneth French factors, the Treasury par curve), reusing the deflated-Sharpe / purged-CPCV / bootstrap validation stack from my pit-backtest project.',
      'Ran ten pre-registered studies cost-model-first: six were honest nulls, one measurement was non-deployable, one was killed before implementation, and exactly one (cross-asset defensive trend) cleared the deflated gate.',
      'Reported the one survivor honestly as a qualified pass: roughly 12x wealth at a 7.1% CAGR and 11.2% max drawdown over 1990-2026, but regime-dependent (the 2022-onward slice and worst CPCV fold fall short of the gate).',
      'Documented disciplined kills: a significant quality premium (Fama-French alpha +0.65%/yr, t = 2.76) rejected net of costs at PSR 0.93, and a real BTC variance premium (mean +0.087/yr) shown non-viable to harvest at retail.',
    ],
    results: [{ v: '1 of 10', l: 'studies clear the deflated gate' }, { v: '7.1% / 11.2%', l: 'survivor CAGR / max drawdown, 1990-2026' }, { v: 'PSR ≥ 0.95', l: 'pre-registered honest gate' }],
    status: 'Capstone synthesis complete: the make-money search is concluded with one honest, qualified survivor. The same gate that accepted it rejected the other nine.',
    links: [{ label: 'GitHub', url: 'https://github.com/sjdoane/riskpremia' }],
  },
  {
    id: 'kinaticlip', featured: false, mode: 'light', name: 'KinetiClip',
    tagline: 'Wearable gait analysis for post-ACL recovery',
    year: '2025', role: 'Hardware & Sensor Fusion', org: 'USC ASBME Makeathon',
    tags: ['Mechanical', 'AI/ML'],
    tech: ['Arduino', 'C++', '9-axis IMU', 'Sensor Fusion', 'SolidWorks', '3D Printing'],
    panel: 'linear-gradient(150deg,#b8c2cc,#6f7e8c)', media: 'device photos · CAD · sensor plots',
    image: 'assets/KinetiClip/solutionslide.png', imageFit: 'contain',
    gallery: [
      { type: 'image', src: 'assets/KinetiClip/plotssummary.png', caption: 'Toe-out angle and gait asymmetry over time, computed by the C++ sensor-fusion pipeline.', span: true },
      { type: 'videoControls', src: 'assets/KinetiClip/walkingvid.MOV', poster: 'assets/KinetiClip/solutionslide.png', caption: 'Live data rollout while walking', ratio: '16 / 9' },
      { type: 'videoControls', src: 'assets/KinetiClip/turningvid.MOV', poster: 'assets/KinetiClip/solutionslide.png', caption: 'Live data rollout while turning the ankle', ratio: '16 / 9' },
      { type: 'pdf', src: 'https://docs.google.com/presentation/d/1C6Y2Ih6sAedcz_bxCMZuKMyUkYALOSsa/preview', label: 'Full presentation (Google Slides)', note: 'Project deck and results', span: true },
    ],
    summary: 'Wearable IMU clips that quantify gait asymmetry and toe-out angle for post-ACL-reconstruction recovery: a low-cost alternative to lab motion capture. Built in a hackathon from 3D-printed housings, 9-axis IMUs, and a C++ sensor-fusion pipeline.',
    problem: 'Gait abnormalities linger 6–12 months after ACL surgery, but lab motion-capture is expensive and inaccessible. KinetiClip gives physical therapists quantitative gait metrics from cheap, clip-on wearable sensors.',
    did: [
      'Built an Arduino-based motion-tracking system with custom 3D-printed clips (both hips and the affected heel), each housing a 9-axis IMU; designed the housings in SolidWorks.',
      'Implemented a C++ sensor-fusion pipeline at 20 Hz: zero-voltage calibration (100-sample averaging), 5-sample moving-average filtering, and ±0.5°/s deadband thresholding to suppress gyro drift.',
      'Computed toe-out angle by numerically integrating the differential angular velocity between heel- and pelvis-mounted gyros, plus a stride-based gait symmetry index.',
    ],
    results: [{ v: '20 Hz', l: 'real-time sensor fusion' }, { v: '9-axis', l: 'IMU per clip (×3)' }, { v: '±0.5°/s', l: 'drift-killing deadband' }],
    links: [],
  },
  {
    id: 'fungi-cnn', featured: false, name: 'Fungi Image Classification',
    tagline: 'Transfer learning across 5 CNN backbones', year: '2025', role: 'USC Coursework',
    tags: ['AI/ML'], tech: ['Keras', 'PyTorch', 'ResNet', 'Transfer Learning'],
    panel: 'linear-gradient(150deg,#2f7d70,#123b35)', media: 'confusion matrices · plots',
    image: 'assets/fungi-classification/samplegrid.png', imageFit: 'contain',
    gallery: [
      { type: 'image', src: 'assets/fungi-classification/trainingcurves.png', caption: 'Cross-entropy loss and accuracy vs epoch for the best model (ResNet50): convergence over 100 epochs with early stopping.', span: true },
      { type: 'image', src: 'assets/fungi-classification/metricsbar.png', caption: 'Precision, recall, F1, and AUC on the held-out test set across all five transfer-learning backbones (ResNet50/101, EfficientNetB0, DenseNet201, VGG16).', span: true },
    ],
    summary: 'A controlled transfer-learning study fine-tuning five ImageNet CNN backbones (ResNet50/101, EfficientNetB0, DenseNet201, VGG16) on ~9,100 microscopic fungi images, with a memory-efficient data pipeline and mixed-precision GPU training. ResNet50 won at test macro-F1 0.89 and AUC 0.98.',
    results: [{ v: '0.8921', l: 'test macro-F1 (ResNet50)' }, { v: '0.9755', l: 'AUC' }],
    links: [{ label: 'GitHub', url: 'https://github.com/sjdoane/image-classification' }],
  },
  {
    id: 'music-dna', featured: false, name: 'Music DNA',
    tagline: 'Full-stack music-taste app with an LLM', year: '2025', role: 'Personal Project',
    tags: ['Product', 'AI/ML'], tech: ['React', 'Vite', 'Claude API', 'Spotify OAuth'],
    panel: 'linear-gradient(150deg,#5a4fc4,#2a2470)', media: 'UI screenshots',
    image: 'assets/music-dna/hero.png', imageFit: 'contain',
    gallery: [
      { type: 'image', src: 'assets/music-dna/music-dna.png', caption: '"Your Music DNA": the app parses a Spotify library export in-browser and renders dominant genres as a weighted pill cloud. The signature visualization.', span: true },
      { type: 'image', src: 'assets/music-dna/recommendations.png', caption: '"Recommended For You": each album card shows a cosine-similarity match score and a "From Sam" badge, surfacing albums from Sam\'s ~2,700-song library that best fit the uploaded profile.', span: true },
      { type: 'image', src: 'assets/music-dna/top-artists.png', caption: '"Your All-Time Favourites": the uploaded library ranked into a top-artist grid with auto-fetched album artwork and liked-song counts.', span: true },
      { type: 'image', src: 'assets/music-dna/shared-songs.png', caption: '"Songs We Both Love": tracks present in both libraries, matched by Spotify track URI and spread across years.', span: true },
      { type: 'image', src: 'assets/music-dna/sams-library.png', caption: '"A note from Sam": the baked-in reference library (2,701 songs) that every visitor\'s taste is compared against.', span: true },
    ],
    summary: 'A React/Vite web app, built as a personal gift, that ingests Spotify/Apple Music library exports (custom multi-format CSV/JSON parsers), computes shared-song overlap and a genre "Music DNA" profile against a 2,700-song library, and recommends albums bridging two listeners\' tastes.',
    results: [{ v: '2,700+', l: 'song library analyzed' }],
    links: [{ label: 'GitHub', url: 'https://github.com/sjdoane/music-dna' }, { label: 'Live site', url: 'https://music-dna.vercel.app' }],
  },
  {
    id: 'powerplant-ml', featured: false, name: 'Power-Plant Energy Regression',
    tagline: 'OLS / KNN regression on 9,568 records', year: '2025', role: 'USC DSCI-552',
    tags: ['Quant', 'AI/ML'], tech: ['Python', 'scikit-learn', 'Regression'],
    panel: 'linear-gradient(150deg,#b8c2cc,#6f7e8c)', media: 'regression plots',
    image: 'assets/powerplant-energy/knn_mse_vs_k.png', imageFit: 'contain',
    gallery: [
      { type: 'image', src: 'assets/powerplant-energy/pairplot.png', caption: '5x5 pairwise scatter matrix of the four ambient inputs and net power PE across all 9,568 records. PE drops almost linearly with ambient temperature (r = -0.95), the single strongest predictor.', span: true },
      { type: 'image', src: 'assets/powerplant-energy/pe_vs_at_linear.png', caption: 'Net power vs ambient temperature with the OLS fit; the cleanest relationship in the data. The full four-feature OLS lands at R^2 = 0.929.' },
      { type: 'image', src: 'assets/powerplant-energy/pe_vs_at_cubic.png', caption: 'The same cloud with a degree-3 polynomial fit, peeling away at the temperature extremes: visual confirmation of the significant cubic term.' },
      { type: 'image', src: 'assets/powerplant-energy/coef_simple_vs_multiple.png', caption: "Each predictor's coefficient in simple vs joint regression. AP collapses from about +1.5 to roughly 0, a clean picture of multicollinearity (AT and V correlate at 0.84).", span: true },
    ],
    summary: 'Built and tuned OLS, polynomial, and KNN regression models on 9,568 power-plant records; a tuned KNN (k=4) reached test MSE 14.07, beating the best linear model, with OLS R² of 0.929.',
    results: [{ v: '0.929', l: 'OLS R²' }, { v: '14.07', l: 'best KNN test MSE (k=4)' }],
    links: [{ label: 'GitHub', url: 'https://github.com/sjdoane/powerplant-energy-ml-regression' }],
  },
  {
    id: 'combat-robot', featured: false, name: 'Combat Robot',
    tagline: 'Fabricated under a strict weight budget', year: '2026 – Present', role: 'USC Advanced Robotics Combat',
    tags: ['Mechanical', 'Robotics'], tech: ['CAD', 'Machining', 'Additive Manufacturing'],
    panel: 'linear-gradient(150deg,#c9c2b6,#8d8474)', media: 'CAD · build photos',
    image: 'assets/BattleBots/fullcad.png', imageFit: 'contain',
    gallery: [
      { type: 'image', src: 'assets/BattleBots/transparenttop.png', caption: 'The assembled CAD with a transparent top, showing the internal electronics housing.', span: true },
      { type: 'image', src: 'assets/BattleBots/ms_topview.png', caption: 'Master-sketch top view with all motor and electronics components placed.' },
      { type: 'image', src: 'assets/BattleBots/ms_sideview.png', caption: 'Master-sketch side view, used to assess space and fit before CAD.' },
    ],
    summary: 'Designed and fabricated a combat robot within a strict weight budget, iterating chassis geometry across multiple prototypes (mill, lathe, additive manufacturing) to balance impact survivability against weight.',
    results: [],
    links: [],
  },
];

const FILTERS = ['All', 'Mechanical', 'Robotics', 'AI/ML', 'Quant', 'Product', 'Venture'];

Object.assign(window, { PROFILE, EDUCATION, SKILLS, EXPERIENCE, PROJECTS, FILTERS });
