
:root {
  --font-primary: 'Outfit', -apple-system, sans-serif;
  --font-heading: 'Outfit', -apple-system, sans-serif;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f3ff;
  --bg-card: #ffffff;
  --text-primary: #1e1b4b;
  --text-secondary: #6b6394;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-light: #ede9fe;
  --border: #e9e5f5;
  --shadow: 0 2px 8px rgba(124,58,237,0.08);
  --shadow-hover: 0 8px 24px rgba(124,58,237,0.15);
  --radius: 12px;
  --header-bg: rgba(255,255,255,0.9);
  --header-text: #1e1b4b;
  --footer-bg: #1e1b4b;
  --footer-text: #c4b5fd;
  --hero-bg: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #c4b5fd 100%);
  --hero-text: #ffffff;
  --category-bg: #ede9fe;
  --tag-bg: #ede9fe;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem; font-weight: 700;
  color: var(--header-text); text-decoration: none;
}
.nav-menu { display: flex; align-items: center; gap: 24px; }
.nav-menu a { color: var(--header-text); font-size: 0.95rem; font-weight: 500; opacity: 0.85; transition: opacity 0.2s; }
.nav-menu a:hover { opacity: 1; color: var(--accent); }
.menu-toggle { display: none; background: none; border: none; color: var(--header-text); font-size: 1.5rem; cursor: pointer; }
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-hover);
  min-width: 180px; padding: 8px 0; z-index: 200;
}
.dropdown-menu.show { display: block; }
.dropdown-menu a { display: block; padding: 8px 16px; color: var(--text-primary); font-size: 0.9rem; }
.dropdown-menu a:hover { background: var(--bg-secondary); }

/* Hero */
.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 60px 0;
  text-align: center;
  border-radius: var(--radius);
  margin: 24px 0;
}
.hero h1 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 12px; }
.hero-subtitle { font-size: 1.15rem; opacity: 0.85; max-width: 640px; margin: 0 auto; }

/* Posts Grid */
.posts-section { padding: 40px 0; }
.section-title { font-family: var(--font-heading); font-size: 1.6rem; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--accent); display: inline-block; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.post-card-body { padding: 24px; }
.post-category {
  display: inline-block;
  background: var(--category-bg);
  color: var(--accent);
  font-size: 0.78rem; font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.post-title { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 10px; line-height: 1.4; }
.post-title a { color: var(--text-primary); }
.post-title a:hover { color: var(--accent); }
.post-excerpt { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; gap: 12px; font-size: 0.82rem; color: var(--text-secondary); }

/* Categories Grid */
.categories-section { padding: 40px 0; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.category-card {
  background: var(--category-bg);
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--text-primary);
  border: 1px solid transparent;
}
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--accent); color: var(--text-primary); }
.category-card h3 { font-size: 1rem; margin-bottom: 6px; }
.category-card p { font-size: 0.85rem; color: var(--text-secondary); }

/* Single Post */
.single-post { max-width: 780px; margin: 0 auto; padding: 40px 0; }
.post-header { margin-bottom: 32px; }
.post-header h1 { font-family: var(--font-heading); font-size: 2.2rem; line-height: 1.3; margin: 12px 0 16px; }
.post-header .post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-secondary); font-size: 0.9rem; }
.meta-sep { opacity: 0.5; }
.post-content { font-size: 1.05rem; line-height: 1.8; }
.post-content h2 { font-family: var(--font-heading); font-size: 1.5rem; margin: 32px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { margin: 16px 0; padding-left: 28px; }
.post-content li { margin-bottom: 8px; }
.post-tags { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--tag-bg); padding: 4px 12px; border-radius: 20px; font-size: 0.82rem; color: var(--text-secondary); }
.post-navigation { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.post-navigation a { font-weight: 500; }
.ad-placeholder { margin: 32px auto; max-width: 780px; min-height: 90px; text-align: center; }

/* Static Pages */
.static-page { max-width: 780px; margin: 0 auto; padding: 40px 0; }
.page-content h2 { font-family: var(--font-heading); font-size: 1.8rem; margin: 24px 0 16px; }
.page-content h3 { font-family: var(--font-heading); font-size: 1.3rem; margin: 20px 0 12px; }
.page-content p { margin-bottom: 16px; line-height: 1.8; }
.page-content ul { margin: 12px 0; padding-left: 24px; }
.page-content li { margin-bottom: 8px; }
.contact-info { background: var(--bg-secondary); padding: 20px; border-radius: var(--radius); margin: 16px 0; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 48px 0 24px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { color: var(--bg-primary); font-size: 1rem; margin-bottom: 14px; font-family: var(--font-heading); }
.footer-col p { font-size: 0.9rem; line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--footer-text); font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.85rem; }

/* Post Hero Image */
.post-hero-image {
  margin: 0 0 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}
.post-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
}
.post-hero-image figcaption {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-light);
  background: var(--card-bg);
  text-align: center;
  font-style: italic;
}

/* Article Card Thumbnails */
.post-card-image {
  display: block;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}
.post-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

/* Inline Article Images */
.article-image {
  margin: 2rem 0;
  border-radius: 10px;
  overflow: hidden;
}
.article-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}
.article-image figcaption {
  padding: 10px 0;
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  font-style: italic;
}

/* Video Embed */
.video-embed {
  margin: 2.5rem 0;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.video-embed h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--heading-color);
}
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-caption {
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--header-bg); padding: 16px 20px; box-shadow: var(--shadow-hover); }
  .nav-menu.active { display: flex; }
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 40px 20px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-header h1 { font-size: 1.6rem; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .post-card-image img { height: 180px; }
}
@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
  body { font-size: 15px; }
  .post-card-image img { height: 160px; }
}
