/**
 * Portfolio Page Styles
 * Modern, Attractive, and Responsive Design
 */

/* ==========================================
   Portfolio Header
   ========================================== */

.portfolio-page {
    background: var(--primary-black);
    min-height: 100vh;
    padding-bottom: 60px;
}

.portfolio-header {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.portfolio-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-white);
    margin: 0 0 20px;
    letter-spacing: -1px;
}

.portfolio-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

/* ==========================================
   Portfolio Filters
   ========================================== */

.portfolio-filters {
    padding: 40px 0;
    position: sticky;
    top: 60px;
    background: var(--primary-black);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.filter-btn {
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover {
    color: var(--primary-white);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--primary-white);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

/* ==========================================
   Portfolio Grid
   ========================================== */

.portfolio-grid-section {
    padding: 60px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.portfolio-grid.filtering {
    opacity: 0.5;
}

.portfolio-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s ease;
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

.portfolio-item-inner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.portfolio-item-inner:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Portfolio Image */
.portfolio-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item-inner:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.no-image-placeholder svg {
    color: rgba(255, 255, 255, 0.2);
}

/* Portfolio Overlay */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.portfolio-item-inner:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay-content {
    width: 100%;
}

.portfolio-overlay .portfolio-item-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-white);
    margin: 0 0 8px;
}

.portfolio-item-category {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.portfolio-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--primary-white);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-view-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.portfolio-view-btn svg {
    width: 18px;
    height: 18px;
}

/* Portfolio Info */
.portfolio-info {
    padding: 25px;
}

.portfolio-info .portfolio-item-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-white);
    margin: 0 0 12px;
    line-height: 1.4;
}

.portfolio-excerpt {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin: 0 0 15px;
}

.portfolio-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.portfolio-meta-item svg {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   No Portfolio State
   ========================================== */

.no-portfolio {
    padding: 100px 20px;
    text-align: center;
}

.no-portfolio-content {
    max-width: 500px;
    margin: 0 auto;
}

.no-portfolio-content svg {
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 30px;
}

.no-portfolio-content h3 {
    font-size: 1.8rem;
    color: var(--primary-white);
    margin: 0 0 15px;
}

.no-portfolio-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
}

/* ==========================================
   Portfolio Modal
   ========================================== */

.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.portfolio-modal.active {
    display: flex;
}

.portfolio-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.portfolio-modal-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.portfolio-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--primary-white);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.portfolio-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.portfolio-modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Modal Header */
.portfolio-modal-header {
    position: relative;
}

.portfolio-modal-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.portfolio-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Info */
.portfolio-modal-info {
    padding: 40px;
}

.portfolio-modal-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-white);
    margin: 0 0 30px;
    line-height: 1.2;
}

.portfolio-modal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-modal-meta-item {
    display: flex;
    gap: 12px;
}

.portfolio-modal-meta-item svg {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.portfolio-modal-meta-item div {
    flex: 1;
}

.portfolio-modal-meta-item strong {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.portfolio-modal-meta-item span {
    font-size: 1rem;
    color: var(--primary-white);
}

.portfolio-modal-description {
    margin-bottom: 30px;
}

.portfolio-modal-description h3 {
    font-size: 1.5rem;
    color: var(--primary-white);
    margin: 0 0 20px;
}

.portfolio-modal-description p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.portfolio-modal-actions {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-modal-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--primary-white);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.portfolio-modal-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 968px) {
    .portfolio-title {
        font-size: 2.8rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .portfolio-filters {
        top: 50px;
    }
}

@media (max-width: 768px) {
    .portfolio-header {
        padding: 60px 0 40px;
    }
    
    .portfolio-title {
        font-size: 2.2rem;
    }
    
    .portfolio-description {
        font-size: 1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-image {
        height: 250px;
    }
    
    .portfolio-modal-title {
        font-size: 2rem;
    }
    
    .portfolio-modal-info {
        padding: 30px 20px;
    }
    
    .portfolio-modal-meta {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
    
    .portfolio-modal-image {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .portfolio-header {
        padding: 40px 0 30px;
    }
    
    .portfolio-title {
        font-size: 1.8rem;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .portfolio-image {
        height: 220px;
    }
    
    .portfolio-info {
        padding: 20px;
    }
    
    .portfolio-modal-title {
        font-size: 1.6rem;
    }
    
    .portfolio-modal-image {
        height: 250px;
    }
    
    .portfolio-modal-close {
        top: 15px;
        left: 15px;
    }
}

/* Custom Scrollbar for Modal */
.portfolio-modal-content::-webkit-scrollbar {
    width: 8px;
}

.portfolio-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.portfolio-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.portfolio-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

