/* ================================================================
   PhiloQuest — Main Stylesheet
   ================================================================ */

/* ── Variables ── */
:root {
  --blue-50: #f0f5ff;
  --blue-100: #e0ecff;
  --blue-200: #c2d9ff;
  --blue-300: #8fb8ff;
  --blue-400: #5a94f5;
  --blue-500: #3b72db;
  --blue-600: #2b5bb8;
  --blue-700: #1e4494;
  --blue-800: #162f6b;
  --blue-900: #0e1f47;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(14, 31, 71, 0.04);
  --shadow-md: 0 4px 16px rgba(14, 31, 71, 0.06);
  --shadow-lg: 0 12px 40px rgba(14, 31, 71, 0.08);
  --shadow-xl: 0 20px 60px rgba(14, 31, 71, 0.1);
}


/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--slate-50);
  color: var(--slate-700);
  min-height: 100vh;
  overflow-x: hidden;
}


/* ── Animations ── */
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.08); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* ── Ambient Background Orbs ── */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.bg-orb--1 {
  width: 500px;
  height: 500px;
  background: var(--blue-200);
  top: -120px;
  left: 50%;
  animation: drift 22s ease-in-out infinite alternate;
}

.bg-orb--2 {
  width: 350px;
  height: 350px;
  background: var(--blue-100);
  bottom: 10%;
  right: -60px;
  animation: drift 18s ease-in-out infinite alternate-reverse;
}


/* ================================================================
   Navigation
   ================================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--slate-200);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--blue-500);
  border-radius: 9px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(59, 114, 219, 0.3);
}

.logo-icon svg {
  width: 17px;
  height: 17px;
}

.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--slate-800);
}

.logo-text span {
  color: var(--blue-500);
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-link {
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--slate-500);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--blue-500);
  background: var(--blue-50);
}

.nav-link.active {
  color: var(--blue-600);
  font-weight: 500;
  background: var(--blue-50);
}


/* ================================================================
   Shared Components
   ================================================================ */

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 12px;
  color: var(--slate-400);
  margin-bottom: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.breadcrumb a {
  color: var(--slate-400);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--blue-500);
}

.breadcrumb svg {
  width: 12px;
  height: 12px;
}

/* ── Section Label ── */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.section-label span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-400);
  white-space: nowrap;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--slate-200);
}

.section-label--spaced {
  margin-top: 48px;
}

/* ── Avatar ── */
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-300), var(--blue-500));
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.avatar--md {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.avatar--lg {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 18px;
}

/* ── Meta Separator ── */
.meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--slate-300);
}

/* ── Button: Icon ── */
.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--slate-200);
  background: white;
  color: var(--slate-500);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  border-color: var(--blue-300);
  color: var(--blue-500);
  background: var(--blue-50);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* ── Pill / Chip ── */
.pill {
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--slate-200);
  background: white;
  font-size: 13px;
  font-weight: 400;
  color: var(--slate-500);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.pill:hover {
  border-color: var(--blue-300);
  color: var(--blue-500);
  background: var(--blue-50);
}

.pill.active {
  background: var(--blue-500);
  color: white;
  border-color: var(--blue-500);
  box-shadow: 0 2px 8px rgba(59, 114, 219, 0.25);
}

/* ── Tag ── */
.tag {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--slate-200);
  background: white;
  font-size: 12.5px;
  color: var(--slate-500);
  cursor: pointer;
  transition: all 0.2s;
}

.tag:hover {
  border-color: var(--blue-300);
  color: var(--blue-500);
  background: var(--blue-50);
}


/* ================================================================
   Footer
   ================================================================ */
.site-footer {
  border-top: 1px solid var(--slate-200);
  background: white;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-left p {
  font-size: 12px;
  color: var(--slate-400);
  font-weight: 300;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 12px;
  color: var(--slate-400);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--blue-500);
}


/* ================================================================
   Page: Explorer (front-page.php)
   ================================================================ */
