/* ==========================================================================
   Public Page — Multilink
   Mobile-first, minimal, modern design
   ========================================================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans KR', sans-serif;
  background: var(--page-bg, linear-gradient(145deg, #f0f4ff 0%, #faf5ff 50%, #fff0f6 100%));
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px 60px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* --- Profile Section --- */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.profile__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

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

.profile__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
  color: #6366f1;
}

.profile__avatar--placeholder svg {
  width: 40px;
  height: 40px;
}

.profile__name {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.profile__bio {
  font-size: 0.9rem;
  color: #64748b;
  max-width: 320px;
  line-height: 1.6;
}

/* --- Links Section --- */
.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--btn-radius, 12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  text-decoration: none;
  color: #1a1a2e;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.link-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
}

.link-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15), 0 4px 10px rgba(0, 0, 0, 0.04);
  border-color: transparent;
}

.link-button:hover::before {
  opacity: 1;
}

.link-button:hover .link-button__title,
.link-button:hover .link-button__icon {
  color: #fff;
  position: relative;
  z-index: 1;
}

.link-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.link-button__icon {
  font-size: 1.15rem;
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.link-button__title {
  transition: color 0.3s ease;
}

/* --- Colored Link Button --- */
.link-button--colored {
  color: #fff;
  border-color: transparent;
}

.link-button--colored .link-button__title,
.link-button--colored .link-button__icon {
  color: #fff;
}

.link-button--colored::before {
  display: none;
}

.link-button--colored:hover {
  filter: brightness(1.1);
  border-color: transparent;
}

.link-button--colored:hover .link-button__title,
.link-button--colored:hover .link-button__icon {
  color: #fff;
}

/* --- Themed Link Button (theme default colors) --- */
.link-button--themed {
  color: #fff;
  border-color: transparent;
}

.link-button--themed .link-button__title,
.link-button--themed .link-button__icon {
  color: inherit;
}

.link-button--themed::before {
  display: none;
}

.link-button--themed:hover {
  filter: brightness(1.1);
  border-color: transparent;
}

.link-button--themed:hover .link-button__title,
.link-button--themed:hover .link-button__icon {
  color: inherit;
}

/* --- Social Footer --- */
.social-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;
  animation: fadeInUp 0.5s ease 0.5s both;
}

.social-icons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.social-icon-link:hover {
  background: #6366f1;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.social-icon-link:active {
  transform: translateY(0);
}

/* --- Footer --- */
.footer {
  margin-top: 16px;
  text-align: center;
}

.footer p {
  font-size: 0.75rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.footer strong {
  font-weight: 600;
  color: #6366f1;
}

/* --- Desktop Adjustments --- */
@media (min-width: 768px) {
  body {
    padding: 60px 24px 80px;
  }

  .container {
    gap: 40px;
  }

  .profile__avatar {
    width: 96px;
    height: 96px;
  }

  .profile__avatar--placeholder svg {
    width: 48px;
    height: 48px;
  }

  .profile__name {
    font-size: 1.5rem;
  }

  .profile__bio {
    font-size: 0.95rem;
  }

  .link-button {
    padding: 18px 28px;
    font-size: 1rem;
  }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile {
  animation: fadeInUp 0.5s ease both;
}

.link-button {
  animation: fadeInUp 0.5s ease both;
}

.link-button:nth-child(1) { animation-delay: 0.1s; }
.link-button:nth-child(2) { animation-delay: 0.15s; }
.link-button:nth-child(3) { animation-delay: 0.2s; }
.link-button:nth-child(4) { animation-delay: 0.25s; }
.link-button:nth-child(5) { animation-delay: 0.3s; }
.link-button:nth-child(6) { animation-delay: 0.35s; }
.link-button:nth-child(7) { animation-delay: 0.4s; }
.link-button:nth-child(8) { animation-delay: 0.45s; }
.link-button:nth-child(9) { animation-delay: 0.5s; }
.link-button:nth-child(10) { animation-delay: 0.55s; }

.footer {
  animation: fadeInUp 0.5s ease 0.6s both;
}
