content: [build]
    # Directory to change to before starting a build
    base = "rUv-swarm-course/gemini-website-improvement"
    
    # Directory that contains the deploy-ready HTML files and assets generated by the build
    publish = "dist"
    
    # Default build command
    command = "npm run build"
  
  [build.environment]
    # Node.js version for build
    NODE_VERSION = "18"
    
    # Enable experimental features if needed
    NODE_OPTIONS = "--max-old-space-size=4096"
  
  [[redirects]]
    # Handle client-side routing - redirect all routes to index.html
    from = "/*"
    to = "/index.html"
    status = 200
  
  [[headers]]
    # Security headers for the application
    for = "/*"
    [headers.values]
      # Security headers
      X-Frame-Options = "DENY"
      X-XSS-Protection = "1; mode=block"
      X-Content-Type-Options = "nosniff"
      Referrer-Policy = "strict-origin-when-cross-origin"
      # Content Security Policy - adjusted for D3.js and Three.js
      Content-Security-Policy = "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self'; worker-src 'self' blob:;"
  
  [[headers]]
    # Cache static assets
    for = "/assets/*"
    [headers.values]
      Cache-Control = "public, max-age=31536000, immutable"
  
  [[headers]]
    # Cache JavaScript and CSS files
    for = "*.js"
    [headers.values]
      Cache-Control = "public, max-age=31536000, immutable"
  
  [[headers]]
    for = "*.css"
    [headers.values]
      Cache-Control = "public, max-age=31536000, immutable"
  
  # Deploy preview configuration
  [context.deploy-preview]
    command = "npm run build"
  
  # Branch deploy configuration
  [context.branch-deploy]
    command = "npm run build"
  
  # Development context
  [context.dev]
    command = "npm run dev"
  
  # Error page configuration
  [[error_pages]]
    from = "/404"
    to = "/index.html"
    status = 404