
:root {
  --primary: #6366f1;
  --secondary: #9ca3af;
  --accent: #fbbf24;
  --bg: #111827;
  --text: #f9fafb;
  --text-muted: #6b7280;
  --bg-offset: #f9fafb;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-headings: 'Outfit', var(--font-sans);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.85;
}

/* Header & Nav */
header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

/* Hero Section */
.hero {
  padding: 4rem 1.5rem;
  text-align: center;
  background: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.04) 0%, rgba(245, 158, 11, 0.02) 90%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Layout */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem 1.5rem;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Card */
.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

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

.post-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.post-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.post-card-category {
  display: inline-block;
  background-color: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.post-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.post-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  flex-grow: 1;
}

.read-more {
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Single Post Layout */
.post-header {
  text-align: center;
  max-width: 800px;
  margin: 2rem auto 3rem auto;
}

.post-meta {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

.post-hero-image {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 auto 3rem auto;
  display: block;
}

.post-content {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.75;
}

.post-content h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem 0;
}

.post-content h3 {
  font-size: 1.35rem;
  margin: 1.5rem 0 1rem 0;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content ul, .post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.5rem 0;
}

.post-footer {
  max-width: 700px;
  margin: 4rem auto 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.author-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--bg-offset);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.author-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.author-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* FAQ Section */
.faq-section {
  max-width: 700px;
  margin: 4rem auto 0 auto;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.faq-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.faq-item {
  margin-bottom: 1.5rem;
  background-color: var(--bg-offset);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: var(--radius);
}

.faq-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

/* Social Share */
.share-bar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.share-btn {
  background: var(--bg-offset);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.share-btn:hover {
  background: var(--border);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg-offset);
  padding: 3rem 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Reading Progress */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background-color: var(--accent);
  width: 0%;
  z-index: 101;
  transition: width 0.1s;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }
}
