/*
Theme Name: CareerCompanion Magazine
Theme URI: https://careercompanion.com
Author: CareerCompanion Team
Author URI: https://careercompanion.com
Description: A premium magazine-style blog theme for CareerCompanion — career mentorship platform. Features indigo-to-green gradient accents, rounded-xl cards, badge pills, reading time indicators, auto-generated TOC, category filtering, and full SEO integration.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: career-companion
Tags: blog, magazine, education, custom-menu, featured-images, threaded-comments
*/

/* ============================================================
   DESIGN TOKENS / CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Brand colors */
  --cc-indigo-50:  #eef2ff;
  --cc-indigo-100: #e0e7ff;
  --cc-indigo-200: #c7d2fe;
  --cc-indigo-300: #a5b4fc;
  --cc-indigo-400: #818cf8;
  --cc-indigo-500: #6366f1;
  --cc-indigo-600: #4f46e5;
  --cc-indigo-700: #4338ca;
  --cc-indigo-800: #3730a3;
  --cc-indigo-900: #312e81;

  --cc-green-50:  #ecfdf5;
  --cc-green-100: #d1fae5;
  --cc-green-200: #a7f3d0;
  --cc-green-300: #6ee7b7;
  --cc-green-400: #34d399;
  --cc-green-500: #10b981;
  --cc-green-600: #059669;
  --cc-green-700: #047857;

  /* Neutrals */
  --cc-gray-50:  #f9fafb;
  --cc-gray-100: #f3f4f6;
  --cc-gray-200: #e5e7eb;
  --cc-gray-300: #d1d5db;
  --cc-gray-400: #9ca3af;
  --cc-gray-500: #6b7280;
  --cc-gray-600: #4b5563;
  --cc-gray-700: #374151;
  --cc-gray-800: #1f2937;
  --cc-gray-900: #111827;
  --cc-gray-950: #030712;

  /* Semantic */
  --cc-bg:        #ffffff;
  --cc-bg-alt:    var(--cc-gray-50);
  --cc-surface:   #ffffff;
  --cc-text:      var(--cc-gray-900);
  --cc-text-secondary: var(--cc-gray-500);
  --cc-text-tertiary:  var(--cc-gray-400);
  --cc-border:    var(--cc-gray-200);
  --cc-primary:   var(--cc-indigo-600);
  --cc-primary-hover: var(--cc-indigo-700);
  --cc-accent:    var(--cc-green-500);

  /* Gradients */
  --cc-gradient-hero:    linear-gradient(135deg, var(--cc-indigo-600) 0%, var(--cc-green-500) 100%);
  --cc-gradient-hero-overlay: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
  --cc-gradient-pill:    linear-gradient(135deg, var(--cc-indigo-500) 0%, var(--cc-green-500) 100%);
  --cc-gradient-subtle:  linear-gradient(135deg, var(--cc-indigo-50) 0%, var(--cc-green-50) 100%);

  /* Shadows */
  --cc-shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --cc-shadow:     0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --cc-shadow-md:  0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --cc-shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --cc-shadow-xl:  0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

  /* Radii */
  --cc-radius-sm:  0.375rem;
  --cc-radius:     0.5rem;
  --cc-radius-md:  0.625rem;
  --cc-radius-lg:  0.75rem;
  --cc-radius-xl:  1rem;
  --cc-radius-2xl: 1.25rem;
  --cc-radius-full: 9999px;

  /* Typography */
  --cc-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cc-font-display: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --cc-container-max: 1280px;
  --cc-container-padding: 1.5rem;

  /* Transitions */
  --cc-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --cc-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  line-height: 1.5;
}

body {
  font-family: var(--cc-font-sans);
  color: var(--cc-text);
  background: var(--cc-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--cc-transition);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.cc-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--cc-gradient-pill);
  z-index: 9999;
  transition: width 50ms linear;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.cc-container {
  max-width: var(--cc-container-max);
  margin: 0 auto;
  padding: 0 var(--cc-container-padding);
}

.cc-container--narrow {
  max-width: 820px;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.cc-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--cc-border);
  transition: box-shadow var(--cc-transition);
}

.cc-header.scrolled {
  box-shadow: var(--cc-shadow-md);
}

