/* === SELF-HOSTED FONTS === */

/* JetBrains Mono - cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-ext-300-italic.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* JetBrains Mono - cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-300-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* JetBrains Mono - latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-300-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono - latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-300-italic.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;
}
/* JetBrains Mono - cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* JetBrains Mono - cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-400-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* JetBrains Mono - latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono - latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-400-italic.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;
}
/* JetBrains Mono - cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-ext-300-normal.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* JetBrains Mono - cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-300-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* JetBrains Mono - latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-300-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono - latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-300-normal.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;
}
/* JetBrains Mono - cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* JetBrains Mono - cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-400-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* JetBrains Mono - latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono - latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-400-normal.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;
}
/* JetBrains Mono - cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* JetBrains Mono - cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-500-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* JetBrains Mono - latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono - latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-500-normal.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;
}
/* JetBrains Mono - cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* JetBrains Mono - cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic-700-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* JetBrains Mono - latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono - latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin-700-normal.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;
}
/* Share Tech Mono - latin */
@font-face {
  font-family: 'Share Tech Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/share-tech-mono-latin-400-normal.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;
}

:root {
  --green: #39ff14;
  --green-mid: #28b80e;
  --green-dim: #1a6e0a;
  --green-dark: #0d3805;
  --green-glow: rgba(57,255,20,0.35);
  --purple: #bf5af2;
  --purple-dim: #7a3a9e;
  --purple-glow: rgba(191,90,242,0.3);
  --red: #ff3333;
  --red-glow: rgba(255,51,51,0.3);
  --amber: #ffaa00;
  --bg: #050508;
  --bg-panel: #08080e;
  --bg-card: #0a0a12;
  --text: #b0b0b8;
  --text-dim: #505060;
  --text-bright: #d8d8e0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* === CRT WARP === */
html {
  overflow-x: hidden;
}

/* === SCANLINES === */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0,0,0,0.06) 1px,
    rgba(0,0,0,0.06) 2px
  );
  pointer-events: none;
  z-index: 10000;
}

/* === NOISE LAYER === */
body::after {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
  animation: noise-drift 0.15s steps(2) infinite;
}

@keyframes noise-drift {
  0% { transform: translate(0,0); }
  50% { transform: translate(-3px,2px); }
  100% { transform: translate(1px,-1px); }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.8;
  min-height: 100vh;
  cursor: default;
}

/* === VIGNETTE === */
.vignette {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 9998;
}

/* === HORIZONTAL SCAN === */
.h-scan {
  position: fixed;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent 5%, var(--green-glow) 30%, var(--purple-glow) 70%, transparent 95%);
  opacity: 0.12;
  z-index: 9997;
  animation: hscan 6s linear infinite;
  pointer-events: none;
}

@keyframes hscan {
  0% { top: -3px; }
  100% { top: 100vh; }
}

/* === VERTICAL INTERFERENCE === */
.v-interference {
  position: fixed;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--green);
  opacity: 0;
  z-index: 9996;
  pointer-events: none;
  animation: v-glitch 12s ease-in-out infinite;
}

@keyframes v-glitch {
  0%, 89%, 92%, 100% { opacity: 0; }
  90% { opacity: 0.15; left: 23%; width: 1px; }
  91% { opacity: 0.1; left: 67%; width: 2px; }
}

/* === BOOT SEQUENCE === */
.boot-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: boot-fade 0.6s ease-out 2.8s forwards;
}

.boot-screen.skip {
  display: none;
}

.boot-screen pre {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--green-mid);
  text-shadow: 0 0 8px var(--green-glow);
  white-space: pre;
  line-height: 1.5;
  opacity: 0;
  animation: boot-text-in 0.1s ease-out forwards;
}

.boot-screen pre:nth-child(1) { animation-delay: 0.1s; }
.boot-screen pre:nth-child(2) { animation-delay: 0.4s; }
.boot-screen pre:nth-child(3) { animation-delay: 0.7s; }
.boot-screen pre:nth-child(4) { animation-delay: 1.0s; }
.boot-screen pre:nth-child(5) { animation-delay: 1.3s; color: var(--purple); text-shadow: 0 0 8px var(--purple-glow); }
.boot-screen pre:nth-child(6) { animation-delay: 1.6s; }
.boot-screen pre:nth-child(7) { animation-delay: 1.9s; color: var(--amber); }
.boot-screen pre:nth-child(8) { animation-delay: 2.3s; color: var(--green); }

