:root {
  color-scheme: light;
  --bg: #f5f5f4;
  --card: #ffffff;
  --text: #101010;
  --muted: #6f6f6f;
  --accent: #111111;
  --border: #e5e5e1;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0d0d0d;
  --card: #141414;
  --text: #f4f4f4;
  --muted: #a0a0a0;
  --accent: #f4f4f4;
  --border: #2a2a2a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 55%, var(--bg) 100%);
  color: var(--text);
  min-height: 100vh;
}

:root[data-theme='dark'] body {
  background: radial-gradient(circle at top, #1a1a1a 0%, var(--bg) 60%, var(--bg) 100%);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 20px;
}

.card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 30px 28px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -80px 0 auto 0;
  height: 160px;
  background: linear-gradient(130deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.clicks {
  font-size: 12px;
  color: var(--muted);
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: #111111;
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow: hidden;
}

:root[data-theme='dark'] .avatar {
  background: #f4f4f4;
  color: #111111;
}

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

.upload {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
}

.upload-input {
  display: none;
}

.name {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
}

.bio {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
}

.links {
  display: grid;
  gap: 12px;
}

.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

:root[data-theme='dark'] .link {
  background: rgba(20, 20, 20, 0.8);
}

.link:hover,
.link:focus-visible {
  transform: translateY(-2px);
  border-color: #bdbdb5;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.link-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.pill {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 9px;
}

.count {
  font-weight: 500;
}

.footnote {
  margin: 22px 0 0;
  font-size: 12px;
  color: #9a9a9a;
}

@media (max-width: 480px) {
  .card {
    padding: 28px 20px 26px;
  }

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

  .name {
    font-size: 24px;
  }

  .link {
    flex-direction: column;
    align-items: flex-start;
  }
}
