-
-
-
This is a simplified representation
+
+
+
+ This is a simplified representation
+
+
-
@@ -886,6 +851,43 @@
DOSSIER_HASHES: new Set(['mcap', 'chai', 'quantum_lambda', 'ai_scientist', 'agentic_workforce'])
};
+ /* -----------------------------------------------------------------
+ MOBILE NAV TOGGLE + MOBILE ACCESS / LAB
+ ----------------------------------------------------------------- */
+ const mobileToggle = document.getElementById('mobile-nav-toggle');
+ const mobileNav = document.getElementById('mobile-nav');
+ const accessBtn = document.getElementById('access-btn');
+ const accessBtnMobile = document.getElementById('access-btn-mobile');
+ const accessBtnMobileInline = document.getElementById('access-btn-mobile-inline');
+ const labNavBtn = document.getElementById('lab-nav-btn');
+ const labNavBtnMobile = document.getElementById('lab-nav-btn-mobile');
+
+ if (mobileToggle && mobileNav) {
+ mobileToggle.addEventListener('click', () => {
+ mobileNav.classList.toggle('hidden');
+ });
+ }
+
+ // Reuse existing desktop logic for Access from mobile buttons
+ [accessBtnMobile, accessBtnMobileInline].forEach(btn => {
+ if (btn && accessBtn) {
+ btn.addEventListener('click', (e) => {
+ e.preventDefault();
+ accessBtn.click();
+ if (mobileNav) mobileNav.classList.add('hidden');
+ });
+ }
+ });
+
+ // Reuse existing desktop logic for Lab Navigator from mobile
+ if (labNavBtnMobile && labNavBtn) {
+ labNavBtnMobile.addEventListener('click', (e) => {
+ e.preventDefault();
+ labNavBtn.click();
+ if (mobileNav) mobileNav.classList.add('hidden');
+ });
+ }
+
/* -----------------------------------------------------------------
UTILITY FUNCTIONS (site-wide consistent)
----------------------------------------------------------------- */
@@ -960,31 +962,28 @@
}
}
- const toggleModal = (modal, show) => {
+ function toggleModal(modal, show) {
+ if (!modal) return;
if (show) {
modal.classList.remove('modal-hidden');
modal.classList.add('modal-visible');
- document.body.style.overflow = 'hidden';
- setTimeout(() => {
- modal.focus();
- trapFocus(modal);
- }, 0);
+ trapFocus(modal);
} else {
- modal.classList.remove('modal-visible');
modal.classList.add('modal-hidden');
- document.body.style.overflow = '';
+ modal.classList.remove('modal-visible');
untrapFocus(modal);
}
- };
+ }
/* -----------------------------------------------------------------
- VANTA.JS "NET" BACKGROUND INIT
+ VANTA BACKGROUND INITIALIZATION
----------------------------------------------------------------- */
let vantaEffect = null;
- try {
- if (window.VANTA && typeof VANTA.NET === 'function') {
- vantaEffect = VANTA.NET({
- el: "#vanta-bg",
+ window.addEventListener('DOMContentLoaded', () => {
+ const vantaEl = document.getElementById('vanta-bg');
+ if (vantaEl && window.VANTA && window.VANTA.NET) {
+ vantaEffect = window.VANTA.NET({
+ el: vantaEl,
mouseControls: true,
touchControls: true,
gyroControls: false,
@@ -992,187 +991,83 @@
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
- color: 0x4f46e5,
- backgroundColor: 0x020617,
- points: 12.00,
- maxDistance: 20.00,
- spacing: 15.00
+ color: 0x6366f1,
+ backgroundColor: 0x000000,
+ points: 12.0,
+ maxDistance: 18.0,
+ spacing: 18.0
});
}
- } catch (e) {
- console.warn('Vanta background failed to initialize:', e);
- vantaEffect = null;
- }
+ });
- window.addEventListener('resize', () => {
- if (vantaEffect && typeof vantaEffect.resize === 'function') {
- vantaEffect.resize();
+ window.addEventListener('beforeunload', () => {
+ if (vantaEffect && typeof vantaEffect.destroy === 'function') {
+ vantaEffect.destroy();
}
});
/* -----------------------------------------------------------------
- ORB TILT INTERACTION
+ HERO BUTTONS
----------------------------------------------------------------- */
- const orbContainer = document.getElementById('conscious-orb-container');
- if (orbContainer) {
- orbContainer.addEventListener('mousemove', (e) => {
- const rect = orbContainer.getBoundingClientRect();
- const x = (e.clientX - rect.left) / rect.width;
- const y = (e.clientY - rect.top) / rect.height;
- orbContainer.style.transform =
- `perspective(1000px) rotateX(${(y - 0.5) * 12}deg) rotateY(${(x - 0.5) * 12}deg) scale(1.03)`;
+ const chatBtn = document.getElementById('chat-btn');
+ const learnMoreBtn = document.getElementById('learn-more-btn');
+
+ if (chatBtn) {
+ chatBtn.addEventListener('click', () => {
+ const chatSection = document.getElementById('chat');
+ if (chatSection) {
+ chatSection.scrollIntoView({ behavior: 'smooth' });
+ }
});
+ }
- orbContainer.addEventListener('mouseleave', () => {
- orbContainer.style.transform =
- 'perspective(1000px) rotateX(0) rotateY(0) scale(1)';
+ if (learnMoreBtn) {
+ learnMoreBtn.addEventListener('click', () => {
+ const capabilitiesSection = document.getElementById('capabilities');
+ if (capabilitiesSection) {
+ capabilitiesSection.scrollIntoView({ behavior: 'smooth' });
+ }
});
}
/* -----------------------------------------------------------------
- SIMPLE CONSCIOUSNESS VISUALIZATION
+ WHITEPAPER / ETHICS BUTTONS (ANCHORS TO OTHER PAGES)
----------------------------------------------------------------- */
- const container = document.getElementById('consciousness-visualization');
- if (container) {
- const width = container.clientWidth;
- const height = container.clientHeight;
- const canvas = document.createElement('canvas');
- canvas.width = width;
- canvas.height = height;
- container.appendChild(canvas);
- const ctx = canvas.getContext('2d');
-
- const particles = [];
- const particleCount = 150;
- for (let i = 0; i < particleCount; i++) {
- particles.push({
- x: Math.random() * width,
- y: Math.random() * height,
- size: Math.random() * 3 + 1,
- speedX: Math.random() * 2 - 1,
- speedY: Math.random() * 2 - 1,
- color: `rgba(99, 102, 241, ${Math.random() * 0.5 + 0.1})`
- });
- }
-
- function animate() {
- ctx.clearRect(0, 0, width, height);
-
- for (let i = 0; i < particles.length; i++) {
- for (let j = i + 1; j < particles.length; j++) {
- const dx = particles[i].x - particles[j].x;
- const dy = particles[i].y - particles[j].y;
- const distance = Math.sqrt(dx * dx + dy * dy);
- if (distance < 100) {
- ctx.beginPath();
- ctx.strokeStyle = `rgba(99, 102, 241, ${1 - distance / 100})`;
- ctx.lineWidth = 0.2;
- ctx.moveTo(particles[i].x, particles[i].y);
- ctx.lineTo(particles[j].x, particles[j].y);
- ctx.stroke();
- }
- }
- }
+ const whitePaperBtn = document.getElementById('whitepaper-btn');
+ const ethicsBtn = document.getElementById('ethics-btn');
+ const learnMoreDemoBtn = document.getElementById('learn-more-demo');
- for (let i = 0; i < particles.length; i++) {
- const p = particles[i];
- p.x += p.speedX;
- p.y += p.speedY;
- if (p.x < 0 || p.x > width) p.speedX *= -1;
- if (p.y < 0 || p.y > height) p.speedY *= -1;
- ctx.beginPath();
- ctx.fillStyle = p.color;
- ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
- ctx.fill();
- }
+ if (whitePaperBtn) {
+ whitePaperBtn.addEventListener('click', () => {
+ window.location.href = 'research.html';
+ });
+ }
- requestAnimationFrame(animate);
- }
- animate();
+ if (ethicsBtn) {
+ ethicsBtn.addEventListener('click', () => {
+ window.location.href = 'about.html#safety';
+ });
}
- /* -----------------------------------------------------------------
- SCROLL-BASED ORB SCALING
- ----------------------------------------------------------------- */
- window.addEventListener('scroll', () => {
- const scrollY = window.scrollY;
- const orb = document.querySelector('#conscious-orb-container svg circle');
- if (orb) {
- const scale = 1 + scrollY * 0.0005;
- orb.setAttribute('r', 80 * Math.min(scale, 1.2));
- }
- });
+ if (learnMoreDemoBtn) {
+ learnMoreDemoBtn.addEventListener('click', () => {
+ window.location.href = 'research.html#consciousness';
+ });
+ }
/* -----------------------------------------------------------------
- ACCESS MODAL LOGIC (hash + inline feedback)
+ ACCESS MODAL LOGIC
----------------------------------------------------------------- */
+ const accessBtnMain = document.getElementById('access-btn');
const accessModal = document.getElementById('access-modal');
- const accessBtn = document.getElementById('access-btn');
- const closeModal = document.getElementById('close-access-modal');
- const requestAccessBtn = document.getElementById('request-access-btn');
-
+ const closeAccessModalBtn = document.getElementById('close-access-modal');
const accessForm = document.getElementById('access-form');
const accessFeedback = document.getElementById('access-form-feedback');
- const nameEl = document.getElementById('name');
- const emailEl = document.getElementById('email');
- const institutionEl = document.getElementById('institution');
- const purposeEl = document.getElementById('purpose');
-
- const nameErr = document.getElementById('name-error');
- const emailErr = document.getElementById('email-error');
- const institutionErr = document.getElementById('institution-error');
- const purposeErr = document.getElementById('purpose-error');
-
- function showAccessFeedback(message, tone) {
- if (!accessFeedback) return;
- accessFeedback.classList.remove('hidden');
- accessFeedback.textContent = message;
-
- accessFeedback.classList.remove('border-red-500/40', 'border-green-500/40');
- accessFeedback.classList.remove('text-red-200', 'text-green-200');
- accessFeedback.classList.add('text-gray-200');
-
- if (tone === 'error') {
- accessFeedback.classList.add('border-red-500/40', 'text-red-200');
- } else if (tone === 'success') {
- accessFeedback.classList.add('border-green-500/40', 'text-green-200');
- }
- }
-
- function hideAccessFeedback() {
- if (!accessFeedback) return;
- accessFeedback.classList.add('hidden');
- accessFeedback.textContent = '';
- accessFeedback.classList.remove('border-red-500/40', 'border-green-500/40', 'text-red-200', 'text-green-200');
- }
-
- function setFieldError(inputEl, errorEl, isError) {
- if (!inputEl || !errorEl) return;
- if (isError) {
- errorEl.classList.remove('hidden');
- inputEl.setAttribute('aria-invalid', 'true');
- inputEl.classList.add('border-red-500/60');
- } else {
- errorEl.classList.add('hidden');
- inputEl.removeAttribute('aria-invalid');
- inputEl.classList.remove('border-red-500/60');
- }
- }
-
- function resetAccessErrors() {
- hideAccessFeedback();
- setFieldError(nameEl, nameErr, false);
- setFieldError(emailEl, emailErr, false);
- setFieldError(institutionEl, institutionErr, false);
- setFieldError(purposeEl, purposeErr, false);
- }
-
function openAccessModal(setHashFlag = true) {
- resetAccessErrors();
toggleModal(accessModal, true);
if (setHashFlag) setHash('access');
- setTimeout(() => nameEl && nameEl.focus(), 80);
+ setTimeout(() => accessModal && accessModal.focus(), 0);
}
function closeAccessModal(clearHashFlag = true) {
@@ -1180,65 +1075,90 @@
if (clearHashFlag) clearHashIf('access');
}
- [accessBtn, requestAccessBtn].forEach(btn => {
- if (btn) {
- btn.addEventListener('click', () => openAccessModal(true));
- }
- });
+ if (accessBtnMain) {
+ accessBtnMain.addEventListener('click', () => openAccessModal(true));
+ }
- if (closeModal) closeModal.addEventListener('click', () => closeAccessModal(true));
+ if (closeAccessModalBtn) {
+ closeAccessModalBtn.addEventListener('click', () => closeAccessModal(true));
+ }
if (accessModal) {
accessModal.addEventListener('click', (e) => {
- if (e.target === accessModal) closeAccessModal(true);
+ if (e.target === accessModal) {
+ closeAccessModal(true);
+ }
});
}
if (accessForm) {
- // Clear per-field errors on input
- [nameEl, emailEl, institutionEl, purposeEl].forEach(el => {
- if (!el) return;
- el.addEventListener('input', () => {
- if (el === nameEl) setFieldError(nameEl, nameErr, !nameEl.value.trim());
- if (el === emailEl) setFieldError(emailEl, emailErr, !isValidEmail(emailEl.value.trim()));
- if (el === institutionEl) setFieldError(institutionEl, institutionErr, !institutionEl.value.trim());
- if (el === purposeEl) setFieldError(purposeEl, purposeErr, !purposeEl.value);
- });
- el.addEventListener('change', () => el.dispatchEvent(new Event('input')));
- });
-
accessForm.addEventListener('submit', (e) => {
e.preventDefault();
- resetAccessErrors();
- const name = (nameEl?.value || '').trim();
- const email = (emailEl?.value || '').trim();
- const institution = (institutionEl?.value || '').trim();
- const purpose = (purposeEl?.value || '').trim();
+ const nameInput = document.getElementById('name');
+ const emailInput = document.getElementById('email');
+ const institutionInput = document.getElementById('institution');
+ const purposeSelect = document.getElementById('purpose');
+
+ const nameError = document.getElementById('name-error');
+ const emailError = document.getElementById('email-error');
+ const institutionError = document.getElementById('institution-error');
+ const purposeError = document.getElementById('purpose-error');
+
+ let valid = true;
+
+ // Reset errors
+ [nameError, emailError, institutionError, purposeError].forEach(el => {
+ if (el) el.classList.add('hidden');
+ });
+
+ if (!nameInput.value.trim()) {
+ nameError.classList.remove('hidden');
+ valid = false;
+ }
+
+ if (!isValidEmail(emailInput.value.trim())) {
+ emailError.classList.remove('hidden');
+ valid = false;
+ }
- let ok = true;
+ if (!institutionInput.value.trim()) {
+ institutionError.classList.remove('hidden');
+ valid = false;
+ }
- if (!name) { setFieldError(nameEl, nameErr, true); ok = false; }
- if (!email || !isValidEmail(email)) { setFieldError(emailEl, emailErr, true); ok = false; }
- if (!institution) { setFieldError(institutionEl, institutionErr, true); ok = false; }
- if (!purpose) { setFieldError(purposeEl, purposeErr, true); ok = false; }
+ if (!purposeSelect.value) {
+ purposeError.classList.remove('hidden');
+ valid = false;
+ }
- if (!ok) {
- showAccessFeedback('Please correct the highlighted fields and resubmit.', 'error');
+ if (!valid) {
+ if (accessFeedback) {
+ accessFeedback.className = 'mb-4 text-sm rounded-lg border border-red-500/60 bg-red-500/10 p-3';
+ accessFeedback.textContent = 'Please correct the highlighted fields.';
+ accessFeedback.classList.remove('hidden');
+ }
return;
}
- showAccessFeedback('Request received. You will be contacted after review.', 'success');
+ if (accessFeedback) {
+ accessFeedback.className = 'mb-4 text-sm rounded-lg border border-emerald-500/60 bg-emerald-500/10 p-3';
+ accessFeedback.textContent = 'Your request has been recorded in this demo environment.';
+ accessFeedback.classList.remove('hidden');
+ }
+
accessForm.reset();
});
}
/* -----------------------------------------------------------------
- CONSCIOUSNESS DEMO MODAL LOGIC (hash)
+ CONSCIOUSNESS DEMO MODAL LOGIC
----------------------------------------------------------------- */
const consciousnessModal = document.getElementById('consciousness-modal');
- const consciousnessDemoBtn = document.getElementById('consciousness-demo-btn');
- const closeConsciousnessModal = document.getElementById('close-consciousness-modal');
+ const openConsciousnessBtn = document.getElementById('consciousness-demo-btn');
+ const closeConsciousnessBtn = document.getElementById('close-consciousness-modal');
+ const startDemoBtn = document.getElementById('start-demo');
+ const demoVisualization = document.getElementById('demo-visualization');
function openConsciousnessModal(setHashFlag = true) {
toggleModal(consciousnessModal, true);
@@ -1251,349 +1171,150 @@
if (clearHashFlag) clearHashIf('consciousness-demo');
}
- if (consciousnessDemoBtn) {
- consciousnessDemoBtn.addEventListener('click', () => openConsciousnessModal(true));
+ if (openConsciousnessBtn) {
+ openConsciousnessBtn.addEventListener('click', () => openConsciousnessModal(true));
}
- if (closeConsciousnessModal) {
- closeConsciousnessModal.addEventListener('click', () => closeConsciousnessModalFn(true));
+ if (closeConsciousnessBtn) {
+ closeConsciousnessBtn.addEventListener('click', () => closeConsciousnessModalFn(true));
}
if (consciousnessModal) {
consciousnessModal.addEventListener('click', (e) => {
- if (e.target === consciousnessModal) closeConsciousnessModalFn(true);
- });
- }
-
- /* -----------------------------------------------------------------
- DEMO VISUALIZATION (inside demo modal)
- ----------------------------------------------------------------- */
- const demoContainer = document.getElementById('demo-visualization');
- const startDemoBtn = document.getElementById('start-demo');
- if (startDemoBtn) {
- startDemoBtn.addEventListener('click', () => {
- startDemoBtn.style.display = 'none';
- const demoCanvas = document.createElement('canvas');
- demoCanvas.width = demoContainer.clientWidth;
- demoCanvas.height = demoContainer.clientHeight;
- demoContainer.appendChild(demoCanvas);
- const demoCtx = demoCanvas.getContext('2d');
-
- const demoParticles = [];
- const demoParticleCount = 50;
- for (let i = 0; i < demoParticleCount; i++) {
- demoParticles.push({
- x: Math.random() * demoCanvas.width,
- y: Math.random() * demoCanvas.height,
- size: Math.random() * 4 + 2,
- speedX: Math.random() * 4 - 2,
- speedY: Math.random() * 4 - 2,
- color: `hsl(${Math.random() * 60 + 240}, 80%, 60%)`
- });
- }
-
- function animateDemo() {
- demoCtx.clearRect(0, 0, demoCanvas.width, demoCanvas.height);
-
- for (let i = 0; i < demoParticles.length; i++) {
- for (let j = i + 1; j < demoParticles.length; j++) {
- const dx = demoParticles[i].x - demoParticles[j].x;
- const dy = demoParticles[i].y - demoParticles[j].y;
- const distance = Math.sqrt(dx * dx + dy * dy);
- let show = Math.abs(i - j) === 1 || Math.abs(i - j) === demoParticleCount - 1;
- if (distance < 150 && (Math.random() < 0.01)) show = true;
- if (show) {
- demoCtx.beginPath();
- demoCtx.strokeStyle = `hsla(${Math.random() * 60 + 240}, 80%, 60%, ${1 - distance / 150})`;
- demoCtx.lineWidth = 0.5;
- demoCtx.moveTo(demoParticles[i].x, demoParticles[i].y);
- demoCtx.lineTo(demoParticles[j].x, demoParticles[j].y);
- demoCtx.stroke();
- }
- }
- }
-
- for (let i = 0; i < demoParticles.length; i++) {
- const p = demoParticles[i];
- p.x += p.speedX;
- p.y += p.speedY;
- if (p.x < 0 || p.x > demoCanvas.width) p.speedX *= -1;
- if (p.y < 0 || p.y > demoCanvas.height) p.speedY *= -1;
-
- demoCtx.beginPath();
- demoCtx.fillStyle = p.color;
- demoCtx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
- demoCtx.fill();
-
- const gradient = demoCtx.createRadialGradient(p.x, p.y, 0, p.x, p.y, p.size);
- gradient.addColorStop(0, 'rgba(255,255,255,0.8)');
- gradient.addColorStop(1, p.color);
- demoCtx.fillStyle = gradient;
- demoCtx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
- demoCtx.fill();
- }
-
- requestAnimationFrame(animateDemo);
+ if (e.target === consciousnessModal) {
+ closeConsciousnessModalFn(true);
}
- animateDemo();
});
}
- const learnMoreDemoBtn = document.getElementById('learn-more-demo');
- if (learnMoreDemoBtn) {
- learnMoreDemoBtn.addEventListener('click', () => {
- closeConsciousnessModalFn(true);
- document.getElementById('consciousness').scrollIntoView({ behavior: 'smooth' });
+ if (startDemoBtn && demoVisualization) {
+ startDemoBtn.addEventListener('click', () => {
+ demoVisualization.innerHTML = '
[demo: qualia simulation running]
';
});
}
/* -----------------------------------------------------------------
- CHAT FUNCTIONALITY (static-safe)
+ CHAT CONSOLE LOGIC
----------------------------------------------------------------- */
- const chatForm = document.getElementById('chat-form');
- const chatInput = document.getElementById('chat-input');
- const chatMessages = document.getElementById('chat-messages');
- const typingIndicator = document.getElementById('typing-indicator');
- const sendBtn = document.getElementById('send-btn');
-
- function addMessage(text, isUser = false) {
- const safe = escapeHtml(text);
- const messageDiv = document.createElement('div');
- messageDiv.className = `flex items-start ${isUser ? 'justify-end' : ''}`;
-
- if (!isUser) {
- messageDiv.innerHTML = `
-
-
-
-
- `;
+ const chatLog = document.getElementById('chat-log');
+ const chatFormEl = document.getElementById('chat-form');
+ const chatInputEl = document.getElementById('chat-input');
+ const clearChatBtn = document.getElementById('clear-chat');
+
+ function appendMessage(role, text) {
+ if (!chatLog) return;
+ const wrapper = document.createElement('div');
+ wrapper.className = 'chat-message mb-3';
+ const roleLabel = document.createElement('div');
+ roleLabel.className = 'text-xs text-gray-500 mb-1';
+ roleLabel.textContent = role === 'user' ? 'You' : 'SI · simulated';
+ const bubble = document.createElement('div');
+ bubble.className = 'inline-block px-3 py-2 rounded-xl ' +
+ (role === 'user'
+ ? 'bg-indigo-600/80 border border-indigo-500/60 text-white'
+ : 'bg-gray-900/80 border border-gray-800 text-gray-200');
+ bubble.textContent = text;
+ wrapper.appendChild(roleLabel);
+ wrapper.appendChild(bubble);
+ chatLog.appendChild(wrapper);
+ chatLog.scrollTop = chatLog.scrollHeight;
+ }
+
+ function simulateSIResponse(userText) {
+ const lower = userText.toLowerCase();
+ let response;
+
+ if (!lower.trim()) {
+ response = "I need a bit more content to respond meaningfully. Try asking about capabilities, safety, or research.";
+ } else if (lower.includes('safety') || lower.includes('safe')) {
+ response = "In this demo, SI is constrained by a conservative safety envelope: no external actions, no access to private data, and refusal on harmful or deceptive requests.";
+ } else if (lower.includes('conscious')) {
+ response = "Consciousness here is treated as a research hypothesis: we build explicit self-models, track internal state across time, and test self-reports against behavior.";
+ } else if (lower.includes('mcap')) {
+ response = "MCAP is framed as a principle for building minimal causal abstractions of complex systems—useful for forecasting and decision-making with interpretable structure.";
+ } else if (lower.includes('chai')) {
+ response = "CHAI is a program focused on probabilistic forecasting and regime modeling, designed to be falsifiable with pre-registered evaluation plans.";
+ } else if (lower.includes('quantum')) {
+ response = "Quantum Lambda explores decision-making in high-frequency, high-dimensional environments, with emphasis on stability, monitoring, and heavy-tail control.";
} else {
- messageDiv.innerHTML = `
-
- `;
+ response = "In this simulated console, I cannot access external tools or data. I can, however, help reason about capabilities, safety, or how such a system should be evaluated.";
}
- chatMessages.appendChild(messageDiv);
- chatMessages.scrollTop = chatMessages.scrollHeight;
+ appendMessage('assistant', response);
}
- function setChatBusy(isBusy) {
- if (!typingIndicator || !sendBtn) return;
- if (isBusy) {
- typingIndicator.classList.remove('hidden');
- sendBtn.disabled = true;
- sendBtn.classList.add('opacity-80', 'cursor-not-allowed');
- } else {
- typingIndicator.classList.add('hidden');
- sendBtn.disabled = false;
- sendBtn.classList.remove('opacity-80', 'cursor-not-allowed');
- }
- }
-
- async function callServerChat(userMessage) {
- // This would be a server endpoint in production
- // For static demo, always fall back to local response
- throw new Error('Server endpoint not available in static demo');
- }
-
- function localDemoResponse(userMessage) {
- const msg = (userMessage || '').toLowerCase();
- if (msg.includes('mcap')) {
- return "MCAP acknowledged. Provide: (1) the abstraction mapping you propose, (2) how you test causal fidelity, (3) baseline comparisons. I will draft a minimal evaluation plan next.";
- }
- if (msg.includes('chai')) {
- return "CHAI acknowledged. Specify assets, horizon, labeling rules, and walk-forward protocol. Then we can define leakage controls and calibration metrics.";
- }
- if (msg.includes('quantum lambda')) {
- return "Quantum Lambda acknowledged. The first gate is microstructure realism: latency budget, fill model, slippage assumptions, and risk limits must be explicit before discussing performance.";
- }
- return "Acknowledged. State (a) objective, (b) constraints, (c) what evidence you have today. I will respond with a minimal next experiment.";
- }
-
- async function respondToChat(userMessage) {
- setChatBusy(true);
- try {
- const reply = await callServerChat(userMessage);
- addMessage(reply, false);
- } catch (err) {
- addMessage(localDemoResponse(userMessage), false);
- } finally {
- setChatBusy(false);
- }
- }
-
- if (chatForm) {
- chatForm.addEventListener('submit', (e) => {
+ if (chatFormEl && chatInputEl) {
+ chatFormEl.addEventListener('submit', (e) => {
e.preventDefault();
- const message = (chatInput?.value || '').trim();
- if (!message) return;
-
- addMessage(message, true);
- chatInput.value = '';
- respondToChat(message);
- });
- }
-
- const chatBtn = document.getElementById('chat-btn');
- if (chatBtn) {
- chatBtn.addEventListener('click', () => {
- window.location.href = 'chat.html';
+ const text = chatInputEl.value;
+ if (!text.trim()) return;
+ appendMessage('user', text);
+ chatInputEl.value = '';
+ simulateSIResponse(text);
});
}
- const learnMoreBtn = document.getElementById('learn-more-btn');
- if (learnMoreBtn) {
- learnMoreBtn.addEventListener('click', () => {
- window.location.href = 'about.html';
- });
- }
-
- const whitePaperBtn = document.getElementById('white-paper-btn');
- if (whitePaperBtn) {
- whitePaperBtn.addEventListener('click', () => {
- // In a real site, this would open a PDF or external link
- // For demo, we'll show a message
- const modal = document.createElement('div');
- modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm modal modal-visible';
- modal.innerHTML = `
-
-
-
-
-
White Paper
-
-
-
The SI White Paper is available to qualified researchers upon request. Please use the Access form to request documentation.
-
-
-
- `;
- document.body.appendChild(modal);
-
- const closeBtn = modal.querySelector('.close-white-paper');
- closeBtn.addEventListener('click', () => {
- toggleModal(modal, false);
- setTimeout(() => modal.remove(), 300);
- });
- modal.addEventListener('click', (e) => {
- if (e.target === modal) {
- toggleModal(modal, false);
- setTimeout(() => modal.remove(), 300);
- }
- });
- toggleModal(modal, true);
- });
- }
-
- const ethicsBtn = document.getElementById('ethics-btn');
- if (ethicsBtn) {
- ethicsBtn.addEventListener('click', () => {
- // Similar to white paper button
- const modal = document.createElement('div');
- modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm modal modal-visible';
- modal.innerHTML = `
-
-
-
-
-
Ethical Framework
-
-
-
The full ethical framework documentation outlines alignment protocols, safety measures, and governance structures. Available to research partners upon request.
-
-
-
- `;
- document.body.appendChild(modal);
-
- const closeBtn = modal.querySelector('.close-ethics');
- closeBtn.addEventListener('click', () => {
- toggleModal(modal, false);
- setTimeout(() => modal.remove(), 300);
- });
- modal.addEventListener('click', (e) => {
- if (e.target === modal) {
- toggleModal(modal, false);
- setTimeout(() => modal.remove(), 300);
- }
- });
- toggleModal(modal, true);
+ if (clearChatBtn && chatLog) {
+ clearChatBtn.addEventListener('click', () => {
+ chatLog.innerHTML = '';
});
}
/* -----------------------------------------------------------------
- SUPER BOLD & LARGE HEARTBEAT NEURAL ANIMATION
+ NEURAL CANVAS VISUALIZATION
----------------------------------------------------------------- */
- const neuralCanvas = document.getElementById('orb-neural-canvas');
- const neuralCtx = neuralCanvas.getContext('2d');
+ const neuralCanvas = document.getElementById('neural-canvas');
+ let neuralCtx = null;
function resizeNeuralCanvas() {
- if (neuralCanvas && neuralCanvas.parentElement) {
- neuralCanvas.width = neuralCanvas.parentElement.clientWidth;
- neuralCanvas.height = neuralCanvas.parentElement.clientHeight;
+ if (!neuralCanvas) return;
+ const rect = neuralCanvas.getBoundingClientRect();
+ neuralCanvas.width = rect.width * window.devicePixelRatio;
+ neuralCanvas.height = rect.height * window.devicePixelRatio;
+ neuralCtx = neuralCanvas.getContext('2d');
+ if (neuralCtx) {
+ neuralCtx.setTransform(window.devicePixelRatio, 0, 0, window.devicePixelRatio, 0, 0);
}
}
- resizeNeuralCanvas();
- window.addEventListener('resize', () => {
+
+ window.addEventListener('resize', resizeNeuralCanvas);
+ if (neuralCanvas) {
resizeNeuralCanvas();
- setupNeurons();
- });
+ }
+
+ function drawNeuralActivity(timestamp) {
+ if (!neuralCanvas || !neuralCtx) return;
+
+ const { width: w, height: h } = neuralCanvas.getBoundingClientRect();
+ neuralCtx.clearRect(0, 0, w, h);
+
+ const t = (timestamp || 0) / 1000;
+ const neuronCount = 8;
+ const radius = Math.min(w, h) * 0.32;
- const neuronCount = 22;
- const neurons = [];
- function setupNeurons() {
- neurons.length = 0;
- const w = neuralCanvas.width;
- const h = neuralCanvas.height;
const cx = w / 2;
const cy = h / 2;
- const r = Math.min(w, h) * 0.475;
+
+ // Base glow
+ const radialGrad = neuralCtx.createRadialGradient(
+ cx, cy, 0,
+ cx, cy, radius * 1.4
+ );
+ radialGrad.addColorStop(0, 'rgba(15,23,42,0.95)');
+ radialGrad.addColorStop(1, 'rgba(2,6,23,0.95)');
+ neuralCtx.fillStyle = radialGrad;
+ neuralCtx.fillRect(0, 0, w, h);
+
+ const neurons = [];
for (let i = 0; i < neuronCount; i++) {
- const angle = (Math.PI * 2 * i) / neuronCount;
- neurons.push({
- x: cx + r * Math.cos(angle),
- y: cy + r * Math.sin(angle),
- phase: Math.random() * Math.PI * 2
- });
+ const angle = (i / neuronCount) * Math.PI * 2 + Math.sin(t + i) * 0.2;
+ const r = radius * (0.85 + 0.12 * Math.sin(t * 1.3 + i));
+ const x = cx + Math.cos(angle) * r;
+ const y = cy + Math.sin(angle) * r;
+ neurons.push({ x, y });
}
- }
- setupNeurons();
- function drawNeuralActivity(time) {
- if (!neuralCanvas || !neuralCtx) return;
-
- const w = neuralCanvas.width;
- const h = neuralCanvas.height;
- neuralCtx.clearRect(0, 0, w, h);
-
- const bpm = 54;
- const period = 60000 / bpm;
- const t = (time % period) / period;
- const beat = Math.pow(Math.sin(Math.PI * t), 2.4);
-
- neurons.forEach((n) => {
- const size = (w + h) / 35 + 38 * beat;
- neuralCtx.beginPath();
- neuralCtx.arc(n.x, n.y, size, 0, Math.PI * 2);
- neuralCtx.fillStyle = `rgba(139,92,246,${0.25 + 0.28 * beat})`;
- neuralCtx.shadowColor = "#ec4899";
- neuralCtx.shadowBlur = 38 + 90 * beat;
- neuralCtx.fill();
- neuralCtx.shadowBlur = 0;
- });
+ const beat = 0.5 + 0.25 * Math.sin(t * 2.0);
for (let i = 0; i < neuronCount; i++) {
for (let j = i + 1; j < neuronCount; j++) {
@@ -1648,7 +1369,6 @@
LAB NAVIGATOR (hash + active node + dossier)
----------------------------------------------------------------- */
const labNav = document.getElementById('lab-navigator');
- const labNavBtn = document.getElementById('lab-nav-btn');
const labNavClose = document.getElementById('lab-nav-close');
const DOSSIERS = {
@@ -1691,26 +1411,21 @@
Technical notes contain evaluation protocols, assumptions, and evidence capsules. Available to qualified researchers.