.boot-screen.skip pre {
  animation: none;
}

@keyframes boot-text-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes boot-fade {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; visibility: hidden; }
}

/* === GLITCH KEYFRAMES === */
@keyframes glitch-skew {
  0%, 100% { transform: skewX(0deg); }
  20% { transform: skewX(-1deg); }
  40% { transform: skewX(0.5deg); }
  60% { transform: skewX(-0.3deg); }
}

@keyframes glitch-clip-1 {
  0%, 100% { clip-path: inset(0 0 98% 0); }
  15% { clip-path: inset(10% 0 70% 0); }
  30% { clip-path: inset(60% 0 10% 0); }
  45% { clip-path: inset(30% 0 40% 0); }
  60% { clip-path: inset(80% 0 5% 0); }
  75% { clip-path: inset(5% 0 85% 0); }
}

@keyframes glitch-clip-2 {
  0%, 100% { clip-path: inset(98% 0 0 0); }
  15% { clip-path: inset(40% 0 30% 0); }
  30% { clip-path: inset(5% 0 60% 0); }
  45% { clip-path: inset(70% 0 10% 0); }
  60% { clip-path: inset(15% 0 65% 0); }
  75% { clip-path: inset(50% 0 20% 0); }
}

@keyframes flicker {
  0%, 92%, 94%, 96%, 98%, 100% { opacity: 1; }
  93% { opacity: 0.7; }
  95% { opacity: 0.9; }
  97% { opacity: 0.5; }
  99% { opacity: 0.85; }
}

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

@keyframes content-in {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes data-stream {
  0% { background-position: 0% 0%; }
  100% { background-position: 0% 100%; }
}

/* === TOP BAR === */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 36px;
  background: var(--bg-panel);
  border-bottom: 1px solid #111118;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  font-size: 11px;
  font-family: 'Share Tech Mono', monospace;
  animation: content-in 0.5s ease-out 3s both;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--green-dark), var(--green-dim) 30%, var(--purple-dim) 70%, var(--green-dark));
}

.topbar-left {
  color: var(--green);
  display: flex;
  gap: 24px;
  align-items: center;
}

.logo-wrap {
  position: relative;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 4px;
  min-width: 180px;
}

.logo-wrap .logo-text {
  position: relative;
  z-index: 2;
  animation: logo-glitch 6s step-end infinite;
}

