/* NerdSip Blog Shared Styles */
:root {
  --background: #022c22;
  --surface: #064e3b;
  --primary: #10b981;
  --secondary: #34d399;
  --accent: #2dd4bf;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Navigation Bar & Header */
header, .nav-bar {
  background: rgba(2, 44, 34, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content, .nav-bar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo img {
  width: 32px;
  height: 32px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.nerd { color: #fff; }
.sip { color: var(--primary); }

.nav-links, nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a, nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* CTA Button in Header */
nav .cta-btn, .nav-links .cta-btn {
  background: var(--primary);
  color: var(--background);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  margin-top: 0; /* Reset margin for header */
}

nav .cta-btn:hover, .nav-links .cta-btn:hover {
  background: var(--secondary);
  transform: translateY(-1px);
}

/* Main Content Layout */
main, .blog-container {
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

/* Hero Section */
.hero, .blog-header {
  text-align: center;
  margin-bottom: 4rem;
}

.hero-label, .category, .badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
  background: linear-gradient(to bottom right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-meta, .meta, .meta-item {
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.meta-item svg {
  opacity: 0.7;
}

.hero-image, .featured-image {
  margin-top: 3rem;
  margin-bottom: 3rem;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  width: 100%;
}

.hero-image img, .featured-image img, .featured-image {
  width: 100%;
  height: auto;
  display: block;
}

/* Article Content */
article, .content {
  font-size: 1.125rem;
}

article p, .content p {
  margin-bottom: 1.5rem;
}

article h2, .content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 3rem 0 1.5rem;
  color: #fff;
}

article h3, .content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: #fff;
}

article img, .content img, .article-image {
  width: 100%;
  border-radius: 1rem;
  margin: 2rem 0;
}

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

article li, .content li {
  margin-bottom: 0.5rem;
}

/* Special Boxes */
.highlight-box, .resources-box, .references {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  padding: 2rem;
  border-radius: 0.5rem;
  margin: 2.5rem 0;
}

.references h3 {
  margin-top: 0 !important;
  font-size: 1.25rem !important;
}

.references ol {
  margin-bottom: 0;
  padding-left: 1.5rem;
}

.references li {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.references a {
  color: var(--primary);
  text-decoration: none;
}

.references a:hover {
  text-decoration: underline;
}

.cta-section {
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%);
  padding: 3rem;
  border-radius: 1.5rem;
  text-align: center;
  margin: 4rem 0;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.cta-btn {
  display: inline-block;
  background: var(--primary);
  color: #022c22;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  margin-top: 1.5rem;
  transition: transform 0.2s, background 0.2s;
}

.cta-btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

/* Related Posts */
.related-posts {
  border-top: 1px solid rgba(16, 185, 129, 0.1);
  padding-top: 4rem;
  margin-top: 4rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.related-card {
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.2s;
  border: 1px solid rgba(16, 185, 129, 0.1);
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.related-card img {
  margin: 0;
  border-radius: 0;
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.related-card-content {
  padding: 1.5rem;
}

.related-card h4 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.related-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Footer */
footer {
  border-top: 1px solid rgba(16, 185, 129, 0.1);
  padding: 4rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.copyright, .footer-copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  .related-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-bar, header { padding: 1rem; }
  main, .blog-container { margin: 2rem auto; }
}