.cc-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.cc-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--cc-gray-900);
}

.cc-header__brand svg,
.cc-header__brand img {
  width: 36px;
  height: 36px;
}

.cc-header__brand-text {
  background: var(--cc-gradient-pill);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cc-header__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.cc-header__nav ul,
.cc-header__nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.cc-header__nav li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
}

.cc-header__nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cc-gray-600);
  border-radius: var(--cc-radius-lg);
  transition: all var(--cc-transition);
}

.cc-header__nav-link:hover {
  color: var(--cc-primary);
  background: var(--cc-indigo-50);
}

.cc-header__nav-link--active {
  color: var(--cc-primary);
  background: var(--cc-indigo-50);
  font-weight: 600;
}

.cc-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--cc-gradient-pill);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--cc-radius-full);
  transition: transform var(--cc-transition), box-shadow var(--cc-transition);
  margin-left: 0.75rem;
}

.cc-header__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Mobile menu toggle */
.cc-header__mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--cc-radius);
  color: var(--cc-gray-700);
}

.cc-header__mobile-toggle:hover {
  background: var(--cc-gray-100);
}

/* Mobile nav overlay */
.cc-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--cc-transition-slow);
}

.cc-mobile-nav.active {
  opacity: 1;
}

.cc-mobile-nav__panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--cc-bg);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform var(--cc-transition-slow);
  overflow-y: auto;
}

.cc-mobile-nav.active .cc-mobile-nav__panel {
  transform: translateX(0);
}

.cc-mobile-nav__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--cc-radius);
  margin-left: auto;
  margin-bottom: 1.5rem;
  color: var(--cc-gray-500);
}

.cc-mobile-nav__close:hover {
  background: var(--cc-gray-100);
}

.cc-mobile-nav__link {
  display: block;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--cc-gray-700);
  border-radius: var(--cc-radius);
  transition: all var(--cc-transition);
}

.cc-mobile-nav__link:hover,
.cc-mobile-nav__link--active {
  color: var(--cc-primary);
  background: var(--cc-indigo-50);
}

/* ============================================================
   HERO SECTION (Magazine Home)
   ============================================================ */
.cc-hero {
  padding: 2.5rem 0 0;
}

.cc-hero__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  min-height: 460px;
}

/* Main featured post */
.cc-hero__main {
  position: relative;
  border-radius: var(--cc-radius-2xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.cc-hero__main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.cc-hero__main:hover .cc-hero__main-img {
  transform: scale(1.03);
}

.cc-hero__main-overlay {
  position: absolute;
  inset: 0;
  background: var(--cc-gradient-hero-overlay);
}

.cc-hero__main-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  color: #fff;
}

.cc-hero__main-content .cc-pill {
  margin-bottom: 1rem;
}

.cc-hero__main-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.cc-hero__main-title a {
  color: #fff;
}

.cc-hero__main-title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc-hero__main-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 540px;
  margin-bottom: 1rem;
}

.cc-hero__main-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  opacity: 0.8;
}

/* Secondary featured posts */
.cc-hero__secondary {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cc-hero__secondary-card {
  flex: 1;
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-xl);
  transition: all var(--cc-transition);
}

.cc-hero__secondary-card:hover {
  box-shadow: var(--cc-shadow-lg);
  border-color: var(--cc-indigo-200);
  transform: translateY(-2px);
}

.cc-hero__secondary-img-wrap {
  width: 140px;
  min-height: 120px;
  flex-shrink: 0;
  border-radius: var(--cc-radius-lg);
  overflow: hidden;
}

.cc-hero__secondary-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cc-hero__secondary-card:hover .cc-hero__secondary-img {
  transform: scale(1.05);
}

.cc-hero__secondary-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
}

.cc-hero__secondary-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cc-gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cc-hero__secondary-title a:hover {
  color: var(--cc-primary);
}

.cc-hero__secondary-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--cc-text-secondary);
}

/* ============================================================
   CATEGORY FILTER BAR
   ============================================================ */
.cc-filter-bar {
  padding: 2rem 0;
  position: sticky;
  top: 72px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cc-filter-bar__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.25rem;
}

.cc-filter-bar__inner::-webkit-scrollbar {
  display: none;
}

