:root {
  --bg: #07080b;
  --bg2: #0d0e12;
  --line: #262a33;
  --line-hi: #3a4050;
  --fg: #eef0f4;
  --dim: #b0b6c2;
  --muted: #7c8492;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
@keyframes cursor-blink { 0%,50%{opacity:1} 51%,100%{opacity:0} }
@keyframes blink-legacy { 0%,49%{opacity:1} 50%,100%{opacity:0} }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.85)} }
@keyframes cmd-in { from{transform:translateY(8px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes shine { to{background-position:0 -200%} }
@keyframes glitch-hover {
  0%{transform:translate(0,0)}
  25%{transform:translate(2px,-1px)}
  50%{transform:translate(-2px,1px)}
  75%{transform:translate(1px,1px)}
  100%{transform:translate(0,0)}
}
@keyframes boot-out { 0%,72%{opacity:1} 100%{opacity:0;visibility:hidden} }
@keyframes neon-pulse {
  0%,100%{text-shadow:0 0 7px rgba(255,255,255,0.85),0 0 22px rgba(255,255,255,0.45),0 0 48px rgba(255,255,255,0.25)}
  50%{text-shadow:0 0 10px #fff,0 0 30px rgba(255,255,255,0.6),0 0 68px rgba(255,255,255,0.35)}
}
html { font-size: 16px; scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: 'JetBrains Mono', 'Space Mono', 'Consolas', monospace;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 0%, #191b20 0%, #07080b 65%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 30px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 30px);
  color: var(--fg);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}
body.scanlines-on::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.1) 0, rgba(0,0,0,0.1) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
  z-index: 9999;
  opacity: 0.3;
}
body.scanlines-on::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 68%, rgba(2, 3, 6, 0.5) 100%);
  pointer-events: none;
  z-index: 9998;
}
.boot {
  position: fixed;
  inset: 0;
  background: #040507;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--fg);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: boot-out 1.4s ease forwards;
  pointer-events: none;
}
.boot::after { content: '▮'; color: var(--fg); animation: blink-legacy 0.7s steps(1) infinite; margin-left: 8px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1rem;
  height: 32px;
  background: rgba(4, 5, 7, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 12px rgba(0,0,0,0.7);
  user-select: none;
}
.brand {
  background: linear-gradient(180deg,#fff 0%,#b9c1d6 30%,#eef2ff 50%,#7c86a8 75%,#fff 100%);
  background-size: 100% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 5s linear infinite;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  border: none;
  cursor: pointer;
}
.brand:hover { filter: drop-shadow(1px 0 #fff) drop-shadow(-1px 0 var(--muted)); }
.brand .ext { color: var(--muted); -webkit-text-fill-color: var(--muted); font-weight: 400; }
.topright { margin-left: auto; display: flex; align-items: center; gap: 0.9rem; font-size: 0.68rem; }
.live-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--fg); font-weight: 700; letter-spacing: 0.12em; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.clock { color: var(--fg); font-family: 'Space Mono', monospace; font-weight: 700; }
main {
  max-width: 720px;
  margin: 0 auto 4rem;
  padding: 1.75rem 1.25rem 0;
  position: relative;
  z-index: 10;
}
.ascii-banner {
  position: relative;
  margin-bottom: 2.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: crosshair;
  user-select: none;
}
.ascii-banner canvas { display: block; width: 100%; height: auto; }
.hero { margin-bottom: 2.25rem; }
.hero-name {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(2.2rem, 7.5vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
  text-shadow:
    0 0 7px rgba(255, 255, 255, 0.85),
    0 0 22px rgba(255, 255, 255, 0.45),
    0 0 48px rgba(255, 255, 255, 0.25);
  animation: neon-pulse 3.4s ease-in-out infinite;
  display: inline-block;
  cursor: default;
}
.sec { margin-bottom: 2.75rem; opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.sec.visible { opacity: 1; transform: none; }
.label {
  font-size: 0.7rem;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-weight: 700;
  cursor: default;
}
.label::before { content: '['; color: var(--muted); }
.label::after { content: ']'; color: var(--muted); }
.label .tail { flex: 1; height: 1px; background: linear-gradient(90deg, var(--muted), transparent); margin-left: 0.5rem; }
.intro { font-size: 0.85rem; color: var(--dim); margin-bottom: 1rem; }
.intro .cm { color: var(--fg); font-weight: 700; }
.index-list { list-style: none; }
.index-list li { padding: 0.85rem 0; }
.index-list li + li { border-top: 1px solid rgba(38, 42, 51, 0.6); }
.proj {
  border: 1px solid var(--line);
  border-left: 4px solid #dfe3ea;
  border-radius: 4px;
  background: rgba(4, 5, 7, 0.55);
  padding: 0.9rem 1.1rem 0.75rem;
  margin-bottom: 1.1rem;
}
.index-list li.proj { padding: 0.9rem 1.1rem 0.75rem; }
.index-list li.proj + li.proj { border-top: none; }
.proj:hover { border-color: var(--line-hi); border-left-color: #fff; background: rgba(12, 13, 18, 0.8); }
.row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
}
.row:hover { color: #fff; }
.row .name { font-family: 'Space Mono', monospace; font-weight: 700; font-size: 1.05rem; color: #fff; }
.row:hover .name { animation: glitch-hover 0.25s steps(2) 2; text-shadow: 1px 0 #fff, -1px 0 var(--muted); }
.plogo {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  flex-shrink: 0;
  align-self: center;
  margin-right: 0.7rem;
  opacity: 0.92;
}
.proj:hover .plogo { opacity: 1; }
.logo {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  align-self: center;
  margin-right: 0.6rem;
}
.leader {
  flex: 1;
  min-width: 1.5rem;
  border-bottom: 1px dotted var(--muted);
  margin: 0 0.6rem;
  transform: translateY(-0.3em);
}
.row:hover .leader { border-color: #fff; }
.row .desc { font-size: 0.78rem; color: var(--dim); }
.row:hover .desc { color: var(--fg); }
.row .arr { color: var(--muted); font-weight: 700; margin-left: 0.6rem; font-size: 0.8rem; }
.row:hover .arr { color: #fff; }
.live-dot-sm {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
  animation: pulse-dot 1.8s ease-in-out infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.run { font-size: 0.72rem; color: var(--fg); margin: 0.4rem 0 0.2rem; padding-left: 2.8rem; overflow-wrap: anywhere; }
.proj .run { padding-left: 0; }
.run .cmd { color: #fff; font-weight: 700; }
.links-line { font-size: 0.72rem; padding-left: 2.8rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.proj .links-line { padding-left: 0; }
.links-line a { color: var(--dim); text-decoration: none; font-weight: 700; }
.links-line a:hover { color: #fff; }
.pgp-hint { font-size: 0.78rem; color: var(--dim); margin-bottom: 0.9rem; }
.pgp-hint button {
  background: transparent;
  border: 1px solid var(--line-hi);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pgp-hint button:hover { border-color: #fff; color: #fff; }
.pgp-hint button.copied { background: #fff; border-color: #fff; color: #000; }
.pgp-details { border: 1px solid var(--line); background: rgba(4, 5, 7, 0.7); }
.pgp-details summary {
  cursor: pointer;
  padding: 0.6rem 1rem;
  font-size: 0.72rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  list-style: none;
}
.pgp-details summary::-webkit-details-marker { display: none; }
.pgp-details summary::before { content: '▸ '; color: var(--fg); }
.pgp-details[open] summary::before { content: '▾ '; }
.pgp-details summary:hover { color: #fff; }
.pgp-key {
  font-size: 0.62rem;
  line-height: 1.5;
  color: #c9ced8;
  padding: 0 1.25rem 1rem;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
  max-height: 280px;
}
.pq-box {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin: 0.9rem 0 1.1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid #a4161a;
  background: rgba(164, 22, 26, 0.07);
  color: var(--fg);
  text-decoration: none;
}
.pq-box::before {
  content: 'made with';
  position: absolute;
  top: -9px;
  left: 12px;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #e05252;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0 0.45rem;
}
.pq-box:hover {
  border-color: #a4161a;
  background: rgba(164, 22, 26, 0.12);
  box-shadow: 0 0 18px rgba(164, 22, 26, 0.2);
}
.pq-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--line-hi);
  opacity: 0.92;
}
.pq-box:hover .pq-logo { opacity: 1; }
.pq-body { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
.pq-name {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}
.pq-desc { font-size: 0.75rem; color: var(--dim); }
.pq-box:hover .pq-desc { color: var(--fg); }
.pq-arr { margin-left: auto; color: var(--muted); font-weight: 700; }
.pq-box:hover .pq-arr { color: #fff; }
.foot { font-size: 0.72rem; color: var(--muted); line-height: 2; }
.foot-div {
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--muted) 0 6px, var(--line) 6px 12px);
  margin-bottom: 1rem;
  opacity: 0.5;
}
.hint {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 2100;
  background: #040507;
  border: 1px solid var(--line-hi);
  color: var(--fg);
  padding: 0.65rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.06);
}
.hint.visible { opacity: 0.95; transform: translateY(0); pointer-events: auto; }
.hint kbd {
  background: #14161c;
  color: #fff;
  border: 1px solid var(--line-hi);
  padding: 0.15rem 0.45rem;
  font-family: inherit;
  font-size: 0.72rem;
}
.hint:hover { cursor: pointer; border-color: #fff; }
.cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 5, 7, 0.88);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8vh;
}
.cmd-overlay.active { display: flex; animation: cmd-in 0.15s ease-out; }
.cmd-box {
  width: min(620px, 94vw);
  background: #0b0c10;
  border: 1px solid var(--line-hi);
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.08), 4px 4px 0 rgba(0,0,0,0.8);
  overflow: hidden;
}
.cmd-input-line {
  display: flex;
  align-items: center;
  padding: 0.9rem 1.1rem;
  font-size: 1rem;
  background: #040507;
  border-bottom: 1px solid var(--line);
}
.cmd-colon { color: #fff; font-weight: 700; margin-right: 0.5rem; font-size: 1.2rem; }
.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: inherit;
  caret-color: #fff;
}
.cmd-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: #fff;
  animation: cursor-blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}
.cmd-suggestions { background: #0b0c10; max-height: 240px; overflow-y: auto; }
.cmd-item {
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
  color: var(--dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cmd-item:hover, .cmd-item.highlight { background: #15171d; color: var(--fg); }
.cmd-item .cmd-key { color: #fff; font-weight: 700; min-width: 140px; font-family: 'Space Mono', monospace; }
.cmd-item .cmd-desc { font-size: 0.72rem; opacity: 0.75; }
.cmd-no-match { padding: 0.8rem 1.1rem; font-size: 0.78rem; color: var(--muted); font-style: italic; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #040507; }
::-webkit-scrollbar-thumb { background: #4a505c; }
::-webkit-scrollbar-thumb:hover { background: #fff; }
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:0.01ms!important;animation-iteration-count:1!important;transition-duration:0.01ms!important}
  body.scanlines-on::before{display:none}
}
@media(max-width:680px){
  main { padding: 1.25rem 0.85rem 0; }
  .clock { display: none; }
  .row .desc { flex-basis: 100%; }
  .leader { display: none; }
  .run, .links-line { padding-left: 0; }
  .cmd-item .cmd-desc { display: none; }
}
