/* Vendored from Starfolio (MIT, https://github.com/webrating/starfolio)
 * src/styles/global.css :root/.dark + src/data/config.ts theme + src/components/ui/{badge,button,card}.tsx
 * Ported to vanilla CSS for this static site. Tailwind v4 maps these vars via @theme inline in HTML.
 * Hallmark · pre-emit critique: P5 H4 E5 S4 R5 V5
 */
:root {
  --radius: 0.625rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
}
.dark {
  --background: oklch(0.18 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.205 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);
}
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--background); color: var(--foreground);
  font-family: var(--font-sans); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-style: normal; line-height: 1.12; overflow-wrap: anywhere; min-width: 0; }
code, pre { font-family: var(--font-mono); }

/* shadcn badge — ported from Starfolio src/components/ui/badge.tsx badgeVariants */
.badge {
  display: inline-flex; align-items: center; border-radius: 6px;
  border: 1px solid var(--border); padding: 2px 10px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
  transition: colors 0.15s ease;
  white-space: nowrap;
}
.badge-default { border-color: transparent; background: var(--primary); color: var(--primary-foreground); }
.badge-secondary { border-color: transparent; background: var(--secondary); color: var(--secondary-foreground); }
.badge-outline { background: transparent; color: var(--foreground); }
.badge-tag {
  font-size: 11px; font-weight: 500; height: 24px;
  border: 1px solid var(--border); color: var(--foreground);
}

/* shadcn button — ported from button.tsx buttonVariants */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; border-radius: 6px; font-size: 14px; font-weight: 500;
  height: 36px; padding: 0 16px; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: colors 0.15s ease;
}
.btn-default { background: var(--primary); color: var(--primary-foreground); }
.btn-default:hover { opacity: 0.9; }
.btn-outline { border-color: var(--input); background: var(--background); color: var(--foreground); }
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--accent); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn:focus-visible, .badge:focus-visible, a:focus-visible {
  outline: 2px solid var(--ring); outline-offset: 2px;
}

/* shadcn card + Starfolio ProjectCard — ported from ui/card.tsx + project-card.tsx */
.mh-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  min-width: 0;
}
.mh-card:hover { box-shadow: 0 0 0 2px var(--muted); }
.mh-card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; }
.mh-card-title { font-size: 16px; font-weight: 600; margin: 0; }
.mh-card-title a { color: inherit; text-decoration: none; }
.mh-card-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mh-card-desc {
  font-size: 13px; color: var(--muted-foreground); line-height: 1.6;
  margin: 0; flex: 1;
}
.mh-card-meta { font-size: 12px; color: var(--muted-foreground); }

/* Starfolio pill section label — ported from projects-section.tsx */
.mh-pill {
  display: inline-block; background: var(--primary); color: var(--background);
  border-radius: 12px; padding: 4px 16px; font-size: 14px; font-weight: 500;
  position: relative; z-index: 10;
}
.mh-rule { flex: 1; height: 1px; background: var(--border); min-width: 0; }

/* BlurFade — ported from magicui/blur-fade.tsx (motion → IntersectionObserver) */
.blur-fade { opacity: 0; filter: blur(6px); transform: translateY(-6px); }
.blur-fade.is-visible {
  opacity: 1; filter: blur(0); transform: translateY(0);
  transition: opacity 0.4s ease-out, filter 0.4s ease-out, transform 0.4s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .blur-fade { opacity: 1; filter: none; transform: none; }
  .blur-fade.is-visible { transition: none; }
}

/* Code blocks */
.goal-box {
  background: oklch(0.205 0 0); color: oklch(0.985 0 0);
  border-radius: var(--radius); padding: 16px; white-space: pre-wrap;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  overflow-x: auto; max-width: 100%;
}
.dark .goal-box { background: oklch(0.12 0 0); border: 1px solid var(--border); }
