/* ============================================
   CHARACTERS.CSS — CSS Art Characters
   Pantheon-style digital silhouettes with
   upload & thinking animations
   ============================================ */

/* ========== STEVE JOBS — FEATURED PORTRAIT ========== */
.character-portrait {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 140px;
  z-index: 2;
}

.portrait-figure {
  position: relative;
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.3));
  animation: figure-float 6s ease-in-out infinite;
}

@keyframes figure-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Head */
.jobs-portrait .head {
  width: 52px; height: 58px;
  background: linear-gradient(180deg, #d4a574 0%, #c4956a 100%);
  border-radius: 50% 50% 45% 45%;
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  overflow: visible;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.15);
}

.jobs-portrait .hair {
  position: absolute;
  top: -3px; left: -4px; right: -4px;
  height: 26px;
  background: #2a2a2a;
  border-radius: 50% 50% 30% 30%;
  z-index: 1;
}

.jobs-portrait .face {
  position: absolute;
  top: 18px; left: 0; right: 0;
  z-index: 2;
}

/* Iconic round glasses */
.jobs-portrait .glasses {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}

.jobs-portrait .lens {
  width: 16px; height: 16px;
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  background: rgba(200, 220, 255, 0.08);
  position: relative;
}

.jobs-portrait .lens::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 4px; height: 4px;
  background: #1a1a1a;
  border-radius: 50%;
}

.jobs-portrait .bridge {
  width: 4px; height: 2px;
  background: #1a1a1a;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.jobs-portrait .nose {
  width: 4px; height: 6px;
  background: #b8865e;
  border-radius: 0 0 50% 50%;
  margin: 3px auto 0;
}

.jobs-portrait .mouth {
  width: 12px; height: 3px;
  border-bottom: 2px solid #8b6040;
  border-radius: 0 0 50% 50%;
  margin: 2px auto 0;
}

/* Black turtleneck */
.jobs-portrait .neck {
  width: 16px; height: 10px;
  background: #c4956a;
  margin: 0 auto;
  position: absolute;
  top: 56px; left: 50%;
  transform: translateX(-50%);
}

