// ============================================================
//  Rick Chen Profile — React Components (Sections)
// ============================================================

/* ---------- Navigation ---------- */
function SiteNav({ darkMode, onToggleDark, lang, onToggleLang }) {
  const [scrolled, setScrolled] = React.useState(false);
  React.useEffect(() => {
    const onScroll = () => setScrolled(window.scrollY > 40);
    window.addEventListener("scroll", onScroll);
    return () => window.removeEventListener("scroll", onScroll);
  }, []);

  return (
    <header style={{
      position: "sticky", top: 12, zIndex: 50,
      maxWidth: 900, margin: "0 auto",
      padding: "10px 20px",
      display: "flex", alignItems: "center", justifyContent: "space-between",
      gap: 16,
      borderRadius: 999,
      background: darkMode
        ? "rgba(30,28,25,0.82)"
        : "rgba(255,252,247,0.82)",
      backdropFilter: "blur(18px)",
      border: `1px solid ${darkMode ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.06)"}`,
      boxShadow: scrolled
        ? (darkMode ? "0 8px 40px rgba(0,0,0,0.35)" : "0 8px 40px rgba(60,50,40,0.10)")
        : "none",
      transition: "box-shadow 0.3s ease",
    }}>
      <a href="#top" style={{
        display: "flex", alignItems: "center", gap: 10,
        fontWeight: 700, fontSize: 15, textDecoration: "none", color: "inherit",
      }}>
        <span style={{
          width: 32, height: 32, borderRadius: 999,
          display: "grid", placeItems: "center",
          background: "var(--accent)", color: "#fff",
          fontSize: 13, fontWeight: 800,
        }}>
          {PROFILE.name.split(" ").map(n => n[0]).join("")}
        </span>
        <span>{PROFILE.name}</span>
      </a>
      <nav style={{ display: "flex", alignItems: "center", gap: 6, flexWrap: "wrap" }}>
        {NAV_LINKS.map(l => (
          <a key={l.href} href={l.href} style={{
            color: "var(--muted)", fontSize: 14, textDecoration: "none",
            padding: "6px 10px", borderRadius: 999,
            transition: "color 0.15s",
          }}
            onMouseEnter={e => e.target.style.color = "var(--text)"}
            onMouseLeave={e => e.target.style.color = "var(--muted)"}
          >{l.label}</a>
        ))}
        <button onClick={onToggleLang} style={{
          border: `1px solid ${darkMode ? "rgba(255,255,255,0.10)" : "rgba(0,0,0,0.08)"}`,
          background: "transparent", borderRadius: 999,
          padding: "6px 12px", cursor: "pointer",
          fontSize: 13, fontWeight: 700, color: "var(--muted)",
          transition: "border-color 0.15s",
        }}>{lang === "zh" ? "EN" : "中"}</button>
        <button onClick={onToggleDark} style={{
          border: `1px solid ${darkMode ? "rgba(255,255,255,0.10)" : "rgba(0,0,0,0.08)"}`,
          background: "transparent", borderRadius: 999,
          width: 34, height: 34, cursor: "pointer",
          display: "grid", placeItems: "center",
          fontSize: 16, color: "var(--muted)",
          transition: "border-color 0.15s",
        }}>{darkMode ? "☀" : "☾"}</button>
      </nav>
    </header>
  );
}

/* ---------- Hero ---------- */
function HeroSection() {
  return (
    <section id="top" style={{
      maxWidth: 960, margin: "0 auto",
      padding: "100px 24px 60px",
      display: "grid",
      gridTemplateColumns: "1fr",
      gap: 40,
    }}>
      <div style={{ maxWidth: 720 }}>
        <p style={{
          margin: "0 0 12px", fontSize: 13, fontWeight: 700,
          letterSpacing: "0.14em", textTransform: "uppercase",
          color: "var(--accent)",
        }}>{PROFILE.role}</p>
        <h1 style={{
          margin: 0, fontSize: "clamp(2.4rem, 6vw, 4.2rem)",
          lineHeight: 1.08, letterSpacing: "-0.04em",
          fontFamily: "var(--font-heading)",
          whiteSpace: "pre-line",
        }}>{PROFILE.headline}</h1>

        <p style={{
          margin: "20px 0 0", color: "var(--muted)",
          fontSize: 16, lineHeight: 1.7, maxWidth: 600,
        }}>{PROFILE.summary}</p>

        <div style={{ display: "flex", gap: 6, marginTop: 24, flexWrap: "wrap" }}>
          {PROFILE.keywords.map(k => (
            <span key={k} style={{
              padding: "5px 12px", borderRadius: 999, fontSize: 13,
              border: "1px solid var(--line)", color: "var(--muted)",
              background: "var(--surface)",
            }}>{k}</span>
          ))}
        </div>
      </div>

      {/* Metrics */}
      <div style={{
        display: "grid",
        gridTemplateColumns: "repeat(auto-fit, minmax(180px, 1fr))",
        gap: 12,
      }}>
        {METRICS.map((m, i) => (
          <MetricCard key={i} metric={m} />
        ))}
      </div>
    </section>
  );
}

