/* Public profile: a cook's working shelf. Loaded after profile.css. */

.profile-page {
    max-width: 1240px;
    padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) 5rem;
}

.profile-kitchen {
    --profile-ink: #0d0c0a;
    --profile-soot: #171411;
    --profile-paper: #f2e9d9;
    --profile-copper: #dc704d;
    --profile-brass: #c6a66a;
    position: relative;
    margin: 0 0 clamp(2.5rem, 6vw, 5rem);
    padding: 0;
    overflow: hidden;
    text-align: left;
    border: 1px solid color-mix(in srgb, var(--profile-brass) 30%, transparent);
    border-radius: 1.75rem;
    background: var(--profile-soot);
    box-shadow: 0 28px 80px rgb(0 0 0 / 0.28);
}

.profile-kitchen__shelf {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    height: clamp(12rem, 22vw, 17rem);
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 20%, rgb(198 166 106 / 0.22), transparent 24rem),
        #221d18;
}

.profile-kitchen__shelf-frame {
    min-width: 0;
    overflow: hidden;
}

.profile-kitchen__shelf-frame:only-child {
    grid-column: 1 / -1;
}

.profile-kitchen__shelf-frame picture {
    display: contents;
}

.profile-kitchen__shelf-image {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: block;
    object-fit: cover;
    filter: saturate(0.82) contrast(1.04);
    transform: scale(1.015);
}

.profile-kitchen__shelf-frame:nth-child(2) .profile-kitchen__shelf-image {
    transform: scale(1.08);
}

.profile-kitchen__shelf-empty {
    grid-column: 1 / -1;
    height: 100%;
    min-height: 0;
    background:
        linear-gradient(110deg, transparent 0 42%, rgb(198 166 106 / 0.13) 42% 43%, transparent 43%),
        repeating-linear-gradient(90deg, #211b16 0 12rem, #181511 12rem 12.25rem);
}

.profile-kitchen__shelf-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgb(8 7 6 / 0.12), rgb(8 7 6 / 0.05) 42%, rgb(8 7 6 / 0.92)),
        linear-gradient(90deg, rgb(8 7 6 / 0.34), transparent 45%, rgb(8 7 6 / 0.18));
    pointer-events: none;
}

.profile-kitchen__identity {
    position: relative;
    display: grid;
    grid-template-columns: 9.5rem minmax(0, 1fr) minmax(15rem, 20rem);
    gap: clamp(1.25rem, 3.5vw, 3rem);
    align-items: start;
    padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3rem);
}

.profile-kitchen .profile-avatar {
    width: 9.5rem;
    height: 9.5rem;
    margin-top: -3.4rem;
    border: 0.45rem solid var(--profile-soot);
    border-radius: 1.5rem 1.5rem 1.5rem 0.45rem;
    background: #211d18;
    box-shadow: 0 18px 42px rgb(0 0 0 / 0.36);
}

.profile-kitchen .profile-avatar__initials {
    color: var(--profile-paper);
    font-family: var(--font-display, var(--font-heading));
    font-size: 3rem;
}

.profile-kitchen__intro {
    padding-top: 1.45rem;
}

.profile-kitchen__handle,
.profile-section-kicker {
    margin: 0 0 0.55rem;
    color: var(--profile-copper, #dc704d);
    font: 750 0.7rem/1.25 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.profile-kitchen .profile-header__name {
    max-width: 16ch;
    margin: 0;
    color: var(--profile-paper);
    font-family: var(--font-display, var(--font-heading));
    font-size: clamp(2.25rem, 5vw, 4.6rem);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -0.045em;
}

.profile-kitchen .profile-header__bio {
    max-width: 42rem;
    margin: 1.1rem 0 0;
    color: color-mix(in srgb, var(--profile-paper) 76%, transparent);
    font-size: clamp(0.98rem, 1.4vw, 1.08rem);
    line-height: 1.65;
}

.profile-kitchen__trail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-top: 1rem;
    color: color-mix(in srgb, var(--profile-paper) 55%, transparent);
    font-size: 0.78rem;
}

.profile-kitchen__trail a {
    color: inherit;
    text-decoration: none;
}

.profile-kitchen__trail a:hover {
    color: var(--profile-paper);
}

.profile-kitchen .profile-badges {
    justify-content: flex-start;
    gap: 0.45rem;
    margin: 1.1rem 0 0;
}

.profile-kitchen .profile-badge {
    width: auto;
    height: auto;
    gap: 0.4rem;
    padding: 0.42rem 0.65rem;
    border: 1px solid rgb(198 166 106 / 0.28);
    border-radius: 999px;
    background: rgb(198 166 106 / 0.08);
    color: var(--profile-paper);
    font-size: 0.72rem;
}

.profile-kitchen .profile-badge__icon,
.profile-kitchen .profile-badge__icon svg {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--profile-brass);
}

