---
import ArticleList from '../components/ArticleList.astro';
import Page from '../layouts/Page.astro';
import {
  absoluteUrl,
  buildPersonJsonLd,
  getPublishedPosts,
  optimizeOgImage,
  site,
} from '../lib/site';
import defaultOg from '../assets/og-default.jpg';

const posts = await getPublishedPosts();
const startingPoints = posts
  .filter((post) => post.data.audience === 'recruiter-relevant')
  .sort((a, b) => (a.data.featuredOrder ?? 99) - (b.data.featuredOrder ?? 99))
  .slice(0, 4);

const personImage = await optimizeOgImage(defaultOg);

// Canonical Person JSON-LD. Other pages reference this entity by @id.
const personJsonLd = buildPersonJsonLd({
  jobTitle: 'Software Engineer',
  description:
    'Software engineer with an MSc in Computer Science working on AI/ML systems, web platforms, graphics, simulations, and tools.',
  knowsAbout: [
    'Software architecture',
    'AI/ML systems',
    'Web platforms',
    'Computer graphics',
    'Simulations',
    'Data visualization',
  ],
  image: absoluteUrl(personImage.src),
  mainEntityOfPage: absoluteUrl('/about/'),
});
---

<Page
  title="About"
  description="A direct summary of my background, technical interests, and best starting points."
  jsonLd={personJsonLd}
  ogType="profile"
>
  <div class="prose">
    <p>
      I am Andras Schmelczer, a software engineer with an MSc in Computer Science and more
      than six years of professional engineering experience. My work spans AI/ML systems,
      web platforms, graphics, simulations, and tools, and I like projects where
      architecture, constraints, and product usefulness all matter.
    </p>
    <p>
      I am especially interested in architecting and building large-scale systems,
      particularly around AI/ML. In my own time I also return to shaders, data
      visualization, simulations, and occasionally microcontrollers. The
      <a href="/articles/">articles</a> and <a href="/projects/">projects</a> indexes are the
      best way to understand that range; the CV and contact links are here when a direct summary
      is more useful.
    </p>
  </div>

  <section class="about-section facts">
    <h2 id="quick-facts">Quick Facts</h2>
    <dl>
      <div>
        <dt>Focus</dt>
        <dd>
          Software systems, AI deployment, architecture, graphics, data visualization
        </dd>
      </div>
      <div>
        <dt>Education</dt>
        <dd>MSc in Computer Science</dd>
      </div>
      <div>
        <dt>Contact</dt>
        <dd>
          <address>
            <a href={`mailto:${site.email}`}>{site.email}</a>
          </address>
        </dd>
      </div>
      <div>
        <dt>Links</dt>
        <dd class="about-links">
          <a href={site.cv} rel="noopener">CV</a>
          <a href={site.github} rel="noopener me">GitHub</a>
          <a href={site.linkedin} rel="noopener me">LinkedIn</a>
        </dd>
      </div>
    </dl>
  </section>

  <section class="about-section">
    <div class="section-heading">
      <h2 id="best-starting-points">Best Starting Points</h2>
      <a href="/articles/">Browse all articles <span aria-hidden="true">→</span></a>
    </div>
    <ArticleList posts={startingPoints} />
  </section>

  <section class="about-section facts">
    <h2 id="working-style">How I Work</h2>
    <div class="prose">
      <p>
        I am strongest when I can reason through a system end to end: the data model, the
        API shape, the performance constraints, the operational risks, and the human path
        through the tool. The projects on this site are older and newer examples of that
        habit.
      </p>
      <p>
        I care about simple interfaces over accidental complexity, and I prefer technical
        depth that can be explained clearly. That is why this site is structured around
        articles rather than screenshots and slogans.
      </p>
    </div>
  </section>
</Page>
