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

/* GitHub dark theme (modern) */
body {
  background-color: #0d1117;
  color: #e6edf3;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* mono for code/tech vibe */
.mono, pre, code, .nav-links, .post-meta, .gh-btn {
  font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace !important;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* header — like GitHub navbar */
.gh-header {
  background-color: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
/* Profile picture styles - circular */
.profile-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2d5a7a, #4493f8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  border: 2px solid #3d79b5;
  overflow: hidden;
}
.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.profile-pic.initials {
  background: linear-gradient(145deg, #2d5a7a, #4493f8);
}
.logo-text {
  font-size: 1.4rem;
  font-weight: 600;
  color: #f0f6fc;
}
.logo-text span {
  color: #4493f8;
}
.repo-badge {
  background: #30363d;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #e6edf3;
  border: 1px solid #3d444d;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 1rem;
}
.nav-links a {
  color: #e6edf3;
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: 0.2s;
  cursor: pointer;
}
.nav-links a:hover,
.nav-links a.active {
  color: #4493f8;
  border-bottom-color: #f78166;
}

/* working search bar */
.search-wrapper {
  display: flex;
  gap: 0.5rem;
}
.gh-search {
  background: #0d1117;
  border: 1px solid #3d444d;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  color: #e6edf3;
  width: 220px;
  font-size: 0.9rem;
}
.gh-search:focus {
  border-color: #4493f8;
  outline: none;
}
.search-btn {
  background: #238636;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 1.2rem;
  color: white;
  cursor: pointer;
  font-weight: 600;
}
.search-btn:hover {
  background: #2ea043;
}

/* repo tabs (contextual) */
.repo-bar {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 0.8rem 0;
  margin-bottom: 2rem;
}
.repo-tabs {
  display: flex;
  gap: 1.5rem;
}
.repo-tab {
  color: #e6edf3;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.repo-tab.active {
  border-bottom-color: #f78166;
  font-weight: 600;
}
.repo-tab i {
  margin-right: 6px;
}

/* cards / issues */
.post-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  margin-bottom: 1rem;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.post-card:hover {
  border-color: #3d79b5;
}

.post-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.post-title h3 {
  font-size: 1.4rem;
  font-weight: 600;
}
.post-title a {
  color: #e6edf3;
  text-decoration: none;
  cursor: pointer;
}
.post-title a:hover {
  color: #4493f8;
  text-decoration: underline;
}
.issue-label {
  background: #1d4e2b;
  color: #c5e9d1;
  font-size: 0.7rem;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-weight: 500;
  border: 1px solid #2d7a4b;
}
.label-blue {
  background: #1c3c5e;
  border-color: #316a9c;
  color: #b6d7ff;
}

.post-meta {
  display: flex;
  gap: 2rem;
  margin: 0.8rem 0 0.5rem;
  color: #8d96a0;
  font-size: 0.8rem;
}
.post-excerpt {
  color: #b1bac4;
  margin: 1rem 0 1rem;
  padding-left: 0.5rem;
  border-left: 2px solid #30363d;
}

/* README section (about me) */
.readme-section {
  border: 1px solid #30363d;
  border-radius: 6px;
  margin: 3rem 0;
  background: #0d1117;
}
.readme-header {
  background: #161b22;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid #30363d;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.readme-header i {
  color: #6e7681;
}
.readme-content {
  padding: 2rem;
}
.readme-content h4 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
}
.readme-content p {
  color: #b1bac4;
  margin-bottom: 1.2rem;
}

/* hero for home */
.hero-home {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid #30363d;
  margin-bottom: 2.5rem;
}
.hero-home h1 {
  font-size: 2.8rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.hero-home .gh-desc {
  color: #8d96a0;
  font-size: 1.2rem;
  margin-top: 0.8rem;
}

/* discussion / newsletter */
.gh-discussion {
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 2rem;
  margin: 3rem 0;
  background: #161b22;
}

/* BLOG LAYOUT with LEFT SIDEBAR */
.blog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  margin: 1rem 0 2rem;
}

/* Sidebar styles (used on both blog and post pages) */
.blog-sidebar {
  position: sticky;
  top: 120px;
  align-self: start;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  padding-right: 0.5rem;
}
.sidebar-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}
.sidebar-card h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8d96a0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #30363d;
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-card h3 i {
  font-size: 1rem;
  color: #4493f8;
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag-item {
  background: #1f2b3a;
  color: #b1bac4;
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  border: 1px solid #3d444d;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.tag-item:hover {
  background: #2d3a4d;
  color: #4493f8;
  border-color: #4493f8;
}
.tag-item .count {
  background: #0d1117;
  padding: 0.1rem 0.4rem;
  border-radius: 12px;
  font-size: 0.7rem;
  color: #8d96a0;
}

/* Category list */
.category-list {
  list-style: none;
}
.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #30363d;
  cursor: pointer;
  transition: 0.2s;
}
.category-item:hover {
  color: #4493f8;
}
.category-item:last-child {
  border-bottom: none;
}
.category-item .count {
  background: #1f2b3a;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  color: #8d96a0;
}

/* Stats list */
.stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #b1bac4;
}
.stat-count {
  background: #1f2b3a;
  padding: 0.2rem 0.8rem;
  border-radius: 12px;
  font-weight: 600;
  color: #4493f8;
}

