/* ============================================
   Minimal Blog Styling (matching iamtrask.github.io)
   ============================================ */

/* Base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #24292e;
  background-color: #fff;
}

.wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 40px;
}

/* ============================================
   Header
   ============================================ */
header {
  margin-bottom: 50px;
  text-align: center;
}

header h1 {
  margin: 0 0 10px 0;
  font-size: 2.5em;
  font-weight: 400;
}

header h1 a {
  color: #24292e;
  text-decoration: none;
}

header h1 a:hover {
  text-decoration: underline;
}

.subtitle {
  color: #586069;
  margin: 10px 0 0 0;
  font-size: 1em;
  font-weight: 300;
}

/* Landing page header - combines intro with header */
.landing-header h1 {
  font-size: 2.5em;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: #24292e;
}

.landing-header .subtitle {
  font-size: 1.2em;
  margin: 10px 0;
  font-weight: 400;
  color: #586069;
}

.landing-header .page-subtitle {
  font-size: 0.9em;
  margin: 10px 0 20px 0;
  color: #586069;
}

.landing-header .page-subtitle a {
  color: #0366d6;
  text-decoration: none;
}

.landing-header .page-subtitle a:hover {
  text-decoration: underline;
}

.social-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.social-links a {
  color: #586069;
  font-size: 1em;
  text-decoration: none;
}

.social-links a:hover {
  color: #0366d6;
  text-decoration: underline;
}

/* ============================================
   Navigation
   ============================================ */
