/* =============================================================
   Terminal Cybersecurity Theme — custom.css
   Background: #0d1117 | Neon green: #00ff41 | Cyan: #00b4d8
   Fonts: JetBrains Mono (code), Inter (body)
   ============================================================= */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1a1f2b;
  --neon-green: #00ff41;
  --neon-green-dim: rgba(0, 255, 65, 0.15);
  --neon-green-glow: rgba(0, 255, 65, 0.4);
  --cyan: #00b4d8;
  --cyan-dim: rgba(0, 180, 216, 0.15);
  --cyan-glow: rgba(0, 180, 216, 0.4);
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --border-color: #30363d;
  --red: #ff4757;
  --orange: #ff9f43;
  --yellow: #feca57;
  --purple: #a855f7;
}

/* ---------- Light Mode ---------- */
[data-theme="light"] {
  --bg-primary: #f6f8fa;
  --bg-secondary: #ffffff;
  --bg-card: #f0f2f5;
  --neon-green: #006400;
  --neon-green-dim: rgba(0, 100, 0, 0.1);
  --neon-green-glow: rgba(0, 100, 0, 0.25);
  --cyan: #0969da;
  --cyan-dim: rgba(9, 105, 218, 0.1);
  --cyan-glow: rgba(9, 105, 218, 0.25);
  --text-primary: #1f2328;
  --text-secondary: #656d76;
  --text-muted: #8b949e;
  --border-color: #d0d7de;
  --red: #cf222e;
  --orange: #bf5600;
  --yellow: #9a6700;
  --purple: #8250df;
}

[data-theme="light"] .hero-terminal {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .code-titlebar {
  background: #e8eaed;
}

[data-theme="light"] .highlight pre,
[data-theme="light"] pre {
  background: #f6f8fa !important;
}

[data-theme="light"] #matrix-bg {
  opacity: 0.3;
}

[data-theme="light"] .terminal-body,
[data-theme="light"] .hero-window {
  background: #f6f8fa;
  border-color: var(--border-color);
}

[data-theme="light"] .terminal-titlebar {
  background: #e8eaed;
}

/* ---------- Base ---------- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary) !important;
  color: var(--text-primary);
  line-height: 1.7;
}

html {
  scroll-behavior: smooth;
}

/* ---------- Scanline Header ---------- */
.header {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--neon-green) !important;
  box-shadow: 0 1px 12px var(--neon-green-dim);
  position: relative;
  overflow: visible;
  z-index: 1000;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 65, 0.03) 2px,
    rgba(0, 255, 65, 0.03) 4px
  );
  pointer-events: none;
  z-index: 0;
}

.header > .nav {
  position: relative;
  z-index: 1;
}

/* ---------- Terminal Navbar ---------- */
.nav {
  max-width: 1200px;
  margin: 0 auto;
}

.logo a,
#theme-toggle {
  color: var(--neon-green) !important;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.logo a::before {
  content: '> ';
  color: var(--neon-green);
  opacity: 0.7;
}

#menu a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary) !important;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.25s ease;
}

#menu a:hover,
#menu .active {
  color: var(--neon-green) !important;
  border-color: var(--neon-green);
  background: var(--neon-green-dim);
  box-shadow: 0 0 8px var(--neon-green-dim);
}

/* ---------- Dropdown Navigation ---------- */
#menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
}

#menu > li { position: relative; }

.nav-dropdown-toggle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--neon-green);
  border-color: var(--neon-green);
  background: var(--neon-green-dim);
}

.nav-dropdown-arrow {
  font-size: 0.6rem;
  transition: transform 0.2s;
}

.nav-dropdown.open .nav-dropdown-arrow { transform: rotate(180deg); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 0;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  list-style: none;
}

.nav-dropdown.open .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px !important;
  font-size: 0.8rem !important;
  border: none !important;
  border-radius: 0 !important;
  transition: background 0.15s !important;
}

.nav-dropdown-menu a:hover {
  background: var(--neon-green-dim) !important;
  box-shadow: none !important;
}

.dropdown-prompt {
  color: var(--neon-green);
  font-size: 0.7rem;
  opacity: 0.6;
}

/* ---------- Skip to Content (Accessibility) ---------- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--neon-green);
  color: var(--bg-primary);
  padding: 0.5rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 9999;
  border-radius: 0 0 6px 6px;
  transition: top 0.2s;
  text-decoration: none;
}

.skip-to-content:focus {
  top: 0;
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ---------- Focus Styles (Accessibility) ---------- */
*:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.filter-btn:focus-visible,
.nav-dropdown-toggle:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ---------- Content Area ---------- */
.main {
  max-width: 900px;
  margin: 0 auto;
}

/* ---------- Headings ---------- */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: var(--cyan) !important;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin-top: 2rem;
  padding-bottom: 0.3em;
}

.post-content h1,
.post-content h2 {
  border-bottom: 1px solid var(--border-color);
}

.post-header .post-title {
  color: var(--cyan) !important;
  font-size: 2.2rem;
}

/* ---------- Links ---------- */
.post-content a {
  color: var(--neon-green);
  text-decoration: none;
  border-bottom: 1px dashed var(--neon-green-dim);
  transition: all 0.2s ease;
}

.post-content a:hover {
  color: #fff;
  background: var(--neon-green-dim);
  border-bottom-color: var(--neon-green);
  box-shadow: 0 0 6px var(--neon-green-dim);
}

/* ---------- Blockquotes ---------- */
.post-content blockquote {
  border-left: 3px solid var(--neon-green) !important;
  background: var(--bg-secondary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 6px 6px 0;
  box-shadow: inset 4px 0 12px var(--neon-green-dim);
  color: var(--text-primary);
}

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

/* ---------- Code Blocks ---------- */
.highlight {
  position: relative;
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 1.5rem 0;
  overflow: hidden;
}

.highlight pre {
  background: var(--bg-secondary) !important;
  padding: 1.2rem;
  margin: 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}

.highlight pre code {
  font-family: 'JetBrains Mono', monospace;
  background: transparent !important;
}

/* macOS-style titlebar */
.code-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  user-select: none;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.code-dot.red { background: var(--red); }
.code-dot.yellow { background: var(--yellow); }
.code-dot.green { background: var(--neon-green); }

.code-titlebar-lang {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: auto;
  margin-right: auto;
}

/* Copy button (in titlebar) */
.code-copy-btn {
  padding: 2px 10px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.code-copy-btn:hover {
  color: var(--neon-green);
  border-color: var(--neon-green);
  background: var(--neon-green-dim);
}

.code-copy-btn.copied {
  color: var(--neon-green);
  border-color: var(--neon-green);
}

.code-copy-btn .check-icon {
  vertical-align: middle;
}

/* Scanline hover effect on code blocks */
.highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 65, 0.015) 2px,
    rgba(0, 255, 65, 0.015) 4px
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.highlight:hover::after {
  opacity: 1;
}

/* Hide PaperMod's default copy button (we use our own) */
.copy-code {
  display: none !important;
}

/* Inline code */
.post-content code:not(pre code) {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-secondary);
  color: var(--neon-green);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  border: 1px solid var(--border-color);
}

/* ---------- Cards / Post Entries ---------- */
.post-entry {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1.2rem 1.5rem;
  transition: all 0.3s ease;
}

.post-entry:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 16px var(--neon-green-dim), inset 0 0 16px var(--neon-green-dim);
  transform: translateY(-2px);
}

.post-entry .entry-header h2 {
  color: var(--text-primary) !important;
  font-size: 1.1rem;
}

.post-entry:hover .entry-header h2 {
  color: var(--neon-green) !important;
}

.entry-content {
  color: var(--text-secondary);
}

/* ---------- Homepage Hero ---------- */
.first-entry {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.first-entry::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-green), var(--cyan), var(--neon-green));
  z-index: 2;
}

.first-entry .entry-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* Hero terminal layout */
.hero-terminal {
  position: relative;
}

#matrix-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-terminal-prompt {
  margin: 1.5rem 0;
}

.hero-window {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(22, 27, 34, 0.9);
  backdrop-filter: blur(4px);
}

.hero-window .terminal-body {
  min-height: 140px;
}

.hero-line {
  margin-bottom: 0.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
}

.hero-hidden {
  display: none;
}