.app {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header (explorer only) */
.explorer-header {
  padding: 48px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fadeUp 0.6s ease both;
}

.explorer-header .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.explorer-header .logo-icon svg {
  width: 20px;
  height: 20px;
}

.explorer-header .logo-text {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  gap: 8px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 0 40px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 300;
  color: var(--slate-800);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero h1 em {
  font-style: italic;
  color: var(--blue-500);
}

.hero p {
  font-size: 15px;
  color: var(--slate-400);
  font-weight: 300;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Search Bar */
.search-wrap {
  position: relative;
  margin-bottom: 32px;
  animation: fadeUp 0.6s 0.2s ease both;
}

.search-bar {
  display: flex;
  align-items: center;
  background: white;
  border: 1.5px solid var(--slate-200);
  border-radius: 14px;
  padding: 6px 6px 6px 18px;
  gap: 12px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.search-bar:focus-within {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 4px rgba(59, 114, 219, 0.1), var(--shadow-md);
}

.search-bar svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--slate-400);
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--slate-700);
  background: transparent;
}

.search-bar input::placeholder {
  color: var(--slate-300);
}

.search-btn {
  padding: 10px 22px;
  background: var(--blue-500);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(59, 114, 219, 0.25);
}

.search-btn:hover {
  background: var(--blue-600);
  box-shadow: 0 4px 16px rgba(59, 114, 219, 0.35);
  transform: translateY(-1px);
}

/* Filter Pills */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  animation: fadeUp 0.6s 0.3s ease both;
}

/* Question Cards */
.cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 22px 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blue-400);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.card-category {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-500);
  background: var(--blue-50);
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.card-difficulty {
  display: flex;
  gap: 3px;
}

.card-difficulty .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--slate-200);
}

.card-difficulty .dot.filled {
  background: var(--blue-400);
}

.card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--slate-800);
  line-height: 1.35;
  margin-bottom: 8px;
}

.card > p {
  font-size: 13.5px;
  color: var(--slate-400);
  line-height: 1.55;
  font-weight: 300;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--slate-100);
}

.card-tags {
  display: flex;
  gap: 6px;
}

.card-tag {
  font-size: 11px;
  color: var(--slate-400);
  background: var(--slate-50);
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--slate-100);
}

.card-action {
  font-size: 12px;
  font-weight: 500;
  color: var(--blue-500);
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover .card-action {
  opacity: 1;
}

.card-action svg {
  width: 14px;
  height: 14px;
}

/* Staggered card animations */
.card:nth-child(1) { animation: fadeUp 0.5s 0.4s ease both; }
.card:nth-child(2) { animation: fadeUp 0.5s 0.48s ease both; }
.card:nth-child(3) { animation: fadeUp 0.5s 0.56s ease both; }
.card:nth-child(4) { animation: fadeUp 0.5s 0.64s ease both; }

/* Generate Panel */
.generate-panel {
  background: white;
  border: 1.5px solid var(--blue-200);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-bottom: 48px;
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.6s 0.5s ease both;
  position: relative;
  overflow: hidden;
}

.generate-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-50) 0%, transparent 50%);
  pointer-events: none;
}

.generate-panel > * {
  position: relative;
}

.generate-panel h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--slate-800);
  margin-bottom: 6px;
}

.generate-panel > p {
  font-size: 13.5px;
  color: var(--slate-400);
  margin-bottom: 24px;
  font-weight: 300;
}

.gen-options {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.gen-opt {
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid var(--slate-200);
  background: white;
  font-size: 13px;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.gen-opt:hover {
  border-color: var(--blue-300);
  color: var(--blue-500);
}

.gen-opt.active {
  border-color: var(--blue-500);
  background: var(--blue-50);
  color: var(--blue-500);
  font-weight: 500;
}

.generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--blue-500);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(59, 114, 219, 0.3);
}

.generate-btn:hover {
  background: var(--blue-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 114, 219, 0.4);
}

.generate-btn svg {
  width: 18px;
  height: 18px;
}

.gen-result {
  margin-top: 24px;
  padding: 24px;
  background: var(--blue-50);
  border-radius: 12px;
  border: 1px solid var(--blue-100);
  display: none;
  text-align: left;
  animation: fadeIn 0.4s ease;
}

.gen-result.visible {
  display: block;
}

