@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/themes/theme-earth/assets/fonts/inter-latin-400-500-700.woff2") format("woff2");
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: "Fira Code";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/themes/theme-earth/assets/fonts/fira-code-latin-400-500.woff2") format("woff2");
  unicode-range:
    U+0000-00FF,
    U+0131,
    U+0152-0153,
    U+02BB-02BC,
    U+02C6,
    U+02DA,
    U+02DC,
    U+0304,
    U+0308,
    U+0329,
    U+2000-206F,
    U+20AC,
    U+2122,
    U+2191,
    U+2193,
    U+2212,
    U+2215,
    U+FEFF,
    U+FFFD;
}

.theme-hacker-ins {
  --hi-neon-green: #00ff88;
  --hi-neon-cyan: #22d3c5;
  --hi-neon-pink: #e8a0bf;
  --hi-bg-primary: #0a0a0f;
  --hi-bg-secondary: #0d1117;
  --hi-bg-card-strong: #161b22;
  --hi-text-primary: #e6edf3;
  --hi-text-secondary: #8b949e;
  --hi-radius: 14px;
  --hi-radius-sm: 10px;
  --hi-border-soft: rgba(34, 211, 197, 0.16);
  --hi-border-strong: #30363d;
  --hi-glow-green-soft: rgba(0, 255, 65, 0.3);
  --hi-glow-cyan-soft: rgba(0, 212, 170, 0.3);
  --hi-glow-cyan: 0 0 0 1px rgba(34, 211, 197, 0.22), 0 10px 32px rgba(34, 211, 197, 0.14);
  --hi-glow-pink: 0 0 0 1px rgba(232, 160, 191, 0.28), 0 10px 30px rgba(232, 160, 191, 0.18);
  font-family: "Inter", sans-serif;
}

html,
body {
  min-height: 100%;
}

body.theme-hacker-ins {
  min-height: 100vh;
}

.theme-hacker-ins .hi-home-section {
  margin-top: clamp(1.2rem, 2vw, 1.8rem);
}

.theme-hacker-ins .hi-home-headline {
  margin-bottom: 1rem;
}

.theme-hacker-ins .hi-home-title {
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.theme-hacker-ins .hi-home-title span {
  color: var(--hi-neon-cyan);
  text-shadow: 0 0 14px rgba(34, 211, 197, 0.18);
}

.theme-hacker-ins .hi-home-subtitle {
  margin: 0.35rem 0 0;
  color: var(--hi-text-secondary);
  font-size: 0.95rem;
}

.theme-hacker-ins .hi-stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme-hacker-ins .hi-stat-card {
  border: 1px solid var(--hi-border-strong);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(22, 27, 34, 0.72);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.theme-hacker-ins .hi-stat-card:hover {
  border-color: rgba(34, 211, 197, 0.44);
  box-shadow: 0 0 18px var(--hi-glow-cyan-soft);
  transform: translateY(-1px);
}

.theme-hacker-ins .hi-stat-value {
  margin: 0;
  font-family: "Fira Code", monospace;
  font-size: clamp(1.35rem, 1rem + 1.5vw, 1.9rem);
  font-weight: 700;
  color: var(--hi-neon-cyan);
}

.theme-hacker-ins .hi-stat-label {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--hi-text-secondary);
}

/* 首页 Site Stats：PKM 每周阅读时长折线图 */
.theme-hacker-ins .hi-reading-chart-card {
  margin-top: 12px;
  border: 1px solid var(--hi-border-strong);
  border-radius: 12px;
  padding: 12px 14px 16px;
  background: rgba(22, 27, 34, 0.62);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-hacker-ins .hi-reading-chart-card:hover {
  border-color: rgba(34, 211, 197, 0.35);
  box-shadow: 0 0 14px var(--hi-glow-cyan-soft);
}

.theme-hacker-ins .hi-reading-chart-canvas-wrap {
  position: relative;
  margin-top: 10px;
  height: min(220px, 48vw);
  max-height: 260px;
}

.theme-hacker-ins .hi-reading-chart-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.theme-hacker-ins .hi-reading-chart-fallback,
.theme-hacker-ins .hi-reading-chart-hint {
  margin-top: 10px;
}

.theme-hacker-ins .hi-heatmap-wrap {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.theme-hacker-ins .hi-heatmap-card {
  border: 1px solid var(--hi-border-strong);
  border-radius: 12px;
  padding: 12px;
  background: rgba(22, 27, 34, 0.62);
}

.theme-hacker-ins .hi-heatmap-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--hi-text-primary);
}

.theme-hacker-ins .hi-heatmap-head p {
  margin: 3px 0 0;
  color: var(--hi-text-secondary);
  font-size: 0.78rem;
}

.theme-hacker-ins .hi-heatmap-months {
  display: grid;
  grid-template-columns: repeat(var(--hi-heatmap-cols, 53), minmax(0, 1fr));
  gap: 3px;
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 0.66rem;
  color: var(--hi-text-secondary);
  font-family: "Fira Code", monospace;
}

.theme-hacker-ins .hi-heatmap-month {
  opacity: 0.9;
}

.theme-hacker-ins .hi-heatmap-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 8px);
  grid-auto-columns: 8px;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.theme-hacker-ins .hi-heatmap-cell {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.theme-hacker-ins .hi-heatmap-cell[data-level="1"] { background: rgba(34, 211, 197, 0.28); border-color: rgba(34, 211, 197, 0.24); }
.theme-hacker-ins .hi-heatmap-cell[data-level="2"] { background: rgba(34, 211, 197, 0.42); border-color: rgba(34, 211, 197, 0.3); }
.theme-hacker-ins .hi-heatmap-cell[data-level="3"] { background: rgba(34, 211, 197, 0.58); border-color: rgba(34, 211, 197, 0.4); }
.theme-hacker-ins .hi-heatmap-cell[data-level="4"] { background: rgba(0, 255, 136, 0.72); border-color: rgba(0, 255, 136, 0.54); }

.theme-hacker-ins .hi-heatmap-legend {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--hi-text-secondary);
}

.theme-hacker-ins .hi-heatmap-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.theme-hacker-ins .hi-heatmap-legend i:nth-of-type(1) { background: rgba(148, 163, 184, 0.22); }
.theme-hacker-ins .hi-heatmap-legend i:nth-of-type(2) { background: rgba(34, 211, 197, 0.28); }
.theme-hacker-ins .hi-heatmap-legend i:nth-of-type(3) { background: rgba(34, 211, 197, 0.42); }
.theme-hacker-ins .hi-heatmap-legend i:nth-of-type(4) { background: rgba(34, 211, 197, 0.58); }
.theme-hacker-ins .hi-heatmap-legend i:nth-of-type(5) { background: rgba(0, 255, 136, 0.72); }

.theme-hacker-ins .hi-heatmap-ranges {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  font-size: 0.66rem;
  color: var(--hi-text-secondary);
  font-family: "Fira Code", monospace;
}

.theme-hacker-ins .hi-heatmap-ranges span {
  text-align: center;
  opacity: 0.92;
}


.theme-hacker-ins .hi-home-articles-section #category-filter {
  margin-top: 0.3rem;
}

.theme-hacker-ins .hi-home-archive-section {
  margin-top: clamp(1.2rem, 2.2vw, 2rem);
}

.theme-hacker-ins .hi-archive-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.theme-hacker-ins .hi-archive-panel {
  border: 1px solid var(--hi-border-strong);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(22, 27, 34, 0.62);
}

.theme-hacker-ins .hi-archive-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.theme-hacker-ins .hi-archive-panel-head h3 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 650;
  color: var(--hi-text-primary);
}

.theme-hacker-ins .hi-archive-panel-more {
  font-size: 0.78rem;
  color: var(--hi-neon-cyan) !important;
  text-decoration: none;
}

.theme-hacker-ins .hi-archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.theme-hacker-ins .hi-archive-item-link {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: center;
  text-decoration: none;
}

.theme-hacker-ins .hi-archive-month {
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  color: var(--hi-neon-cyan);
  opacity: 0.95;
}

.theme-hacker-ins .hi-archive-title {
  color: var(--hi-text-secondary);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-hacker-ins .hi-archive-item-link:hover .hi-archive-title {
  color: var(--hi-neon-cyan);
}

.theme-hacker-ins .hi-category-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-hacker-ins .hi-category-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(34, 211, 197, 0.3);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--hi-neon-cyan) !important;
  text-decoration: none;
}

.theme-hacker-ins .hi-category-chip:hover {
  border-color: rgba(34, 211, 197, 0.58);
  box-shadow: 0 0 10px rgba(34, 211, 197, 0.18);
}

.theme-hacker-ins .hi-archive-empty {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--hi-text-secondary);
}

.theme-hacker-ins .hi-home-headline-compact {
  margin-bottom: 0.4rem;
}

.theme-hacker-ins .hi-home-projects-section {
  margin-top: clamp(1.5rem, 2.4vw, 2.2rem);
}

.theme-hacker-ins .hi-home-subscribe-section {
  margin-top: clamp(1.4rem, 2.2vw, 2rem);
}

.theme-hacker-ins .hi-subscribe-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--hi-border-strong);
  border-radius: 12px;
  padding: 14px;
  background: rgba(22, 27, 34, 0.62);
}

.theme-hacker-ins .hi-subscribe-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(34, 211, 197, 0.4);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--hi-neon-cyan) !important;
  text-decoration: none;
  font-family: "Fira Code", monospace;
  font-size: 0.82rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.theme-hacker-ins .hi-subscribe-link:hover {
  border-color: rgba(34, 211, 197, 0.66);
  box-shadow: 0 0 12px rgba(34, 211, 197, 0.2);
  transform: translateY(-1px);
}

.theme-hacker-ins .hi-subscribe-link-alt {
  border-color: rgba(0, 255, 136, 0.42);
  color: var(--hi-neon-green) !important;
}

