/* JustIAM Blog Theme */
:root {
  --bg: #0a0a0f;
  --indigo: #6366f1;
  --violet: #8b5cf6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: #d1d5db;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.bg-dark { background: var(--bg); }
.font-sans { font-family: 'Inter', system-ui, sans-serif; }
.antialiased { -webkit-font-smoothing: antialiased; }

.max-w-3xl { max-width: 48rem; }
.max-w-6xl { max-width: 72rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.mt-16 { margin-top: 4rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.pt-8 { padding-top: 2rem; }
.p-6 { padding: 1.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.block { display: block; }

.h-16 { height: 4rem; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 1.1; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.tracking-tight { letter-spacing: -0.025em; }
.leading-relaxed { line-height: 1.7; }

.text-white { color: #fff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-indigo-400 { color: #818cf8; }
.text-indigo-300 { color: #a5b4fc; }

.rounded-full { border-radius: 9999px; }
.rounded-2xl { border-radius: 1rem; }
.overflow-hidden { overflow: hidden; }

.border-t { border-top: 1px solid; }
.border-b { border-bottom: 1px solid; }
.border-white\/5 { border-color: rgba(255,255,255,0.05); }

.transition-colors { transition: color 0.2s ease; }
.transition-opacity { transition: opacity 0.2s ease; }

.hover\:text-white:hover { color: #fff; }
.hover\:text-indigo-300:hover { color: #a5b4fc; }
.hover\:opacity-80:hover { opacity: 0.8; }
.hover\:bg-white\/\[0\.02\]:hover { background: rgba(255,255,255,0.02); }

.bg-indigo-500\/10 { background: rgba(99,102,241,0.1); }
.border-indigo-500\/20 { border-color: rgba(99,102,241,0.2); }

.blog-card {
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}
.blog-card:hover {
  border-color: rgba(99,102,241,0.3);
  box-shadow: 0 8px 40px rgba(99,102,241,0.08);
}

/* Post grid layout */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.post-card {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
  transition: all 0.3s ease;
}
.post-card:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(99,102,241,0.12);
}

.post-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-card-header {
  height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
}

/* Tag-based gradient colors */
.post-card-header--fundamentals {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}
.post-card-header--proxy {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}
.post-card-header--automation,
.post-card-header--scripting {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.post-card-header--access-control {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}
.post-card-header--events {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}
.post-card-header--default {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
}

.post-card-body {
  padding: 1.25rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.post-card-meta time {
  font-size: 0.75rem;
  color: #6b7280;
}
.post-card-tag {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(99,102,241,0.1);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.2);
  text-transform: lowercase;
}

.post-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.post-card-desc {
  font-size: 0.85rem;
  color: #9ca3af;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article content styling */
.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.article-content p {
  margin-bottom: 1.25rem;
  color: #d1d5db;
}
.article-content ul, .article-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.article-content li {
  margin-bottom: 0.5rem;
}
.article-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  background: rgba(99,102,241,0.1);
  color: #c4b5fd;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
}
.article-content pre {
  background: #0d0d18;
  border: 1px solid rgba(99,102,241,0.12);
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.article-content pre code {
  background: none;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.8;
}
.article-content a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-content a:hover {
  color: #a5b4fc;
}
.article-content blockquote {
  border-left: 3px solid rgba(99,102,241,0.4);
  padding-left: 1rem;
  margin-bottom: 1.25rem;
  color: #9ca3af;
  font-style: italic;
}
.article-content img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  max-width: 100%;
}
.article-content hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin: 2rem 0;
}

/* Pagination */
.pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.pagination a, .pagination span {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #9ca3af;
}
.pagination a:hover {
  background: rgba(99,102,241,0.1);
  color: #fff;
}
.pagination .active {
  background: rgba(99,102,241,0.2);
  color: #818cf8;
}

@media (max-width: 640px) {
  .text-4xl { font-size: 1.75rem; }
  .hidden-mobile { display: none; }
  .post-grid { grid-template-columns: 1fr; }
}
