
/* Pulsar Landing - Global Styles */
@custom-variant dark (&:is(.dark *));

:root {
  /* Pulsar Landing Colors - Dark theme inspired by modern dev tools (Pulsar colors take precedence) */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-card: #141414;
  --bg-code: #0d0d0d;

  --text-primary: #fafafa;
  --text-secondary: #a1a1a1;
  --text-muted: #6b6b6b;

  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-subtle: rgba(59, 130, 246, 0.1);

  --border-color: #262626;
  --border-subtle: #1f1f1f;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --container-max: 1200px;
  --section-padding: 6rem;

  /* Shadcn default colors for light theme - will be overridden by Pulsar colors in .dark mode where applicable */
  --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);
  --destructive-foreground: 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);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --radius: 0.625rem; /* Shadcn base radius */
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);

  /* Radius (Pulsar overrides Shadcn base radius) */
  --radius-sm: 6px; /* calc(var(--radius) - 4px); */
  --radius-md: 8px; /* calc(var(--radius) - 2px); */
  --radius-lg: 12px; /* var(--radius); */
  --radius-xl: calc(var(--radius) + 4px); /* New from Shadcn */
}

.dark {
  /* Shadcn default colors for dark theme - these are primary, but Pulsar's specific dark theme colors take precedence where defined */
  --background: var(--bg-primary); /* Use Pulsar's primary background */
  --foreground: var(--text-primary); /* Use Pulsar's primary text */
  --card: var(--bg-card); /* Use Pulsar's card background */
  --card-foreground: var(--text-primary); /* Use Pulsar's primary text for card foreground */
  --popover: var(--bg-tertiary); /* Approximate with Pulsar's tertiary bg */
  --popover-foreground: var(--text-primary);
  --primary: var(--accent-primary); /* Use Pulsar's accent primary */
  --primary-foreground: var(--text-primary); /* This is usually white/light for dark theme primary buttons */
  --secondary: var(--bg-secondary); /* Use Pulsar's secondary background */
  --secondary-foreground: var(--text-primary);
  --muted: var(--bg-tertiary); /* Use Pulsar's tertiary background */
  --muted-foreground: var(--text-muted); /* Use Pulsar's muted text */
  --accent: var(--accent-subtle); /* Use Pulsar's accent subtle for background */
  --accent-foreground: var(--accent-primary); /* Use Pulsar's accent primary for foreground */
  --destructive: oklch(0.396 0.141 25.723); /* Shadcn default */
  --destructive-foreground: oklch(0.637 0.237 25.331); /* Shadcn default */
  --border: var(--border-color); /* Use Pulsar's border color */
  --input: var(--bg-secondary); /* Use Pulsar's secondary background for input */
  --ring: var(--accent-primary); /* Use Pulsar's accent primary for ring */
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0); /* Shadcn default */
  --sidebar-foreground: oklch(0.985 0 0); /* Shadcn default */
  --sidebar-primary: oklch(0.488 0.243 264.376); /* Shadcn default */
  --sidebar-primary-foreground: oklch(0.985 0 0); /* Shadcn default */
  --sidebar-accent: oklch(0.269 0 0); /* Shadcn default */
  --sidebar-accent-foreground: oklch(0.985 0 0); /* Shadcn default */
  --sidebar-border: oklch(0.269 0 0); /* Shadcn default */
  --sidebar-ring: oklch(0.439 0 0); /* Shadcn default */
}

/* Theme inline for Shadcn components to pick up */
@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  /* Use Pulsar's defined radii directly, but still map to Shadcn's theme variables */
  --radius-sm: var(--radius-sm);
  --radius-md: var(--radius-md);
  --radius-lg: var(--radius-lg);
  --radius-xl: var(--radius-xl);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* Global resets - kept from original */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  /* The background-color and color properties here will be overridden by @layer base above,
     which uses --background and --foreground variables that we've mapped to Pulsar's theme. */
  background-color: var(--bg-primary); /* Kept for explicit fallback, though @layer base takes precedence */
  color: var(--text-primary); /* Kept for explicit fallback */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

code, pre {
  font-family: var(--font-mono);
}

/* Utility Classes - kept from original */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-padding) 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Button Styles - kept from original */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background-color: var(--text-secondary);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--text-muted);
}

/* Code Block Styles - kept from original */
.code-block {
  background-color: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.code-filename {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.code-content {
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
}

.code-content pre {
  margin: 0;
}

/* Syntax Highlighting - kept from original */
.keyword { color: #c678dd; }
.string { color: #98c379; }
.comment { color: #5c6370; font-style: italic; }
.function { color: #61afef; }
.class-name { color: #e5c07b; }
.number { color: #d19a66; }
.punctuation { color: #abb2bf; }

/* Card Styles - kept from original */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.card:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

/* Responsive - kept from original */
@media (max-width: 768px) {
  :root {
    --section-padding: 4rem;
  }

  .container {
    padding: 0 1rem;
  }
}

.loader,
.page {
  transition: opacity 150ms ease;
}

.hidden {
  opacity: 0;
  pointer-events: none;
}

.visible {
  opacity: 1;
}

