/* retoor <retoor@molodetz.nl> */

.projects-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 1.5rem;
    align-items: start;
}

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

.projects-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 0.25rem;
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

.projects-tab:hover {
    color: var(--text-primary);
}

.projects-tab.active {
    background: var(--accent);
    color: var(--on-accent);
}

.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.projects-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.projects-header .subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.projects-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.project-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.25rem 1.25rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.project-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.project-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.project-card-star {
    padding: 0.25rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.project-card-star:hover {
    color: var(--warning);
}

.project-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-card-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.platform-tag {
    display: inline-flex;
    padding: 0.1875rem 0.5rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--overlay-light);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
}

.project-status.released {
    color: var(--success);
    background: rgba(76, 175, 80, 0.14);
}

.project-status.dev {
    color: var(--warning);
    background: rgba(255, 152, 0, 0.14);
}

@media (max-width: 1024px) {
    .projects-layout {
        grid-template-columns: 1fr;
    }
    .projects-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .projects-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
}

@media (max-width: 480px) {
    .projects-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 0.125rem;
    }

    .projects-tab {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
        flex-shrink: 0;
    }

    .projects-count {
        font-size: 0.75rem;
    }

    .project-card {
        padding: 1rem;
    }

    .project-card-title {
        font-size: 1rem;
    }
}

.project-page {
    max-width: var(--max-content);
    margin: 0 auto;
}

.project-shell {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.project-shell > .project-tabs,
.project-shell > .project-columns {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.project-shell > .project-columns {
    margin-bottom: 1.5rem;
}

.project-shell .project-tabs,
.project-shell .project-sidebar-card,
.project-shell .post-card,
.project-shell .empty-state,
.project-shell .comments-section {
    background: var(--bg-secondary);
}

.project-cover {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    background: var(--bg-secondary);
}

.project-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-cover-fallback {
    min-height: 200px;
    background: var(--accent-gradient);
}

.project-cover-fallback::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--overlay-dark);
}

.project-cover-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.78) 100%);
}

.project-hero-overlay {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    width: 100%;
    padding: 1.5rem;
}

.project-logo {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.project-hero-headline {
    min-width: 0;
    flex: 1;
}

.project-hero-overlay .project-detail-title,
.project-hero-overlay .project-detail-author {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 12px rgba(0, 0, 0, 0.6);
}

.project-hero-overlay .project-detail-header {
    margin-bottom: 0.5rem;
    justify-content: flex-start;
    gap: 0.75rem;
    align-items: center;
}

.project-hero-chips {
    margin-bottom: 0.625rem;
}

.project-hero-overlay .project-detail-author {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.project-hero-ctas {
    flex-shrink: 0;
}

.project-hero-body {
    padding: 1rem 1.5rem 1.25rem;
}

.project-tabs {
    display: flex;
    gap: 0.25rem;
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0 0.5rem;
    flex-wrap: wrap;
}

.project-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid transparent;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.project-tab:hover {
    color: var(--text-primary);
}

.project-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.project-tab-count {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.0625rem 0.375rem;
    border-radius: 999px;
    background: var(--overlay-light);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.project-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.25rem;
    align-items: start;
}

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

.project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-sidebar-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.project-link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.project-link-list a {
    color: var(--text-secondary);
}

.project-link-list a:hover {
    color: var(--accent);
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm) var(--space-lg);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.project-stat a {
    color: var(--text-muted);
}

.project-stat a:hover {
    color: var(--accent);
}

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

.project-last-update {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-author-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-author-meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.8125rem;
}

.project-about {
    margin-bottom: 1.5rem;
}

.project-devlog {
    margin-top: 1.5rem;
}

.project-devlog-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: 0.75rem;
}

.project-devlog-header .project-section-label {
    margin-bottom: 0;
}

.project-devlog-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-devlog-post-btn {
    margin-left: auto;
}

.project-screenshots {
    margin-top: 1.5rem;
}

.project-screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.project-screenshot {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: zoom-in;
}

.project-screenshot-more {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-comments {
    margin-top: 1.5rem;
}

@media (max-width: 1024px) {
    .project-columns {
        grid-template-columns: minmax(0, 1fr);
    }
    .project-cover {
        min-height: 240px;
    }
}

@media (max-width: 768px) {
    .project-hero-overlay {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .project-logo {
        width: 72px;
        height: 72px;
    }
    .project-cover {
        min-height: 200px;
    }
}

.project-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.project-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
}
.project-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.project-detail-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.project-detail-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.project-detail-author a {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}
.project-detail-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.project-detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.project-actions-overflow {
    display: none;
}
.project-star-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
}
.project-star-btn:hover {
    background: var(--bg-card-hover);
    color: var(--warning);
}

.project-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