.theme-hacker-ins .hi-project-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.theme-hacker-ins .hi-project-card {
  border: 1px solid var(--hi-border-strong);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(22, 27, 34, 0.62);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.theme-hacker-ins .hi-project-card:hover {
  border-color: rgba(34, 211, 197, 0.44);
  box-shadow: 0 0 18px var(--hi-glow-cyan-soft);
  transform: translateY(-1px);
}

.theme-hacker-ins .hi-project-title {
  display: inline-block;
  margin: 0 0 0.3rem;
  color: var(--hi-text-primary) !important;
  font-weight: 650;
  font-size: 1.03rem;
  text-decoration: none;
}

.theme-hacker-ins .hi-project-title:hover {
  color: var(--hi-neon-cyan) !important;
}

.theme-hacker-ins .hi-project-excerpt {
  margin: 0;
  color: var(--hi-text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.theme-hacker-ins .hi-project-meta {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-hacker-ins .hi-project-tag {
  border: 1px solid rgba(34, 211, 197, 0.3);
  color: var(--hi-neon-cyan);
  border-radius: 999px;
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  padding: 2px 8px;
}

.theme-hacker-ins .hi-project-visit {
  color: var(--hi-text-secondary);
  font-size: 0.78rem;
  font-family: "Fira Code", monospace;
}

@media (min-width: 768px) {
  .theme-hacker-ins .hi-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .theme-hacker-ins .hi-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-hacker-ins .hi-archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-hacker-ins .hi-heatmap-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

.theme-hacker-ins .code-font,
.theme-hacker-ins [class*="font-mono"],
.theme-hacker-ins #site-title,
.theme-hacker-ins pre,
.theme-hacker-ins code {
  font-family: "Fira Code", monospace;
}

.theme-hacker-ins .hi-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.theme-hacker-ins .hi-hero-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 197, 0.36);
  background:
    linear-gradient(145deg, rgba(14, 24, 36, 0.88), rgba(6, 10, 16, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.24);
  text-decoration: none;
  background-image: none !important;
  background-position: 0 0 !important;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.16s ease,
    background 0.22s ease;
}

.theme-hacker-ins .hi-hero-icon-btn img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.theme-hacker-ins .hi-hero-icon-btn .hi-hero-reader-svg {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(0, 245, 188, 0.32));
  pointer-events: none;
}

.theme-hacker-ins .hi-hero-icon-cloud img {
  filter: drop-shadow(0 0 8px rgba(34, 211, 197, 0.26));
}

.theme-hacker-ins .hi-hero-icon-github img {
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.24));
}

.theme-hacker-ins .hi-hero-icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 197, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 20px rgba(2, 187, 173, 0.18);
}

.theme-hacker-ins .hi-hero-icon-btn:active {
  transform: translateY(0) scale(0.97);
}

.theme-hacker-ins .hi-hero-icon-btn:focus-visible {
  outline: none;
  border-color: rgba(34, 211, 197, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 2px rgba(34, 211, 197, 0.22),
    0 10px 24px rgba(2, 187, 173, 0.24);
}

.theme-hacker-ins .hi-hero-icon-ai img {
  width: 30px;
  height: 30px;
}

html.dark .theme-hacker-ins .hi-hero-icon-btn {
  border-color: rgba(34, 211, 197, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.28);
}

html:not(.dark) .theme-hacker-ins .hi-hero-icon-btn,
html.light .theme-hacker-ins .hi-hero-icon-btn {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 255, 0.92));
  border-color: rgba(16, 21, 29, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 20px rgba(33, 44, 59, 0.12);
}

html:not(.dark) .theme-hacker-ins .hi-hero-icon-btn:hover,
html.light .theme-hacker-ins .hi-hero-icon-btn:hover {
  border-color: rgba(15, 143, 134, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 7px 16px rgba(16, 142, 133, 0.12);
}

html:not(.dark) .theme-hacker-ins .hi-hero-icon-btn:focus-visible,
html.light .theme-hacker-ins .hi-hero-icon-btn:focus-visible {
  border-color: rgba(15, 143, 134, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 2px rgba(15, 143, 134, 0.16),
    0 9px 20px rgba(16, 142, 133, 0.18);
}

@media (max-width: 768px) {
  .theme-hacker-ins .hi-hero-actions {
    gap: 8px;
    margin-top: 10px;
  }

  .theme-hacker-ins .hi-hero-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .theme-hacker-ins .hi-hero-icon-btn img {
    width: 24px;
    height: 24px;
  }

  .theme-hacker-ins .hi-hero-icon-btn .hi-hero-reader-svg {
    width: 24px;
    height: 24px;
  }

  .theme-hacker-ins .hi-hero-icon-ai img {
    width: 26px;
    height: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-hacker-ins .hi-hero-icon-btn {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }

  .theme-hacker-ins .hi-hero-icon-btn:hover,
  .theme-hacker-ins .hi-hero-icon-btn:active {
    transform: none;
  }
}

@keyframes rain {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(120vh);
    opacity: 0;
  }
}

.theme-hacker-ins .code-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

#hi-page-transition {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.025) 0px,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 3px
    ),
    rgba(0, 0, 0, 0.96);
  transition: opacity 0.16s ease;
}

#hi-page-transition.active {
  opacity: 1;
}

#hi-hotkey-help {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
}

#hi-hotkey-help.open {
  display: block;
}

#hi-hotkey-help .hi-hotkey-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
}

#hi-hotkey-help .hi-hotkey-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 520px);
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 197, 0.28);
  background: rgba(8, 12, 18, 0.9);
  box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.16), 0 20px 48px rgba(0, 0, 0, 0.45);
  color: #e7eff7;
  padding: 16px;
}

#hi-hotkey-help .hi-hotkey-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

#hi-hotkey-help h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

#hi-hotkey-help .hi-hotkey-close {
  border: 1px solid rgba(34, 211, 197, 0.36);
  background: transparent;
  color: #9dd8d1;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
}

#hi-hotkey-help .hi-hotkey-tip {
  margin: 0 0 12px;
  color: #9aa9b8;
  font-size: 13px;
}

#hi-hotkey-help .hi-hotkey-tip code {
  font-family: "Fira Code", monospace;
  color: #22d3c5;
}

#hi-hotkey-help .hi-hotkey-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

#hi-hotkey-help .hi-hotkey-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(34, 211, 197, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

#hi-hotkey-help kbd {
  min-width: 28px;
  text-align: center;
  font-family: "Fira Code", monospace;
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 7px;
  border: 1px solid rgba(34, 211, 197, 0.26);
  background: rgba(34, 211, 197, 0.1);
  color: #9ef8ef;
}

#hi-hotkey-help .hi-hotkey-list span {
  color: #d4dde7;
  font-size: 13px;
}

body.theme-hacker-ins.hi-hotkey-armed::after {
  content: "Hotkey prefix armed: Ctrl+Alt+K";
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 125;
  font-family: "Fira Code", monospace;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 197, 0.32);
  background: rgba(5, 9, 14, 0.85);
  color: #9ef8ef;
  box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.12), 0 8px 24px rgba(0, 0, 0, 0.38);
}

#hi-hotkey-fab {
  position: fixed;
  top: calc(var(--hi-header-safe-top, 76px) + 8px);
  right: 14px;
  z-index: 124;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 197, 0.4);
  background: rgba(6, 10, 16, 0.82);
  color: #9ef8ef;
  font-family: "Fira Code", monospace;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.12), 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#hi-hotkey-fab:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 255, 136, 0.62);
  box-shadow: 0 0 0 1px rgba(0, 255, 136, 0.2), 0 10px 24px rgba(0, 0, 0, 0.42), 0 0 18px rgba(0, 255, 136, 0.26);
}

#hi-hotkey-fab:active {
  transform: translateY(1px) scale(0.96);
}

html:not(.dark) .theme-hacker-ins #hi-hotkey-fab,
html.light .theme-hacker-ins #hi-hotkey-fab {
  border-color: rgba(32, 48, 68, 0.16);
  background:
    radial-gradient(120% 120% at 25% 20%, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.52) 38%, rgba(245, 248, 255, 0.4) 100%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(244, 248, 255, 0.64));
  color: #314a68;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    0 0 0 1px rgba(32, 48, 68, 0.05),
    0 8px 18px rgba(32, 48, 68, 0.12);
}

html:not(.dark) .theme-hacker-ins #hi-hotkey-fab:hover,
html.light .theme-hacker-ins #hi-hotkey-fab:hover {
  border-color: rgba(176, 97, 141, 0.36);
  color: #6e2850;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 0 0 1px rgba(176, 97, 141, 0.14),
    0 10px 22px rgba(32, 48, 68, 0.16),
    0 0 14px rgba(232, 160, 191, 0.2);
}

html:not(.dark) .theme-hacker-ins #hi-hotkey-fab:active,
html.light .theme-hacker-ins #hi-hotkey-fab:active {
  border-color: rgba(176, 97, 141, 0.3);
  color: #6a234b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 0 0 1px rgba(176, 97, 141, 0.1),
    0 6px 14px rgba(32, 48, 68, 0.12);
}

html:not(.dark) .theme-hacker-ins #hi-hotkey-fab:focus-visible,
html.light .theme-hacker-ins #hi-hotkey-fab:focus-visible {
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 0 0 1px rgba(176, 97, 141, 0.2),
    0 0 0 3px rgba(232, 160, 191, 0.18),
    0 10px 22px rgba(32, 48, 68, 0.16);
}

.theme-hacker-ins .hi-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
}

html.dark .theme-hacker-ins .hi-search-trigger {
  border-color: rgba(34, 211, 197, 0.24);
  background: rgba(6, 10, 16, 0.44);
  box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.08);
}

html.dark .theme-hacker-ins .hi-search-trigger:hover {
  border-color: rgba(0, 255, 136, 0.46);
  box-shadow: 0 0 0 1px rgba(0, 255, 136, 0.16), 0 0 16px rgba(34, 211, 197, 0.2);
}

