/* ===========================
   MR V — VICTORIZA.COM
   Retro arcade / CRT theme
   =========================== */

:root {
  --bg: #050a05;
  --bg-2: #0a140a;
  --green: #39ff14;
  --green-dim: #1fa810;
  --green-dark: #0b3b08;
  --amber: #ffb000;
  --magenta: #ff2bd6;
  --cyan: #00f0ff;
  --red: #ff2a2a;
  --white: #e7ffe7;
  --muted: #6fa56f;
  --shadow: 0 0 8px var(--green), 0 0 18px rgba(57,255,20,0.45);
}

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

html, body {
  background: var(--bg);
  color: var(--green);
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 20px;
  line-height: 1.5;
  overflow-x: hidden;
  scroll-behavior: smooth;
  min-height: 100%;
}

body {
  position: relative;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(57,255,20,0.10), transparent 60%),
    radial-gradient(ellipse at 50% 110%, rgba(0,240,255,0.07), transparent 60%),
    var(--bg);
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--white); text-shadow: var(--shadow); }

/* Background canvas (stars + invaders) */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

/* CRT scanlines + flicker */
.crt {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,0.18) 0px,
      rgba(0,0,0,0.18) 1px,
      transparent 2px,
      transparent 3px
    );
  mix-blend-mode: multiply;
  animation: flicker 6s infinite steps(60);
}
.crt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(57,255,20,0.03), rgba(57,255,20,0.03));
  pointer-events: none;
}
.vignette {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.85) 100%);
}

@keyframes flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.85; }
  98% { opacity: 0.95; }
  99% { opacity: 0.7; }
}

/* HUD */
.hud {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 24px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  border-bottom: 2px solid var(--green-dark);
  background: rgba(5,10,5,0.65);
  backdrop-filter: blur(2px);
}
.hud-left { text-align: left; }
.hud-center { text-align: center; color: var(--amber); }
.hud-right { text-align: right; }
.hud-label { color: var(--red); margin-right: 10px; animation: blink 1s steps(2) infinite; }
.hud-score { color: var(--white); }

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

main { position: relative; z-index: 2; }

/* HERO */
.hero {
  min-height: calc(100vh - 50px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.hero-inner { max-width: 900px; }

.logo-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 30px;
}

/* CSS pixel-art invaders (3 colors, animated) */
.invader {
  width: 56px;
  height: 56px;
  display: inline-block;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 0 8px var(--green));
  animation: bob 1s infinite steps(2);
}
.invader-a { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 8' shape-rendering='crispEdges'><g fill='%2339ff14'><rect x='2' y='0' width='1' height='1'/><rect x='8' y='0' width='1' height='1'/><rect x='3' y='1' width='1' height='1'/><rect x='7' y='1' width='1' height='1'/><rect x='2' y='2' width='7' height='1'/><rect x='1' y='3' width='2' height='1'/><rect x='4' y='3' width='3' height='1'/><rect x='8' y='3' width='2' height='1'/><rect x='0' y='4' width='11' height='1'/><rect x='0' y='5' width='1' height='1'/><rect x='2' y='5' width='1' height='1'/><rect x='8' y='5' width='1' height='1'/><rect x='10' y='5' width='1' height='1'/><rect x='3' y='6' width='2' height='1'/><rect x='6' y='6' width='2' height='1'/></g></svg>"); }
.invader-b { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 8' shape-rendering='crispEdges'><g fill='%2300f0ff'><rect x='5' y='0' width='1' height='1'/><rect x='4' y='1' width='3' height='1'/><rect x='3' y='2' width='5' height='1'/><rect x='2' y='3' width='2' height='1'/><rect x='5' y='3' width='1' height='1'/><rect x='7' y='3' width='2' height='1'/><rect x='1' y='4' width='9' height='1'/><rect x='0' y='5' width='1' height='1'/><rect x='2' y='5' width='1' height='1'/><rect x='8' y='5' width='1' height='1'/><rect x='10' y='5' width='1' height='1'/><rect x='1' y='6' width='1' height='1'/><rect x='4' y='6' width='3' height='1'/><rect x='9' y='6' width='1' height='1'/></g></svg>"); animation-delay: 0.2s; }
.invader-c { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' shape-rendering='crispEdges'><g fill='%23ff2bd6'><rect x='0' y='1' width='1' height='1'/><rect x='11' y='1' width='1' height='1'/><rect x='2' y='2' width='1' height='1'/><rect x='9' y='2' width='1' height='1'/><rect x='1' y='3' width='2' height='1'/><rect x='4' y='3' width='1' height='1'/><rect x='7' y='3' width='1' height='1'/><rect x='9' y='3' width='2' height='1'/><rect x='0' y='4' width='12' height='1'/><rect x='1' y='5' width='1' height='1'/><rect x='4' y='5' width='1' height='1'/><rect x='7' y='5' width='1' height='1'/><rect x='10' y='5' width='1' height='1'/><rect x='2' y='6' width='1' height='1'/><rect x='9' y='6' width='1' height='1'/></g></svg>"); animation-delay: 0.4s; }

@keyframes bob {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(48px, 14vw, 160px);
  color: var(--green);
  letter-spacing: 6px;
  text-shadow:
    0 0 6px var(--green),
    0 0 18px rgba(57,255,20,0.7),
    4px 4px 0 var(--green-dark);
  margin-bottom: 18px;
  position: relative;
  display: inline-block;
}

/* Glitch */
.glitch { position: relative; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.glitch::before {
  color: var(--magenta);
  transform: translate(2px, 0);
  mix-blend-mode: screen;
  animation: glitch1 2.8s infinite steps(40);
}
.glitch::after {
  color: var(--cyan);
  transform: translate(-2px, 0);
  mix-blend-mode: screen;
  animation: glitch2 3.4s infinite steps(40);
}
@keyframes glitch1 {
  0%, 92%, 100% { clip-path: inset(0 0 95% 0); transform: translate(2px,0);}
  93% { clip-path: inset(20% 0 60% 0); transform: translate(4px,-2px);}
  95% { clip-path: inset(60% 0 20% 0); transform: translate(-4px,2px);}
}
@keyframes glitch2 {
  0%, 88%, 100% { clip-path: inset(95% 0 0 0); transform: translate(-2px,0);}
  90% { clip-path: inset(50% 0 30% 0); transform: translate(-5px,1px);}
  92% { clip-path: inset(10% 0 70% 0); transform: translate(5px,-1px);}
}

.subtitle {
  font-family: 'Press Start 2P', monospace;
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 3px;
  margin-bottom: 22px;
  animation: blink 1.2s steps(2) infinite;
}

.tagline {
  font-size: 24px;
  color: var(--white);
  margin-bottom: 30px;
}
.tagline .muted { color: var(--muted); font-size: 18px; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 30px;
}

.btn {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  padding: 14px 20px;
  border: 2px solid var(--green);
  color: var(--green);
  background: rgba(11, 59, 8, 0.4);
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 4px 4px 0 var(--green-dark);
  position: relative;
}
.btn:hover {
  background: var(--green);
  color: var(--bg);
  text-shadow: none;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--green-dark), 0 0 18px var(--green);
}
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--green-dark); }
.btn-primary {
  background: var(--green);
  color: var(--bg);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 4px 4px 0 var(--green-dark), 0 0 0 var(--green); }
  50% { box-shadow: 4px 4px 0 var(--green-dark), 0 0 25px var(--green); }
}

