/* Hacker overlay for the NexT Muse theme. Article HTML is unchanged. */

:root {
  --bg: #050805;
  --bg-2: #0b120c;
  --panel: rgba(8, 18, 10, 0.86);
  --line: rgba(57, 255, 20, 0.28);
  --line-strong: rgba(57, 255, 20, 0.7);
  --green: #39ff14;
  --green-dim: #7dff63;
  --text: #c8f7c5;
  --muted: #6d9a72;
  --amber: #d6ff4a;
  --cyan: #7dfff2;
}

html {
  background: var(--bg);
}

/* NexT hides these until Velocity finishes. Show them without waiting. */
.use-motion .motion-element,
.use-motion .brand,
.use-motion .logo,
.use-motion .site-title,
.use-motion .site-subtitle,
.use-motion .menu-item,
.use-motion .post-block,
.use-motion .post-header,
.use-motion .post-body,
.use-motion .post-footer,
.use-motion .comments {
  opacity: 1 !important;
  visibility: visible !important;
}

.pace,
.pace-progress,
.pace-activity {
  display: none !important;
}

body {
  color: var(--text) !important;
  background:
    linear-gradient(rgba(57, 255, 20, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at top, rgba(57, 255, 20, 0.08), transparent 42%),
    var(--bg) !important;
  background-size: 100% 28px, auto, auto !important;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  text-shadow: 0 0 1px rgba(57, 255, 20, 0.15);
}

#matrix-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

.container,
.footer,
.sidebar-toggle {
  position: relative;
  z-index: 2;
}

.sidebar-toggle {
  position: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.16),
    rgba(0, 0, 0, 0.16) 1px,
    transparent 1px,
    transparent 4px
  );
  animation: scan 9s linear infinite;
}

@keyframes scan {
  from { background-position: 0 0; }
  to { background-position: 0 120px; }
}

#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020402;
  color: var(--green);
  font-family: "Share Tech Mono", ui-monospace, Consolas, monospace;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

#boot-screen pre {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.7);
}

#boot-screen span {
  color: var(--amber);
}

#boot-screen.boot-out {
  opacity: 0;
  visibility: hidden;
}

.site-title,
.custom-logo .site-title {
  position: relative;
  animation: glitch 4.5s infinite steps(1, end);
}

.site-title::before,
.site-title::after {
  content: "BynnWong";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
}

.site-title::before {
  color: #ff2bd6;
  transform: translate(-2px, 0);
  clip-path: inset(0 0 62% 0);
  opacity: 0.75;
  animation: glitch-a 4.5s infinite steps(1, end);
}

.site-title::after {
  color: var(--cyan);
  transform: translate(2px, 0);
  clip-path: inset(58% 0 0 0);
  opacity: 0.75;
  animation: glitch-b 4.5s infinite steps(1, end);
}

@keyframes glitch {
  0%, 88%, 100% { transform: none; }
  90% { transform: translate(-2px, 1px); }
  92% { transform: translate(2px, -1px); }
  94% { transform: none; }
}

@keyframes glitch-a {
  0%, 86%, 100% { opacity: 0; }
  88%, 94% { opacity: 0.8; }
}

@keyframes glitch-b {
  0%, 86%, 100% { opacity: 0; }
  89%, 95% { opacity: 0.8; }
}

.post-block:hover {
  box-shadow: none;
}

.site-brand-wrapper::before {
  overflow: hidden;
  white-space: nowrap;
  width: 29ch;
  margin-left: auto;
  margin-right: auto;
  border-right: 2px solid var(--green);
  animation: typing 2.2s steps(29, end) 1.7s both, blink 0.8s step-end 1.7s infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 29ch; }
}

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

.menu .menu-item .fa {
  color: var(--green) !important;
}

::selection {
  background: var(--green) !important;
  color: #041204 !important;
}

a {
  color: var(--green-dim) !important;
  border-bottom-color: rgba(57, 255, 20, 0.35) !important;
}

a:hover {
  color: var(--green) !important;
  border-bottom-color: var(--green) !important;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.45);
}

h1, h2, h3, h4, h5, h6,
.site-title,
.post-title,
.post-title-link {
  font-family: "Share Tech Mono", "Noto Sans SC", monospace !important;
  color: var(--green) !important;
  letter-spacing: 0.03em;
}

.headband {
  height: 2px !important;
  background: var(--green) !important;
  box-shadow: 0 0 12px var(--green);
}

.header-inner {
  padding-top: 56px !important;
  padding-bottom: 28px !important;
}

.site-brand-wrapper::before {
  content: "root@bynnwong:~#  ./open blog";
  display: block;
  margin-bottom: 18px;
  color: var(--green);
  font-family: "Share Tech Mono", ui-monospace, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  #matrix-rain,
  #boot-screen {
    display: none !important;
  }

  .site-title,
  .site-title::before,
  .site-title::after,
  .site-brand-wrapper::before,
  .post-block {
    animation: none !important;
  }
}

