/* --- Core Reset & Theme Definitions --- */
:root {
  --bg-dark: #060a12;
  --bg-card: #0c1424;
  --primary: #00ffa3;
  --primary-glow: rgba(0, 255, 163, 0.25);
  --secondary: #00b8ff;
  --text-main: #f3f4f6;
  --text-muted: #8a9ab2;
  --border-color: rgba(255, 255, 255, 0.06);
  --font-family: 'Poppins', sans-serif;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- Global Structure Elements --- */
.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title span {
  display: block;
  color: var(--secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.section-title h2 {
  font-size: 2.4rem;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.2rem;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--bg-dark);
  box-shadow: 0 4px 25px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 255, 163, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 1rem;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-main);
  transform: translateY(-3px);
}

.btn-block { width: 100%; border: none; }

/* --- Hero Frame --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 8%;
  background: radial-gradient(circle at 85% 30%, #0f1f38 0%, var(--bg-dark) 65%);
  overflow: hidden;
}

.cyber-grid {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(rgba(255,255,255,0.01) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 1;
}

.navbar {
  position: absolute;
  top: 0; left: 0; width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 8%;
  z-index: 10;
}

.navbar .logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 2rem;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover { color: var(--primary); }

.nav-links a.nav-cta {
  background: rgba(0, 255, 163, 0.08);
  color: var(--primary);
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 163, 0.2);
}

.nav-links a.nav-cta:hover {
  background: var(--primary);
  color: var(--bg-dark);
}

.hero-left { max-width: 50%; z-index: 2; }

.hero-left .tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.hero-left h1 {
  font-size: 4rem;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero-left h1 span {
  color: transparent;
  -webkit-text-stroke: 1px var(--text-main);
}

.hero-left h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-left p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* --- SOLAR SYSTEM ENGINE --- */
.hero-right {
  position: relative;
  width: 500px;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.center-circle {
  position: relative;
  width: 90px;
  height: 90px;
  background: #0d192e;
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  z-index: 10;
  box-shadow: 0 0 30px rgba(0, 255, 163, 0.35);
}

.center-glow {
  position: absolute;
  width: 150%; height: 150%;
  background: var(--primary-glow);
  filter: blur(25px);
  border-radius: 50%;
  z-index: -1;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-inner { width: 190px; height: 190px; }
.orbit-mid   { width: 330px; height: 330px; }
.orbit-outer { width: 470px; height: 470px; }

.orbit-runner {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: orbitRotate linear infinite;
}

.speed-fast   { animation-duration: 12s; }
.speed-medium { animation-duration: 22s; }
.speed-slow   { animation-duration: 35s; }

@keyframes orbitRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.tech-planet {
  position: absolute;
  width: 55px;
  height: 55px;
  background: #0b1323;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
  animation: counterRotate linear infinite;
}

.speed-fast .tech-planet   { animation-duration: 12s; }
.speed-medium .tech-planet { animation-duration: 22s; }
.speed-slow .tech-planet   { animation-duration: 35s; }

@keyframes counterRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

.python     { top: 50%; left: -28px; transform: translateY(-50%); border-color: #3776AB; box-shadow: 0 0 12px rgba(55, 118, 171, 0.4); }
.flask      { top: 12%; right: 12px; border-color: #ffffff; box-shadow: 0 0 12px rgba(255,255,255,0.2); }
.mysql      { bottom: 12%; left: 12px; border-color: #00758F; box-shadow: 0 0 12px rgba(0, 117, 143, 0.4); }
.sap        { top: -28px; left: 50%; transform: translateX(-50%); border-color: #039BE5; box-shadow: 0 0 12px rgba(3, 155, 229, 0.4); }
.appscript  { bottom: 42%; right: -28px; border-color: #34A853; box-shadow: 0 0 12px rgba(52, 168, 83, 0.4); }
.excel      { bottom: -28px; left: 35%; border-color: #107C41; box-shadow: 0 0 12px rgba(16, 124, 65, 0.4); }

/* --- Tech Skills Sections --- */
.skills-section, .about-section, .gallery-section, .services-section, .video-gallery-section, .contact-section {
  padding: 6rem 8%;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.skill-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 255, 163, 0.25);
}

.skill-glow {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transform: scaleX(0);
  transition: var(--transition);
}

.skill-card:hover .skill-glow { transform: scaleX(1); }

/* --- About Matrix & Stats Layout --- */
.about-container { display: flex; justify-content: space-between; gap: 4rem; }
.about-left { width: 50%; }
.about-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.00) 100%);
  border: 1px solid var(--border-color);
  padding: 3rem;
  border-radius: 16px;
  height: 100%;
}
.about-card h3 { color: var(--primary); margin-bottom: 1.5rem; }
.about-card p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.7; }

.about-right { width: 50%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
}
.stat-card h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.3rem; }
.stat-card p { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; }

/* --- AUTOMATIC REEL GLOBAL STRUCTURE --- */
.marquee-container {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  padding: 1.5rem 0;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.marquee-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: reelMoveLeftToRight 30s linear infinite;
}

/* Hover par poori reel freeze ho jayegi taaki readable ho ske */
.marquee-container:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes reelMoveLeftToRight {
  0% { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* --- IMAGE CARDS LAYOUT --- */
.gallery-item-card {
  position: relative;
  width: 280px; 
  height: 180px; 
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  background: #000;
  flex-shrink: 0;
  transition: var(--transition);
}

.gallery-item-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: var(--transition);
}

.gallery-item-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(6, 10, 18, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item-overlay span {
  font-size: 0.9rem;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.4rem 1.1rem;
  border-radius: 6px;
}

.gallery-item-card:hover {
  transform: scale(1.04);
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(0, 255, 163, 0.25);
}

.gallery-item-card:hover img { transform: scale(1.05); opacity: 0.4; }
.gallery-item-card:hover .gallery-item-overlay { opacity: 1; }

/* --- DYNAMIC VIDEO REEL LAYOUT --- */
.video-marquee-container {
  background: rgba(0, 0, 0, 0.25) !important;
}

.video-marquee-track {
  animation: reelMoveLeftToRight 45s linear infinite !important; /* Smooth slow flow */
}

.dynamic-video-card {
  width: 380px !important; 
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transition: var(--transition);
}

.dynamic-video-card:hover {
  border-color: var(--secondary);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 184, 255, 0.2);
}

.dynamic-video-card .video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
}

.dynamic-video-card .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: auto !important; /* Click interaction active */
}

.dynamic-video-card .video-info {
  padding: 1.5rem;
}

.dynamic-video-card .video-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.dynamic-video-card .video-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- SCALED LIGHTBOX POPUP --- */
.image-preview {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(4, 7, 13, 0.96);
  backdrop-filter: blur(15px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

#previewImg {
  max-width: 85%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 25px 60px rgba(0,0,0,0.85);
}

.close-preview {
  position: absolute;
  top: 2rem; right: 3rem;
  font-size: 3.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.close-preview:hover { color: var(--primary); }

/* --- Services Architecture --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.service-card-new { background: var(--bg-card); border: 1px solid var(--border-color); padding: 2.5rem 2rem; border-radius: 12px; transition: var(--transition); }
.service-card-new:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.featured-service { border-color: rgba(0, 255, 163, 0.15); background: linear-gradient(180deg, rgba(0,255,163,0.01) 0%, var(--bg-card) 100%); }
.service-icon { font-size: 2rem; margin-bottom: 1.5rem; }

/* --- Contact Segment Ecosystem --- */
.contact-container { display: flex; gap: 4rem; align-items: flex-start; }
.contact-info-cards { width: 40%; display: flex; flex-direction: column; gap: 1.5rem; }
.info-card-link { text-decoration: none; color: inherit; display: block; }
.info-card-new { background: var(--bg-card); border: 1px solid var(--border-color); padding: 1.6rem 2rem; border-radius: 12px; display: flex; align-items: center; gap: 1.5rem; transition: var(--transition); }
.info-card-link:hover .info-card-new { transform: translateX(6px); border-color: var(--primary); }
.info-icon { font-size: 1.8rem; min-width: 48px; height: 48px; background: rgba(255, 255, 255, 0.03); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.text-whatsapp { color: #25D366; }
.text-email { color: #ea4335; }

.contact-form-container { width: 60%; background: linear-gradient(180deg, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.00) 100%); border: 1px solid var(--border-color); padding: 3rem; border-radius: 16px; }
.cyber-form .form-row { display: flex; gap: 1.5rem; }
.cyber-form .form-group { margin-bottom: 1.5rem; flex: 1; }
.cyber-form label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 1px; }
.cyber-form input, .cyber-form textarea { width: 100%; background: rgba(6, 10, 18, 0.6); border: 1px solid var(--border-color); padding: 0.85rem 1.2rem; color: var(--text-main); font-family: var(--font-family); font-size: 0.95rem; border-radius: 8px; transition: var(--transition); }
.cyber-form input:focus, .cyber-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 15px rgba(0, 255, 163, 0.1); }

/* --- Footer Layout --- */
footer { border-top: 1px solid var(--border-color); text-align: center; padding: 2.5rem; color: var(--text-muted); font-size: 0.9rem; }

/* --- Responsive Viewports --- */
@media (max-width: 1100px) {
  .hero { flex-direction: column; text-align: center; justify-content: center; padding-top: 9rem; gap: 4rem; }
  .hero-left { max-width: 100%; }
  .hero-buttons { display: flex; flex-direction: column; max-width: 300px; margin: 0 auto; gap: 1rem; }
  .btn-outline { margin-left: 0; }
  .about-container, .contact-container { flex-direction: column; }
  .about-left, .about-right, .contact-info-cards, .contact-form-container { width: 100%; }
}

@media (max-width: 768px) {
  .navbar { flex-direction: column; gap: 1rem; padding: 1.5rem 0; }
  .nav-links a { margin: 0 0.6rem; font-size: 0.85rem; }
  .hero-left h1 { font-size: 2.8rem; }
  .hero-right { width: 320px; height: 320px; scale: 0.7; }
  .section-title h2 { font-size: 2rem; }
  .cyber-form .form-row { flex-direction: column; }
}