:root {
  --bg-dark: #05070a;
  --bg-term: #080c14;
  --bg-code: #030508;
  --text-main: #c9d1d9;
  --text-dim: #6e7681;
  --text-dark: #404750;

  --neon-cyan: #00f0ff;
  --neon-green: #00ff66;
  --neon-amber: #ffb700;
  --neon-red: #ff3366;
  --border-cyan: rgba(0, 240, 255, 0.22);
  --border-dim: #18202d;

  --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.4);
  --glow-green: 0 0 10px rgba(0, 255, 102, 0.4);
  --glow-amber: 0 0 10px rgba(255, 183, 0, 0.4);
  --glow-red: 0 0 12px rgba(255, 51, 102, 0.5);

  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg-dark);
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

/* CRT Scanlines FX */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.28) 50%);
  background-size: 100% 3px;
  opacity: 0.6;
}

.glow-ambient {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.04) 0%, rgba(5, 7, 10, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Terminal Header */
.terminal-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: 48px;
  background: rgba(5, 7, 10, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-cyan);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
}

.header-inner {
  max-width: 920px;
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-symbol {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  font-size: 1rem;
}

.logo-glitch {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-shadow: var(--glow-cyan);
}

.badge-terminal {
  font-size: 0.65rem;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.25);
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.status-hud {
  display: flex;
  align-items: center;
  gap: 7px;
}

.neon-beacon {
  width: 6px;
  height: 6px;
  background-color: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-green);
  animation: beacon-blink 1.8s infinite;
}

@keyframes beacon-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.status-mono {
  font-size: 0.75rem;
  color: var(--neon-green);
  text-shadow: 0 0 6px rgba(0, 255, 102, 0.4);
  letter-spacing: 0.06em;
}

/* Layout */
.container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

.section {
  padding: clamp(26px, 5vw, 48px) 0;
  position: relative;
}

.hero-section {
  padding-top: 76px;
  padding-bottom: 30px;
}

/* ASCII Banners (Mobile Adaptive) */
.ascii-banner {
  text-align: center;
  margin-bottom: 18px;
  user-select: none;
}

.ascii-banner pre {
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
  line-height: 1.15;
  display: inline-block;
  max-width: 100%;
}

.desktop-ascii {
  display: block;
}

.desktop-ascii pre {
  font-size: clamp(6px, 1.2vw, 10px);
}

.mobile-ascii {
  display: none;
}

.mobile-ascii pre {
  font-size: clamp(7px, 2.3vw, 11px);
}

@media (max-width: 640px) {
  .desktop-ascii { display: none; }
  .mobile-ascii { display: block; }
}

/* Terminal Window */
.term-window {
  background: var(--bg-term);
  border: 1px solid var(--border-cyan);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(0, 240, 255, 0.02);
  position: relative;
  width: 100%;
}

.term-window::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 20px;
  width: 32px;
  height: 2px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
}

.term-window.danger-edge {
  border-color: rgba(255, 51, 102, 0.35);
}

.term-window.danger-edge::before {
  background: var(--neon-red);
  box-shadow: 0 0 8px var(--neon-red);
}

.term-titlebar {
  background: #0d121c;
  border-bottom: 1px solid var(--border-dim);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}

.win-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot-win {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #252e3d;
  display: inline-block;
}