.hero-output {
  color: var(--text-secondary);
}

.hero-typed {
  color: var(--text-primary);
}

.typing-cursor::after {
  content: '\2588';
  color: var(--neon-green);
  animation: blink 0.8s step-end infinite;
}

.hero-typed-cursor::after {
  content: '\2588';
  color: var(--neon-green);
  animation: blink 0.8s step-end infinite;
}

/* ---------- Table of Contents ---------- */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
}

.toc a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.toc a:hover {
  color: var(--neon-green);
}

/* ---------- Tags ---------- */
.post-tags a {
  background: var(--neon-green-dim);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 65, 0.25);
  border-radius: 4px;
  padding: 2px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.post-tags a:hover {
  background: var(--neon-green);
  color: var(--bg-primary);
  box-shadow: 0 0 10px var(--neon-green-glow);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--neon-green);
}

/* ---------- Post Meta ---------- */
.post-meta {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.footer a {
  color: var(--neon-green);
}

/* ---------- Social Icons ---------- */
.social-icons a {
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: var(--neon-green);
  filter: drop-shadow(0 0 6px var(--neon-green-glow));
}

/* ---------- Search ---------- */
#searchInput {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  font-family: 'JetBrains Mono', monospace;
  border-radius: 6px;
  padding: 10px 16px;
  transition: border-color 0.2s ease;
}

#searchInput:focus {
  border-color: var(--neon-green) !important;
  box-shadow: 0 0 10px var(--neon-green-dim);
  outline: none;
}

#searchResults .post-entry {
  border-color: var(--border-color);
}

/* ---------- Back to Top ---------- */
.top-link {
  display: none !important;
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: none;
  align-items: center;
  gap: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--neon-green);
  background: var(--bg-secondary);
  border: 1px solid var(--neon-green);
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 0 0 12px var(--neon-green-dim);
  transition: all 0.3s ease;
}

.back-to-top:hover {
  background: var(--neon-green);
  color: var(--bg-primary);
  box-shadow: 0 0 24px var(--neon-green-glow);
}

.btt-prompt {
  opacity: 0.5;
}

.btt-arrow {
  font-weight: 700;
}

/* ---------- Stats Dashboard ---------- */
.stats-dashboard {
  margin: 2rem 0;
}

.stats-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.stats-header-row h2 {
  margin-bottom: 0;
}

.stats-updated {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.stats-dashboard h2 {
  color: var(--cyan) !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.stats-dashboard h2::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

/* Progress bars */
.progress-bars {
  margin-bottom: 1.5rem;
}

.progress-item {
  margin-bottom: 1rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.progress-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.progress-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-card);
  border-radius: 4px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.progress-fill.thm {
  background: linear-gradient(90deg, var(--neon-green), #00cc33);
  box-shadow: 0 0 8px var(--neon-green-dim);
}

.progress-fill.htb {
  background: linear-gradient(90deg, var(--cyan), #0090b0);
  box-shadow: 0 0 8px var(--cyan-dim);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--neon-green);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 16px var(--neon-green-dim);
  transform: translateY(-2px);
}

.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--neon-green);
  line-height: 1;
  display: block;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Difficulty colors */
.stat-card.easy .stat-number { color: var(--neon-green); }
.stat-card.easy::before { background: var(--neon-green); }
.stat-card.medium .stat-number { color: var(--orange); }
.stat-card.medium::before { background: var(--orange); }
.stat-card.hard .stat-number { color: var(--red); }
.stat-card.hard::before { background: var(--red); }
.stat-card.insane .stat-number { color: var(--purple); }
.stat-card.insane::before { background: var(--purple); }

/* Top tags */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.tags-list .tag-item {
  background: var(--neon-green-dim);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 65, 0.25);
  border-radius: 4px;
  padding: 4px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.tags-list .tag-item:hover {
  background: var(--neon-green);
  color: var(--bg-primary);
  box-shadow: 0 0 10px var(--neon-green-glow);
}

.tag-count {
  opacity: 0.6;
  margin-left: 4px;
}

/* ---------- Room Info Card (Shortcode) ---------- */
.room-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.room-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.room-info.platform-tryhackme::before { background: var(--neon-green); }
.room-info.platform-hackthebox::before { background: var(--cyan); }

.room-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.room-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.room-info-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.room-info-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Platform badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-tryhackme {
  background: var(--neon-green-dim);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 65, 0.3);
}

.badge-hackthebox {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(0, 180, 216, 0.3);
}

/* Difficulty badges */
.badge-easy {
  background: rgba(0, 255, 65, 0.1);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 65, 0.3);
}

.badge-medium {
  background: rgba(255, 159, 67, 0.1);
  color: var(--orange);
  border: 1px solid rgba(255, 159, 67, 0.3);
}

.badge-hard {
  background: rgba(255, 71, 87, 0.1);
  color: var(--red);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.badge-insane {
  background: rgba(168, 85, 247, 0.1);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* ---------- 404 Page ---------- */
.terminal-404 {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.ascii-404 {
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-green);
  font-size: clamp(0.4rem, 1.5vw, 0.75rem);
  line-height: 1.2;
  white-space: pre;
  margin-bottom: 2rem;
  text-shadow: 0 0 10px var(--neon-green-glow);
}

.terminal-window {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-align: left;
  overflow: hidden;
  margin-bottom: 2rem;
}

.terminal-titlebar {
  background: var(--bg-card);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green { background: var(--neon-green); }

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  margin-right: auto;
}

.terminal-body {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
}

.terminal-line {
  opacity: 0;
  animation: typeLine 0.3s ease forwards;
}

.terminal-line .prompt {
  color: var(--neon-green);
}

.terminal-line .cmd {
  color: var(--text-primary);
}

.terminal-line .output {
  color: var(--text-secondary);
}

.terminal-line .error {
  color: var(--red);
}

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

.blink-cursor::after {
  content: '\2588';
  color: var(--neon-green);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.terminal-home-link {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-green);
  text-decoration: none;
  border: 1px solid var(--neon-green);
  padding: 10px 24px;
  border-radius: 6px;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.terminal-home-link:hover {
  background: var(--neon-green);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--neon-green-glow);
}

/* ---------- Typing Cursor ---------- */
.typing-text {
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-green);
  border-right: 2px solid var(--neon-green);
  padding-right: 4px;
  animation: cursorBlink 0.8s step-end infinite;
  display: inline;
}

@keyframes cursorBlink {
  50% { border-color: transparent; }
}

/* ---------- Reading Progress Bar ---------- */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 9999;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-green), var(--cyan));
  box-shadow: 0 0 8px var(--neon-green-glow);
  transition: width 50ms linear;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--neon-green);
  color: var(--bg-primary);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---------- Tables ---------- */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.post-content th {
  background: var(--bg-secondary);
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.post-content td {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.post-content tr:nth-child(even) {
  background: rgba(22, 27, 34, 0.5);
}

.post-content tr:hover {
  background: var(--neon-green-dim);
}

/* ---------- HR ---------- */
.post-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 2rem 0;
}

/* ---------- Images ---------- */
.post-content img {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 1rem 0;
}

/* ---------- Filter Bar (Writeups list) ---------- */
.filter-bar {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 72px;
}

.filter-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--neon-green);
  border-color: var(--neon-green);
}

.filter-btn.active {
  color: var(--bg-primary);
  background: var(--neon-green);
  border-color: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green-dim);
}

.filter-no-results {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin: 1rem 0;
}

.filter-no-results .prompt { color: var(--neon-green); }
.filter-no-results .filter-arrow { color: var(--text-muted); }
.filter-no-results .error { color: var(--red); }

/* Card badges row */
.card-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

/* Card technique tags in list */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 1px 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.card-tag:hover {
  color: var(--neon-green);
  border-color: var(--neon-green);
}

/* ---------- Writeup Single: Techniques Section ---------- */
.techniques-section {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.5rem;
}

.techniques-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.techniques-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.technique-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 180, 216, 0.25);
  border-radius: 4px;
  padding: 2px 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.technique-chip:hover {
  color: var(--bg-primary);
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
}

/* ---------- Writeup Prev/Next Nav ---------- */
.writeup-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.writeup-nav-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.writeup-nav-link:hover {
  color: var(--neon-green);
  border-color: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green-dim);
}

