---
import { site } from "../data/site";
import { socials } from "../data/socials";
---

<div class="contact card" data-reveal>
  <div class="contact__body">
    <p class="contact__lead">
      Open to conversations about platform engineering, edge infrastructure, and
      GPU/AI systems. Based in {site.location} — for a low-ms reply, ping me on
      LinkedIn or email; everything else is best-effort delivery.
    </p>
    <a class="btn btn--primary contact__mail mono" href={`mailto:${site.email}`}>
      {site.email}
    </a>
  </div>

  <ul class="contact__links">
    {
      socials.map((s) => (
        <li>
          <a
            class="contact__link"
            href={s.href}
            rel={s.external ? "noopener noreferrer" : undefined}
          >
            <svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true">
              <path d={s.icon} fill="currentColor" />
            </svg>
            <span>{s.label}</span>
          </a>
        </li>
      ))
    }
  </ul>
</div>

<style>
  .contact {
    padding: var(--space-6);
    display: grid;
    gap: var(--space-6);
  }
  @media (min-width: 760px) {
    .contact {
      grid-template-columns: 1.4fr 1fr;
      align-items: center;
    }
  }
  .contact__lead {
    color: var(--text-dim);
    font-size: var(--step-1);
    line-height: 1.55;
    max-width: 38ch;
  }
  .contact__mail {
    margin-top: var(--space-5);
  }
  .contact__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-3);
  }
  .contact__link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: var(--step--1);
  }
  .contact__link:hover {
    color: var(--accent);
    text-decoration: none;
  }
</style>
