/* ==========================================================================
   blog.css — Shared styles for all TMC AI blog posts
   Linked from every post via <link rel="stylesheet" href="/css/blog.css">
   Edit once here → all posts update automatically.
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  background: #0a0118;
  color: #f9f8fc;
}

html {
  scroll-behavior: smooth;
}

/* ==================== DESIGN TOKENS ==================== */
:root {
  /* Wope dark palette */
  --dark-bg-1: #0a0118;
  --dark-bg-2: #140b25;
  --dark-bg-3: #1a0f2e;
  --dark-text-primary: #f9f8fc;
  --dark-text-secondary: #9b96b0;
  --dark-text-accent: #b7a4fb;

  /* Aliased so all var(--bright-*) refs stay dark */
  --bright-bg-1: #0a0118;
  --bright-bg-2: #140b25;
  --bright-bg-3: #1a0f2e;
  --bright-text-primary: #f9f8fc;
  --bright-text-secondary: #9b96b0;
  --bright-text-muted: #676182;
  --bright-border: rgba(255,255,255,0.10);

  --accent-primary: #713dff;
  --accent-secondary: #8562ff;
  --accent-tertiary: #7c6aff;
  --accent-light: rgba(113,61,255,0.14);

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 60px;
  --space-2xl: 80px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== POST HERO ==================== */
.post-hero {
  position: relative;
  padding: 120px 20px 80px;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0118 0%, #140b25 100%);
}

.post-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(113, 61, 255, 0.10) 0%,
    transparent 65%
  );
  animation: rotateGradient 20s linear infinite;
  z-index: 1;
}

.post-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(113,61,255,0.20) 0%, transparent 100%),
    radial-gradient(30% 25% at 50% 50%, rgba(113,61,255,0.22) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      rgba(113, 61, 255, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(113, 61, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 2;
  opacity: 0.5;
}

@keyframes rotateGradient {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.post-hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  animation: fadeInUp 0.7s ease-out;
}

.post-category {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(113, 61, 255, 0.15);
  color: #b7a4fb;
  border: 1px solid rgba(113, 61, 255, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  text-decoration: none;
}

.post-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.97) 20%, rgba(183,164,251,0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--dark-text-secondary);
  font-size: 0.9rem;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-meta-item svg {
  width: 16px;
  height: 16px;
  stroke: #b7a4fb;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ==================== ARTICLE LAYOUT ==================== */
.article-wrapper {
  background: #0a0118;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 0 20px 80px;
}

.article-inner {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 60px;
}

/* ==================== ARTICLE TYPOGRAPHY ==================== */
.article-body {
  color: var(--bright-text-primary);
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-body h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--bright-text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-light);
  line-height: 1.3;
}

.article-body h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 600;
  color: var(--bright-text-primary);
  margin-top: 36px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.article-body p {
  margin-bottom: 20px;
  color: var(--bright-text-secondary);
}

.article-body strong {
  color: var(--bright-text-primary);
  font-weight: 600;
}

.article-body a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: var(--accent-secondary);
}

.article-body ul,
.article-body ol {
  margin-bottom: 20px;
  padding-left: 28px;
}

.article-body li {
  margin-bottom: 8px;
  color: var(--bright-text-secondary);
}

.article-body blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--accent-light);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--bright-text-secondary);
}

.article-body blockquote strong {
  color: var(--accent-primary);
  font-style: normal;
}

/* Highlight box for key points */
.highlight-box {
  background: rgba(113,61,255,0.08);
  border: 1px solid rgba(113,61,255,0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 32px 0;
}

.highlight-box p {
  margin-bottom: 0;
  color: #f9f8fc !important;
}

/* ==================== ARTICLE CTA ==================== */
.article-cta {
  margin-top: 60px;
  padding: 40px;
  background: rgba(113,61,255,0.07);
  border: 1px solid rgba(113,61,255,0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(113,61,255,0.12) 0%, transparent 80%);
  pointer-events: none;
}

.article-cta-content {
  position: relative;
  z-index: 1;
}

.article-cta h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.article-cta p {
  color: var(--dark-text-secondary);
  margin-bottom: 24px;
  font-size: 1rem;
}

/* ==================== ORBITAL BUTTON ==================== */
.uv-btn {
  --glow-angle: 0deg;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 16px;
  border: none;
  padding: 2px;
  background:
    conic-gradient(
      from var(--glow-angle),
      transparent 0deg, #8b5cf6 15deg, transparent 35deg,
      transparent 160deg, rgba(200,185,255,0.95) 180deg, transparent 200deg, transparent 360deg
    ),
    rgba(14,6,32,0.85);
  position: relative;
  text-decoration: none;
  display: inline-block;
}

.uv-btn::after {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 18px;
  background:
    conic-gradient(
      from var(--glow-angle),
      transparent 0deg, rgba(113,61,255,0.35) 15deg, transparent 45deg,
      transparent 155deg, rgba(183,164,251,0.18) 180deg, transparent 210deg, transparent 360deg
    );
  filter: blur(6px);
  z-index: -1;
}

.uv-inner {
  --inner-x: 0%;
  --inner-y: 100%;
  --white-x: 100%;
  --white-y: 0%;
  padding: 14px 28px;
  border-radius: 14px;
  color: #fff;
  z-index: 3;
  position: relative;
  background:
    radial-gradient(circle 60px at var(--inner-x) var(--inner-y), rgba(113,61,255,0.40), transparent 70%),
    radial-gradient(circle 75px at var(--white-x) var(--white-y), rgba(183,164,251,0.30), transparent 70%),
    rgba(30,15,60,0.80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: block;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
}

/* ==================== BACK TO BLOG ==================== */
.back-link-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: gap 0.2s ease;
}

.back-link:hover {
  gap: 12px;
}

.back-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: #0a0118;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 48px 20px;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.footer-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #713dff, #8562ff);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 1rem;
}

.footer-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

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

.footer-link {
  color: var(--dark-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-copy {
  color: var(--dark-text-secondary);
  font-size: 0.85rem;
  width: 100%;
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .post-hero {
    padding: 100px 20px 60px;
  }

  .post-meta {
    gap: 16px;
  }

  .article-inner {
    padding-top: 40px;
  }

  .article-cta {
    padding: 28px 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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

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