/* Blog main content */
.blog-main {
  min-width: 0; /* Prevents overflow */
}

/* individual blog post page WITH TABLE OF CONTENTS */
.blog-post-container {
  display: grid;
  grid-template-columns: 260px 1fr 220px;
  gap: 2rem;
  margin: 1rem 0 2rem;
}
.blog-post-main {
  min-width: 0;
}
.blog-post-toc {
  position: sticky;
  top: 120px;
  align-self: start;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 1.2rem;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}
.toc-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8d96a0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #30363d;
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toc-list {
  list-style: none;
}
.toc-item {
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #b1bac4;
  cursor: pointer;
  transition: 0.2s;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
}
.toc-item:hover {
  background: #1f2b3a;
  color: #4493f8;
}
.toc-item.active {
  color: #4493f8;
  background: #1f2b3a;
}
.toc-item.active i {
  color: #238636;
}
.toc-item i {
  width: 18px;
  font-size: 0.8rem;
  color: #3d444d;
}
.toc-item.active i {
  color: #238636;
}

.blog-post-full {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 2rem;
}
.blog-post-full h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.blog-post-full .post-meta-large {
  color: #8d96a0;
  border-bottom: 1px solid #30363d;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}
.blog-post-full .post-body {
  color: #e6edf3;
}
.post-body h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #30363d;
  scroll-margin-top: 100px;
}
.post-body h3 {
  font-size: 1.3rem;
  margin: 1.5rem 0 1rem;
  scroll-margin-top: 100px;
}
.post-body p {
  margin-bottom: 1.2rem;
}
.post-body code {
  background: #161b22;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.post-body pre {
  background: #161b22;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.back-button {
  background: transparent;
  border: 1px solid #3d444d;
  color: #e6edf3;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.back-button:hover {
  border-color: #4493f8;
}

/* footer with social icons */
.gh-footer {
  border-top: 1px solid #30363d;
  margin-top: 4rem;
  padding: 2rem 0;
  color: #8d96a0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.footer-links a {
  color: #8d96a0;
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 1.1rem;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #4493f8;
}
.social-icons {
  display: flex;
  gap: 1.8rem;
  font-size: 1.6rem;
}
.social-icons a {
  color: #8d96a0;
  transition: color 0.2s, transform 0.2s;
}
.social-icons a:hover {
  color: #4493f8;
  transform: translateY(-2px);
}

/* simple page visibility */
.page {
  display: none;
}
.page.active-page {
  display: block;
}

/* GitHub-style table */
.gh-table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
}
.gh-table td {
  border: 1px solid #30363d;
  padding: 0.8rem;
}

/* Responsive */
@media (max-width: 1100px) {
  .blog-post-container {
    grid-template-columns: 220px 1fr 200px;
    gap: 1.5rem;
  }
}

@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    position: static;
    width: 100%;
    margin-bottom: 1rem;
  }
  .blog-post-container {
    grid-template-columns: 1fr;
  }
  .blog-post-toc {
    position: static;
    width: 100%;
    margin-top: 1rem;
  }
}

@media (max-width: 700px) {
  .header-content {
    flex-direction: column;
    align-items: start;
  }
  .gh-footer {
    flex-direction: column;
    text-align: center;
  }
}