/* QR Code Modal Styles */
.qrcode-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.qrcode-modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.qrcode-modal-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  position: relative;
  transform: translateY(20px);
  opacity: 0;
  animation: slideUp 0.3s ease 0.1s forwards;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s ease;
}

.close-modal:hover {
  color: var(--text-color);
}

.qrcode-image-container {
  margin: 1.5rem 0;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.qrcode-image {
  width: 180px;
  height: 180px;
  object-fit: contain;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

.qrcode-text {
  color: var(--text-light);
  margin: 1rem 0;
  font-size: 0.9rem;
}

.download-qr {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.download-qr:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.download-qr:active {
  transform: translateY(0);
}

/* Dark mode styles for QR modal */
[data-theme="dark"] .qrcode-modal-content {
  background: #1f2937;
}

[data-theme="dark"] .qrcode-image-container {
  background: #374151;
}

[data-theme="dark"] .qrcode-text {
  color: #d1d5db;
}

/* Base Styles & Variables */
:root {
  --primary-color: #818cf8;
  --primary-hover: #6366f1;
  --text-color: #f3f4f6;
  --text-light: #9ca3af;
  --bg-color: #111827;
  --card-bg: #1f2937;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --transition: all 0.3s ease;
}

/* Light Mode Variables */
[data-theme="light"] {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #f9fafb;
  --card-bg: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Dark Mode Variables - Default */
[data-theme="dark"] {
  --primary-color: #818cf8;
  --primary-hover: #6366f1;
  --text-color: #f3f4f6;
  --text-light: #9ca3af;
  --bg-color: #111827;
  --card-bg: #1f2937;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: var(--transition);
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Profile Section */
.profile {
  text-align: center;
  margin-bottom: 2.5rem;
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.25rem;
  border: 4px solid var(--primary-color);
  transition: var(--transition);
}

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

h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.bio {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.social-icon {
  color: var(--text-light);
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-icon:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

/* Link Cards */
.links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.link-card {
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-color: var(--primary-color);
}

.link-card i:first-child {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: var(--primary-color);
  width: 30px;
  text-align: center;
}

.link-card span {
  font-weight: 500;
}

.project-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-right: 0.5rem;
}

.project-title {
  font-weight: 600;
  line-height: 1.4;
}

.project-description {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 400;
  line-height: 1.4;
  margin-top: 2px;
}

.link-card i:last-child {
  color: var(--text-light);
  font-size: 0.875rem;
  transition: var(--transition);
  margin-left: 0.5rem;
}

.link-card:hover i:last-child {
  transform: translateX(3px);
  color: var(--primary-color);
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 1000;
  box-shadow: var(--shadow);
  transition: var(--transition);
  padding: 0;
  margin: 0;
  outline: none;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Share Button Styles */
.share-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  opacity: 0;
  animation: fadeInUp 0.5s ease-out 0.3s forwards;
}

.share-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
  animation: fadeInUp 0.5s ease-out 0.3s forwards;
}

.share-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.share-dropdown {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 200px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  /* Ensure dropdown stays above other elements */
  z-index: 1000;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.share-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.share-option {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.share-option i {
  width: 24px;
  margin-right: 12px;
  text-align: center;
  font-size: 1.1rem;
}

.share-option:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .profile-img {
    width: 100px;
    height: 100px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .link-card {
    padding: 0.875rem 1.25rem;
  }

  .link-card i:first-child {
    font-size: 1.25rem;
  }
}
