:root {
  color-scheme: light;
  /* Morandi / Paper Texture Palette */
  --bg: #f5f2e9;           /* User requested background */
  --panel: #fdfcf8;        /* Lighter paper for cards/panels */
  --text: #5c5552;         /* Warm Dark Grey */
  --muted: #8d8682;        /* Taupe */
  --accent: #8DA399;       /* Morandi Sage Green */
  --border: #e6e2da;       /* Soft Beige */
  --shadow: 0 4px 12px -2px rgba(92, 85, 82, 0.08), 0 2px 6px -1px rgba(92, 85, 82, 0.04); /* Softer, warmer shadow */
  --grid: rgba(92, 85, 82, 0.03);
  
   /* Morandi Train Palette */
   --t-red: #d68c8c;       /* Dusty Rose */
   --t-blue: #8aa2b3;      /* Dusty Blue */
   --t-green: #9fb39f;     /* Sage */
   --t-yellow: #dcc094;    /* Sand */
   --t-dark: #5c5552;      /* Warm Dark Grey */
   --t-light: #f5f2e9;     /* Matches BG */
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 0 1rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* --- Layout --- */
.container {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

/* --- Layout Grid --- */
.layout-grid {
  display: flex;
  gap: 3rem;
  padding-top: 1rem;
}

.main-content {
  flex: 3;
  min-width: 0; /* Prevent flex item from overflowing */
}

.sidebar {
  flex: 1;
  min-width: 250px;
}

@media (max-width: 800px) {
  .layout-grid {
    flex-direction: column;
  }
  
  .sidebar {
    order: 2; /* Put sidebar below content on mobile */
    margin-top: 2rem;
  }
}

/* --- Header --- */
header {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 2.0rem;
  font-family: 'Georgia', serif; /* Optional: Makes it look more literary */
}

nav a {
  color: var(--muted);
  margin-left: 1rem;
  text-decoration: none;
  font-weight: 600;
}

nav a:hover {
  color: var(--text);
}

/* --- Footer --- */
.footnote {
  max-width: 1080px;
  margin: auto auto 0;
  width: 100%;
  padding: 2rem 0 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.footnote a {
  color: var(--muted);
}

.footnote a:hover {
  color: var(--text);
}

/* --- Train Animation & Scenery (From Reference) --- */
:root {
   --pixel-black: var(--text);
   --pixel-white: var(--bg);
}

.train-stage {
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.train-wrapper {
    width: 600px;
    height: 250px;
    position: absolute;
    bottom: 5px;
    left: 180px;
    transform-origin: bottom left;
    transform: scaleX(-1) scale(0.3);
    z-index: 10; 
}

.train-link {
    position: absolute;
    bottom: 45px;
    left: 270px;
    width: 45px;
    height: 8px;
    background: var(--pixel-black);
    z-index: 3;
}

.train-carriage {
    position: absolute;
    bottom: 0px;
    left: 305px;
    width: 250px;
    height: 160px;
    animation: shake 0.6s ease-in-out infinite alternate-reverse;
}

.carriage-body {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 220px;
    height: 90px;
    background: var(--t-green);
    border: 5px solid var(--pixel-black);
    z-index: 5;
}

.carriage-body::after {
    content: "";
    position: absolute;
    top: -12px; left: -10px;
    width: 240px; height: 12px;
    background: var(--pixel-black);
}

.carriage-window {
    position: absolute;
    bottom: 65px; 
    width: 45px;
    height: 40px;
    background: var(--t-light);
    border: 4px solid var(--pixel-black);
    z-index: 6;
}
.carriage-window.cw1 { left: 25px; }
.carriage-window.cw2 { left: 90px; }
.carriage-window.cw3 { left: 155px; }

.carriage-wheel {
    position: absolute;
    bottom: 0px;
    width: 45px;
    height: 45px;
    background: var(--t-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spin 0.8s linear infinite;
    z-index: 10;
    border: 2px solid var(--pixel-black);
}
.carriage-wheel::after {
    content: "";
    width: 16px; height: 16px;
    background: var(--pixel-black);
    border-radius: 50%;
}
.carriage-wheel.w1 { left: 30px; }
.carriage-wheel.w2 { left: 145px; }

.train-cabin {
  position: absolute;
  bottom: 50px;
  left: 175px;
  width: 100px;
  height: 110px;
  background: var(--t-blue);
  border: 5px solid var(--pixel-black);
  z-index: 5;
}

.train-cabin::before {
  content: "";
  position: absolute;
  top: -12px;
  left: -10px;
  width: 120px;
  height: 12px;
  background: var(--pixel-black);
}

.train-window {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 60px;
  height: 55px;
  background: var(--t-light);
  border: 4px solid var(--pixel-black);
}
.train-window::after, .train-window::before { display: none; }

.train-body {
  position: absolute;
  bottom: 50px;
  left: 40px;
  width: 140px;
  height: 75px;
  background: var(--t-red);
  z-index: 6;
  border: 4px solid var(--pixel-black);
  border-right: none;
}

.train-body::before {
    content: "";
    position: absolute;
    top: 10px; left: 0;
    width: 100%;
    height: 4px;
    background: var(--t-yellow);
}

.train-plate {
   position: absolute;
   bottom: 50px;
   left: 30px; 
   width: 15px;
   height: 75px;
   background: var(--t-yellow);
   border: 5px solid var(--pixel-black);
   border-right: none;
   z-index: 7;
}

.train-plate::after {
    content: "";
    position: absolute;
    top: 25px; left: -2px;
    width: 8px; height: 15px;
    background: var(--pixel-black);
}

.train-chimney {
  position: absolute;
  bottom: 125px;
  left: 60px;
  width: 32px;
  height: 55px;
  background: var(--t-dark);
  z-index: 8;
  border: 3px solid var(--pixel-black);
}
.train-chimney::before {
    content: "";
    position: absolute;
    top: -10px; left: -9px;
    width: 50px; height: 10px;
    background: var(--pixel-black);
    border-radius: 2px;
}
.train-chimney::after {
    content: "";
    position: absolute;
    bottom: -6px; left: -6px;
    width: 44px; height: 6px;
    background: var(--pixel-black);
}

.train-cowcatcher {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 40px;
    height: 40px;
    background: var(--t-dark);
    border: 4px solid var(--pixel-black);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: 9;
}

.train-chassis {
  position: absolute;
  bottom: 40px;
  left: 30px;
  width: 250px; 
  height: 15px;
  background: var(--t-dark);
  border: 4px solid var(--pixel-black);
  z-index: 4;
}

.train-wheel {
  position: absolute;
  bottom: 0px;
  width: 55px;
  height: 55px;
  background: var(--t-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 0.8s linear infinite;
  z-index: 10;
  border: 3px solid var(--pixel-black);
}
.train-wheel::after {
    content: "";
    width: 20px; height: 20px;
    background: var(--pixel-black);
    border-radius: 50%;
}

.train-wheel.w1 { left: 45px; }
.train-wheel.w2 { left: 125px; }
.train-wheel.w3 { left: 215px; }

.train-dome, .train-face, .train-body::after, .train-rod { display: none; }

.smoke {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--pixel-white);
  border: 3px solid var(--pixel-black); 
  border-radius: 50%;
  opacity: 0;
  z-index: 20;
}
.smoke.s1 { left: 60px; bottom: 180px; animation: puff 1.4s ease-out infinite; }
.smoke.s2 { left: 80px; bottom: 190px; animation: puff 1.4s ease-out infinite 0.5s; }

@keyframes puff {
  0% { transform: translate(0, 0) scale(0.5); opacity: 0.8; }
  100% { transform: translate(100px, -80px) scale(2.5); opacity: 0; }
}

.train {
  width: 100%;
  height: 100%;
  position: relative;
  animation: shake 0.6s ease-in-out infinite alternate;
}

@keyframes shake {
  0% { transform: translateY(0); }
  100% { transform: translateY(-2px); }
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Film Strip */
.film-strip {
    background: #3e3b39; /* Softer black */
    width: 640px; 
    padding: 40px 0;
    position: relative;
    box-shadow: 0 0 0 2px #5c5552, 0 15px 30px rgba(92, 85, 82, 0.4); /* Softer shadow */
    margin-top: 0;
    display: flex;
    flex-direction: column;
    transform: scale(1.5);
    transform-origin: center center;
}

.film-strip::before, .film-strip::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 25px;
    background-image: linear-gradient(90deg, var(--bg) 16px, transparent 16px); /* Use bg color */
    background-size: 34px 100%;
    background-position: 9px 0;
    background-repeat: repeat-x;
    opacity: 0.8;
}
.film-strip::before { top: 15px; } 
.film-strip::after { bottom: 15px; }

.film-screen {
    width: 100%;
    height: 280px;
    background: var(--bg);
    border-top: 2px solid #5c5552;
    border-bottom: 2px solid #5c5552;
    overflow: hidden;
    position: relative;
}

/* Old Film Effect */
.film-screen::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(120, 100, 80, 0.05);
    box-shadow: inset 0 0 80px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 100;
}

.film-screen::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 20%;
    width: 1px;
    background: rgba(0,0,0,0.2);
    z-index: 101;
    animation: scratch 4s infinite steps(1);
}

@keyframes scratch {
    0% { left: 10%; opacity: 0; }
    10% { left: 15%; opacity: 0.3; }
    20% { left: 80%; opacity: 0.1; }
    30% { opacity: 0; }
    50% { left: 40%; opacity: 0.2; }
    100% { opacity: 0; }
}

.track {
    position: absolute;
    bottom: 0px; 
    left: 0;
    width: 200%;
    height: 6px;
    background-image: 
        linear-gradient(90deg, transparent 40px, var(--pixel-black) 40px, var(--pixel-black) 46px, transparent 46px), 
        linear-gradient(to bottom, transparent 0px, var(--pixel-black) 0px, var(--pixel-black) 2px, transparent 2px);
    background-size: 60px 100%, 100% 100%;
    background-repeat: repeat-x, no-repeat;
    animation: track-move 0.4s linear infinite;
    z-index: 1;
    opacity: 0.8;
}

@keyframes track-move {
    from { transform: translateX(0); }
    to { transform: translateX(-60px); }
}

.scenery-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    z-index: 0; 
}

.scenery-item {
    position: absolute;
    top: 0; left: 0;
    width: 640px; 
    height: 100%;
    will-change: transform;
}

.scenery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.1) sepia(0.2) brightness(0.9); /* Vintage logic */
    background-color: var(--t-dark);
}

