/* =============================================
   BRAVE NEW IA WORLD — Global Stylesheet
   ============================================= */

:root {
  --bg: #0A0E17;
  --bg-surface: #111827;
  --bg-card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #E8E8ED;
  --text-muted: #8B8FA3;
  --text-dim: #5A5E70;
  --accent: #6C63FF;
  --accent-glow: rgba(108, 99, 255, 0.15);
  --accent-secondary: #38BDF8;
  --accent-warm: #F59E0B;
  --accent-green: #10B981;
  --gradient-hero: linear-gradient(135deg, #0A0E17 0%, #0F1629 40%, #161D33 100%);
  --gradient-accent: linear-gradient(135deg, #6C63FF, #38BDF8);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 780px;
  --reading-width: 680px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 17px;
  font-weight: 400;
}

/* --- HEADER --- */
.blog-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 32px;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-brand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.blog-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.blog-nav a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.blog-nav a:hover { color: var(--text); }

.blog-nav .tag {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
  font-weight: 600;
}

/* --- HERO (Landing) --- */
.hero-landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 32px 80px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero-landing::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: pulse-glow 6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateX(-50%) scale(1.15); }
}

.hero-landing h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  position: relative;
  margin-bottom: 24px;
}

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

.hero-landing .tagline {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
  position: relative;
  font-weight: 400;
  margin-bottom: 48px;
}

.hero-landing .author-line {
  font-size: 14px;
  color: var(--text-dim);
  position: relative;
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* --- HERO (Post) --- */
.hero-post {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 32px 80px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero-post::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: pulse-glow 6s ease-in-out infinite;
}

.hero-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  position: relative;
}

.hero-post h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  max-width: 750px;
  margin-bottom: 24px;
  letter-spacing: -1px;
  position: relative;
}

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

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
  position: relative;
  font-weight: 400;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-dim);
  position: relative;
}

.hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
}

/* --- ARTICLE --- */
.article {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 32px 120px;
}

.article p {
  max-width: var(--reading-width);
  margin-bottom: 28px;
  color: var(--text);
  font-weight: 400;
}

.article p.lead {
  font-size: 20px;
  line-height: 1.75;
  color: var(--text);
  font-weight: 400;
  border-left: 3px solid var(--accent);
  padding-left: 24px;
  margin-bottom: 48px;
}

.article h2 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 64px;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
  color: var(--text);
  position: relative;
  padding-left: 20px;
}

.article h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--gradient-accent);
}

.article h3 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text);
}

.article a {
  color: var(--accent-secondary);
  text-decoration: none;
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  transition: border-color 0.2s;
}

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

.article strong { font-weight: 600; color: #fff; }
.article em { font-style: italic; color: var(--text-muted); }

/* --- BLOCKQUOTE --- */
.article blockquote {
  margin: 40px 0;
  padding: 28px 32px;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  font-style: italic;
}

.article blockquote strong { color: var(--text); }

/* --- CALLOUT CARD --- */
.callout {
  margin: 48px 0;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.callout::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-accent);
}

.callout h4 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.callout p { margin-bottom: 0; color: var(--text-muted); }
.callout p + p { margin-top: 16px; }

/* --- LISTS --- */
.article ul, .article ol {
  margin: 20px 0 28px 24px;
  max-width: var(--reading-width);
}

.article li {
  margin-bottom: 10px;
  padding-left: 8px;
  color: var(--text);
}

.article li::marker { color: var(--accent); }

/* --- TABLE --- */
.comparison-table {
  width: 100%;
  margin: 32px 0;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table th {
  text-align: left;
  padding: 14px 16px;
  background: rgba(108, 99, 255, 0.08);
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table .role-agent { color: var(--accent-secondary); font-weight: 500; }

/* --- DIAGRAM --- */
.diagram {
  margin: 40px 0;
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

.diagram-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 32px;
}

.phase-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.phase-box {
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: all 0.3s;
}

.phase-box:hover { border-color: var(--accent); background: rgba(108, 99, 255, 0.06); }

.phase-arrow { color: var(--text-dim); font-size: 18px; }

/* --- SEPARATOR --- */
.separator {
  max-width: var(--reading-width);
  margin: 64px 0;
  border: none;
  height: 1px;
  background: var(--border);
}

/* --- POST CARDS (Landing) --- */
.posts-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 32px 120px;
}

.posts-section h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 48px;
  text-align: center;
}

.post-card {
  display: block;
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s;
  margin-bottom: 20px;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 99, 255, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.post-card .post-number {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.post-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.post-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.post-card .post-meta {
  font-size: 13px;
  color: var(--text-dim);
}

/* --- AUTHOR CARD --- */
.author-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 48px 0;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.author-info h4 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.author-info p { font-size: 13px; color: var(--text-muted); margin-bottom: 0; line-height: 1.5; }

/* --- TAGS --- */
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 48px 0 0;
}

.tags span {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(108, 99, 255, 0.08);
  color: var(--accent);
  font-weight: 500;
}

/* --- FOOTER --- */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  font-size: 14px;
  color: var(--text-dim);
}

/* --- ANIMATIONS --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hero-landing, .hero-post { padding: 100px 20px 60px; }
  .hero-landing { min-height: 80vh; }
  .hero-post { min-height: 65vh; }
  .article { padding: 48px 20px 80px; }
  .posts-section { padding: 48px 20px 80px; }
  .blog-header { padding: 14px 20px; }
  .blog-nav { gap: 16px; }
  .author-card { flex-direction: column; text-align: center; }
  .phase-flow { flex-direction: column; gap: 8px; }
  .phase-arrow { transform: rotate(90deg); }
}
