/* Profile route: two-column identity rail + content column. Reuses blueprint
   primitives (status-pill, tab, state-card, card-surface, button) and the shell
   layer for account chrome. Sits inside the shell content region. */

.profile-page {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(0.75rem, 2vw, 1.75rem) clamp(1rem, 3vw, 2.5rem);
}

.profile-shell {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* Two-column layout: narrow identity rail + wide content. */

.profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    gap: clamp(1rem, 2.5vw, 2rem);
    align-items: start;
}

@media (max-width: 52rem) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

/* Identity rail */

.profile-rail {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: clamp(1rem, 2vw, 1.4rem);
}

@media (min-width: 52rem) {
    .profile-rail {
        position: sticky;
        top: 1rem;
    }
}

.profile-rail .profile-avatar {
    width: 7rem;
    height: 7rem;
    object-fit: cover;
    border: 1px solid var(--color-border);
}

.profile-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-overlay);
    color: var(--color-primary);
    font-family: var(--font-heading, var(--font-ui));
    font-size: 2.5rem;
    font-weight: 700;
}

.profile-rail-identity {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.profile-rail-identity h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    line-height: 1.12;
    color: var(--color-emphasis);
    letter-spacing: -0.02em;
    word-break: break-word;
}

.profile-handle {
    margin: 0;
    color: var(--color-secondary);
    font-size: 0.95rem;
    word-break: break-word;
}

.profile-pronouns {
    color: var(--color-muted);
}

.profile-bsky-note {
    align-self: flex-start;
    margin-top: 0.15rem;
    padding: 0.15rem 0.45rem;
    border: 1px dashed var(--color-border);
    color: var(--color-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Dashed section dividers within the rail (blueprint rhythm). */

.profile-stats,
.profile-bio,
.profile-rail-links {
    padding-top: 0.8rem;
    border-top: 1px dashed var(--color-border);
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.9rem;
    color: var(--color-subtle);
    font-size: 0.9rem;
}

.profile-rail-action {
    display: flex;
}

.profile-rail-action .profile-follow-form {
    width: 100%;
    margin: 0;
}

.profile-rail-action .button {
    width: 100%;
    justify-content: center;
}

.profile-bio {
    margin: 0;
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.profile-bio a {
    color: var(--color-link);
}

.profile-rail-links {
    list-style: none;
    margin: 0;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-rail-links a {
    color: var(--color-link);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    word-break: break-all;
}

/* Content column */

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
}

.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.profile-tab-content {
    min-height: 12rem;
}

.profile-things-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
    align-content: start;
}

.profile-placeholder-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 2rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-muted);
}

/* About tab */

.profile-about {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.profile-about-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    margin: 0;
}

.profile-about-meta div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.profile-about-meta dt {
    color: var(--color-muted);
    font-size: 0.8rem;
}

.profile-about-meta dd {
    margin: 0;
    color: var(--color-text);
}

.profile-about-links h2 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    color: var(--color-subtle);
}

.profile-about-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.profile-about-links a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.profile-about-fallback-note {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.875rem;
}

.profile-muted {
    color: var(--color-muted);
}

/* Sign-in CTA */

.profile-sign-in {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.profile-sign-in h1 {
    margin: 0;
    color: var(--color-emphasis);
}