@keyframes scenery-scroll {
    from { transform: translateX(640px); }
    to { transform: translateX(-640px); }
}

@keyframes scenery-scroll-initial {
    from { transform: translateX(0); }
    to { transform: translateX(-640px); }
}

/* --- Article / Markdown Styles --- */
.post-title {
  font-size: 2.25rem; /* Increased from 1.8rem for better hierarchy */
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.25;
}

.post-meta {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text); /* Use variable for consistency */
}

.post-body h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  color: var(--text);
  font-weight: 600;
}

.post-body h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-weight: 600;
}

.post-body img { 
  max-width: 100%; 
  height: auto; 
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Code Blocks */
.post-body pre {
  overflow: auto;
  padding: 1.25rem;
  background: #4a4744; /* Warm dark grey for code blocks */
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fdfcf8; /* Paper white text */
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: rgba(141, 134, 130, 0.15); /* Subtle warm grey background */
  padding: 0.2em 0.4em;
  border-radius: 4px;
  color: #a84646; /* Morandi red for inline code */
}

.post-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.post-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--panel);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-style: italic;
}
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  color: var(--muted);
}

/* Table Styles - Dark Mode */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95em;
  overflow-x: auto;
  display: block; 
}

@media (min-width: 600px) {
  .post-body table { display: table; }
}