nav {
  margin-bottom: 40px;
  margin-top: 0;
  text-align: right;
  border-bottom: 1px solid #e1e4e8;
  padding-bottom: 20px;
  padding-top: 0;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

nav li {
  margin: 0;
}

nav a {
  color: #586069;
  text-decoration: none;
  font-weight: 600;
}

nav a:hover,
nav a.active {
  color: #24292e;
  text-decoration: underline;
}

/* Navigation on the right for blog posts */
nav.nav-right {
  text-align: right;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 20px;
}

nav.nav-right ul {
  justify-content: flex-end;
}

/* ============================================
   Content
   ============================================ */
section {
  margin-bottom: 40px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #24292e;
  margin-top: 0;
}

h1 {
  font-size: 32px;
  margin-bottom: 16px;
}

h2 {
  font-size: 24px;
  margin-top: 24px;
  margin-bottom: 16px;
}

h3 {
  font-size: 20px;
  margin-top: 24px;
  margin-bottom: 16px;
}

p {
  margin: 0 0 10px 0;
}

a {
  color: #0366d6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================
   Post List
   ============================================ */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e1e4e8;
}

.post-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.post-meta {
  color: #586069;
  font-size: 14px;
  margin-bottom: 10px;
  display: block;
}

.post-link {
  color: #24292e;
  text-decoration: none;
  font-size: 24px;
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}

.post-link:hover {
  text-decoration: underline;
}

.post-excerpt {
  color: #586069;
  margin: 10px 0;
  line-height: 1.5;
}

/* ============================================
   Post Page
   ============================================ */
.post-header {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e1e4e8;
}

.post-title {
  font-size: 32px;
  margin-bottom: 16px;
  color: #24292e;
  font-weight: 600;
  line-height: 1.25;
}

.post-content {
  line-height: 1.5;
  font-size: 16px;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 24px;
  margin-bottom: 16px;
  color: #24292e;
  font-weight: 600;
}

.post-content h1 {
  font-size: 2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eaecef;
}

.post-content h2 {
  font-size: 1.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eaecef;
}

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

.post-content code {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  background-color: rgba(27, 31, 35, 0.05);
  border-radius: 3px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

.post-content pre {
  padding: 16px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 3px;
  margin: 16px 0;
}

.post-content pre code {
  display: inline;
  max-width: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: inherit;
  word-wrap: normal;
  background-color: transparent;
  border: 0;
  border-radius: 0;
}

/* ============================================
   Code Blocks with Line Numbers, Copy, and Collapse (JavaScript-generated)
   ============================================ */
.code-block-wrapper {
  margin: 16px 0;
  border: 1px solid #e1e4e8;
  border-radius: 3px;
  overflow: hidden;
  background-color: #f6f8fa;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background-color: #fafbfc;
  border-bottom: 1px solid #e1e4e8;
}

.code-header-left {
  display: flex;
  align-items: center;
}

.code-language {
  font-size: 11px;
  font-weight: 600;
  color: #586069;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  background-color: #e1e4e8;
  border-radius: 3px;
}

.code-header-right {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.font-size-controls {
  display: flex;
  gap: 2px;
  border: 1px solid #d1d5da;
  border-radius: 3px;
  overflow: hidden;
}

.code-control-button {
  background: transparent;
  border: none;
  border-right: 1px solid #d1d5da;
  border-radius: 0;
  padding: 4px 8px;
  font-size: 12px;
  color: #586069;
  cursor: pointer;
  transition: all 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  white-space: nowrap;
}

.font-size-controls .code-control-button:last-child {
  border-right: none;
}

.code-control-button:hover {
  background-color: #f3f4f6;
  color: #24292e;
}

.code-control-button.copied {
  background-color: #28a745;
  color: white;
}

.code-block-wrapper.collapsed .code-with-line-numbers {
  display: none;
}

.code-with-line-numbers {
  display: flex;
  background-color: #f6f8fa;
  overflow: hidden;
}

.code-with-line-numbers .line-numbers {
  background-color: #f6f8fa;
  border-right: 1px solid #e1e4e8;
  padding: 16px 8px 16px 16px;
  text-align: right;
  user-select: none;
  -webkit-user-select: none;
  min-width: 50px;
  color: #6a737d;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 85%;
  line-height: 1.45;
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
}

.code-with-line-numbers .line-number {
  display: block !important;
  visibility: visible !important;
  white-space: nowrap;
  line-height: 1.45;
  height: 1.45em;
}

/* Ensure blog post code block line numbers are always visible */
.post-content .code-with-line-numbers .line-numbers,
.post-content .code-with-line-numbers .line-number {
  display: block !important;
  visibility: visible !important;
}

/* Ensure archive lists are not affected by code block styles */
.archive-section .archive-posts,
.archive-section .archive-item,
.archive-section .archive-date,
.archive-section .archive-link {
  /* Reset any code block styles that might leak */
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  display: inherit !important;
}

/* Ensure blog post code block line numbers are always visible (highest priority) */
.post-content .code-with-line-numbers .line-numbers,
.post-content .code-with-line-numbers .line-number {
  display: block !important;
  visibility: visible !important;
}

/* Hide line numbers ONLY for archive page code blocks, but keep code block visible */
.archive-section .rouge-gutter,
.archive-section .rouge-line-number,
.archive-section td.rouge-gutter,
.archive-section pre.lineno,
.archive-section .rouge-table td.rouge-gutter,
.archive-section table.rouge-table td.rouge-gutter,
.archive-section .rouge-table .rouge-gutter {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Make sure the code cell takes full width when gutter is hidden */
.archive-section table.rouge-table td.rouge-code {
  width: 100% !important;
}

/* Hide the gutter column in Rouge tables on archive page */
.archive-section table.rouge-table tr td:first-child.rouge-gutter {
  display: none !important;
}

/* Ensure archive content is visible after JavaScript processes it */
.archive-year,
.archive-posts,
.archive-item {
  display: block !important;
  visibility: visible !important;
}

.code-with-line-numbers .code-content {
  flex: 1;
  padding: 16px;
  overflow-x: auto;
  background-color: #f6f8fa;
}

.code-with-line-numbers .code-content pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 85%;
  line-height: 1.45;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  display: block;
}

.code-with-line-numbers .code-content code {
  background: transparent;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  font-size: 100%;
  white-space: pre;
  display: block;
}

.code-with-line-numbers .code-content pre {
  white-space: pre;
  margin: 0;
  padding: 0;
}

/* ============================================
   Code Blocks with Line Numbers (Rouge/Kramdown) - Legacy
   ============================================ */
.post-content .highlight {
  margin-bottom: 16px;
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 3px;
  overflow: hidden;
}

/* Pre and code tags that wrap the table - must not break table layout */
.post-content .highlight > pre,
.post-content .highlight > pre > code {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  display: block !important;
  overflow: visible !important;
}

.post-content .highlight pre {
  margin-bottom: 0;
  word-break: normal;
  display: block;
}

.post-content .highlight table,
.post-content .highlight .rouge-table,
.post-content table.rouge-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 0 !important;
  display: table !important;
  table-layout: fixed !important;
  background-color: #f6f8fa;
}

.post-content .highlight tbody,
.post-content table.rouge-table tbody {
  display: table-row-group !important;
}

.post-content .highlight tr,
.post-content table.rouge-table tr {
  display: table-row !important;
}

.post-content .highlight td,
.post-content table.rouge-table td {
  display: table-cell !important;
  vertical-align: top !important;
  border: none !important;
  padding: 0 !important;
}

/* Rouge line number column (rouge-gutter) */
.post-content .highlight td.lineno,
.post-content .highlight td.rouge-gutter {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  padding: 16px 8px 16px 16px;
  text-align: right;
  color: #6a737d;
  background-color: #f6f8fa;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  border-right: 1px solid #e1e4e8;
  display: table-cell !important;
}

/* Pre tags inside line number cells - must preserve line breaks */
.post-content .highlight td.rouge-gutter pre,
.post-content .highlight td.lineno pre,
.post-content table.rouge-table td.rouge-gutter pre {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  display: block !important;
  font-size: 85% !important;
  line-height: 1.45 !important;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace !important;
  white-space: pre !important; /* Preserve line breaks for line numbers */
}

/* Rouge code column (rouge-code) */
.post-content .highlight td.code,
.post-content .highlight td.rouge-code {
  width: auto;
  padding: 16px;
  overflow-x: auto;
  background-color: #f6f8fa;
}

.post-content .highlight td.code pre,
.post-content .highlight td.rouge-code pre,
.post-content table.rouge-table td.rouge-code pre {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  overflow-x: auto !important;
  font-size: 85% !important;
  line-height: 1.45 !important;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace !important;
  display: block !important;
  white-space: pre !important; /* Preserve line breaks for code */
}

.post-content .highlight .lineno {
  display: inline-block;
  color: #6a737d;
}

/* ============================================
   Override Prism.js for consistent styling
   ============================================ */
.post-content pre[class*="language-"],
.post-content code[class*="language-"] {
  background: #f6f8fa !important;
  color: #24292e !important;
  border: 1px solid #e1e4e8 !important;
}

.post-content pre[class*="language-"] code[class*="language-"] {
  background: transparent !important;
  color: #24292e !important;
}

/* ============================================
   Tags
   ============================================ */
.post-tags {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  background: #f6f8fa;
  color: #586069;
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 12px;
  text-decoration: none;
}

.tag:hover {
  background: #e1e4e8;
}

/* ============================================
   Post Layout with Floating TOC
   ============================================ */
.post-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  position: relative;
  justify-content: space-between;
}

.post-content {
  flex: 1;
  min-width: 0; /* Allow flex item to shrink */
  max-width: calc(100% - 290px); /* Leave space for TOC + gap */
}

/* ============================================
   Table of Contents - Floating Sidebar
   ============================================ */
.toc-sidebar {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin-right: 0; /* Align to right edge */
}

.toc {
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 3px;
  padding: 16px;
  position: sticky;
  top: 20px;
}

.toc h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #24292e;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc li {
  margin: 6px 0;
  line-height: 1.4;
}