/* ---------- MetricCard ---------- */
function MetricCard({ metric }) {
  const [hover, setHover] = React.useState(false);
  const m = metric;
  return (
    <div
      onMouseEnter={() => setHover(true)}
      onMouseLeave={() => setHover(false)}
      style={{
        padding: "22px 22px", borderRadius: 20,
        border: `1px solid ${hover ? "var(--accent)" : "var(--line)"}`,
        background: hover ? "var(--accent-soft)" : "var(--surface)",
        transform: hover ? "translateY(-4px)" : "none",
        boxShadow: hover ? "0 12px 36px rgba(60,50,40,0.10)" : "none",
        transition: "all 0.22s ease",
        cursor: "default",
      }}
    >
      <div style={{
        fontSize: "clamp(1.8rem, 4vw, 2.6rem)",
        fontWeight: 800, lineHeight: 1,
        letterSpacing: "-0.04em",
        fontFamily: "var(--font-heading)",
        color: hover ? "var(--accent-strong)" : "var(--text)",
        transition: "color 0.22s ease",
      }}>
        {m.value}<span style={{ fontSize: "0.5em", fontWeight: 600 }}>{m.unit}</span>
      </div>
      <div style={{ marginTop: 8, fontWeight: 700, fontSize: 14 }}>{m.label}</div>
      <p style={{ margin: "4px 0 0", color: "var(--muted)", fontSize: 13 }}>{m.note}</p>
    </div>
  );
}

/* ---------- TraitCardA ---------- */
function TraitCardA({ trait, index }) {
  const [hover, setHover] = React.useState(false);
  return (
    <div
      onMouseEnter={() => setHover(true)}
      onMouseLeave={() => setHover(false)}
      style={{
        padding: "28px 24px",
        borderRadius: 20,
        border: `1px solid ${hover ? "var(--accent)" : "var(--line)"}`,
        background: hover ? "var(--accent-soft)" : "var(--surface)",
        display: "flex", flexDirection: "column", gap: 10,
        transform: hover ? "translateY(-4px)" : "none",
        boxShadow: hover ? "0 12px 36px rgba(60,50,40,0.10)" : "none",
        transition: "all 0.22s ease",
        cursor: "default",
      }}
    >
      <span style={{
        fontSize: 32, fontWeight: 800, lineHeight: 1,
        color: hover ? "var(--accent)" : "var(--accent-soft)",
        fontFamily: "var(--font-heading)",
        letterSpacing: "-0.04em",
        transition: "color 0.22s ease",
      }}>0{index + 1}</span>
      <h3 style={{
        margin: 0, fontSize: 17, lineHeight: 1.35,
        fontFamily: "var(--font-heading)", letterSpacing: "-0.01em",
      }}>{trait.title}</h3>
      <p style={{ margin: 0, color: "var(--muted)", fontSize: 14, lineHeight: 1.7 }}>
        {trait.description}
      </p>
    </div>
  );
}

/* ---------- Traits ---------- */
function TraitsSection({ variant = "A" }) {
  if (variant === "A") return <TraitsVariantA />;
  if (variant === "B") return <TraitsVariantB />;
  return <TraitsVariantC />;
}

/* Variant A: Large quote + horizontal cards */
function TraitsVariantA() {
  return (
    <section id="traits" style={{ padding: "60px 24px 80px", background: "var(--surface-tint)" }}>
      <div style={{ maxWidth: 960, margin: "0 auto" }}>
      <p style={{
        margin: "0 0 12px", fontSize: 13, fontWeight: 700,
        letterSpacing: "0.14em", textTransform: "uppercase",
        color: "var(--accent)",
      }}>{UI.traitsEyebrow}</p>
      <blockquote style={{
        margin: "0 0 40px", padding: 0, border: "none",
        fontSize: "clamp(1.6rem, 4vw, 2.8rem)",
        lineHeight: 1.2, letterSpacing: "-0.03em",
        fontFamily: "var(--font-heading)",
        fontStyle: "italic",
        maxWidth: 640,
      }}>
        "{PROFILE.tagline}"
      </blockquote>

      <div style={{
        display: "grid",
        gridTemplateColumns: "repeat(3, 1fr)",
        gap: 16,
      }}>
        {TRAITS.map((t, i) => (
          <TraitCardA key={i} trait={t} index={i} />
        ))}
      </div>
      </div>
    </section>
  );
}

