/* Softcracy — AI / Robot / Space / Cloud animated theme (Indian engineering) */

/* ===== Animated star/space background ===== */
.space-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse at 20% 0%, rgba(25,143,217,0.12), transparent 50%),
              radial-gradient(ellipse at 80% 100%, rgba(241,142,22,0.10), transparent 50%);
}
.stars, .stars2, .stars3 { position: absolute; inset: 0; }
.stars { background-image: radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.8), transparent),
                              radial-gradient(1px 1px at 60px 120px, rgba(255,255,255,0.6), transparent),
                              radial-gradient(1.5px 1.5px at 130px 80px, rgba(45,166,240,0.7), transparent),
                              radial-gradient(1px 1px at 200px 50px, rgba(255,255,255,0.5), transparent),
                              radial-gradient(1px 1px at 280px 180px, rgba(255,255,255,0.7), transparent),
                              radial-gradient(1.5px 1.5px at 350px 90px, rgba(241,142,22,0.5), transparent),
                              radial-gradient(1px 1px at 420px 220px, rgba(255,255,255,0.6), transparent);
  background-size: 500px 300px; animation: starDrift 90s linear infinite; }
.stars2 { background-image: radial-gradient(1px 1px at 80px 60px, rgba(255,255,255,0.5), transparent),
                               radial-gradient(1px 1px at 180px 140px, rgba(45,166,240,0.4), transparent),
                               radial-gradient(1px 1px at 260px 200px, rgba(255,255,255,0.4), transparent),
                               radial-gradient(1px 1px at 380px 100px, rgba(255,255,255,0.5), transparent);
  background-size: 400px 250px; animation: starDrift 120s linear infinite reverse; }
.stars3 { background-image: radial-gradient(0.5px 0.5px at 50px 50px, rgba(255,255,255,0.4), transparent),
                               radial-gradient(0.5px 0.5px at 150px 150px, rgba(255,255,255,0.3), transparent),
                               radial-gradient(0.5px 0.5px at 250px 80px, rgba(255,255,255,0.4), transparent);
  background-size: 300px 200px; animation: starDrift 200s linear infinite; }
@keyframes starDrift { from { transform: translateY(0); } to { transform: translateY(-300px); } }

/* Floating clouds */
.cloud {
  position: absolute; opacity: 0.08; pointer-events: none;
  filter: blur(1px); animation: cloudFloat linear infinite;
}
@keyframes cloudFloat { from { transform: translateX(-200px); } to { transform: translateX(calc(100vw + 200px)); } }