.writeup-nav-prompt {
  color: var(--neon-green);
  margin-right: 4px;
}

.writeup-nav-link.next {
  margin-left: auto;
  text-align: right;
}

/* ---------- About Page ---------- */
.about-page .post-title {
  color: var(--cyan) !important;
}

.about-content h2 {
  position: relative;
  padding-left: 0;
}

.about-content h2::before {
  content: '$ cat ';
  color: var(--neon-green);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  opacity: 0.7;
}

.about-content h2::after {
  content: '.txt';
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  font-size: 0.8em;
  opacity: 0.5;
}

.about-content h1::before {
  content: none;
}

.about-content h1::after {
  content: none;
}

/* Skill badges — style strong items in about page lists */
.about-content li strong {
  color: var(--cyan);
}

.about-content li {
  margin-bottom: 0.3rem;
}

/* Skill tag display for "Security Tools:", "Systems:" etc. lines */
.about-content p strong {
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

/* ---------- Search Hint Badge ---------- */
.search-hint {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 0 5px;
  margin-left: 6px;
  line-height: 1.6;
  vertical-align: middle;
}

/* ---------- Page Entrance Animation ---------- */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main {
  animation: fadeSlideIn 0.3s ease-out;
}

/* ---------- Card Hover Enhancement ---------- */
.post-entry {
  transition: all 0.3s ease, transform 0.25s ease;
}

.post-entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px var(--neon-green-dim), inset 0 0 16px var(--neon-green-dim);
}

/* ---------- Nav Link Animated Underline ---------- */
#menu a {
  position: relative;
  overflow: hidden;
}

#menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--neon-green);
  transition: width 0.3s ease;
}

#menu a:hover::after,
#menu .active::after {
  width: 100%;
}

/* ---------- Tag Chip Hover Scale ---------- */
.post-tags a,
.tags-list .tag-item,
.technique-chip,
.card-tag {
  transition: all 0.2s ease, transform 0.2s ease;
}

.post-tags a:hover,
.tags-list .tag-item:hover,
.technique-chip:hover,
.card-tag:hover {
  transform: scale(1.05);
}

/* ---------- Staggered Stat Card Animation ---------- */
@keyframes statCardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card {
  opacity: 0;
  animation: statCardIn 0.4s ease-out forwards;
}

.stat-card:nth-child(1) { animation-delay: 0ms; }
.stat-card:nth-child(2) { animation-delay: 100ms; }
.stat-card:nth-child(3) { animation-delay: 200ms; }
.stat-card:nth-child(4) { animation-delay: 300ms; }

/* ---------- Timeline ---------- */
.timeline-section {
  margin: 2rem 0;
}

.timeline-section h2 {
  color: var(--cyan) !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.timeline-section h2::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-entry {
  position: relative;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeSlideIn 0.3s ease-out forwards;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon-green);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 6px var(--neon-green-dim);
  z-index: 1;
}

.timeline-dot.writeup {
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan-dim);
}

.timeline-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  transition: all 0.2s ease;
}

.timeline-content:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green-dim);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
}

.timeline-hash {
  color: var(--yellow);
}

.timeline-date {
  color: var(--text-muted);
}

.timeline-type {
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-writeup {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(0, 180, 216, 0.3);
}

.badge-post {
  background: var(--neon-green-dim);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 65, 0.3);
}

.timeline-title {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.timeline-title:hover {
  color: var(--neon-green);
}

/* ---------- Terms / Taxonomy Page ---------- */
.terms-terminal-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 2rem;
}

.terms-terminal-header .prompt {
  color: var(--neon-green);
}

.terms-groups {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.terms-group-title {
  color: var(--cyan) !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.terms-group-icon {
  color: var(--neon-green);
  margin-right: 0.3rem;
  font-size: 0.7em;
}

.terms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.terms-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.terms-chip:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green-dim);
  transform: scale(1.05);
}

.terms-chip.platform {
  border-color: rgba(0, 255, 65, 0.3);
}

.terms-chip.difficulty.diff-easy { border-color: rgba(0, 255, 65, 0.3); color: var(--neon-green); }
.terms-chip.difficulty.diff-medium { border-color: rgba(255, 159, 67, 0.3); color: var(--orange); }
.terms-chip.difficulty.diff-hard { border-color: rgba(255, 71, 87, 0.3); color: var(--red); }
.terms-chip.difficulty.diff-insane { border-color: rgba(168, 85, 247, 0.3); color: var(--purple); }

.terms-chip.technique {
  border-color: rgba(0, 180, 216, 0.25);
  color: var(--cyan);
}

.terms-chip.technique:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-dim);
}

.terms-chip-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: 3px;
  padding: 0 6px;
}

/* ---------- 404 Recent Pages ---------- */
.recent-pages-404 {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
  text-align: left;
}

.recent-pages-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  padding: 1rem 1.5rem 0.5rem;
}

.recent-pages-header .prompt {
  color: var(--neon-green);
}

.recent-pages-listing {
  padding: 0 1.5rem 1rem;
}

.listing-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.listing-row {
  display: flex;
  gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
  transition: all 0.2s ease;
}

.listing-row:hover {
  color: var(--neon-green);
  background: var(--neon-green-dim);
  padding-left: 4px;
}

.listing-perms {
  color: var(--text-muted);
  flex-shrink: 0;
}

.listing-user,
.listing-group {
  color: var(--cyan);
  flex-shrink: 0;
  min-width: 40px;
}

.listing-date {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 90px;
}

.listing-name {
  color: var(--neon-green);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Copy Link Button ---------- */
.copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.8rem;
}

.copy-link-btn:hover {
  color: var(--neon-green);
  border-color: var(--neon-green);
  background: var(--neon-green-dim);
}

.copy-link-btn.copied {
  color: var(--neon-green);
  border-color: var(--neon-green);
}

.copy-link-bracket {
  opacity: 0.5;
}

/* ---------- Enhanced Search Page ---------- */
.search-header h1 {
  color: var(--cyan) !important;
}

.search-terminal {
  margin-bottom: 2rem;
}

.search-prompt-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-prompt-wrapper:focus-within {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green-dim);
}

.search-prompt-symbol {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--neon-green);
  flex-shrink: 0;
}

.search-prompt-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-terminal #searchInput {
  border: none !important;
  background: transparent !important;
  padding: 10px 8px !important;
  flex: 1;
  min-width: 0;
}

.search-terminal #searchInput:focus {
  box-shadow: none !important;
}

.search-terminal #searchInput::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* Blinking cursor effect for empty search */
.search-terminal #searchInput:placeholder-shown {
  caret-color: var(--neon-green);
}

/* ---------- CTF Statistics Page ---------- */
.stats-page {
  margin-top: 1rem;
}

.stats-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.chart-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
}

.chart-container h2 {
  color: var(--cyan) !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.chart-container h2::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

.chart-wide {
  grid-column: 1 / -1;
}

.chart-wrap {
  position: relative;
  height: 260px;
}

.chart-wrap-wide {
  height: 220px;
}

/* ---------- Arsenal / Tools Page ---------- */
.arsenal-page {
  margin-top: 1rem;
}

.arsenal-terminal-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.5rem;
}

.arsenal-terminal-header .prompt {
  color: var(--neon-green);
}

.arsenal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 16px var(--neon-green-dim);
  transform: translateY(-2px);
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tool-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  color: var(--neon-green);
  margin: 0;
}

.tool-name::before {
  content: '> ';
  opacity: 0.5;
}

.tool-category-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tool-category-badge.recon {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(0, 180, 216, 0.3);
}

.tool-category-badge.exploit {
  background: rgba(255, 71, 87, 0.1);
  color: var(--red);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.tool-category-badge.privesc {
  background: rgba(255, 159, 67, 0.1);
  color: var(--orange);
  border: 1px solid rgba(255, 159, 67, 0.3);
}

.tool-category-badge.passwords {
  background: rgba(168, 85, 247, 0.1);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.tool-category-badge.web {
  background: var(--neon-green-dim);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 65, 0.3);
}

.tool-category-badge.networking {
  background: rgba(254, 202, 87, 0.1);
  color: var(--yellow);
  border: 1px solid rgba(254, 202, 87, 0.3);
}

.tool-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 0.8rem;
  flex: 1;
}