/* Variant B: Full-width warm band with centered layout */
function TraitsVariantB() {
  return (
    <section id="traits" style={{
      padding: "72px 24px",
      background: "var(--accent-soft)",
    }}>
      <div style={{ maxWidth: 760, margin: "0 auto", textAlign: "center" }}>
        <p style={{
          margin: "0 0 8px", fontSize: 13, fontWeight: 700,
          letterSpacing: "0.14em", textTransform: "uppercase",
          color: "var(--accent-strong)",
        }}>{UI.traitsEyebrow}</p>
        <blockquote style={{
          margin: "0 0 48px", padding: 0, border: "none",
          fontSize: "clamp(1.5rem, 3.5vw, 2.4rem)",
          lineHeight: 1.25, letterSpacing: "-0.02em",
          fontFamily: "var(--font-heading)",
          fontStyle: "italic",
          color: "var(--accent-strong)",
        }}>
          "{PROFILE.tagline}"
        </blockquote>

        <div style={{
          display: "grid", gridTemplateColumns: "repeat(3, 1fr)",
          gap: 24, textAlign: "left",
        }}>
          {TRAITS.map((t, i) => (
            <div key={i} style={{ display: "flex", flexDirection: "column", gap: 8 }}>
              <div style={{
                width: 40, height: 3, borderRadius: 2,
                background: "var(--accent)",
              }}></div>
              <h3 style={{
                margin: 0, fontSize: 16, lineHeight: 1.35,
                fontFamily: "var(--font-heading)",
              }}>{t.title}</h3>
              <p style={{ margin: 0, color: "var(--muted)", fontSize: 14, lineHeight: 1.7 }}>
                {t.description}
              </p>
            </div>
          ))}
        </div>
      </div>
    </section>
  );
}

/* Variant C: Left quote column + right stacked list */
function TraitsVariantC() {
  return (
    <section id="traits" style={{
      maxWidth: 960, margin: "0 auto", padding: "60px 24px 80px",
      display: "grid", gridTemplateColumns: "0.45fr 1fr",
      gap: 48, alignItems: "start",
    }}>
      <div style={{ position: "sticky", top: 80 }}>
        <p style={{
          margin: "0 0 8px", fontSize: 13, fontWeight: 700,
          letterSpacing: "0.14em", textTransform: "uppercase",
          color: "var(--accent)",
        }}>{UI.traitsEyebrow}</p>
        <blockquote style={{
          margin: 0, padding: 0, border: "none",
          fontSize: "clamp(1.4rem, 3vw, 2.2rem)",
          lineHeight: 1.25, letterSpacing: "-0.02em",
          fontFamily: "var(--font-heading)",
          fontStyle: "italic",
        }}>
          "{PROFILE.tagline}"
        </blockquote>
      </div>

      <div style={{ display: "flex", flexDirection: "column", gap: 16 }}>
        {TRAITS.map((t, i) => (
          <div key={i} style={{
            padding: "24px 24px",
            borderRadius: 20,
            border: "1px solid var(--line)",
            background: "var(--surface)",
            display: "flex", gap: 18, alignItems: "flex-start",
          }}>
            <span style={{
              flexShrink: 0, width: 44, height: 44,
              borderRadius: 12, display: "grid", placeItems: "center",
              background: "var(--accent-soft)",
              color: "var(--accent-strong)",
              fontWeight: 800, fontSize: 16, fontFamily: "var(--font-heading)",
            }}>0{i + 1}</span>
            <div>
              <h3 style={{
                margin: "0 0 6px", fontSize: 16, lineHeight: 1.35,
                fontFamily: "var(--font-heading)",
              }}>{t.title}</h3>
              <p style={{ margin: 0, color: "var(--muted)", fontSize: 14, lineHeight: 1.7 }}>
                {t.description}
              </p>
            </div>
          </div>
        ))}
      </div>
    </section>
  );
}

