/* Profile page — Instagram-style layout (reference) */

.profile-page .profile-main {
    padding-top: 80px;
    min-height: 100vh;
}

.profile-center {
    flex: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

@media (min-width: 1260px) {
    .profile-center {
        padding-left: calc(244px + 1.5rem);
        padding-right: calc(320px + 1.5rem);
    }
}

.profile-section {
    width: 100%;
    max-width: 935px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
    box-sizing: border-box;
}

.profile-not-found {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.profile-not-found a {
    color: var(--primary-green);
    margin-top: 1rem;
    display: inline-block;
}

/* ——— Profile header (avatar + info) ——— */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 736px) {
    .profile-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 4rem;
    }
}

.profile-avatar-wrap {
    flex-shrink: 0;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    background-size: cover;
    background-position: center;
}

@media (min-width: 736px) {
    .profile-avatar {
        width: 170px;
        height: 170px;
    }
}

.profile-info {
    flex: 1;
    min-width: 0;
    text-align: center;
}

@media (min-width: 736px) {
    .profile-info {
        text-align: left;
    }
}

.profile-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.profile-handle {
    font-family: 'Hudson', sans-serif;
    font-size: 1.75rem;
    font-weight: 200;
    color: var(--text-white);
    margin: 0;
    letter-spacing: 0.02em;
}

.profile-actions-own[hidden] {
    display: none !important;
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-family: 'Hudson', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    border: none;
}

.profile-btn-follow {
    background: var(--primary-green);
    color: var(--darker-bg);
}

.profile-btn-follow:hover {
    background: rgba(0, 255, 136, 0.85);
}

.profile-btn-message {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-btn-message:hover {
    background: rgba(255, 255, 255, 0.15);
}

.profile-btn-more {
    padding: 0.5rem 0.75rem;
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-btn-edit,
.profile-btn-archive {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-btn-edit:hover,
.profile-btn-archive:hover {
    background: rgba(255, 255, 255, 0.12);
}

.profile-btn-edit {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.profile-stats {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.profile-stats li {
    font-size: 0.95rem;
    color: var(--text-light);
}

.profile-stats strong {
    color: var(--text-white);
    margin-right: 0.25rem;
}

.profile-name {
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.profile-bio {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    white-space: pre-wrap;
    margin-bottom: 0.5rem;
}

.profile-followed-by {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-followed-by a {
    color: var(--text-white);
    text-decoration: none;
}

.profile-followed-by a:hover {
    text-decoration: underline;
}

/* ——— Highlights strip ——— */
.profile-highlights {
    margin-bottom: 2rem;
    overflow: hidden;
}

.profile-highlights-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 0.5rem 0 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.profile-highlights-track::-webkit-scrollbar {
    display: none;
}

.profile-highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8rem;
}

.profile-highlight-ring {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
}

.profile-highlight-item:hover .profile-highlight-ring {
    border-color: rgba(255, 255, 255, 0.4);
}

.profile-highlight-label {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ——— Tabs (Posts / TRANSMISSIONS / Tagged) ——— */
.profile-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0;
}

.profile-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
    flex: 1;
    max-width: 120px;
    background: none;
    border: none;
    border-top: 2px solid transparent;
    color: var(--text-muted);
    font-family: 'Hudson', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    margin-top: -1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.profile-tab:hover:not(:disabled) {
    color: var(--text-light);
}

.profile-tab.profile-tab-active {
    color: var(--primary-green);
    border-top-color: var(--primary-green);
}

.profile-tab:disabled {
    cursor: default;
    opacity: 0.5;
}

/* ——— Post grid (3 columns, square thumbnails) ——— */
.profile-grid-wrap {
    width: 100%;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

@media (min-width: 736px) {
    .profile-grid {
        gap: 4px;
    }
}

.profile-grid-item {
    position: relative;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: block;
    text-decoration: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    width: 100%;
}

.profile-grid-item:hover .profile-grid-play {
    opacity: 1;
}

.profile-grid-item:hover::after {
    opacity: 1;
}

.profile-grid-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-grid-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.profile-grid-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.25rem;
    opacity: 0.85;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.profile-grid-item:hover .profile-grid-play {
    opacity: 1;
}

/* ——— Profile post modal (prev/next outside content) ——— */
.feed-modal-post .feed-modal-body-post {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    min-height: 0;
}

.profile-post-nav {
    flex-shrink: 0;
    align-self: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-white);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    margin: 0 0.5rem;
}

.profile-post-nav:hover:not([hidden]) {
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary-green);
}

.profile-post-nav[hidden] {
    display: none;
}

#profilePostContent {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