html:not(.dark) .theme-hacker-ins .hi-search-trigger,
html.light .theme-hacker-ins .hi-search-trigger {
  border-color: rgba(16, 21, 29, 0.16);
  background: rgba(255, 255, 255, 0.82);
}

html:not(.dark) .theme-hacker-ins .hi-search-trigger:hover,
html.light .theme-hacker-ins .hi-search-trigger:hover {
  border-color: rgba(192, 95, 142, 0.42);
  box-shadow: 0 0 0 1px rgba(192, 95, 142, 0.14), 0 0 14px rgba(232, 160, 191, 0.2);
}

/* Search modal/input cyber skin (if plugin DOM matches common ids/classes) */
#search-widget-modal,
.search-widget-modal,
#search-widget,
.search-widget {
  backdrop-filter: blur(8px);
  z-index: 170 !important;
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--hi-header-safe-top, 76px) + 18px) !important;
  box-sizing: border-box;
}

#search-widget-modal .bg-white,
.search-widget-modal .bg-white,
#search-widget .bg-white,
.search-widget .bg-white {
  border-radius: 14px !important;
  margin-top: 0 !important;
}

#search-widget-modal .bg-white,
.search-widget-modal .bg-white,
#search-widget .bg-white,
.search-widget .bg-white,
#search-widget-modal [class*="max-w-"],
.search-widget-modal [class*="max-w-"],
#search-widget [class*="max-w-"],
.search-widget [class*="max-w-"] {
  margin-top: 0 !important;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--hi-header-safe-top, 76px) - 28px) !important;
  overflow: auto;
}

#search-widget-modal > div,
.search-widget-modal > div,
#search-widget > div,
.search-widget > div {
  margin-top: 0 !important;
}

html.dark #search-widget-modal .bg-white,
html.dark .search-widget-modal .bg-white,
html.dark #search-widget .bg-white,
html.dark .search-widget .bg-white {
  background: rgba(7, 11, 17, 0.92) !important;
  border: 1px solid rgba(34, 211, 197, 0.3);
  box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.14), 0 24px 42px rgba(0, 0, 0, 0.45);
}

html.dark #search-widget-modal input,
html.dark .search-widget-modal input,
html.dark #search-widget input,
html.dark .search-widget input {
  background: rgba(2, 6, 12, 0.82) !important;
  border: 1px solid rgba(34, 211, 197, 0.32) !important;
  color: #e8eef4 !important;
}

html:not(.dark) #search-widget-modal .bg-white,
html:not(.dark) .search-widget-modal .bg-white,
html:not(.dark) #search-widget .bg-white,
html:not(.dark) .search-widget .bg-white,
html.light #search-widget-modal .bg-white,
html.light .search-widget-modal .bg-white,
html.light #search-widget .bg-white,
html.light .search-widget .bg-white {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(16, 21, 29, 0.14);
  box-shadow: 0 20px 36px rgba(16, 21, 29, 0.14);
}

html:not(.dark) #search-widget-modal input,
html:not(.dark) .search-widget-modal input,
html:not(.dark) #search-widget input,
html:not(.dark) .search-widget input,
html.light #search-widget-modal input,
html.light .search-widget-modal input,
html.light #search-widget input,
html.light .search-widget input {
  background: #ffffff !important;
  border: 1px solid rgba(16, 21, 29, 0.2) !important;
  color: #0f1722 !important;
}

#hi-cursor-dot,
#hi-cursor-ring {
  position: fixed;
  left: -100px;
  top: -100px;
  pointer-events: none;
  z-index: 140;
  opacity: 0;
  transition: opacity 0.12s ease-out, transform 0.14s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.16s ease, box-shadow 0.16s ease;
  will-change: left, top, transform, opacity;
}

#hi-cursor-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--hi-neon-cyan);
  box-shadow: 0 0 10px rgba(34, 211, 197, 0.55);
  transform: translate(-50%, -50%);
}

#hi-cursor-ring {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 197, 0.5);
  box-shadow: 0 0 18px rgba(34, 211, 197, 0.24);
  transform: translate(-50%, -50%);
}

#hi-cursor-ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 197, 0.22);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#hi-cursor-dot.visible,
#hi-cursor-ring.visible {
  opacity: 1;
}

#hi-cursor-dot.hi-cursor-soft-restore,
#hi-cursor-ring.hi-cursor-soft-restore {
  transition: opacity 0.2s ease-out, transform 0.14s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.16s ease, box-shadow 0.16s ease;
}

body.theme-hacker-ins.hi-cursor-refreshing #hi-cursor-dot,
body.theme-hacker-ins.hi-cursor-refreshing #hi-cursor-ring {
  transition: opacity 0.2s ease-out, transform 0.14s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.16s ease, box-shadow 0.16s ease;
}

#hi-cursor-dot.press {
  transform: translate(-50%, -50%) scale(1.36);
  box-shadow: 0 0 16px rgba(34, 211, 197, 0.78), 0 0 26px rgba(0, 255, 136, 0.32);
}

#hi-cursor-ring.press {
  transform: translate(-50%, -50%) scale(0.82);
  border-color: rgba(0, 255, 136, 0.82);
  box-shadow: 0 0 22px rgba(0, 255, 136, 0.36), 0 0 36px rgba(34, 211, 197, 0.2);
}

#hi-cursor-dot.press,
#hi-cursor-ring.press {
  transition-duration: 0.09s;
  transition-timing-function: cubic-bezier(0.2, 0.9, 0.26, 1.08);
}

#hi-cursor-dot.click {
  animation: hi-cursor-dot-click 0.2s cubic-bezier(0.2, 0.9, 0.26, 1.08);
}

#hi-cursor-ring.click {
  animation: hi-cursor-ring-click 0.22s cubic-bezier(0.2, 0.9, 0.26, 1.08);
}

#hi-cursor-ring.hover {
  width: 34px;
  height: 34px;
  border-color: rgba(0, 255, 136, 0.75);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.26);
}

body.theme-hacker-ins.hi-cursor-aggressive #hi-cursor-dot {
  width: 7px;
  height: 7px;
  background: #00ff88;
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.72), 0 0 26px rgba(34, 211, 197, 0.4);
}

body.theme-hacker-ins.hi-cursor-aggressive #hi-cursor-ring {
  width: 30px;
  height: 30px;
  border-color: rgba(0, 255, 136, 0.85);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.3), 0 0 46px rgba(34, 211, 197, 0.2);
}

body.theme-hacker-ins.hi-cursor-aggressive #hi-cursor-ring::after {
  opacity: 1;
  transform: scale(1.08);
}

body.theme-hacker-ins.hi-cursor-aggressive #hi-cursor-ring.hover {
  width: 40px;
  height: 40px;
  box-shadow: 0 0 36px rgba(0, 255, 136, 0.38), 0 0 56px rgba(34, 211, 197, 0.24);
}

body.theme-hacker-ins.hi-cursor-aggressive #hi-cursor-dot.press {
  transform: translate(-50%, -50%) scale(1.8);
}

body.theme-hacker-ins.hi-cursor-aggressive #hi-cursor-ring.press {
  transform: translate(-50%, -50%) scale(0.68);
}

body.theme-hacker-ins.hi-cursor-enabled,
body.theme-hacker-ins.hi-cursor-enabled a,
body.theme-hacker-ins.hi-cursor-enabled button {
  cursor: none !important;
}

.theme-hacker-ins .rain-column {
  position: absolute;
  top: -140%;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.12;
  animation: rain 9s linear infinite;
}

.theme-hacker-ins .rain-layer-back {
  filter: blur(0.5px);
  opacity: 0.06;
}

.theme-hacker-ins .rain-layer-front {
  opacity: 0.14;
}

/* Remove home hero background image (e.g. Earth image) */
.theme-hacker-ins section > .bg-cover {
  background-image: none !important;
  background: transparent !important;
}

.theme-hacker-ins > *:not(.code-rain) {
  position: relative;
  z-index: 1;
}

.theme-hacker-ins #header-menu {
  z-index: 45;
}

.theme-hacker-ins #header-menu .nav-counter {
  color: var(--hi-neon-green) !important;
  font-family: "Fira Code", monospace;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.28);
}

/* Showcase-like nav bar: compact terminal glass + neon edge */
.theme-hacker-ins #header-menu {
  position: sticky;
  border-radius: 0;
  margin: 0;
  max-width: none;
  width: 100%;
  border: 1px solid transparent;
  border-top: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  overflow: visible;
}

.theme-hacker-ins #header-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.14;
  background: linear-gradient(90deg, transparent 0%, rgba(34, 211, 197, 0.42) 22%, rgba(232, 160, 191, 0.32) 50%, rgba(34, 211, 197, 0.42) 78%, transparent 100%);
}

.theme-hacker-ins #header-menu .hi-nav-list {
  gap: 10px !important;
}

.theme-hacker-ins #header-menu .hi-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  box-shadow: none;
  background: transparent;
  background-image: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.theme-hacker-ins #header-menu .hi-nav-link.hi-nav-link-active,
.theme-hacker-ins #header-menu .hi-mobile-menu-link.hi-nav-link-active {
  background-image: none !important;
}

.theme-hacker-ins #header-menu .hi-nav-child-link,
.theme-hacker-ins #header-menu .hi-mobile-menu-link,
.theme-hacker-ins #header-menu .hi-mobile-submenu-link,
.theme-hacker-ins #header-menu .hi-nav-tools a,
.theme-hacker-ins #header-menu .hi-nav-tools button,
.theme-hacker-ins #header-menu .hi-nav-tools div[class*="tabler-"],
.theme-hacker-ins #header-menu #site-title {
  background-image: none !important;
}

.theme-hacker-ins #header-menu .hi-nav-dropdown {
  margin-top: 10px;
  border-radius: 12px !important;
  border: 1px solid transparent;
}