@keyframes logo-glitch {
  0%, 100% { transform: none; text-shadow: none; }
  82% { transform: translateX(-2px) skewX(-1deg); text-shadow: 2px 0 var(--purple), -1px 0 #ff0040; }
  83% { transform: translateX(1px); text-shadow: -1px 0 #00d4ff, 2px 0 var(--purple); }
  84% { transform: translateX(-1px) skewX(0.5deg); text-shadow: 1px 0 #ff0040; }
  85% { transform: none; text-shadow: none; }
  93% { transform: translateX(1px); text-shadow: -2px 0 var(--purple), 1px 0 #00d4ff; }
  93.5% { transform: translateX(-1px) skewX(-0.5deg); text-shadow: 2px 0 #ff0040; }
  94% { transform: none; text-shadow: none; }
}

/* Modem sequence: hide chromatic layers until sequence finishes */
.logo-wrap.modem-seq .logo-text { color: var(--green-mid); }
.logo-wrap.modem-seq::before,
.logo-wrap.modem-seq::after { display: none; }

/* === CHROMATIC ABERRATION === */
.logo-wrap::before,
.logo-wrap::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
  mix-blend-mode: screen;
}

.logo-wrap::before {
  color: #ff0040;
  opacity: 0;
  z-index: 1;
  animation: chromatic-left 8s ease-in-out infinite;
}

.logo-wrap::after {
  color: #00d4ff;
  opacity: 0;
  z-index: 1;
  animation: chromatic-right 8s ease-in-out infinite;
}

@keyframes chromatic-left {
  0%, 78%, 90%, 100% { transform: translateX(0); opacity: 0; }
  80% { transform: translateX(-3px); opacity: 0.9; clip-path: inset(20% 0 30% 0); }
  82% { transform: translateX(-1px); opacity: 0.5; clip-path: inset(0); }
  84% { transform: translateX(-5px); opacity: 0.8; clip-path: inset(40% 0 10% 0); }
  86% { transform: translateX(-2px); opacity: 0.4; clip-path: inset(0); }
  88% { transform: translateX(-1px); opacity: 0.3; clip-path: inset(60% 0 20% 0); }
}

@keyframes chromatic-right {
  0%, 78%, 90%, 100% { transform: translateX(0); opacity: 0; }
  80% { transform: translateX(3px); opacity: 0.9; clip-path: inset(50% 0 10% 0); }
  82% { transform: translateX(2px); opacity: 0.5; clip-path: inset(0); }
  84% { transform: translateX(6px); opacity: 0.8; clip-path: inset(10% 0 50% 0); }
  86% { transform: translateX(2px); opacity: 0.4; clip-path: inset(0); }
  88% { transform: translateX(1px); opacity: 0.3; clip-path: inset(30% 0 40% 0); }
}

.topbar-nav { display: flex; gap: 4px; }

.topbar-nav a {
  color: var(--text-dim);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
  padding: 4px 8px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.topbar-nav a:hover, .topbar-nav a.active {
  color: var(--green);
  border-color: var(--green-dim);
  text-shadow: 0 0 6px var(--green-glow);
  background: rgba(57,255,20,0.03);
}

.topbar-right {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--green-mid);
  font-size: 10px;
}

.topbar-right .conn {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-right .dot {
  width: 5px; height: 5px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 4px var(--green-glow);
  animation: flicker 3s infinite;
}

.topbar-right .time {
  color: var(--purple);
  letter-spacing: 1px;
}

/* === SIDE DECORATIONS === */
.side-data {
  position: fixed;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--green-dark);
  letter-spacing: 3px;
  opacity: 0.5;
  z-index: 50;
  animation: content-in 0.5s ease-out 3.2s both;
}

.side-data-r {
  position: fixed;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-lr;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--purple-dim);
  letter-spacing: 3px;
  opacity: 0.3;
  z-index: 50;
  animation: content-in 0.5s ease-out 3.4s both;
}

/* === ASCII HEADER === */
.ascii-header {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--green-mid);
  text-align: center;
  padding: 60px 0 10px;
  line-height: 1.2;
  opacity: 0.45;
  white-space: pre;
  overflow: hidden;
  animation: content-in 0.5s ease-out 3.1s both, ascii-glitch 8s step-end infinite 4s;
}

@keyframes ascii-glitch {
  0%, 100% {
    transform: none;
    text-shadow: 0 0 8px var(--green-glow);
  }
  80% {
    transform: translateX(-2px) skewX(-0.3deg);
    text-shadow: -3px 0 #ff0040, 3px 0 var(--purple), 0 0 8px var(--green-glow);
  }
  81% {
    transform: translateX(1px);
    text-shadow: 2px 0 var(--purple), -1px 0 #00d4ff, 0 0 8px var(--green-glow);
  }
  82% {
    transform: translateX(-1px) skewX(0.2deg);
    text-shadow: -1px 0 #ff0040, 2px 0 #00d4ff, 0 0 8px var(--green-glow);
  }
  83% {
    transform: none;
    text-shadow: 0 0 8px var(--green-glow);
  }
}

/* === CONTAINER === */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 24px 120px;
  animation: content-in 0.6s ease-out 3s both;
}

/* === TERMINAL PROMPT HEADER === */
.terminal-header {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed #151520;
}

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

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

.terminal-header .flag {
  color: var(--purple);
}

/* === ARTICLE HEADER === */
.article-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid #111118;
  position: relative;
}

.article-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 80px;
  height: 1px;
  background: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
}

.article-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.article-meta .tag {
  color: var(--bg);
  background: var(--purple-dim);
  padding: 1px 6px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.article-meta .date {
  color: var(--green-dim);
}

.article-meta .reading-time {
  color: var(--text-dim);
}

.article-meta .separator {
  color: #1a1a28;
}

h1 {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 400;
  color: var(--text-bright);
  line-height: 1.25;
  margin-bottom: 12px;
  position: relative;
}

h1 .accent {
  color: var(--green);
  text-shadow: 0 0 20px var(--green-glow), 0 0 40px rgba(57,255,20,0.15);
  position: relative;
}

h1 .glitch-word {
  position: relative;
  display: inline-block;
}

h1 .glitch-word::before {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 2px;
  color: var(--purple);
  opacity: 0;
  animation: word-glitch 8s infinite;
}

@keyframes word-glitch {
  0%, 95%, 100% { opacity: 0; clip-path: inset(0); }
  96% { opacity: 0.7; clip-path: inset(20% 0 30% 0); left: -2px; }
  97% { opacity: 0.5; clip-path: inset(50% 0 10% 0); left: 3px; }
  98% { opacity: 0.6; clip-path: inset(10% 0 60% 0); left: -1px; }
}

.subtitle {
  font-size: 13px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 300;
  font-style: italic;
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--green);
  animation: cursor-blink 0.8s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 3px;
  box-shadow: 0 0 6px var(--green-glow);
}