.insert-coin {
  margin-top: 20px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--amber);
  animation: blink 0.9s steps(2) infinite;
}

/* PANELS */
.panel {
  position: relative;
  max-width: 1100px;
  margin: 60px auto;
  padding: 40px 28px;
  background: rgba(5, 12, 5, 0.7);
  border: 2px solid var(--green-dim);
  box-shadow: 0 0 0 4px var(--bg), 0 0 24px rgba(57,255,20,0.25);
}
.panel::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px dashed var(--green-dim);
  pointer-events: none;
  opacity: 0.4;
}

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  color: var(--green);
  margin-bottom: 8px;
  text-shadow: 2px 2px 0 var(--green-dark);
}
.panel-sub {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 30px;
}
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  border: 2px solid var(--green-dim);
  padding: 22px;
  background: rgba(11, 30, 11, 0.5);
  position: relative;
}
.card h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--amber);
  margin-bottom: 12px;
}
.card p { color: var(--white); margin-bottom: 10px; }
.card .muted-line { color: var(--muted); font-size: 17px; }
.card .quote {
  font-size: 26px;
  color: var(--cyan);
  border-left: 3px solid var(--cyan);
  padding-left: 12px;
  margin: 8px 0 14px;
}

.hobbies-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--amber);
  margin-top: 14px;
  margin-bottom: 8px !important;
  letter-spacing: 1px;
}
.hobbies {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
}
.hobbies li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 2px solid var(--green-dim);
  background: rgba(11, 30, 11, 0.6);
  color: var(--white);
  font-size: 18px;
  box-shadow: 3px 3px 0 var(--green-dark);
  transition: transform 0.15s, box-shadow 0.15s;
}
.hobbies li:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--green-dark), 0 0 12px rgba(57,255,20,0.4);
}
.hobby-ico { font-size: 20px; filter: drop-shadow(0 0 4px var(--green)); }

/* STATS */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 20px;
}
@media (max-width: 720px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

.stats-row-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .stats-row-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stats-row-5 { grid-template-columns: repeat(2, 1fr); } }

.stat {
  text-align: center;
  padding: 18px 10px;
  border: 2px solid var(--green-dim);
  background: rgba(11, 30, 11, 0.4);
}
.stat-num {
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 28px;
  color: var(--green);
  text-shadow: 0 0 10px var(--green);
  margin-bottom: 8px;
}
.stat-lbl {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 1px;
  font-family: 'Press Start 2P', monospace;
}