/* ---------- Career Timeline ---------- */
function CareerSection() {
  const [expanded, setExpanded] = React.useState(new Set([2])); // latest open by default

  const toggle = (i) => {
    setExpanded(prev => {
      const next = new Set(prev);
      next.has(i) ? next.delete(i) : next.add(i);
      return next;
    });
  };

  return (
    <section id="career" style={{ maxWidth: 960, margin: "0 auto", padding: "80px 24px" }}>
      <SectionHeading eyebrow={UI.careerEyebrow} title={UI.careerTitle} desc={UI.careerDesc} />

      <div style={{ position: "relative", paddingLeft: 32 }}>
        {/* Vertical line */}
        <div style={{
          position: "absolute", left: 7, top: 8, bottom: 8, width: 2,
          background: "var(--line)", borderRadius: 2,
        }}></div>

        {CAREER.map((stage, i) => {
          const isOpen = expanded.has(i);
          return (
            <div key={i} style={{ position: "relative", marginBottom: i < CAREER.length - 1 ? 32 : 0 }}>
              {/* Node */}
              <div style={{
                position: "absolute", left: -32 + 1, top: 6,
                width: 14, height: 14, borderRadius: 999,
                border: "3px solid var(--accent)",
                background: i === CAREER.length - 1 ? "var(--accent)" : "var(--bg)",
                animation: i === CAREER.length - 1 ? "pulse-dot 2s ease-in-out infinite" : "none",
                zIndex: 2,
              }}></div>

              <p style={{
                margin: "0 0 4px", fontSize: 12, fontWeight: 700,
                letterSpacing: "0.12em", textTransform: "uppercase",
                color: "var(--accent)",
              }}>{stage.period}</p>
              <h3 style={{
                margin: "0 0 4px", fontSize: 20, lineHeight: 1.3,
                letterSpacing: "-0.02em", fontFamily: "var(--font-heading)",
              }}>{stage.title}</h3>
              <p style={{ margin: "0 0 6px", fontWeight: 700, fontSize: 14, color: "var(--accent)" }}>
                {stage.subtitle}
              </p>
              <p style={{ margin: "0 0 10px", color: "var(--muted)", fontSize: 15, lineHeight: 1.7 }}>
                {stage.summary}
              </p>

              <div style={{ display: "flex", gap: 6, flexWrap: "wrap", marginBottom: 10 }}>
                {stage.tags.map(t => (
                  <span key={t} style={{
                    padding: "4px 10px", borderRadius: 999, fontSize: 12,
                    border: "1px solid var(--line)", color: "var(--muted)",
                    background: "var(--surface)",
                  }}>{t}</span>
                ))}
              </div>

              {isOpen && (
                <ul style={{
                  margin: "8px 0 10px", paddingLeft: 18,
                  color: "var(--muted)", fontSize: 14, lineHeight: 1.8,
                }}>
                  {stage.highlights.map((h, j) => <li key={j} style={{ marginBottom: 4 }}>{h}</li>)}
                </ul>
              )}

              <button onClick={() => toggle(i)} style={{
                background: "transparent", border: "1px solid var(--line)",
                borderRadius: 999, padding: "6px 14px", fontSize: 13,
                color: "var(--muted)", cursor: "pointer",
                transition: "border-color 0.15s",
              }}>{isOpen ? UI.collapseBtn : UI.expandBtn}</button>
            </div>
          );
        })}
      </div>
    </section>
  );
}

/* ---------- Projects ---------- */
function ProjectsSection() {
  const categories = ["All", ...Array.from(new Set(PROJECTS.map(p => p.category)))];
  const [filter, setFilter] = React.useState("All");
  const filtered = filter === "All" ? PROJECTS : PROJECTS.filter(p => p.category === filter);

  return (
    <section id="projects" style={{
      padding: "80px 24px",
      background: "var(--surface-tint)",
    }}>
      <div style={{ maxWidth: 960, margin: "0 auto" }}>
        <SectionHeading eyebrow={UI.projectsEyebrow} title={UI.projectsTitle} />

        <div style={{ display: "flex", gap: 6, marginBottom: 24, flexWrap: "wrap" }}>
          {categories.map(c => (
            <button key={c} onClick={() => setFilter(c)} style={{
              padding: "7px 14px", borderRadius: 999, fontSize: 13,
              fontWeight: filter === c ? 700 : 500,
              border: `1px solid ${filter === c ? "var(--text)" : "var(--line)"}`,
              background: filter === c ? "var(--text)" : "var(--surface)",
              color: filter === c ? "var(--bg)" : "var(--text)",
              cursor: "pointer", transition: "all 0.15s",
            }}>{c}</button>
          ))}
        </div>

        <div style={{
          display: "grid",
          gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
          gap: 16,
        }}>
          {filtered.map((p, i) => (
            <ProjectCard key={p.title} project={p} />
          ))}
        </div>
      </div>
    </section>
  );
}

