/* Base styles */
:root {
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --gray-100: #f3f4f6;
  /* Improved contrast for secondary text */
  --gray-400: #d1d5db; /* Changed from #9ca3af for better contrast */
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --black: #000000;
  --cyan-500: #06b6d4;
  --yellow-500: #eab308;
  --pink-500: #ec4899;
  --green-500: #22c55e;
  --red-500: #ef4444;
}

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

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--gray-100);
  background: linear-gradient(to bottom right, var(--gray-900), var(--black));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  position: relative;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--blue-500);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Typography */
.text-center {
  text-align: center;
}

.gradient-text {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(to right, var(--blue-500), var(--purple-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1.5rem;
}

.subtitle {
  font-size: 1.25rem;
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.subsection-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.copyright {
  color: var(--gray-400);
}

/* Navigation */
.navbar {
  background-color: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--blue-500), var(--purple-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
}

.nav-links {
  display: none;
}

.nav-link {
  color: var(--gray-400);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  transition: color 0.2s, background-color 0.2s;
}

.nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 0.5rem;
  background-color: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(8px);
}

.mobile-menu.active {
  display: block;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--gray-400);
  text-decoration: none;
  border-radius: 0.25rem;
  transition: color 0.2s, background-color 0.2s;
  /* Improved spacing for mobile */
  margin-bottom: 0.25rem;
}

.mobile-nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Added visual indicator for active mobile nav links */
.mobile-nav-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--purple-500);
  padding-left: calc(1rem - 3px);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: 1rem;
  }

  .mobile-menu-button {
    display: none;
  }
}

/* Main content */
.main-content {
  flex: 1 0 auto;
  width: 100%;
  padding: 1.5rem 0;
}

@media (min-width: 768px) {
  .main-content {
    padding: 2rem 0;
  }
}

/* Profile section */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Improved spacing for mobile */
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .profile-section {
    gap: 2rem;
  }
}

.profile-image {
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--purple-500);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.profile-img:hover {
  transform: scale(1.1);
}

/* Card */
.card {
  background-color: var(--gray-800);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s;
  width: 100%;
  /* Improved spacing for mobile */
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .card {
    margin-bottom: 1.5rem;
  }
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-content {
  /* Improved spacing for mobile */
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .card-content {
    padding: 1.5rem;
  }
}

.about-card {
  max-width: 60rem;
}

/* Skills section */
.skills-section {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  /* Improved spacing for mobile */
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .skills-section {
    gap: 2rem;
  }
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: rgba(31, 41, 55, 0.5);
  transition: background-color 0.3s;
}

.skill-item:hover {
  background-color: rgba(31, 41, 55, 0.7);
}

.skill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(to right, var(--blue-500), var(--purple-500));
  color: white;
  transition: transform 0.3s ease;
}

.skill-item:hover .skill-icon {
  transform: scale(1.1);
}

.skill-title {
  font-weight: 600;
}

.skill-description {
  font-size: 0.875rem;
  color: var(--gray-400);
}

/* Paradigm steps */
.paradigm-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.paradigm-step {
  display: flex;
  gap: 1rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-weight: 700;
  color: white;
  transition: transform 0.5s ease-in-out;
}

.paradigm-step:hover .step-number {
  transform: rotate(360deg);
}

.step-content {
  flex-grow: 1;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.step-title {
  font-weight: 600;
}

.step-description {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.step-divider {
  border-left: 2px dashed var(--gray-700);
  height: 1.5rem;
  margin-left: 1rem;
}

/* Resume section */
.resume-section {
  max-width: 67rem;
  margin: 0 auto;
  font-size: 1.05rem;
}

.experience-item,
.education-item {
  border-left: 2px solid;
  padding-left: 1rem;
  padding-bottom: 1rem;
}

.experience-item {
  border-color: var(--blue-500);
}

.education-item {
  border-color: var(--purple-500);
}

.experience-title,
.education-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.experience-meta,
.education-meta {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.experience-responsibilities {
  list-style-type: disc;
  list-style-position: inside;
  margin-top: 0.5rem;
}

.experience-responsibility {
  font-size: 0.875rem;
}

.institution-link {
  font-size: 0.875rem;
  color: var(--blue-500);
  text-decoration: none;
}

.institution-link:hover {
  text-decoration: underline;
}

.languages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .languages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .languages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.language-item {
  background-color: var(--gray-800);
  padding: 1rem;
  border-radius: 0.5rem;
}

.language-name {
  font-weight: 600;
}

.language-level {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.language-bar {
  width: 100%;
  height: 0.625rem;
  background-color: var(--gray-700);
  border-radius: 9999px;
  margin-top: 0.5rem;
}

.language-progress {
  height: 100%;
  background-color: var(--blue-600);
  border-radius: 9999px;
}

.skills-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--gray-700);
  color: white;
}

/* Projects section */
.projects-section {
  max-width: 64rem;
  margin: 0 auto;
}

.projects-header {
  text-align: center;
  max-width: 48rem;
  /* Improved spacing for mobile */
  margin: 0 auto 2rem;
}

@media (min-width: 768px) {
  .projects-header {
    margin: 0 auto 3rem;
  }
}

.projects-description {
  font-size: 1.125rem;
  color: var(--gray-400);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: var(--gray-800);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
}

.project-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.2);
}

