:root {
    --profile-bg: #ffffff;
    --profile-surface: #ffffff;
    --profile-surface-strong: #fdfdfd;
    --profile-surface-soft: rgba(0, 0, 0, 0.04);
    --profile-border: rgba(0, 0, 0, 0.12);
    --profile-border-strong: rgba(0, 0, 0, 0.24);
    --profile-text: #000000;
    --profile-text-muted: #555555;
    --profile-text-soft: #777777;
    --profile-accent: #000000;
    --profile-accent-strong: #111111;
    --profile-pink: #333333;
    --profile-shadow: 0 16px 32px rgba(0, 0, 0, 0.05);
}

body {
    background: #ffffff;
    color: var(--profile-text);
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
}

.nav-container {
    width: min(1280px, calc(100vw - 32px));
    margin: 0 auto;
    min-height: 88px;
    display: flex;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #000000;
    text-decoration: none;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--profile-text-soft);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-btn:hover {
    color: var(--profile-text);
    transform: translateX(-2px);
}

.container.profile-page {
    width: min(1280px, calc(100vw - 32px));
    margin: 18px auto 56px;
    padding: 0;
    display: block;
}

.profile-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    gap: 28px;
    padding: 32px;
    border: 1px solid var(--profile-border);
    border-radius: 32px;
    background: #fafafa;
    box-shadow: var(--profile-shadow);
    overflow: hidden;
}

.profile-hero::before,
.profile-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.profile-hero::before {
    display: none;
}

.profile-hero::after {
    display: none;
}

