/* Theme tokens shared across the profile card */
:root {
    --bg: #161616;
    --surface: #222;
    --border: #333;
    --text: #f5f5f5;
    --muted: #9ca3af;
    --accent: #00a5d3;
    --radius: 12px;
    --max-width: 480px;
}

/* Basic reset to remove default spacing */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Center the card on screen and apply typography */
body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Core layout container that main.js populates */
.profile-card {
    width: min(100%, var(--max-width));
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Identity section containing avatar + copy */
#identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

/* Avatar keeps consistent circular presentation */
.avatar {
    width: 256px;
    height: 256px;
    border-radius: 50%;
    border: 2px solid var(--border);
    object-fit: cover;
}

#identity .tagline {
    color: var(--muted);
    font-size: 0.95rem;
}

#primary-actions,
#link-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Individual collapsible section for related links */
.link-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-group h2 {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
}

/* Toggle button draws separator line with pseudo elements */
.link-group__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    color: inherit;
    cursor: pointer;
}

.link-group__label {
    flex: 0 1 auto;
}

.link-group__toggle::before {
    content: '';
    order: 1;
    flex: 1 1 auto;
    height: 0;
    border-top: 2px solid var(--border);
    margin: 0 8px;
}

.link-group__toggle::after {
    content: '\f067';
    order: 2;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
    font-size: 0.85rem;
}

.link-group.is-open .link-group__toggle::after {
    content: '\f068';
}

.link-group__links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-group__links[hidden] {
    display: none;
}

/* Shared button look for actions and links */
.btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: inherit;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    text-align:center;
    color: var(--accent);
    cursor: pointer;
}

.btn:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Primary action buttons take accent color */
.btn-primary {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #111;
    font-weight: 600;
}

.btn .subtext {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Footer copy sits below the link groups */
#footer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

#footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight:bold;
}

#footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(16px);
    background-color: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    padding: 10px 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.toast--error {
    background-color: #b91c1c;
    color: #fff;
}