.project-image-container {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.project-content {
  padding: 1.5rem;
}

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

.project-description {
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  border: 1px solid var(--gray-700);
  color: var(--gray-400);
  text-decoration: none;
  transition: all 0.3s;
}

.project-card:hover .project-link {
  background-color: var(--blue-500);
  color: white;
  border-color: var(--blue-500);
}

/* Habits section */
.habits-section {
  max-width: 48rem;
  margin: 0 auto;
}

.habits-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.habit-card {
  background-color: var(--gray-800);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s;
}

.habit-card:hover {
  box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.2);
}

.habit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(
    to right,
    rgba(59, 130, 246, 0.1),
    rgba(139, 92, 246, 0.1)
  );
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  color: inherit;
}

.habit-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.habit-content {
  padding: 1.5rem;
  display: none;
}

.habit-content.active {
  display: block;
}

/* Contact section */
.contact-section {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Improved spacing for mobile */
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .contact-section {
    gap: 2rem;
  }
}

.contact-card {
  width: 100%;
  max-width: 32rem;
}

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

.form-group {
  width: 100%;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  background-color: var(--gray-800);
  color: white;
  border: 1px solid var(--gray-700);
  transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

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

/* Added error styling for form validation */
.form-input.error,
.form-textarea.error {
  border-color: var(--red-500);
}

.error-message {
  color: var(--red-500);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.success-message {
  background-color: rgba(34, 197, 94, 0.1);
  color: var(--green-500);
  padding: 0.75rem;
  border-radius: 0.375rem;
  margin-top: 1rem;
  text-align: center;
}

/* Form status message */
.form-status {
  margin-top: 1rem;
  text-align: center;
  min-height: 1.5rem;
}

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

.social-link-large {
  color: var(--gray-400);
  transition: color 0.3s;
}

.social-link-large:hover {
  color: white;
}

/* Thank you section */
.thank-you-section {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

/* Certificates section */
.certificates-section {
  max-width: 64rem;
  margin: 0 auto;
}

.certificates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .certificates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .certificates-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.certificate-card {
  background-color: var(--gray-800);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s;
}

.certificate-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.2);
}

.certificate-content {
  padding: 1rem;
}

.certificate-image-container {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.375rem;
  cursor: pointer;
}

.certificate-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.certificate-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.certificate-card:hover .certificate-overlay {
  opacity: 1;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--gray-800);
  color: white;
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
  z-index: 10;
}

.modal-close:hover {
  background-color: var(--gray-700);
}

.modal-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

/* Button */
.btn-primary {
  display: inline-block;
  background: linear-gradient(to right, var(--blue-500), var(--purple-500));
  color: white;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary:hover {
  background: linear-gradient(to right, var(--blue-600), var(--purple-600));
  box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.3);
}

.btn-full {
  width: 100%;
}

.button-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* Footer */
.footer {
  flex-shrink: 0;
  background-color: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(8px);
  padding: 1.5rem 0;
  width: 100%;
  margin-top: auto;
}

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

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

.social-link {
  color: var(--gray-400);
  transition: color 0.3s;
}

.social-link:hover {
  color: white;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Utilities */
.absolute {
  position: absolute;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.-z-10 {
  z-index: -10;
}

.icon {
  display: inline-block;
  vertical-align: middle;
}

/* Particles container */
#particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  max-height: 100vh;
  overflow: hidden;
}

/* Responsive image loading */
img {
  max-width: 100%;
  height: auto;
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  #particles-container {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .gradient-text {
    color: black;
    background: none;
  }
}

/* Ensure the background colors for the step numbers work properly */
.bg-purple-500 {
  background-color: var(--purple-500);
}

.bg-cyan-500 {
  background-color: var(--cyan-500);
}

.bg-yellow-500 {
  background-color: var(--yellow-500);
}

.bg-blue-500 {
  background-color: var(--blue-500);
}

.bg-pink-500 {
  background-color: var(--pink-500);
}

.bg-green-500 {
  background-color: var(--green-500);
}

.bg-red-500 {
  background-color: var(--red-500);
}

/* Fix for specific pages */
.habits-section,
.certificates-section,
.contact-section,
.thank-you-section {
  min-height: calc(
    100vh - 4rem - 3rem - 6rem
  ); /* Subtract header, footer, and padding */
  display: flex;
  flex-direction: column;
}
html {
  scroll-behavior: smooth;
}

.certificate-card {
  will-change: transform;
  backface-visibility: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