.tool-usage {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 0.8rem;
  overflow-x: auto;
}

.tool-usage code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--neon-green);
  background: none;
  border: none;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.tool-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tool-link:hover {
  color: var(--neon-green);
}

/* ---------- Share Bar ---------- */
.share-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.share-btn:hover {
  color: var(--neon-green);
  border-color: var(--neon-green);
  background: var(--neon-green-dim);
}

.share-btn.copied {
  color: var(--neon-green);
  border-color: var(--neon-green);
}

.share-linkedin:hover {
  color: #0a66c2;
  border-color: #0a66c2;
  background: rgba(10, 102, 194, 0.1);
}

.share-twitter:hover {
  color: #1da1f2;
  border-color: #1da1f2;
  background: rgba(29, 161, 242, 0.1);
}

/* ---------- Unknown Difficulty Badge ---------- */
.badge-unknown {
  background: rgba(72, 79, 88, 0.2);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-style: italic;
}

/* ---------- Last Solved Badge ---------- */
.last-solved {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  margin-top: 1rem;
  padding: 8px 16px;
  background: rgba(0, 255, 65, 0.05);
  border: 1px solid rgba(0, 255, 65, 0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.last-solved-label {
  color: var(--text-muted);
}

.last-solved-label::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.6;
}

.last-solved-title {
  color: var(--neon-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

.last-solved-title:hover {
  color: #fff;
}

.last-solved-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ---------- Breadcrumbs (Terminal Path) ---------- */
.breadcrumbs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--neon-green);
}

.bc-sep {
  color: var(--text-muted);
  margin: 0 2px;
  opacity: 0.6;
}

/* ---------- Related Writeups ---------- */
.related-writeups {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.related-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.related-header::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

.related-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.related-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green-dim);
  transform: translateX(4px);
}

.related-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-card:hover .related-title {
  color: var(--neon-green);
}

.related-badges {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.related-badges .badge {
  font-size: 0.65rem;
  padding: 1px 8px;
}

/* ---------- Changelog Page ---------- */
.changelog-page {
  margin-top: 1rem;
}

.changelog-terminal-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.5rem;
}

.changelog-terminal-header .prompt {
  color: var(--neon-green);
}

.changelog-timeline {
  position: relative;
  padding-left: 24px;
}

.changelog-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.changelog-entry {
  position: relative;
  margin-bottom: 1rem;
}

.changelog-dot {
  position: absolute;
  left: -20px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  z-index: 1;
}

.changelog-dot.new {
  background: var(--neon-green);
  box-shadow: 0 0 6px var(--neon-green-dim);
}

.changelog-dot.update {
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan-dim);
}

.changelog-dot.fix {
  background: var(--orange);
  box-shadow: 0 0 6px rgba(255, 159, 67, 0.3);
}

.changelog-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  transition: all 0.2s ease;
}

.changelog-content:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green-dim);
}

.changelog-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
}

.changelog-hash {
  color: var(--yellow);
}

.changelog-date {
  color: var(--text-muted);
}

.changelog-desc {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin: 0;
}

.badge-changelog-new {
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--neon-green-dim);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 65, 0.3);
}

.badge-changelog-update {
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(0, 180, 216, 0.3);
}

.badge-changelog-fix {
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(255, 159, 67, 0.1);
  color: var(--orange);
  border: 1px solid rgba(255, 159, 67, 0.3);
}

/* ---------- Custom Footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.footer-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

.footer-nav {
  display: flex;
  gap: 0.8rem;
}

.footer-nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--neon-green);
}

/* ---------- Homepage Sections ---------- */
.home-section {
  margin-top: 2rem;
}

.home-section-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--cyan);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.home-section-header::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

/* Featured writeups grid */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.featured-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.featured-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 16px var(--neon-green-dim);
  transform: translateY(-2px);
}

.featured-card header {
  margin-bottom: 0.6rem;
}

.featured-card h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

.featured-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.featured-card:hover h3 a {
  color: var(--neon-green);
}

.featured-summary {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 auto;
  flex: 1;
}

.featured-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-color);
}

.featured-card .entry-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.featured-card .card-badges {
  position: relative;
  z-index: 2;
}

/* Recent posts row */
.recent-posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.recent-post-card {
  background: var(--bg-secondary) !important;
}

/* Quick Links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.quick-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.quick-link:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green-dim);
  color: var(--neon-green);
}

.ql-prompt {
  color: var(--neon-green);
  opacity: 0.7;
}

.ql-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

/* ---------- Tags Controls ---------- */
.terms-controls {
  margin-bottom: 1.5rem;
}

.terms-search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}

.terms-search-prompt {
  color: var(--neon-green);
  flex-shrink: 0;
}

.terms-search-cmd {
  color: var(--cyan);
  flex-shrink: 0;
}

.terms-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

.terms-search-input::placeholder {
  color: var(--text-muted);
}

.terms-search-path {
  color: var(--text-muted);
  flex-shrink: 0;
}

.terms-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.terms-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terms-sort-btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---------- Discuss This Writeup ---------- */
.discuss-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.discuss-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.discuss-header::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

.discuss-subtext {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.discuss-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.discuss-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.discuss-btn:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green-dim);
  transform: translateY(-1px);
}

.discuss-linkedin:hover { border-color: #0a66c2; color: #0a66c2; box-shadow: 0 0 12px rgba(10,102,194,0.2); }
.discuss-twitter:hover { border-color: var(--text-primary); color: var(--text-primary); }
.discuss-email:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px var(--cyan-dim); }

.discuss-btn svg { flex-shrink: 0; }

/* ---------- Page Loading Bar ---------- */
.page-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green-glow);
  z-index: 9999;
  transition: none;
}

.page-loading-bar.loading {
  width: 85%;
  transition: width 8s cubic-bezier(0.1, 0.5, 0.3, 1);
}

.page-loading-bar.loaded {
  width: 100%;
  transition: width 0.2s ease;
  opacity: 0;
  transition: width 0.2s ease, opacity 0.3s ease 0.2s;
}

/* ---------- Lazy Image Loading ---------- */
.lazy-img-wrapper {
  position: relative;
}

.lazy-img-placeholder {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--neon-green);
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  opacity: 0.7;
  transition: opacity 0.4s ease;
}

.lazy-img-placeholder.lazy-hide {
  opacity: 0;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lazy-img-placeholder.lazy-error {
  color: var(--red);
  border-color: var(--red);
}

.lazy-img {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lazy-img.lazy-loaded {
  opacity: 1;
}

/* ---------- Chart Error Boundaries ---------- */
.chart-error {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--red);
  background: rgba(255, 71, 87, 0.05);
  border: 1px solid rgba(255, 71, 87, 0.2);
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.5rem;
}

.chart-error-prompt {
  color: var(--red);
  opacity: 0.7;
}

.chart-error-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ---------- Theme Toggle Styling ---------- */
#theme-toggle {
  font-family: 'JetBrains Mono', monospace;
}