.post-body th, .post-body td {
  padding: 12px 15px;
  border: 1px solid var(--border);
  text-align: left;
}

.post-body th {
  background-color: var(--panel);
  font-weight: 600;
  color: var(--text);
}

.post-body tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

.post-body tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* --- Post Preview Styles (Index Page) --- */
.post-preview {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-preview:last-of-type {
  border-bottom: none;
}

.post-preview-title {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
  line-height: 1.4;
}

.post-preview-title a {
  color: var(--text);
  text-decoration: none;
}

.post-preview-title a:hover {
  color: var(--accent);
}

.post-preview-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.post-preview-taxonomies {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.post-preview-taxonomies .categories,
.post-preview-taxonomies .tags {
  margin-right: 1.2rem;
}

.post-preview-taxonomies .category {
  display: inline-block;
  background: rgba(141, 163, 153, 0.2);
  color: var(--accent);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin: 0 0.1rem;
}

.post-preview-taxonomies .tag {
  color: var(--t-green);
  margin-right: 0.3rem;
}

.post-preview-desc {
  font-size: 0.95rem; /* Slightly smaller than body text */
  color: var(--text);
  line-height: 1.6;
}

/* Reset headings inside preview to look more like normal text */
.post-preview-desc h1, 
.post-preview-desc h2, 
.post-preview-desc h3, 
.post-preview-desc h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
  padding: 0;
  border: none;
}

.post-preview-desc p {
  margin: 0 0 0.5rem;
}

.post-preview-desc pre {
  background: var(--panel);
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  overflow: hidden; /* Prevent code from breaking layout in preview */
  max-height: 150px;
}

/* --- Pagination Styles --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.pagination a, .pagination span {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* --- Sidebar Widgets --- */
.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
}

.widget-list li {
  margin-bottom: 0.75rem;
}

.widget-list li a {
  color: var(--muted);
  display: block;
}

