@import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root {
  --indigo: #580084;
  --indigo-dark: #2e0047;
  --indigo-deep: #1a0029;
  --gold: #FFD413;
  --gold-dim: #bfa010;
  --green: #42FF30;
  --green-dim: #2eaa22;
  --orange: #FF5C82;
  --orange-dim: #cc3366;
  --cyan: #388697;
  --cyan-light: #4ca8bc;
  --cyan-dim: #2a6470;
  --bg: #12001f;
  --cream: #e8ddf0;
  --muted: #9988aa;
  --bevel-hi: #8855bb;
  --bevel-lo: #2a0040;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }

/* Fade-in animation */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  opacity: 0;
  animation: fadeSlideIn 0.6s ease-out forwards;
}
.fade-in-scroll {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}


body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 40%, rgba(88, 0, 132, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(56, 134, 151, 0.08) 0%, transparent 50%);
  color: var(--cream);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: url('../assets/cursor.svg') 10 10, crosshair;
}

/* Clickable cursor */
a, button, .term-menu-item, .dl-btn, .nav-btn {
  cursor: url('../assets/cursor-hover.svg') 10 10, pointer;
}

/* Terminal text cursor */
.terminal-body {
  cursor: url('../assets/cursor.svg') 10 10, crosshair;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.05) 3px, rgba(0,0,0,0.05) 4px);
  pointer-events: none;
  z-index: 9999;
}

/* Pixel art panel — double frame */
.panel {
  position: relative;
  border: 3px solid var(--bevel-hi);
  background: linear-gradient(160deg, rgba(88,0,132,0.3), rgba(26,0,41,0.95));
  box-shadow:
    inset 0 0 0 3px var(--bg),
    inset 0 0 0 5px var(--bevel-lo),
    3px 3px 0 rgba(0,0,0,0.5),
    4px 4px 0 rgba(0,0,0,0.3),
    5px 5px 0 rgba(0,0,0,0.15);
  padding: 2px;
}
/* Corner accents — pixel squares */
.panel::before, .panel::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  background: var(--bevel-hi);
  z-index: 2;
  box-shadow:
    0 0 0 1px var(--bevel-lo);
}
.panel::before {
  top: -3px; left: -3px;
}
.panel::after {
  top: -3px; right: -3px;
}
/* Bottom corners via inner wrapper */
.panel-inner {
  position: relative;
}
.panel-inner::before, .panel-inner::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  background: var(--bevel-hi);
  z-index: 2;
  box-shadow: 0 0 0 1px var(--bevel-lo);
}
.panel-inner::before {
  bottom: -5px; left: -5px;
}
.panel-inner::after {
  bottom: -5px; right: -5px;
}

/* Inner cards — subtle double border */
.card-inset {
  position: relative;
  border: 2px solid var(--bevel-lo);
  background: rgba(18, 0, 31, 0.6);
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,0.2),
    inset 0 0 0 3px var(--bevel-lo);
}

/* Section title — overlaps the top border */
.panel-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(10px, 2vw, 13px);
  color: var(--orange);
  text-shadow: 1px 1px 0 #000;
  padding: 6px 14px;
  background: var(--bg);
  border: 2px solid var(--bevel-hi);
  display: inline-block;
  position: relative;
  top: -15px;
  left: 12px;
  margin-bottom: -8px;
  z-index: 3;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.wrapper { max-width: 840px; margin: 0 auto; padding: 16px; }

/* Top strip */
.top-strip {
  background: var(--indigo-dark);
  border-bottom: 2px solid var(--indigo);
  padding: 5px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: var(--cyan-light);
}
.status { display: flex; align-items: center; gap: 6px; }
.ticker-wrap {
  overflow: hidden;
  width: 100%;
}
.ticker-text {
  display: inline-block;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  color: #bbaacc;
  letter-spacing: 0.5px;
  animation: tickerScroll 22s linear infinite;
}
@keyframes tickerScroll {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}
.top-links { display: flex; gap: 4px; }
.top-links a {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 10px;
  transition: color 0.15s;
}
.top-links a:hover { color: var(--cream); }
.status-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* HEADER */
.header { text-align: center; padding: 24px 20px 14px; }