.profile-kitchen__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.3rem;
}

.profile-kitchen__actions .btn {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1rem;
    border-radius: 0.65rem;
}

.profile-kitchen__actions .btn--outline {
    border-color: rgb(242 233 217 / 0.35);
    color: var(--profile-paper);
}

.profile-kitchen__actions .btn--outline:hover {
    border-color: var(--profile-paper);
    background: var(--profile-paper);
    color: var(--profile-ink);
}

.profile-kitchen__actions .profile-kitchen__admin-btn {
    border: 1px solid #d6bd86;
    background: #d6bd86;
    color: #17120d;
    font-weight: 750;
}

.profile-kitchen__actions .profile-kitchen__admin-btn:hover {
    border-color: #f1dfb9;
    background: #f1dfb9;
    color: #0d0c0a;
}

.profile-kitchen__ledger {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1.5rem 0 0;
    overflow: hidden;
    border: 1px solid rgb(198 166 106 / 0.24);
    border-radius: 1rem;
    background: rgb(9 8 7 / 0.3);
}

.profile-kitchen__ledger > div {
    min-height: 7.4rem;
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between;
    padding: 1rem;
    color: inherit;
    text-decoration: none;
}

.profile-kitchen__ledger > :nth-child(odd) {
    border-right: 1px solid rgb(198 166 106 / 0.2);
}

.profile-kitchen__ledger > :nth-child(-n + 2) {
    border-bottom: 1px solid rgb(198 166 106 / 0.2);
}

.profile-kitchen__ledger dt {
    color: color-mix(in srgb, var(--profile-paper) 54%, transparent);
    font: 700 0.64rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.profile-kitchen__ledger dd {
    margin: 0;
    color: var(--profile-paper);
    font-family: var(--font-display, var(--font-heading));
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    line-height: 1;
}

.profile-kitchen__ledger-link:hover {
    background: rgb(220 112 77 / 0.1);
}

.profile-kitchen__ledger-link a {
    color: inherit;
    text-decoration: none;
}

.profile-section-kicker {
    color: var(--accent-color);
}

.profile-suggestions,
.profile-featured,
.profile-tabs {
    margin-bottom: clamp(2.75rem, 6vw, 5rem);
}

.profile-suggestions__heading,
.profile-featured__heading,
.profile-tabs__heading h2 {
    margin: 0;
    color: var(--text-color);
    font-family: var(--font-display, var(--font-heading));
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.profile-featured__card {
    margin-top: 1.35rem;
    border-radius: 1.35rem;
}

.profile-featured__image {
    flex-basis: 42%;
    min-height: 18rem;
}

.profile-tabs__heading {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    align-items: end;
    margin-bottom: 1.5rem;
}

.profile-tabs__heading > p {
    max-width: 31rem;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.profile-tabs__nav {
    gap: 0.4rem;
    padding: 0.35rem;
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    background: #171411;
}

.profile-tabs__nav .profile-tab-btn,
:root[data-theme="dark"] .profile-tabs__nav .profile-tab-btn {
    min-height: 2.75rem;
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    padding: 0.68rem 0.95rem;
    margin: 0;
    border: 1px solid #594b3f;
    border-radius: 0.62rem;
    background: #251f1a;
    color: #f2e9d9;
    font-size: 0.83rem;
    font-weight: 650;
}

.profile-tabs__nav .profile-tab-btn:hover,
:root[data-theme="dark"] .profile-tabs__nav .profile-tab-btn:hover {
    border-color: #8e7967;
    background: #352c25;
    color: #fffaf2;
}

.profile-tab-btn span {
    min-width: 1.45rem;
    padding: 0.13rem 0.38rem;
    border-radius: 999px;
    background: #3a3028;
    color: #f2e9d9;
    font-size: 0.68rem;
    text-align: center;
}

.profile-tabs__nav .profile-tab-btn.active,
:root[data-theme="dark"] .profile-tabs__nav .profile-tab-btn.active {
    border: 1px solid #c66c4d;
    background: #963b28;
    color: #fffaf2;
    font-weight: 750;
}

.profile-tabs__nav .profile-tab-btn.active span,
:root[data-theme="dark"] .profile-tabs__nav .profile-tab-btn.active span {
    background: rgb(255 255 255 / 0.16);
    color: inherit;
}

.profile-tab-grid {
    gap: clamp(1rem, 2vw, 1.5rem);
}

.profile-card,
.profile-upload-card {
    border-radius: 1.05rem;
    box-shadow: none;
}

.profile-card:hover,
.profile-upload-card:hover {
    border-color: color-mix(in srgb, var(--accent-color) 58%, var(--border-color));
    box-shadow: 0 20px 42px rgb(0 0 0 / 0.22);
    transform: translateY(-4px);
}

.profile-card__image {
    aspect-ratio: 1.25 / 1;
}

.profile-card__body {
    padding: 1rem 1rem 1.1rem;
}

.profile-card__title {
    font-size: 1.08rem;
}

.profile-empty-state {
    padding: 4.5rem 1.5rem;
    border: 1px dashed var(--border-color);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--surface-secondary) 62%, transparent);
}

.profile-kitchen a:focus-visible,
.profile-kitchen button:focus-visible,
.profile-tabs a:focus-visible,
.profile-tabs button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--profile-copper, var(--accent-color)) 70%, white);
    outline-offset: 3px;
}