/* === ARTICLE BODY === */
.article-body h2 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 16px;
  font-weight: 400;
  color: var(--green);
  margin: 52px 0 20px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--purple-dim);
  text-shadow: 0 0 12px var(--green-glow);
  position: relative;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.article-body h2::before {
  content: '// ';
  color: var(--purple-dim);
  font-size: 12px;
}

.article-body h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, #151520, transparent);
}

.article-body p {
  margin-bottom: 18px;
  font-weight: 300;
  font-size: 14px;
}

.article-body strong {
  color: var(--text-bright);
  font-weight: 500;
  background: linear-gradient(180deg, transparent 60%, rgba(57,255,20,0.08) 60%);
  padding: 0 2px;
}

.article-body em {
  color: var(--purple);
  font-style: italic;
}

/* === BLOCKQUOTE === */
.article-body blockquote {
  border-left: 2px solid var(--purple-dim);
  margin: 28px 0;
  padding: 14px 18px;
  background:
    linear-gradient(90deg, rgba(191,90,242,0.04) 0%, transparent 100%);
  position: relative;
  font-size: 13px;
}

.article-body blockquote::before {
  content: '>';
  position: absolute;
  top: 14px;
  left: -16px;
  color: var(--purple-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
}

.article-body blockquote p {
  margin-bottom: 0;
  color: var(--text-dim);
}

/* === DIVIDER === */
.divider {
  margin: 40px 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--green-dark);
  text-align: center;
  position: relative;
  letter-spacing: 4px;
  overflow: hidden;
}

.divider::before {
  content: '─────────── ◈ ───────────';
  color: #111118;
  animation: gem-pulse 5s ease-in-out infinite;
}

.divider:nth-of-type(2n)::before { animation-delay: -1.7s; }
.divider:nth-of-type(3n)::before { animation-delay: -3.2s; }
.divider:nth-of-type(5n)::before { animation-delay: -0.8s; }

@keyframes gem-pulse {
  0%, 100% { color: var(--green-dark); }
  50% { color: var(--purple-dim); }
}

.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #111118 20%, #111118 80%, transparent);
  z-index: -1;
}

/* === HIGHLIGHT BLOCKS === */
.data-block {
  background: var(--bg-card);
  border: 1px solid #111118;
  padding: 16px 20px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
  font-size: 13px;
}

.data-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--green), var(--purple));
}

.data-block::after {
  content: attr(data-label);
  position: absolute;
  top: 4px; right: 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.5;
}

.data-block p { margin-bottom: 0; }

/* === ARCHIVE PAGE === */
.archive-page {
  margin-top: 0;
}

.archive-year {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--purple);
  border-left: 2px solid var(--purple);
  padding-left: 10px;
  margin: 28px 0 12px;
  letter-spacing: 2px;
}

.archive-entry {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0 6px 14px;
  text-decoration: none;
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  border-left: 1px solid #151520;
  transition: border-color 0.2s;
}

.archive-entry:hover {
  border-left-color: var(--green);
}

.archive-entry:hover .archive-title {
  color: var(--green);
}

.archive-date {
  color: var(--text-dim);
  font-size: 11px;
  flex-shrink: 0;
  min-width: 40px;
}

.archive-title {
  flex: 1;
  transition: color 0.2s;
}

.archive-reading {
  color: var(--text-dim);
  font-size: 10px;
  flex-shrink: 0;
}

/* === ABOUT PAGE === */
.about-page .whois-block,
.about-page .emerge-block {
  background: var(--bg-card);
  border: 1px solid #111118;
  padding: 20px 24px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text);
  overflow-x: auto;
  position: relative;
}

.about-page .whois-block {
  border-left: 2px solid var(--green);
}

.about-page .emerge-block {
  border-left: 2px solid var(--purple);
}

.about-page .whois-block::before {
  content: 'WHOIS';
  position: absolute;
  top: 4px; right: 8px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green-dim);
  opacity: 0.5;
}