.logo-text {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(24px, 6vw, 48px);
  letter-spacing: 4px;
  display: inline-block;
  animation: logoGlow 4s ease-in-out infinite;
}
.logo-ephem {
  color: #c06dd4;
  text-shadow: 0 0 2px rgba(192,109,212,0.9), 0 0 12px rgba(168,85,187,0.35), 3px 3px 0 rgba(10,0,18,0.95);
}
.logo-aral {
  color: #ff6e92;
  text-shadow: 0 0 2px rgba(255,110,146,0.9), 0 0 12px rgba(255,92,130,0.35), 3px 3px 0 rgba(10,0,18,0.95);
}
@keyframes logoGlow {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 4px rgba(168,85,187,0.3)); }
  50% { filter: brightness(1.05) drop-shadow(0 0 10px rgba(168,85,187,0.4)) drop-shadow(0 0 20px rgba(255,92,130,0.2)); }
}
.tagline-sub {
  font-size: 15px;
  color: #bbaacc;
  margin-top: 6px;
}

/* === INTERACTIVE TERMINAL === */
.terminal {
  margin: 12px 0 40px;
  border: 3px solid var(--bevel-hi);
  box-shadow:
    inset 0 0 0 3px var(--bg),
    inset 0 0 0 5px var(--bevel-lo),
    3px 3px 0 rgba(0,0,0,0.5),
    4px 4px 0 rgba(0,0,0,0.3),
    5px 5px 0 rgba(0,0,0,0.15);
}
.terminal-bar {
  background: linear-gradient(180deg, #5a2d82, #3d0066);
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--bevel-lo);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot.r { background: #ff5555; }
.term-dot.y { background: var(--gold); }
.term-dot.g { background: var(--green); }
.terminal-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--muted);
  margin-left: 8px;
}
.terminal-body {
  background: rgba(0,0,0,0.7);
  padding: 14px 16px;
  font-family: 'VT323', monospace;
  font-size: 18px;
  line-height: 1.7;
  height: 370px;
  overflow-y: auto;
  outline: none;
}
.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
.terminal-body::-webkit-scrollbar-thumb { background: var(--indigo); }