.gen-result-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-400);
  font-weight: 500;
  margin-bottom: 10px;
}

.gen-result h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--slate-800);
  line-height: 1.35;
  margin-bottom: 8px;
}

.gen-result p {
  font-size: 14px;
  color: var(--slate-500);
  line-height: 1.6;
  font-weight: 300;
}

.gen-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.gen-result-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--blue-200);
  background: white;
  color: var(--blue-500);
}

.gen-result-btn:hover {
  background: var(--blue-500);
  color: white;
}

/* Explorer-only footer (simpler) */
.explorer-footer {
  text-align: center;
  padding: 24px 0 40px;
  border-top: 1px solid var(--slate-100);
  animation: fadeUp 0.6s 0.6s ease both;
}

.explorer-footer p {
  font-size: 12px;
  color: var(--slate-300);
  font-weight: 300;
}


/* ================================================================
   Page: Blog Listing (home.php / archive.php)
   ================================================================ */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Page Header */
.page-header {
  padding: 52px 0 20px;
  animation: fadeUp 0.5s ease both;
}

.page-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 300;
  color: var(--slate-800);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-header h1 em {
  font-style: italic;
  color: var(--blue-500);
}

.page-header p {
  margin-top: 10px;
  font-size: 15px;
  color: var(--slate-400);
  font-weight: 300;
  max-width: 520px;
  line-height: 1.6;
}

/* Featured Article */
.featured {
  margin-bottom: 48px;
  animation: fadeUp 0.5s 0.1s ease both;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all 0.3s ease;
}

.featured-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.featured-img {
  position: relative;
  background: linear-gradient(135deg, var(--blue-100) 0%, var(--blue-200) 100%);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.featured-img-decor {
  position: absolute;
  inset: 0;
  opacity: 0.15;
}

.featured-img-decor .circle {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--blue-500);
}

.featured-img-decor .circle:nth-child(1) { width: 200px; height: 200px; top: 20%; left: 10%; }
.featured-img-decor .circle:nth-child(2) { width: 140px; height: 140px; top: 40%; left: 40%; }
.featured-img-decor .circle:nth-child(3) { width: 260px; height: 260px; top: 10%; right: -40px; }

.featured-img-icon {
  position: relative;
  z-index: 1;
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 20px;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 30px rgba(59, 114, 219, 0.15);
}

.featured-img-icon svg {
  width: 36px;
  height: 36px;
  color: var(--blue-500);
}

.featured-body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-500);
  background: var(--blue-50);
  padding: 5px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  width: fit-content;
}

.featured-badge .dot-live {
  width: 6px;
  height: 6px;
  background: var(--blue-400);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.featured-body h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--slate-800);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.featured-body > p {
  font-size: 14px;
  color: var(--slate-400);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 24px;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--slate-400);
}

.featured-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.featured-author span {
  font-weight: 500;
  color: var(--slate-600);
}

/* Content Grid (blog) */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  padding-bottom: 64px;
}

/* Article Cards (blog listing) */
.articles {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeUp 0.5s 0.2s ease both;
}

.article-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.article-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.article-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.article-thumb-bg {
  position: absolute;
  inset: 0;
}

.article-thumb svg {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  opacity: 0.5;
}

.article-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-cat {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-500);
  margin-bottom: 6px;
}

.article-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 500;
  color: var(--slate-800);
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.article-body > p {
  font-size: 13px;
  color: var(--slate-400);
  line-height: 1.55;
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--slate-400);
}

.article-footer .read-more {
  margin-left: auto;
  font-weight: 500;
  color: var(--blue-500);
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.article-card:hover .read-more {
  opacity: 1;
}

.read-more svg {
  width: 13px;
  height: 13px;
}

/* Staggered article card animations */
.article-card:nth-child(1) { animation: fadeUp 0.45s 0.22s ease both; }
.article-card:nth-child(2) { animation: fadeUp 0.45s 0.3s ease both; }
.article-card:nth-child(3) { animation: fadeUp 0.45s 0.38s ease both; }
.article-card:nth-child(4) { animation: fadeUp 0.45s 0.46s ease both; }
.article-card:nth-child(5) { animation: fadeUp 0.45s 0.54s ease both; }


/* ================================================================
   Sidebar
   ================================================================ */
.sidebar {
  animation: fadeUp 0.5s 0.3s ease both;
}

.sidebar-block {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-block h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 14px;
}

/* Sidebar Search */
.sidebar-search {
  display: flex;
  border: 1px solid var(--slate-200);
  border-radius: 9px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.sidebar-search:focus-within {
  border-color: var(--blue-400);
}

.sidebar-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--slate-700);
  background: transparent;
}