.cc-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--cc-gray-600);
  background: var(--cc-gray-100);
  border: 1px solid transparent;
  border-radius: var(--cc-radius-full);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--cc-transition);
  text-decoration: none;
}

.cc-filter-pill:hover {
  color: var(--cc-primary);
  background: var(--cc-indigo-50);
  border-color: var(--cc-indigo-200);
}

.cc-filter-pill--active,
.cc-filter-pill.active {
  color: #fff;
  background: var(--cc-gradient-pill);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.cc-filter-pill__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(255,255,255,0.25);
  border-radius: var(--cc-radius-full);
}

.cc-filter-pill--active .cc-filter-pill__count {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* ============================================================
   MAGAZINE GRID
   ============================================================ */
.cc-magazine {
  padding: 0 0 4rem;
}

.cc-magazine__layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

.cc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ============================================================
   POST CARD
   ============================================================ */
.cc-card {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-xl);
  overflow: hidden;
  transition: all var(--cc-transition);
  display: flex;
  flex-direction: column;
}

.cc-card:hover {
  box-shadow: var(--cc-shadow-lg);
  border-color: var(--cc-indigo-200);
  transform: translateY(-3px);
}

.cc-card__img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.cc-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cc-card:hover .cc-card__img {
  transform: scale(1.05);
}

.cc-card__img-overlay {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  z-index: 2;
}

.cc-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cc-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: var(--cc-gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cc-card__title a:hover {
  color: var(--cc-primary);
}

.cc-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--cc-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
  flex: 1;
}

.cc-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--cc-gray-100);
}

.cc-card__author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cc-card__avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--cc-radius-full);
  object-fit: cover;
  border: 2px solid var(--cc-indigo-100);
}

.cc-card__author-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--cc-gray-700);
}

.cc-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--cc-text-tertiary);
}

.cc-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.cc-card__meta-item svg {
  width: 14px;
  height: 14px;
}

/* ============================================================
   PILLS / BADGES
   ============================================================ */
.cc-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--cc-radius-full);
  white-space: nowrap;
}

.cc-pill--gradient {
  background: var(--cc-gradient-pill);
  color: #fff;
}

.cc-pill--indigo {
  background: var(--cc-indigo-100);
  color: var(--cc-indigo-700);
}

.cc-pill--green {
  background: var(--cc-green-100);
  color: var(--cc-green-700);
}

.cc-pill--outline {
  background: transparent;
  color: var(--cc-indigo-600);
  border: 1px solid var(--cc-indigo-200);
}

.cc-pill--white {
  background: rgba(255,255,255,0.2);
  color: #fff;
  backdrop-filter: blur(4px);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.cc-sidebar {
  position: sticky;
  top: 140px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cc-sidebar-widget {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius-xl);
  padding: 1.5rem;
}

.cc-sidebar-widget__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--cc-gray-900);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cc-sidebar-widget__title::before {
  content: '';
  width: 3px;
  height: 1.125rem;
  background: var(--cc-gradient-pill);
  border-radius: var(--cc-radius-full);
}

/* Popular post item */
.cc-popular-item {
  display: flex;
  gap: 0.875rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--cc-gray-100);
  transition: all var(--cc-transition);
}

.cc-popular-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cc-popular-item:first-child {
  padding-top: 0;
}

.cc-popular-item__rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cc-primary);
  background: var(--cc-indigo-50);
  border-radius: var(--cc-radius);
}

.cc-popular-item__body {
  min-width: 0;
}

.cc-popular-item__title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cc-gray-800);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--cc-transition);
}

.cc-popular-item__title:hover {
  color: var(--cc-primary);
}

.cc-popular-item__meta {
  font-size: 0.6875rem;
  color: var(--cc-text-tertiary);
  margin-top: 0.25rem;
}

/* Newsletter widget */
.cc-newsletter {
  background: var(--cc-gradient-subtle);
  border: 1px solid var(--cc-indigo-100);
}