.t-line { display: block; min-height: 1.7em; }
.t-prompt { color: var(--green); }
.t-cmd { color: var(--cream); }
.t-flag { color: var(--orange); }
.t-arg { color: var(--cyan-light); }
.t-comment { color: #bbaacc; font-size: 16px; }
.t-ok { color: var(--green); }
.t-fail { color: var(--orange); }
.t-gold { color: var(--gold); }
.t-dim { color: #aa99bb; }
.t-user { color: var(--cyan-light); }
.t-llm { color: var(--cream); opacity: 0.7; }
.t-skill { color: var(--gold); font-size: 15px; }
.t-sep { color: #9966cc; letter-spacing: 1px; font-weight: bold; }

.cursor-blink {
  display: inline-block;
  width: 10px; height: 18px;
  background: var(--green);
  vertical-align: text-bottom;
  animation: curBlink 0.8s steps(1) infinite;
  image-rendering: pixelated;
}
@keyframes curBlink { 50% { opacity: 0; } }

/* Terminal menu */
.term-menu { margin: 4px 0; outline: none; }
.term-menu-item {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 2px 0;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.1s;
  user-select: none;
}
.term-menu-item:hover { color: var(--gold); }
.term-menu-item.selected {
  color: var(--gold);
  text-shadow: 0 0 6px rgba(255,212,19,0.2);
}
.term-menu-hint {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: #5a3d88;
  margin-top: 6px;
}

/* Sections below terminal */
section { margin: 40px 0; }
.section-body { padding: 12px 20px 20px; }

/* Download */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 640px) { .download-grid { grid-template-columns: 1fr; } }
.download-card {
  padding: 20px 16px;
  text-align: center;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.download-card:hover {
  transform: translateY(-2px);
  border-color: var(--bevel-hi);
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,0.2),
    inset 0 0 0 3px var(--bevel-hi),
    0 0 12px rgba(88,0,132,0.15);
}
.dl-icon { font-size: 32px; margin-bottom: 10px; }

/* Pixel art crate */
.px-crate { display: inline-block; image-rendering: pixelated; margin-bottom: 10px; }
.px-crate .pixel-row { display: flex; justify-content: center; gap: 0; }
.px-crate .px { width: 5px; height: 5px; }
.px-cr-k { background: #0a0a1a; }
.px-cr-h { background: #5ec8c8; }
.px-cr-m { background: #3a9999; }
.px-cr-d { background: #267070; }
.px-cr-s { background: #1a4a4a; }
.px-cr-g { background: var(--gold); }
.px-cr-l { background: #88eedd; }
.px-cr-t { background: transparent; }
.dl-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--cream);
  margin-bottom: 10px;
}
.dl-desc { font-size: 12px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; flex: 1; }
.dl-btn {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 6px 14px;
  text-decoration: none;
  border: 3px solid;
  transition: all 0.15s;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.7);
}
.dl-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(0,0,0,0.7); }
.dl-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0,0,0,0.7); }
.dl-btn.green {
  background: linear-gradient(180deg, #5fff5f, var(--green-dim), #1a7714);
  color: #000;
  border-color: #8fff8f #1a6614 #1a6614 #8fff8f;
}
.dl-btn.cyan {
  background: linear-gradient(180deg, var(--cyan-light), var(--cyan), var(--cyan-dim));
  color: #fff;
  border-color: #66bbcc #1a4a55 #1a4a55 #66bbcc;
}
.dl-btn.gold {
  background: linear-gradient(180deg, #ffe066 0%, var(--gold) 60%, #b8910a 90%, #997a00 100%);
  color: #000;
  border-color: #ffee99 #665500 #665500 #ffee99;
}

/* Parsers */
.parser-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.parser-table th {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px; color: var(--gold); text-align: left;
  padding: 8px 12px; background: rgba(255,212,19,0.06); border-bottom: 2px solid var(--gold-dim);
}
.parser-table td { padding: 10px 12px; border-bottom: 1px solid rgba(136,85,187,0.2); }
.parser-table tr:hover td { background: rgba(88,0,132,0.1); }
.badge { display: inline-block; font-family: 'Press Start 2P', monospace; font-size: 7px; padding: 3px 8px; border: 1px solid; text-shadow: 1px 1px 0 rgba(0,0,0,0.6); box-shadow: 2px 2px 0 rgba(0,0,0,0.4); }
.badge-ready { color: var(--cyan-light); border-color: var(--cyan); background: rgba(76,168,188,0.08); }
.badge-wanted { color: var(--orange); border-color: var(--orange); background: rgba(255,92,130,0.06); animation: wantedPulse 3s ease-in-out infinite; }
@keyframes wantedPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

a.glow-link { color: var(--cyan-light); text-decoration: none; border-bottom: 1px dashed var(--cyan); transition: all 0.2s; }
a.glow-link:hover { color: #fff; text-shadow: 0 0 8px var(--cyan-light); }

.new-tag { display: inline-block; font-family: 'Press Start 2P', monospace; font-size: 7px; color: #fff; background: var(--orange); padding: 3px 8px; animation: blink 1s steps(1) infinite; position: absolute; top: -10px; right: -10px; z-index: 5; box-shadow: 2px 2px 0 rgba(0,0,0,0.5); }
@keyframes blink { 50% { visibility: hidden; } }

.footer {
  text-align: center;
  padding: 30px 20px 24px;
  margin-top: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}
.footer-made { color: var(--muted); }
.footer-link {
  color: var(--cyan-light);
  text-decoration: none;
  border-bottom: 1px dashed rgba(76,168,188,0.3);
  transition: all 0.2s;
}
.footer-link:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--cyan-light);
  border-bottom-color: transparent;
}
