import type { Metadata } from "next";
import Link from "next/link";
import SiteHeader from "../components/SiteHeader";
import {
  AMAZON_AUTHOR_URL,
  PERSON_ID,
  SITE_URL,
  WEBSITE_ID,
  overcomersEntity,
  personEntity,
  websiteEntity,
} from "../lib/site";

export const metadata: Metadata = {
  title: {
    absolute: "About Toshin Samuels | Fraud Education & Second Chances",
  },
  description:
    "Learn about Toshin Samuels, an author, fraud-prevention educator, second-chance activist, and Founder and President of Overcomers Society.",
  alternates: { canonical: "/about" },
  openGraph: {
    title: "About Toshin Samuels | Fraud Education & Second Chances",
    description:
      "Crisis resources, fraud education, practical how-to guides, and second-chance advocacy from Toshin Samuels.",
    url: `${SITE_URL}/about`,
    siteName: "Toshin Samuels",
    type: "profile",
  },
  twitter: {
    card: "summary",
    title: "About Toshin Samuels | Fraud Education & Second Chances",
    description:
      "Crisis resources, fraud education, practical how-to guides, and second-chance advocacy from Toshin Samuels.",
  },
};

const books = [
  {
    number: "Book One",
    title: "The Scam-Resistant Mind",
    subtitle:
      "How Scammers Think—and How to Protect Your Money, Identity, and Digital Life",
    description:
      "Scam recognition, manipulation, independent verification, identity protection, and practical steps for interrupting pressure before it reaches an irreversible action.",
  },
  {
    number: "Book Two",
    title: "Money Under Guard",
    subtitle:
      "How to Protect Your Money and Assets from Fraud, Lawsuits, Liability, Exploitation, and Financial Disaster",
    description:
      "Practical financial safeguards designed to limit what one bad decision, compromised account, period of vulnerability, or unexpected event can reach.",
  },
  {
    number: "Book Three",
    title: "Identity Fortress",
    subtitle:
      "How to Protect Your Identity, Credit, Accounts, Documents, Benefits, and Personal Data from Identity Theft and Account Takeover",
    description:
      "A system for preventing, detecting, containing, and recovering from identity theft and account takeover across the records and recovery channels that define a modern identity.",
  },
  {
    number: "Book Four",
    title: "Digital Self-Defense",
    subtitle:
      "How to Protect Your Devices, Accounts, Data, Home Network, and Online Life from Hacking, Malware, Phishing, and Cyberattacks",
    description:
      "Practical safeguards for devices, accounts, authentication, home networks, backups, privacy, and recovery when digital security fails.",
  },
  {
    number: "Book Five",
    title: "Stop the Loss",
    subtitle:
      "The Emergency Playbook for Scams, Identity Theft, Account Takeovers, Cyberattacks, and Financial Loss",
    description:
      "An emergency-response playbook for stopping additional damage, securing accounts and identity, preserving evidence, reporting incidents, and beginning recovery after a scam, cyberattack, or financial loss.",
  },
];

const bookSeriesEntity = {
  "@type": "BookSeries",
  "@id": `${SITE_URL}/about#inside-the-mind-of-the-confidence-man`,
  name: "Inside the Mind of the Confidence Man",
  author: { "@id": PERSON_ID },
  url: AMAZON_AUTHOR_URL,
  hasPart: books.map((book, index) => ({
    "@type": "Book",
    "@id": `${SITE_URL}/about#confidence-man-book-${index + 1}`,
    name: book.title,
    alternateName: book.subtitle,
    position: index + 1,
    author: { "@id": PERSON_ID },
    isPartOf: {
      "@id": `${SITE_URL}/about#inside-the-mind-of-the-confidence-man`,
    },
    datePublished: "2026",
    inLanguage: "en-US",
  })),
};

const structuredData = {
  "@context": "https://schema.org",
  "@graph": [
    websiteEntity,
    personEntity,
    overcomersEntity,
    bookSeriesEntity,
    {
      "@type": "ProfilePage",
      "@id": `${SITE_URL}/about#profile-page`,
      url: `${SITE_URL}/about`,
      name: "About Toshin Samuels",
      description:
        "The current public-service work, commitments, published educational guides, and nonprofit leadership of Toshin Samuels.",
      isPartOf: { "@id": WEBSITE_ID },
      mainEntity: { "@id": PERSON_ID },
      about: [
        { "@id": PERSON_ID },
        { "@id": "https://overcomerssociety.org/#organization" },
      ],
    },
  ],
};

const commitments = [
  {
    title: "Crisis and Recovery Resources",
    description:
      "Making it easier for people facing addiction, mental-health crises, abuse, exploitation, grief, fraud, housing instability, and other difficult chapters to find established organizations and credible places to begin.",
  },
  {
    title: "Fraud Education and Awareness",
    description:
      "Creating practical books, guides, and public resources that help people recognize manipulation, slow down before an irreversible decision, protect their money and identity, and know what to do after something has happened.",
  },
  {
    title: "How-To Guides",
    description:
      "Creating free, understandable guidance that helps people publish, work, learn, build, manage important records, use technology, protect their reputations, and approach major life decisions with fewer barriers and fewer costly mistakes.",
  },
];

