@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --background: 228 23% 12%;
  --foreground: 0 0% 100%;
  --text: 0 0% 100%;
  --card: 228 26% 18%;
  --card-foreground: 0 0% 100%;
  --popover: 228 23% 12%;
  --popover-foreground: 0 0% 100%;
  --primary: 270 95% 40%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 100% 68%;
  --secondary-foreground: 0 0% 100%;
  --muted: 228 19% 22%;
  --muted-foreground: 228 10% 60%;
  --accent: 158 100% 41%;
  --accent-foreground: 228 23% 12%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 228 19% 25%;
  --input: 228 19% 22%;
  --ring: 270 95% 40%;
  --radius: 0.5rem;
  --success: 158 100% 41%;
  --warning: 38 92% 50%;
  --error: 0 84% 60%;
  --info: 270 95% 40%;
  
  --font-sans: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, Inconsolata, 'Fira Code', monospace;
  
  --spacing-0: 0;
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  --spacing-24: 6rem;
  --spacing-32: 8rem;
  --spacing-40: 10rem;
  
  --shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-4: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-5: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px hsl(var(--primary) / 0.3);
  
  --transition-fast: 150ms ease-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  
  --breakpoint-xs: 480px;
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

.prose {
  --tw-prose-body: hsl(var(--text));
  --tw-prose-headings: hsl(var(--text));
  --tw-prose-lead: hsl(228 10% 60%);
  --tw-prose-links: hsl(var(--primary));
  --tw-prose-bold: hsl(var(--text));
  --tw-prose-counters: hsl(228 10% 60%);
  --tw-prose-bullets: hsl(var(--muted));
  --tw-prose-hr: hsl(var(--border));
  --tw-prose-quotes: hsl(var(--text));
  --tw-prose-quote-borders: hsl(var(--primary));
  --tw-prose-captions: hsl(228 10% 60%);
  --tw-prose-kbd: hsl(var(--text));
  --tw-prose-kbd-shadows: rgba(0, 0, 0, 0.3);
  --tw-prose-code: hsl(var(--text));
  --tw-prose-pre-code: hsl(228 10% 80%);
  --tw-prose-pre-bg: hsl(228 26% 12%);
  --tw-prose-th-borders: hsl(var(--border));
  --tw-prose-td-borders: hsl(var(--border));
  --tw-prose-invert-body: hsl(228 10% 80%);
  --tw-prose-invert-headings: hsl(0 0% 100%);
  --tw-prose-invert-lead: hsl(228 10% 60%);
  --tw-prose-invert-links: hsl(var(--primary));
  --tw-prose-invert-bold: hsl(0 0% 100%);
  --tw-prose-invert-counters: hsl(228 10% 60%);
  --tw-prose-invert-bullets: hsl(228 10% 40%);
  --tw-prose-invert-hr: hsl(var(--border));
  --tw-prose-invert-quotes: hsl(0 0% 100%);
  --tw-prose-invert-quote-borders: hsl(var(--primary));
  --tw-prose-invert-captions: hsl(228 10% 60%);
  --tw-prose-invert-kbd: hsl(0 0% 100%);
  --tw-prose-invert-kbd-shadows: rgba(0, 0, 0, 0.3);
  --tw-prose-invert-code: hsl(0 0% 100%);
  --tw-prose-invert-pre-code: hsl(228 10% 80%);
  --tw-prose-invert-pre-bg: rgba(0, 0, 0, 0.5);
  --tw-prose-invert-th-borders: hsl(228 10% 40%);
  --tw-prose-invert-td-borders: hsl(var(--border));
  font-size: clamp(0.9375rem, 1vw + 0.75rem, 1rem);
  line-height: 1.75;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid hsl(var(--border));
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: clamp(0.875rem, 1vw + 0.5rem, 1rem);
  line-height: 1.6;
  color: hsl(var(--text));
  background-color: hsl(var(--background));
  min-height: 100vh;
  overflow-x: hidden;
}

img, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: hsl(var(--primary));
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: hsl(var(--text));
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2.5rem);
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.25rem, 2vw + 0.5rem, 1.875rem);
  line-height: 1.3;
}

h4 {
  font-size: clamp(1.125rem, 1.5vw + 0.5rem, 1.5rem);
  line-height: 1.4;
}

h5 {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.4;
}

h6 {
  font-size: clamp(0.875rem, 0.8vw + 0.5rem, 1rem);
  line-height: 1.5;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  overflow-wrap: break-word;
  margin-bottom: var(--spacing-4);
}

small, .text-small {
  font-size: 0.875rem;
  line-height: 1.5;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1.5;
}

.text-caption {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
}

.text-overline {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--primary));
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.text-balance {
  text-wrap: balance;
}

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--spacing-5);
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
    padding-inline: var(--spacing-6);
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
    padding-inline: var(--spacing-8);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
    padding-inline: var(--spacing-8);
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
    padding-inline: var(--spacing-10);
  }
}

.container-narrow {
  max-width: 48rem;
  margin-inline: auto;
  padding-inline: var(--spacing-5);
}

@media (min-width: 768px) {
  .container-narrow {
    padding-inline: var(--spacing-8);
  }
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--spacing-2);
}

.gap-4 {
  gap: var(--spacing-4);
}

.gap-6 {
  gap: var(--spacing-6);
}

.gap-8 {
  gap: var(--spacing-8);
}

.section {
  padding-block: var(--spacing-12);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--spacing-16);
  }
}

@media (min-width: 1024px) {
  .section {
    padding-block: var(--spacing-20);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  padding: 0.875rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  border-radius: calc(var(--radius) * 1.5);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-2);
}

.btn-primary:hover {
  background-color: hsl(270 95% 50%);
  box-shadow: var(--shadow-3), var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  border-color: hsl(var(--secondary));
  color: hsl(var(--secondary));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  transform: translateY(-2px);
}

.btn-ghost {
  background-color: transparent;
  color: hsl(var(--text));
}

.btn-ghost:hover {
  background-color: hsl(var(--muted));
}

.btn-danger {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-danger:hover {
  background-color: hsl(0 84% 70%);
}

.btn-sm {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.5);
  padding: var(--spacing-6);
  box-shadow: var(--shadow-2);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-4);
}

.card-borderless {
  border-color: transparent;
}

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: hsl(var(--text));
  background-color: hsl(var(--input));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.5);
  transition: all var(--transition-fast);
}

.input::placeholder {
  color: hsl(var(--muted-foreground));
}

.input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius);
  background-color: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
}

.badge-success {
  background-color: hsl(var(--success) / 0.15);
  color: hsl(var(--success));
}

.badge-warning {
  background-color: hsl(var(--warning) / 0.15);
  color: hsl(var(--warning));
}

.badge-error {
  background-color: hsl(var(--error) / 0.15);
  color: hsl(var(--error));
}

.elevation-1 {
  box-shadow: var(--shadow-1);
}

.elevation-2 {
  box-shadow: var(--shadow-2);
}

.elevation-3 {
  box-shadow: var(--shadow-3);
}

.elevation-4 {
  box-shadow: var(--shadow-4);
}

.elevation-5 {
  box-shadow: var(--shadow-5);
}

.rounded-sm {
  border-radius: calc(var(--radius) * 0.5);
}

.rounded {
  border-radius: var(--radius);
}

.rounded-md {
  border-radius: calc(var(--radius) * 1.5);
}

.rounded-lg {
  border-radius: calc(var(--radius) * 2);
}

.rounded-xl {
  border-radius: calc(var(--radius) * 3);
}

.rounded-full {
  border-radius: 9999px;
}

.animate-fade-in {
  animation: fadeIn 500ms ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 500ms ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, hsl(var(--muted)) 25%, hsl(228 19% 30%) 50%, hsl(var(--muted)) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

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

.bg-gradient-brand {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
}

.focus-visible:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.posts-archive-grid img {
  aspect-ratio: 16 / 9;
}