.cc-newsletter__text {
  font-size: 0.8125rem;
  color: var(--cc-gray-600);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.cc-newsletter__form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.cc-newsletter__input {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  border: 1px solid var(--cc-indigo-200);
  border-radius: var(--cc-radius-lg);
  background: #fff;
  color: var(--cc-gray-900);
  outline: none;
  transition: border-color var(--cc-transition), box-shadow var(--cc-transition);
  font-family: var(--cc-font-sans);
}

.cc-newsletter__input:focus {
  border-color: var(--cc-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.cc-newsletter__btn {
  width: 100%;
  padding: 0.625rem 1rem;
  background: var(--cc-gradient-pill);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--cc-radius-lg);
  transition: transform var(--cc-transition), box-shadow var(--cc-transition);
}

.cc-newsletter__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.cc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 3rem;
}

.cc-pagination a,
.cc-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--cc-radius-lg);
  color: var(--cc-gray-600);
  border: 1px solid var(--cc-border);
  transition: all var(--cc-transition);
}

.cc-pagination a:hover {
  color: var(--cc-primary);
  border-color: var(--cc-indigo-200);
  background: var(--cc-indigo-50);
}

.cc-pagination .current {
  background: var(--cc-gradient-pill);
  color: #fff;
  border-color: transparent;
}

.cc-pagination .dots {
  border: none;
  color: var(--cc-text-tertiary);
}

/* ============================================================
   SINGLE POST PAGE
   ============================================================ */
.cc-article-hero {
  position: relative;
  width: 100%;
  min-height: 400px;
  max-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.cc-article-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cc-article-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
}

.cc-article-hero__content {
  position: relative;
  z-index: 2;
  padding: 3rem;
  max-width: var(--cc-container-max);
  margin: 0 auto;
  width: 100%;
  color: #fff;
}

.cc-article-hero__title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 780px;
  margin-bottom: 1.25rem;
}

.cc-article-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.cc-article-hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.cc-article-hero__meta-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.cc-article-hero__author-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--cc-radius-full);
  border: 2px solid rgba(255,255,255,0.5);
  object-fit: cover;
}

/* Breadcrumbs */
.cc-breadcrumbs {
  padding: 1.25rem 0;
  background: var(--cc-bg-alt);
  border-bottom: 1px solid var(--cc-border);
}

.cc-breadcrumbs__list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--cc-text-secondary);
  list-style: none;
}

.cc-breadcrumbs__list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cc-breadcrumbs__list a {
  color: var(--cc-text-secondary);
}

.cc-breadcrumbs__list a:hover {
  color: var(--cc-primary);
}

.cc-breadcrumbs__list .current {
  color: var(--cc-gray-900);
  font-weight: 500;
}

.cc-breadcrumbs__separator {
  color: var(--cc-text-tertiary);
  font-size: 0.75rem;
}

/* Article layout */
.cc-article-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding: 3rem 0 5rem;
  align-items: start;
}

.cc-article-layout--no-toc {
  grid-template-columns: 1fr;
  max-width: 820px;
  margin: 0 auto;
}

/* Table of Contents */
.cc-toc {
  position: sticky;
  top: 100px;
}

.cc-toc__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cc-text-tertiary);
  margin-bottom: 1rem;
}

.cc-toc__list {
  list-style: none;
  border-left: 2px solid var(--cc-gray-200);
  padding-left: 0;
}

.cc-toc__item {
  margin: 0;
}

.cc-toc__link {
  display: block;
  padding: 0.375rem 0 0.375rem 1rem;
  font-size: 0.8125rem;
  color: var(--cc-text-secondary);
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all var(--cc-transition);
  line-height: 1.4;
}

.cc-toc__link:hover {
  color: var(--cc-primary);
}

.cc-toc__link--active {
  color: var(--cc-primary);
  border-left-color: var(--cc-primary);
  font-weight: 600;
}

.cc-toc__link--h3 {
  padding-left: 2rem;
  font-size: 0.75rem;
}

/* Article content */
.cc-article-content {
  max-width: 740px;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--cc-gray-800);
}

.cc-article-content h2 {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--cc-gray-900);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
  scroll-margin-top: 100px;
}

.cc-article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cc-gray-900);
  margin: 2rem 0 0.75rem;
  line-height: 1.35;
  scroll-margin-top: 100px;
}

.cc-article-content p {
  margin-bottom: 1.25rem;
}