.theme-hacker-ins #header-menu .hi-mobile-menu-panel {
  border-radius: 14px !important;
  border: 1px solid transparent;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.theme-hacker-ins #header-menu .hi-mobile-menu-link {
  border-radius: 10px;
  padding: 8px 10px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}

.theme-hacker-ins #header-menu .hi-mobile-submenu-link {
  border-radius: 8px;
}

/* Responsive header/nav/search hardening: prevent overlap on narrow widths */
.theme-hacker-ins {
  --hi-header-safe-top: clamp(74px, 8vh, 106px);
  --hi-toc-bottom-safe-gap: clamp(98px, 11vh, 146px);
  --hi-footer-safe-gap: 0px;
  --hi-footer-avoid-offset: 0px;
  --hi-top-btn-base-bottom: 2.5rem;
  --hi-top-btn-mobile-base-bottom: calc(env(safe-area-inset-bottom, 0px) + 70px);
}

html,
body {
  overscroll-behavior-y: none;
}

body.theme-hacker-ins::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: max(18px, env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  z-index: 0;
}

.theme-hacker-ins #header-menu .hi-header-inner {
  min-width: 0;
  gap: clamp(8px, 1.4vw, 16px);
}

.theme-hacker-ins #header-menu .hi-header-main {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.theme-hacker-ins #header-menu #site-title.hi-site-title-text {
  display: inline-block;
  max-width: min(28vw, 260px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-hacker-ins #header-menu .hi-nav-list {
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.theme-hacker-ins #header-menu .hi-nav-list::-webkit-scrollbar {
  height: 4px;
}

.theme-hacker-ins #header-menu .hi-header-tools {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding-left: 6px;
}

/* Keep search modal panel away from header/footer bars on all devices */
#search-widget-modal .bg-white,
.search-widget-modal .bg-white,
#search-widget .bg-white,
.search-widget .bg-white,
#search-widget-modal [class*="max-w-"],
.search-widget-modal [class*="max-w-"],
#search-widget [class*="max-w-"],
.search-widget [class*="max-w-"] {
  width: min(92vw, 780px);
  margin-left: auto;
  margin-right: auto;
}

/* Post TOC: sticky shell + internal scrolling area with top/bottom safety gaps */
.theme-hacker-ins .toc-container.hi-post-toc-shell {
  position: relative;
  top: 0 !important;
  max-height: none !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 8px;
}

.theme-hacker-ins .toc-container.hi-post-toc-shell .hi-post-toc-title {
  flex: 0 0 auto;
}

.theme-hacker-ins .toc-container.hi-post-toc-shell .hi-post-toc-viewport {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin-top: 6px;
}

.theme-hacker-ins .toc-container.hi-post-toc-shell .hi-post-toc-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow: auto;
  padding-right: 6px;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.theme-hacker-ins .toc-container.hi-post-toc-shell .hi-post-toc-scroll::-webkit-scrollbar {
  width: 6px;
}

.theme-hacker-ins .toc-container.hi-post-toc-shell .hi-post-toc-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.theme-hacker-ins .toc-container.hi-post-toc-shell .hi-post-toc-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
}

.theme-hacker-ins #btn-scroll-to-top {
  bottom: calc(var(--hi-top-btn-base-bottom) + var(--hi-footer-avoid-offset)) !important;
}

@media (max-width: 1200px) {
  .theme-hacker-ins #header-menu #site-title.hi-site-title-text {
    max-width: min(20vw, 180px);
  }
}

@media (max-width: 1024px) {
  .theme-hacker-ins {
    --hi-header-safe-top: clamp(72px, 9vh, 98px);
    --hi-toc-bottom-safe-gap: clamp(90px, 10vh, 128px);
  }

  .theme-hacker-ins #header-menu .hi-nav-list {
    gap: 8px !important;
  }

  .theme-hacker-ins #header-menu .hi-nav-link {
    padding: 6px 8px;
  }
}

@media (max-width: 768px) {
  .theme-hacker-ins {
    --hi-top-btn-base-bottom: var(--hi-top-btn-mobile-base-bottom);
  }

  #search-widget-modal .bg-white,
  .search-widget-modal .bg-white,
  #search-widget .bg-white,
  .search-widget .bg-white,
  #search-widget-modal [class*="max-w-"],
  .search-widget-modal [class*="max-w-"],
  #search-widget [class*="max-w-"],
  .search-widget [class*="max-w-"] {
    width: min(96vw, 640px);
    margin-top: 0 !important;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--hi-header-safe-top, 76px) - 24px) !important;
  }

  .theme-hacker-ins #header-menu #site-title.hi-site-title-text {
    max-width: min(44vw, 180px);
  }

  .theme-hacker-ins .toc-container.hi-post-toc-shell {
    position: relative;
    top: 0 !important;
    max-height: none !important;
    padding-bottom: 0;
  }

  .theme-hacker-ins .toc-container.hi-post-toc-shell .hi-post-toc-viewport {
    overflow: visible;
    margin-top: 2px;
  }

  .theme-hacker-ins .toc-container.hi-post-toc-shell .hi-post-toc-scroll {
    max-height: 44dvh !important;
  }
}

@media (min-width: 769px) {
  .theme-hacker-ins #header-menu .hi-header-inner {
    max-width: none !important;
    width: 100%;
    padding-left: clamp(12px, 2vw, 26px) !important;
    padding-right: clamp(12px, 2vw, 26px) !important;
  }

  .theme-hacker-ins #header-menu .hi-header-main {
    gap: clamp(10px, 1.5vw, 20px);
  }

  #search-widget-modal .bg-white,
  .search-widget-modal .bg-white,
  #search-widget .bg-white,
  .search-widget .bg-white,
  #search-widget-modal [class*="max-w-"],
  .search-widget-modal [class*="max-w-"],
  #search-widget [class*="max-w-"],
  .search-widget [class*="max-w-"] {
    margin-top: 0 !important;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - var(--hi-header-safe-top, 76px) - 30px) !important;
  }
}

html.dark .theme-hacker-ins {
  --hi-bg: #050608;
  --hi-bg-elevated: rgba(8, 11, 16, 0.78);
  --hi-bg-card: rgba(13, 17, 24, 0.72);
  --hi-text: #e8eef4;
  --hi-muted: #92a0af;
  background: #000 !important;
  color: var(--hi-text) !important;
}

html.dark,
html.dark body.theme-hacker-ins {
  background: #050608 !important;
}

html.dark body.theme-hacker-ins::after {
  background: #050608;
}

html.dark .theme-hacker-ins .rain-column {
  color: var(--hi-neon-green);
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.25);
}

html.dark .theme-hacker-ins .rain-layer-back {
  color: var(--hi-neon-cyan);
  text-shadow: 0 0 10px rgba(34, 211, 197, 0.2);
  opacity: 0.065;
}

html.dark .theme-hacker-ins .rain-layer-front {
  color: var(--hi-neon-green);
  text-shadow: 0 0 14px rgba(0, 255, 136, 0.3);
  opacity: 0.14;
}

html:not(.dark) .theme-hacker-ins,
html.light .theme-hacker-ins {
  --hi-bg: #ffffff;
  --hi-bg-elevated: rgba(255, 255, 255, 0.76);
  --hi-bg-card: rgba(255, 255, 255, 0.7);
  --hi-text: #10151d;
  --hi-muted: #4c5563;
  background: #fff !important;
  color: var(--hi-text) !important;
}

html:not(.dark),
html.light,
html:not(.dark) body.theme-hacker-ins,
html.light body.theme-hacker-ins {
  background: #ffffff !important;
}

html:not(.dark) body.theme-hacker-ins::after,
html.light body.theme-hacker-ins::after {
  background: #ffffff;
}

html:not(.dark) .theme-hacker-ins .rain-column,
html.light .theme-hacker-ins .rain-column {
  color: var(--hi-neon-pink);
  text-shadow: 0 0 10px rgba(232, 160, 191, 0.28);
}

html:not(.dark) .theme-hacker-ins .rain-layer-back,
html.light .theme-hacker-ins .rain-layer-back {
  color: #d37baa;
  opacity: 0.055;
}

html:not(.dark) .theme-hacker-ins .rain-layer-front,
html.light .theme-hacker-ins .rain-layer-front {
  color: var(--hi-neon-pink);
  opacity: 0.13;
}

/* Keep footer pinned and fully opaque at viewport bottom */
.theme-hacker-ins footer {
  margin-top: auto !important;
  margin-bottom: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  flex-shrink: 0;
  width: 100%;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.theme-hacker-ins footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: max(18px, env(safe-area-inset-bottom, 0px));
  background: inherit;
  border: 0 !important;
  pointer-events: none;
}

body.theme-hacker-ins > main {
  flex: 1 0 auto;
  padding-bottom: clamp(1.5rem, 2.8vw, 2.4rem);
}

.theme-hacker-ins #header-menu,
.theme-hacker-ins .menu-dropdown,
.theme-hacker-ins .fixed.inset-x-4.top-8.rounded-lg,
.theme-hacker-ins .rounded-xl.bg-white,
.theme-hacker-ins .dark\:bg-slate-800,
.theme-hacker-ins .group.flex.flex-col.overflow-hidden.rounded-xl,
.theme-hacker-ins .group.grid.cursor-pointer.grid-cols-1.overflow-hidden.rounded-xl,
.theme-hacker-ins aside > *,
.theme-hacker-ins footer,
.theme-hacker-ins .toc-container,
.theme-hacker-ins .rounded-xl.bg-white.p-4,
.theme-hacker-ins .rounded-xl.bg-white.p-3 {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html.dark .theme-hacker-ins #header-menu {
  background: linear-gradient(180deg, rgba(8, 11, 16, 0.94), rgba(8, 11, 16, 0.78)) !important;
  border-color: rgba(34, 211, 197, 0.24);
  box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.08), 0 12px 34px rgba(0, 0, 0, 0.34);
}