.jobs-portrait .turtleneck {
  width: 72px; height: 60px;
  background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
  border-radius: 20px 20px 4px 4px;
  position: absolute;
  top: 62px; left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.jobs-portrait .turtleneck::before {
  content: '';
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 12px;
  border: 3px solid #222;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

/* ========== UPLOAD THINKING EFFECT ========== */

/* Scanning beam */
.upload-beam {
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 200px;
  background: linear-gradient(
    to top,
    rgba(0, 229, 255, 0.25),
    rgba(0, 229, 255, 0.08) 30%,
    transparent 80%
  );
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
  animation: beam-pulse 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes beam-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Thinking particles — float up from head */
.think-particles {
  position: absolute;
  top: -30px; left: 0; right: 0;
  height: 180px;
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
}

.think-particles i {
  position: absolute;
  display: block;
  width: 3px; height: 3px;
  background: var(--cyan);
  border-radius: 50%;
  opacity: 0;
  animation: particle-rise 4s linear infinite;
}

.think-particles i:nth-child(1)  { left: 20%; animation-delay: 0s;    width: 2px; height: 2px; }
.think-particles i:nth-child(2)  { left: 35%; animation-delay: 0.3s;  width: 3px; height: 3px; }
.think-particles i:nth-child(3)  { left: 50%; animation-delay: 0.6s;  width: 2px; height: 2px; }
.think-particles i:nth-child(4)  { left: 65%; animation-delay: 0.9s;  width: 4px; height: 4px; }
.think-particles i:nth-child(5)  { left: 80%; animation-delay: 1.2s;  width: 2px; height: 2px; }
.think-particles i:nth-child(6)  { left: 15%; animation-delay: 1.5s;  width: 3px; height: 3px; }
.think-particles i:nth-child(7)  { left: 45%; animation-delay: 1.8s;  width: 2px; height: 2px; }
.think-particles i:nth-child(8)  { left: 70%; animation-delay: 2.1s;  width: 3px; height: 3px; }
.think-particles i:nth-child(9)  { left: 30%; animation-delay: 2.4s;  width: 2px; height: 2px; }
.think-particles i:nth-child(10) { left: 55%; animation-delay: 2.7s;  width: 4px; height: 4px; }
.think-particles i:nth-child(11) { left: 25%; animation-delay: 0.2s;  width: 2px; height: 2px; background: var(--purple); }
.think-particles i:nth-child(12) { left: 40%; animation-delay: 0.7s;  width: 3px; height: 3px; background: var(--purple); }
.think-particles i:nth-child(13) { left: 60%; animation-delay: 1.1s;  width: 2px; height: 2px; }
.think-particles i:nth-child(14) { left: 75%; animation-delay: 1.6s;  width: 3px; height: 3px; background: var(--purple); }
.think-particles i:nth-child(15) { left: 10%; animation-delay: 2.0s;  width: 2px; height: 2px; }
.think-particles i:nth-child(16) { left: 85%; animation-delay: 0.5s;  width: 2px; height: 2px; background: var(--purple); }
.think-particles i:nth-child(17) { left: 42%; animation-delay: 1.3s;  width: 3px; height: 3px; }
.think-particles i:nth-child(18) { left: 58%; animation-delay: 2.2s;  width: 2px; height: 2px; background: var(--purple); }
.think-particles i:nth-child(19) { left: 22%; animation-delay: 1.7s;  width: 4px; height: 4px; }
.think-particles i:nth-child(20) { left: 68%; animation-delay: 2.6s;  width: 2px; height: 2px; }

@keyframes particle-rise {
  0%   { bottom: 0; opacity: 0; transform: translateX(0); }
  10%  { opacity: 0.8; }
  50%  { opacity: 0.6; transform: translateX(10px); }
  90%  { opacity: 0.1; }
  100% { bottom: 180px; opacity: 0; transform: translateX(-5px); }
}

/* Scanline overlay */
.upload-effect {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}

.scanline {
  position: absolute;
  top: -2px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
  animation: scanline-sweep 4s linear infinite;
  box-shadow: 0 0 12px var(--cyan), 0 0 30px rgba(0, 229, 255, 0.2);
}

@keyframes scanline-sweep {
  0%   { top: -2px; }
  100% { top: 100%; }
}

/* Data stream */
.data-stream {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
}

.data-stream span {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--cyan);
  opacity: 0;
  animation: data-fall 6s linear infinite;
  letter-spacing: 1px;
}

.data-stream span:nth-child(1)  { left: 5%;  animation-delay: 0s; }
.data-stream span:nth-child(2)  { left: 15%; animation-delay: 0.7s; }
.data-stream span:nth-child(3)  { left: 25%; animation-delay: 1.4s; }
.data-stream span:nth-child(4)  { left: 35%; animation-delay: 2.1s; }
.data-stream span:nth-child(5)  { left: 50%; animation-delay: 0.3s; }
.data-stream span:nth-child(6)  { left: 60%; animation-delay: 1.0s; }
.data-stream span:nth-child(7)  { left: 70%; animation-delay: 1.7s; }
.data-stream span:nth-child(8)  { left: 80%; animation-delay: 2.4s; }
.data-stream span:nth-child(9)  { left: 90%; animation-delay: 0.5s; }
.data-stream span:nth-child(10) { left: 45%; animation-delay: 1.2s; }
.data-stream span:nth-child(11) { left: 55%; animation-delay: 1.9s; }
.data-stream span:nth-child(12) { left: 10%; animation-delay: 2.6s; }

@keyframes data-fall {
  0%   { top: -10%; opacity: 0; }
  5%   { opacity: 0.15; }
  95%  { opacity: 0.15; }
  100% { top: 110%; opacity: 0; }
}

/* Glitch effect on portrait */
.portrait-figure::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    transparent 0%,
    rgba(0, 229, 255, 0.03) 50%,
    transparent 100%
  );
  animation: glitch-flicker 8s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
}

@keyframes glitch-flicker {
  0%, 90%, 100% { opacity: 0; }
  92% { opacity: 1; transform: translateX(-2px); }
  94% { opacity: 0; }
  96% { opacity: 1; transform: translateX(2px); }
  98% { opacity: 0; transform: translateX(0); }
}


/* ========== MINI CHARACTER CARDS ========== */
.char-mini {
  width: 56px; height: 56px;
  border-radius: 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0d1117, #161b22);
}

.char-mini .mini-head {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #c4956a, #b8865e);
  position: relative;
  z-index: 2;
  margin-bottom: 2px;
}

.char-mini .mini-body {
  width: 30px; height: 18px;
  border-radius: 8px 8px 2px 2px;
  background: #1a1a1a;
  z-index: 1;
}

/* Mini upload effect glow */
.mini-upload-fx {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 56px;
  background: linear-gradient(to top, rgba(0, 229, 255, 0.2), transparent 70%);
  animation: mini-beam 3s ease-in-out infinite;
  z-index: 0;
}