/* ---------- Reduced Motion Fallback ---------- */
@media (prefers-reduced-motion: reduce) {
  .timeline-entry,
  .stat-card,
  .main {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .page-loading-bar {
    display: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .room-info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ascii-404 {
    font-size: 0.35rem;
  }

  .writeup-nav {
    flex-direction: column;
  }

  .writeup-nav-link {
    max-width: 100%;
  }

  .filter-row {
    gap: 0.3rem;
  }

  .filter-label {
    min-width: 100%;
  }

  .listing-row {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .listing-perms,
  .listing-user,
  .listing-group {
    display: none;
  }

  .timeline-meta {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .search-prompt-text {
    display: none;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .arsenal-grid {
    grid-template-columns: 1fr;
  }

  .stats-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .changelog-meta {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .footer {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-sep {
    display: none;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .recent-posts-grid {
    grid-template-columns: 1fr;
  }

  .quick-links {
    grid-template-columns: 1fr 1fr;
  }

  .terms-search-path {
    display: none;
  }

  .terms-controls-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-page-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }
}

/* ---------- Now Hacking Widget ---------- */
.now-hacking {
  margin-top: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.now-hacking-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.now-hacking-header .now-hacking-prompt {
  color: var(--neon-green);
  margin-right: 0.3rem;
}

.now-hacking-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-wrap: wrap;
}

.now-hacking-card:hover {
  background: var(--neon-green-dim);
}

.now-hacking-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 6px var(--neon-green-glow);
  animation: hackerPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.now-hacking-indicator.inactive {
  background: var(--text-muted);
  box-shadow: none;
  animation: none;
}

@keyframes hackerPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--neon-green-glow); }
  50% { opacity: 0.3; box-shadow: 0 0 2px var(--neon-green-dim); }
}

.now-hacking-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--neon-green);
  font-weight: 600;
  flex-shrink: 0;
}

.now-hacking-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.now-hacking-card:hover .now-hacking-title {
  color: var(--neon-green);
}

.now-hacking-platform {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.now-hacking-empty {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
}

.now-hacking-idle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Floating Table of Contents ---------- */
.toc-floating-wrapper {
  display: none;
}

@media (min-width: 1400px) {
  .toc-floating-wrapper {
    display: block;
    position: fixed;
    top: 100px;
    right: max(calc((100vw - 900px) / 2 - 320px), 20px);
    width: 260px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    z-index: 50;
  }

  .toc-floating-wrapper::-webkit-scrollbar {
    width: 3px;
  }

  .toc-floating-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
  }

  .toc-floating {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
  }

  .toc-floating-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
  }

  .toc-floating-title::before {
    content: '$ ';
    color: var(--neon-green);
    opacity: 0.7;
  }

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

  .toc-floating li {
    margin: 0;
  }

  .toc-floating a {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 3px 0 3px 12px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toc-floating a::before {
    content: '\251C\2500 ';
    color: var(--border-color);
    font-size: 0.7rem;
  }

  .toc-floating li:last-child > a::before {
    content: '\2514\2500 ';
  }

  .toc-floating a:hover {
    color: var(--text-primary);
    border-left-color: var(--border-color);
  }

  .toc-floating a.toc-active {
    color: var(--neon-green);
    border-left-color: var(--neon-green);
    background: var(--neon-green-dim);
  }

  .toc-floating a.toc-active::before {
    color: var(--neon-green);
  }

  /* Nested levels */
  .toc-floating ul ul a {
    padding-left: 24px;
    font-size: 0.68rem;
  }

  .toc-floating ul ul ul a {
    padding-left: 36px;
    font-size: 0.65rem;
  }

  /* Hide inline TOC when floating is visible */
  .has-floating-toc .toc {
    display: none;
  }
}

/* ---------- Difficulty Heatmap ---------- */
.heatmap-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.heatmap-container h2 {
  color: var(--cyan) !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.heatmap-container h2::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

.heatmap-scroll {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 14px);
  grid-auto-flow: column;
  grid-auto-columns: 14px;
  gap: 3px;
}

.heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: var(--bg-card);
  border: 1px solid rgba(48, 54, 61, 0.4);
  transition: all 0.15s ease;
}

.heatmap-cell:hover {
  border-color: var(--text-muted);
  transform: scale(1.3);
}

.heatmap-cell[data-count="1"] {
  background: rgba(0, 255, 65, 0.25);
  border-color: rgba(0, 255, 65, 0.3);
}

.heatmap-cell[data-count="2"] {
  background: rgba(0, 255, 65, 0.45);
  border-color: rgba(0, 255, 65, 0.5);
}

.heatmap-cell[data-count="3"] {
  background: rgba(0, 255, 65, 0.65);
  border-color: rgba(0, 255, 65, 0.7);
}

.heatmap-cell[data-count="4"],
.heatmap-cell[data-count="5"],
.heatmap-cell.heatmap-high {
  background: rgba(0, 255, 65, 0.85);
  border-color: rgba(0, 255, 65, 0.9);
}

.heatmap-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.heatmap-legend-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(48, 54, 61, 0.4);
}

.heatmap-tooltip {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-primary);
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ---------- Mobile Navigation ---------- */
.mobile-nav-toggle {
  display: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--neon-green);
  background: transparent;
  border: 1px solid var(--neon-green);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.mobile-nav-toggle:hover {
  background: var(--neon-green-dim);
  box-shadow: 0 0 8px var(--neon-green-dim);
}

.mobile-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--neon-green);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 100;
  padding: 0.5rem 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.mobile-nav-dropdown.open {
  display: block;
  max-height: 80vh;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.mobile-nav-dropdown a {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-primary) !important;
  text-decoration: none;
  padding: 10px 24px;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
}

.mobile-nav-dropdown a::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

.mobile-nav-dropdown a:hover,
.mobile-nav-dropdown a.active {
  color: var(--neon-green) !important;
  background: var(--neon-green-dim);
  border-left-color: var(--neon-green);
}

.mobile-nav-group-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 24px 4px;
  cursor: default;
  border-top: 1px solid var(--border-color);
  margin-top: 4px;
}

.mobile-nav-group-label:first-child { border-top: none; margin-top: 0; }

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: inline-block;
  }

  #menu {
    display: none !important;
  }

  .nav-dropdown-menu { display: none !important; }
}

/* ---------- Command Builder (Arsenal) ---------- */
.cmd-builder {
  margin-top: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  overflow: hidden;
}

.cmd-builder-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.cmd-builder-header .cmd-builder-prompt {
  color: var(--neon-green);
  margin-right: 0.3rem;
}

.cmd-builder-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0.8rem;
}

@media (max-width: 600px) {
  .cmd-builder-fields {
    grid-template-columns: 1fr;
  }
}

.cmd-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cmd-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cmd-input,
.cmd-select {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 6px 8px;
  outline: none;
  transition: border-color 0.2s ease;
}

.cmd-input:focus,
.cmd-select:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 4px var(--neon-green-dim);
}

.cmd-select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238b949e'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

.cmd-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.cmd-output {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.cmd-result {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--neon-green);
  word-break: break-all;
  white-space: pre-wrap;
}

.cmd-copy-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cmd-copy-btn:hover {
  color: var(--neon-green);
  border-color: var(--neon-green);
}

.cmd-copy-btn.copied {
  color: var(--neon-green);
  border-color: var(--neon-green);
}

/* ---------- Streak Tracker ---------- */
.streak-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 1.5rem;
  overflow: hidden;
}

.streak-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.streak-header .streak-prompt {
  color: var(--neon-green);
  margin-right: 0.3rem;
}

.streak-body {
  padding: 0.8rem 1rem;
}

.streak-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  padding: 0.3rem 0;
}

.streak-flag {
  color: var(--cyan);
}

.streak-line span:last-child {
  color: var(--neon-green);
  font-weight: 600;
}

/* ---------- Time to Pwn ---------- */
.ttp-container {
  margin-top: 1.5rem;
}

.ttp-container h2::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

/* ---------- Search Results ---------- */
.search-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.5rem 0;
}

.search-status.search-error {
  color: var(--red);
}

.search-results {
  margin-top: 0.5rem;
}

.search-group {
  margin-bottom: 1.5rem;
}

.search-group-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.search-group-header::before {
  content: '$ ls ';
  color: var(--neon-green);
  opacity: 0.7;
}

.search-result-item {
  display: block;
  text-decoration: none;
  padding: 0.8rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  margin-bottom: 0.3rem;
}

.search-result-item:hover,
.search-result-item.search-active {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.search-result-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.search-result-path::before {
  content: '\2192 ';
  color: var(--neon-green);
  opacity: 0.5;
}

.search-result-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-result-item:hover .search-result-title,
.search-result-item.search-active .search-result-title {
  color: var(--neon-green);
}

.search-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
  font-weight: 400;
}

.search-badge.badge-thm { color: var(--neon-green); border-color: rgba(0,255,65,0.3); }
.search-badge.badge-htb { color: var(--cyan); border-color: rgba(0,180,216,0.3); }
.search-badge.badge-easy { color: var(--neon-green); border-color: rgba(0,255,65,0.3); }
.search-badge.badge-medium { color: var(--orange); border-color: rgba(255,159,67,0.3); }
.search-badge.badge-hard { color: var(--red); border-color: rgba(255,71,87,0.3); }
.search-badge.badge-insane { color: var(--purple); border-color: rgba(168,85,247,0.3); }

.search-result-snippet {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-result-snippet mark {
  background: rgba(0, 255, 65, 0.2);
  color: var(--neon-green);
  border-radius: 2px;
  padding: 0 2px;
}

.search-result-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ---------- Challenge Yourself Recommendation Engine ---------- */
.challenge-yourself {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.challenge-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--neon-green);
  margin-bottom: 0.3rem;
}

