/*
 * Public "link-in-bio" (/links) page. Linktree-style vertical stack rendered in the
 * Chemist parchment/gold system. Every colour is driven by the theme CSS variables
 * (--bg, --ink, --gold, …) set on the page root, so the light/dark toggle just works.
 */

.lk-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid color-mix(in srgb, var(--ink, #2A2418) 11%, transparent);
    background: color-mix(in srgb, var(--bg, #EDE3C7) 93%, transparent);
    backdrop-filter: blur(9px);
}

.lk-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(100% - 48px, 1080px);
    min-height: 62px;
    margin: 0 auto;
}

.lk-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink, #2A2418);
    font-family: Cinzel, serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-decoration: none;
    text-transform: uppercase;
}

.lk-nav-brand-mark {
    padding-left: 10px;
    border-left: 1px solid var(--line, rgba(42, 36, 24, .2));
    color: color-mix(in srgb, var(--gold, #C8922E) 62%, var(--ink2, #5C5238));
    font-size: 9px;
    letter-spacing: .18em;
}

.lk-nav-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.lk-theme-toggle {
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line, rgba(42, 36, 24, .18));
    border-radius: 50%;
    place-items: center;
    color: var(--ink, #2A2418);
    background: transparent;
    cursor: pointer;
    font-size: 14px;
}

.lk-follow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid color-mix(in srgb, var(--ink, #2A2418) 18%, transparent);
    border-radius: 7px;
    color: var(--ink, #2A2418);
    font-family: Cinzel, serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.lk-follow img {
    width: 12px;
    height: 12px;
    filter: var(--icon-filter, none);
}

.lk-follow:hover {
    border-color: color-mix(in srgb, var(--gold, #C8922E) 46%, transparent);
    background: color-mix(in srgb, var(--bg2, #F4ECD6) 64%, transparent);
    transform: translateY(-1px);
}

.lk-shell {
    --lk-accent: color-mix(in srgb, var(--gold, #C8922E) 66%, var(--ink2, #5C5238));
    --lk-edge: color-mix(in srgb, var(--ink, #2A2418) 13%, transparent);
    --lk-surface: color-mix(in srgb, var(--bg2, #F4ECD6) 68%, var(--bg, #EDE3C7));
    max-width: 620px;
    margin: 0 auto;
    padding: 12px 24px 48px;
}

/* ------------------------------------------------------------------ profile */
.lk-profile {
    text-align: center;
    animation: fadeUp 0.8s ease both;
}

.lk-avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--gold, #C8922E) 58%, var(--ink2, #5C5238));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink, #2A2418) 5%, transparent),
                0 16px 30px -19px rgba(20, 15, 8, 0.42);
}

.lk-kicker {
    font-family: Cinzel, serif;
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--lk-accent);
    margin: 12px 0 5px;
}

.lk-name {
    font-family: "EB Garamond", Georgia, serif;
    font-weight: 500;
    font-size: clamp(26px, 4.4vw, 36px);
    line-height: 1;
    letter-spacing: -0.5px;
    margin: 0;
}

.lk-handle {
    display: inline-block;
    margin-top: 7px;
    text-decoration: none;
    color: var(--ink3, #8A7E60);
    font-family: Cinzel, serif;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-bottom: 1px solid color-mix(in srgb, var(--ink, #2A2418) 16%, transparent);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.lk-handle:hover {
    color: var(--lk-accent);
}

.lk-bio {
    max-width: 32em;
    margin: 9px auto 0;
    font-family: "EB Garamond", Georgia, serif;
    font-style: italic;
    font-size: clamp(14px, 1.9vw, 16px);
    line-height: 1.4;
    color: var(--ink2, #5C5238);
}

/* Score widgets are deliberately isolated so their compact mobile treatment does not affect
   the same shared component on the home or about pages. */
.lk-scores {
    margin: 12px 0 2px;
}

.lk-scores .score-card {
    border-color: var(--lk-edge);
    border-radius: 8px;
    background: color-mix(in srgb, var(--lk-surface) 90%, transparent);
    box-shadow: 0 14px 30px -25px rgba(20, 15, 8, .48);
}

.lk-scores .score-card:hover {
    border-color: color-mix(in srgb, var(--gold, #C8922E) 38%, var(--lk-edge));
    background: color-mix(in srgb, var(--lk-surface) 94%, var(--bg2, #F4ECD6));
    box-shadow: 0 20px 38px -25px rgba(20, 15, 8, .55);
}

.lk-scores .score-ring-fill {
    opacity: .78;
    filter: saturate(.52);
}

.lk-scores .score-card:hover .score-cta {
    color: var(--lk-accent);
}

/* ------------------------------------------------------------------ divider */
.lk-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 10px 0 8px;
}

.lk-divider span:first-child,
.lk-divider span:last-child {
    height: 1px;
    flex: 1 1 0%;
    background: var(--line, rgba(42, 36, 24, 0.28));
}

.lk-divider .lk-mark {
    flex: 0 0 auto;
    height: auto;
    background: none;
    color: var(--lk-accent);
    font-size: 14px;
    letter-spacing: 6px;
}

/* -------------------------------------------------------------------- links */
.lk-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.lk-item {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    cursor: pointer;
    text-decoration: none;
    color: var(--ink, #2A2418);
    background: linear-gradient(145deg, color-mix(in srgb, var(--lk-surface) 92%, transparent), color-mix(in srgb, var(--bg, #EDE3C7) 72%, transparent));
    border: 1px solid var(--lk-edge);
    border-radius: 8px;
    box-shadow: 0 1px 0 color-mix(in srgb, white 24%, transparent) inset, 0 14px 30px -25px rgba(20, 15, 8, 0.48);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    animation: fadeUp 0.6s ease both;
}

/* A gold accent bar wipes down the leading edge on hover. */
.lk-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--lk-accent);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.22s ease;
}

.lk-item:hover,
.lk-item:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--gold, #C8922E) 38%, var(--lk-edge));
    box-shadow: 0 1px 0 color-mix(in srgb, white 28%, transparent) inset, 0 20px 38px -25px rgba(20, 15, 8, 0.55);
    outline: none;
}

.lk-item:hover::before,
.lk-item:focus-visible::before {
    transform: scaleY(1);
}

.lk-item-media {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lk-edge);
    background: color-mix(in srgb, var(--bg2, #F4ECD6) 78%, var(--bg, #EDE3C7));
}

.lk-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lk-item-fallback {
    font-family: Cinzel, serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--lk-accent);
}

.lk-item-body {
    flex: 1 1 0%;
    min-width: 0;
}

.lk-item-title {
    display: block;
    font-family: "EB Garamond", Georgia, serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--ink, #2A2418);
    transition: color 0.2s ease;
}

.lk-item:hover .lk-item-title {
    color: color-mix(in srgb, var(--gold, #C8922E) 58%, var(--ink, #2A2418));
}

.lk-item-desc {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--ink2, #5C5238);
    overflow: hidden;
    text-overflow: ellipsis;
}

.lk-item-arrow {
    flex: 0 0 auto;
    font-size: 18px;
    color: var(--ink3, #8A7E60);
    transition: transform 0.2s ease, color 0.2s ease;
}

.lk-item:hover .lk-item-arrow {
    color: var(--lk-accent);
    transform: translateX(3px);
}

/* -------------------------------------------------------------------- empty */
.lk-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--ink2, #5C5238);
    border: 1px dashed var(--line, rgba(42, 36, 24, 0.28));
    border-radius: 4px;
    font-style: italic;
}

/* -------------------------------------------------------------------- foot */
.lk-foot {
    text-align: center;
    margin-top: 32px;
}

.lk-foot a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 26px;
    border-radius: 7px;
    font-family: Cinzel, serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink, #2A2418);
    text-decoration: none;
    border: 1px solid color-mix(in srgb, var(--ink, #2A2418) 17%, transparent);
    background: color-mix(in srgb, var(--bg2, #F4ECD6) 58%, transparent);
    transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.lk-foot a span {
    transition: transform 0.22s ease;
}

.lk-foot a:hover {
    background: var(--ink, #2A2418);
    border-color: var(--ink, #2A2418);
    color: var(--bg, #EDE3C7) !important;
    transform: translateY(-2px);
}

.lk-foot a:hover span {
    transform: translateX(4px);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .lk-profile, .lk-item { animation: none; }
}

@media (max-width: 520px) {
    .lk-nav-inner {
        width: min(100% - 32px, 1080px);
        min-height: 58px;
    }

    .lk-nav-brand {
        gap: 8px;
        font-size: 10px;
    }

    .lk-nav-brand-mark {
        padding-left: 8px;
        font-size: 8px;
    }

    .lk-nav-actions {
        gap: 7px;
    }

    .lk-follow {
        gap: 6px;
        padding: 8px 10px;
        font-size: 8px;
    }

    .lk-shell {
        padding: 10px 16px 34px;
    }

    .lk-avatar {
        width: 64px;
        height: 64px;
    }

    .lk-kicker {
        margin-top: 10px;
    }

    .lk-bio {
        max-width: 28em;
        margin-top: 8px;
        font-size: 15px;
        line-height: 1.35;
    }

    .lk-scores {
        margin: 13px 0 1px;
    }

    .lk-scores .score-cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .lk-scores .score-card {
        min-width: 0;
        max-width: none;
        flex: none;
        gap: 7px;
        padding: 9px 8px;
        border-radius: 8px;
    }

    .lk-scores .score-ring,
    .lk-scores .score-ring svg.score-ring-svg {
        width: 42px;
        height: 42px;
    }

    .lk-scores .score-logo,
    .lk-scores .score-logo-img {
        width: 29px;
        height: 29px;
    }

    .lk-scores .score-kicker {
        font-size: 8px;
        letter-spacing: .09em;
        white-space: nowrap;
    }

    .lk-scores .score-value {
        margin-top: 0;
        font-size: 21px;
    }

    /* The whole compact card is a link, so retain the directional cue without spending a line on copy. */
    .lk-scores .score-cta {
        margin-top: 1px;
        font-size: 0;
        line-height: 1;
    }

    .lk-scores .score-cta-arrow {
        font-size: 13px;
    }

    .lk-divider {
        margin: 12px 0 9px;
    }

    .lk-list {
        gap: 7px;
    }

    .lk-item {
        gap: 12px;
        padding: 12px 13px;
        border-radius: 10px;
    }

    .lk-item-media {
        width: 38px;
        height: 38px;
    }

    .lk-item-title {
        font-size: 16px;
    }

    .lk-item-desc {
        font-size: 12.5px;
        line-height: 1.3;
    }

    .lk-foot {
        margin-top: 24px;
    }

    .lk-foot a {
        width: 100%;
        justify-content: center;
        padding: 12px 18px;
    }
}