.sidebar-search input::placeholder {
  color: var(--slate-300);
}

.sidebar-search button {
  padding: 0 12px;
  background: var(--blue-50);
  border: none;
  color: var(--blue-500);
  cursor: pointer;
  transition: background 0.2s;
  display: grid;
  place-items: center;
}

.sidebar-search button:hover {
  background: var(--blue-100);
}

.sidebar-search button svg {
  width: 16px;
  height: 16px;
}

/* Topics */
.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.topic-chip {
  padding: 6px 13px;
  border-radius: 100px;
  border: 1px solid var(--slate-200);
  font-size: 12.5px;
  color: var(--slate-500);
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.topic-chip:hover {
  border-color: var(--blue-300);
  color: var(--blue-500);
  background: var(--blue-50);
}

/* Popular Posts */
.popular-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--slate-100);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.popular-item:hover .popular-title {
  color: var(--blue-500);
}

.popular-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 300;
  color: var(--blue-200);
  line-height: 1;
  min-width: 28px;
}

.popular-title {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--slate-700);
  line-height: 1.4;
  transition: color 0.2s ease;
}

.popular-meta {
  font-size: 11px;
  color: var(--slate-400);
  margin-top: 3px;
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  border-color: transparent;
  color: white;
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  top: -60px;
  right: -40px;
}

.newsletter::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  bottom: -30px;
  left: -20px;
}

.newsletter > * {
  position: relative;
  z-index: 1;
}

.newsletter h4 {
  color: white;
}

.newsletter p {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.55;
  margin-bottom: 14px;
}

.newsletter-form {
  display: flex;
  gap: 6px;
}

.newsletter-form input {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.newsletter-form input:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
  padding: 9px 16px;
  background: white;
  color: var(--blue-600);
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: var(--blue-50);
  transform: translateY(-1px);
}


/* ================================================================
   Page: Single Post (single.php)
   ================================================================ */

/* Reading Progress */
.progress-bar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--blue-500);
  z-index: 101;
  transition: width 0.1s linear;
}

/* Article Page Wrapper */
.article-page {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Article Hero */
.article-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 52px 0 0;
  animation: fadeUp 0.5s ease both;
}

.article-hero .breadcrumb {
  margin-bottom: 20px;
}

.article-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-500);
  background: var(--blue-50);
  padding: 5px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.article-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  color: var(--slate-800);
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.article-hero h1 em {
  font-style: italic;
  color: var(--blue-500);
}

.article-subtitle {
  font-size: 17px;
  color: var(--slate-400);
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 28px;
  max-width: 600px;
}

/* Article Meta */
.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--slate-200);
  margin-bottom: 0;
}

.author-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-info .name {
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-800);
}

.author-info .role {
  font-size: 12px;
  color: var(--slate-400);
}

.meta-detail {
  font-size: 13px;
  color: var(--slate-400);
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta-detail svg {
  width: 14px;
  height: 14px;
}

/* Article Cover */
.article-cover {
  max-width: 860px;
  margin: 36px auto 0;
  height: 340px;
  background: linear-gradient(135deg, var(--blue-100) 0%, var(--blue-200) 60%, var(--blue-300) 100%);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s 0.1s ease both;
}

.cover-decor {
  position: absolute;
  inset: 0;
  opacity: 0.12;
}

.cover-decor .c {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--blue-600);
}

.cover-decor .c:nth-child(1) { width: 300px; height: 300px; top: -60px; left: 10%; }
.cover-decor .c:nth-child(2) { width: 200px; height: 200px; top: 30%; left: 45%; }
.cover-decor .c:nth-child(3) { width: 400px; height: 400px; top: -80px; right: -100px; }
.cover-decor .c:nth-child(4) { width: 150px; height: 150px; bottom: -30px; left: 25%; }