.challenge-header::before {
  content: '> ';
  opacity: 0.6;
}

.challenge-subtext {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.challenge-grid {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.challenge-arrow {
  color: var(--neon-green);
  font-size: 1.2rem;
  font-weight: 700;
  text-shadow: 0 0 8px var(--neon-green-glow);
  flex-shrink: 0;
}

.challenge-card {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.challenge-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green-dim);
  transform: translateY(-2px);
}

.challenge-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
}

.challenge-card:hover .challenge-title {
  color: var(--neon-green);
}

.challenge-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .challenge-grid { flex-direction: column; align-items: stretch; }
  .challenge-arrow { text-align: center; transform: rotate(90deg); }
}

/* ---------- Techniques Matrix Page ---------- */
.matrix-container {
  margin-top: 1rem;
}

.matrix-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.matrix-filter-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.matrix-filter-btn:hover,
.matrix-filter-btn.active {
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: var(--neon-green-dim);
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.matrix-category {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  overflow: hidden;
}

.matrix-category-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.matrix-category-header::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

.matrix-category-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.matrix-techniques {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.matrix-technique {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.matrix-technique:hover {
  background: var(--neon-green-dim);
  color: var(--neon-green);
}

.matrix-technique-count {
  font-size: 0.65rem;
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  min-width: 24px;
  text-align: center;
}

.matrix-technique:hover .matrix-technique-count {
  border-color: var(--neon-green);
  color: var(--neon-green);
}

.matrix-writeups-panel {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--neon-green);
  border-radius: 8px;
  background: var(--bg-secondary);
  display: none;
}

.matrix-writeups-panel.visible {
  display: block;
  animation: fadeInPanel 0.2s ease;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.matrix-panel-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--neon-green);
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.matrix-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
}

.matrix-panel-close:hover { color: var(--red); }

.matrix-writeup-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.matrix-writeup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.matrix-writeup-item:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green-dim);
}

.matrix-writeup-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.matrix-writeup-item:hover .matrix-writeup-title {
  color: var(--neon-green);
}

.matrix-writeup-badges {
  display: flex;
  gap: 0.3rem;
}

/* ---------- Quick Win Indicator ---------- */
.quick-win-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--yellow);
  border: 1px solid rgba(254, 202, 87, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(254, 202, 87, 0.08);
}

.quick-win-badge .zap-icon {
  font-style: normal;
}

.quick-win-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: 0.3rem;
}

.filter-row .quick-win-filter {
  border-color: rgba(254, 202, 87, 0.3);
  color: var(--yellow);
}

.filter-row .quick-win-filter:hover,
.filter-row .quick-win-filter.active {
  border-color: var(--yellow);
  background: rgba(254, 202, 87, 0.1);
  color: var(--yellow);
}

/* ---------- 404 Fuzzy Suggestions ---------- */
.fuzzy-suggestions {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.fuzzy-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 0.8rem;
}

.fuzzy-header .prompt {
  color: var(--neon-green);
}

.fuzzy-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fuzzy-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.fuzzy-item:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green-dim);
}

.fuzzy-item::before {
  content: '\2192';
  color: var(--neon-green);
  opacity: 0.6;
}

.fuzzy-match {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: auto;
}

.fuzzy-loading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
}

/* ---------- Scenario Dropdowns (Arsenal) ---------- */
.scenario-dropdown {
  margin-top: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.scenario-summary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  padding: 0.6rem 1rem;
  cursor: pointer;
  background: var(--bg-primary);
  border: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scenario-summary::before {
  content: '\25B6';
  font-size: 0.6rem;
  transition: transform 0.15s ease;
}

details[open] .scenario-summary::before {
  transform: rotate(90deg);
}

.scenario-summary:hover {
  color: var(--neon-green);
  background: var(--bg-secondary);
}

.scenario-list {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.scenario-item {
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.scenario-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.4rem;
}

.scenario-cmd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
}

.scenario-cmd code {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--neon-green);
  word-break: break-all;
  white-space: pre-wrap;
}

.scenario-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 2px 8px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.scenario-copy:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
}

.scenario-copy.copied {
  border-color: var(--neon-green);
  color: var(--neon-green);
}

/* ---------- CV / Resume Page ---------- */
.cv-page { max-width: 900px; }

.cv-actions {
  margin-bottom: 2rem;
}

.cv-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--neon-green);
  border-radius: 6px;
  background: var(--neon-green-dim);
  color: var(--neon-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cv-download-btn:hover {
  background: var(--neon-green);
  color: var(--bg-primary);
  box-shadow: 0 0 16px var(--neon-green-glow);
}

.cv-section {
  margin-bottom: 2.5rem;
}

.cv-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--cyan);
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.cv-section-title::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

/* Timeline */
.cv-timeline {
  position: relative;
  padding-left: 2rem;
}

.cv-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.cv-timeline-entry {
  position: relative;
  margin-bottom: 1.5rem;
}

.cv-timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neon-green);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px var(--neon-green-glow);
  z-index: 1;
}

.cv-timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.cv-timeline-card {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.cv-timeline-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.cv-timeline-company {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cyan);
}

.cv-timeline-details {
  margin-top: 0.6rem;
  padding-left: 1.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Skills Matrix */
.cv-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.cv-skill-category {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.cv-skill-cat-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 0.8rem;
}

.cv-skill-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.cv-skill-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
  min-width: 120px;
  flex-shrink: 0;
}

.cv-skill-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
}

.cv-skill-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.cv-skill-fill.advanced { background: var(--neon-green); box-shadow: 0 0 4px var(--neon-green-glow); }
.cv-skill-fill.intermediate { background: var(--cyan); box-shadow: 0 0 4px var(--cyan-glow); }
.cv-skill-fill.beginner { background: var(--orange); }

.cv-skill-level {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  min-width: 70px;
  text-align: right;
}

/* Certifications */
.cv-certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.cv-cert-card {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  text-align: center;
}

.cv-cert-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.cv-cert-status.achieved { background: var(--neon-green-dim); color: var(--neon-green); border: 1px solid rgba(0,255,65,0.3); }
.cv-cert-status.in-progress { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,180,216,0.3); }
.cv-cert-status.planned { background: rgba(255,159,67,0.1); color: var(--orange); border: 1px solid rgba(255,159,67,0.3); }

.cv-cert-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.cv-cert-issuer, .cv-cert-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

/* Projects in CV */
.cv-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.cv-project-card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.cv-project-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green-dim);
  transform: translateY(-2px);
}

.cv-project-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.cv-project-card:hover .cv-project-name { color: var(--neon-green); }

.cv-project-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.cv-project-tech { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.cv-tech-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.cv-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  margin-top: 2rem;
}

/* ---------- Projects Page ---------- */
.projects-page { max-width: 1000px; }

.projects-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.project-card {
  padding: 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.project-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green-dim);
}

.project-card.featured {
  border-color: rgba(0, 255, 65, 0.3);
  background: linear-gradient(135deg, var(--bg-secondary), rgba(0, 255, 65, 0.03));
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-featured-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--yellow);
}

.project-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 3px;
}

.project-status.status-active { background: var(--neon-green-dim); color: var(--neon-green); border: 1px solid rgba(0,255,65,0.3); }
.project-status.status-wip { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,180,216,0.3); }
.project-status.status-planned { background: rgba(255,159,67,0.1); color: var(--orange); border: 1px solid rgba(255,159,67,0.3); }

.project-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.project-card:hover .project-name { color: var(--neon-green); }

.project-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-tech-stack { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.project-tech {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  padding: 2px 8px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-muted);
}

.project-links { display: flex; gap: 0.8rem; margin-top: auto; }
.project-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cyan);
  text-decoration: none;
}
.project-link:hover { color: var(--neon-green); }
.project-link-placeholder {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Learning Path Page ---------- */
.learning-page { max-width: 900px; }

.learning-section {
  margin-bottom: 2.5rem;
}

.learning-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--cyan);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.learning-section-title::before {
  content: '$ ';
  color: var(--neon-green);
  opacity: 0.7;
}