.widget-list li a:hover {
  color: var(--accent);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-cloud-item {
  color: var(--muted);
  background: var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.tag-cloud-item:hover {
  background: var(--accent);
  color: #fff;
}

/* --- Search Box --- */
.search-box {
  position: relative;
}

#search-input {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  width: 260px;
  transition: all 0.2s ease;
  outline: none;
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(141, 163, 153, 0.2);
  width: 320px; /* Slight expansion effect */
}

/* --- Search Results --- */
.search-results {
  position: absolute;
  top: 100%;
  right: 0;
  width: 350px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  margin-top: 0.5rem;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.search-results ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-results li {
  border-bottom: 1px solid var(--border);
}

.search-results li:last-child {
  border-bottom: none;
}

.search-results a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s;
}

.search-results a:hover {
  background: rgba(255, 255, 255, 0.05);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.search-result-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.search-no-results {
  padding: 1rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .search-results {
    width: 100%;
    right: auto;
    left: 0;
  }
}

/* --- Search Page --- */
.search-page-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 1rem;
}

.search-page-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
}

.highlight-text {
  color: var(--accent);
  font-weight: bold;
}

.loading {
  color: var(--muted);
  font-style: italic;
}

/* --- Article Content Typography --- */
.post-content {
    font-size: 1rem;
    line-height: 1.5; /* Reduced from 1.6 to 1.5 based on user feedback */
    color: var(--text);
    margin-top: 1rem;
}

.post-content p {
    margin-bottom: 0; /* No extra space between paragraphs */
    text-indent: 2em; /* Indent first line to separate paragraphs visually */
    text-align: justify;
}

/* Exclude indentation for paragraphs containing images */
.post-content p:has(img) {
    text-indent: 0;
}

.post-content h1, 
.post-content h2, 
.post-content h3, 
.post-content h4, 
.post-content h5, 
.post-content h6 {
    color: var(--text);
    margin-top: 1.25rem; /* Reduced from 1.5rem */
    margin-bottom: 0.6rem; /* Reduced from 0.75rem */
    font-weight: 600;
    line-height: 1.3;
}

.post-content h1 { font-size: 1.75rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; } /* Adjusted */
.post-content h2 { font-size: 1.5rem; } /* Adjusted */
.post-content h3 { font-size: 1.25rem; } /* Adjusted */
.post-content h4 { font-size: 1.1rem; }
.post-content h5 { font-size: 1rem; font-weight: bold; }
.post-content h6 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }

.post-content ul, 
.post-content ol {
    margin-bottom: 1rem; /* Reduced from 1.5rem */
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.25rem; /* Reduced from 0.5rem */
}

.post-content blockquote {
    border-left: 4px solid var(--accent);
    margin: 1rem 0; /* Reduced from 1.5rem 0 */
    padding: 0.75rem 1rem; /* Reduced padding */
    background: var(--panel);
    color: var(--muted);
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

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

.post-content code {
    background: rgba(141, 163, 153, 0.15);
    color: var(--accent);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

.post-content pre {
    margin: 1rem 0; /* Reduced from 1.5rem 0 */
    border-radius: 8px;
    border: 1px solid var(--border);
}

.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.95em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0; /* Reduced from 1.5rem 0 */
    box-shadow: var(--shadow);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem; /* Reduced from 1.5rem */
    font-size: 0.95em;
}

.post-content th, 
.post-content td {
    padding: 0.5rem 0.75rem; /* Reduced vertical padding */
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--panel);
    font-weight: 600;
}

.post-content hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0; /* Reduced from 2rem 0 */
}

/* --- Post Meta (Tags & Categories Buttons) --- */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-date {
  color: var(--muted);
  font-weight: 500;
  margin-right: 0.5rem;
  display: inline-flex;
  align-items: center;
}
.post-date::before {
  content: "📅";
  margin-right: 6px;
  font-size: 1em;
}

.post-categories, .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Category Buttons */
.post-categories a {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(141, 163, 153, 0.15); 
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid rgba(141, 163, 153, 0.3);
}

.post-categories a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Tag Buttons */
.post-tags a {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--border); 
  color: var(--muted);
  border-radius: 12px;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.post-tags a::before {
  content: "#";
  margin-right: 2px;
  opacity: 0.6;
}

.post-tags a:hover {
  background: var(--text);
  color: #fff;
  transform: translateY(-1px);
}

/* --- Prism JS Theme Overrides for Morandi/Paper Look --- */
code[class*="language-"],
pre[class*="language-"] {
    color: var(--t-dark) !important;
    text-shadow: none !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
}

/* Code blocks */
pre[class*="language-"] {
    background: var(--panel) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
    background: rgba(141, 163, 153, 0.15) !important;
    color: var(--accent) !important;
    border-radius: 4px;
    padding: 0.2rem 0.4rem !important;
}
