/* ============================================
   LatestAITech Theme - Main Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --bg: #050810;
  --bg2: #080d1a;
  --surface: #0d1428;
  --accent: #00e5ff;
  --accent2: #7b61ff;
  --accent3: #00ff9d;
  --text: #e8eaf6;
  --muted: #8892b0;
  --border: rgba(0,229,255,0.12);
  --card-bg: rgba(13,20,40,0.8);
  --radius: 10px;
  --max-width: 1200px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 5%;
}

/* ============================================
   CURSOR
   ============================================ */
.cursor {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s;
  mix-blend-mode: screen;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 18px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(5,8,16,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.site-header.scrolled { background: rgba(5,8,16,0.97); }

.site-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.site-logo span { color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav ul { display: flex; gap: 2rem; list-style: none; }
.main-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}
.main-nav a:hover { color: var(--accent); }
.main-nav a:hover::after { width: 100%; }

.nav-cta {
  background: var(--accent) !important;
  color: #000 !important;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all 0.2s !important;
  white-space: nowrap;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  background: transparent !important;
  color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--accent);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   HERO (Homepage)
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 5% 80px;
  position: relative;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,229,255,0.12) 0%, transparent 70%);
  top: 50%; left: 40%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: pulseGlow 6s ease-in-out infinite;
}
.hero-glow2 {
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(123,97,255,0.1) 0%, transparent 70%);
  top: 20%; right: 5%;
  pointer-events: none;
  animation: pulseGlow 8s ease-in-out infinite reverse;
}
@keyframes pulseGlow {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
}
.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.9s ease forwards;
  opacity: 0;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,229,255,0.08);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px 6px 8px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent3);
  border-radius: 50%;
  animation: blink 1.5s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero h1 .gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 40px;
  font-weight: 300;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #000;
  padding: 13px 28px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,229,255,0.3); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  padding: 13px 28px;
  border-radius: 6px;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition: all 0.25s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  z-index: 1;
}
.stat {
  text-align: center;
  padding: 36px 20px;
  border-right: 1px solid var(--border);
  transition: background 0.3s;
}
.stat:last-child { border-right: none; }
.stat:hover { background: rgba(0,229,255,0.04); }
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

/* ============================================
   SECTION SHARED
   ============================================ */
.section { padding: 90px 5%; position: relative; }
.section-dark { background: var(--bg2); }

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  line-height: 1.1;
}
.section-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 50px;
}

/* ============================================
   TOPICS GRID
   ============================================ */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5px;
  background: var(--border);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.topic-card {
  background: var(--card-bg);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  cursor: pointer;
}
.topic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  transition: height 0.4s ease;
}
.topic-card:hover { background: rgba(0,229,255,0.04); }
.topic-card:hover::before { height: 100%; }
.topic-icon { font-size: 2rem; margin-bottom: 20px; display: block; transition: transform 0.3s; }
.topic-card:hover .topic-icon { transform: scale(1.15); }
.topic-title { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.topic-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.topic-tag { display: inline-block; margin-top: 16px; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }

/* ============================================
   ARTICLE CARDS
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.posts-grid.featured-layout {
  grid-template-columns: 1.4fr 1fr 1fr;
}
.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,229,255,0.3);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 40px rgba(0,229,255,0.06);
}
.post-card.is-featured { grid-row: span 2; }

.post-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface), #111a35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
}
.post-card.is-featured .post-thumbnail { aspect-ratio: 4/3; }
.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .post-thumbnail img { transform: scale(1.05); }
.post-thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(5,8,16,0.85));
}
.post-cat-badge {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--accent);
  color: #000;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 500;
}

.post-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.post-meta .sep { opacity: 0.4; }
.post-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.post-card.is-featured .post-title { font-size: 1.4rem; }
.post-card:hover .post-title { color: var(--accent); }
.post-excerpt {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.82rem;
  margin-top: 20px;
  letter-spacing: 0.04em;
  transition: gap 0.2s;
}
.post-card:hover .post-link { gap: 10px; }

/* Read more button for blog archive */
.view-all-wrap { text-align: center; margin-top: 50px; }

/* ============================================
   SINGLE POST PAGE
   ============================================ */
.single-hero {
  padding: 140px 5% 60px;
  position: relative;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.single-hero-inner { max-width: 860px; margin: 0 auto; }
.single-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.single-breadcrumb a { color: var(--accent); transition: opacity 0.2s; }
.single-breadcrumb a:hover { opacity: 0.7; }
.single-breadcrumb .sep { opacity: 0.4; }

.single-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.single-cat {
  background: rgba(0,229,255,0.1);
  border: 1px solid rgba(0,229,255,0.2);
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
}
.single-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}
.single-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.83rem;
  color: var(--muted);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.single-meta .author { display: flex; align-items: center; gap: 8px; }
.author-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }

.single-thumbnail {
  margin: 50px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.single-thumbnail img { width: 100%; }

/* Post Content */
.post-content-wrap {
  padding: 60px 5%;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}
.post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #c5cde8;
}
.post-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  margin: 50px 0 20px;
  letter-spacing: -0.02em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.post-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 16px;
  letter-spacing: -0.01em;
}
.post-content h4 { font-family: 'Syne', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--text); margin: 28px 0 12px; }
.post-content p { margin-bottom: 20px; }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { opacity: 0.8; }
.post-content ul, .post-content ol { margin: 20px 0 20px 24px; }
.post-content li { margin-bottom: 10px; }
.post-content ul li::marker { color: var(--accent); }
.post-content strong { color: var(--text); font-weight: 500; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 32px 0;
  background: rgba(0,229,255,0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted);
}
.post-content code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 0.88em;
  color: var(--accent3);
}
.post-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  overflow-x: auto;
  margin: 28px 0;
}
.post-content pre code { background: none; border: none; padding: 0; }
.post-content img {
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 28px 0;
  width: 100%;
}
.post-content table { width: 100%; border-collapse: collapse; margin: 28px 0; }
.post-content th {
  background: var(--surface);
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--border);
}
.post-content td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  font-size: 0.93rem;
}
.post-content tr:hover td { background: rgba(0,229,255,0.03); }

/* Sidebar */
.post-sidebar { position: sticky; top: 90px; }
.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}
.sidebar-widget-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
/* TOC */
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 10px; }
.toc-list a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-list a::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
  flex-shrink: 0;
}
.toc-list a:hover { color: var(--accent); }
.toc-list a.active { color: var(--accent); }
.toc-list a.active::before { opacity: 1; }

/* Recent Posts in Sidebar */
.sidebar-posts { display: flex; flex-direction: column; gap: 16px; }
.sidebar-post { display: flex; gap: 12px; align-items: flex-start; }
.sidebar-post-thumb {
  width: 60px; height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.sidebar-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-post-title {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  transition: color 0.2s;
}
.sidebar-post:hover .sidebar-post-title { color: var(--accent); }
.sidebar-post-date { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }

/* Tags */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 100px;
  transition: all 0.2s;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }

/* Post nav (prev/next) */
.post-navigation {
  padding: 40px 5%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  border-top: 1px solid var(--border);
}
.post-nav-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s;
}
.post-nav-link:hover { border-color: rgba(0,229,255,0.3); transform: translateY(-3px); }
.post-nav-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.post-nav-link.next { text-align: right; }
.post-nav-title { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.35; }

/* ============================================
   BLOG ARCHIVE PAGE
   ============================================ */
.archive-hero {
  padding: 140px 5% 60px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.archive-hero::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,229,255,0.08) 0%, transparent 70%);
  top: 0; right: 10%;
  pointer-events: none;
}
.archive-hero-inner { max-width: 700px; }
.archive-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.archive-hero p { font-size: 1rem; color: var(--muted); line-height: 1.7; max-width: 500px; }

.archive-content { padding: 70px 5%; }
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 60px;
}
.pagination a, .pagination span {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--muted);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination span.current { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 500; }

/* ============================================
   MARQUEE (Tools)
   ============================================ */
.tools-section { padding: 70px 5%; overflow: hidden; }
.tools-marquee { position: relative; margin-top: 24px; }
.tools-marquee::before, .tools-marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px; z-index: 2;
}
.tools-marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.tools-marquee::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.tools-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tool-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 20px;
  font-size: 0.85rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  transition: all 0.2s;
}
.tool-pill:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   WHY US / FEATURES
   ============================================ */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.why-features { display: flex; flex-direction: column; gap: 24px; }
