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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.45 var(--font);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap {
    position: relative;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    padding: 56px 16px 32px;
}

/* Top line: languages (left) + share (right) */
.topline {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.share-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 0;
    color: var(--text);
    background: color-mix(in srgb, var(--text) 6%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .15s;
}
.share-btn:hover { background: color-mix(in srgb, var(--text) 13%, var(--bg)); }

.flag {
    flex: none;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

/* Language menu */
.langs { position: relative; }
.langs summary {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 12px 0 11px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    list-style: none;
    background: color-mix(in srgb, var(--text) 6%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .15s;
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover { background: color-mix(in srgb, var(--text) 13%, var(--bg)); }
.langs .chev { opacity: .6; transition: transform .15s; }
.langs[open] .chev { transform: rotate(180deg); }
.langs ul {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 190px;
    margin: 0;
    padding: 6px;
    list-style: none;
    color: #1d1f1a;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .05);
}
.langs ul a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 9px;
}
.langs ul a:hover { background: #f4f3ef; }
.langs ul a[aria-current] { font-weight: 700; background: #f1f0ec; }

/* Profile */
.profile { text-align: center; margin-bottom: 28px; }
.avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 16px;
    object-fit: cover;
    border-radius: min(var(--card-radius), 28px);
    background: #fff;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent);
}
h1 {
    margin: 0;
    font: 700 clamp(24px, 6vw, 28px)/1.15 var(--heading-font);
    letter-spacing: -.015em;
}
.bio {
    max-width: 38ch;
    margin: 8px auto 0;
    font-size: 15px;
    color: color-mix(in srgb, var(--text) 72%, var(--bg));
    text-wrap: pretty;
}

/* Social icons */
.socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}
.wrap > .socials { margin: 28px 0 0; }
.socials a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: color .15s, background-color .15s;
}
.socials a:hover {
    color: var(--brand);
    background: color-mix(in srgb, var(--text) 7%, transparent);
}

/* Blocks */
.blocks { display: flex; flex-direction: column; gap: 12px; }

.section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 2px;
    font: 700 14px/1.2 var(--heading-font);
    color: color-mix(in srgb, var(--text) 70%, var(--bg));
}
.section::after {
    content: "";
    flex: 1;
    height: 1px;
    background: color-mix(in srgb, var(--text) 15%, transparent);
}
.blocks > .section:first-child { margin-top: 0; }

.link,
.featured {
    --surface: transparent;
    --fg: var(--text);
    --line: var(--text);
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--fg);
    background: var(--surface);
    border: 1.5px solid var(--line);
    transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.link {
    min-height: 62px;
    padding: 8px 14px 8px 20px;
    border-radius: var(--radius);
}
.link.has-thumb { padding-left: 8px; }

.btn-solid .link,
.btn-solid .featured { --surface: var(--accent); --fg: var(--on-accent); --line: var(--accent); }
.btn-soft .link,
.btn-soft .featured { --surface: #fff; --line: color-mix(in srgb, var(--text) 10%, transparent); }

.link:hover,
.featured:hover { --surface: var(--text); --fg: var(--bg); --line: var(--text); }
.btn-solid .link:hover,
.btn-solid .featured:hover { --surface: color-mix(in srgb, var(--accent) 85%, #000); --line: var(--surface); --fg: var(--on-accent); }
.btn-soft .link:hover,
.btn-soft .featured:hover { --surface: #fff; --fg: var(--text); --line: var(--accent); }

.link:active,
.featured:active { transform: scale(.985); }

.thumb {
    flex: none;
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: calc(min(var(--radius), 14px) - 4px);
}
.link.has-thumb .thumb { border-radius: max(4px, calc(min(var(--radius), 23px) - 4px)); }

.link-body,
.featured-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.label { font-weight: 600; line-height: 1.25; text-wrap: balance; }
.sub { font-size: 13.5px; opacity: .72; margin-top: 2px; }

.go {
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    opacity: .5;
    transition: opacity .15s, transform .15s;
}
.link:hover .go,
.featured:hover .go { opacity: 1; transform: translate(1px, -1px); }

/* Featured */
.featured {
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-radius: var(--card-radius);
}
.featured img {
    width: 100%;
    object-fit: contain;
    padding: 2em;
    border-bottom: 1.5px solid var(--line);
}
.featured-body { padding: 14px 0 15px 18px; }
.featured .label { font-size: 17px; }
.featured .go { margin-right: 12px; }

/* Other sites */
.sites {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sites a {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 10px 12px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: min(var(--card-radius), 14px);
    background: color-mix(in srgb, var(--text) 5%, transparent);
    transition: background-color .15s;
}
.sites a:hover { background: color-mix(in srgb, var(--text) 11%, transparent); }
.sites img {
    flex: none;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 9px;
    background: #fff;
}

.foot {
    margin-top: 40px;
    text-align: center;
    font-size: 12.5px;
    opacity: .5;
}
.foot a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent); }
.foot a:hover,
.foot-link:hover { text-decoration-color: currentColor; }
.foot-link {
    padding: 0;
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent);
}

/* Cookie consent */
.consent {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    max-width: 516px;
    margin: 0 auto;
    padding: 14px 14px 14px 18px;
    color: #1d1f1a;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .2), 0 0 0 1px rgba(0, 0, 0, .05);
    font-family: var(--font);
}
.consent[hidden] { display: none; }
.consent p { flex: 1 1 220px; margin: 0; font-size: 14px; line-height: 1.4; }
.consent-actions { display: flex; gap: 8px; margin-left: auto; }
.consent-btn {
    padding: 9px 16px;
    font: 600 14px/1.2 var(--font);
    color: inherit;
    background: #f1f0ec;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}
.consent-btn:hover { background: #e7e6e1; }
.consent-btn.is-primary { color: var(--on-accent); background: var(--accent); }
.consent-btn.is-primary:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }

/* Share dialog */
.share {
    width: min(420px, calc(100% - 24px));
    padding: 20px;
    color: #1d1f1a;
    background: #fff;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    font-family: var(--font);
}
.share::backdrop { background: rgba(10, 10, 10, .45); }
.share[open] { animation: share-in .18s ease-out; }
@keyframes share-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.share-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.share-head h2 { margin: 0; font: 700 17px/1.2 var(--heading-font); }
.share-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: inherit;
    background: #f1f0ec;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.share-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 14px;
    background: var(--bg);
    color: var(--text);
}
.share-card img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.share-card > span { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.share-card > span span { opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-list { margin: 0; padding: 0; list-style: none; }
.share-list a,
.share-list button {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 9px 8px;
    font: 500 15px/1.2 var(--font);
    color: inherit;
    text-align: left;
    background: none;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}
.share-list a:hover,
.share-list button:hover { background: #f4f3ef; }
.share-ico {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f0ec;
    color: var(--brand, #1d1f1a);
}
.is-done .share-ico { background: #e3efe3; color: #2e6b35; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

.site-initial {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    font-weight: 700;
    color: var(--on-accent);
    background: var(--accent);
}