function ProjectCard({ project }) {
  const [hover, setHover] = React.useState(false);
  return (
    <article
      onMouseEnter={() => setHover(true)}
      onMouseLeave={() => setHover(false)}
      style={{
        borderRadius: 20, overflow: "hidden",
        border: "1px solid var(--line)",
        background: "var(--surface)",
        boxShadow: hover
          ? "0 16px 48px rgba(60,50,40,0.12)"
          : "0 4px 20px rgba(60,50,40,0.04)",
        transform: hover ? "translateY(-4px)" : "none",
        transition: "transform 0.2s ease, box-shadow 0.2s ease",
      }}
    >
      <div style={{
        height: 140, overflow: "hidden",
        background: "var(--accent-soft)",
        display: "grid", placeItems: "center",
      }}>
        <img src={project.image} alt="" style={{ width: "60%", maxHeight: 100, objectFit: "contain" }} />
      </div>
      <div style={{ padding: "16px 18px 20px" }}>
        <p style={{
          margin: "0 0 6px", fontSize: 11, fontWeight: 700,
          letterSpacing: "0.12em", textTransform: "uppercase",
          color: "var(--accent)",
        }}>{project.category} · {project.period}</p>
        <h3 style={{
          margin: "0 0 8px", fontSize: 16, lineHeight: 1.35,
          letterSpacing: "-0.02em", fontFamily: "var(--font-heading)",
        }}>{project.title}</h3>
        <p style={{ margin: "0 0 10px", color: "var(--muted)", fontSize: 14, lineHeight: 1.65 }}>
          {project.summary}
        </p>
        <ul style={{ margin: "0 0 12px", paddingLeft: 16, color: "var(--muted)", fontSize: 13 }}>
          {project.impact.map((im, j) => <li key={j} style={{ marginBottom: 3 }}>{im}</li>)}
        </ul>
        <div style={{ display: "flex", gap: 5, flexWrap: "wrap" }}>
          {project.tags.map(t => (
            <span key={t} style={{
              padding: "3px 9px", borderRadius: 999, fontSize: 11,
              border: "1px solid var(--line)", color: "var(--muted)",
            }}>{t}</span>
          ))}
        </div>
      </div>
    </article>
  );
}

/* ---------- SkillCard ---------- */
function SkillCard({ skill }) {
  const [hover, setHover] = React.useState(false);
  return (
    <div
      onMouseEnter={() => setHover(true)}
      onMouseLeave={() => setHover(false)}
      style={{
        padding: "22px 22px 18px", borderRadius: 20,
        border: "1px solid var(--line)",
        background: "var(--surface)",
        transform: hover ? "translateY(-4px)" : "none",
        boxShadow: hover
          ? "0 16px 48px rgba(60,50,40,0.12)"
          : "0 4px 20px rgba(60,50,40,0.04)",
        transition: "transform 0.2s ease, box-shadow 0.2s ease",
        cursor: "default",
      }}
    >
      <h3 style={{
        margin: "0 0 6px", fontSize: 16,
        fontFamily: "var(--font-heading)", letterSpacing: "-0.01em",
      }}>{skill.group}</h3>
      <p style={{ margin: "0 0 14px", color: "var(--muted)", fontSize: 13, lineHeight: 1.6 }}>
        {skill.description}
      </p>
      <div style={{ display: "flex", gap: 5, flexWrap: "wrap" }}>
        {skill.items.map(item => (
          <span key={item} style={{
            padding: "4px 10px", borderRadius: 999, fontSize: 12,
            background: "var(--accent-soft)", color: "var(--accent-strong)",
            fontWeight: 600,
          }}>{item}</span>
        ))}
      </div>
    </div>
  );
}

/* ---------- Skills ---------- */
function SkillsSection() {
  return (
    <section id="skills" style={{ maxWidth: 960, margin: "0 auto", padding: "80px 24px" }}>
      <SectionHeading eyebrow={UI.skillsEyebrow} title={UI.skillsTitle} />
      <div style={{
        display: "grid",
        gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
        gap: 14,
      }}>
        {SKILLS.map((s, i) => (
          <SkillCard key={i} skill={s} />
        ))}
      </div>
    </section>
  );
}