.cc-article-content a {
  color: var(--cc-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-article-content a:hover {
  color: var(--cc-primary-hover);
}

.cc-article-content img {
  border-radius: var(--cc-radius-xl);
  margin: 2rem 0;
}

.cc-article-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  background: var(--cc-gradient-subtle);
  border-left: 4px solid var(--cc-primary);
  border-radius: 0 var(--cc-radius-xl) var(--cc-radius-xl) 0;
  font-style: italic;
  color: var(--cc-gray-700);
}

.cc-article-content blockquote p:last-child {
  margin-bottom: 0;
}

.cc-article-content ul,
.cc-article-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

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

.cc-article-content pre {
  background: var(--cc-gray-900);
  color: var(--cc-gray-100);
  padding: 1.25rem 1.5rem;
  border-radius: var(--cc-radius-xl);
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.cc-article-content code {
  background: var(--cc-gray-100);
  padding: 0.125rem 0.375rem;
  border-radius: var(--cc-radius-sm);
  font-size: 0.875em;
  color: var(--cc-indigo-600);
}

.cc-article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Share buttons */
.cc-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--cc-border);
}

.cc-share__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--cc-gray-600);
  margin-right: 0.5rem;
}

.cc-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--cc-radius-lg);
  color: var(--cc-gray-500);
  border: 1px solid var(--cc-border);
  transition: all var(--cc-transition);
}

.cc-share__btn:hover {
  color: var(--cc-primary);
  border-color: var(--cc-indigo-200);
  background: var(--cc-indigo-50);
  transform: translateY(-2px);
}

.cc-share__btn svg {
  width: 18px;
  height: 18px;
}

.cc-share__toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--cc-gray-900);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--cc-radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all var(--cc-transition-slow);
  z-index: 9999;
}

.cc-share__toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Author bio */
.cc-author-bio {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--cc-gradient-subtle);
  border: 1px solid var(--cc-indigo-100);
  border-radius: var(--cc-radius-xl);
  margin: 3rem 0;
}

.cc-author-bio__avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--cc-radius-full);
  object-fit: cover;
  border: 3px solid var(--cc-indigo-200);
  flex-shrink: 0;
}

.cc-author-bio__name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--cc-gray-900);
  margin-bottom: 0.25rem;
}

.cc-author-bio__role {
  font-size: 0.8125rem;
  color: var(--cc-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.cc-author-bio__text {
  font-size: 0.875rem;
  color: var(--cc-gray-600);
  line-height: 1.6;
}

/* Related posts */
.cc-related {
  padding: 4rem 0;
  background: var(--cc-bg-alt);
}

.cc-related__title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

.cc-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ============================================================
   ARCHIVE / CATEGORY HEADER
   ============================================================ */
.cc-archive-header {
  padding: 3rem 0 2rem;
  background: var(--cc-gradient-subtle);
  border-bottom: 1px solid var(--cc-border);
}

.cc-archive-header__pill {
  margin-bottom: 0.75rem;
}

.cc-archive-header__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--cc-gray-900);
  margin-bottom: 0.5rem;
}

.cc-archive-header__desc {
  font-size: 1rem;
  color: var(--cc-text-secondary);
  max-width: 560px;
}

.cc-archive-header__count {
  font-size: 0.875rem;
  color: var(--cc-text-tertiary);
  margin-top: 0.75rem;
}

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.cc-search-header {
  padding: 3rem 0 2rem;
  text-align: center;
}

.cc-search-header__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--cc-gray-900);
  margin-bottom: 0.25rem;
}

.cc-search-header__query {
  color: var(--cc-primary);
}

.cc-search-header__count {
  font-size: 0.9375rem;
  color: var(--cc-text-secondary);
}

/* Inline search form */
.cc-search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin: 1.5rem auto 0;
}

.cc-search-form__input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  border: 2px solid var(--cc-border);
  border-radius: var(--cc-radius-full);
  outline: none;
  font-family: var(--cc-font-sans);
  transition: border-color var(--cc-transition);
}

.cc-search-form__input:focus {
  border-color: var(--cc-primary);
}

.cc-search-form__btn {
  padding: 0.75rem 1.5rem;
  background: var(--cc-gradient-pill);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--cc-radius-full);
  transition: transform var(--cc-transition), box-shadow var(--cc-transition);
}