html.dark .theme-hacker-ins #header-menu .hi-nav-link.hi-nav-link-active {
  color: var(--hi-neon-green) !important;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

html.dark .theme-hacker-ins #header-menu .hi-mobile-menu-link.hi-nav-link-active {
  color: #b8fbe0 !important;
  border-color: rgba(0, 255, 136, 0.32);
  background: rgba(12, 20, 28, 0.86);
}

html.dark .theme-hacker-ins #header-menu .hi-nav-link.hi-nav-link-active .nav-counter,
html.dark .theme-hacker-ins #header-menu .hi-mobile-menu-link.hi-nav-link-active .nav-counter {
  text-shadow: 0 0 14px rgba(0, 255, 136, 0.42);
}

html.dark .theme-hacker-ins #header-menu .hi-nav-link {
  color: #d9e5f1 !important;
}

html.dark .theme-hacker-ins #header-menu .hi-nav-link:hover {
  color: var(--hi-neon-cyan) !important;
  border-color: rgba(34, 211, 197, 0.42);
  background: rgba(7, 12, 18, 0.42);
  box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.14), 0 0 12px rgba(34, 211, 197, 0.14);
}

html.dark .theme-hacker-ins #header-menu .hi-nav-dropdown,
html.dark .theme-hacker-ins #header-menu .hi-mobile-menu-panel {
  background: rgba(7, 12, 18, 0.92) !important;
  border-color: rgba(34, 211, 197, 0.26);
}

html.dark .theme-hacker-ins #header-menu .hi-mobile-menu-link:hover,
html.dark .theme-hacker-ins #header-menu .hi-mobile-submenu-link:hover {
  background: rgba(13, 21, 31, 0.86);
  border-color: rgba(34, 211, 197, 0.24);
}

html.dark .theme-hacker-ins footer {
  background: #050608 !important;
  border-top: 1px solid rgba(34, 211, 197, 0.2);
}

html:not(.dark) .theme-hacker-ins #header-menu,
html.light .theme-hacker-ins #header-menu {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.8)) !important;
  border-color: rgba(16, 21, 29, 0.12);
  box-shadow: 0 0 0 1px rgba(16, 21, 29, 0.04), 0 10px 28px rgba(40, 56, 76, 0.14);
}

html:not(.dark) .theme-hacker-ins #header-menu::before,
html.light .theme-hacker-ins #header-menu::before {
  opacity: 0.1;
  background: linear-gradient(90deg, transparent 0%, rgba(192, 95, 142, 0.28) 22%, rgba(16, 143, 134, 0.22) 50%, rgba(192, 95, 142, 0.28) 78%, transparent 100%);
}

html:not(.dark) .theme-hacker-ins #header-menu .hi-nav-link.hi-nav-link-active,
html.light .theme-hacker-ins #header-menu .hi-nav-link.hi-nav-link-active {
  color: #0f8f86 !important;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

html:not(.dark) .theme-hacker-ins #header-menu .hi-mobile-menu-link.hi-nav-link-active,
html.light .theme-hacker-ins #header-menu .hi-mobile-menu-link.hi-nav-link-active {
  color: #0f8f86 !important;
  border-color: rgba(192, 95, 142, 0.28);
  background: rgba(250, 253, 255, 0.92);
}

html:not(.dark) .theme-hacker-ins #header-menu .hi-nav-link,
html.light .theme-hacker-ins #header-menu .hi-nav-link {
  color: #2b435f !important;
}

html:not(.dark) .theme-hacker-ins #header-menu .hi-nav-link:hover,
html.light .theme-hacker-ins #header-menu .hi-nav-link:hover {
  color: #0f8f86 !important;
  border-color: rgba(192, 95, 142, 0.34);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 0 0 1px rgba(192, 95, 142, 0.1), 0 8px 14px rgba(41, 59, 82, 0.1);
}

html:not(.dark) .theme-hacker-ins #header-menu .hi-nav-dropdown,
html:not(.dark) .theme-hacker-ins #header-menu .hi-mobile-menu-panel,
html.light .theme-hacker-ins #header-menu .hi-nav-dropdown,
html.light .theme-hacker-ins #header-menu .hi-mobile-menu-panel {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(16, 21, 29, 0.14);
}

html:not(.dark) .theme-hacker-ins #header-menu .hi-mobile-menu-link:hover,
html:not(.dark) .theme-hacker-ins #header-menu .hi-mobile-submenu-link:hover,
html.light .theme-hacker-ins #header-menu .hi-mobile-menu-link:hover,
html.light .theme-hacker-ins #header-menu .hi-mobile-submenu-link:hover {
  background: rgba(247, 251, 255, 0.94);
  border-color: rgba(192, 95, 142, 0.3);
}

html:not(.dark) .theme-hacker-ins footer,
html.light .theme-hacker-ins footer {
  background: #ffffff !important;
  border-top: 1px solid rgba(16, 21, 29, 0.14);
}

/* Light mode contrast fix for homepage info blocks */
html:not(.dark) .theme-hacker-ins .hi-stat-card,
html.light .theme-hacker-ins .hi-stat-card,
html:not(.dark) .theme-hacker-ins .hi-subscribe-card,
html.light .theme-hacker-ins .hi-subscribe-card,
html:not(.dark) .theme-hacker-ins .hi-project-card,
html.light .theme-hacker-ins .hi-project-card {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(16, 21, 29, 0.16) !important;
  box-shadow: 0 8px 20px rgba(33, 44, 59, 0.08);
}

html:not(.dark) .theme-hacker-ins .hi-stat-card:hover,
html.light .theme-hacker-ins .hi-stat-card:hover,
html:not(.dark) .theme-hacker-ins .hi-subscribe-card:hover,
html.light .theme-hacker-ins .hi-subscribe-card:hover,
html:not(.dark) .theme-hacker-ins .hi-project-card:hover,
html.light .theme-hacker-ins .hi-project-card:hover {
  border-color: rgba(15, 143, 134, 0.3) !important;
  box-shadow: 0 10px 22px rgba(16, 142, 133, 0.12);
}

html:not(.dark) .theme-hacker-ins .hi-subscribe-link,
html.light .theme-hacker-ins .hi-subscribe-link {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 143, 134, 0.28);
  color: #0f8f86 !important;
}

html:not(.dark) .theme-hacker-ins .hi-subscribe-link:hover,
html.light .theme-hacker-ins .hi-subscribe-link:hover {
  border-color: rgba(15, 143, 134, 0.4);
  box-shadow: 0 0 10px rgba(16, 142, 133, 0.14);
}

html:not(.dark) .theme-hacker-ins .hi-subscribe-link-alt,
html.light .theme-hacker-ins .hi-subscribe-link-alt {
  border-color: rgba(84, 95, 114, 0.28);
  color: #31527a !important;
}

html:not(.dark) .theme-hacker-ins .hi-project-title,
html.light .theme-hacker-ins .hi-project-title {
  color: #0f1722 !important;
}

html:not(.dark) .theme-hacker-ins .hi-project-excerpt,
html:not(.dark) .theme-hacker-ins .hi-project-visit,
html.light .theme-hacker-ins .hi-project-excerpt,
html.light .theme-hacker-ins .hi-project-visit {
  color: #4c5563;
}

html:not(.dark) .theme-hacker-ins .hi-archive-panel,
html.light .theme-hacker-ins .hi-archive-panel {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(16, 21, 29, 0.16);
  box-shadow: 0 8px 20px rgba(33, 44, 59, 0.08);
}

html:not(.dark) .theme-hacker-ins .hi-archive-panel-head h3,
html.light .theme-hacker-ins .hi-archive-panel-head h3 {
  color: #0f1722;
}

html:not(.dark) .theme-hacker-ins .hi-archive-title,
html.light .theme-hacker-ins .hi-archive-title,
html:not(.dark) .theme-hacker-ins .hi-archive-empty,
html.light .theme-hacker-ins .hi-archive-empty {
  color: #4c5563;
}

html:not(.dark) .theme-hacker-ins .hi-archive-item-link:hover .hi-archive-title,
html.light .theme-hacker-ins .hi-archive-item-link:hover .hi-archive-title {
  color: #0f8f86;
}

html:not(.dark) .theme-hacker-ins .hi-category-chip,
html.light .theme-hacker-ins .hi-category-chip {
  border-color: rgba(15, 143, 134, 0.26);
  color: #0f8f86 !important;
  background: rgba(255, 255, 255, 0.82);
}

html:not(.dark) .theme-hacker-ins .hi-heatmap-card,
html.light .theme-hacker-ins .hi-heatmap-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(16, 21, 29, 0.16);
  box-shadow: 0 8px 20px rgba(33, 44, 59, 0.08);
}

html:not(.dark) .theme-hacker-ins .hi-reading-chart-card,
html.light .theme-hacker-ins .hi-reading-chart-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(16, 21, 29, 0.16);
  box-shadow: 0 8px 20px rgba(33, 44, 59, 0.08);
}


html:not(.dark) .theme-hacker-ins .hi-heatmap-head h3,
html.light .theme-hacker-ins .hi-heatmap-head h3 {
  color: #0f1722;
}

html:not(.dark) .theme-hacker-ins .hi-heatmap-head p,
html:not(.dark) .theme-hacker-ins .hi-heatmap-months,
html:not(.dark) .theme-hacker-ins .hi-heatmap-legend,
html:not(.dark) .theme-hacker-ins .hi-heatmap-ranges,
html.light .theme-hacker-ins .hi-heatmap-head p,
html.light .theme-hacker-ins .hi-heatmap-months,
html.light .theme-hacker-ins .hi-heatmap-legend,
html.light .theme-hacker-ins .hi-heatmap-ranges {
  color: #4c5563;
}

html:not(.dark) .theme-hacker-ins .hi-heatmap-cell,
html.light .theme-hacker-ins .hi-heatmap-cell {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.2);
}

