/**
 * Profile CSS - Shared styles for user profile pages
 * Used by: views/profile/show.php
 * Enhanced portfolio layout without sidebar
 */

/* ============================================
   PORTFOLIO PAGE STRUCTURE
   ============================================ */
.user-portfolio-page {
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ============================================
   PORTFOLIO HERO SECTION
   ============================================ */
.portfolio-hero {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #38f9d7 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.portfolio-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

/* Avatar */
.portfolio-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 4px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.portfolio-avatar:hover {
    transform: scale(1.05);
}

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

/* User Info */
.portfolio-user-info {
    flex: 1;
    min-width: 0;
    color: white;
}

.portfolio-user-header {
    margin-bottom: 1rem;
}

.portfolio-name {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    color: white;
}

.portfolio-username {
    font-size: 1.125rem;
    opacity: 0.95;
    color: white;
    margin-bottom: 0.75rem;
}

/* Badges */
.portfolio-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.portfolio-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.portfolio-badge-admin {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #9a7c0e;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.portfolio-badge-contributor {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(118, 75, 162, 0.3);
}

.portfolio-badge-verified {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.portfolio-badge-achievement {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Stat Badges */
.portfolio-badge-stat {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.4) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.portfolio-badge-stat:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.5) 100%);
    border-color: rgba(255, 255, 255, 0.7);
}

/* Colored Stat Badges */
.portfolio-badge-stat.stat-views {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(37, 99, 235, 0.5) 100%);
    border-color: rgba(59, 130, 246, 0.6);
}

.portfolio-badge-stat.stat-views:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5) 0%, rgba(37, 99, 235, 0.6) 100%);
    border-color: rgba(59, 130, 246, 0.8);
}

.portfolio-badge-stat.stat-downloads {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.4) 0%, rgba(5, 150, 105, 0.5) 100%);
    border-color: rgba(16, 185, 129, 0.6);
}

.portfolio-badge-stat.stat-downloads:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.5) 0%, rgba(5, 150, 105, 0.6) 100%);
    border-color: rgba(16, 185, 129, 0.8);
}

.portfolio-badge-stat.stat-likes {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.4) 0%, rgba(225, 29, 72, 0.5) 100%);
    border-color: rgba(244, 63, 94, 0.6);
}

.portfolio-badge-stat.stat-likes:hover {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.5) 0%, rgba(225, 29, 72, 0.6) 100%);
    border-color: rgba(244, 63, 94, 0.8);
}

.portfolio-badge-stat.stat-images {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(124, 58, 237, 0.5) 100%);
    border-color: rgba(139, 92, 246, 0.6);
}

.portfolio-badge-stat.stat-images:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5) 0%, rgba(124, 58, 237, 0.6) 100%);
    border-color: rgba(139, 92, 246, 0.8);
}

.portfolio-badge-stat i {
    font-size: 0.875rem;
    opacity: 0.95;
}

/* Bio */
.portfolio-bio {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 1rem;
    max-width: 600px;
}

/* Meta Info */
.portfolio-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.portfolio-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.portfolio-meta-item i {
    opacity: 0.8;
}

/* Action Buttons */
.portfolio-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.75rem;
}

.portfolio-actions .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.portfolio-actions .btn-sm:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   PORTFOLIO STATS (Hero stats)
   ============================================ */
.portfolio-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.portfolio-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.625rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.portfolio-stat-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.portfolio-stat-item i {
    font-size: 1rem;
    opacity: 0.9;
}

.portfolio-stat-item span {
    font-size: 1rem;
    font-weight: 600;
}

/* ============================================
   FILTER BAR (Categories)
   ============================================ */
.filter-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s;
    cursor: default;
}

.filter-pill:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

.filter-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pill-count {
    font-size: 0.75rem;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.08);
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
}

.filter-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   PORTFOLIO CONTENT LAYOUT
   ============================================ */
