:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 243 75% 59%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 24 94% 53%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 243 75% 59%;
  --radius: 0.75rem;
}

.dark {
  --background: 224 71% 4%;
  --foreground: 210 40% 98%;
  --card: 224 71% 4%;
  --card-foreground: 210 40% 98%;
  --popover: 224 71% 4%;
  --popover-foreground: 210 40% 98%;
  --primary: 239 84% 67%;
  --primary-foreground: 0 0% 100%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 27 96% 61%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 239 84% 67%;
}

* {
  border-color: hsl(var(--border));
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

::selection {
  background-color: hsl(var(--primary) / 0.2);
  color: hsl(var(--foreground));
}

button,
[role="button"] {
  user-select: none;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--secondary));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground) / 0.3);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.5);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(79, 70, 229, 0.5);
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out forwards;
}

.animate-slide-up {
  animation: slide-up 0.8s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.stagger-1 {
  animation-delay: 0.1s;
}

.stagger-2 {
  animation-delay: 0.2s;
}

.stagger-3 {
  animation-delay: 0.3s;
}

.stagger-4 {
  animation-delay: 0.4s;
}

.stagger-5 {
  animation-delay: 0.5s;
}

/* ═══════════════════════════════════════════════════════════════════
   Article body typography (.prose)
   Replaces @tailwindcss/typography plugin (not installed)
   ═══════════════════════════════════════════════════════════════════ */

.prose {
  color: hsl(var(--muted-foreground));
  font-size: 1.0625rem;
  line-height: 1.8;
  max-width: none;
}

.prose > * + * {
  margin-top: 0;
}

/* Paragraphs */
.prose p {
  margin-top: 0;
  margin-bottom: 1.4em;
  line-height: 1.85;
}

/* Headings */
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
  line-height: 1.3;
}

.prose h2 {
  font-size: 1.6rem;
  margin-top: 2.5rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid hsl(var(--border));
}

.prose h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.7rem;
}

.prose h4 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose h5,
.prose h6 {
  font-size: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

/* First heading after lead text — less top margin */
.prose > h2:first-child,
.prose > h3:first-child {
  margin-top: 0;
}

/* Strong / em */
.prose strong,
.prose b {
  font-weight: 700;
  color: hsl(var(--foreground));
}

.prose em,
.prose i {
  font-style: italic;
}

/* Links */
.prose a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-decoration-color: hsl(var(--primary) / 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.prose a:hover {
  text-decoration-color: hsl(var(--primary));
}

/* Lists */
.prose ul,
.prose ol {
  margin-top: 0;
  margin-bottom: 1.4em;
  padding-left: 1.6em;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-bottom: 0.45em;
  color: hsl(var(--muted-foreground));
  line-height: 1.75;
}

.prose li > p {
  margin-bottom: 0.4em;
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0.4em;
  margin-bottom: 0;
}

/* Blockquote */
.prose blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid hsl(var(--primary));
  background-color: hsl(var(--secondary));
  border-radius: 0 0.75rem 0.75rem 0;
  color: hsl(var(--foreground));
  font-style: italic;
}

.prose blockquote p {
  margin: 0;
}

/* Horizontal rule */
.prose hr {
  margin: 2.5rem 0;
  border: none;
  border-top: 1px solid hsl(var(--border));
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.75rem auto;
  display: block;
}

/* Inline code */
.prose code {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
  padding: 0.15em 0.45em;
  border-radius: 0.3rem;
  font-size: 0.88em;
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  font-style: normal;
}

/* Code block */
.prose pre {
  background-color: hsl(var(--muted));
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.75rem 0;
  font-size: 0.9em;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95em;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
}

.prose thead th {
  background-color: hsl(var(--muted));
  font-weight: 600;
  color: hsl(var(--foreground));
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid hsl(var(--border));
  font-family: 'Outfit', sans-serif;
}

.prose tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  vertical-align: top;
}

.prose tbody tr:last-child td {
  border-bottom: none;
}

.prose tbody tr:hover td {
  background-color: hsl(var(--secondary));
}

/* ─── prose-lg modifier (larger base size) ──────────────────────── */
.prose-lg {
  font-size: 1.125rem;
  line-height: 1.85;
}

.prose-lg p {
  margin-bottom: 1.5em;
}

.prose-lg h2 {
  font-size: 1.75rem;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
}

.prose-lg h3 {
  font-size: 1.375rem;
  margin-top: 2.25rem;
  margin-bottom: 0.8rem;
}

.prose-lg h4 {
  font-size: 1.125rem;
}


.glass {
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
  background-color: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.glass-card {
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.5);
}

.dark .glass-card {
  background-color: rgba(15, 23, 42, 0.8);
  border-color: rgba(51, 65, 85, 0.5);
}

.bg-grid {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.dark .bg-grid {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}
