/* Community page CSS */

/* Subtle dot pattern texture - unique to community */
.bg-texture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Main content */
main {
    padding-top: 64px;
    position: relative;
    z-index: 1;
}

.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: stretch;
}

.main-feed {
    min-width: 0;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.sidebar-posts {
    padding: 0.5rem 0;
    flex: 1;
}

.sidebar-post {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    transition: background 0.2s;
}

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

.sidebar-post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
    overflow: hidden;
}

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

.sidebar-post-content {
    flex: 1;
    min-width: 0;
}

.sidebar-post-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-post-title a:hover {
    color: var(--accent);
}

.sidebar-post-meta {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-post-author {
    color: var(--text-muted);
}

.sidebar-view-all {
    display: block;
    padding: 0.85rem 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    border-top: 1px solid var(--border);
    transition: background 0.2s;
}

.sidebar-view-all:hover {
    background: var(--bg-card-hover);
}

@media (max-width: 900px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }

    .sidebar-section {
        margin-bottom: 0;
    }
}

/* Page Header - Plain white title, no gradient */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.page-header p {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Timeline Feed */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Author-hero social card style */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
}

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

.post-card[data-post-link] {
    cursor: pointer;
}

/* Author Section - THE HERO */
.author-hero {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

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

.author-avatar::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--accent), var(--purple)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.author-details {
    flex: 1;
    min-width: 0;
}

.author-top-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.author-name {
    font-weight: 600;
    font-size: 1rem;
}

.author-name a:hover {
    color: var(--accent);
}

.author-handle {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.post-timestamp {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-left: auto;
    flex-shrink: 0;
}

/* Post Content - Secondary to author */
.post-content {
    padding: 0 1.5rem 1.25rem;
    padding-left: calc(1.5rem + 52px + 1rem);
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-title a:hover {
    color: var(--accent);
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post Footer */
.post-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.875rem 1.5rem;
    padding-left: calc(1.5rem + 52px + 1rem);
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
}

.post-stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    transition: color 0.2s;
}

.post-stat:hover {
    color: var(--text-muted);
}

.post-stat svg {
    width: 16px;
    height: 16px;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.tag {
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .main-container {
        padding: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .post-content,
    .post-footer {
        padding-left: 1.25rem;
    }

    .author-hero {
        padding: 1rem 1.25rem;
    }

    .post-content {
        padding: 0 1.25rem 1rem;
    }
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
}

.pagination button,
.pagination a {
    padding: 0.5rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.pagination button:hover:not(:disabled),
.pagination a:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active,
.pagination a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Get Notified Section */
.get-notified {
    margin-top: 3rem;
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
}

.get-notified h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.get-notified h2 span {
    background: linear-gradient(135deg, var(--accent), #fb923c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.get-notified > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.get-notified .form-card {
    max-width: 380px;
    margin: 0 auto;
    background: transparent;
    border: none;
    padding: 0;
}

.get-notified .form-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--green);
    padding: 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
}

.get-notified .form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--red);
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.get-notified-form {
    display: flex;
    gap: 0.75rem;
}

.get-notified-form input {
    flex: 1;
    padding: 0.7rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.get-notified-form input::placeholder {
    color: var(--text-dim);
}

.get-notified-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.get-notified-form button {
    padding: 0.7rem 1.25rem;
    background: linear-gradient(135deg, var(--accent), #fb923c);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.get-notified-form button:hover {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .get-notified {
        padding: 2rem 1.5rem;
    }

    .get-notified-form {
        flex-direction: column;
    }
}

/* Staggered entrance animation */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeSlideIn 0.4s ease-out backwards;
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
