:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --bg-gradient-1: #0f172a;
  --bg-gradient-2: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --card-bg: rgba(30, 41, 59, 0.7);
  --hover-bg: rgba(99, 102, 241, 0.1);
  --border-color: rgba(148, 163, 184, 0.1);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  animation: fadeInUp 0.8s ease-out;
}

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

.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  padding: 3rem 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.profile-section {
  text-align: center;
  margin-bottom: 2rem;
}

.avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.6);
}

.avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  opacity: 0.3;
  animation: pulse 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
}

.name {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--border-color) 50%,
    transparent 100%
  );
  margin: 2rem 0;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0.1;
  transition: width 0.3s ease;
  z-index: 0;
}

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

.social-link:hover {
  transform: translateX(5px);
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.social-link .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.social-link:hover .icon {
  transform: scale(1.1);
}

.social-link span {
  flex: 1;
  position: relative;
  z-index: 1;
}

.social-link .arrow {
  width: 18px;
  height: 18px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.social-link:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

.social-link.linkedin:hover {
  border-color: #0077B5;
}

.social-link.linkedin .icon {
  color: #0077B5;
}

.social-link.github:hover {
  border-color: #6e5494;
}

.social-link.github .icon {
  color: #fff;
}

.social-link.stackoverflow:hover {
  border-color: #F48024;
}

.social-link.stackoverflow .icon {
  color: #F48024;
}

.social-link.twitter:hover {
  border-color: #1DA1F2;
}

.social-link.twitter .icon {
  color: #1DA1F2;
}

.social-link.medium:hover {
  border-color: #00ab6c;
}

.social-link.medium .icon {
  color: #00ab6c;
}

.social-link.instagram:hover {
  border-color: #E4405F;
}

.social-link.instagram .icon {
  color: #E4405F;
}

.footer {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  opacity: 0.7;
}

@media (max-width: 640px) {
  body {
    padding: 1rem;
  }

  .card {
    padding: 2rem 1.5rem;
  }

  .name {
    font-size: 1.75rem;
  }

  .title {
    font-size: 0.9rem;
  }

  .social-link {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }

  .social-link .icon {
    width: 20px;
    height: 20px;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-height: 800px) {
  .card {
    padding: 2rem 1.5rem;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }

  .name {
    font-size: 1.75rem;
  }
}