/* Goals */
.learning-goals {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.learning-goal {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.learning-goal.completed { opacity: 0.6; }

.learning-goal-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.learning-goal-text {
  color: var(--text-primary);
  flex: 1;
}

.learning-goal.completed .learning-goal-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.learning-goal-target {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Items (courses/books) */
.learning-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.learning-item {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.learning-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.learning-item-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.learning-item-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.learning-item-status.status-active { background: var(--neon-green-dim); color: var(--neon-green); border: 1px solid rgba(0,255,65,0.3); }
.learning-item-status.status-done { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,180,216,0.3); }
.learning-item-status.status-planned { background: rgba(255,159,67,0.1); color: var(--orange); border: 1px solid rgba(255,159,67,0.3); }

.learning-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.learning-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--neon-green);
  box-shadow: 0 0 6px var(--neon-green-glow);
  transition: width 0.8s ease;
}

.learning-progress-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Cert Roadmap */
.learning-cert-roadmap {
  position: relative;
  padding-left: 2rem;
}

.learning-cert-roadmap::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.learning-cert {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.learning-cert-marker {
  position: absolute;
  left: -2rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  z-index: 1;
}

.learning-cert.done .learning-cert-marker { background: var(--neon-green); box-shadow: 0 0 8px var(--neon-green-glow); }
.learning-cert.active .learning-cert-marker { background: var(--cyan); box-shadow: 0 0 8px var(--cyan-glow); }
.learning-cert.planned .learning-cert-marker { background: var(--text-muted); }

.learning-cert-info { display: flex; flex-direction: column; gap: 0.1rem; }

.learning-cert-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.learning-cert.done .learning-cert-name { color: var(--neon-green); }
.learning-cert.planned .learning-cert-name { color: var(--text-muted); }

.learning-cert-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.learning-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .cv-skills-grid { grid-template-columns: 1fr; }
  .cv-certs-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .cv-skill-name { min-width: 90px; }
}

/* =============================================================
   Cheat Sheets Section
   ============================================================= */

.cheatsheets-page { max-width: 900px; margin: 0 auto; }

.cheatsheets-search-bar { margin-bottom: 1rem; }

.cheatsheet-search-input {
  width: 100%;
  padding: 0.6rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--neon-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.cheatsheet-search-input:focus { border-color: var(--neon-green); box-shadow: 0 0 8px var(--neon-green-dim); }

.cheatsheets-filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }

.cheatsheets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }

.cheatsheet-card {
  display: block;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s, transform 0.2s;
}

.cheatsheet-card:hover { border-color: var(--neon-green); transform: translateY(-2px); }

.cheatsheet-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }

.cheatsheet-man-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 600;
}

.cheatsheet-category-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.cheatsheet-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: var(--neon-green);
  margin: 0 0 0.4rem;
}

.cheatsheet-tldr {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 0.8rem;
  line-height: 1.4;
}

.cheatsheet-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.6rem; }

.cheatsheet-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.cheatsheet-meta {
  display: flex; justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.cheatsheets-empty {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 2rem;
  text-align: center;
}

/* --- Cheatsheet Single (Man-page style) --- */

.cheatsheet-single { max-width: 800px; margin: 0 auto; }

.manpage-header {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-green);
  margin-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.manpage-section { color: var(--text-secondary); }

.manpage-meta-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin: 1rem 0;
}

.manpage-meta-item { display: flex; gap: 0.5rem; }

.manpage-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  min-width: 50px;
}

.manpage-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.manpage-content h2 {
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-green);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-color);
}

.manpage-content h3 {
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  font-size: 0.85rem;
  margin-top: 1.2rem;
}

.manpage-footer-bar {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.cheatsheet-single-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 1rem; }

.cheatsheet-nav { margin-top: 1.5rem; }

.cheatsheet-back-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  text-decoration: none;
}
.cheatsheet-back-link:hover { color: var(--neon-green); }

/* =============================================================
   Blog Section
   ============================================================= */

.blog-page { max-width: 800px; margin: 0 auto; }

.blog-filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }

.blog-posts-list { display: flex; flex-direction: column; gap: 0; }

.blog-post-entry {
  display: flex;
  gap: 1.2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  transition: background 0.2s;
}

.blog-post-entry:hover { background: var(--bg-secondary); }

.blog-post-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
  padding-top: 0.2rem;
}

.blog-date-day {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neon-green);
  line-height: 1;
}

.blog-date-month {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.blog-date-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
}

.blog-post-content { flex: 1; }

.blog-post-meta { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.3rem; }

.blog-category-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-cat-updates { color: var(--neon-green); background: var(--neon-green-dim); }
.blog-cat-tutorials { color: var(--cyan); background: var(--cyan-dim); }
.blog-cat-opinions { color: var(--purple); background: rgba(168, 85, 247, 0.15); }
.blog-cat-news { color: var(--orange); background: rgba(255, 159, 67, 0.15); }

.blog-reading-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.blog-post-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  margin: 0 0 0.3rem;
}

.blog-post-title a { color: var(--text-primary); text-decoration: none; }
.blog-post-entry:hover .blog-post-title a { color: var(--neon-green); }

.blog-post-summary {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.blog-post-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.blog-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.blog-empty {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 2rem;
  text-align: center;
}

/* --- Latest Blog Widget (Homepage) --- */

.latest-blog-grid { display: flex; flex-direction: column; gap: 0; }

.latest-blog-card {
  display: flex;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  transition: background 0.2s;
}

.latest-blog-card:hover { background: var(--bg-secondary); }

.latest-blog-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.lbd-day {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--neon-green);
  line-height: 1;
}

.lbd-month {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.latest-blog-info { flex: 1; }

.latest-blog-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.latest-blog-info h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  margin: 0.2rem 0;
}

.latest-blog-info h3 a { color: var(--text-primary); text-decoration: none; }
.latest-blog-card:hover h3 a { color: var(--neon-green); }

.latest-blog-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.home-section-more {
  text-align: right;
  margin-top: 0.5rem;
}

.home-section-more a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cyan);
  text-decoration: none;
}
.home-section-more a:hover { color: var(--neon-green); }

/* =============================================================
   Timeline Page
   ============================================================= */

.timeline-page { max-width: 850px; margin: 0 auto; }

.timeline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.timeline-filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; flex: 1; }

.timeline-search { flex: 0 0 250px; }

.timeline-search-input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--neon-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  outline: none;
}

.timeline-search-input:focus { border-color: var(--neon-green); }

/* --- Heatmap --- */

.timeline-heatmap-section { margin-bottom: 2rem; }

.timeline-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 0.8rem;
}

.timeline-heatmap {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 2px;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow-x: auto;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--bg-card);
}

.heatmap-cell.level-0 { background: var(--bg-card); }
.heatmap-cell.level-1 { background: rgba(0, 255, 65, 0.2); }
.heatmap-cell.level-2 { background: rgba(0, 255, 65, 0.4); }
.heatmap-cell.level-3 { background: rgba(0, 255, 65, 0.7); }
.heatmap-cell.level-4 { background: var(--neon-green); }

.timeline-heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 0.4rem;
}

.heatmap-legend-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  margin: 0 0.3rem;
}

.timeline-heatmap-legend .heatmap-cell { width: 10px; height: 10px; }

/* --- Git Log --- */

.timeline-git-log { position: relative; }

.timeline-year-marker {
  padding: 0.8rem 0 0.4rem;
}

.timeline-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon-green);
  background: var(--bg-primary);
  padding-right: 1rem;
}

.timeline-commit {
  display: flex;
  gap: 0.8rem;
  padding: 0.4rem 0;
}

.timeline-commit-graph {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 20px;
  position: relative;
}

.timeline-commit-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon-green);
  flex-shrink: 0;
  z-index: 1;
}

.timeline-commit-dot.type-writeups { background: var(--neon-green); }
.timeline-commit-dot.type-blog { background: var(--cyan); }
.timeline-commit-dot.type-cheatsheets { background: var(--orange); }
.timeline-commit-dot.type-notes { background: var(--purple); }

.timeline-commit-line {
  width: 2px;
  flex: 1;
  background: var(--border-color);
  min-height: 20px;
}

.timeline-commit-info { flex: 1; padding-bottom: 0.3rem; }

.timeline-commit-hash {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.15rem;
}

