:root {
  --bg: #030507;
  --panel: rgba(9, 16, 22, 0.56);
  --line: rgba(0, 255, 170, 0.24);
  --green: #00ff00;
  --cyan: #00ffff;
  --text: #dcffee;
  --muted: #9ecdbb;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: 'Fira Code', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(0, 255, 140, 0.14), transparent 34%),
    radial-gradient(circle at 88% 24%, rgba(0, 255, 255, 0.1), transparent 38%),
    radial-gradient(circle at 52% 100%, rgba(0, 255, 170, 0.08), transparent 45%),
    var(--bg);
}

.bg-far {
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,255,100,.12), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(0,255,255,.08), transparent 42%),
    linear-gradient(180deg, #020505 0%, #000 100%);
  z-index: -4;
}

.bg-scanlines {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 255, 170, 0.03) 0px,
    rgba(0, 255, 170, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -1;
}

.glass {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 255, 170, 0.05) inset,
    0 0 24px rgba(0,255,160,.1);
}

#boot-overlay {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center;
  background: rgba(0,0,0,.93);
}
#boot-overlay.hidden { opacity: 0; pointer-events: none; transition: opacity .55s ease; }
.boot-panel { width: min(680px, 92vw); padding: 24px; border: 1px solid var(--line); background: #000; }
.boot-lines {
  min-height: 86px;
  margin: 0 0 12px;
  font-family: 'Fira Code', monospace;
  color: #b8ffe8;
}
.boot-line {
  margin: 0 0 6px;
  opacity: 0;
  transform: translateY(6px);
  animation: bootLineIn .22s ease-out forwards;
}
.boot-line.primary { color: var(--green); font-family: 'Orbitron', sans-serif; letter-spacing: .04em; }
@keyframes bootLineIn {
  to { opacity: 1; transform: translateY(0); }
}
.boot-progress { width: 100%; height: 10px; border: 1px solid var(--line); }
#boot-bar { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), var(--cyan)); }
#boot-status { margin: 10px 0 0; color: #92f8d4; font-size: .9rem; }

.top-nav {
  position: sticky; top: 14px; z-index: 100;
  margin: 14px auto; width: min(1100px, 92vw);
  border-radius: 18px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-family: 'Orbitron', sans-serif; font-weight: 900; letter-spacing: .08em; color: var(--green); }
.top-nav nav { display: flex; gap: 14px; }
.top-nav a {
  color: #b4ffe3;
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 8px;
  border-radius: 8px;
}
.top-nav a:hover { color: var(--cyan); background: rgba(0, 255, 170, 0.08); }
.sound-toggle {
  border: 1px solid var(--line);
  background: rgba(0, 255, 170, 0.09);
  color: #d8fff0;
  border-radius: 10px;
  width: 40px;
  height: 34px;
  cursor: pointer;
}
.sound-toggle.off { opacity: 0.6; filter: grayscale(1); }

main { width: min(1160px, 94vw); margin: 0 auto 80px; }
.section { padding: 84px 0 56px; position: relative; }
.section::before {
  content: attr(data-zone);
  position: absolute;
  top: 18px;
  right: 0;
  font-size: .64rem;
  letter-spacing: .18em;
  color: rgba(0,255,180,.33);
  text-transform: uppercase;
}
.section.active-zone {
  filter: saturate(1.08) brightness(1.03);
}
.section-head h2 {
  margin: 0 0 24px;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  color: var(--cyan);
  letter-spacing: .04em;
  text-shadow: 0 0 22px rgba(0,255,255,.25);
}

.hero { min-height: 86vh; display: grid; align-items: center; }
.hero-canvas {
  position: absolute; inset: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(0,255,140,.2);
}
.hero-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(0,255,170,.08), transparent 40%),
    radial-gradient(circle at 50% 115%, rgba(0,255,170,.22), transparent 42%);
  z-index: 2;
}
.hero-hud {
  position: absolute;
  inset: 20px 20px auto;
  z-index: 2;
  display: flex;
  gap: 10px;
  pointer-events: none;
}
.hud-block {
  border-radius: 12px;
  padding: 8px 12px;
  min-width: 210px;
}
.hud-block p {
  margin: 0;
  font-size: .65rem;
  letter-spacing: .16em;
  color: #8ff8d6;
}
.hud-block strong {
  display: block;
  margin: 4px 0;
  color: var(--cyan);
  font: 700 .86rem/1.2 'Orbitron', sans-serif;
}
.hud-block span {
  font-size: .72rem;
  color: #b6ffe9;
}
.hud-radar-block {
  min-width: 220px;
}
#radar-canvas {
  width: 100%;
  height: 90px;
  margin: 6px 0;
  border: 1px solid rgba(0,255,180,.25);
  background: rgba(0, 12, 8, 0.7);
  border-radius: 6px;
}
.hero-content {
  position: relative;
  z-index: 2;
  margin: 9vh auto 0;
  width: min(780px, 92%);
  border-radius: 20px;
  padding: 32px;
}
.kicker { margin: 0 0 12px; color: #9efcd4; letter-spacing: .18em; font-size: .72rem; text-transform: uppercase; }
h1 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.15rem, 5.4vw, 4.2rem);
  line-height: 1.02;
}
h1 span { color: var(--green); text-shadow: 0 0 30px rgba(0,255,0,.7); }
.subtitle { color: #bafde6; max-width: 65ch; font-size: 1rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.btn {
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: #d9fff0;
  font-weight: 600;
  letter-spacing: .03em;
}
.btn.neon {
  background: linear-gradient(135deg, rgba(0,255,100,.25), rgba(0,255,255,.18));
  box-shadow: 0 0 22px rgba(0,255,140,.35);
}
.btn.ghost:hover, .btn.neon:hover { transform: translateY(-2px); border-color: rgba(0,255,255,.45); }