@media (max-width: 960px) {
    .profile-kitchen__identity {
        grid-template-columns: 7.5rem minmax(0, 1fr);
    }

    .profile-kitchen .profile-avatar {
        width: 7.5rem;
        height: 7.5rem;
    }

    .profile-kitchen__ledger {
        grid-column: 1 / -1;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-top: 0;
    }

    .profile-kitchen__ledger > div {
        min-height: 6rem;
    }

    .profile-kitchen__ledger > :nth-child(n) {
        border-top: 0;
        border-bottom: 0;
        border-right: 1px solid rgb(198 166 106 / 0.2);
    }

    .profile-kitchen__ledger > :last-child {
        border-right: 0;
    }
}

@media (max-width: 680px) {
    .profile-page {
        padding-inline: 0.75rem;
    }

    .profile-kitchen {
        border-radius: 1.1rem;
    }

    .profile-kitchen__shelf {
        grid-template-columns: repeat(2, 1fr);
        height: 10rem;
        min-height: 0;
    }

    .profile-kitchen__shelf-image,
    .profile-kitchen__shelf-empty {
        height: 100%;
        min-height: 0;
    }

    .profile-kitchen__identity {
        grid-template-columns: 5.75rem minmax(0, 1fr);
        gap: 0.9rem;
        padding: 0 1rem 1rem;
    }

    .profile-kitchen .profile-avatar {
        width: 5.75rem;
        height: 5.75rem;
        margin-top: -2rem;
        border-width: 0.32rem;
        border-radius: 1rem 1rem 1rem 0.35rem;
    }

    .profile-kitchen .profile-avatar__initials {
        font-size: 2rem;
    }

    .profile-kitchen__intro {
        padding-top: 0.8rem;
    }

    .profile-kitchen__handle {
        font-size: 0.58rem;
    }

    .profile-kitchen .profile-header__name {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .profile-kitchen .profile-header__bio,
    .profile-kitchen__trail,
    .profile-kitchen .profile-badges,
    .profile-kitchen__actions {
        grid-column: 1 / -1;
    }

    .profile-kitchen .profile-header__bio {
        margin-top: 1.2rem;
    }

    .profile-kitchen__ledger {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-kitchen__ledger > :nth-child(n) {
        border-right: 0;
        border-bottom: 0;
    }

    .profile-kitchen__ledger > :nth-child(odd) {
        border-right: 1px solid rgb(198 166 106 / 0.2);
    }

    .profile-kitchen__ledger > :nth-child(-n + 2) {
        border-bottom: 1px solid rgb(198 166 106 / 0.2);
    }

    .profile-kitchen__ledger > div {
        min-height: 5.2rem;
        padding: 0.8rem;
    }

    .profile-tabs__heading {
        display: block;
    }

    .profile-tabs__heading > p {
        margin-top: 0.8rem;
    }

    .profile-tabs__nav {
        border-radius: 0.75rem;
    }

    .profile-tab-btn {
        padding-inline: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-card,
    .profile-upload-card,
    .profile-badge {
        transition: none;
    }
}
