/* === 8-BIT CV STYLES === */
:root {
  --pixel-cyan: #00f5d4;
  --pixel-pink: #ff6b9d;
  --pixel-yellow: #ffd93d;
  --pixel-purple: #c77dff;
  --pixel-green: #6bff6b;
  --pixel-orange: #ff9f1c;
  --pixel-blue: #00b4d8;
  --pixel-dark: #1a1a2e;
  --pixel-darker: #0f0f1a;
  --pixel-card: #16213e;
  --pixel-border: #0f3460;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: 'VT323', monospace;
  background: var(--pixel-darker);
  color: #e8e8e8;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated pixel background */
.pixel-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: 
    linear-gradient(135deg, var(--pixel-darker) 0%, #1a1a2e 50%, #16213e 100%);
  overflow: hidden;
}

.pixel-bg::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background-image: 
    radial-gradient(circle, var(--pixel-cyan) 1px, transparent 1px),
    radial-gradient(circle, var(--pixel-pink) 1px, transparent 1px),
    radial-gradient(circle, var(--pixel-yellow) 1px, transparent 1px);
  background-size: 50px 50px, 70px 70px, 90px 90px;
  background-position: 0 0, 25px 25px, 50px 10px;
  animation: floatPixels 60s linear infinite;
  opacity: 0.3;
}

@keyframes floatPixels {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-50%, -50%); }
}

/* Main container */
.cv-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  position: relative;
}

/* === HEADER === */
.cv-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(180deg, var(--pixel-card) 0%, var(--pixel-dark) 100%);
  border: 4px solid var(--pixel-cyan);
  border-radius: 0;
  margin-bottom: 2rem;
  position: relative;
  box-shadow: 
    0 0 0 4px var(--pixel-dark),
    0 0 0 8px var(--pixel-pink),
    0 0 40px rgba(0, 245, 212, 0.3),
    inset 0 0 60px rgba(0, 245, 212, 0.1);
}

.cv-header::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--pixel-cyan), var(--pixel-pink), var(--pixel-yellow), var(--pixel-purple), var(--pixel-cyan));
  background-size: 400% 400%;
  z-index: -1;
  animation: gradientBorder 8s ease infinite;
  filter: blur(3px);
}

@keyframes gradientBorder {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Pixel Avatar */
.pixel-avatar {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
  position: relative;
  image-rendering: pixelated;
}

.avatar-pixel {
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, var(--pixel-cyan) 20%, transparent 20%),
    linear-gradient(90deg, transparent 80%, var(--pixel-pink) 80%),
    linear-gradient(180deg, var(--pixel-yellow) 20%, transparent 20%),
    linear-gradient(180deg, transparent 80%, var(--pixel-purple) 80%),
    var(--pixel-dark);
  border: 4px solid var(--pixel-cyan);
  animation: avatarPulse 2s ease-in-out infinite;
  box-shadow: 
    8px 8px 0 var(--pixel-pink),
    -8px -8px 0 var(--pixel-yellow);
}

@keyframes avatarPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Glitch effect for name */
.glitch {
  font-family: 'Press Start 2P', cursive;
  font-size: 3.1rem;
  color: #fff;
  text-shadow: 
    0 0 10px var(--pixel-cyan),
    0 0 20px var(--pixel-cyan),
    0 0 40px var(--pixel-cyan);
  position: relative;
  animation: glitchText 3s infinite;
  letter-spacing: 8px;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  color: var(--pixel-pink);
  animation: glitch1 0.3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  transform: translate(-2px, -2px);
}

.glitch::after {
  color: var(--pixel-cyan);
  animation: glitch2 0.3s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  transform: translate(2px, 2px);
}

@keyframes glitch1 {
  0%, 100% { transform: translate(-2px, -2px); }
  25% { transform: translate(2px, 0); }
  50% { transform: translate(-1px, 2px); }
  75% { transform: translate(1px, -1px); }
}

@keyframes glitch2 {
  0%, 100% { transform: translate(2px, 2px); }
  25% { transform: translate(-2px, 0); }
  50% { transform: translate(1px, -2px); }
  75% { transform: translate(-1px, 1px); }
}

@keyframes glitchText {
  0%, 90%, 100% { opacity: 1; }
  91% { opacity: 0.8; }
  92% { opacity: 1; }
  93% { opacity: 0.9; }
}

.title-tag {
  font-size: 1.5rem;
  color: var(--pixel-yellow);
  margin: 1rem 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.status-item {
  background: var(--pixel-darker);
  border: 2px solid var(--pixel-purple);
  padding: 0.5rem 1rem;
  font-size: 1.1rem;
  color: var(--pixel-green);
  box-shadow: 4px 4px 0 var(--pixel-purple);
}

.pixel-icon {
  margin-right: 0.3rem;
}

/* === SECTIONS === */
.cv-section {
  margin-bottom: 2rem;
  background: var(--pixel-card);
  border: 4px solid var(--pixel-border);
  padding: 1.5rem;
  position: relative;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
}

.cv-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--pixel-cyan), var(--pixel-pink), var(--pixel-yellow), var(--pixel-purple));
}