export default function AboutPage() {
  return (
    <main>
      <SiteHeader />
      <script
        type="application/ld+json"
        dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
      />

      <section className="hero">
        <div className="hero-inner">
          <p className="section-label">
            Crisis Resources • Fraud Education • How-To Guides
          </p>
          <h1>Prevent harm. Find help. Keep writing the next chapter.</h1>
          <p className="hero-copy">
            ToshinSamuels.com is the personal public-service website of Toshin
            Samuels—an author, fraud-prevention educator, second-chance
            activist, and Founder and President of Overcomers Society.
          </p>
          <p className="hero-copy">
            I built this site to make practical fraud education and trustworthy
            crisis, recovery, and support resources easier to find. It is also
            a record of the work I am doing today to help people protect
            themselves, find a credible starting point when life becomes
            overwhelming, and continue forward with dignity, truth,
            accountability, and hope.
          </p>
          <p className="hero-question">
            I believe in second chances that do not erase accountability—and
            accountability that does not erase human potential.
          </p>
        </div>
      </section>

      <section id="about" className="letter-section section">
        <article className="letter-card">
          <p className="section-label">Who I Am Today</p>
          <h2>What we learn should become useful to someone else.</h2>
          <p className="large-copy">
            My past is part of why this work matters to me, but it is not the
            whole of who I am.
          </p>
          <p>
            I know that choices I made harmed other people. I also believe
            accountability should change what a person does next. For me, that
            means using what I have learned to help prevent harm, make
            trustworthy information easier to find, connect people with
            credible resources, and build institutions that recognize both
            responsibility and the human capacity for continued growth.
          </p>
          <p>My work today brings together three commitments:</p>

          <div className="commitment-grid" aria-label="Three commitments">
            {commitments.map((commitment, index) => (
              <article className="commitment-card" key={commitment.title}>
                <span className="commitment-number" aria-hidden="true">
                  {String(index + 1).padStart(2, "0")}
                </span>
                <div className="commitment-content">
                  <h3>{commitment.title}</h3>
                  <p>{commitment.description}</p>
                </div>
              </article>
            ))}
          </div>

          <p style={{ marginTop: "2rem" }}>
            Second-chance advocacy runs through all three commitments. People
            should be able to find help, learn what they were never taught,
            protect themselves, and build another chapter without being
            permanently reduced to the one that came before.
          </p>
          <p>
            This website is one part of that commitment. Overcomers Society is
            the larger institution being built from it.
          </p>

          <div className="about-signature">
            <p><strong>Toshin Samuels</strong></p>
            <p>Founder and President, Overcomers Society</p>
          </div>
        </article>
      </section>

      <section id="about-books" className="promise-section section">
        <div className="narrow">
          <p className="section-label">Long-Form Public-Protection Guides</p>
          <h2>Inside the Mind of the Confidence Man</h2>
          <p className="large-copy">
            I wrote this series to make practical fraud prevention, financial
            protection, identity security, and recovery information easier to
            understand and use.
          </p>
          <p>
            The books are listed here as part of the educational work behind
            this public-service website—not as a storefront. ToshinSamuels.com
            does not sell the books or process payments.
          </p>

          <div className="quiet-book-grid personal-book-grid">
            {books.map((book) => (
              <article className="quiet-book-card" key={book.title}>
                <p className="book-number">{book.number}</p>
                <h3>{book.title}</h3>
                <p className="book-subtitle">{book.subtitle}</p>
                <p>{book.description}</p>
              </article>
            ))}
          </div>

          <div className="quiet-note">
            <p>
              These five books are independently published by Toshin Samuels
              and are separate from publications issued by Overcomers Society
              Press. Each title is currently available as a $0.99 Kindle
              edition and is included with Kindle Unlimited for eligible
              members—the closest the platform allows me to make the complete
              series to free while keeping it available there.
            </p>
            <p>
              <a
                href={AMAZON_AUTHOR_URL}
                target="_blank"
                rel="me noopener noreferrer"
                className="text-link"
              >
                View Toshin Samuels on Amazon Author Central ↗
              </a>
            </p>
          </div>
        </div>
      </section>

      <section id="about-work" className="letter-section section">
        <article className="letter-card">
          <p className="section-label">The Work Behind the Words</p>
          <h2>
            Education should lead to protection. Resources should lead to help.
            Accountability should lead to different choices.
          </h2>
          <p className="large-copy">
            The books, how-to guides, crisis resources, Humanity&apos;s Living
            Autobiography, and Overcomers Society are different expressions of
            one underlying purpose.
          </p>
          <p>To reduce preventable harm.</p>
          <p>To make credible help easier to find.</p>
          <p>To help people learn systems that were never clearly explained.</p>
          <p>To preserve the truth without denying the possibility of growth.</p>
          <p>To help people protect themselves and one another.</p>
          <p>And to build a world where no one is forced to overcome alone.</p>

          <div className="about-signature">
            <p><strong>Toshin Samuels</strong></p>
            <p>Founder and President, Overcomers Society</p>
          </div>

          <div style={{ display: "flex", flexWrap: "wrap", gap: "1rem", marginTop: "2rem" }}>
            <a
              href="https://overcomerssociety.org/"
              target="_blank"
              rel="noopener noreferrer"
              className="primary-button"
            >
              Visit Overcomers Society
            </a>
            <Link href="/toshin-charles-samuels" className="primary-button">
              Read the Full Record
            </Link>
          </div>
        </article>
      </section>

      <section className="story-transition">
        <p>No story is finished until the author stops writing.</p>
      </section>
    </main>
  );
}
