/* ==========================================================================
   Base & Modern Reset
   ========================================================================== */
:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #111726;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 35, 56, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.35);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #6366f1;
  --accent-secondary: #06b6d4;
  --accent-tertiary: #10b981;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --accent-glow: 0 0 25px rgba(99, 102, 241, 0.35);
  --tkxel-glow: 0 0 35px rgba(6, 182, 212, 0.45);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-medium: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
}

/* ==========================================================================
   Motion Graphics & Animations
   ========================================================================== */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--accent-gradient);
  width: 0%;
  z-index: 1000;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.7);
  transition: width 0.1s ease-out;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2), inset 0 0 15px rgba(99, 102, 241, 0.1);
  }
  50% {
    box-shadow: 0 0 35px rgba(6, 182, 212, 0.4), inset 0 0 25px rgba(6, 182, 212, 0.2);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.floating-anim {
  animation: float 6s ease-in-out infinite;
}

.pulse-badge {
  animation: pulseGlow 4s infinite ease-in-out;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--accent-glow);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--accent-secondary);
}

.nav-cta {
  background: var(--accent-gradient);
  color: #ffffff !important;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--accent-glow);
}

/* ==========================================================================
   Hero Section with Motion Canvas
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 580px;
  padding: 5rem 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

#neural-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.65;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  text-align: center;
  margin: 0 auto;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-secondary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-tertiary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-tertiary);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

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

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.article-metadata-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Layout: Main Content & Sidebar
   ========================================================================== */
.content-wrapper {
  max-width: 1240px;
  margin: 3.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3.5rem;
}

/* Sidebar / Sticky Table of Contents */
.toc-sidebar {
  position: sticky;
  top: 90px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.toc-title {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
  display: block;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.08);
  border-left-color: var(--accent-secondary);
  padding-left: 0.8rem;
}

/* ==========================================================================
   Article Core Content
   ========================================================================== */
.article-body {
  max-width: 820px;
}

.lead-intro-box {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.04));
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.lead-intro-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gradient);
}

.lead-intro-box p {
  font-size: 1.15rem;
  line-height: 1.85;
  color: #e2e8f0;
}

/* Mandatory Keyword Link Style */
.seo-keyword-link {
  color: #38bdf8;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  transition: all var(--transition-fast);
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(56, 189, 248, 0.1);
}

.seo-keyword-link:hover {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.3);
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  margin: 3rem 0 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-heading::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 24px;
  background: var(--accent-secondary);
  border-radius: var(--radius-full);
}

.article-body p {
  margin-bottom: 1.4rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ==========================================================================
   Motion Graphic Visual Banner inside Post
   ========================================================================== */
.interactive-motion-card {
  margin: 2.5rem 0;
  background: linear-gradient(135deg, rgba(17, 23, 38, 0.95), rgba(10, 13, 20, 0.95));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.motion-graphic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.hud-tag {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.hud-pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.pipeline-step {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 1.25rem 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-medium);
  position: relative;
}

.pipeline-step:hover {
  transform: translateY(-5px);
  border-color: var(--accent-secondary);
  box-shadow: 0 10px 20px rgba(6, 182, 212, 0.15);
}

.step-icon-glow {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
}

.step-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.step-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Company Cards & Listings
   ========================================================================== */
.company-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

.company-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.company-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

/* Rank 2 - tkxel Special Highlight */
.company-card.featured-tkxel {
  border: 2px solid #06b6d4;
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.08), rgba(99, 102, 241, 0.05), rgba(18, 24, 38, 0.95));
  box-shadow: var(--tkxel-glow);
  position: relative;
}

.company-card.featured-tkxel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #06b6d4, #6366f1, #10b981);
}

.spotlight-banner {
  position: absolute;
  top: 1.5rem;
  right: -3rem;
  transform: rotate(45deg);
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0.3rem 3rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  text-transform: uppercase;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.company-title-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rank-badge {
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-heading);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.rank-badge.rank-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 900;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.rank-badge.rank-tkxel {
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 900;
  box-shadow: var(--accent-glow);
}

.company-name {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
}

.company-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.company-link:hover {
  color: var(--accent-secondary);
}

.company-link svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.company-meta-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-tag.accent-blue {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border-color: rgba(6, 182, 212, 0.3);
}

.badge-tag.accent-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border-color: rgba(139, 92, 246, 0.3);
}

.badge-tag.accent-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.company-desc {
  font-size: 1rem;
  color: #cbd5e1;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.feature-point {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.feature-point svg {
  width: 16px;
  height: 16px;
  fill: var(--accent-tertiary);
  flex-shrink: 0;
}

/* ==========================================================================
   Comparison Table Section
   ========================================================================== */
.table-container {
  overflow-x: auto;
  margin: 2.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.seo-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 1rem 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-heading);
}

.seo-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.seo-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.seo-table tr.highlighted-row td {
  background: rgba(6, 182, 212, 0.06);
  font-weight: 600;
  color: #e0f2fe;
}

.seo-table tr.highlighted-row td a {
  color: #38bdf8;
  font-weight: 700;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-section {
  margin: 3.5rem 0;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-heading);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-medium);
  fill: var(--text-secondary);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  fill: var(--accent-secondary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.3s ease;
  padding: 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem;
}

/* ==========================================================================
   Author & CTA Section
   ========================================================================== */
.author-card {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  background: linear-gradient(135deg, rgba(17, 23, 38, 0.9), rgba(10, 13, 20, 0.95));
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 3.5rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.author-avatar-img {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-secondary);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
  flex-shrink: 0;
}

.author-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.author-name-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.author-role-badge {
  font-size: 0.75rem;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.author-info p {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.author-linkedin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.author-linkedin-btn:hover {
  background: var(--accent-secondary);
  color: #000000;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

.cta-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin: 4rem 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cta-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-desc {
  max-width: 650px;
  margin: 0 auto 1.75rem;
  color: #cbd5e1;
  font-size: 1.05rem;
}

.cta-btn {
  display: inline-block;
  background: var(--accent-gradient);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius-full);
  box-shadow: var(--accent-glow);
  transition: all var(--transition-fast);
}

.cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.6);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 3.5rem 1.5rem 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .toc-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 3.5rem 1rem 3rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .card-header-flex {
    flex-direction: column;
    align-items: flex-start;
  }
}