.section-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2rem;
  color: var(--pixel-cyan);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-shadow: 2px 2px 0 var(--pixel-dark);
}

.title-icon {
  font-size: 1.4rem;
}

/* Pixel Card */
.pixel-card {
  background: var(--pixel-darker);
  border: 2px solid var(--pixel-border);
  padding: 1.5rem;
  font-size: 1.3rem;
  line-height: 1.8;
}

.pixel-card p {
  margin-bottom: 1rem;
}

.pixel-card p:last-child {
  margin-bottom: 0;
}

.highlight {
  color: var(--pixel-cyan);
  font-weight: bold;
  text-shadow: 0 0 10px var(--pixel-cyan);
}

.highlight-cyan { color: var(--pixel-cyan); text-shadow: 0 0 8px var(--pixel-cyan); }
.highlight-pink { color: var(--pixel-pink); text-shadow: 0 0 8px var(--pixel-pink); }
.highlight-yellow { color: var(--pixel-yellow); text-shadow: 0 0 8px var(--pixel-yellow); }

/* === SKILLS === */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.skill-bar {
  background: var(--pixel-darker);
  border: 2px solid var(--pixel-border);
  padding: 0.75rem 1rem;
  position: relative;
  overflow: hidden;
}

.skill-name {
  position: relative;
  z-index: 2;
  font-size: 1.2rem;
  color: #fff;
}

.bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--skill-level);
  background: linear-gradient(90deg, var(--pixel-cyan), var(--pixel-purple));
  opacity: 0.3;
  animation: fillPulse 2s ease-in-out infinite;
}

@keyframes fillPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}

/* === EXPERIENCE === */
.experience-card {
  background: var(--pixel-darker);
  border: 2px solid var(--pixel-border);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.experience-card:last-child {
  margin-bottom: 0;
}

.exp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(90deg, rgba(0, 245, 212, 0.1), transparent);
  border-bottom: 2px solid var(--pixel-border);
}

.company-badge {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  background: var(--pixel-cyan);
  color: var(--pixel-dark);
  padding: 0.5rem 0.75rem;
  box-shadow: 4px 4px 0 rgba(0, 245, 212, 0.3);
}

.company-badge.pink {
  background: var(--pixel-pink);
  box-shadow: 4px 4px 0 rgba(255, 107, 157, 0.3);
}

.role-title {
  font-size: 1.3rem;
  color: #fff;
  flex: 1;
}

.exp-date {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  color: var(--pixel-yellow);
  border: 2px solid var(--pixel-yellow);
  padding: 0.3rem 0.5rem;
}

.achievement-list {
  list-style: none;
  padding: 1rem;
}

.achievement-list li {
  padding: 0.5rem 0;
  font-size: 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.bullet {
  color: var(--pixel-green);
  font-size: 1.3rem;
}

/* === TECH GRID === */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-tag {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  padding: 0.6rem 1rem;
  background: var(--pixel-darker);
  border: 2px solid var(--pixel-purple);
  color: var(--pixel-purple);
  transition: all 0.2s ease;
  cursor: default;
}

.tech-tag:nth-child(odd) {
  border-color: var(--pixel-cyan);
  color: var(--pixel-cyan);
}

.tech-tag:nth-child(3n) {
  border-color: var(--pixel-pink);
  color: var(--pixel-pink);
}

.tech-tag:nth-child(4n) {
  border-color: var(--pixel-yellow);
  color: var(--pixel-yellow);
}

.tech-tag:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 currentColor;
}

/* === FOOTER === */
.cv-footer {
  text-align: center;
  padding: 2rem;
  margin-top: 1rem;
}

.footer-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: var(--pixel-yellow);
  animation: blink 1s step-start infinite;
  margin-bottom: 1.5rem;
}

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

.footer-pixels {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.pixel {
  width: 16px;
  height: 16px;
  animation: pixelDance 0.5s ease-in-out infinite;
}

.p1 { background: var(--pixel-cyan); animation-delay: 0s; }
.p2 { background: var(--pixel-pink); animation-delay: 0.1s; }
.p3 { background: var(--pixel-yellow); animation-delay: 0.2s; }
.p4 { background: var(--pixel-purple); animation-delay: 0.3s; }
.p5 { background: var(--pixel-green); animation-delay: 0.4s; }

@keyframes pixelDance {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .cv-container { padding: 1rem; }
  .glitch { font-size: 2.1rem; letter-spacing: 4px; }
  .cv-header { padding: 2rem 1rem; }
  .section-title { font-size: 1rem; }
  .status-bar { flex-direction: column; }
  .exp-header { flex-direction: column; align-items: flex-start; }
  .skills-grid { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
  .cv-header { flex-direction: row; text-align: left; gap: 2rem; }
  .cv-header .header-content { flex: 1; }
  .status-bar { justify-content: flex-start; }
}