.custom-logo .site-title,
.site-title {
  color: var(--green) !important;
  font-size: 34px !important;
  text-shadow: 0 0 14px rgba(57, 255, 20, 0.55);
}

.site-subtitle {
  color: var(--amber) !important;
  font-family: "Share Tech Mono", "Noto Sans SC", monospace !important;
  letter-spacing: 0.18em;
}

.brand,
.custom-logo .brand {
  background: transparent !important;
  color: var(--green) !important;
  border: 1px solid var(--line) !important;
  box-shadow: inset 0 0 18px rgba(57, 255, 20, 0.05), 0 0 18px rgba(57, 255, 20, 0.08);
  padding: 8px 28px !important;
}

.menu {
  margin-top: 26px !important;
}

.menu .menu-item a {
  color: var(--text) !important;
  border: 1px solid transparent !important;
  padding: 4px 10px;
  font-family: "Share Tech Mono", "Noto Sans SC", monospace;
  letter-spacing: 0.08em;
}

.menu .menu-item a:hover {
  color: var(--green) !important;
  border-color: var(--line-strong) !important;
  background: rgba(57, 255, 20, 0.08);
}

.site-nav-toggle button {
  border: 1px solid var(--line) !important;
}

.btn-bar {
  background: var(--green) !important;
}

@media (max-width: 767px) {
  .site-nav {
    background: rgba(5, 8, 5, 0.96) !important;
    border-color: var(--line) !important;
    border-bottom: 1px solid var(--line) !important;
  }
}

.main {
  padding-bottom: 80px !important;
}

.post-block,
.post-block.page {
  margin: 0 0 4px;
  padding: 6px 4px 4px 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.posts-expand .post-eof {
  width: 100% !important;
  height: 1px !important;
  margin: 26px 0 30px !important;
  background: linear-gradient(90deg, rgba(57, 255, 20, 0.7), transparent) !important;
}

.post-title-link::before {
  background-color: var(--green) !important;
}

.post-meta,
.post-meta a,
.footer,
.footer a {
  color: var(--muted) !important;
  font-family: "Share Tech Mono", "Noto Sans SC", monospace;
}

.post-body {
  color: var(--text) !important;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

.post-body .note {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: var(--text) !important;
  padding: 4px 0 !important;
}

blockquote,
.blockquote-center {
  color: var(--amber) !important;
  border-left: none !important;
}

.btn {
  color: #041204 !important;
  background: var(--green) !important;
  border: 1px solid var(--green) !important;
  font-family: "Share Tech Mono", monospace !important;
  letter-spacing: 0.08em;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.25);
}

.btn:hover {
  color: var(--green) !important;
  background: transparent !important;
  border-color: var(--green) !important;
}

code {
  color: var(--amber) !important;
  background: rgba(57, 255, 20, 0.08) !important;
  border-radius: 0 !important;
}

pre,
.highlight,
.highlight pre,
.highlight .code pre {
  color: var(--green-dim) !important;
  background: #020603 !important;
  border: 1px solid var(--line) !important;
}

pre code {
  color: inherit !important;
  background: transparent !important;
}

pre .comment { color: #4f7a55 !important; }
pre .string,
pre .value { color: var(--amber) !important; }
pre .keyword,
pre .function { color: var(--cyan) !important; }
pre .number,
pre .built_in { color: #ffb86b !important; }

table {
  border-color: var(--line) !important;
  background: transparent !important;
}

table > tbody > tr:nth-of-type(odd),
table > tbody > tr:hover {
  background: rgba(57, 255, 20, 0.05) !important;
}

th, td {
  border-color: var(--line) !important;
  color: var(--text);
}

hr {
  background: var(--line) !important;
  background-image: none !important;
}

.pagination {
  border-top-color: var(--line) !important;
}

.pagination .prev,
.pagination .next,
.pagination .page-number {
  color: var(--text) !important;
  border-color: var(--line) !important;
}

.pagination .page-number.current {
  color: #041204 !important;
  background: var(--green) !important;
  border-color: var(--green) !important;
}

.sidebar-inner,
.post-toc a,
.sidebar a {
  color: var(--muted) !important;
}

.sidebar-toggle {
  background: var(--green) !important;
}

.sidebar-toggle-line {
  background: #041204 !important;
}

.footer {
  background: transparent;
}

.copyright {
  color: var(--muted) !important;
  font-family: "Share Tech Mono", "Noto Sans SC", monospace !important;
  letter-spacing: 0.12em;
  text-align: center;
}

img {
  filter: saturate(0.85) contrast(1.05);
}

@media (max-width: 767px) {
  .post-block,
  .post-block.page {
    padding: 6px 2px 4px 14px;
  }

  .custom-logo .site-title,
  .site-title {
    font-size: 26px !important;
  }

}
