import type { Metadata } from "next";

export const metadata: Metadata = { title: "Özgeçmiş" };

export default function OzgecmisPage() {
  return (
    <div style={{ maxWidth: "100%" }}>
      <div className="page-title">Özgeçmiş</div>
      <p style={{ fontSize: "0.8rem", color: "var(--text-muted)", marginBottom: "2rem" }}>
        CV formatında özgeçmiş
      </p>

      {/* Header */}
      <div className="card" style={{ marginBottom: "1rem" }}>
        <div style={{ display: "flex", alignItems: "flex-start", justifyContent: "space-between", flexWrap: "wrap", gap: "1rem" }}>
          <div>
            <h1 style={{ fontSize: "1.3rem", fontWeight: 800, color: "var(--text)", marginBottom: "0.25rem" }}>denizbektas</h1>
            <div style={{ fontSize: "0.85rem", color: "var(--accent)", marginBottom: "0.5rem" }}>Siber Güvenlik Araştırmacısı & Red Teamer</div>
            <div style={{ display: "flex", gap: "1rem", fontSize: "0.78rem", color: "var(--text-muted)", flexWrap: "wrap" }}>
              <span>✉ info@denizbektas.com.tr</span>
              <span>⊕ @denizbektas@infosec.exchange</span>
              <span>◈ github.com/bugresearch</span>
            </div>
          </div>
          <a href="/public.pgp" className="tag" style={{ fontSize: "0.65rem" }}>PGP KEY</a>
        </div>
      </div>

      {/* Experience */}
      <Section title="Deneyim" icon="▤">
        <CVItem
          title="Senior Penetration Tester"
          org="[Şirket Adı]"
          period="2023 — Devam"
          items={[
            "Web uygulama penetrasyon testleri ve güvenlik değerlendirmeleri",
            "Red team operasyonları ve sosyal mühendislik simülasyonları",
            "Active Directory güvenlik testleri",
            "Güvenlik açığı raporlama ve remediation rehberliği",
          ]}
        />
        <CVItem
          title="Security Analyst"
          org="[Şirket Adı]"
          period="2021 — 2023"
          items={[
            "SOC operasyonları ve olay müdahale",
            "SIEM kural geliştirme ve tuning",
            "Vulnerability management programı",
          ]}
        />
      </Section>

      {/* Education */}
      <Section title="Eğitim" icon="◎">
        <CVItem
          title="Bilgisayar Mühendisliği"
          org="[Üniversite Adı]"
          period="2017 — 2021"
          items={["Lisans derecesi", "Bitirme projesi: Web uygulama güvenlik tarayıcı geliştirme"]}
        />
      </Section>

      {/* Certifications */}
      <Section title="Sertifikalar" icon="◆">
        <div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))", gap: "0.5rem" }}>
          {[
            { name: "eJPT", org: "eLearnSecurity", year: "2022", status: "active" },
            { name: "CompTIA Security+", org: "CompTIA", year: "2021", status: "active" },
            { name: "OSCP", org: "OffSec", year: "2026 (hedef)", status: "pending" },
          ].map((cert) => (
            <div key={cert.name} className="card" style={{ padding: "0.75rem" }}>
              <div style={{ fontSize: "0.88rem", fontWeight: 600, color: cert.status === "pending" ? "var(--text-muted)" : "var(--accent)" }}>{cert.name}</div>
              <div style={{ fontSize: "0.72rem", color: "var(--text-muted)" }}>{cert.org} · {cert.year}</div>
            </div>
          ))}
        </div>
      </Section>

      {/* Skills */}
      <Section title="Teknik Beceriler" icon="⚔">
        <div style={{ display: "flex", flexDirection: "column", gap: "0.75rem" }}>
          {[
            { cat: "Pentest & Red Team", skills: ["Web App Testing", "Network Pentest", "AD Attack", "Red Team Ops", "Social Engineering"] },
            { cat: "Araçlar", skills: ["Burp Suite", "Nmap", "Metasploit", "BloodHound", "Cobalt Strike", "Ghidra"] },
            { cat: "Programlama", skills: ["Python", "Bash", "PowerShell", "C/C++", "Rust (öğreniyorum)"] },
            { cat: "OS & Platform", skills: ["Kali Linux", "macOS", "Windows", "Active Directory", "Docker"] },
          ].map((row) => (
            <div key={row.cat}>
              <div style={{ fontSize: "0.72rem", color: "var(--text-muted)", marginBottom: "0.35rem" }}>{row.cat}</div>
              <div style={{ display: "flex", gap: "0.35rem", flexWrap: "wrap" }}>
                {row.skills.map((s) => <span key={s} className="tag">{s}</span>)}
              </div>
            </div>
          ))}
        </div>
      </Section>

      {/* Languages */}
      <Section title="Diller" icon="◈">
        <div style={{ display: "flex", flexDirection: "column", gap: "0.5rem" }}>
          {[
            { lang: "Türkçe", level: "Ana dil" },
            { lang: "İngilizce", level: "İleri (C1)" },
          ].map((l) => (
            <div key={l.lang} style={{ display: "flex", justifyContent: "space-between", fontSize: "0.85rem", padding: "0.4rem 0", borderBottom: "1px solid var(--border)" }}>
              <span style={{ color: "var(--text)" }}>{l.lang}</span>
              <span style={{ color: "var(--text-muted)" }}>{l.level}</span>
            </div>
          ))}
        </div>
      </Section>
    </div>
  );
}

function Section({ title, icon, children }: { title: string; icon: string; children: React.ReactNode }) {
  return (
    <div style={{ marginBottom: "1.5rem" }}>
      <div className="section-header">
        <span style={{ color: "var(--accent)", marginRight: "0.4rem" }}>{icon}</span>
        {title}
      </div>
      {children}
    </div>
  );
}

function CVItem({ title, org, period, items }: { title: string; org: string; period: string; items: string[] }) {
  return (
    <div className="card" style={{ marginBottom: "0.5rem" }}>
      <div style={{ display: "flex", alignItems: "flex-start", justifyContent: "space-between", flexWrap: "wrap", gap: "0.5rem", marginBottom: "0.5rem" }}>
        <div>
          <div style={{ fontWeight: 600, fontSize: "0.9rem", color: "var(--text)" }}>{title}</div>
          <div style={{ fontSize: "0.78rem", color: "var(--accent)" }}>{org}</div>
        </div>
        <span style={{ fontSize: "0.72rem", color: "var(--text-muted)" }}>{period}</span>
      </div>
      <ul style={{ listStyle: "none", display: "flex", flexDirection: "column", gap: "0.25rem" }}>
        {items.map((item) => (
          <li key={item} style={{ fontSize: "0.8rem", color: "var(--text-muted)", display: "flex", gap: "0.4rem" }}>
            <span style={{ color: "var(--accent)", flexShrink: 0 }}>→</span>
            {item}
          </li>
        ))}
      </ul>
    </div>
  );
}
