* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Layout */
.layout {
    display: flex;
    max-width: 1280px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Left Sidebar */
.sidebar {
    width: 275px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--text-primary);
    transition: background 0.2s;
    margin-bottom: 8px;
}

.logo:hover {
    background: var(--hover-bg);
}

.nav {
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    transition: background 0.2s;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--hover-bg);
}

.nav-item.active {
    font-weight: 700;
}

.nav-item svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--hover-bg);
}

/* Main Content */
.main {
    flex: 1;
    max-width: 600px;
    border-right: 1px solid var(--border-color);
}

/* Profile Header */
.profile-header {
    position: relative;
}

.profile-banner {
    height: 200px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #0d47a1 100%);
    overflow: hidden;
}

.profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    padding: 12px 16px 16px;
}

.avatar-wrapper {
    margin-top: -67px;
    margin-bottom: 12px;
}

.avatar {
    width: 134px;
    height: 134px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: 4px solid var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar span {
    font-size: 56px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.profile-actions {
    position: absolute;
    top: 212px;
    right: 16px;
}

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

.profile-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-badge {
    flex-shrink: 0;
}

.profile-handle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-bio {
    font-size: 15px;
    color: var(--text-primary);
    margin-top: 12px;
    line-height: 1.5;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.stat strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}

.tab:hover {
    background: var(--hover-bg);
}

.tab.active {
    color: var(--text-primary);
    font-weight: 700;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Feed */
.feed {
    /* Posts container */
}

/* Post */
.post {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.post:hover {
    background: var(--hover-bg);
}

.post-link {
    display: block;
    padding: 12px 16px;
}

.post-header {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-avatar span {
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 15px;
}

.post-author {
    font-weight: 700;
    color: var(--text-primary);
}

.verified-badge-sm {
    flex-shrink: 0;
}

.post-handle {
    color: var(--text-secondary);
}

.post-dot {
    color: var(--text-secondary);
}

.post-time {
    color: var(--text-secondary);
}

.post-content {
    margin-left: 52px;
}

.post-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.post-excerpt {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-image {
    margin-top: 12px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-left: 52px;
    margin-top: 12px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: color 0.2s;
}

.action-item:hover {
    color: var(--accent-color);
}

.reading-time {
    margin-left: auto;
}

/* Empty Feed */
.empty-feed {
    padding: 48px 32px;
    text-align: center;
}

.empty-icon {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.empty-feed h3 {
    font-size: 31px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-feed p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Right Sidebar */
.right-sidebar {
    width: 350px;
    flex-shrink: 0;
    padding: 12px 24px;
}

.sidebar-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.sidebar-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.sidebar-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin: -8px -8px;
    border-radius: 8px;
    font-size: 15px;
    color: var(--text-primary);
    transition: background 0.2s;
}

.sidebar-link:hover {
    background: var(--hover-bg);
}

.sidebar-link + .sidebar-link {
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 1280px) {
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 88px;
    }

    .nav-item span,
    .btn span {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .btn {
        width: 50px;
        height: 50px;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main {
        max-width: none;
        border-right: none;
    }

    .profile-banner {
        height: 150px;
    }

    .avatar {
        width: 90px;
        height: 90px;
    }

    .avatar span {
        font-size: 36px;
    }

    .avatar-wrapper {
        margin-top: -48px;
    }

    .profile-actions {
        position: static;
        margin-top: 12px;
    }

    .post-content {
        margin-left: 0;
        margin-top: 8px;
    }

    .post-actions {
        margin-left: 0;
    }
}