.about-page .emerge-block::before {
  content: 'PORTAGE';
  position: absolute;
  top: 4px; right: 8px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--purple-dim);
  opacity: 0.5;
}

/* === REDACTED === */
.redacted {
  background: var(--text-dim);
  color: var(--text-dim);
  padding: 0 4px;
  user-select: none;
  cursor: not-allowed;
  font-size: 12px;
}

/* === CORRUPTION EFFECT === */
.corrupted {
  position: relative;
}

.corrupted::after {
  content: '▓▓▓ DATA_LOSS ▓▓▓';
  position: absolute;
  bottom: -14px;
  right: 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  color: var(--red);
  opacity: 0.2;
  letter-spacing: 2px;
}

/* === FOOTER === */
.article-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid #111118;
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  position: relative;
}

.article-footer::before {
  content: '[ EOF ]';
  position: absolute;
  top: -8px;
  left: 0;
  background: var(--bg);
  padding-right: 10px;
  color: var(--green-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 2px;
}

/* === POST INDEX === */
.blog-index {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid #111118;
}

.blog-index h3 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 24px;
}

.post-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0 10px 12px;
  border-left: 2px solid transparent;
  border-bottom: 1px solid #0a0a12;
  transition: all 0.25s;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
}

.post-item:hover {
  border-left-color: var(--green);
  background: linear-gradient(90deg, rgba(57,255,20,0.02), transparent);
}

.post-item:hover .post-title {
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
}

.post-title {
  color: var(--text);
  transition: all 0.25s;
}

.post-date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  margin-left: 16px;
}

.post-item.dead .post-title {
  color: var(--text-dim);
  font-style: italic;
}

.ghost-entry {
  transition: transform 0.08s, opacity 0.08s;
}

.ghost-entry .post-title {
  white-space: pre;
}

.ghost-entry .redacted {
  font-size: inherit;
}

.ghost-date {
  transition: color 0.15s;
}

.ghost-link:hover .post-title {
  color: var(--red) !important;
  text-shadow: 0 0 8px var(--red-glow) !important;
}

/* === MATRIX RAIN === */
.matrix-col {
  position: fixed;
  top: 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--green-dark);
  writing-mode: vertical-rl;
  line-height: 1;
  opacity: 0.12;
  z-index: 1;
  pointer-events: none;
  animation: matrix-fall linear infinite;
  letter-spacing: 2px;
}

.matrix-col:nth-child(1) { left: 3%; animation-duration: 18s; }
.matrix-col:nth-child(2) { left: 7%; animation-duration: 22s; animation-delay: -5s; }
.matrix-col:nth-child(3) { left: 93%; animation-duration: 20s; animation-delay: -8s; }
.matrix-col:nth-child(4) { left: 97%; animation-duration: 16s; animation-delay: -3s; }

@keyframes matrix-fall {
  0% { transform: translateY(-100vh); }
  100% { transform: translateY(100vh); }
}

/* === DISCONNECT FOOTER === */
.disconnect-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 60px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  border-top: 1px solid;
  border-image: linear-gradient(90deg, var(--red), var(--purple-dim), transparent) 1;
  text-align: center;
}

.disconnect-carrier {
  color: var(--red);
  font-size: 12px;
  letter-spacing: 6px;
  padding: 20px 0 8px;
  text-shadow: 0 0 10px var(--red-glow);
}

.disconnect-meta {
  color: var(--text-dim);
  letter-spacing: 2px;
  line-height: 2;
}

/* === DOWNLOAD BAR === */
.download-bar {
  position: fixed;
  top: 36px;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: 99;
  pointer-events: none;
}

.download-bar .fill {
  height: 100%;
  width: 0%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green-glow);
  transition: width 0.15s linear;
}

.download-bar.complete {
  height: 3px;
  animation: bar-complete-flash 0.6s ease-out;
}

.download-bar.complete .fill {
  background: var(--purple);
  box-shadow: 0 0 10px var(--purple-glow), 0 0 20px rgba(191,90,242,0.15);
}

@keyframes bar-complete-flash {
  0% { height: 2px; }
  30% { height: 4px; }
  100% { height: 3px; }
}

.download-bar .label {
  position: absolute;
  right: 8px;
  top: 4px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--green-dim);
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.3s;
}

.download-bar.has-label .label {
  opacity: 1;
}

