@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: dark;
    --bg: #070912;
    --bg-raised: #0b1020;
    --surface: rgba(13, 19, 39, 0.84);
    --surface-strong: rgba(17, 25, 49, 0.94);
    --surface-hover: rgba(23, 34, 66, 0.96);
    --text: #f4f8ff;
    --muted: #a4b2c8;
    --muted-strong: #d8e3f2;
    --accent: #5dffd4;
    --accent-strong: #00d5ff;
    --accent-hot: #f05cdb;
    --accent-purple: #9c7bff;
    --border: rgba(122, 189, 255, 0.23);
    --border-strong: rgba(93, 255, 212, 0.62);
    --grid: rgba(121, 176, 255, 0.08);
    --featured-start: rgba(31, 48, 99, 0.92);
    --featured-end: rgba(13, 30, 59, 0.9);
    --button-text: #f4f8ff;
    --card-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
    --card-shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.46), 0 0 26px rgba(0, 213, 255, 0.1);
    --radius-xl: 30px;
    --radius-lg: 18px;
    --radius-md: 13px;
}

:root[data-theme='light'] {
    color-scheme: light;
    --bg: #edf5fc;
    --bg-raised: #f8fcff;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: rgba(255, 255, 255, 0.95);
    --surface-hover: rgba(255, 255, 255, 1);
    --text: #132237;
    --muted: #53657d;
    --muted-strong: #263c57;
    --accent: #008fbd;
    --accent-strong: #0073d4;
    --accent-hot: #d629a9;
    --accent-purple: #713ce6;
    --border: rgba(16, 104, 171, 0.2);
    --border-strong: rgba(0, 143, 189, 0.65);
    --grid: rgba(0, 112, 185, 0.09);
    --featured-start: rgba(230, 250, 255, 0.98);
    --featured-end: rgba(245, 239, 255, 0.96);
    --button-text: #14243a;
    --card-shadow: 0 18px 44px rgba(26, 81, 124, 0.12);
    --card-shadow-hover: 0 18px 40px rgba(31, 89, 133, 0.2), 0 0 28px rgba(214, 41, 169, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
    transition: background-color 220ms ease;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 50% -18%, rgba(0, 213, 255, 0.12), transparent 35rem),
        var(--bg);
    color: var(--text);
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif;
    line-height: 1.5;
    transition: background-color 220ms ease, color 220ms ease;
}

body::before,
body::after {
    position: fixed;
    z-index: -3;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    pointer-events: none;
    content: '';
    filter: blur(80px);
    opacity: 0.2;
}

body::before {
    top: -15rem;
    left: -14rem;
    background: var(--accent-strong);
}

body::after {
    right: -15rem;
    bottom: -15rem;
    background: var(--accent-hot);
}

a {
    color: inherit;
}

.ambient,
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.ambient {
    z-index: -2;
    width: 22rem;
    height: 22rem;
    margin: auto;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.09;
}

.ambient--cyan {
    top: -22rem;
    right: 22%;
    background: var(--accent-strong);
}

.ambient--pink {
    right: -18rem;
    bottom: 8%;
    background: var(--accent-hot);
}

.grid-overlay {
    z-index: -1;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-position: center center;
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
    opacity: 0.55;
}

.page-shell {
    width: min(100%, 790px);
    margin: 0 auto;
    padding: 24px 20px 34px;
}

.linklist {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(160deg, var(--surface), rgba(7, 12, 27, 0.72));
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(18px);
    transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

:root[data-theme='light'] .linklist {
    background: linear-gradient(160deg, var(--surface), rgba(240, 249, 255, 0.62));
}

.linklist::before {
    position: absolute;
    top: 0;
    right: 10%;
    left: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-hot), transparent);
    content: '';
    opacity: 0.85;
}

.profile-header {
    position: relative;
    padding: 22px 28px 12px;
    text-align: center;
}

.profile-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.eyebrow,
.section-label,
.profile-kicker,
.profile-status,
.theme-toggle {
    font-family: 'DM Mono', Consolas, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 500;
    text-align: left;
}

.eyebrow__dot,
.status-dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 5px 8px 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(6, 12, 27, 0.32);
    color: var(--button-text);
    cursor: pointer;
    font-size: 0.62rem;
    font-weight: 500;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

:root[data-theme='light'] .theme-toggle {
    background: rgba(255, 255, 255, 0.6);
}

.theme-toggle:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}

.theme-toggle:active {
    transform: scale(0.98);
}

.theme-toggle:focus-visible,
.link-card:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent-strong) 55%, transparent);
    outline-offset: 4px;
}

.theme-toggle__icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: var(--accent);
    font-size: 1rem;
    line-height: 1;
}

.theme-toggle__track {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 30px;
    height: 16px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
}

.theme-toggle__thumb {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    transition: transform 200ms ease, background 200ms ease;
}

:root[data-theme='light'] .theme-toggle__thumb {
    transform: translateX(14px);
    background: var(--accent-hot);
    box-shadow: 0 0 8px var(--accent-hot);
}

.avatar-frame {
    position: relative;
    display: grid;
    width: 132px;
    height: 132px;
    margin: 0 auto 18px;
    place-items: center;
}

.avatar-frame::before,
.avatar-frame::after,
.avatar-frame__ring {
    position: absolute;
    border-radius: 50%;
    content: '';
}

.avatar-frame::before {
    inset: 2px;
    border: 1px solid var(--accent);
    opacity: 0.8;
}

