@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
  --font-serif: Georgia, Cambria, "Times New Roman", serif;
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-chart-5: var(--chart-5);
  --color-chart-4: var(--chart-4);
  --color-chart-3: var(--chart-3);
  --color-chart-2: var(--chart-2);
  --color-chart-1: var(--chart-1);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-secondary: var(--secondary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary: var(--primary);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);
}

/* Research Paper Theme - Light tan/offwhite with dark charcoal */
:root {
  --radius: 0.375rem;
  /* Warm offwhite/cream background */
  --background: oklch(0.965 0.015 85);
  /* Dark charcoal text */
  --foreground: oklch(0.25 0 0);
  /* Slightly lighter cream for cards */
  --card: oklch(0.98 0.01 85);
  --card-foreground: oklch(0.25 0 0);
  --popover: oklch(0.98 0.01 85);
  --popover-foreground: oklch(0.25 0 0);
  /* Near-black for emphasis */
  --primary: oklch(0.3 0 0);
  --primary-foreground: oklch(0.965 0.015 85);
  /* Subtle tan for secondary */
  --secondary: oklch(0.92 0.012 85);
  --secondary-foreground: oklch(0.3 0 0);
  /* Muted tan for borders and backgrounds */
  --muted: oklch(0.92 0.012 85);
  --muted-foreground: oklch(0.45 0 0);
  /* Warm accent for hovers */
  --accent: oklch(0.9 0.025 85);
  --accent-foreground: oklch(0.25 0 0);
  /* Destructive - muted red */
  --destructive: oklch(0.577 0.2 25);
  /* Subtle warm borders */
  --border: oklch(0.88 0.015 85);
  --input: oklch(0.88 0.015 85);
  --ring: oklch(0.3 0 0);
  /* Chart colors - warm academic tones */
  --chart-1: oklch(0.5 0.12 45);
  --chart-2: oklch(0.55 0.1 180);
  --chart-3: oklch(0.45 0.08 220);
  --chart-4: oklch(0.65 0.15 85);
  --chart-5: oklch(0.6 0.14 70);
  /* Sidebar */
  --sidebar: oklch(0.96 0.012 85);
  --sidebar-foreground: oklch(0.25 0 0);
  --sidebar-primary: oklch(0.3 0 0);
  --sidebar-primary-foreground: oklch(0.965 0.015 85);
  --sidebar-accent: oklch(0.92 0.012 85);
  --sidebar-accent-foreground: oklch(0.3 0 0);
  --sidebar-border: oklch(0.88 0.015 85);
  --sidebar-ring: oklch(0.5 0 0);
}

/* Dark mode - inverted but still warm */
.dark {
  --background: oklch(0.18 0.01 85);
  --foreground: oklch(0.92 0.01 85);
  --card: oklch(0.22 0.01 85);
  --card-foreground: oklch(0.92 0.01 85);
  --popover: oklch(0.22 0.01 85);
  --popover-foreground: oklch(0.92 0.01 85);
  --primary: oklch(0.92 0.01 85);
  --primary-foreground: oklch(0.22 0.01 85);
  --secondary: oklch(0.28 0.01 85);
  --secondary-foreground: oklch(0.92 0.01 85);
  --muted: oklch(0.28 0.01 85);
  --muted-foreground: oklch(0.65 0.01 85);
  --accent: oklch(0.28 0.01 85);
  --accent-foreground: oklch(0.92 0.01 85);
  --destructive: oklch(0.65 0.18 22);
  --border: oklch(0.92 0.01 85 / 12%);
  --input: oklch(0.92 0.01 85 / 15%);
  --ring: oklch(0.6 0 0);
  --chart-1: oklch(0.55 0.2 260);
  --chart-2: oklch(0.65 0.15 160);
  --chart-3: oklch(0.7 0.16 70);
  --chart-4: oklch(0.6 0.22 300);
  --chart-5: oklch(0.6 0.2 20);
  --sidebar: oklch(0.22 0.01 85);
  --sidebar-foreground: oklch(0.92 0.01 85);
  --sidebar-primary: oklch(0.55 0.2 260);
  --sidebar-primary-foreground: oklch(0.92 0.01 85);
  --sidebar-accent: oklch(0.28 0.01 85);
  --sidebar-accent-foreground: oklch(0.92 0.01 85);
  --sidebar-border: oklch(0.92 0.01 85 / 12%);
  --sidebar-ring: oklch(0.6 0 0);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground antialiased;
    font-feature-settings: "kern" 1, "liga" 1;
  }

  /* Research paper typography */
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    @apply tracking-tight;
  }

  p {
    @apply leading-relaxed;
  }

  /* Slightly larger base font for readability */
  html {
    font-size: 17px;
  }
}