/* ---------- Contact ---------- */
function ContactSection() {
  return (
    <section id="contact" style={{
      maxWidth: 960, margin: "0 auto", padding: "80px 24px 60px",
    }}>
      <div style={{
        display: "grid",
        gridTemplateColumns: "1fr minmax(240px, 0.5fr)",
        gap: 32, alignItems: "center",
      }}>
        <div>
          <p style={{
            margin: "0 0 8px", fontSize: 13, fontWeight: 700,
            letterSpacing: "0.14em", textTransform: "uppercase",
            color: "var(--accent)",
          }}>{UI.contactEyebrow}</p>
          <h2 style={{
            margin: "0 0 12px",
            fontSize: "clamp(1.6rem, 4vw, 2.4rem)",
            lineHeight: 1.15, letterSpacing: "-0.03em",
            fontFamily: "var(--font-heading)",
            whiteSpace: "pre-line",
          }}>{UI.contactTitle}</h2>
          <p style={{ color: "var(--muted)", fontSize: 15, lineHeight: 1.7 }}>
            {UI.contactDesc}
          </p>
        </div>
        <div style={{
          padding: 22, borderRadius: 20,
          border: "1px solid var(--line)",
          background: "var(--surface)",
        }}>
          <h3 style={{ margin: "0 0 4px", fontSize: 17, fontFamily: "var(--font-heading)" }}>
            {PROFILE.name}
          </h3>
          <p style={{ margin: "0 0 16px", color: "var(--muted)", fontSize: 13 }}>
            {PROFILE.subheadline}
          </p>
          <div style={{ display: "flex", flexDirection: "column", gap: 8 }}>
            {PROFILE.email
              ? <a href={`mailto:${PROFILE.email}`} style={contactLinkStyle}>Email</a>
              : <span style={contactLinkStyle}>{UI.contactEmailPlaceholder}</span>}
            {PROFILE.linkedinUrl
              ? <a href={PROFILE.linkedinUrl} target="_blank" rel="noreferrer" style={contactLinkStyle}>LinkedIn</a>
              : <span style={contactLinkStyle}>{UI.contactLinkedinPlaceholder}</span>}
            {PROFILE.githubUrl
              ? <a href={PROFILE.githubUrl} target="_blank" rel="noreferrer" style={contactLinkStyle}>GitHub</a>
              : <span style={contactLinkStyle}>{UI.contactGithubPlaceholder}</span>}
          </div>
        </div>
      </div>
    </section>
  );
}

const contactLinkStyle = {
  padding: "10px 14px", borderRadius: 12,
  border: "1px solid var(--line)",
  background: "var(--bg)",
  fontSize: 14, color: "var(--muted)", textDecoration: "none",
};

/* ---------- Footer ---------- */
function SiteFooter() {
  return (
    <footer style={{
      maxWidth: 960, margin: "0 auto",
      padding: "20px 24px 40px",
      borderTop: "1px solid var(--line)",
      display: "flex", justifyContent: "space-between",
      color: "var(--muted)", fontSize: 13,
      flexWrap: "wrap", gap: 8,
    }}>
      <span>{UI.footerCopyright} {PROFILE.name}</span>
      <span>{PROFILE.location}</span>
    </footer>
  );
}

/* ---------- Section Heading (shared) ---------- */
function SectionHeading({ eyebrow, title, desc }) {
  return (
    <div style={{ maxWidth: 600, marginBottom: 32 }}>
      {eyebrow && <p style={{
        margin: "0 0 8px", fontSize: 13, fontWeight: 700,
        letterSpacing: "0.14em", textTransform: "uppercase",
        color: "var(--accent)",
      }}>{eyebrow}</p>}
      <h2 style={{
        margin: 0, fontSize: "clamp(1.8rem, 4.5vw, 2.8rem)",
        lineHeight: 1.1, letterSpacing: "-0.04em",
        fontFamily: "var(--font-heading)",
      }}>{title}</h2>
      {desc && <p style={{ margin: "8px 0 0", color: "var(--muted)", fontSize: 15 }}>{desc}</p>}
    </div>
  );
}

// Export all
Object.assign(window, {
  SiteNav, HeroSection, TraitsSection, CareerSection, ProjectsSection, SkillsSection, ContactSection, SiteFooter, SectionHeading, ProjectCard,
});
