/* CSS Variables */
:root {
  --background: #0f1219;
  --foreground: #f0f0f0;
  --card: #161b26;
  --card-foreground: #f0f0f0;
  --primary: #22d3ee;
  --primary-foreground: #0f1219;
  --secondary: #1e2433;
  --secondary-foreground: #d1d1d1;
  --muted: #1e2433;
  --muted-foreground: #8b8b8b;
  --accent: #34d399;
  --accent-foreground: #0f1219;
  --border: #2a3142;
  --radius: 0.5rem;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 800px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(15, 18, 25, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
}

.nav {
  display: none;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

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

/* Hero Section */
.hero {
  padding: 4rem 0;
  background: linear-gradient(to bottom, var(--card), var(--background));
  border-bottom: 1px solid var(--border);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .hero {
    padding: 5rem 0;
  }
  
  .hero-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.hero-text {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.pulse-dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
}

.pulse-dot::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.pulse-dot::after {
  content: '';
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: 50%;
}

@keyframes pulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(2); }
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero p {
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

.hero-stats {
  display: flex;
  gap: 1rem;
}

.stat-card {
  padding: 1rem;
  background: rgba(22, 27, 38, 0.5);
  border: 1px solid rgba(42, 49, 66, 0.3);
  border-radius: var(--radius);
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Fira Code', monospace;
}

.stat-value.primary { color: var(--primary); }
.stat-value.accent { color: var(--accent); }

.stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* SEO Section */
.seo-section {
  padding: 4rem 0;
  background: linear-gradient(180deg, var(--background) 0%, var(--card) 100%);
}

.seo-features-row {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .seo-features-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.seo-feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.seo-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.seo-feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.15);
}

.seo-feature-card:hover::before {
  opacity: 1;
}

.seo-feature-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 50%;
  margin-bottom: 1.25rem;
}

.seo-feature-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--primary);
}

.seo-feature-icon.accent {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.2);
}

.seo-feature-icon.accent svg {
  color: var(--accent);
}

.seo-feature-icon.warning {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
}

.seo-feature-icon.warning svg {
  color: #fbbf24;
}

.seo-feature-content h3 {
  color: var(--foreground);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.seo-feature-content p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* SEO Text */
.seo-text {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.seo-text h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--foreground);
}

.seo-text .highlight {
  color: var(--primary);
}

.seo-columns {
  display: grid;
  gap: 1.5rem;
  text-align: left;
}

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

.seo-columns p {
  color: var(--muted-foreground);
  line-height: 1.8;
  font-size: 0.9375rem;
}

.seo-columns strong {
  color: var(--foreground);
}

/* Posts Section */
.posts-section {
  padding: 3rem 0;
}

.section-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.posts-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Post Card */
.post-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.post-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.1);
  transform: translateY(-2px);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.post-card h3 {
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.post-card:hover h3 {
  color: var(--primary);
}

.post-description {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  flex-grow: 1;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  padding: 0.25rem 0.5rem;
  background: var(--secondary);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: var(--primary);
}

.read-more {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
}

.read-more svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s;
}

.post-card:hover .read-more svg {
  transform: translateX(4px);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer p, .footer a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

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

.footer a:hover {
  color: var(--primary);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Article Page */
.article {
  padding: 2rem 0 4rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--foreground);
}

.back-link svg {
  width: 1rem;
  height: 1rem;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.article h1 {
  margin-bottom: 1rem;
}

.article-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

/* Article Content */
.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  margin-bottom: 1rem;
  color: var(--secondary-foreground);
}

.article-content ul, .article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--secondary-foreground);
}

.article-content strong {
  color: var(--foreground);
  font-weight: 600;
}

.article-content code {
  padding: 0.125rem 0.375rem;
  background: var(--secondary);
  border-radius: 0.25rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.875em;
  color: var(--primary);
}

/* Article Images */
.article-image {
  display: block;
  margin: 2rem auto;
  text-align: center;
}

.article-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.article-image figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-style: italic;
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