.dot-win.red { background: #ff5f56; }
.dot-win.yellow { background: #ffbd2e; }
.dot-win.green { background: #27c93f; }

.term-name {
  color: var(--text-dim);
  letter-spacing: 0.07em;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term-coord {
  margin-left: auto;
  color: var(--neon-amber);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.term-body {
  padding: clamp(16px, 3.5vw, 32px);
}

/* Headings & Text */
.tech-tag {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.glow-cyan {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.neon-cyan {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.neon-amber {
  color: var(--neon-amber);
  text-shadow: var(--glow-amber);
}

.neon-green {
  color: var(--neon-green);
  text-shadow: var(--glow-green);
}

.neon-red {
  color: var(--neon-red);
  text-shadow: var(--glow-red);
}

.glow-dim {
  color: var(--text-dim);
}

.main-title {
  font-size: clamp(1.45rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 22px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4), 0 0 20px rgba(0, 240, 255, 0.3);
}

.term-cursor {
  display: inline-block;
  color: var(--neon-green);
  text-shadow: var(--glow-green);
  animation: blink-cursor 0.9s infinite step-start;
}

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

.sub-title {
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

/* Numbered Paragraph Rows */
.term-p-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.p-num {
  font-size: 0.75rem;
  color: var(--neon-cyan);
  opacity: 0.6;
  user-select: none;
  min-width: 28px;
  line-height: 1.7;
}

.body-p {
  color: var(--text-main);
  font-size: clamp(0.9rem, 1.7vw, 1rem);
  line-height: 1.75;
  flex: 1;
}

.highlight-row {
  background: rgba(0, 240, 255, 0.03);
  border-left: 2px solid var(--neon-cyan);
  padding: 8px 10px;
  margin: 14px 0;
}

.glow-text {
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
}

/* Callout */
.cyber-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #080d16;
  border: 1px solid var(--neon-amber);
  box-shadow: 0 0 12px rgba(255, 183, 0, 0.12);
  padding: 12px 14px;
  margin: 20px 0 10px 0;
}

.callout-icon {
  color: var(--neon-amber);
  font-size: 0.85rem;
}

.callout-text {
  color: var(--neon-amber);
  font-weight: 700;
  font-size: clamp(0.85rem, 1.8vw, 0.95rem);
  line-height: 1.5;
}

/* Interactive CLI Widget */
.interactive-cli {
  margin-top: 24px;
  background: #040609;
  border: 1px solid var(--border-cyan);
  padding: 14px;
}

.cli-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.cli-live {
  color: var(--neon-green);
  text-shadow: var(--glow-green);
  font-weight: 600;
}

.cli-output {
  font-size: 0.82rem;
  color: var(--neon-cyan);
  min-height: 28px;
  line-height: 1.5;
  margin-bottom: 12px;
  word-break: break-all;
}

.cli-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cli-btn {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cli-btn:hover, .cli-btn:focus-visible {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
  outline: none;
}

/* Interactive Crypto Boxes */
.crypto-box {
  margin-top: 20px;
  padding: 14px;
  background: var(--bg-code);
  border: 1px dashed var(--border-cyan);
}

.crypto-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.crypto-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.crypto-action-hint {
  font-size: 0.68rem;
  color: var(--neon-amber);
  cursor: pointer;
  letter-spacing: 0.05em;
}

.code-line {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  letter-spacing: 0.04em;
  word-break: break-all;
  font-weight: 600;
}

.clickable-code {
  cursor: pointer;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.clickable-code:hover {
  border-color: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.decoded-result {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-green);
  text-shadow: var(--glow-green);
  min-height: 20px;
}

/* Axiom Banner */
.axiom-banner {
  margin-top: 22px;
}

.axiom-border {
  background: rgba(255, 51, 102, 0.04);
  border: 1px solid var(--neon-red);
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.15);
  padding: 16px 14px;
  position: relative;
}

.axiom-tag {
  position: absolute;
  top: -9px;
  left: 12px;
  background: var(--bg-dark);
  color: var(--neon-red);
  font-size: 0.62rem;
  padding: 1px 6px;
  border: 1px solid var(--neon-red);
  letter-spacing: 0.08em;
}

.axiom {
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

/* Closing Block */
.closing-block {
  margin-top: 28px;
  border-top: 1px solid var(--border-cyan);
  padding-top: 20px;
}

.closing-box {
  text-align: center;
  padding: 18px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-dim);
}

.closing-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.closing-sub {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Cyber Button */
.btn-cyber {
  position: relative;
  background: transparent;
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.25);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 12px 28px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 320px;
}

.btn-cyber:hover, .btn-cyber:active {
  background: rgba(0, 255, 102, 0.15);
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.5);
  color: #ffffff;
}

.btn-cyber:focus-visible {
  border-color: #ffffff;
  box-shadow: 0 0 15px #ffffff;
}

/* Footer */
.site-footer {
  padding-top: 36px;
  padding-bottom: 30px;
  border-top: 1px solid var(--border-cyan);
  background: #030406;
}

.footer-hud {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-brand {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.footer-item .k {
  color: var(--text-dark);
}

.footer-item .v {
  color: var(--text-main);
}

.footer-hash {
  margin-top: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  word-break: break-all;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 4, 6, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 16px;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #090e18;
  border: 1px solid var(--neon-red);
  box-shadow: 0 0 25px rgba(255, 51, 102, 0.35);
  width: 100%;
  max-width: 480px;
  padding: 20px;
  transform: translateY(10px);
  transition: transform 0.2s ease;
  outline: none;
}

.modal-backdrop.is-open .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 51, 102, 0.2);
  padding-bottom: 10px;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-warning-icon {
  color: var(--neon-red);
  font-size: 1.1rem;
}

.modal-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.modal-close {
  background: transparent;
  border: 0;
  color: var(--text-dim);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.modal-close:hover {
  color: var(--neon-red);
}

.terminal-msg-box {
  background: #04060a;
  border: 1px solid var(--border-dim);
  padding: 14px;
  margin-bottom: 20px;
}

.term-prompt-line {
  color: var(--text-dark);
  font-size: 0.72rem;
  margin-bottom: 6px;
}

.terminal-msg-box p {
  color: var(--neon-amber);
  font-size: 0.85rem;
  text-shadow: var(--glow-amber);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

.modal-btn {
  background: transparent;
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  color: #ffffff;
}

/* Mobile Media Queries */
@media (max-width: 480px) {
  .header-inner {
    padding: 0 12px;
  }
  .container {
    padding: 0 10px;
  }
  .term-body {
    padding: 14px 10px;
  }
  .term-p-row {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
  }
  .p-num {
    font-size: 0.7rem;
    line-height: 1.2;
  }
  .highlight-row {
    padding: 8px 8px;
  }
  .cyber-callout {
    padding: 10px 10px;
  }
  .interactive-cli {
    padding: 10px;
  }
  .cli-btn {
    flex: 1 1 100%;
    text-align: center;
  }
}