.commit-hash {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--orange);
}

.commit-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.timeline-commit-msg {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  margin-bottom: 0.2rem;
}

.timeline-commit-msg:hover { color: var(--neon-green); }

.timeline-commit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.timeline-type-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.timeline-type-badge.type-writeups { color: var(--neon-green); background: var(--neon-green-dim); }
.timeline-type-badge.type-blog { color: var(--cyan); background: var(--cyan-dim); }
.timeline-type-badge.type-cheatsheets { color: var(--orange); background: rgba(255, 159, 67, 0.15); }
.timeline-type-badge.type-notes { color: var(--purple); background: rgba(168, 85, 247, 0.15); }

.timeline-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.timeline-reading-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-muted);
}

/* =============================================================
   Contact Page
   ============================================================= */

.contact-page { max-width: 750px; margin: 0 auto; }

.contact-terminal {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.contact-terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.8rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green { background: var(--neon-green); }

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.contact-terminal-body {
  background: var(--bg-secondary);
  padding: 1rem 1.2rem;
}

.contact-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.contact-card-ascii {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--neon-green);
  line-height: 1.4;
  margin: 0;
  overflow-x: auto;
}

.contact-section { margin-bottom: 2rem; }

.contact-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-color);
}

.contact-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.contact-method-card {
  display: block;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem;
  text-decoration: none;
  color: var(--text-primary);
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.contact-method-card:hover { border-color: var(--neon-green); transform: translateY(-2px); }

.contact-method-icon {
  color: var(--neon-green);
  margin-bottom: 0.6rem;
}

.contact-method-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin: 0 0 0.3rem;
}

.contact-method-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--cyan);
  display: block;
  margin-bottom: 0.3rem;
  word-break: break-all;
}

.contact-method-note {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: block;
}

/* --- PGP Key --- */

.contact-pgp {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem;
}

.pgp-info { margin-bottom: 1rem; }

.pgp-row { display: flex; gap: 0.8rem; margin-bottom: 0.4rem; }

.pgp-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cyan);
  font-weight: 600;
  min-width: 60px;
}

.pgp-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pgp-placeholder { color: var(--text-muted); font-style: italic; }

.pgp-block {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.8rem;
  overflow-x: auto;
}

.pgp-block code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: pre;
}

/* --- Availability --- */

.contact-availability {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem;
}

.availability-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

.availability-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.availability-dot.available {
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px var(--neon-green-glow); }
  50% { box-shadow: 0 0 12px var(--neon-green-glow); }
}

.availability-dot.busy { background: var(--red); box-shadow: 0 0 8px rgba(255, 71, 87, 0.4); }
.availability-dot.limited { background: var(--orange); box-shadow: 0 0 8px rgba(255, 159, 67, 0.4); }

.availability-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--neon-green);
  font-weight: 600;
}

.availability-details { display: flex; flex-direction: column; gap: 0.4rem; }

.availability-row { display: flex; gap: 0.8rem; }

.availability-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 120px;
  flex-shrink: 0;
}

.availability-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.contact-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  margin-top: 2rem;
}

/* =============================================================
   Lab Notes Section
   ============================================================= */

.notes-page { max-width: 850px; margin: 0 auto; }

.notes-search-bar { margin-bottom: 1rem; }

.notes-search-input {
  width: 100%;
  padding: 0.6rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--neon-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  outline: none;
}

.notes-search-input:focus { border-color: var(--neon-green); box-shadow: 0 0 8px var(--neon-green-dim); }

.notes-filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }

.notes-list { display: flex; flex-direction: column; gap: 0.8rem; }

.note-card {
  display: flex;
  gap: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s, transform 0.2s;
}

.note-card:hover { border-color: var(--neon-green); transform: translateX(4px); }

.note-card-sidebar {
  width: 4px;
  flex-shrink: 0;
}

.note-category-indicator {
  display: block;
  width: 100%;
  height: 100%;
}

.note-cat-methodology { background: var(--neon-green); }
.note-cat-techniques { background: var(--cyan); }
.note-cat-general { background: var(--text-muted); }

.note-card-body { flex: 1; padding: 1rem 1.2rem; }

.note-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.3rem; }

.note-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 0;
}

.note-card:hover .note-title { color: var(--neon-green); }

.note-category-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}

.note-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0 0 0.6rem;
  line-height: 1.4;
}

.note-card-footer { display: flex; justify-content: space-between; align-items: center; }

.note-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.note-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  text-decoration: none;
}

.note-tag:hover { color: var(--cyan); }

.note-reading-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
}

.notes-empty, .notes-cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  margin-top: 1.5rem;
}

/* --- Note Single --- */

.note-single { max-width: 800px; margin: 0 auto; }

.note-single-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

.note-single-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

.note-single-date, .note-single-reading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.note-single-content h2 {
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-green);
  font-size: 0.95rem;
  margin-top: 2rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-color);
}

.note-single-content h3 {
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  font-size: 0.85rem;
  margin-top: 1.5rem;
}

.note-single-content hr {
  border: none;
  border-top: 1px dashed var(--border-color);
  margin: 2rem 0;
}

.note-single-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 1.5rem; }

.note-nav { margin-top: 1.5rem; }

.note-back-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
  text-decoration: none;
}
.note-back-link:hover { color: var(--neon-green); }

/* =============================================================
   Responsive — New Sections
   ============================================================= */

@media (max-width: 768px) {
  .cheatsheets-grid { grid-template-columns: 1fr; }
  .contact-methods-grid { grid-template-columns: 1fr; }
  .timeline-controls { flex-direction: column; }
  .timeline-search { flex: 1 1 100%; }
  .blog-post-entry { flex-direction: column; gap: 0.5rem; }
  .blog-post-date { flex-direction: row; gap: 0.5rem; }
  .availability-row { flex-direction: column; gap: 0.1rem; }
  .availability-label { min-width: auto; }
  .manpage-header { font-size: 0.7rem; }
  .note-card-header { flex-direction: column; }
}

/* ---------- Changelog Widget ---------- */
.changelog-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.changelog-entry {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(48, 54, 61, 0.3);
}

.changelog-entry:last-of-type { border-bottom: none; }

.changelog-date {
  color: var(--text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
  min-width: 80px;
}

.changelog-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
  min-width: 45px;
  text-align: center;
}

.changelog-badge-new { color: var(--neon-green); background: var(--neon-green-dim); }
.changelog-badge-update { color: var(--cyan); background: var(--cyan-dim); }
.changelog-badge-fix { color: var(--orange); background: rgba(255, 159, 67, 0.15); }

.changelog-desc {
  color: var(--text-primary);
  line-height: 1.4;
}

.changelog-more {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.changelog-more a {
  color: var(--neon-green);
  text-decoration: none;
  font-size: 0.75rem;
}

.changelog-more a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .changelog-entry { flex-wrap: wrap; gap: 0.4rem; }
  .changelog-date { min-width: auto; }
}

/* ---------- Changelog Full Page ---------- */
.changelog-page {
  max-width: 800px;
  margin: 0 auto;
}

.changelog-terminal-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.changelog-terminal-header .prompt { color: var(--neon-green); }

.changelog-timeline {
  position: relative;
  padding-left: 2rem;
}

.changelog-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.changelog-timeline .changelog-entry {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: none;
}

.changelog-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-left: -2rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.changelog-dot.new { background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green-dim); }
.changelog-dot.update { background: var(--cyan); box-shadow: 0 0 6px var(--cyan-dim); }
.changelog-dot.fix { background: var(--orange); box-shadow: 0 0 6px rgba(255, 159, 67, 0.3); }

.changelog-content { flex: 1; }

.changelog-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
}

.changelog-hash { color: var(--text-muted); }

.changelog-meta .changelog-date { color: var(--text-muted); min-width: auto; }

.badge-changelog-new { color: var(--neon-green); background: var(--neon-green-dim); padding: 0.1rem 0.4rem; border-radius: 3px; }
.badge-changelog-update { color: var(--cyan); background: var(--cyan-dim); padding: 0.1rem 0.4rem; border-radius: 3px; }
.badge-changelog-fix { color: var(--orange); background: rgba(255, 159, 67, 0.15); padding: 0.1rem 0.4rem; border-radius: 3px; }

.changelog-content .changelog-desc {
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}
