/* --------------------------------------------------
   IMPORTS & BASE SETTINGS
-------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;500&display=swap');

/* Emergency home page fix - exclude pulse-row sections */
body.home .content-wrapper,
body.home .hero-section,
body.home main > div:not(.pulse-row) {
  display: block !important;
  grid-template-columns: none !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  gap: 0 !important;
}

html, body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0D0A1A, #3E1C71);
  color: #eee;
}

button {
  background: #A60ED4;
  color: #fff;
  border: none;
  padding: .5rem 1rem;
  border-radius: 3px;
}

/* --------------------------------------------------
   HEADER & NAVIGATION
-------------------------------------------------- */
.site-header {
  background: #000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#site-title span.accent-purple {
  font-size: 1.1em;
  color: var(--tppl-lavender, #caa9e9);
}

.logo a {
  color: #A60ED4;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  text-decoration: none;
}

.nav a {
  color: #eee;
  margin-left: 1rem;
  text-decoration: none;
}

.tppl-header {
  position: relative;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow: hidden;
  background: #0d0a1a;
  border-bottom: 2px solid #A360F2;
  padding: 2rem 1rem;
  text-align: center;
}

.tppl-header .local-time-module,
.tppl-header .local-weather-module {
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  white-space: nowrap;
  max-width: calc(100% - 8rem);
}

.site-main,
main.site-main {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.tppl-brand a {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  color: #EAE6FF;
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tppl-brand a:hover { 
  color: #F02E65; 
}

.brand-highlight {
  color: #d8d2ff;
  font-size: 1.06em;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.tppl-brand a:hover .brand-highlight {
  color: #e5deff;
}

/* --------------------------------------------------
   PURPLE PULSE + TIME CAPSULE (Base Styles)
-------------------------------------------------- */
.pulse-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 4rem 1rem;
  color: #eae6ff;
}

.pulse-row.reverse { 
  grid-template-columns: 1fr 2fr; 
}

.pulse-left .section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #a47cff;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1.2rem;
  letter-spacing: .05em;
}

.pulse-feed.horizontal {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
}

.pulse-feed.horizontal::-webkit-scrollbar { 
  height: 8px; 
}

.pulse-feed.horizontal::-webkit-scrollbar-thumb {
  background: #4c3a83;
  border-radius: 10px;
}

/* Purple Tinted Lens - vertical scroll when more than 2 posts */
.pulse-left.featured .pulse-feed {
  display: block;
  max-height: 600px;
  overflow-y: scroll;
  overflow-x: hidden;
  padding-right: 0.5rem;
}

.pulse-left.featured .pulse-card {
  margin-bottom: 1.5rem;
}

.pulse-left.featured .pulse-card:last-child {
  margin-bottom: 0;
}

.pulse-left.featured .pulse-feed::-webkit-scrollbar {
  width: 8px;
}

.pulse-left.featured .pulse-feed::-webkit-scrollbar-thumb {
  background: #4c3a83;
  border-radius: 10px;
}

.pulse-left.featured .pulse-feed::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.pulse-card {
  flex: 0 0 300px;
  background: #241c3e;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  transition: transform .25s, box-shadow .25s;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.pulse-card:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 8px 20px rgba(0,0,0,0.45); 
}

.pulse-thumb img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.pulse-body {
  padding: 1rem 1.2rem 1.3rem;
}

.pulse-body h3 {
  font-family: 'Playfair Display', serif;
  color: #e7e3ff;
  font-size: 1rem;
  margin-bottom: .4rem;
}

.pulse-body h3 a { 
  color: inherit; 
  text-decoration: none; 
}

.pulse-body h3 a:hover { 
  color: #F02E65; 
}

.pulse-body p {
  color: #c6c1ec;
  font-size: 0.9rem;
}

/* --------------------------------------------------
   CAPSULE SIDEBAR (Base Styles)
-------------------------------------------------- */
.capsule-sidebar {
  display: flex;
  flex-direction: column;
}

.capsule-sidebar .section-title {
  font-family: 'Playfair Display', serif;
  color: #a47cff;
  text-transform: uppercase;
  font-size: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}

.capsule-mini {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  background: #1b1431;
  border-radius: 8px;
  padding: 0.8rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.capsule-mini:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.mini-thumb {
  flex: 0 0 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-body h4 {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  margin: 0 0 0.3rem;
}

.mini-body h4 a {
  color: #e7e3ff;
  text-decoration: none;
}

.mini-body h4 a:hover { 
  color: #F02E65; 
}

.mini-body p {
  color: #c6c0eb;
  font-size: 0.85rem;
  line-height: 1.3;
}

/* --------------------------------------------------
   PULSE ROW RESPONSIVE (Base)
-------------------------------------------------- */
@media (max-width: 992px) {
  .pulse-row { 
    grid-template-columns: 1fr; 
  }
  .capsule-sidebar { 
    margin-top: 2rem; 
  }
  .pulse-feed.horizontal { 
    overflow-x: scroll; 
  }
}

/* --------------------------------------------------
   WEEKLY BRAIN CONTRADICTIONS
-------------------------------------------------- */
.thought-capsules {
  max-width: 1400px;
  margin: 4rem auto;
  padding: 2rem;
}

.thought-capsules .section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #a47cff;
  text-align: center;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.capsule-scroll {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}

.capsule {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(71, 26, 121, 0.8), rgba(110, 41, 163, 0.8));
  color: #f4efff;
  font-size: 0.95rem;
  font-style: italic;
  text-align: center;
  box-shadow: 0 0 12px rgba(110, 41, 163, 0.3);
  transition: all 0.3s ease;
  border: 1px solid rgba(156, 91, 210, 0.4);
}

.capsule:hover {
  background: linear-gradient(135deg, rgba(128, 67, 164, 0.9), rgba(157, 89, 195, 0.9));
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(156, 91, 210, 0.5);
  color: #fff;
}

@media (max-width: 768px) {
  .thought-capsules {
    padding: 1.5rem 1rem;
  }
  .thought-capsules .section-title {
    font-size: 1.6rem;
  }
  .capsule {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
}

/* --------------------------------------------------
   CURATED COMMENTARY SECTION
-------------------------------------------------- */
.curated-commentary-section {
  max-width: 1400px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.curated-commentary-section .section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #a47cff;
  text-align: center;
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.curated-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
}

.curated-card {
  background: rgba(36, 28, 62, 0.6);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.curated-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(156, 91, 210, 0.4);
}

.curated-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.curated-thumb {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.curated-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.curated-card:hover .curated-thumb img {
  transform: scale(1.05);
}

.curated-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.curated-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #e7e3ff;
  margin: 0;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.curated-card:hover .curated-title {
  color: #F02E65;
}

.curated-source {
  font-size: 0.85rem;
  color: #9c5bd2;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.commentary-intro {
  background: rgba(156, 91, 210, 0.1);
  border-left: 3px solid #9c5bd2;
  padding: 1rem;
  border-radius: 6px;
  color: #caa9e9;
  font-size: 0.95rem;
  line-height: 1.5;
  font-style: italic;
}

.curated-excerpt {
  color: #b3a9e6;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.read-external {
  display: inline-block;
  color: #F02E65;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.curated-card:hover .read-external {
  color: #fa5582;
}

.no-content {
  text-align: center;
  color: #8b84c7;
  font-style: italic;
  padding: 3rem;
}

@media (max-width: 768px) {
  .curated-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .curated-thumb {
    height: 180px;
  }
}

/* --------------------------------------------------
   SINGLE POST & RELATED ARTICLES
-------------------------------------------------- */
.single-hero {
  width: 100%;
  background: #221a3b;
  text-align: center;
  padding: 2rem 0;
}

.single-hero img {
  max-width: 960px;
  width: 90%;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

.single-header {
  margin: 2rem auto;
  max-width: 880px;
  text-align: center;
}

.single-title {
  font-family: 'Playfair Display', serif;
  color: #e7e3ff;
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.single-meta {
  color: #b3a9e6;
  font-size: 0.9rem;
}

.single-content {
  max-width: 820px;
  margin: 0 auto 3rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #e4e0fa;
}

.single-content p { 
  margin-bottom: 1.2rem; 
}

.single-footer {
  max-width: 820px;
  margin: 2rem auto 4rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  text-align: center;
}

.single-tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}

.tag-bubble {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--tppl-accent-dark, #471a79), var(--tppl-accent, #6e29a3));
  color: var(--tppl-light-text, #f4efff);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 0 10px rgba(110, 41, 163, 0.25);
}

.tag-bubble:hover {
  background: linear-gradient(135deg, var(--tppl-accent, #8043a4), var(--tppl-accent-light, #a56ecf));
  transform: translateY(-2px);
  color: #fff;
}

.single-nav {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.single-nav a {
  color: #a47cff;
  text-decoration: none;
  transition: color 0.3s;
}

.single-nav a:hover { 
  color: #F02E65; 
}

.related-posts {
  margin: 4rem auto 6rem;
  max-width: 960px;
}

.related-posts .section-title {
  font-family: 'Playfair Display', serif;
  color: #dcd6ff;
  text-align: center;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 0 1rem;
}

.related-card {
  background: #241c3e;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.related-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.45);
}

.related-thumb img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.related-card h3 {
  text-align: center;
  font-size: 1rem;
  margin: 0.9rem;
}

.related-card h3 a {
  color: #a47cff;
  text-decoration: none;
  transition: color 0.3s;
}

.related-card h3 a:hover { 
  color: #F02E65; 
}

@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* --------------------------------------------------
   TAG PAGE
-------------------------------------------------- */
#tag-page {
  padding: 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.tag-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid rgba(156, 91, 210, 0.3);
}

.tag-header h1 {
  font-size: 2.5rem;
  color: var(--tppl-light-text, #f4efff);
  font-weight: 700;
  margin-bottom: 0;
}

.highlight-tag {
  color: var(--tppl-accent, #9c5bd2);
  background: linear-gradient(135deg, rgba(156, 91, 210, 0.2), rgba(202, 169, 233, 0.2));
  padding: 0.2rem 0.8rem;
  border-radius: 8px;
}

.tag-section {
  margin-bottom: 4rem;
}

.tag-section h2 {
  font-size: 1.8rem;
  color: var(--tppl-accent-light, #caa9e9);
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.tag-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--tppl-accent, #9c5bd2), transparent);
}

.tag-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.tag-section p {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  padding: 2rem;
}

.tag-posts-grid .post-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tag-posts-grid .post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(156, 91, 210, 0.3);
}

.tag-posts-grid .post-card .post-thumbnail {
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.tag-posts-grid .post-card .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tag-posts-grid .post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.tag-posts-grid .post-card h3 {
  padding: 1.5rem 1.5rem 0.5rem;
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.4;
}

.tag-posts-grid .post-card h3 a {
  color: var(--tppl-light-text, #f4efff);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tag-posts-grid .post-card h3 a:hover {
  color: var(--tppl-accent, #9c5bd2);
}

.tag-posts-grid .post-card .excerpt {
  padding: 0 1.5rem 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .tag-header h1 {
    font-size: 1.8rem;
  }
  .tag-section h2 {
    font-size: 1.4rem;
  }
  .tag-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */
.tppl-footer {
  background: radial-gradient(circle at top left, #140f24 0%, #0b0815 100%);
  color: #cfc9f2;
  text-align: center;
  padding: 4rem 2rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.95rem;
}

.footer-top { 
  margin-bottom: 1.8rem; 
}

.footer-logo a {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: #e9e6ff;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.footer-logo a:hover { 
  color: #F02E65; 
}

.footer-tagline {
  color: #aaa3d9;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.footer-links ul {
  list-style: none;
  margin: 0 auto 2rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.footer-links a {
  color: #b7b2e4;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.footer-links a:hover { 
  color: #F02E65; 
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1.2rem;
}

.copyright {
  font-size: 0.85rem;
  color: #8b84c7;
}

@media (max-width: 600px) {
  .tppl-footer {
    padding: 3rem 1rem 1.5rem;
  }
  .footer-logo a { 
    font-size: 1.5rem; 
  }
  .footer-links ul {
    flex-direction: column;
    gap: 0.8rem;
  }
}