.portfolio-content {
    padding: 3rem 0;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.portfolio-main {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Tab Navigation */
.portfolio-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.portfolio-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.portfolio-tab:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

.portfolio-tab.active {
    background: var(--primary-color);
    color: white;
}

.portfolio-tab i {
    font-size: 0.875rem;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
}

/* Featured Section */
.portfolio-featured {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.portfolio-featured .section-title {
    margin-bottom: 1.5rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* Gallery Section */
.portfolio-gallery {
    padding: 0;
}

/* Note: Using unified images-grid from main.css */

/* ============================================
   EMPTY STATE
   ============================================ */
/* Use .empty-state + .empty-state--card from components.css */

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-description {
    margin-bottom: 2rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    /* Note: images-grid uses main.css responsive rules */

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .portfolio-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .portfolio-user-info {
        text-align: center;
    }

    .portfolio-badges {
        justify-content: center;
    }

    .portfolio-bio {
        max-width: 100%;
    }

    .portfolio-meta {
        justify-content: center;
    }

    .portfolio-actions {
        width: 100%;
        justify-content: center;
    }

    .portfolio-stats {
        justify-content: center;
    }

    /* Note: images-grid uses main.css responsive rules */
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding: 2rem 0;
    }

    .portfolio-avatar {
        width: 100px;
        height: 100px;
    }

    .portfolio-name {
        font-size: 1.75rem;
    }

    .portfolio-username {
        font-size: 1rem;
    }

    .portfolio-bio {
        font-size: 0.9375rem;
    }

    .portfolio-content {
        padding: 2rem 0;
    }

    .filter-bar {
        padding: 1rem 0;
    }

    .filter-bar-inner {
        gap: 1rem;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .filter-pills {
        width: 100%;
    }

    .filter-pill {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    .portfolio-tabs {
        padding: 0.375rem;
    }

    .portfolio-tab {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    /* Note: images-grid uses main.css responsive rules */

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .portfolio-stats {
        gap: 1rem;
    }

    .portfolio-stat-item {
        padding: 0.5rem 0.875rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .portfolio-hero {
        padding: 1.5rem 0;
    }

    .portfolio-avatar {
        width: 80px;
        height: 80px;
    }

    .portfolio-name {
        font-size: 1.5rem;
    }

    .portfolio-username {
        font-size: 0.9375rem;
    }

    .portfolio-bio {
        font-size: 0.875rem;
    }

    .portfolio-badge {
        font-size: 0.6875rem;
        padding: 0.3125rem 0.625rem;
    }

    .portfolio-tabs {
        gap: 0.25rem;
    }

    .portfolio-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        gap: 0.375rem;
    }

    .portfolio-tab i {
        font-size: 0.75rem;
    }

    .portfolio-stats {
        gap: 0.75rem;
        justify-content: center;
    }

    .portfolio-stat-item {
        padding: 0.4375rem 0.75rem;
        font-size: 0.875rem;
    }

    .portfolio-stat-item i {
        font-size: 0.875rem;
    }

    /* Note: images-grid uses main.css responsive rules */

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-icon {
        font-size: 3rem;
    }
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] .portfolio-hero {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #10b981 100%);
}

[data-theme="dark"] .portfolio-avatar {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="dark"] .filter-bar {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .filter-pill {
    border-color: var(--border-color);
}

[data-theme="dark"] .filter-pill:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

[data-theme="dark"] .portfolio-tabs {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .portfolio-tab:hover {
    background: var(--bg-primary);
}

[data-theme="dark"] .portfolio-featured {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* ============================================
   LEGACY PROFILE STYLES (Kept for compatibility)
   ============================================ */
.profile-page {
    min-height: 100vh;
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
    line-height: 1.2;
}

.profile-username {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    color: white;
}

.profile-joined {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.85;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
}

.joined-icon {
    font-size: 1rem;
}

.profile-content {
    padding: 2rem 0 4rem;
}

/* Note: Using unified images-grid from main.css */

@media (max-width: 992px) {
    .profile-header {
        padding: 2rem 0;
        margin-bottom: 1rem;
    }

    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .profile-avatar {
        width: 70px;
        height: 70px;
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .profile-username {
        font-size: 1rem;
    }

    /* Note: images-grid uses main.css responsive rules */

    .profile-content {
        padding: 1.5rem 0 3rem;
    }
}

@media (max-width: 480px) {
    .profile-header {
        padding: 1.5rem 0;
    }

    .profile-avatar {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }

    .profile-name {
        font-size: 1.25rem;
    }

    .profile-joined {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Note: images-grid uses main.css responsive rules */
}

[data-theme="dark"] .profile-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}