.terminal-shell { border-radius: 18px; padding: 16px; }
.command-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.cmd-chip {
  border: 1px solid var(--line);
  background: rgba(0, 255, 170, 0.08);
  color: #bfffe7;
  border-radius: 999px;
  font: inherit;
  padding: 4px 10px;
  cursor: pointer;
}
.cmd-chip:hover { color: var(--cyan); border-color: rgba(0,255,255,.55); }
.terminal-output {
  min-height: 280px;
  max-height: 390px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.5);
}
.term-line { margin: 0 0 8px; color: #b8ffe4; }
.term-line .cmd { color: var(--green); }
.scan-title { color: var(--cyan); font-weight: 700; }
.scan-ok { color: #8dffd8; }
.scan-warn { color: #ffe88d; }
.scan-risk { color: #ff8f8f; }
.scan-graph {
  color: #8fffe3;
  font-size: .84rem;
  line-height: 1.35;
  white-space: pre;
  border: 1px solid rgba(0,255,180,.2);
  background: rgba(0,0,0,.35);
  padding: 8px;
  border-radius: 8px;
}
.terminal-input-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.prompt { color: var(--green); font-weight: 700; }
#terminal-input {
  flex: 1;
  background: transparent;
  color: #d8ffee;
  border: none;
  outline: none;
  font: inherit;
}
.cursor {
  width: 8px; height: 18px; background: var(--green);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.project-card {
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  animation: floatCard 6s ease-in-out infinite;
}
.project-card:nth-child(2) { animation-delay: -1.6s; }
.project-card:nth-child(3) { animation-delay: -3.2s; }
@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.project-card:hover { box-shadow: 0 0 30px rgba(0,255,170,.38); }
.project-card::after {
  content: '';
  position: absolute;
  inset: -120% 40% auto -40%;
  height: 180%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(0,255,255,.18), transparent);
  transition: transform .4s ease;
}
.project-card:hover::after { transform: rotate(18deg) translateX(42%); }
.project-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0,255,170,.25);
}
.project-card h3 { color: var(--green); margin: 10px 0 6px; }
.project-card p { margin: 0; color: #adfadd; font-size: .92rem; line-height: 1.6; }

.project-panel {
  position: fixed; right: -480px; top: 0; bottom: 0;
  width: min(440px, 100vw);
  z-index: 220;
  background: #04110d;
  border-left: 1px solid var(--line);
  padding: 20px;
  transition: right .35s ease;
}
.project-panel.open { right: 0; }
.project-panel img { width: 100%; border-radius: 10px; border: 1px solid var(--line); margin: 34px 0 12px; }
.project-panel h3 { color: var(--cyan); margin: 0 0 8px; font-family: Orbitron, sans-serif; }
.panel-tags { color: #98ffe0; font-size: .85rem; margin: 0 0 8px; }
.panel-close {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  color: var(--green); background: transparent; border: 1px solid var(--line);
  cursor: pointer;
}

.skills-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
}
.neural-map {
  position: relative;
  border-radius: 16px;
  min-height: 260px;
}
.neural-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.neural-map line { stroke: rgba(0,255,190,.4); stroke-width: .9; }
.node {
  position: absolute;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(0,255,255,.95);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.4); } }
.n1{left:12%;top:18%}.n2{left:50%;top:24%}.n3{left:82%;top:16%}
.n4{left:20%;top:72%}.n5{left:50%;top:62%}.n6{left:80%;top:78%}

.skill-bars { border-radius: 16px; padding: 14px; }
.skill { margin-bottom: 14px; }
.skill span { display: block; margin-bottom: 6px; color: #bbffe8; }
.bar { height: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.4); border-radius: 999px; overflow: hidden; }
.bar i {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  box-shadow: 0 0 20px rgba(0,255,200,.6);
}
.skill:hover .bar i { filter: brightness(1.2); }

.contact-box { border-radius: 16px; padding: 20px; }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-tile {
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}
.stat-tile h3 {
  margin: 0 0 6px;
  color: var(--green);
  font-family: Orbitron, sans-serif;
  font-size: 1.5rem;
}
.stat-tile p { margin: 0; color: #a5f9da; font-size: .88rem; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.info-card {
  border-radius: 18px;
  padding: 18px;
}
.info-card h3 {
  margin: 0 0 10px;
  color: var(--green);
  font-family: Orbitron, sans-serif;
}
.info-card p {
  margin: 0 0 10px;
  color: #b6ffe7;
}
.list-neo {
  margin: 0;
  padding: 0 0 0 16px;
  color: #bafee8;
}
.list-neo li { margin: 0 0 8px; }

.reveal { opacity: 0; transform: translateY(35px); }

@media (max-width: 980px) {
  .project-grid { grid-template-columns: 1fr 1fr; }
  .skills-wrap { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .hero-hud { position: static; margin: 0 auto 12px; width: min(720px, 92%); pointer-events: auto; }
}
@media (max-width: 700px) {
  .project-grid { grid-template-columns: 1fr; }
  .top-nav nav { display: none; }
  .section::before { display: none; }
}