/* Orbit rings */
.orbit-rings {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 600px; height: 600px; pointer-events: none; opacity: 0.4;
}
:root[data-theme="light"] .orbit-rings { opacity: 0.25; }
.orbit-ring {
  position: absolute; border: 1px solid rgba(25,143,217,0.2); border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.orbit-ring.r1 { width: 280px; height: 280px; animation: spin 20s linear infinite; }
.orbit-ring.r2 { width: 420px; height: 420px; animation: spin 30s linear infinite reverse; border-color: rgba(241,142,22,0.15); }
.orbit-ring.r3 { width: 600px; height: 600px; animation: spin 45s linear infinite; border-color: rgba(255,255,255,0.05); }
.orbit-ring::after {
  content: ''; position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary-2); top: -4px; left: 50%; transform: translateX(-50%);
  box-shadow: 0 0 12px var(--primary-2);
}
.orbit-ring.r2::after { background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.orbit-ring.r3::after { background: #fff; box-shadow: 0 0 8px #fff; }
@keyframes spin { from { transform: translate(-50%,-50%) rotate(0); } to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ===== Robot mascot ===== */
.robot-mascot { width: 200px; height: 240px; margin: 0 0 0 auto; position: relative; z-index: 2; animation: robotFloat 4s ease-in-out infinite; }
@keyframes robotFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.robot-antenna { width: 4px; height: 28px; background: var(--primary-2); margin: 0 auto; position: relative; }
.robot-antenna::after {
  content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 16px var(--accent); animation: antennaPulse 1.5s ease-in-out infinite;
}
@keyframes antennaPulse { 0%,100% { opacity: 1; transform: translateX(-50%) scale(1); } 50% { opacity: .5; transform: translateX(-50%) scale(1.3); } }
.robot-head {
  width: 130px; height: 100px; background: linear-gradient(160deg, #1a2440, #141d33);
  border: 1px solid rgba(25,143,217,0.4); border-radius: 22px; margin: 0 auto; position: relative;
  box-shadow: 0 0 30px rgba(25,143,217,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
}
:root[data-theme="light"] .robot-head {
  background: linear-gradient(160deg, #ffffff, #e8eef6);
  border-color: rgba(25,143,217,0.5); box-shadow: 0 8px 30px rgba(25,143,217,0.2), inset 0 1px 0 rgba(255,255,255,0.9);
}
.robot-eyes { display: flex; gap: 22px; justify-content: center; padding-top: 26px; }
.robot-eye {
  width: 24px; height: 24px; border-radius: 50%; background: var(--primary-2);
  box-shadow: 0 0 20px var(--primary-2); position: relative; animation: blink 4s infinite;
}
:root[data-theme="light"] .robot-eye { box-shadow: 0 0 16px rgba(45,166,240,0.5); }
.robot-eye::after { content:''; position:absolute; top:6px; left:6px; width:8px; height:8px; border-radius:50%; background:#fff; opacity:0.8; }
@keyframes blink { 0%,90%,100% { transform: scaleY(1); } 93%,96% { transform: scaleY(0.1); } }
.robot-mouth { width: 50px; height: 6px; background: var(--accent); margin: 14px auto 0; border-radius: 3px; box-shadow: 0 0 10px var(--accent); }
.robot-body {
  width: 150px; height: 100px; background: linear-gradient(160deg, #1a2440, #141d33);
  border: 1px solid rgba(25,143,217,0.3); border-radius: 16px; margin: 8px auto 0; position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
:root[data-theme="light"] .robot-body {
  background: linear-gradient(160deg, #ffffff, #e8eef6);
  border-color: rgba(25,143,217,0.4); box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.robot-chest {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 50px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 24px rgba(25,143,217,0.4);
  animation: chestGlow 2s ease-in-out infinite; overflow: hidden;
}
.robot-chest .robot-logo { width: 34px; height: 34px; object-fit: contain; display: block; border-radius: 6px; }
@keyframes chestGlow { 0%,100% { box-shadow: 0 0 24px rgba(25,143,217,0.4); } 50% { box-shadow: 0 0 40px rgba(241,142,22,0.5); } }

/* ===== Neural network animation ===== */
.neural-net { position: absolute; inset: 0; pointer-events: none; opacity: 0.3; }
.neural-line { stroke: rgba(25,143,217,0.3); stroke-width: 1; fill: none; animation: dash 3s linear infinite; }
@keyframes dash { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.neural-node { fill: var(--primary-2); animation: nodePulse 2s ease-in-out infinite; }
@keyframes nodePulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ===== India flag tricolor accent ===== */
.tricolor-bar {
  display: flex; height: 4px; border-radius: 2px; overflow: hidden; width: 60px; margin: 0 0 20px;
}
.tricolor-bar span { flex: 1; }
.tricolor-saffron { background: #ff9933; }
.tricolor-white { background: #ffffff; border-top: 1px solid rgba(15,30,60,0.1); border-bottom: 1px solid rgba(15,30,60,0.1); }
:root[data-theme="dark"] .tricolor-white { background: #f5f7fa; border: none; }
.tricolor-green { background: #138808; }

/* ===== Glowing section markers ===== */
.glow-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 100px;
  background: rgba(25,143,217,0.1); border: 1px solid rgba(25,143,217,0.3);
  color: var(--primary); font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
}
.glow-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary-2); box-shadow: 0 0 8px var(--primary-2); animation: pulse 2s infinite; }

/* ===== AI data stream animation ===== */
.data-stream { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--primary-2); opacity: 0.5; position: absolute; pointer-events: none; }
.data-stream-line { display: block; animation: streamFall 8s linear infinite; opacity: 0; }
@keyframes streamFall { 0% { opacity: 0; transform: translateY(-100%); } 10% { opacity: 0.6; } 90% { opacity: 0.6; } 100% { opacity: 0; transform: translateY(400px); } }

/* ===== Typing code panel ===== */
.type-code, .type-code-bg {
  background: #060a14; border: 1px solid rgba(25,143,217,0.25);
  border-radius: 12px; overflow: hidden; box-shadow: 0 12px 36px rgba(0,0,0,0.35);
}
:root[data-theme="light"] .type-code, :root[data-theme="light"] .type-code-bg { background: #0d1424; }
.type-code { margin-top: 22px; }
.type-code-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.08); }
.tc-dot { width: 10px; height: 10px; border-radius: 50%; }
.tc-title { margin-left: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-muted); }
.type-code-body { padding: 18px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.8; color: #e0e6f0; min-height: 180px; white-space: pre-wrap; }
.tc-line { display: block; }
.tc-prompt { color: var(--accent); font-weight: 700; }
.tc-keyword { color: #f5a23a; }
.tc-string { color: #34d399; }
.tc-comment { color: #6b7a96; }
.tc-fn { color: #2da6f0; }
.tc-cursor { display: inline-block; width: 8px; height: 15px; background: var(--primary-2); vertical-align: text-bottom; animation: blink 1s infinite; margin-left: 2px; }

/* ===== Free-floating code behind robot ===== */
.code-float {
  position: absolute; top: -20px; left: -30px; right: -30px; bottom: 80px;
  z-index: 0; pointer-events: none; overflow: hidden;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 2;
  background: #0d1117; border-radius: 14px; padding: 16px 20px;
  border: 1px solid rgba(25,143,217,0.15);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
:root[data-theme="light"] .code-float {
  background: #f8f9fb; border: 1px solid rgba(25,143,217,0.15);
  box-shadow: 0 16px 40px rgba(15,30,60,0.1);
}
.cf-line {
  position: absolute; left: 20px; right: 20px; white-space: nowrap;
  opacity: 0; transform: translateX(-20px);
  transition: opacity .8s ease, transform .8s ease;
}
.cf-line.show { opacity: 0.85; transform: translateX(0); }
:root[data-theme="light"] .cf-line.show { opacity: 0.75; }
.cf-k { color: #198fd9; }
:root[data-theme="light"] .cf-k { color: #0a5fa3; }
.cf-s { color: #f18e16; }
:root[data-theme="light"] .cf-s { color: #c2680a; }
.cf-c { color: #6b7a96; }
:root[data-theme="light"] .cf-c { color: #6a737d; }
.cf-f { color: #2da6f0; }
:root[data-theme="light"] .cf-f { color: #0a5fa3; }
.cf-p { color: #f18e16; font-weight: 600; }
:root[data-theme="light"] .cf-p { color: #c2680a; }
.cf-cursor { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: text-bottom; margin-left: 2px; animation: blink 0.8s infinite; }
.robot-mascot { position: relative; z-index: 2; }
.float-tech { z-index: 3; }
.mission-grid { position: relative; z-index: 2; }

/* ===== Floating tech badges ===== */
.float-tech {
  position: absolute; padding: 8px 14px; border-radius: 10px;
  background: rgba(20,29,51,0.85); border: 1px solid rgba(25,143,217,0.3);
  backdrop-filter: blur(10px); font-size: 12px; font-weight: 600; color: var(--text-dim);
  display: flex; align-items: center; gap: 8px; z-index: 5;
  animation: floatBadge 5s ease-in-out infinite;
}
:root[data-theme="light"] .float-tech {
  background: rgba(255,255,255,0.9); color: var(--text-dim); border-color: rgba(25,143,217,0.3);
  box-shadow: 0 4px 16px rgba(15,30,60,0.1);
}
.float-tech .ic { font-size: 16px; }
@keyframes floatBadge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ===== AI pulse cards ===== */
.ai-card-glow { position: relative; }
.ai-card-glow::after {
  content: ''; position: absolute; inset: -1px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(25,143,217,0.3), rgba(241,142,22,0.3));
  opacity: 0; transition: opacity .3s; z-index: -1; filter: blur(8px);
}
.ai-card-glow:hover::after { opacity: 1; }

/* ===== Hero badge with ISRO/Indian space feel ===== */
.hero-badge-india {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 100px;
  background: rgba(20,29,51,0.6); border: 1px solid rgba(25,143,217,0.3);
  backdrop-filter: blur(10px); font-size: 13px; font-weight: 600; margin-bottom: 24px;
  color: var(--text);
}
:root[data-theme="light"] .hero-badge-india {
  background: rgba(255,255,255,0.85); border-color: rgba(25,143,217,0.35); color: var(--text);
  box-shadow: 0 4px 14px rgba(15,30,60,0.08);
}
.hero-badge-india .flag-dot {
  width: 18px; height: 12px; border-radius: 2px; overflow: hidden; display: flex; flex-direction: column;
}
.hero-badge-india .flag-dot span { flex: 1; }

/* ===== Animated gradient heading ===== */
.animate-gradient {
  background: linear-gradient(90deg, var(--primary-2), var(--accent), var(--primary-2));
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift { 0% { background-position: 0% center; } 50% { background-position: 100% center; } 100% { background-position: 0% center; } }

/* ===== Floating rocket ===== */
.rocket-float {
  position: absolute; bottom: 10%; right: 8%; font-size: 48px;
  animation: rocketLaunch 6s ease-in-out infinite; opacity: 0.7;
}
@keyframes rocketLaunch { 0%,100% { transform: translateY(0) rotate(-45deg); } 50% { transform: translateY(-30px) rotate(-50deg); } }

/* ===== Connection grid (ISRO mission control style) ===== */
.mission-grid {
  background: rgba(20,29,51,0.5); border: 1px solid rgba(25,143,217,0.2);
  border-radius: 12px; padding: 16px; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--text-dim);
}
:root[data-theme="light"] .mission-grid {
  background: rgba(255,255,255,0.9); border-color: rgba(25,143,217,0.25); color: var(--text-dim);
  box-shadow: 0 4px 16px rgba(15,30,60,0.08);
}
.mission-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-dim); }
:root[data-theme="light"] .mission-row { border-bottom-color: rgba(15,30,60,0.08); }
.mission-row:last-child { border-bottom: none; }
.mission-row .ok { color: #10b981; }
.mission-row .pulse-live { color: var(--accent); animation: pulse 1.5s infinite; }

/* Responsive */
@media (max-width: 980px) {
  .orbit-rings { width: 400px; height: 400px; }
  .orbit-ring.r1 { width: 200px; height: 200px; }
  .orbit-ring.r2 { width: 300px; height: 300px; }
  .orbit-ring.r3 { width: 400px; height: 400px; }
  .robot-mascot { width: 160px; height: 200px; }
}
@media (max-width: 680px) {
  .orbit-rings, .rocket-float, .float-tech { display: none; }
  .robot-mascot { width: 130px; height: 170px; }
}