  
/* Complete Portfolio CSS */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #e2e8f0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Header Styles - Simplified and Fixed */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 1rem;
  height: 5rem;
}

.nav-container {
    display: flex;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border-radius: 2rem;
  padding:2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.3s ease;
  max-width: 90vw;
  overflow: hidden;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
}

.nav-list li {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #cbd5e1;
  padding: 0.75rem 1rem;
  border-radius: 1.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-align: center;
  min-width: fit-content;
  position: relative;
  /* Ensure proper layering */
  z-index: 1;
}

.nav-link:hover {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.15);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
  transform: translateY(-1px) !important;
}

/* Ensure active state overrides hover */
.nav-link.active:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #1e40af) !important;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5) !important;
  transform: translateY(-2px) !important;
}

/* Force CSS to preload gradient - hidden but loaded */
.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.nav-link.active::before {
  opacity: 1;
}

/* Scrolled header background */
.header.scrolled .nav-container {
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Main Content */
main {
  padding-top: 6rem;
}

/* Section Styles */
.section-heading {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 2rem;
  color: #f1f5f9;
}

/* Intro Section */
.intro-section {
  max-width: 50rem;
  margin: 0 auto 7rem;
  text-align: center;
  padding: 0 1rem;
}

.intro-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.image-container {
  position: relative;
}

.profile-image {
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  object-fit: cover;
  border: 0.35rem solid #60a5fa;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  transition: transform 0.3s ease;
}

.profile-image:hover {
  transform: scale(1.05);
}

.intro-heading {
  font-size: 1.5rem;
  line-height: 1.5;
  margin-bottom: 2.5rem;
  color: #f1f5f9;
}

.font-bold {
  font-weight: bold;
}

.intro-buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(96, 165, 250, 0.4);
}

.btn-icon {
  background: rgba(30, 41, 59, 0.8);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1rem;
  backdrop-filter: blur(10px);
}

.btn-icon:hover {
  color: #60a5fa;
  border-color: #60a5fa;
  transform: scale(1.05);
  background: rgba(51, 65, 85, 0.9);
}

/* About Section */
.about-section {
  max-width: 45rem;
  margin: 0 auto 7rem;
  text-align: center;
  padding: 0 1rem;
}

.about-text {
  font-size: 1rem;
  line-height: 2;
  color: #cbd5e1;
}

.font-medium {
  font-weight: 500;
}

/* Projects Section */
.projects-section {
  max-width: 42rem;
  margin: 0 auto 7rem;
  padding: 0 1rem;
}

.projects-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-card {
  background: rgba(30, 41, 59, 0.8);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
}

.project-card:hover {
  background: rgba(51, 65, 85, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.project-image img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f1f5f9;
}

.project-description {
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.project-tags li {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Skills Section */
.skills-section {
  max-width: 53rem;
  margin: 0 auto 7rem;
  text-align: center;
  padding: 0 1rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
}

.skill-item {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: 1.125rem;
  color: #f1f5f9;
  transition: all 0.2s ease;
  cursor: default;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.skill-item:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.3);
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(96, 165, 250, 0.4);
}

/* Experience Section */
.experience-section {
  max-width: 800px;
  margin: 0 auto 7rem;
  padding: 0 1rem;
}

.timeline-container {
  position: relative;
  padding: 2rem 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(148, 163, 184, 0.3);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  align-items: flex-start;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-icon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 10;
  border: 2px solid rgba(15, 23, 42, 1);
}

.timeline-content {
  background: rgba(30, 41, 59, 0.8);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  padding: 1.3rem 2rem;
  width: calc(50% - 2rem);
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: calc(50% + 2rem);
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: calc(50% + 2rem);
}

.timeline-date {
  font-size: 0.9rem;
  color: #93c5fd;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #f1f5f9;
}

.timeline-location {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin: 0;
}

.timeline-description {
  margin-top: 0.5rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* Contact Section */
.contact-section {
  max-width: 38rem;
  margin: 0 auto 5rem;
  padding: 0 1rem;
}

.contact-intro {
  text-align: center;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.email-link {
  color: #60a5fa;
  text-decoration: underline;
}

.email-link:hover {
  color: #93c5fd;
}

.message-container {
  margin: 1rem 0;
  text-align: center;
  padding: 0.75rem;
  border-radius: 0.5rem;
}

.message-container.hidden {
  display: none;
}

.message-container.success {
  background: #d1fae5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.message-container.error {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.form-input,
.form-textarea {
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  background: rgba(30, 41, 59, 0.8);
  color: #f1f5f9;
  transition: border-color 0.2s ease;
  backdrop-filter: blur(10px);
}

.form-input {
  height: 3.5rem;
}

.form-textarea {
  height: 13rem;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
  background: rgba(51, 65, 85, 0.9);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #94a3b8;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  width: 8rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 9999px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.submit-btn:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
}

.submit-btn:active {
  transform: scale(0.95);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.paper-plane {
  font-size: 0.75rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.submit-btn:hover .paper-plane {
  transform: translateX(0.25rem) translateY(-0.25rem);
}

/* Footer */
.footer {
  background: rgba(15, 23, 42, 0.95);
  color: #cbd5e1;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (min-width: 640px) {
  .intro-buttons {
    flex-direction: row;
  }
  
  .nav-background {
    top: 1.5rem;
    height: 3.25rem;
    width: 36rem;
    border-radius: 9999px;
  }
  
  .nav {
    top: 1.7rem;
    height: 4.2rem;
    padding: 0;
  }
  
  .nav-list {
    width: auto;
    flex-wrap: nowrap;
    gap: 1.25rem;
  }
  
  .project-card {
    display: flex;
    height: 20rem;
  }
  
  .project-reverse {
    flex-direction: row-reverse;
  }
  
  .project-image,
  .project-content {
    flex: 1;
  }
  
  .project-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
  }
  
  .project-image img {
    height: 100%;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0.75rem;
    height: 4.5rem;
  }
  
  .nav-container {
    max-width: 95vw;
    padding: 0.25rem 0.5rem;
  }
  
  .nav-list {
    gap: 0.25rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  main {
    padding-top: 5rem;
  }
  
  .timeline-line {
    left: 2rem;
  }
  
  .timeline-icon {
    left: 2rem;
  }
  
  .timeline-item,
  .timeline-item:nth-child(even) {
    flex-direction: row;
  }
  
  .timeline-content,
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: calc(100% - 5rem);
    margin-left: 5rem;
    margin-right: 0;
  }
  
  .intro-heading {
    font-size: 1.25rem;
  }
  
  .section-heading {
    font-size: 1.75rem;
  }
  
  .profile-image {
    width: 10rem;
    height: 10rem;
  }
  
  .intro-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 16rem;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.2rem 0.1rem;
    height: 2.8rem;
  }
  .nav-container {
    max-width: 100vw;
    padding: 0.1rem 0.1rem;
    border-radius: 1rem;
  }
  .nav-list {
    gap: 0.05rem;
  }
  .nav-link {
    padding: 0.25rem 0.4rem;
    font-size: 0.7rem;
  }
  
  .intro-heading {
    font-size: 1.125rem;
  }
  
  .section-heading {
    font-size: 1.5rem;
  }
  
  .profile-image {
    width: 8rem;
    height: 8rem;
  }
}
