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

/* ── Tokens ── */
:root {
    --card: #ffffff;
    --text: #1a1a1a;
    --muted: #888;
    --faint: #aaa;
    --sep: #f0e8ee;
    --shadow: 0 2px 24px rgba(0, 0, 0, 0.07);
    --row-hover: #fdf7fa;
    --row-active: #f7eef4;
    --copy-bg: #f2eaf0;
    --copy-hover: #e8dde6;
    --toggle-bg: rgba(255, 255, 255, 0.72);
    --toggle-color: #555;
    --toggle-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

body.dark {
    --card: #211820;
    --text: #f0e8ec;
    --muted: #9a8892;
    --faint: #6a5862;
    --sep: #36242e;
    --shadow: 0 2px 28px rgba(0, 0, 0, 0.4);
    --row-hover: #2a1e28;
    --row-active: #352530;
    --copy-bg: #36242e;
    --copy-hover: #42303c;
    --toggle-bg: rgba(30, 18, 26, 0.82);
    --toggle-color: #d0c0ca;
    --toggle-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* ── Background ── */
body {
    background-color: #fdf5f9;
    background-image:
        radial-gradient(ellipse 75% 55% at 8% 10%,  rgba(255, 182, 215, 0.52) 0%, transparent 62%),
        radial-gradient(ellipse 65% 50% at 92% 90%,  rgba(200, 165, 255, 0.42) 0%, transparent 60%),
        radial-gradient(ellipse 50% 52% at 82% 8%,   rgba(255, 218, 185, 0.28) 0%, transparent 55%),
        radial-gradient(circle, #dfc8d8 1.3px, transparent 1.3px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 28px 28px;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease;
}

body.dark {
    background-color: #160e14;
    background-image:
        radial-gradient(ellipse 75% 55% at 8% 10%,  rgba(190, 45, 105, 0.22) 0%, transparent 62%),
        radial-gradient(ellipse 65% 50% at 92% 90%,  rgba(110, 45, 190, 0.18) 0%, transparent 60%),
        radial-gradient(circle, #2c1a26 1.3px, transparent 1.3px);
    background-size: 100% 100%, 100% 100%, 28px 28px;
}

/* ── Layout ── */
.page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 48px 20px 60px;
}

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

/* ── Theme toggle ── */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--toggle-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--toggle-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--toggle-color);
    transition: background 0.25s, box-shadow 0.25s, color 0.25s;
    z-index: 100;
}

.theme-toggle:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16);
}

/* ── Profile ── */
.profile {
    text-align: center;
    padding-bottom: 32px;
}

.avatar-wrap {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.13);
    margin: 0 auto 20px;
    overflow: hidden;
    background: #7B7A34;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.avatar-initials {
    display: none;
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.4px;
    margin-bottom: 6px;
    transition: color 0.25s;
}

.handle {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 14px;
    transition: color 0.25s;
}

.bio {
    font-size: 15px;
    color: var(--muted);
    transition: color 0.25s;
}

/* ── Links section ── */
.links {
    margin-bottom: 32px;
}

.links-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.links-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.1px;
    color: var(--faint);
    text-transform: uppercase;
    transition: color 0.25s;
}

.links-count {
    font-size: 13px;
    color: var(--faint);
    transition: color 0.25s;
}

.card {
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: background 0.25s, box-shadow 0.25s;
}

/* ── Row ── */
.row {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.12s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.row:hover  { background: var(--row-hover); }
.row:active { background: var(--row-active); }

.ico {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.row-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.row-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    transition: color 0.25s;
}

.row-sub {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.25s;
}

.arrow {
    flex-shrink: 0;
}

.sep {
    height: 1px;
    background: var(--sep);
    margin: 0 18px;
    transition: background 0.25s;
}

/* ── Copy button ── */
.copy-btn {
    background: var(--copy-bg);
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
    font-family: inherit;
    outline: none;
}

.copy-btn:hover  { background: var(--copy-hover); }
.copy-btn.done   { background: #d4f0dc; color: #2a8a4a; }

/* ── Footer ── */
footer {
    text-align: center;
    font-size: 15px;
    color: var(--faint);
    transition: color 0.25s;
}

/* ── Mobile ── */
@media (max-width: 520px) {
    .page { padding-top: 36px; }
    .name { font-size: 24px; }
    .theme-toggle { top: 14px; right: 14px; }
}
