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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
  color: #fff;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Security: Hide content until fully loaded */
.loading {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.loaded {
  opacity: 1;
}

/* Custom Cursor - Enhanced */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.15s ease;
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 107, 107, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Interactive Background - Improved */
.interactive-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bg-dot.active {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  transform: scale(4);
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.6);
}

/* Floating Elements */
.floating-cards {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.floating-card {
  position: absolute;
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
  border-radius: 16px;
  animation: float 8s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-card:nth-child(2) { animation-delay: -2.7s; }
.floating-card:nth-child(3) { animation-delay: -5.3s; }

@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg); 
    opacity: 0.3;
  }
  50% { 
    transform: translateY(-30px) rotate(15deg); 
    opacity: 0.6;
  }
}

/* Success Message */
.success-message {
  position: fixed;
  top: 100px;
  right: 30px;
  background: linear-gradient(45deg, #28a745, #20c997);
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(100px);
  transition: all 0.5s ease;
  z-index: 10000;
}

.success-message.show {
  opacity: 1;
  transform: translateX(0);
}

.success-message.error {
  background: linear-gradient(45deg, #dc3545, #c82333);
}

/* Enhanced Navigation Bar */
.nav-panel {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.nav-item {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.nav-item::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 65px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(5px);
}

/* Main Content */
.main-content {
  width: 100%;
  position: relative;
}

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px 40px;
  position: relative;
}

/* Enhanced Section Title */
.section-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 2px;
}

/* Enhanced Home Section */
.home-content {
  max-width: 1200px;
  display: flex;
  align-items: center;
  gap: 80px;
}

.home-text {
  flex: 1;
}

.home-image {
  flex: 0 0 350px;
  position: relative;
}

.profile-image {
  width: 100%;
  height: 350px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 2;
  transition: all 0.5s ease;
}

.profile-image:hover {
  transform: scale(1.05);
  border-color: rgba(255, 107, 107, 0.5);
}

.glitch-text {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.typewriter {
  font-size: 28px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.home-description {
  font-size: 18px;
  opacity: 0.8;
  margin-bottom: 40px;
  line-height: 1.8;
  max-width: 500px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 36px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.cta-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(255, 107, 107, 0.4);
  background: linear-gradient(45deg, #4ecdc4, #ff6b6b);
}

/* Enhanced Skills Section */
.skills-section-content {
  max-width: 1200px;
  width: 100%;
  text-align: center;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.skill-orb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 40px 30px;
  position: relative;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  overflow: hidden;
}

.skill-orb::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.1), transparent);
  transition: left 0.8s;
}

.skill-orb:hover::before {
  left: 100%;
}

.skill-orb:hover {
  transform: translateY(-10px) scale(1.05);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 107, 107, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.skill-orb i {
  font-size: 50px;
  margin-bottom: 20px;
  color: #ff6b6b;
  display: block;
  transition: all 0.3s ease;
}

.skill-orb:hover i {
  color: #4ecdc4;
  transform: scale(1.1);
}

.skill-name {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

/* Enhanced Projects Section */
.projects-section-content {
  max-width: 1000px;
  width: 100%;
  text-align: center;
}

.projects-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 60px;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 50px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.1), transparent);
  transition: left 0.8s;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 107, 107, 0.3);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.project-number {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 120px;
  font-weight: 900;
  opacity: 0.05;
  line-height: 1;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  color: #fff;
}

.project-desc {
  font-size: 16px;
  opacity: 0.8;
  margin-bottom: 30px;
  line-height: 1.7;
}

/* Project Links Container */
.project-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 15px 30px;
  border: 2px solid rgba(255, 107, 107, 0.5);
  border-radius: 50px;
  transition: all 0.3s ease;
  background: transparent;
  font-size: 14px;
}

.project-link:hover {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  color: #fff;
  transform: translateX(10px);
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

/* Demo Link Styling */
.demo-link {
  border-color: rgba(78, 205, 196, 0.5);
}

.demo-link:hover {
  background: linear-gradient(45deg, #4ecdc4, #ff6b6b);
  box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
}

/* Enhanced Education Section */
.education-section-content {
  max-width: 800px;
  width: 100%;
  text-align: center;
}

.education-timeline {
  position: relative;
  max-width: 600px;
  margin: 60px auto 0;
}

.education-timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #ff6b6b, #4ecdc4);
  border-radius: 2px;
}

.education-item {
  position: relative;
  padding-left: 90px;
  margin-bottom: 60px;
  text-align: left;
}

.education-dot {
  position: absolute;
  left: 18px;
  top: 25px;
  width: 24px;
  height: 24px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 50%;
  border: 4px solid #1a1a1a;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.education-year {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 15px;
}

.education-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #fff;
}

.education-school {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  margin-bottom: 15px;
  font-weight: 500;
}

.education-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.6;
}

/* Enhanced Contact Section */
.contact-section-content {
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.contact-container {
  margin-top: 60px;
}

.contact-form {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 25px;
  padding: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 50px;
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 40px;
  position: relative;
  text-align: left;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 20px 0;
  font-size: 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-family: inherit;
  transition: all 0.3s ease;
  resize: vertical;
}

.form-textarea {
  min-height: 120px;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-bottom-color: #ff6b6b;
}

.form-label {
  position: absolute;
  left: 0;
  top: 20px;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  pointer-events: none;
  font-size: 16px;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label,
.form-textarea:focus + .form-label,
.form-textarea:not(:placeholder-shown) + .form-label {
  top: -5px;
  font-size: 14px;
  color: #ff6b6b;
}

.submit-btn {
  width: 100%;
  padding: 20px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border: none;
  border-radius: 50px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(255, 107, 107, 0.4);
  background: linear-gradient(45deg, #4ecdc4, #ff6b6b);
}

/* Enhanced Social Links */
.social-container {
  display: flex;
  justify-content: center;
  gap: 25px;
}

.social-link {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  font-size: 20px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 50%;
  transition: all 0.4s ease;
  transform: translate(-50%, -50%);
}

.social-link:hover::before {
  width: 100%;
  height: 100%;
}

.social-link:hover {
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.social-link i {
  position: relative;
  z-index: 2;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cursor, .cursor-follower { 
    display: none; 
  }
  
  .nav-panel {
    top: 10px;
    padding: 8px;
    gap: 5px;
  }
  
  .nav-item {
    width: 45px;
    height: 45px;
    font-size: 16px;
  }
  
  .section {
    padding: 100px 20px 40px;
  }
  
  .home-content {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }
  
  .home-text {
    text-align: center;
  }

  .home-description {
    max-width: 100%;
  }
  
  .home-image {
    flex: 0 0 250px;
  }
  
  .profile-image {
    height: 250px;
  }
  
  .skills-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .skill-orb {
    padding: 30px 20px;
  }

  .project-card {
    padding: 30px;
  }

  .project-number {
    font-size: 80px;
    right: 20px;
  }

  .contact-form {
    padding: 30px;
  }

  .education-timeline {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .nav-panel {
    gap: 2px;
    padding: 6px;
  }
  
  .nav-item {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  
  .section {
    padding: 90px 15px 30px;
  }
  
  .glitch-text {
    font-size: 2.5rem;
  }
  
  .typewriter {
    font-size: 20px;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
  }

  .project-links {
    flex-direction: column;
  }

  .project-link {
    justify-content: center;
  }
}