.avatar-frame::after {
    inset: -7px;
    border: 1px dashed var(--accent-hot);
    opacity: 0.42;
}

.avatar-frame__ring {
    inset: -12px;
    border: 1px solid var(--accent-purple);
    border-right-color: transparent;
    border-bottom-color: transparent;
    opacity: 0.5;
    transform: rotate(-28deg);
}

.avatar {
    position: relative;
    z-index: 1;
    width: 116px;
    height: 116px;
    border: 4px solid var(--bg-raised);
    border-radius: 50%;
    background: #090c17;
    box-shadow: 0 0 0 1px var(--border), 0 10px 30px rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

.avatar-fallback {
    position: absolute;
    z-index: 0;
    display: grid;
    width: 116px;
    height: 116px;
    place-items: center;
    border-radius: 50%;
    background: #0b1020;
    color: var(--accent);
    font-family: 'DM Mono', Consolas, monospace;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.avatar-fallback span,
.footer-mark span {
    color: var(--accent-hot);
}

.profile-kicker {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.64rem;
    font-weight: 500;
}

h1 {
    max-width: 640px;
    margin: 0 auto;
    color: var(--text);
    font-size: clamp(1.55rem, 4.5vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.profile-bio {
    max-width: 590px;
    margin: 13px auto 0;
    color: var(--muted-strong);
    font-size: 0.88rem;
    line-height: 1.7;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 17px;
    color: var(--muted);
    font-size: 0.61rem;
}

.profile-status > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.status-separator {
    color: var(--accent-hot);
}

.link-groups {
    padding: 10px 28px 28px;
}

.link-group + .link-group {
    margin-top: 24px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.63rem;
    font-weight: 500;
}

.section-label::after {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, var(--border), transparent);
    content: '';
}

.link-stack {
    display: grid;
    gap: 10px;
}

.link-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    overflow: hidden;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-strong);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.12);
    color: var(--button-text);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.link-card::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(0, 213, 255, 0.08), transparent 36%, rgba(240, 92, 219, 0.06));
    content: '';
    opacity: 0;
    transition: opacity 180ms ease;
}

.link-card:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.link-card:hover::before,
.link-card:focus-visible::before {
    opacity: 1;
}

.link-card--featured {
    min-height: 76px;
    border-color: color-mix(in srgb, var(--accent-strong) 45%, var(--border));
    background: linear-gradient(120deg, var(--featured-start), var(--featured-end));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), 0 0 22px rgba(0, 213, 255, 0.08);
}

.link-card__icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--accent-strong) 50%, var(--border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent-strong) 12%, transparent);
    color: var(--accent-strong);
    font-family: 'DM Mono', Consolas, monospace;
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.link-card__icon--official {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
}

.link-card--whatsapp .link-card__icon {
    border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
}

.link-card__icon--whatsapp svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.link-card--member .link-card__icon::before {
    content: 'ID';
}

.link-card--news .link-card__icon::before {
    content: 'N';
}

.link-card--partnership .link-card__icon::before {
    content: '✦';
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    font-size: 1rem;
}

.link-card--agreement .link-card__icon::before {
    content: '≋';
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    font-size: 1.25rem;
}

.link-card--contact .link-card__icon::before {
    content: '@';
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    font-size: 1.05rem;
}

.link-card__copy {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.link-card__label {
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-card__description {
    overflow: hidden;
    color: var(--muted-strong);
    font-size: 0.72rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-card__arrow {
    position: relative;
    z-index: 1;
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 50%;
    color: var(--muted);
    font-size: 1rem;
    transition: color 180ms ease, transform 180ms ease;
}

.link-card:hover .link-card__arrow,
.link-card:focus-visible .link-card__arrow {
    color: var(--accent-hot);
    transform: translate(2px, -2px);
}

.page-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 28px 27px;
    color: var(--muted);
    font-family: 'DM Mono', Consolas, monospace;
    font-size: 0.58rem;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.footer-mark {
    color: var(--accent);
    font-weight: 500;
}

@media (max-width: 600px) {
    .page-shell {
        padding: 10px 10px 20px;
    }

    .linklist {
        border-radius: 23px;
    }

    .profile-header {
        padding: 17px 17px 10px;
    }

    .profile-toolbar {
        align-items: flex-start;
        margin-bottom: 22px;
    }

    .eyebrow {
        max-width: 110px;
        line-height: 1.4;
    }

    .theme-toggle {
        gap: 6px;
        font-size: 0.56rem;
    }

    .theme-toggle__track {
        width: 27px;
    }

    :root[data-theme='light'] .theme-toggle__thumb {
        transform: translateX(11px);
    }

    .profile-bio {
        font-size: 0.8rem;
        line-height: 1.65;
    }

    .profile-status {
        flex-wrap: wrap;
        justify-content: center;
        line-height: 1.4;
    }

    .link-groups {
        padding: 9px 17px 22px;
    }

    .link-card {
        gap: 11px;
        min-height: 55px;
        padding: 10px 11px;
    }

    .link-card--featured {
        min-height: 72px;
    }

    .link-card__label {
        font-size: 0.78rem;
    }

    .link-card__description {
        font-size: 0.65rem;
    }

    .link-card__arrow {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .page-footer {
        flex-direction: column;
        gap: 5px;
        padding: 0 17px 22px;
        font-size: 0.53rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