.profile-copy,
.profile-spotlight {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.profile-copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-badge-row,
.profile-chips,
.profile-actions,
.section-badges,
.spotlight-meta,
.artwork-topline,
.artwork-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-role,
.profile-pill,
.profile-chip,
.section-badge,
.spotlight-tag,
.artwork-category,
.artwork-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-role {
    background: #f0f0f0;
    color: var(--profile-text);
}

.profile-pill {
    background: #ffffff;
    border: 1px solid var(--profile-border);
    color: var(--profile-text);
}

.profile-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.profile-avatar-shell {
    width: 124px;
    height: 124px;
    padding: 4px;
    border-radius: 30px;
    background: linear-gradient(135deg, #ffffff, #666666);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.4);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 26px;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.9);
}

.profile-info {
    min-width: 0;
}

.profile-eyebrow {
    margin: 0 0 12px;
    color: var(--profile-text-soft);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.profile-name {
    margin: 0;
    font-size: clamp(2.6rem, 4vw, 4.3rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: var(--profile-text);
}

.profile-intro {
    max-width: 900px;
    margin: 14px 0 0;
    color: var(--profile-text-muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.profile-chip {
    background: #f5f5f5;
    border: 1px solid var(--profile-border);
    color: var(--profile-text);
    letter-spacing: 0.02em;
    text-transform: none;
    font-size: 0.92rem;
    font-weight: 600;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stat-card {
    min-width: 0;
    min-height: 120px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--profile-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-label {
    display: block;
    margin-bottom: 10px;
    color: var(--profile-text-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stat-val {
    display: block;
    margin-bottom: 6px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
    line-height: 1;
    font-weight: 700;
    color: var(--profile-text);
}

.stat-copy {
    margin: 0;
    color: var(--profile-text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.profile-actions {
    margin-top: 4px;
}

.btn-follow,
.btn-message,
.btn-commission,
.btn-secondary,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-follow:hover,
.btn-message:hover,
.btn-commission:hover,
.btn-secondary:hover,
.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-follow {
    border: 1px solid var(--profile-border);
    background: #ffffff;
    color: var(--profile-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-follow.active,
.btn-follow.is-following {
    background: #f0f0f0;
    border-color: var(--profile-border-strong);
    box-shadow: none;
    color: var(--profile-text);
}

.btn-message {
    background: var(--profile-text);
    border: 1px solid transparent;
    color: #ffffff;
}

.btn-commission {
    background: #f5f5f5;
    border: 1px solid var(--profile-border);
    color: var(--profile-text);
}

.profile-spotlight {
    min-height: 100%;
    padding: 24px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid var(--profile-border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spotlight-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--profile-text-soft);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.spotlight-media {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 4 / 3;
    background: rgba(148, 163, 184, 0.08);
}

.spotlight-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.44), transparent 52%);
}

.spotlight-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.spotlight-body h2,
.section-header h2,
.empty-state h3,
.artwork-title {
    font-family: 'Space Grotesk', sans-serif;
}

.spotlight-body h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1;
}

.spotlight-body p {
    margin: 10px 0 0;
    color: var(--profile-text-muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

.spotlight-tag {
    min-height: 34px;
    padding-inline: 12px;
    background: #f0f0f0;
    color: var(--profile-text);
}

.spotlight-meta {
    margin-top: 16px;
    color: var(--profile-text-soft);
    font-size: 0.9rem;
}

.spotlight-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    padding: 28px 24px;
    border-radius: 24px;
    background: #fafafa;
    border: 1px dashed var(--profile-border-strong);
}

.spotlight-placeholder i {
    font-size: 2rem;
    color: var(--profile-text-soft);
}

.spotlight-placeholder h2 {
    margin: 0;
    font-size: 2rem;
    color: var(--profile-text);
}

.spotlight-placeholder p {
    margin: 0;
    color: var(--profile-text-muted);
    line-height: 1.7;
}

.portfolio-section {
    margin-top: 26px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-kicker {
    margin: 0 0 10px;
    color: #cccccc;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-header h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3.1rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.section-copy {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--profile-text-muted);
    font-size: 1rem;
    line-height: 1.75;
}

.section-badge {
    background: #f0f0f0;
    border: 1px solid var(--profile-border);
    color: var(--profile-text);
    letter-spacing: 0.02em;
    text-transform: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.artworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.artwork-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--profile-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.artwork-card:hover {
    transform: translateY(-4px);
    border-color: var(--profile-border-strong);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.artwork-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: rgba(148, 163, 184, 0.08);
}

.artwork-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.15), transparent 46%);
}

.artwork-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.artwork-card:hover .artwork-image {
    transform: scale(1.03);
}

.artwork-category,
.artwork-date {
    position: absolute;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.artwork-category {
    top: 14px;
    left: 14px;
    background: #ffffff;
    color: var(--profile-text);
    border: 1px solid var(--profile-border);
}

.artwork-date {
    right: 14px;
    bottom: 14px;
    background: #f0f0f0;
    color: var(--profile-text);
    border: 1px solid var(--profile-border);
}

.artwork-info {
    padding: 18px;
}

.artwork-topline {
    justify-content: space-between;
    color: var(--profile-text-soft);
    font-size: 0.8rem;
}

.artwork-title {
    margin: 12px 0 10px;
    font-size: 1.45rem;
    line-height: 1.12;
    color: var(--profile-text);
}

.artwork-description {
    margin: 0;
    min-height: 68px;
    color: var(--profile-text-muted);
    font-size: 0.94rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.artwork-footer {
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--profile-border);
}

.artwork-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--profile-text);
}

.artwork-hint {
    color: var(--profile-text-soft);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.empty-state {
    padding: 62px 28px;
    border-radius: 26px;
    text-align: center;
    background: #fafafa;
    border: 1px dashed var(--profile-border-strong);
}

.empty-state i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    margin-bottom: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    color: #cccccc;
    font-size: 1.8rem;
}

.empty-state h3 {
    margin: 0 0 10px;
    font-size: 2rem;
    color: #fff;
}

.empty-state p {
    max-width: 560px;
    margin: 0 auto;
    color: var(--profile-text-muted);
    line-height: 1.75;
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
    z-index: 1200;
}

.modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-dialog {
    width: min(100%, 540px);
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(19, 28, 49, 0.99), rgba(10, 15, 29, 0.99));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--profile-shadow);
    pointer-events: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 24px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.7rem;
    color: #fff;
}

.modal-header p {
    margin: 8px 0 0;
    color: var(--profile-text-muted);
    line-height: 1.6;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.7);
    color: var(--profile-text);
    cursor: pointer;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #dce7f8;
    font-size: 0.92rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    font: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.72);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.84);
    color: var(--profile-text);
}

.btn-primary {
    border: none;
    background: #ffffff;
    color: #000000;
    box-shadow: 0 16px 30px rgba(255, 255, 255, 0.12);
}

.toast-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: var(--profile-shadow);
    font-size: 0.92rem;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.hiding {
    opacity: 0;
    transform: translateY(-10px);
}

@media (max-width: 1180px) {
    .container.profile-page,
    .nav-container {
        width: min(100vw - 28px, 1120px);
    }

    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-spotlight {
        min-height: 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .nav-container {
        min-height: 76px;
    }

    .container.profile-page {
        margin-top: 14px;
        margin-bottom: 40px;
    }

    .logo {
        font-size: 2.1rem;
    }

    .profile-hero {
        padding: 22px;
        border-radius: 26px;
        gap: 22px;
    }

    .profile-heading {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .profile-avatar-shell {
        width: 112px;
        height: 112px;
        border-radius: 28px;
    }

    .profile-avatar {
        border-radius: 24px;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 0;
    }

    .profile-chips,
    .profile-badge-row,
    .profile-actions {
        justify-content: center;
    }

    .profile-spotlight,
    .artwork-info {
        padding: 18px;
    }

    .section-header h2 {
        font-size: clamp(1.8rem, 7vw, 2.6rem);
    }

    .artworks-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 560px) {
    .container.profile-page,
    .nav-container {
        width: calc(100vw - 20px);
    }

    .nav-left {
        gap: 12px;
    }

    .back-btn {
        font-size: 0.88rem;
    }

    .profile-hero {
        padding: 18px;
    }

    .profile-role,
    .profile-pill,
    .profile-chip,
    .section-badge {
        width: 100%;
    }

    .profile-actions,
    .form-actions,
    .artwork-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-follow,
    .btn-message,
    .btn-commission,
    .btn-secondary,
    .btn-primary {
        width: 100%;
    }

    .artwork-topline {
        flex-direction: column;
        align-items: flex-start;
    }

    .artwork-description {
        min-height: 0;
    }

    .modal {
        padding: 16px;
    }

    .modal-dialog {
        padding: 22px;
    }

    .toast-container {
        right: 14px;
        left: 14px;
        bottom: 14px;
    }

    .toast {
        width: 100%;
    }
}

/* Profile Responsive */
@media (max-width: 1024px) {
  .profile-container { display: flex; flex-direction: column; }
  .profile-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .profile-content { width: 100%; padding: 20px; }
}
@media (max-width: 768px) {
  .profile-header { flex-direction: column; text-align: center; }
  .profile-avatar { margin: 0 auto 15px; }
  .stats-container { justify-content: center; gap: 15px; }
}
