/* ===== Brand System ===== */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-light: #3b82f6;
  --accent: #34d399;
  --surface-dark: #1a1a2e;
  --surface-darker: #0f172a;
  --text-muted: #64748b;
  --card-border: rgba(0,0,0,0.06);
  --card-shadow: 0 2px 12px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 20px rgba(0,0,0,0.08);
}

.dark {
  --card-border: rgba(255,255,255,0.06);
  --card-shadow: 0 2px 12px rgba(0,0,0,0.2);
  --card-shadow-hover: 0 4px 20px rgba(0,0,0,0.3);
}

/* ===== Homepage Hero ===== */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(52,211,153,0.1));
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(37,99,235,0.15);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--secondary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand);
  color: #fff !important;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}

.hero-cta:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

.hero-meta {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Features Grid ===== */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2rem 0 3rem;
}

@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}

.feature-card {
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s;
  background: var(--entry);
}

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

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--secondary);
  margin: 0;
  line-height: 1.5;
}

/* ===== Course Section ===== */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.section-label--seo { background: rgba(37,99,235,0.1); color: #2563eb; }
.section-label--geo { background: rgba(52,211,153,0.1); color: #059669; }
.section-label--platform { background: rgba(168,85,247,0.1); color: #7c3aed; }
.section-label--measure { background: rgba(245,158,11,0.1); color: #d97706; }

.week-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.week-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.15s;
  background: var(--entry);
}

.week-card:hover {
  border-color: var(--brand);
  box-shadow: var(--card-shadow-hover);
}

.week-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
}

.week-num--seo { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.week-num--geo { background: linear-gradient(135deg, #059669, #34d399); }
.week-num--platform { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.week-num--measure { background: linear-gradient(135deg, #d97706, #fbbf24); }

.week-info { flex: 1; min-width: 0; }

.week-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.week-desc {
  font-size: 0.85rem;
  color: var(--secondary);
  margin: 0;
}

.week-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
  align-self: center;
}

.week-badge--free {
  background: rgba(52,211,153,0.1);
  color: #059669;
}

.week-badge--paid {
  background: rgba(100,116,139,0.1);
  color: var(--text-muted);
}

/* ===== Bottom CTA ===== */
.bottom-cta {
  text-align: center;
  padding: 3rem 2rem;
  margin: 2rem 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #e2e8f0;
}

.bottom-cta h2 {
  color: #fff;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  border: none;
}

.bottom-cta p {
  color: #94a3b8;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.bottom-cta .hero-cta {
  background: #fff;
  color: var(--surface-dark) !important;
}

.bottom-cta .hero-cta:hover {
  background: #f1f5f9;
}

/* ===== Course Directory (list page) ===== */
.course-section-title {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--card-border);
}

/* ===== Lesson Page Enhancements ===== */

/* TOC styling */
.post-content .toc {
  border-radius: 10px;
  border: 1px solid var(--card-border);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  background: var(--code-bg, #f8fafc);
}

.post-content .toc summary {
  font-weight: 700;
  cursor: pointer;
}

/* Blockquote as callout */
.post-content blockquote {
  border-left: 3px solid var(--brand, #2563eb);
  background: rgba(37, 99, 235, 0.04);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.dark .post-content blockquote {
  background: rgba(37, 99, 235, 0.08);
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.post-content th {
  background: var(--code-bg, #f8fafc);
  font-weight: 700;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--card-border);
}

.post-content td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--card-border);
}

.post-content tr:last-child td {
  border-bottom: none;
}

/* Headings with subtle anchor */
.post-content h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--card-border);
}

/* Lists */
.post-content ul, .post-content ol {
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.3rem;
  line-height: 1.7;
}

/* Inline code */
.post-content code:not(pre code) {
  background: var(--code-bg, #f3f4f6);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
}

/* Post nav links at bottom */
.post-nav-links a {
  border-radius: 8px;
  border: 1px solid var(--card-border);
  padding: 0.75rem 1rem;
  transition: border-color 0.15s;
}

.post-nav-links a:hover {
  border-color: var(--brand, #2563eb);
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

/* Reading time / word count meta */
.post-meta {
  font-size: 0.85rem;
}
