:root {
  --primary-color: #6c5ce7;
  /* Similar to the purple button */
  --text-dark: #1a1a1a;
  --text-gray: #666666;
  --bg-color: #ffffff;
  --bg-light: #f8f9fa;
  --card-radius: 16px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Tag Colors */
  --tag-blue-bg: #e3f2fd;
  --tag-blue-text: #1976d2;
  --tag-orange-bg: #fff3e0;
  --tag-orange-text: #f57c00;
  --tag-green-bg: #e8f5e9;
  --tag-green-text: #388e3c;
  --tag-purple-bg: #f3e5f5;
  --tag-purple-text: #7b1fa2;
  --tag-red-bg: #ffebee;
  --tag-red-text: #d32f2f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background-color: var(--bg-color);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #eee;
}

.logo {
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 1rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  color: var(--text-gray);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.topic-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.topic-pill {
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.topic-pill:hover {
  transform: translateY(-2px);
}

/* Main Grid */
.main-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.content-feed {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: transform 0.3s ease;
  flex-direction: column;
  display: flex;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.card-image {
  height: 240px;
  width: 100%;
  object-fit: cover;
  background-color: #eee;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-tags {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
}

.tag {
  padding: 0.25rem 0.6rem;
  background: white;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card-content {
  padding: 1.5rem;
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-bottom: 0.8rem;
}

.author-img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #ddd;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.6;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.widget {
  background: white;
  border-radius: var(--card-radius);
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-widget {
  text-align: left;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.profile-pic-large {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ccc;
  object-fit: cover;
}

.profile-name {
  font-weight: 700;
  font-size: 1rem;
}

.profile-role {
  font-size: 0.75rem;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.widget-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-gray);
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.featured-card {
  position: relative;
  height: 300px;
  border-radius: var(--card-radius);
  color: white;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
  z-index: 1;
}

.featured-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.featured-content {
  position: relative;
  z-index: 2;
}

.work-list,
.tech-list,
.link-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.work-item {
  display: flex;
  justify-content: space-between;
}

.work-role {
  font-weight: 600;
  display: block;
}

.work-company {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.work-date {
  font-size: 0.8rem;
  color: var(--text-gray);
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tech-icon {
  width: 40px;
  height: 40px;
  background: #000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

/* Newsletter */
.newsletter {
  text-align: center;
  padding: 4rem 1rem;
  background: white;
  margin-top: 4rem;
}

.newsletter h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.newsletter-form {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.newsletter-form input {
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  width: 300px;
  background: #fdfdfd;
}

/* Footer */
footer {
  padding: 3rem 5%;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-gray);
}

.footer-cols {
  display: flex;
  gap: 4rem;
}

.footer-col h4 {
  color: black;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

/* ... Existing Sidebar styles ... */

/* Single Post Page Styles */
.article-header {
  margin-bottom: 2rem;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs a {
  color: var(--text-gray);
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--primary-color);
}

.breadcrumbs i {
  font-size: 0.7em;
}

.article-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.author-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-img-large {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  display: block;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1rem;
}

.post-date {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.featured-image-container {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  background-color: #f0f0f0;
}

.featured-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-caption {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-top: 0.5rem;
  font-style: italic;
}

.article-content {
  margin-top: 2rem;
  max-width: 100%;
  font-family: 'Merriweather', serif;
  /* Use serif for better reading */
  color: #333;
}

.article-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.article-content .lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: #2c3e50;
  margin-bottom: 2rem;
}

.article-content h2 {
  font-family: var(--font-family);
  /* Back to sans-serif for headings */
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.article-content h3 {
  font-family: var(--font-family);
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding: 1rem 2rem;
  background: var(--bg-light);
  font-size: 1.2rem;
  font-style: italic;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  color: #555;
}

.article-tags {
  margin-top: 3rem;
  display: flex;
  gap: 0.5rem;
}

/* Comments */
.comments-section h3 {
  margin-bottom: 1.5rem;
}

.comment {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #333;
}

.comment-body {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 12px;
  flex: 1;
}

.comment-meta {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-bottom: 0.5rem;
}

/* .. existing styles .. */

/* Centralized Header */
.centered-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.header-pills {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Article List Styling */
.article-list {
  list-style: none;
  /* Removed default bullets */
  margin-bottom: 2rem;
}

.article-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.article-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* Dark Quote Box */
.dark-quote-box {
  background-color: #2c2c3e;
  /* Dark purple/gray */
  color: white;
  padding: 2.5rem;
  border-radius: 16px;
  position: relative;
  margin: 3rem 0;
}

.quote-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.dark-quote-box p {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  font-family: var(--font-family);
}

.quote-author {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

/* Read Next Section Responsive */
@media (max-width: 768px) {
  .read-next-section .content-feed {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr 300px;
  }

  .content-feed {
    grid-column: 1 / 2;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .main-container {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .content-feed {
    grid-column: 1 / 2;
  }

  .sidebar {
    margin-top: 4rem;
  }
}