.toc a {
  color: #586069;
  text-decoration: none;
  font-size: 13px;
  display: block;
  padding: 2px 0;
  transition: color 0.2s;
}

.toc a:hover {
  color: #0366d6;
  text-decoration: none;
}

/* Active TOC link highlighting (can be enhanced with JS) */
.toc a.active {
  color: #0366d6;
  font-weight: 500;
}

/* Responsive: Stack TOC on mobile */
@media (max-width: 1024px) {
  .post-wrapper {
    flex-direction: column;
    gap: 20px;
  }
  
  .toc-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }
  
  .toc {
    position: static;
  }
}

/* ============================================
   Blockquotes
   ============================================ */
.post-content blockquote {
  padding: 0 1em;
  color: #6a737d;
  border-left: 0.25em solid #dfe2e5;
  margin: 16px 0;
}

.post-content blockquote > :first-child {
  margin-top: 0;
}

.post-content blockquote > :last-child {
  margin-bottom: 0;
}

/* ============================================
   Images
   ============================================ */
.post-content img {
  max-width: 100%;
  height: auto;
  margin: 16px 0;
}

/* ============================================
   Lists
   ============================================ */
.post-content ul,
.post-content ol {
  margin: 16px 0;
  padding-left: 2em;
}

.post-content li {
  margin: 0.25em 0;
}