.cover-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background: white;
  border-radius: 22px;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 40px rgba(59, 114, 219, 0.15);
}

.cover-icon svg {
  width: 40px;
  height: 40px;
  color: var(--blue-500);
}

/* Article Content Grid */
.article-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  max-width: 920px;
  margin: 48px auto 0;
  animation: fadeUp 0.5s 0.2s ease both;
}

/* TOC Sidebar */
.toc-sidebar {
  position: relative;
}

.toc-inner {
  position: sticky;
  top: 84px;
}

.toc-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-400);
  margin-bottom: 14px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list li a {
  display: block;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--slate-400);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.toc-list li a:hover {
  color: var(--blue-500);
  background: var(--blue-50);
  border-left-color: var(--blue-200);
}

.toc-list li a.active {
  color: var(--blue-600);
  font-weight: 500;
  border-left-color: var(--blue-500);
  background: var(--blue-50);
}

.toc-share {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--slate-200);
}

.toc-share-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-400);
  margin-bottom: 10px;
}

.share-btns {
  display: flex;
  gap: 6px;
}

.share-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--slate-200);
  background: white;
  color: var(--slate-400);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  border-color: var(--blue-300);
  color: var(--blue-500);
  background: var(--blue-50);
}

.share-btn svg {
  width: 15px;
  height: 15px;
}

/* Article Content */
.article-content {
  max-width: 660px;
}

.article-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--slate-800);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
  scroll-margin-top: 80px;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content p {
  font-size: 16px;
  line-height: 1.78;
  color: var(--slate-600);
  margin-bottom: 20px;
  font-weight: 300;
}

.article-content blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--blue-400);
  background: var(--blue-50);
  border-radius: 0 10px 10px 0;
}

.article-content blockquote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
  color: var(--slate-700);
  line-height: 1.55;
  margin-bottom: 6px;
}

.article-content blockquote cite {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-style: normal;
  color: var(--slate-400);
}

.article-content .highlight-box {
  margin: 28px 0;
  padding: 22px 24px;
  background: white;
  border: 1px solid var(--blue-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.highlight-box .hl-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-500);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.highlight-box .hl-label svg {
  width: 14px;
  height: 14px;
}

.highlight-box p {
  font-size: 14.5px;
  margin-bottom: 0;
}

.article-content a {
  color: var(--blue-500);
  text-decoration: underline;
  text-decoration-color: var(--blue-200);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.article-content a:hover {
  text-decoration-color: var(--blue-500);
}

/* Drop Cap */
.dropcap::first-letter {
  font-family: 'Cormorant Garamond', serif;
  float: left;
  font-size: 64px;
  font-weight: 600;
  line-height: 0.8;
  color: var(--blue-500);
  margin: 4px 12px 0 0;
}

/* Article Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--slate-200);
}

/* Author Card */
.author-card {
  margin-top: 40px;
  padding: 28px;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.author-card h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 2px;
}

.author-card .author-title {
  font-size: 12.5px;
  color: var(--blue-500);
  font-weight: 500;
  margin-bottom: 8px;
}

.author-card p {
  font-size: 13.5px;
  color: var(--slate-400);
  line-height: 1.6;
  font-weight: 300;
}

.author-follow {
  margin-top: 12px;
  padding: 7px 18px;
  background: var(--blue-50);
  color: var(--blue-500);
  border: 1px solid var(--blue-200);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.author-follow:hover {
  background: var(--blue-500);
  color: white;
  border-color: var(--blue-500);
}

/* Related Posts */
.related-section {
  max-width: 920px;
  margin: 56px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--slate-200);
  animation: fadeUp 0.5s 0.3s ease both;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 56px;
}

.related-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: var(--shadow-sm);
}

.related-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.related-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.related-thumb svg {
  width: 24px;
  height: 24px;
  opacity: 0.4;
  position: relative;
  z-index: 1;
}

.related-info {
  padding: 18px;
}

.related-info .r-cat {
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-500);
  margin-bottom: 6px;
}