/* PROJECTS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .projects-grid { grid-template-columns: 1fr; } }

.project {
  display: block;
  position: relative;
  padding: 24px;
  border: 2px solid var(--green-dim);
  background: rgba(11, 30, 11, 0.5);
  color: var(--white);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: left;
}
.project:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--green-dark), 0 0 24px rgba(57,255,20,0.4);
}
.project.featured {
  border-color: var(--amber);
  box-shadow: 0 0 24px rgba(255,176,0,0.35);
}
.project.featured:hover { box-shadow: 6px 6px 0 #5a3e00, 0 0 30px var(--amber); }

.project-badge {
  position: absolute;
  top: -12px;
  left: 16px;
  background: var(--bg);
  border: 2px solid var(--green-dim);
  padding: 4px 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--green);
}
.project.featured .project-badge {
  border-color: var(--amber);
  color: var(--amber);
}
.project.locked .project-badge {
  border-color: var(--red);
  color: var(--red);
  animation: blink 1.6s steps(2) infinite;
}

.project-pixel {
  font-size: 56px;
  line-height: 1;
  margin: 6px 0 14px;
  filter: drop-shadow(0 0 8px var(--green));
}
.project h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--green);
  margin-bottom: 10px;
}
.project p { color: var(--muted); margin-bottom: 14px; }
.project-link {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--amber);
}
.project.locked { opacity: 0.85; }
.project.locked .project-pixel { filter: grayscale(0.6) drop-shadow(0 0 6px var(--red)); }

/* CHARTS */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 28px;
}
.chart-wide { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .charts-grid { grid-template-columns: 1fr; }
  .chart-wide { grid-column: auto; }
}
.chart-card {
  border: 2px solid var(--green-dim);
  background: rgba(11, 30, 11, 0.5);
  padding: 22px;
}
.chart-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: var(--amber);
  margin-bottom: 18px;
  letter-spacing: 1px;
}

/* Donut (single value) */
.donut-wrap { display: flex; justify-content: center; }
.donut { width: 180px; height: 180px; }
.donut-track {
  fill: none;
  stroke: var(--green-dark);
  stroke-width: 14;
}
.donut-fill {
  fill: none;
  stroke: var(--green);
  stroke-width: 14;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  filter: drop-shadow(0 0 6px var(--green));
  stroke-dasharray: 0 999;
  transition: stroke-dasharray 1.6s cubic-bezier(.2,.8,.2,1);
}
.donut-pct {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  fill: var(--white);
}
.donut-sub {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  fill: var(--muted);
}

/* Multi-segment ring */
.ring { width: 100%; max-width: 260px; height: auto; display: block; margin: 0 auto; }
.ring-seg {
  fill: none;
  stroke-width: 22;
  stroke-linecap: butt;
  transform: rotate(-90deg);
  transform-origin: 100px 100px;
  filter: drop-shadow(0 0 4px currentColor);
  stroke-dasharray: 0 999;
  transition: stroke-dasharray 1.4s cubic-bezier(.2,.8,.2,1);
}

/* Legend */
.legend {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 14px;
  margin-top: 16px;
  padding: 0;
}
.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--white);
}
.legend .swatch {
  width: 12px;
  height: 12px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.legend .pct { color: var(--muted); margin-left: auto; font-family: 'Press Start 2P', monospace; font-size: 10px; }

/* Bars */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 60px;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: var(--white);
}
.bar-row .bar-name { color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track {
  height: 14px;
  background: var(--green-dark);
  position: relative;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(
    90deg,
    var(--green) 0 6px,
    var(--green-dim) 6px 8px
  );
  box-shadow: 0 0 8px var(--green);
  transition: width 1.4s cubic-bezier(.2,.8,.2,1);
}
.bar-row .bar-val {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--amber);
  text-align: right;
}
@media (max-width: 600px) {
  .bar-row { grid-template-columns: 110px 1fr 40px; font-size: 14px; }
}

/* Hall of fame */
.hof {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  padding: 0;
}
.hof li {
  border: 2px solid var(--amber);
  background: rgba(60, 40, 0, 0.35);
  padding: 12px 14px;
  color: var(--white);
  font-size: 17px;
  position: relative;
  box-shadow: 3px 3px 0 #5a3e00;
  transition: transform 0.15s, box-shadow 0.15s;
}
.hof li:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #5a3e00, 0 0 14px var(--amber);
}
.hof li::before {
  content: "★";
  color: var(--amber);
  margin-right: 8px;
  filter: drop-shadow(0 0 4px var(--amber));
}
.hof .hof-meta { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; padding-left: 22px; }

/* CONTACT */
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 14px;
}
.center { text-align: center; margin-top: 24px; }

/* FOOTER */
.footer {
  position: relative;
  z-index: 2;
  margin-top: 60px;
  border-top: 2px solid var(--green-dark);
  padding-top: 14px;
  background: rgba(5,10,5,0.7);
}
.marquee {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  overflow: hidden;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--green);
  padding: 10px 0;
  border-top: 1px solid var(--green-dark);
  border-bottom: 1px solid var(--green-dark);
}
.marquee span {
  display: inline-block;
  animation: scroll-left 40s linear infinite;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.copy {
  text-align: center;
  padding: 18px 10px;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 1px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
