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

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --border: #475569;
  --spacing-unit: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  padding: calc(var(--spacing-unit) * 2);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  animation: fadeIn 0.6s ease-in;
}

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

.profile-header {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 6);
  padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 3);
  background: var(--bg-secondary);
  border-radius: calc(var(--spacing-unit) * 3);
  border: 1px solid var(--border);
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto calc(var(--spacing-unit) * 3);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
  transition: transform 0.3s ease;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar:hover {
  transform: scale(1.05);
}

.profile-name {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--text-primary);
}

.profile-bio {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--text-primary);
  text-align: center;
}

.social-links {
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.links-grid {
  display: grid;
  /* slightly smaller minimum card width so more cards fit and each card is more compact */
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: calc(var(--spacing-unit) * 1);
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* reduced padding for a more compact card */
  padding: calc(var(--spacing-unit) * 2);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: calc(var(--spacing-unit) * 2);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  cursor: pointer;
  gap: calc(var(--spacing-unit) * 1);
}

.link-card i {
  /* slightly smaller icons inside the cards */
  font-size: 24px;
}

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

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.social-twitter:hover {
  background: #1da1f2;
  border-color: #1da1f2;
}

.social-instagram:hover {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  border-color: #fd1d1d;
}

.social-linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
}

.social-github:hover {
  background: #333;
  border-color: #333;
}

.social-youtube:hover {
  background: #ff0000;
  border-color: #ff0000;
}

.social-facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.quick-links {
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 2);
}

.quick-link-item {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 3);
  padding: calc(var(--spacing-unit) * 3);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: calc(var(--spacing-unit) * 2);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  cursor: pointer;
}

.quick-link-item > i:first-child {
  font-size: 24px;
  color: var(--accent);
  width: 40px;
  text-align: center;
}

.link-content {
  flex: 1;
}

.link-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 0.5);
  color: var(--text-primary);
}

.link-content p {
  font-size: 14px;
  color: var(--text-secondary);
}

.quick-link-item > i:last-child {
  font-size: 16px;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.quick-link-item:hover {
  transform: translateX(8px);
  border-color: var(--accent);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.quick-link-item:hover > i:last-child {
  transform: translateX(4px);
  color: var(--accent);
}

.quick-link-item:hover .link-content h3 {
  color: var(--accent);
}

.footer {
  text-align: center;
  padding: calc(var(--spacing-unit) * 4) 0;
  color: var(--text-secondary);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  body {
    padding: calc(var(--spacing-unit) * 2);
  }

  .profile-name {
    font-size: 24px;
  }

  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .link-card {
    padding: calc(var(--spacing-unit) * 1.5);
  }

  .link-card i {
    font-size: 20px;
  }

  .quick-link-item {
    padding: calc(var(--spacing-unit) * 2);
  }

  .quick-link-item > i:first-child {
    font-size: 20px;
    width: 32px;
  }
}

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