html:not(.dark) .theme-hacker-ins .hi-heatmap-cell[data-level="1"],
html.light .theme-hacker-ins .hi-heatmap-cell[data-level="1"] {
  background: #d8f3ec;
  border-color: #b7e9de;
}

html:not(.dark) .theme-hacker-ins .hi-heatmap-cell[data-level="2"],
html.light .theme-hacker-ins .hi-heatmap-cell[data-level="2"] {
  background: #b7ebde;
  border-color: #8ddfcd;
}

html:not(.dark) .theme-hacker-ins .hi-heatmap-cell[data-level="3"],
html.light .theme-hacker-ins .hi-heatmap-cell[data-level="3"] {
  background: #76d9c4;
  border-color: #4ecab0;
}

html:not(.dark) .theme-hacker-ins .hi-heatmap-cell[data-level="4"],
html.light .theme-hacker-ins .hi-heatmap-cell[data-level="4"] {
  background: #15b39f;
  border-color: #109786;
}


html.dark .theme-hacker-ins #site-title {
  color: #f5f8fb !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
}

html:not(.dark) .theme-hacker-ins #site-title,
html.light .theme-hacker-ins #site-title {
  color: #0b0f14 !important;
  font-weight: 700 !important;
}

.theme-hacker-ins a,
.theme-hacker-ins .hover\:text-blue-600:hover {
  transition: color 0.2s ease, text-shadow 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-hacker-ins a {
  background-image: linear-gradient(
    100deg,
    transparent 0%,
    transparent 42%,
    rgba(34, 211, 197, 0.22) 50%,
    rgba(232, 160, 191, 0.2) 54%,
    transparent 62%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 220% 100%;
  background-position: 120% 0;
  transition: background-position 0.36s ease, color 0.2s ease, text-shadow 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

html.dark .theme-hacker-ins a:hover {
  color: var(--hi-neon-cyan) !important;
  text-shadow: 0 0 14px rgba(34, 211, 197, 0.22);
}

html:not(.dark) .theme-hacker-ins a:hover,
html.light .theme-hacker-ins a:hover {
  color: #0d9488 !important;
}

.theme-hacker-ins a:hover {
  background-position: -12% 0;
}

html.dark .theme-hacker-ins .rounded-xl.bg-white,
html.dark .theme-hacker-ins .dark\:bg-slate-800,
html.dark .theme-hacker-ins .group.flex.flex-col.overflow-hidden.rounded-xl,
html.dark .theme-hacker-ins .group.grid.cursor-pointer.grid-cols-1.overflow-hidden.rounded-xl,
html.dark .theme-hacker-ins aside > * {
  background: var(--hi-bg-card) !important;
  border: 1px solid var(--hi-border-soft);
  border-radius: var(--hi-radius) !important;
  box-shadow: var(--hi-glow-cyan);
}

html.dark .theme-hacker-ins .rounded-xl.bg-white,
html.dark .theme-hacker-ins .dark\:bg-slate-800,
html.dark .theme-hacker-ins .group.flex.flex-col.overflow-hidden.rounded-xl,
html.dark .theme-hacker-ins .group.grid.cursor-pointer.grid-cols-1.overflow-hidden.rounded-xl,
html.dark .theme-hacker-ins aside > *,
html:not(.dark) .theme-hacker-ins .rounded-xl.bg-white,
html:not(.dark) .theme-hacker-ins .dark\:bg-slate-800,
html:not(.dark) .theme-hacker-ins .group.flex.flex-col.overflow-hidden.rounded-xl,
html:not(.dark) .theme-hacker-ins .group.grid.cursor-pointer.grid-cols-1.overflow-hidden.rounded-xl,
html:not(.dark) .theme-hacker-ins aside > *,
html.light .theme-hacker-ins .rounded-xl.bg-white,
html.light .theme-hacker-ins .dark\:bg-slate-800,
html.light .theme-hacker-ins .group.flex.flex-col.overflow-hidden.rounded-xl,
html.light .theme-hacker-ins .group.grid.cursor-pointer.grid-cols-1.overflow-hidden.rounded-xl,
html.light .theme-hacker-ins aside > * {
  position: relative;
  overflow: hidden;
}

html.dark .theme-hacker-ins .rounded-xl.bg-white::after,
html.dark .theme-hacker-ins .dark\:bg-slate-800::after,
html.dark .theme-hacker-ins .group.flex.flex-col.overflow-hidden.rounded-xl::after,
html.dark .theme-hacker-ins .group.grid.cursor-pointer.grid-cols-1.overflow-hidden.rounded-xl::after,
html.dark .theme-hacker-ins aside > *::after,
html:not(.dark) .theme-hacker-ins .rounded-xl.bg-white::after,
html:not(.dark) .theme-hacker-ins .dark\:bg-slate-800::after,
html:not(.dark) .theme-hacker-ins .group.flex.flex-col.overflow-hidden.rounded-xl::after,
html:not(.dark) .theme-hacker-ins .group.grid.cursor-pointer.grid-cols-1.overflow-hidden.rounded-xl::after,
html:not(.dark) .theme-hacker-ins aside > *::after,
html.light .theme-hacker-ins .rounded-xl.bg-white::after,
html.light .theme-hacker-ins .dark\:bg-slate-800::after,
html.light .theme-hacker-ins .group.flex.flex-col.overflow-hidden.rounded-xl::after,
html.light .theme-hacker-ins .group.grid.cursor-pointer.grid-cols-1.overflow-hidden.rounded-xl::after,
html.light .theme-hacker-ins aside > *::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image:
    linear-gradient(to right, rgba(34, 211, 197, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 211, 197, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 12% 15%, rgba(34, 211, 197, 0.08) 1px, transparent 2px),
    radial-gradient(circle at 84% 72%, rgba(232, 160, 191, 0.08) 1px, transparent 2px);
  background-size: 22px 22px, 22px 22px, 120px 120px, 140px 140px;
  opacity: 0.12;
  transition: opacity 0.25s ease;
}

html:not(.dark) .theme-hacker-ins .rounded-xl.bg-white,
html:not(.dark) .theme-hacker-ins .dark\:bg-slate-800,
html:not(.dark) .theme-hacker-ins .group.flex.flex-col.overflow-hidden.rounded-xl,
html:not(.dark) .theme-hacker-ins .group.grid.cursor-pointer.grid-cols-1.overflow-hidden.rounded-xl,
html:not(.dark) .theme-hacker-ins aside > *,
html.light .theme-hacker-ins .rounded-xl.bg-white,
html.light .theme-hacker-ins .dark\:bg-slate-800,
html.light .theme-hacker-ins .group.flex.flex-col.overflow-hidden.rounded-xl,
html.light .theme-hacker-ins .group.grid.cursor-pointer.grid-cols-1.overflow-hidden.rounded-xl,
html.light .theme-hacker-ins aside > * {
  background: rgba(255, 255, 255, 0.76) !important;
  border: 1px solid rgba(16, 21, 29, 0.12);
  border-radius: var(--hi-radius) !important;
  box-shadow: 0 10px 28px rgba(16, 21, 29, 0.08);
}

html.dark .theme-hacker-ins .rounded-xl.bg-white:hover,
html.dark .theme-hacker-ins .group:hover {
  box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.35), 0 0 36px rgba(34, 211, 197, 0.18);
}

html:not(.dark) .theme-hacker-ins .rounded-xl.bg-white:hover,
html:not(.dark) .theme-hacker-ins .group:hover,
html.light .theme-hacker-ins .rounded-xl.bg-white:hover,
html.light .theme-hacker-ins .group:hover {
  box-shadow: var(--hi-glow-pink);
}

html.dark .theme-hacker-ins .rounded-xl.bg-white:hover::after,
html.dark .theme-hacker-ins .group:hover::after,
html.dark .theme-hacker-ins aside > *:hover::after,
html:not(.dark) .theme-hacker-ins .rounded-xl.bg-white:hover::after,
html:not(.dark) .theme-hacker-ins .group:hover::after,
html:not(.dark) .theme-hacker-ins aside > *:hover::after,
html.light .theme-hacker-ins .rounded-xl.bg-white:hover::after,
html.light .theme-hacker-ins .group:hover::after,
html.light .theme-hacker-ins aside > *:hover::after {
  opacity: 0.24;
}

html.dark .theme-hacker-ins .text-gray-900,
html.dark .theme-hacker-ins .dark\:text-slate-50,
html.dark .theme-hacker-ins .dark\:text-slate-100 {
  color: var(--hi-text) !important;
}

html.dark .theme-hacker-ins .text-gray-600,
html.dark .theme-hacker-ins .text-gray-500,
html.dark .theme-hacker-ins .dark\:text-slate-300,
html.dark .theme-hacker-ins .dark\:text-slate-200,
html.dark .theme-hacker-ins .dark\:text-slate-500 {
  color: var(--hi-muted) !important;
}

html:not(.dark) .theme-hacker-ins .text-gray-900,
html:not(.dark) .theme-hacker-ins .dark\:text-slate-50,
html:not(.dark) .theme-hacker-ins .dark\:text-slate-100,
html.light .theme-hacker-ins .text-gray-900,
html.light .theme-hacker-ins .dark\:text-slate-50,
html.light .theme-hacker-ins .dark\:text-slate-100 {
  color: #0f1722 !important;
}

html:not(.dark) .theme-hacker-ins .text-gray-600,
html:not(.dark) .theme-hacker-ins .text-gray-500,
html:not(.dark) .theme-hacker-ins .dark\:text-slate-300,
html:not(.dark) .theme-hacker-ins .dark\:text-slate-200,
html.light .theme-hacker-ins .text-gray-600,
html.light .theme-hacker-ins .text-gray-500,
html.light .theme-hacker-ins .dark\:text-slate-300,
html.light .theme-hacker-ins .dark\:text-slate-200 {
  color: #4c5563 !important;
}

html.dark .theme-hacker-ins .hi-hero-title,
html.dark .theme-hacker-ins .hi-hero-subtitle {
  color: #f1f7ff !important;
  font-weight: 700 !important;
  text-shadow: 0 0 18px rgba(34, 211, 197, 0.24);
}

html:not(.dark) .theme-hacker-ins .hi-hero-title,
html:not(.dark) .theme-hacker-ins .hi-hero-subtitle,
html.light .theme-hacker-ins .hi-hero-title,
html.light .theme-hacker-ins .hi-hero-subtitle {
  color: #111827 !important;
  font-weight: 700 !important;
}

html.dark .theme-hacker-ins .markdown-body pre,
html.dark .theme-hacker-ins .markdown-body code {
  background: rgba(2, 6, 12, 0.88) !important;
  border: 1px solid rgba(34, 211, 197, 0.22) !important;
  border-radius: var(--hi-radius-sm);
}

html:not(.dark) .theme-hacker-ins .markdown-body pre,
html:not(.dark) .theme-hacker-ins .markdown-body code,
html.light .theme-hacker-ins .markdown-body pre,
html.light .theme-hacker-ins .markdown-body code {
  background: rgba(249, 250, 251, 0.95) !important;
  border: 1px solid rgba(16, 21, 29, 0.14) !important;
  border-radius: var(--hi-radius-sm);
}

html.dark .theme-hacker-ins #btn-scroll-to-top {
  background: rgba(8, 11, 16, 0.9) !important;
  border: 1px solid rgba(34, 211, 197, 0.28);
}

html:not(.dark) .theme-hacker-ins #btn-scroll-to-top,
html.light .theme-hacker-ins #btn-scroll-to-top {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(16, 21, 29, 0.14);
}