.related-info h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--slate-800);
  line-height: 1.3;
  margin-bottom: 8px;
}

.related-info .r-meta {
  font-size: 12px;
  color: var(--slate-400);
}


/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-img {
    min-height: 200px;
  }

  .sidebar {
    order: -1;
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .toc-sidebar {
    display: none;
  }

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

@media (max-width: 640px) {
  .article-card {
    grid-template-columns: 1fr;
  }

  .article-thumb {
    min-height: 120px;
  }

  .nav-links {
    display: none;
  }

  .app {
    padding: 0 16px;
  }

  .hero {
    padding: 32px 0 28px;
  }

  .generate-panel {
    padding: 24px 18px;
  }

  .card {
    padding: 18px;
  }

  .author-card {
    flex-direction: column;
  }

  .article-cover {
    height: 220px;
  }

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


/* ================================================================
   v2: Pillar Grid (Homepage)
   ================================================================ */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}

.pillar-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.pillar-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pillar-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--slate-800);
  margin-bottom: 6px;
  line-height: 1.3;
}

.pillar-card p {
  font-size: 13px;
  color: var(--slate-400);
  line-height: 1.5;
  font-weight: 300;
  flex: 1;
}

.pillar-arrow {
  display: flex;
  align-items: center;
  margin-top: 12px;
  color: var(--blue-500);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pillar-card:hover .pillar-arrow {
  opacity: 1;
}

.pillar-arrow svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 900px) {
  .pillar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .pillar-grid {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
   v2: Page Meta (List Pages)
   ================================================================ */
.page-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--slate-400);
}


/* ================================================================
   v2: List Content (replaces article-content for list pages)
   ================================================================ */
.list-content {
  animation: fadeUp 0.5s 0.2s ease both;
}

.list-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--slate-800);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 36px 0 16px;
  scroll-margin-top: 80px;
}

.list-content h2:first-child {
  margin-top: 0;
}

.list-content p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--slate-600);
  margin-bottom: 16px;
  font-weight: 300;
}

.list-content ol {
  list-style: none;
  counter-reset: question-counter;
  margin: 20px 0;
  padding: 0;
}

.list-content ol li {
  counter-increment: question-counter;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 18px 22px 18px 60px;
  margin-bottom: 10px;
  position: relative;
  font-size: 16px;
  line-height: 1.5;
  color: var(--slate-700);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.list-content ol li::before {
  content: counter(question-counter);
  position: absolute;
  left: 18px;
  top: 18px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 300;
  color: var(--blue-300);
  line-height: 1;
}

.list-content ol li:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow-md);
}

.list-content a {
  color: var(--blue-500);
  text-decoration: underline;
  text-decoration-color: var(--blue-200);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.list-content a:hover {
  text-decoration-color: var(--blue-500);
}


/* ================================================================
   v2: Single Column Article Grid
   ================================================================ */
.article-grid--single-col {
  grid-template-columns: 1fr;
  max-width: 720px;
}


/* ================================================================
   v2: Tool Content Area
   ================================================================ */
.tool-content {
  margin: 40px 0;
}

.tool-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--slate-800);
  margin: 28px 0 12px;
}

.tool-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--slate-500);
  font-weight: 300;
  margin-bottom: 14px;
}

.generate-panel--full {
  margin-bottom: 0;
}


/* ================================================================
   v2: Sidebar CTA Block
   ================================================================ */
.sidebar-cta {
  background: var(--blue-50);
  border-color: var(--blue-200);
}

.sidebar-cta p {
  font-size: 13px;
  color: var(--slate-500);
  line-height: 1.55;
  font-weight: 300;
  margin-bottom: 12px;
}

.sidebar-cta-btn {
  display: inline-block;
  padding: 8px 18px;
  background: var(--blue-500);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(59, 114, 219, 0.25);
}

.sidebar-cta-btn:hover {
  background: var(--blue-600);
  transform: translateY(-1px);
}


/* ================================================================
   v2: Compact Pillar Links
   ================================================================ */
.pillar-links-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
