/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #00d4ff;
  --secondary-color: #ff6b35;
  --accent-color: #ffd700;
  --bg-primary: #0a0a0f;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(26, 26, 46, 0.8);
  --text-primary: #ffffff;
  --text-secondary: #b3b3cc;
  --text-accent: #00d4ff;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-gold: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  --shadow-primary: 0 10px 30px rgba(0, 212, 255, 0.3);
  --shadow-secondary: 0 5px 15px rgba(0, 0, 0, 0.3);
}

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Stars Animation */
.stars,
.stars2,
.stars3 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.stars {
  background: radial-gradient(2px 2px at 20% 30%, #fff, transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 90% 40%, #fff, transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.6), transparent);
  background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px;
  animation: sparkle 200s linear infinite;
}

.stars2 {
  background: radial-gradient(1px 1px at 25% 25%, #00d4ff, transparent),
    radial-gradient(2px 2px at 50% 50%, rgba(0, 212, 255, 0.5), transparent);
  background-size: 200px 200px;
  animation: sparkle 400s linear infinite;
}

.stars3 {
  background: radial-gradient(1px 1px at 75% 25%, #ff6b35, transparent),
    radial-gradient(2px 2px at 25% 75%, rgba(255, 107, 53, 0.3), transparent);
  background-size: 300px 300px;
  animation: sparkle 600s linear infinite;
}

@keyframes sparkle {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.nav-logo i {
  margin-right: 10px;
  font-size: 1.8rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link i {
  margin-right: 8px;
  font-size: 1.1rem;
}

.nav-link:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-family: 'Orbitron', monospace;
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glitch {
  position: relative;
  animation: glitch 2s infinite;
}

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

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: #ff6b35;
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: #00d4ff;
  z-index: -2;
}

@keyframes glitch {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-1 {
  0%,
  100% {
    transform: translate(0);
  }
  10% {
    transform: translate(-2px, -2px);
  }
  20% {
    transform: translate(2px, 2px);
  }
  30% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-2 {
  0%,
  100% {
    transform: translate(0);
  }
  10% {
    transform: translate(2px, 2px);
  }
  20% {
    transform: translate(-2px, -2px);
  }
  30% {
    transform: translate(2px, -2px);
  }
  40% {
    transform: translate(-2px, 2px);
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-accent);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--primary-color);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary-color);
  }
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn i {
  margin-right: 10px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  transform: translateY(-3px);
}

/* Hero Visual Elements */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.arc-reactor {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.core {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, #00d4ff 0%, #0099cc 50%, #006699 100%);
  border-radius: 50%;
  box-shadow: 0 0 30px #00d4ff, inset 0 0 20px rgba(255, 255, 255, 0.2);
  animation: pulse 2s ease-in-out infinite alternate;
}

.ring {
  position: absolute;
  border: 2px solid transparent;
  border-radius: 50%;
  animation: rotate 10s linear infinite;
}

.ring-1 {
  width: 150px;
  height: 150px;
  border-top-color: #00d4ff;
  border-right-color: #00d4ff;
  animation-duration: 8s;
}

.ring-2 {
  width: 200px;
  height: 200px;
  border-left-color: #ff6b35;
  border-bottom-color: #ff6b35;
  animation-duration: 12s;
  animation-direction: reverse;
}

.ring-3 {
  width: 250px;
  height: 250px;
  border-top-color: #ffd700;
  border-left-color: #ffd700;
  animation-duration: 15s;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 30px #00d4ff, inset 0 0 20px rgba(255, 255, 255, 0.2);
  }
  100% {
    box-shadow: 0 0 50px #00d4ff, inset 0 0 30px rgba(255, 255, 255, 0.4);
  }
}

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

.constellation {
  position: absolute;
  width: 100%;
  height: 100%;
}

.planet {
  position: absolute;
  border-radius: 50%;
  animation: orbit 20s linear infinite;
}

.planet-1 {
  width: 15px;
  height: 15px;
  background: var(--gradient-secondary);
  top: 20%;
  left: 80%;
  animation-duration: 15s;
}

.planet-2 {
  width: 10px;
  height: 10px;
  background: var(--gradient-gold);
  top: 70%;
  left: 20%;
  animation-duration: 25s;
  animation-direction: reverse;
}

.planet-3 {
  width: 8px;
  height: 8px;
  background: var(--gradient-primary);
  top: 40%;
  left: 10%;
  animation-duration: 30s;
}

@keyframes orbit {
  from {
    transform: rotate(0deg) translateX(100px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(100px) rotate(-360deg);
  }
}

/* Section Styles */
section {
  padding: 100px 0;
  position: relative;
}

.section-title {
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title i {
  margin-right: 15px;
  color: var(--primary-color);
}

/* About Section */
.about {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 15px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-primary);
}

.stat-number {
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.code-matrix {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 2rem;
  border: 1px solid rgba(0, 212, 255, 0.3);
  font-family: 'Courier New', monospace;
  position: relative;
  overflow: hidden;
}

.code-matrix::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 212, 255, 0.1),
    transparent
  );
  animation: scan 3s linear infinite;
}

@keyframes scan {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.matrix-line {
  color: var(--primary-color);
  margin-bottom: 0.8rem;
  opacity: 0;
  animation: fadeInCode 0.5s ease forwards;
}

.matrix-line:nth-child(1) {
  animation-delay: 0.5s;
}
.matrix-line:nth-child(2) {
  animation-delay: 1s;
}
.matrix-line:nth-child(3) {
  animation-delay: 1.5s;
}
.matrix-line:nth-child(4) {
  animation-delay: 2s;
}
.matrix-line:nth-child(5) {
  animation-delay: 2.5s;
}

@keyframes fadeInCode {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 15px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: all 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-primary);
}

.skill-category h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.skill-category h3 i {
  margin-right: 10px;
  font-size: 1.5rem;
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-name {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skill-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  width: 0;
  transition: width 2s ease;
  position: relative;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Projects Section */
.projects {
  background: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 2rem;
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  transition: left 0.5s ease;
}

.project-card:hover::before {
  left: 0;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-primary);
}

.project-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.project-header i {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-right: 15px;
}

.project-header h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  display: flex;
  align-items: center;
  padding: 0.8rem 1.2rem;
  background: transparent;
  border: 1px solid var(--primary-color);
  border-radius: 25px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-link i {
  margin-right: 8px;
}

.project-link:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.contact-item i {
  color: var(--primary-color);
  margin-right: 15px;
  font-size: 1.3rem;
  width: 20px;
}

.contact-form {
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 15px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.form-group {
  position: relative;
  margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.form-group label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  pointer-events: none;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
  top: -10px;
  left: 10px;
  font-size: 0.9rem;
  color: var(--primary-color);
  background: var(--bg-card);
  padding: 0 5px;
}

/* Footer */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-color);
}

.footer-logo i {
  margin-right: 10px;
  font-size: 1.5rem;
}

.footer-left p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 50%;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: rgba(26, 26, 46, 0.95);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    margin: 1rem 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .btn {
    padding: 12px 24px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skill-category {
    padding: 1.5rem;
  }

  .project-card {
    padding: 1.5rem;
  }

  .contact-form {
    padding: 2rem;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Loading Animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(0, 212, 255, 0.3);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