html.dark .theme-hacker-ins #btn-scroll-to-top span {
  color: var(--hi-neon-cyan) !important;
}

html:not(.dark) .theme-hacker-ins #btn-scroll-to-top span,
html.light .theme-hacker-ins #btn-scroll-to-top span {
  color: #d26e9d !important;
}

.theme-hacker-ins ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html.dark .theme-hacker-ins ::-webkit-scrollbar-track {
  background: var(--hi-bg-elevated);
}

html.dark .theme-hacker-ins ::-webkit-scrollbar-thumb {
  background: var(--hi-neon-cyan);
  border-radius: 4px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.08) 0px,
      rgba(255, 255, 255, 0.08) 1px,
      rgba(0, 0, 0, 0) 1px,
      rgba(0, 0, 0, 0) 3px
    );
  box-shadow:
    inset 0 0 0 1px rgba(6, 12, 16, 0.28),
    0 0 8px rgba(34, 211, 197, 0.24);
  filter: brightness(0.96) saturate(1.02);
  transition: filter 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

html:not(.dark) .theme-hacker-ins ::-webkit-scrollbar-track,
html.light .theme-hacker-ins ::-webkit-scrollbar-track {
  background: var(--hi-bg-elevated);
}

html:not(.dark) .theme-hacker-ins ::-webkit-scrollbar-thumb,
html.light .theme-hacker-ins ::-webkit-scrollbar-thumb {
  background: var(--hi-neon-cyan);
  border-radius: 4px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.1) 0px,
      rgba(255, 255, 255, 0.1) 1px,
      rgba(0, 0, 0, 0) 1px,
      rgba(0, 0, 0, 0) 3px
    );
  box-shadow:
    inset 0 0 0 1px rgba(6, 12, 16, 0.2),
    0 0 8px rgba(34, 211, 197, 0.18);
  filter: brightness(0.98) saturate(1.02);
  transition: filter 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.theme-hacker-ins ::-webkit-scrollbar-thumb:hover {
  background: var(--hi-neon-green);
  box-shadow:
    inset 0 0 0 1px rgba(4, 10, 8, 0.25),
    0 0 10px rgba(0, 255, 136, 0.28);
  filter: brightness(1.12) saturate(1.1);
}

.theme-hacker-ins ::-webkit-scrollbar-thumb:active {
  filter: brightness(1.2) saturate(1.16);
  box-shadow:
    inset 0 0 0 1px rgba(4, 10, 8, 0.2),
    0 0 12px rgba(0, 255, 136, 0.34);
}

@media (max-width: 768px) {
  .theme-hacker-ins .rain-column {
    font-size: 11px;
    opacity: 0.09;
  }
}

@keyframes hi-caret-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.theme-hacker-ins .hi-terminal-hero {
  width: min(92vw, 920px);
  border-radius: var(--hi-radius);
  overflow: hidden;
  animation: hi-terminal-float 6.8s cubic-bezier(0.25, 0.12, 0.18, 1) infinite;
  position: relative;
}

.theme-hacker-ins .hi-terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-family: "Fira Code", monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 3;
}

.theme-hacker-ins .hi-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.theme-hacker-ins .hi-dot-red {
  background: #ff5f57;
}

.theme-hacker-ins .hi-dot-yellow {
  background: #febc2e;
}

.theme-hacker-ins .hi-dot-green {
  background: #28c840;
}

.theme-hacker-ins .hi-terminal-label {
  margin-left: 8px;
  opacity: 0.78;
}

.theme-hacker-ins .hi-terminal-status {
  margin-left: auto;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  opacity: 0.85;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.theme-hacker-ins .hi-terminal-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--hi-neon-green);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.55);
  animation: hi-online-pulse 1.8s ease-in-out infinite;
}

.theme-hacker-ins .hi-terminal-status.hi-status-tick {
  animation: hi-status-jump 260ms ease-out;
}

.theme-hacker-ins .hi-terminal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px;
  position: relative;
  z-index: 3;
}

.theme-hacker-ins .hi-hero-title,
.theme-hacker-ins .hi-hero-subtitle {
  display: block;
  width: 100%;
}

.theme-hacker-ins .hi-hero-title::before {
  content: "> ";
  opacity: 0.75;
  margin-right: 0.08em;
  color: var(--hi-neon-green);
}

@keyframes hi-rgb-jitter {
  0% {
    text-shadow: 0 0 0 transparent;
  }
  25% {
    text-shadow: 1px 0 rgba(34, 211, 197, 0.42), -1px 0 rgba(255, 82, 172, 0.35), 0 0 12px rgba(34, 211, 197, 0.18);
  }
  50% {
    text-shadow: -1px 0 rgba(34, 211, 197, 0.42), 1px 0 rgba(255, 82, 172, 0.35), 0 0 14px rgba(34, 211, 197, 0.2);
  }
  75% {
    text-shadow: 1px -1px rgba(34, 211, 197, 0.36), -1px 1px rgba(255, 82, 172, 0.32), 0 0 12px rgba(34, 211, 197, 0.18);
  }
  100% {
    text-shadow: 0 0 0 transparent;
  }
}

.theme-hacker-ins .hi-hero-title:hover {
  animation: hi-rgb-jitter 0.42s steps(2) infinite;
}

.theme-hacker-ins .hi-hero-subtitle::before {
  content: "$ ";
  opacity: 0.72;
  margin-right: 0.08em;
  color: var(--hi-neon-cyan);
}

.theme-hacker-ins .hi-typing-active::after {
  content: "_";
  margin-left: 2px;
  animation: hi-caret-blink 1s step-end infinite;
}

.theme-hacker-ins .hi-caret-persistent::after {
  content: "_";
  margin-left: 2px;
  animation: hi-caret-blink 1s step-end infinite;
}

html.dark .theme-hacker-ins .hi-terminal-hero {
  border: 1px solid rgba(34, 211, 197, 0.25);
  box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.22), 0 18px 42px rgba(0, 0, 0, 0.36);
  background: rgba(4, 8, 13, 0.62);
}

html.dark .theme-hacker-ins .hi-terminal-header {
  border-bottom: 1px solid rgba(34, 211, 197, 0.2);
  background: rgba(8, 11, 16, 0.85);
  color: var(--hi-muted);
}

html.dark .theme-hacker-ins .hi-terminal-status {
  color: var(--hi-neon-cyan);
  text-shadow: 0 0 10px rgba(34, 211, 197, 0.22);
}

html.dark .theme-hacker-ins .hi-terminal-body {
  background: rgba(4, 7, 12, 0.5);
}

html:not(.dark) .theme-hacker-ins .hi-terminal-hero,
html.light .theme-hacker-ins .hi-terminal-hero {
  border: 1px solid rgba(16, 21, 29, 0.18);
  box-shadow: 0 16px 34px rgba(16, 21, 29, 0.1);
  background: rgba(255, 255, 255, 0.66);
}

html:not(.dark) .theme-hacker-ins .hi-terminal-header,
html.light .theme-hacker-ins .hi-terminal-header {
  border-bottom: 1px solid rgba(16, 21, 29, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: #4b5563;
}

html:not(.dark) .theme-hacker-ins .hi-terminal-status,
html.light .theme-hacker-ins .hi-terminal-status {
  color: #c05f8e;
}

html:not(.dark) .theme-hacker-ins .hi-terminal-hero::before,
html.light .theme-hacker-ins .hi-terminal-hero::before {
  opacity: 0.03;
}

@keyframes hi-terminal-float {
  0%,
  18%,
  100% {
    transform: translate3d(0px, 0px, 0) rotate(0deg);
  }
  32% {
    transform: translate3d(-1px, -2px, 0) rotate(-0.15deg);
  }
  46% {
    transform: translate3d(-3px, -7px, 0) rotate(-0.4deg);
  }
  60% {
    transform: translate3d(0px, -9px, 0) rotate(0deg);
  }
  74% {
    transform: translate3d(3px, -7px, 0) rotate(0.4deg);
  }
  86% {
    transform: translate3d(1px, -2px, 0) rotate(0.15deg);
  }
}

@keyframes hi-scanline-shift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 18px;
  }
}

