import { promises as fs } from 'fs';
import path from 'path';

export const dynamic = 'force-static';

export default async function ReadmePage() {
  const filePath = path.join(process.cwd(), 'README.md');
  let content = 'README not found.';
  try {
    content = await fs.readFile(filePath, 'utf-8');
  } catch (e) {
    content = 'README not found.';
  }
  return (
    <div className="max-w-3xl mx-auto px-4 sm:px-6 py-8">
      <h1 className="font-display text-3xl font-semibold text-forest-deep mb-4">📖 README</h1>
      <pre className="gh-card whitespace-pre-wrap text-sm leading-6 text-ink p-5">
        {content}
      </pre>
    </div>
  );
}
