/* linkfolio/assets/css/main.css */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }

/* ── Design tokens ── */
:root {
  --color-main:         #0a0a0f;
  --color-accent1:      #6c63ff;
  --color-accent2:      #ff6b6b;
  --color-surface:      rgba(255,255,255,0.06);
  --color-surface-hover:rgba(255,255,255,0.10);
  --color-text:         #f0f0f0;
  --color-text-muted:   rgba(240,240,240,0.5);
  --color-border:       rgba(255,255,255,0.08);
  --radius-card:        16px;
  --blur-surface:       blur(20px);
  --transition-base:    0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --color-main:         #f5f5f7;
  --color-surface:      rgba(0,0,0,0.04);
  --color-surface-hover:rgba(0,0,0,0.07);
  --color-text:         #1a1a1a;
  --color-text-muted:   rgba(26,26,26,0.5);
  --color-border:       rgba(0,0,0,0.08);
}

/* ── Base ── */
body {
  font-family: "SF Pro Display", system-ui, -apple-system, sans-serif;
  background-color: var(--color-main);
  color: var(--color-text);
  min-height: 100vh;
  transition: background-color var(--transition-base), color var(--transition-base);
  position: relative;
  overflow-x: hidden;
}

/* Mesh gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, color-mix(in srgb, var(--color-accent1) 12%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, color-mix(in srgb, var(--color-accent2) 8%, transparent) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.page-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 60px;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 480px;
}

/* ── Theme toggle ── */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: var(--blur-surface);
  -webkit-backdrop-filter: var(--blur-surface);
  transition: background var(--transition-base), transform var(--transition-base);
  color: var(--color-text);
}
.theme-toggle:hover { background: var(--color-surface-hover); transform: scale(1.08); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ── Profile section ── */
.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 0 28px;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
}

.avatar-initials {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--color-accent1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.profile-bio {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 320px;
  line-height: 1.5;
}

.click-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 4px 10px;
}
.click-badge svg { width: 12px; height: 12px; stroke: var(--color-accent1); fill: none; stroke-width: 2; }

/* ── Links list ── */
#links-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Link card ── */
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  padding: 0 18px;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  backdrop-filter: var(--blur-surface);
  -webkit-backdrop-filter: var(--blur-surface);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  opacity: 0;
  animation: fadeSlideUp 0.4s var(--transition-base) forwards;
}

.link-card:hover {
  background: var(--color-surface-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25), 0 0 0 1px var(--color-accent1) inset;
}

.link-card .icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.link-card .icon-wrap svg { width: 18px; height: 18px; stroke: var(--color-accent1); fill: none; stroke-width: 1.8; }

.link-card .link-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.link-card .arrow-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.4;
}
.link-card .arrow-icon svg { width: 18px; height: 18px; stroke: var(--color-text); fill: none; stroke-width: 1.8; }

/* Ripple */
.link-card .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transform: scale(0);
  animation: ripple-anim 0.5s linear;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ── Stagger delays ── */
.link-card:nth-child(1)  { animation-delay: 0.05s; }
.link-card:nth-child(2)  { animation-delay: 0.10s; }
.link-card:nth-child(3)  { animation-delay: 0.15s; }
.link-card:nth-child(4)  { animation-delay: 0.20s; }
.link-card:nth-child(5)  { animation-delay: 0.25s; }
.link-card:nth-child(6)  { animation-delay: 0.30s; }
.link-card:nth-child(7)  { animation-delay: 0.35s; }
.link-card:nth-child(8)  { animation-delay: 0.40s; }
.link-card:nth-child(9)  { animation-delay: 0.45s; }
.link-card:nth-child(n+10){ animation-delay: 0.50s; }

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

/* ── Footer ── */
.site-footer {
  margin-top: 40px;
  font-size: 10px;
  color: var(--color-text-muted);
  text-align: center;
  letter-spacing: 0.5px;
}
.site-footer a { color: inherit; text-decoration: none; }

/* ── Responsive ── */
@media (min-width: 640px) {
  .profile-name { font-size: 1.8rem; }
  .link-card { height: 68px; }
}
