@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&display=swap');

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

body {
  background-color: #ffffff;
  color: #2d3748;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
}

.gradient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at top, rgba(102, 126, 234, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Top Navigation Bar */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  font-size: 1.3em;
  font-weight: 700;
  color: #667eea;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: -0.5px;
}

.nav-logo:hover {
  color: #5568d3;
}

.nav-links {
  display: flex;
  gap: 35px;
  align-items: center;
}

.nav-link {
  color: #4a5568;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95em;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #667eea;
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #667eea;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.external-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.external-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  transition: all 0.3s ease;
  transform: translateY(0) translateX(0);
}

.external-link:hover .external-icon {
  opacity: 1;
  transform: translateY(-2px) translateX(2px);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 2px;
  background-color: #4a5568;
  transition: all 0.3s ease;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 20px 60px;
  position: relative;
  z-index: 2;
}

.post-header {
  margin-bottom: 40px;
  text-align: center;
}

.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.9em;
  color: #718096;
}

.separator {
  color: #cbd5e0;
}

.post-date {
  font-weight: 500;
}

.read-time {
  color: #a0aec0;
}

.post-header h1 {
  font-size: 2.5em;
  font-weight: 700;
  color: #2d3748;
  line-height: 1.2;
  margin-bottom: 20px;
}

.post-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 25px;
}

.tag {
  background: #f7fafc;
  color: #667eea;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 500;
  border: 1px solid #e2e8f0;
}

.author-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.author-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.author-name {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.95em;
}

.author-title {
  font-size: 0.85em;
  color: #718096;
}

.post-image {
  width: 100%;
  height: 400px;
  margin-bottom: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-caption {
  text-align: center;
  font-size: 0.85em;
  color: #718096;
  margin-top: -30px;
  margin-bottom: 40px;
  font-style: italic;
}

.image-caption a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.2s ease;
}

.image-caption a:hover {
  color: #5568d3;
  text-decoration: underline;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-icon {
  font-size: 6em;
  opacity: 0.3;
}

.post-content {
  font-size: 1.05em;
  line-height: 1.8;
  color: #2d3748;
}

.lead {
  font-size: 1.2em;
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 30px;
  padding-left: 20px;
  border-left: 4px solid #667eea;
}

.post-content h2 {
  font-size: 1.8em;
  font-weight: 700;
  color: #667eea;
  margin-top: 40px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.post-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #667eea, transparent);
}

.post-content h3 {
  font-size: 1.4em;
  font-weight: 600;
  color: #2d3748;
  margin-top: 30px;
  margin-bottom: 15px;
}

.post-content p {
  margin-bottom: 20px;
  color: #4a5568;
}

.post-content ul,
.post-content ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.post-content li {
  margin-bottom: 10px;
  color: #4a5568;
}

.post-content strong {
  color: #2d3748;
  font-weight: 600;
}

.post-content a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-content a:hover {
  color: #5568d3;
  text-decoration: underline;
}

/* Inline images in blog content */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: block;
}

/* Optional: center images */
.post-content p > img {
  margin-left: auto;
  margin-right: auto;
}

.code-block {
  background: #f8f9fa;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin: 25px 0;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-family: 'Fira Code', monospace;
  font-size: 0.9em;
  line-height: 1.6;
  color: #2d3748;
}

.code-block code {
  font-family: 'Fira Code', monospace;
}

code {
  background: #f7fafc;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9em;
  color: #667eea;
}

.post-footer {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid #e2e8f0;
}

.share-section {
  text-align: center;
  margin-bottom: 30px;
}

.share-section h3 {
  font-size: 1.2em;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 20px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn {
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-btn:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.back-to-blog {
  text-align: center;
  margin-top: 30px;
}

.back-link {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.back-link:hover {
  border-color: #667eea;
  background: #f7fafc;
  transform: translateX(-3px);
}

.page-footer {
  text-align: center;
  padding: 40px 20px;
  background-color: #f7fafc;
  font-size: 0.9em;
  color: #718096;
  border-top: 1px solid #e2e8f0;
  margin-top: 60px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 20px;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: 15px 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .container {
    padding: 100px 20px 40px;
  }

  .post-header h1 {
    font-size: 1.8em;
  }

  .post-image {
    height: 250px;
  }

  .post-content {
    font-size: 1em;
  }

  .lead {
    font-size: 1.1em;
  }

  .post-content h2 {
    font-size: 1.5em;
  }

  .post-content h3 {
    font-size: 1.2em;
  }

  .code-block {
    padding: 15px;
  }

  .code-block pre {
    font-size: 0.8em;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
  }
}