/* ============================================
   Tables
   ============================================ */
/* Regular content tables (not code blocks) - exclude tables inside .highlight */
.post-content > table:not(.rouge-table),
.post-content :not(.highlight) > table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  display: block;
  overflow: auto;
}

.post-content table th {
  font-weight: 600;
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
}

.post-content table td {
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
}

.post-content table tr {
  background-color: #fff;
  border-top: 1px solid #c6cbd1;
}

.post-content table tr:nth-child(2n) {
  background-color: #f6f8fa;
}

/* ============================================
   Home Page
   ============================================ */
.home {
  margin-bottom: 40px;
}

.intro {
  text-align: center;
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e1e4e8;
}

.page-heading {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.page-description {
  font-size: 20px;
  margin: 10px 0;
  font-weight: 300;
  color: #586069;
}

.page-subtitle {
  font-size: 14px;
  margin: 15px 0 0 0;
  color: #586069;
}

.page-subtitle a {
  color: #0366d6;
  text-decoration: none;
}

.page-subtitle a:hover {
  text-decoration: underline;
}

.about-section,
.current-position,
.skills,
.education,
.highlights,
.publications,
.certifications {
  margin: 24px 0;
  padding-bottom: 24px;
  border-bottom: 1px solid #e1e4e8;
}

.about-section:last-child,
.current-position:last-child,
.skills:last-child,
.education:last-child,
.highlights:last-child,
.publications:last-child,
.certifications:last-child {
  border-bottom: none;
}

.about-section h2,
.current-position h2,
.skills h2,
.education h2,
.highlights h2,
.publications h2,
.certifications h2 {
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 16px;
  font-weight: 600;
}

.current-position h3 {
  font-size: 20px;
  margin: 16px 0 8px 0;
  font-weight: 600;
}

.current-position em {
  color: #586069;
  font-size: 14px;
}

.current-position ul,
.education ul,
.highlights ul,
.publications ul,
.certifications ul {
  margin: 16px 0;
  padding-left: 2em;
}

.current-position li,
.education li,
.highlights li,
.publications li,
.certifications li {
  margin: 0.25em 0;
  line-height: 1.5;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.skill-category {
  padding: 16px 0;
  border-bottom: 1px solid #e1e4e8;
}

.skill-category:last-child {
  border-bottom: none;
}

.skill-category h3 {
  font-size: 16px;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.skill-category p {
  margin: 0;
  color: #586069;
  line-height: 1.5;
  font-size: 14px;
}

.education li strong {
  color: #24292e;
  display: block;
  margin-bottom: 4px;
}

.education li em {
  color: #586069;
  font-size: 14px;
}

.highlights li {
  position: relative;
  padding-left: 20px;
}

.highlights li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #586069;
}

.recent-posts {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e1e4e8;
}

.recent-posts h2 {
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 16px;
  font-weight: 600;
}

/* ============================================
   Archive Page
   ============================================ */
.archive-year {
  margin: 24px 0;
  padding-bottom: 24px;
  border-bottom: 1px solid #e1e4e8;
}

.archive-year:last-child {
  border-bottom: none;
}

.archive-year h2 {
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 16px;
  font-weight: 600;
}

/* Archive page styles - apply to both archive-section and direct archive elements */
.archive-section .archive-posts,
.archive-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-section .archive-item,
.archive-item {
  padding: 6px 12px !important;
  margin: 0 !important;
  border-bottom: 1px solid #e1e4e8 !important;
  display: block !important;
  line-height: 1.4 !important;
  transition: background-color 0.2s;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Alternate background colors for archive items */
.archive-section .archive-item:nth-child(odd),
.archive-item:nth-child(odd) {
  background-color: #57b7d3 !important;
}

.archive-section .archive-item:nth-child(even),
.archive-item:nth-child(even) {
  background-color: white !important;
}

.archive-section .archive-item:hover,
.archive-item:hover {
  background-color: #4aa5c0 !important;
}

.archive-section .archive-item:last-child,
.archive-item:last-child {
  border-bottom: 1px solid #e1e4e8 !important;
}

.archive-section .archive-date,
.archive-date {
  font-size: 12px !important;
  font-weight: 600 !important;
  margin-right: 8px !important;
  display: inline !important;
  white-space: nowrap !important;
}

/* Date color for items with blue background (odd) */
.archive-section .archive-item:nth-child(odd) .archive-date,
.archive-item:nth-child(odd) .archive-date {
  color: white !important;
}

/* Date color for items with white background (even) */
.archive-section .archive-item:nth-child(even) .archive-date,
.archive-item:nth-child(even) .archive-date {
  color: #586069 !important;
}

.archive-section .archive-link,
.archive-link {
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  display: inline !important;
  white-space: nowrap !important;
}

/* Link color for items with blue background (odd) */
.archive-section .archive-item:nth-child(odd) .archive-link,
.archive-item:nth-child(odd) .archive-link {
  color: white !important;
}

/* Link color for items with white background (even) */
.archive-section .archive-item:nth-child(even) .archive-link,
.archive-item:nth-child(even) .archive-link {
  color: #24292e !important;
}

/* Hover styles for links on blue background */
.archive-section .archive-item:nth-child(odd) .archive-link:hover,
.archive-item:nth-child(odd) .archive-link:hover {
  color: #e6f7ff !important;
  text-decoration: underline !important;
}

/* Hover styles for links on white background */
.archive-section .archive-item:nth-child(even) .archive-link:hover,
.archive-item:nth-child(even) .archive-link:hover {
  color: #0366d6 !important;
  text-decoration: underline !important;
}

/* ============================================
   Footer
   ============================================ */
footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e1e4e8;
  color: #586069;
  font-size: 12px;
  text-align: center;
}

footer a {
  color: #0366d6;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ============================================
   RSS Subscribe
   ============================================ */
.rss-subscribe {
  margin-top: 40px;
  text-align: center;
  padding: 16px 0;
  border-top: 1px solid #e1e4e8;
  color: #586069;
}

.rss-subscribe a {
  color: #0366d6;
  text-decoration: none;
}

.rss-subscribe a:hover {
  text-decoration: underline;
}

/* ============================================
   Related Posts
   ============================================ */
.related-posts {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e1e4e8;
}

.related-posts h3 {
  color: #24292e;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 600;
}

.related-posts ul {
  list-style: none;
  padding: 0;
}

.related-posts li {
  margin: 8px 0;
  padding: 8px 0;
}

.related-posts a {
  color: #0366d6;
  text-decoration: none;
  font-weight: 400;
}

.related-posts a:hover {
  text-decoration: underline;
}

/* ============================================
   Social Sharing Buttons
   ============================================ */
.social-sharing {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e1e4e8;
}

.social-sharing h4 {
  color: #24292e;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}

.sharing-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  background-color: #fff;
  color: #24292e;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.share-button:hover {
  background-color: #f6f8fa;
  border-color: #d1d5da;
  text-decoration: none;
}

.share-button:active {
  background-color: #e1e4e8;
}

.share-button svg {
  flex-shrink: 0;
}

.share-twitter:hover {
  background-color: #1da1f2;
  border-color: #1da1f2;
  color: #fff;
}

.share-linkedin:hover {
  background-color: #0077b5;
  border-color: #0077b5;
  color: #fff;
}

.share-facebook:hover {
  background-color: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.share-reddit:hover {
  background-color: #ff4500;
  border-color: #ff4500;
  color: #fff;
}

.share-copy:hover {
  background-color: #586069;
  border-color: #586069;
  color: #fff;
}

.share-button.copied {
  background-color: #28a745;
  border-color: #28a745;
  color: #fff;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .wrapper {
    padding: 20px 15px;
  }
  
  header h1 {
    font-size: 2em;
  }
  
  .page-heading {
    font-size: 24px;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .archive-item {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  .archive-date {
    min-width: auto;
    font-size: 12px;
  }
  
  .post-content .highlight td.lineno {
    min-width: 40px;
    padding: 0 8px 0 0;
  }
  
  .sharing-buttons {
    flex-direction: column;
  }
  
  .share-button {
    width: 100%;
    justify-content: center;
  }
}