.why-feat {
  display: flex;
  gap: 20px;
  padding: 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.3s;
}
.why-feat:hover { background: rgba(0,229,255,0.04); border-color: var(--border); }
.feat-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.feat-title { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.feat-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* Orbit visual */
.why-visual { position: relative; height: 460px; display: flex; align-items: center; justify-content: center; }
.vis-ring { position: absolute; border-radius: 50%; border: 1px solid; animation: spin linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinR { to { transform: rotate(-360deg); } }
.ring1 { width: 280px; height: 280px; border-color: rgba(0,229,255,0.15); animation-duration: 20s; }
.ring2 { width: 380px; height: 380px; border-color: rgba(123,97,255,0.1); animation-duration: 30s; animation-name: spinR; border-style: dashed; }
.ring3 { width: 460px; height: 460px; border-color: rgba(0,229,255,0.05); animation-duration: 45s; }
.vis-center {
  width: 150px; height: 150px;
  background: var(--surface);
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; z-index: 1;
  box-shadow: 0 0 60px rgba(0,229,255,0.15);
}
.vis-center-icon { font-size: 2.2rem; }
.vis-center-text { font-family: 'Syne', sans-serif; font-size: 0.7rem; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 6px; }
.vis-orbit {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  transition: transform 0.2s;
}
.vis-orbit:hover { transform: scale(1.2); }
.orb1 { top: 24px; left: 50%; margin-left: -28px; }
.orb2 { top: 50%; right: 24px; margin-top: -28px; }
.orb3 { bottom: 24px; left: 50%; margin-left: -28px; }
.orb4 { top: 50%; left: 24px; margin-top: -28px; }

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-section {
  background: linear-gradient(135deg, rgba(0,229,255,0.06) 0%, rgba(123,97,255,0.06) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 90px 5%;
  text-align: center;
}
.newsletter-inner { max-width: 600px; margin: 0 auto; }
.newsletter-inner h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.newsletter-inner p { color: var(--muted); font-size: 1rem; line-height: 1.7; margin-bottom: 36px; }
.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.3s;
}
.newsletter-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,229,255,0.1); }
.newsletter-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 20px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  outline: none;
  min-width: 0;
}
.newsletter-form input::placeholder { color: var(--muted); }
.newsletter-form button {
  background: var(--accent);
  border: none;
  color: #000;
  padding: 14px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.newsletter-form button:hover { background: #33ecff; }
.newsletter-note { font-size: 0.75rem; color: var(--muted); margin-top: 14px; opacity: 0.7; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 5% 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 50px;
}
.footer-brand .site-logo { font-size: 1.3rem; margin-bottom: 16px; display: block; }
.footer-brand p { font-size: 0.875rem; color: var(--muted); line-height: 1.7; max-width: 240px; }
.footer-col h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--muted); font-size: 0.88rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--muted); }
.footer-socials { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,229,255,0.06); }

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   404 PAGE
   ============================================ */
.error404-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 5%;
}
.error404-num {
  font-family: 'Syne', sans-serif;
  font-size: 10rem;
  font-weight: 800;
  color: var(--surface);
  line-height: 1;
  position: relative;
  letter-spacing: -0.05em;
}
.error404-num::after {
  content: '404';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.15;
}
.error404-title { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; margin: 20px 0 12px; }
.error404-desc { color: var(--muted); margin-bottom: 36px; }

/* ============================================
   SEARCH
   ============================================ */
.search-form {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.search-form:focus-within { border-color: var(--accent); }
.search-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  outline: none;
  font-size: 0.9rem;
}
.search-form input::placeholder { color: var(--muted); }
.search-form button {
  background: var(--accent);
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  color: #000;
  font-size: 1rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media(max-width: 1100px) {
  .posts-grid.featured-layout { grid-template-columns: 1fr 1fr; }
  .post-card.is-featured { grid-row: auto; }
  .post-content-wrap { grid-template-columns: 1fr; }
  .post-sidebar { position: static; }
  .why-grid { grid-template-columns: 1fr; gap: 40px; }
  .why-visual { height: 320px; }
  .ring3 { width: 300px; height: 300px; }
  .ring2 { width: 240px; height: 240px; }
  .ring1 { width: 180px; height: 180px; }
}

@media(max-width: 768px) {
  .main-nav ul, .main-nav .nav-cta { display: none; }
  .menu-toggle { display: flex; }
  .main-nav.mobile-open ul {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: rgba(5,8,16,0.98);
    backdrop-filter: blur(20px);
    padding: 24px 5%;
    border-bottom: 1px solid var(--border);
    gap: 0;
  }
  .main-nav.mobile-open ul li { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .main-nav.mobile-open .nav-cta { display: block; margin-top: 16px; text-align: center; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .post-navigation { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: 1fr; }
}
