:root {
  /* FORCE DARK MODE */
  --bg-color: #1e1e1e;
  --text-color: #d4d4d4;
  --code-bg: #1e1e1e;
  --accent: #4ec9b0; /* The Perfect Green */
  
  /* LINK COLORS */
  --link-color: #dcdcdc;
  --link-hover: #4ec9b0;
  
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
  border-bottom: 2px dashed #333;
  padding-bottom: 1rem;
}

h1, h2, h3 {
  font-family: var(--font-mono);
  font-weight: 700;
  margin-top: 2rem;
}

/* --- LINK STYLING --- */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-decoration-color: var(--link-hover);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* --- GENERAL CODE BLOCKS --- */
pre, code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  border-radius: 4px;
  font-size: 0.95em;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid #333;
}

pre code {
  padding: 0;
  background: transparent;
  border: none;
}

/* Inline code (like `this`) */
p code, li code {
  background: rgba(78, 201, 176, 0.1); /* Very subtle green tint */
  padding: 0.1rem 0.3rem;
  color: var(--accent); /* Matches your theme color */
  border: 1px solid rgba(78, 201, 176, 0.2); /* Subtle glowing border */
  border-radius: 4px;
  font-size: 0.9em; /* Slightly smaller to fit text flow */
}

.post-meta {
  color: #808080;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* --- LISTS --- */
ul {
  list-style-type: none;
  padding: 0;
}

ul li {
  margin-bottom: 0.5rem;
}

ul li::before {
  content: ">";
  color: var(--accent);
  margin-right: 0.5rem;
  font-family: var(--font-mono);
  font-weight: bold;
}

/* VS CODE SYNTAX HIGHLIGHTING */
.highlight .c, .highlight .cm, .highlight .cp, .highlight .c1, .highlight .cs { color: #6A9955; }
.highlight .k, .highlight .kc, .highlight .kd, .highlight .kp, .highlight .kr, .highlight .kt { color: #569CD6; }
.highlight .s, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .s2, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx, .highlight .sr, .highlight .s1, .highlight .ss { color: #CE9178; }
.highlight .nf, .highlight .fm { color: #DCDCAA; }
.highlight .nc { color: #4EC9B0; }
.highlight .nd { color: #DCDCAA; }
.highlight .na { color: #9CDCFE; }
.highlight .nt { color: #4EC9B0; }
.highlight .o, .highlight .ow { color: #d4d4d4; }
.highlight .m, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .mo, .highlight .il { color: #b5cea8; }
.highlight .gd { color: #f44747; }
.highlight .gi { color: #6A9955; }

/* AESTHETIC UPGRADES */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background-color: #333; border: 3px solid var(--bg-color); }
::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }

::selection { background: var(--accent); color: var(--bg-color); }

.terminal-title { text-shadow: 0 0 8px rgba(78, 201, 176, 0.4); }

.cursor {
  display: inline-block;
  vertical-align: middle;
  width: 0.6em;
  height: 1.2em;
  background-color: var(--accent);
  animation: blink 1s step-end infinite;
  margin-left: 5px;
  margin-bottom: 4px;
  box-shadow: 0 0 8px var(--accent);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

body { animation: fadeIn 0.5s ease-in-out; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   TIMELINE & ARCHIVE STYLES
   ========================================= */

.timeline {
  position: relative;
  margin-left: 1rem;
  padding-left: 2rem;
  border-left: 2px solid #333;
  margin-top: 2rem;
}

.timeline-year {
  position: relative;
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  margin-left: -2.6rem;
  background: var(--bg-color);
  padding: 0.2rem 0.5rem;
  display: inline-block;
  width: max-content;
}

.timeline-year::after {
  content: "";
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--bg-color);
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: baseline;
  transition: opacity 0.3s ease;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.35rem;
  top: 0.6rem;
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
  transition: background 0.2s;
}

.timeline-item:hover::before { background: var(--accent); }

.timeline-date {
  font-family: var(--font-mono);
  color: #666;
  font-size: 0.85rem;
  min-width: 60px;
  margin-right: 1rem;
}

.hidden-post { display: none; }

.show-more-btn {
  background: transparent;
  border: 1px dashed #333;
  color: var(--accent);
  font-family: var(--font-mono);
  padding: 0.5rem 1rem;
  cursor: pointer;
  margin-left: 3rem;
  margin-top: 1rem;
  transition: all 0.2s;
}

.show-more-btn:hover {
  background: #252526;
  border-color: var(--accent);
}

/* CATEGORY STYLES */
.post-categories {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.8;
}

.post-category {
  color: #666;
  text-decoration: none;
  margin-left: 0.5rem;
  transition: color 0.2s;
}

.post-category:hover { color: var(--accent); }
.post-category::before { content: "["; color: var(--accent); margin-right: 2px; }
.post-category::after { content: "]"; color: var(--accent); margin-left: 2px; }

.category-header {
  margin-top: 4rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.category-anchor { scroll-margin-top: 2rem; }

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
  .timeline-item {
    display: grid;
    grid-template-columns: min-content 1fr;
    align-items: baseline;
    gap: 0; 
  }

  .timeline-date {
    grid-column: 1;
    grid-row: 1;
    margin-right: 0.8rem; 
    white-space: nowrap;
  }

  .timeline-item > a {
    grid-column: 2;
    grid-row: 1;
    line-height: 1.4;
    margin-bottom: 0.2rem;
    width: fit-content; 
    display: block; 
  }

  .post-categories {
    grid-column: 2;       
    grid-row: 2;
    margin-left: 0;       
    display: block;       
    font-size: 0.75rem;   
    opacity: 0.7;
    margin-top: 0;
  }

  .timeline { margin-left: 0.5rem; padding-left: 1.5rem; }
  .timeline-year { margin-left: -2.1rem; }
  .timeline-item::before { left: -1.85rem; top: 0.4rem; }
}

html { scroll-behavior: smooth; }

/* =========================================
   IMAGE & LIGHTBOX STYLES
   ========================================= */

/* 1. Support for {: .left } and {: .right } syntax */
img.left {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 0.5rem;
}

img.right {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Ensure images don't overflow mobile screens even with fixed width */
img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #333; /* Subtle border for images */
  transition: border-color 0.2s;
}

img:hover {
  border-color: var(--accent); /* Glow green on hover */
}

/* 2. THE LIGHTBOX OVERLAY */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85); /* Dark dim */
  backdrop-filter: blur(5px); /* Modern blur effect */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* The Image Container inside the Lightbox */
.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  box-shadow: 0 0 20px rgba(78, 201, 176, 0.2); /* Green glow */
  border: 2px solid #333;
  touch-action: none; /* Prevents browser conflicts during pinch */
  transition: transform 0.1s ease-out; /* Makes the zoom snappy */
}

.lightbox-caption {
  margin-top: 1rem;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.9rem;
  animation: blink 2s infinite;
}
/* =========================================
   PROMPTS / ADMONITIONS (Universal Fix)
   ========================================= */

/* 1. Target the CLASS directly, not the tag. 
      This catches <p class="prompt-tip"> correctly. */
.prompt-tip, 
.prompt-info, 
.prompt-warning, 
.prompt-danger {
  display: block; /* Ensure it behaves like a box */
  position: relative;
  
  /* Box Model */
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem;
  border-left: 4px solid;
  border-radius: 0 4px 4px 0;
  
  /* Colors & Fonts */
  background: #252526;
  font-family: var(--font-sans);
  color: #cccccc;
  line-height: 1.6;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* 2. Force the "Label" (// TIP) to be on its OWN LINE */
.prompt-tip::before, 
.prompt-info::before, 
.prompt-warning::before, 
.prompt-danger::before {
  display: block;          /* CRITICAL: Force new line */
  width: 100%;             /* Take full width */
  margin-bottom: 0.5rem;   /* Push text down */
  
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 0.9rem;
  opacity: 1;
}

/* 3. Neutralize the parent Blockquote (Prevent double indentation) */
blockquote:has(.prompt-tip),
blockquote:has(.prompt-info),
blockquote:has(.prompt-warning),
blockquote:has(.prompt-danger) {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0; /* Optional: Remove indentation if you want full width */
}

/* --- COLORS & LABELS --- */

/* --- COLORS & LABELS (With Neon Upgrade) --- */

/* TIP (Green) */
.prompt-tip {
  border-left-color: var(--accent);
  background: rgba(78, 201, 176, 0.05);
  /* New: Subtle Glow on the box */
  box-shadow: -2px 0 8px rgba(78, 201, 176, 0.1); 
}
.prompt-tip::before {
  content: "// TIP";
  color: var(--accent);
  /* New: Glowing Text */
  text-shadow: 0 0 5px rgba(78, 201, 176, 0.6);
}

/* INFO (Blue) */
.prompt-info {
  border-left-color: #569cd6;
  background: rgba(86, 156, 214, 0.05);
  box-shadow: -2px 0 8px rgba(86, 156, 214, 0.1);
}
.prompt-info::before {
  content: "// INFO";
  color: #569cd6;
  text-shadow: 0 0 5px rgba(86, 156, 214, 0.6);
}

/* WARNING (Orange) */
.prompt-warning {
  border-left-color: #ce9178; 
  background: rgba(206, 145, 120, 0.05);
  box-shadow: -2px 0 8px rgba(206, 145, 120, 0.1);
}
.prompt-warning::before {
  content: "// WARNING";
  color: #ce9178;
  text-shadow: 0 0 5px rgba(206, 145, 120, 0.6);
}

/* DANGER (Red) */
.prompt-danger {
  border-left-color: #f44747; 
  background: rgba(244, 71, 71, 0.05);
  box-shadow: -2px 0 8px rgba(244, 71, 71, 0.1);
}
.prompt-danger::before {
  content: "[ ERROR ]"; 
  color: #f44747;
  text-shadow: 0 0 5px rgba(244, 71, 71, 0.6);
}

/* =========================================
   PROMPTS / ADMONITIONS (Universal Fix)
   ========================================= */

/* 1. Target the CLASS directly, not the tag. 
      This catches <p class="prompt-tip"> correctly. */
.prompt-tip, 
.prompt-info, 
.prompt-warning, 
.prompt-danger {
  display: block; /* Ensure it behaves like a box */
  position: relative;
  
  /* Box Model */
  margin: 1.5rem 0;
  padding: 1.2rem 1.5rem;
  border-left: 4px solid;
  border-radius: 0 4px 4px 0;
  
  /* Colors & Fonts */
  background: #252526;
  font-family: var(--font-sans);
  color: #cccccc;
  line-height: 1.6;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* 2. Force the "Label" (// TIP) to be on its OWN LINE */
.prompt-tip::before, 
.prompt-info::before, 
.prompt-warning::before, 
.prompt-danger::before {
  display: block;          /* CRITICAL: Force new line */
  width: 100%;             /* Take full width */
  margin-bottom: 0.5rem;   /* Push text down */
  
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 0.9rem;
  opacity: 1;
}

/* 3. Neutralize the parent Blockquote (Prevent double indentation) */
blockquote:has(.prompt-tip),
blockquote:has(.prompt-info),
blockquote:has(.prompt-warning),
blockquote:has(.prompt-danger) {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0; /* Optional: Remove indentation if you want full width */
}

/* --- COLORS & LABELS --- */

/* TIP (Green) */
.prompt-tip {
  border-left-color: var(--accent);
  background: rgba(78, 201, 176, 0.08);
}
.prompt-tip::before {
  content: "// TIP";
  color: var(--accent);
}

/* INFO (Blue) */
.prompt-info {
  border-left-color: #569cd6;
  background: rgba(86, 156, 214, 0.08);
}
.prompt-info::before {
  content: "// INFO";
  color: #569cd6;
}

/* WARNING (Orange) */
.prompt-warning {
  border-left-color: #ce9178; 
  background: rgba(206, 145, 120, 0.08);
}
.prompt-warning::before {
  content: "// WARNING";
  color: #ce9178;
}

/* DANGER (Red) */
.prompt-danger {
  border-left-color: #f44747; 
  background: rgba(244, 71, 71, 0.08);
}
.prompt-danger::before {
  content: "[ ERROR ]"; 
  color: #f44747;
}