@keyframes hi-crt-flicker {
  0%,
  100% {
    opacity: 0.095;
  }
  30% {
    opacity: 0.101;
  }
  62% {
    opacity: 0.091;
  }
  84% {
    opacity: 0.099;
  }
}

@keyframes hi-online-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.22);
    opacity: 1;
  }
}

@keyframes hi-cursor-dot-click {
  0% { transform: translate(-50%, -50%) scale(1.36); }
  40% { transform: translate(-50%, -50%) scale(1.62); }
  100% { transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes hi-cursor-ring-click {
  0% { transform: translate(-50%, -50%) scale(0.86); opacity: 1; }
  55% { transform: translate(-50%, -50%) scale(1.12); opacity: 0.96; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes hi-status-jump {
  0% {
    transform: translateY(0);
    opacity: 0.9;
  }
  45% {
    transform: translateY(-1px);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 0.9;
  }
}

@keyframes hi-grain-shift {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-1%, 1%);
  }
  50% {
    transform: translate(1%, -1%);
  }
  75% {
    transform: translate(-1%, -1%);
  }
  100% {
    transform: translate(0, 0);
  }
}

.theme-hacker-ins .hi-terminal-hero::before {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.045;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.22) 0.6px, transparent 1.2px),
    radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.2) 0.7px, transparent 1.3px),
    radial-gradient(circle at 45% 85%, rgba(255, 255, 255, 0.18) 0.6px, transparent 1.1px);
  background-size: 26px 26px, 32px 32px, 24px 24px;
  mix-blend-mode: soft-light;
  animation: hi-grain-shift 3.6s steps(6) infinite;
}

.theme-hacker-ins .hi-terminal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0px,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.095;
  mix-blend-mode: soft-light;
  animation: hi-scanline-shift 8s linear infinite, hi-crt-flicker 2.8s steps(20) infinite;
}

.theme-hacker-ins .hi-terminal-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(
    ellipse at center,
    transparent 56%,
    rgba(0, 0, 0, 0.07) 82%,
    rgba(0, 0, 0, 0.14) 100%
  );
}

html:not(.dark) .theme-hacker-ins .hi-terminal-vignette,
html.light .theme-hacker-ins .hi-terminal-vignette {
  background: radial-gradient(
    ellipse at center,
    transparent 58%,
    rgba(0, 0, 0, 0.045) 84%,
    rgba(0, 0, 0, 0.09) 100%
  );
}

@keyframes hi-key-glow {
  0%,
  100% {
    box-shadow: none;
  }
  50% {
    box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.28), 0 0 18px rgba(34, 211, 197, 0.22);
  }
}

@keyframes hi-top-arrow-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(-5px);
  }
  65% {
    transform: translateY(-2px);
  }
}

@keyframes hi-top-arrow-glow {
  0%,
  100% {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(34, 211, 197, 0.14);
  }
  50% {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(34, 211, 197, 0.26), 0 0 16px rgba(34, 211, 197, 0.24);
  }
}

/* Button/key dynamic light effect (showcase-like) */
.theme-hacker-ins a[class*="rounded"][class*="border"],
.theme-hacker-ins button[class*="rounded"],
.theme-hacker-ins #btn-scroll-to-top {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.theme-hacker-ins a[class*="rounded"][class*="border"]::before,
.theme-hacker-ins button[class*="rounded"]::before,
.theme-hacker-ins #btn-scroll-to-top::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(34, 211, 197, 0.24) 45%,
    rgba(232, 160, 191, 0.22) 55%,
    transparent 100%
  );
  transform: translateX(-130%) skewX(-18deg);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.theme-hacker-ins a[class*="rounded"][class*="border"]:hover::before,
.theme-hacker-ins button[class*="rounded"]:hover::before,
.theme-hacker-ins #btn-scroll-to-top:hover::before {
  transform: translateX(130%) skewX(-18deg);
}

.theme-hacker-ins a[class*="rounded"][class*="border"]:hover,
.theme-hacker-ins button[class*="rounded"]:hover,
.theme-hacker-ins #btn-scroll-to-top:hover {
  animation: hi-key-glow 1.25s ease-in-out infinite;
}

/* Press feedback: instant glow + slight press-in */
.theme-hacker-ins a[class*="rounded"][class*="border"]:active,
.theme-hacker-ins button[class*="rounded"]:active,
.theme-hacker-ins #btn-scroll-to-top:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 0 0 1px rgba(34, 211, 197, 0.5), 0 0 24px rgba(34, 211, 197, 0.34), 0 0 34px rgba(232, 160, 191, 0.24) !important;
}

.theme-hacker-ins a[class*="rounded"][class*="border"]:active::before,
.theme-hacker-ins button[class*="rounded"]:active::before,
.theme-hacker-ins #btn-scroll-to-top:active::before {
  transform: translateX(0%) skewX(-18deg);
  opacity: 1;
}

.theme-hacker-ins a[class*="rounded"][class*="border"] > *,
.theme-hacker-ins button[class*="rounded"] > *,
.theme-hacker-ins #btn-scroll-to-top > * {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  #hi-page-transition {
    transition: none;
  }
  .theme-hacker-ins .hi-terminal-hero {
    animation: none;
  }
  .theme-hacker-ins .hi-terminal-hero::before {
    animation: none;
  }
  .theme-hacker-ins .hi-terminal-hero::after {
    animation: none;
  }
  #hi-cursor-dot.click,
  #hi-cursor-ring.click {
    animation: none;
  }
  .theme-hacker-ins .hi-terminal-status::before,
  .theme-hacker-ins .hi-terminal-status.hi-status-tick {
    animation: none;
  }
  .theme-hacker-ins .hi-hero-title:hover {
    animation: none;
  }
  .theme-hacker-ins a[class*="rounded"][class*="border"]:hover,
  .theme-hacker-ins button[class*="rounded"]:hover,
  .theme-hacker-ins #btn-scroll-to-top:hover {
    animation: none;
  }
  .theme-hacker-ins #btn-scroll-to-top,
  .theme-hacker-ins #btn-scroll-to-top span {
    animation: none;
  }
  .theme-hacker-ins a[class*="rounded"][class*="border"]:active,
  .theme-hacker-ins button[class*="rounded"]:active,
  .theme-hacker-ins #btn-scroll-to-top:active {
    transform: none;
  }
  .theme-hacker-ins .hi-stat-card,
  .theme-hacker-ins .hi-project-card,
  .theme-hacker-ins .hi-subscribe-link {
    transition: none;
  }
  .theme-hacker-ins .hi-stat-card:hover,
  .theme-hacker-ins .hi-project-card:hover,
  .theme-hacker-ins .hi-subscribe-link:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .theme-hacker-ins .hi-terminal-status {
    display: none;
  }
}

@media (pointer: coarse) {
  #hi-cursor-dot,
  #hi-cursor-ring {
    display: none !important;
  }
  body.theme-hacker-ins.hi-cursor-enabled,
  body.theme-hacker-ins.hi-cursor-enabled a,
  body.theme-hacker-ins.hi-cursor-enabled button {
    cursor: auto !important;
  }
}

@media (max-width: 640px) {
  #hi-hotkey-help .hi-hotkey-panel {
    padding: 12px;
  }
  #hi-hotkey-help .hi-hotkey-list li {
    padding: 6px 8px;
  }
  body.theme-hacker-ins.hi-hotkey-armed::after {
    right: 8px;
    left: 8px;
    bottom: 8px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .theme-hacker-ins #header-menu {
    margin: 0 8px;
    border-radius: 0 0 12px 12px;
  }

  .theme-hacker-ins #header-menu .hi-nav-tools {
    gap: 10px !important;
  }

  .theme-hacker-ins #header-menu .hi-nav-tools > li > a,
  .theme-hacker-ins #header-menu .hi-nav-tools > li > div {
    border-radius: 10px;
    padding: 4px;
  }

  #hi-hotkey-fab {
    top: auto;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 126px);
    width: 32px;
    height: 32px;
    z-index: 123;
  }

  .theme-hacker-ins #btn-scroll-to-top {
    position: static !important;
    left: auto;
    right: auto !important;
    bottom: auto !important;
    width: auto;
    height: auto;
    margin: clamp(14px, 3.2vw, 24px) auto clamp(12px, 2.8vw, 20px);
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: none !important;
  }

  .theme-hacker-ins #btn-scroll-to-top::before {
    display: none !important;
  }

  .theme-hacker-ins #btn-scroll-to-top:hover {
    transform: translateY(-1px) !important;
    box-shadow: none !important;
    animation: none !important;
  }

  .theme-hacker-ins #btn-scroll-to-top:active {
    transform: translateY(1px) !important;
    box-shadow: none !important;
  }

  .theme-hacker-ins #btn-scroll-to-top span {
    font-size: 30px !important;
    line-height: 1;
    animation: hi-top-arrow-bounce 1.1s ease-in-out infinite;
  }

  html.dark .theme-hacker-ins #btn-scroll-to-top {
    background: transparent !important;
    border: 0 !important;
  }

  html:not(.dark) .theme-hacker-ins #btn-scroll-to-top,
  html.light .theme-hacker-ins #btn-scroll-to-top {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html:not(.dark) .theme-hacker-ins #btn-scroll-to-top span,
  html.light .theme-hacker-ins #btn-scroll-to-top span {
    color: #c85b93 !important;
  }
}

@media (min-width: 769px) {
  .theme-hacker-ins #header-menu {
    margin: 0 !important;
    border-radius: 0 !important;
    max-width: none !important;
    width: 100%;
  }

  /* Desktop keeps floating top-button behavior (different from mobile). */
  .theme-hacker-ins #btn-scroll-to-top {
    position: fixed !important;
    left: auto !important;
    right: clamp(12px, 2vw, 24px) !important;
    bottom: calc(var(--hi-top-btn-base-bottom) + var(--hi-footer-avoid-offset)) !important;
    margin: 0 !important;
    z-index: 40;
  }
}
