"use client";

import { PROFILE } from "@/data/content";
import ContactMethods from "./ContactMethods";
import { useStaggerReveal } from "@/hooks/useAnimations";
import Links from "./Links";
import ProfileMore from "./ProfileMore";

export default function Profile() {
  const visible = useStaggerReveal(PROFILE.links.length + PROFILE.contactMethods.length, 100);
  return (
    <div style={{ padding: "48px 0", maxWidth: 640 }}>
      <div
        style={{
          marginBottom: 8,
          fontFamily: "var(--mono)",
          fontSize: 11,
          color: "var(--muted)",
          letterSpacing: "0.08em",
          textTransform: "uppercase",
        }}
      >
        {"# about"}
      </div>
      <h1
        style={{
          fontFamily: "var(--sans)",
          fontSize: 42,
          fontWeight: 700,
          color: "var(--fg)",
          margin: "0 0 4px 0",
          lineHeight: 1.1,
          letterSpacing: "-0.02em",
        }}
      >
        {PROFILE.name}
      </h1>
      <div
        style={{
          fontFamily: "var(--mono)",
          fontSize: 15,
          color: "var(--accent)",
          marginBottom: 32,
          fontWeight: 500,
        }}
      >
        {PROFILE.title}    
      </div>
      <p
        style={{
          fontFamily: "var(--sans)",
          fontSize: 16,
          lineHeight: 1.7,
          color: "var(--fg-secondary)",
          margin: "0 0 40px 0",
          maxWidth: 560,
        }}
      >
        {PROFILE.bio}
      </p>
      <ProfileMore/>
      <Links/>
      <ContactMethods methods={PROFILE.contactMethods} visibleCount={PROFILE.links.length} visibleComponent={visible} isVisible={visible.has(PROFILE.links.length-1)} />
    </div>
  );
}