.download-bar.complete .label {
  color: var(--purple);
  text-shadow: 0 0 6px var(--purple-glow);
  font-size: 10px;
  opacity: 1;
}

/* === SIGNAL BURST === */
.signal-burst {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='6' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
  opacity: 0;
  pointer-events: none;
  z-index: 19999;
}

.signal-burst.active {
  animation: burst-flash 200ms steps(3) forwards;
}

@keyframes burst-flash {
  0% { opacity: 0; }
  30% { opacity: 0.7; background-color: rgba(57,255,20,0.08); }
  60% { opacity: 0.3; }
  100% { opacity: 0; }
}

/* === IDLE SIGNAL DECAY === */
body.signal-weak::after { opacity: 0.06; }
body.signal-weak .dot {
  background: var(--amber) !important;
  box-shadow: 0 0 4px rgba(255,170,0,0.4) !important;
}
body.signal-weak .conn-label { color: var(--amber); }

body.signal-critical::after { opacity: 0.10; }
body.signal-critical .dot {
  background: var(--red) !important;
  box-shadow: 0 0 4px var(--red-glow) !important;
  animation: none !important;
}
body.signal-critical .conn-label { color: var(--red); }
body.signal-critical .side-data,
body.signal-critical .side-data-r { letter-spacing: 5px; }

body.signal-lost::after { opacity: 0.15; }
body.signal-lost .dot {
  background: var(--red) !important;
  box-shadow: 0 0 8px var(--red-glow) !important;
  animation: none !important;
}
body.signal-lost .conn-label { color: var(--red); }
body.signal-lost .container { opacity: 0.6; }
body.signal-lost .side-data,
body.signal-lost .side-data-r { opacity: 0.05; }
body.signal-lost .vignette {
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.85) 100%);
}

body.reconnecting::before {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(57,255,20,0.1) 1px,
    rgba(57,255,20,0.1) 2px
  );
}

/* Idle state transitions */
body .dot,
body .conn-label,
body .container,
body .side-data,
body .side-data-r,
body .vignette {
  transition: all 1.5s ease;
}

/* === BOOT SKIPPED (revisit) === */
body.boot-skipped .topbar,
body.boot-skipped .side-data,
body.boot-skipped .side-data-r,
body.boot-skipped .container {
  animation: content-in 0.4s ease-out both;
}

body.boot-skipped .ascii-header {
  animation: content-in 0.4s ease-out both, ascii-glitch 8s step-end infinite 1s;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  body::after,
  .h-scan,
  .v-interference,
  .matrix-col {
    animation: none !important;
  }

  body::after {
    opacity: 0;
  }

  .h-scan {
    opacity: 0;
  }

  .logo-wrap,
  .logo-wrap .logo-text {
    animation: none;
  }

  .logo-wrap::before,
  .logo-wrap::after {
    animation: none;
    opacity: 0;
  }

  h1 .glitch-word::before {
    animation: none;
    opacity: 0;
  }

  .divider::before {
    animation: none;
    color: #111118;
  }

  .topbar-right .dot {
    animation: none;
  }

  .boot-screen {
    animation: none;
    display: none;
  }

  .boot-screen pre {
    animation: none;
  }

  .topbar,
  .side-data,
  .side-data-r,
  .container {
    animation: none;
    opacity: 1;
  }

  .ascii-header {
    animation: none;
    opacity: 0.45;
  }

  .cursor {
    animation: none;
    opacity: 1;
  }

  .signal-burst { display: none; }
  .download-bar .fill { transition: none; }
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .topbar {
    height: auto;
    min-height: 36px;
    flex-wrap: wrap;
    padding: 6px 10px;
    gap: 2px;
  }
  .topbar-left {
    flex-wrap: wrap;
    gap: 6px;
  }
  .topbar-nav {
    flex-wrap: wrap;
    gap: 2px;
  }
  .topbar-nav a {
    font-size: 9px;
    padding: 2px 6px;
  }
  .container { padding: 16px 14px 80px; }
  .side-data, .side-data-r { display: none; }
  .matrix-col { display: none; }
  .ascii-header { font-size: 6px; padding-top: 48px; }
  .disconnect-footer { padding: 0 14px 40px; }
  h1 { font-size: 22px; }
  .article-body h2 { font-size: 14px; }
  body { font-size: 13px; }
}

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

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green-dark); }
::-webkit-scrollbar-thumb:hover { background: var(--green-dim); }