.cc-search-form__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.cc-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 4rem 1.5rem;
}

.cc-404__code {
  font-size: 8rem;
  font-weight: 900;
  background: var(--cc-gradient-pill);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.cc-404__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cc-gray-900);
  margin-bottom: 0.75rem;
}

.cc-404__text {
  color: var(--cc-text-secondary);
  margin-bottom: 2rem;
  max-width: 440px;
}

.cc-404__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--cc-gradient-pill);
  color: #fff;
  font-weight: 600;
  border-radius: var(--cc-radius-full);
  transition: transform var(--cc-transition), box-shadow var(--cc-transition);
}

.cc-404__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

/* ============================================================
   FOOTER
   ============================================================ */
.cc-footer {
  background: var(--cc-gray-900);
  color: var(--cc-gray-400);
  padding: 4rem 0 0;
}

.cc-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cc-footer__brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.cc-footer__brand-text {
  background: var(--cc-gradient-pill);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cc-footer__desc {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 320px;
}

.cc-footer__col-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.cc-footer__links {
  list-style: none;
}

.cc-footer__links li {
  margin-bottom: 0.625rem;
}

.cc-footer__links a {
  font-size: 0.875rem;
  color: var(--cc-gray-400);
  transition: color var(--cc-transition);
}

.cc-footer__links a:hover {
  color: #fff;
}

.cc-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  font-size: 0.8125rem;
}

/* Back to top */
.cc-back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cc-gradient-pill);
  color: #fff;
  border-radius: var(--cc-radius-full);
  box-shadow: var(--cc-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--cc-transition-slow);
  z-index: 100;
}

.cc-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cc-back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

/* ============================================================
   NO POSTS / EMPTY STATE
   ============================================================ */
.cc-empty {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.cc-empty__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: var(--cc-text-tertiary);
}

.cc-empty__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cc-gray-800);
  margin-bottom: 0.5rem;
}

.cc-empty__text {
  color: var(--cc-text-secondary);
  font-size: 0.9375rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cc-animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.cc-animate-in:nth-child(2) { animation-delay: 0.1s; }
.cc-animate-in:nth-child(3) { animation-delay: 0.15s; }
.cc-animate-in:nth-child(4) { animation-delay: 0.2s; }
.cc-animate-in:nth-child(5) { animation-delay: 0.25s; }
.cc-animate-in:nth-child(6) { animation-delay: 0.3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cc-hero__grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .cc-hero__secondary {
    flex-direction: row;
  }

  .cc-hero__secondary-card {
    flex: 1;
  }

  .cc-magazine__layout {
    grid-template-columns: 1fr;
  }

  .cc-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .cc-article-layout {
    grid-template-columns: 1fr;
  }

  .cc-toc {
    position: static;
    padding: 1.25rem;
    background: var(--cc-bg-alt);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius-xl);
    margin-bottom: 2rem;
  }

  .cc-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --cc-container-padding: 1rem;
  }

  .cc-header__nav {
    display: none;
  }

  .cc-header__cta {
    display: none;
  }

  .cc-header__mobile-toggle {
    display: flex;
  }

  .cc-mobile-nav {
    display: block;
  }

  .cc-hero__main-title {
    font-size: 1.5rem;
  }

  .cc-hero__main-content {
    padding: 1.5rem;
  }

  .cc-hero__secondary {
    flex-direction: column;
  }

  .cc-hero__secondary-img-wrap {
    width: 100px;
    min-height: 90px;
  }

  .cc-grid {
    grid-template-columns: 1fr;
  }

  .cc-sidebar {
    grid-template-columns: 1fr;
  }

  .cc-related__grid {
    grid-template-columns: 1fr;
  }

  .cc-article-hero__title {
    font-size: 1.75rem;
  }

  .cc-article-hero__content {
    padding: 1.5rem;
  }

  .cc-footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cc-footer__bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .cc-author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cc-hero__main {
    min-height: 300px;
  }

  .cc-hero__secondary-card {
    flex-direction: column;
  }

  .cc-hero__secondary-img-wrap {
    width: 100%;
    min-height: 160px;
  }

  .cc-article-hero {
    min-height: 300px;
  }

  .cc-article-hero__title {
    font-size: 1.375rem;
  }
}