@keyframes mini-beam {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* Steve Jobs mini — glasses */
.jobs-mini .mini-head::before {
  content: '';
  position: absolute;
  top: 8px; left: 2px;
  width: 7px; height: 7px;
  border: 1.5px solid #222;
  border-radius: 50%;
}
.jobs-mini .mini-head::after {
  content: '';
  position: absolute;
  top: 8px; right: 2px;
  width: 7px; height: 7px;
  border: 1.5px solid #222;
  border-radius: 50%;
}
.jobs-mini .mini-glasses span {
  display: none;
}
.jobs-mini .mini-head {
  background: linear-gradient(180deg, #2a2a2a 40%, #c4956a 40%);
}
.jobs-mini .mini-body {
  background: #111;
}

/* Elon Musk mini */
.musk-mini .mini-head {
  background: linear-gradient(180deg, #3a3020 35%, #c4956a 35%);
}
.musk-mini .mini-face-m {
  display: none;
}
.musk-mini .mini-body.suit {
  background: linear-gradient(180deg, #1a1a2e, #16213e);
}

/* Tesla mini — mustache */
.tesla-mini .mini-head {
  background: linear-gradient(180deg, #2a2a2a 35%, #c4956a 35%);
}
.tesla-mini .mini-mustache {
  position: absolute;
  bottom: 5px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 3px;
  background: #2a2a2a;
  border-radius: 0 0 4px 4px;
}
.tesla-mini .mini-body.vintage {
  background: linear-gradient(180deg, #2d2d2d, #1a1a1a);
}

/* Lovelace mini — long hair */
.lovelace-mini .mini-head {
  background: linear-gradient(180deg, #4a2828 30%, #d4a574 30%);
}
.lovelace-mini .mini-hair-f {
  position: absolute;
  top: -2px; left: -4px; right: -4px;
  height: 14px;
  background: #4a2828;
  border-radius: 50% 50% 30% 30%;
}
.lovelace-mini .mini-hair-f::before,
.lovelace-mini .mini-hair-f::after {
  content: '';
  position: absolute;
  bottom: -6px;
  width: 5px; height: 10px;
  background: #4a2828;
  border-radius: 0 0 50% 50%;
}
.lovelace-mini .mini-hair-f::before { left: 0; }
.lovelace-mini .mini-hair-f::after { right: 0; }
.lovelace-mini .mini-body.dress {
  background: linear-gradient(180deg, #3d1b5c, #2d1b3d);
  border-radius: 6px 6px 12px 12px;
}

/* Feynman mini — curly hair */
.feynman-mini .mini-head {
  background: linear-gradient(180deg, #5a4030 30%, #c4956a 30%);
}
.feynman-mini .mini-curly {
  position: absolute;
  top: -3px; left: -3px; right: -3px;
  height: 12px;
  background: #5a4030;
  border-radius: 50%;
}
.feynman-mini .mini-curly::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 4px; height: 4px;
  background: rgba(90, 64, 48, 0.6);
  border-radius: 50%;
  box-shadow: 6px 0 0 rgba(90,64,48,0.6), 12px 0 0 rgba(90,64,48,0.6);
}
.feynman-mini .mini-body.casual {
  background: linear-gradient(180deg, #2d4a1b, #1b3a2d);
}

/* Curie mini — updo hair */
.curie-mini .mini-head {
  background: linear-gradient(180deg, #3a3a3a 25%, #c4956a 25%);
}
.curie-mini .mini-updo {
  position: absolute;
  top: -5px; left: 1px; right: 1px;
  height: 10px;
  background: #3a3a3a;
  border-radius: 50% 50% 20% 20%;
}
.curie-mini .mini-updo::before {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 6px;
  background: #3a3a3a;
  border-radius: 50%;
}
.curie-mini .mini-body.highcollar {
  background: linear-gradient(180deg, #2d2d3d, #1a1a2d);
  border-radius: 4px 4px 2px 2px;
}
.curie-mini .mini-body.highcollar::before {
  content: '';
  position: absolute;
  top: -2px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 4px;
  background: #3d3d4d;
  border-radius: 2px 2px 0 0;
}

/* ========== Card hover animation — intensify upload effect ========== */
.mind-card:hover .mini-upload-fx {
  animation: mini-beam-hover 1.5s ease-in-out infinite;
}

@keyframes mini-beam-hover {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; box-shadow: 0 0 20px rgba(0, 229, 255, 0.4); }
}

.mind-card:hover .char-mini::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--cyan);
  animation: card-scan 2s linear infinite;
  box-shadow: 0 0 8px var(--cyan);
}

@keyframes card-scan {
  0%   { top: 0; }
  100% { top: 100%; }
}
