/*
Theme Name: PitopyBlog
Description: A modern tech blog WordPress theme
Version: 1.0
Author: Pitopy
Text Domain: pitopyblog
*/

/* Tailwind CSS is loaded via CDN script in functions.php */

/* Custom CSS Variables - Design System */
:root { 
    --background: 225 25% 8%;
    --foreground: 225 10% 95%;
    --card: 225 20% 12%;
    --primary: 217 91% 65%;
    --primary-foreground: 225 25% 8%;
    --secondary: 225 15% 18%;
    --secondary-foreground: 225 10% 95%;
    --muted: 225 15% 18%;
    --muted-foreground: 225 8% 65%;
    --accent: 142 76% 45%;
    --border: 225 15% 18%;
    --ring: 217 91% 65%;
	--radius: 0.5rem;
    --tech-gradient: linear-gradient(135deg, hsl(217 91% 65%), hsl(142 76% 45%));
    --shadow-card: 0 8px 24px -8px hsl(217 91% 65% / 0.18);
    --card-hover: 0 10px 30px -10px hsl(217 91% 65% / 0.2);
}

[data-theme="light"] {
	--background: 0 0% 99%;
    --foreground: 225 15% 15%;
    --card: 0 0% 100%;
    --primary: 217 91% 60%;
    --primary-foreground: 0 0% 100%;
    --secondary: 225 10% 96%;
    --secondary-foreground: 225 15% 15%;
    --muted: 225 10% 96%;
    --muted-foreground: 225 8% 55%;
    --accent: 142 76% 36%;
    --border: 225 20% 92%;
    --ring: 217 91% 60%;
    --tech-gradient: linear-gradient(135deg, hsl(217 91% 60%), hsl(142 76% 36%));
    --shadow-card: 0 8px 24px -8px hsl(217 91% 60% / 0.12);
    --card-hover: 0 10px 30px -10px hsl(217 91% 60% / 0.15);
    --radius: 0.5rem;
}

/* Base styles */
body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Utility classes */
.bg-background { background-color: hsl(var(--background)); }
.text-foreground { color: hsl(var(--foreground)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.bg-card { background-color: hsl(var(--card)); }
.text-primary { color: hsl(var(--primary)); }
.bg-primary { background-color: hsl(var(--primary)); }
.border { border: 1px solid hsl(var(--border)); }

.bg-tech-gradient { 
  background: var(--tech-gradient);
}

.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

.text-transparent {
  color: transparent;
}

.shadow-card {
  box-shadow: var(--shadow-card);
}

.shadow-card-hover {
  box-shadow: var(--card-hover);
}

/* Loader spinner */
.spinner {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 3px solid hsl(var(--muted));
  border-top-color: hsl(var(--primary));
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: colors 0.15s;
}

.badge-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.badge-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.badge-outline {
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  cursor: pointer;
}

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

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

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

.btn:hover {
  opacity: 0.9;
}
.layout-switch-btn.text-muted-foreground:hover {
    background: hsl(var(--card));
    color: hsl(var(--foreground));
}
.z-60 {
	z-index: 60;
}
.listing-item img {
	filter: brightness(0.6);
}
.listing-item:hover img {
	filter: none;
}
/* Animation classes */
.animate-fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

/* Layout specific styles */
.masonry-grid {
  column-count: 1;
  column-gap: 1.5rem;
}

@media (min-width: 768px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .masonry-grid {
    column-count: 3;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

/* Minimal line-clamp utility fallbacks (ensures support without Tailwind plugin) */
.line-clamp-2, .line-clamp-3, .line-clamp-4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }
.line-clamp-4 { -webkit-line-clamp: 4; }
@media (min-width: 768px) {
  .md\:line-clamp-4 { -webkit-line-clamp: 4; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
}
/* Responsive utilities */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { max-width: 640px; }
}

@media (min-width: 768px) {
  .container { max-width: 768px; }
}

@media (min-width: 1024px) {
  .container { max-width: 1024px; }
}

@media (min-width: 1280px) {
  .container { max-width: 1280px; }
}

/* WordPress specific */
.wp-block-image {
  margin: 2rem 0;
}

.wp-block-quote {
  border-left: 4px solid hsl(var(--primary));
  padding-left: 1rem;
  margin: 2rem 0;
  font-style: italic;
}

/* Prose styles for post content */
.prose {
  max-width: none;
  color: hsl(var(--foreground));
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  color: hsl(var(--foreground));
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.875rem; }
.prose h3 { font-size: 1.5rem; }

.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.prose a {
  color: hsl(var(--primary));
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.prose ul, .prose ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose blockquote {
  border-left: 4px solid hsl(var(--primary));
  padding-left: 1rem;
  margin: 2rem 0;
  font-style: italic;
  color: hsl(var(--muted-foreground));
}

.prose code {
  background-color: hsl(var(--muted));
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.prose pre {
  background-color: hsl(var(--muted));
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.prose img {
  border-radius: 0.5rem;
  margin: 2rem 0;
}