/* ========================================
   EXLWEB PORTFOLIO PAGE STYLES
   ======================================== */

/* PORTFOLIO HERO SECTION */
.portfolio-hero {
    background: #0c0f1c;
    padding: 120px 6% 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 194, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.portfolio-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.portfolio-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
}

.portfolio-hero .subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* PORTFOLIO GRID SECTION */
.portfolio-grid-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 80px 6% 60px;
}

.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* PORTFOLIO GRID */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00C2FF, #0099CC);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.portfolio-card:hover::before {
    transform: scaleX(1);
}

.portfolio-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 194, 255, 0.15);
    border-color: rgba(0, 194, 255, 0.2);
}

/* PROJECT IMAGE */
.project-image {
    width: 100%;
    height: 250px;
    background: #f8fafc;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 20px 20px 0 0;
}

.portfolio-card:hover .project-image img {
    transform: scale(1.05);
}

/* Portfolio Image Class for Styling */
.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    border-radius: 20px 20px 0 0;
    display: block;
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Fallback placeholder for missing images */
.project-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #00C2FF, #0099CC);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Image loading states */
.project-image img[src=""],
.project-image img:not([src]),
.project-image img[src="#"] {
    display: none;
}

.project-image:has(img[src=""]) .project-placeholder,
.project-image:has(img:not([src])) .project-placeholder,
.project-image:has(img[src="#"]) .project-placeholder {
    display: flex;
}

/* PROJECT CONTENT */
.project-content {
    padding: 30px;
}

.project-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-type {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 15px;
    font-weight: 500;
}

.project-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* PROJECT BUTTONS */
.project-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.project-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.project-btn.primary {
    background: linear-gradient(135deg, #00C2FF, #0099CC);
    color: white;
}

.project-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 194, 255, 0.3);
}

.project-btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.project-btn.primary:hover::before {
    left: 100%;
}

.project-btn.secondary {
    background: transparent;
    color: #64748b;
    border: 2px solid rgba(100, 116, 139, 0.3);
}

.project-btn.secondary:hover {
    background: #64748b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.2);
}

/* SECTION DIVIDERS */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 194, 255, 0.3), transparent);
    margin: 0;
    border: none;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .portfolio-hero {
        padding: 100px 4% 60px;
    }
    
    .portfolio-grid-section {
        padding: 60px 4% 40px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-content {
        padding: 25px;
    }
    
    .project-buttons {
        flex-direction: column;
    }
    
    .project-btn {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        gap: 25px;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-name {
        font-size: 1.2rem;
    }
    
    .project-type {
        font-size: 0.9rem;
    }
    
    .project-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .project-buttons {
        gap: 12px;
    }
    
    .project-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Additional mobile optimizations */
@media (max-width: 360px) {
    .portfolio-hero {
        padding: 80px 3% 50px;
    }
    
    .portfolio-grid-section {
        padding: 50px 3% 30px;
    }
    
    .project-content {
        padding: 18px;
    }
    
    .project-name {
        font-size: 1.1rem;
    }
}

/* SCROLL ANIMATIONS */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ACCESSIBILITY IMPROVEMENTS */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .portfolio-card,
    .portfolio-image,
    .project-btn {
        transition: none;
        animation: none;
    }
    
    .portfolio-card:hover {
        transform: none;
    }
    
    .portfolio-card:hover .portfolio-image {
        transform: none;
    }
}

/* FOCUS STATES FOR ACCESSIBILITY */
.project-btn:focus {
    outline: 2px solid #00C2FF;
    outline-offset: 2px;
}

.portfolio-card:focus-within {
    box-shadow: 0 0 0 2px #00C2FF;
}

/* HIGH CONTRAST MODE SUPPORT */
@media (prefers-contrast: high) {
    .portfolio-card {
        border: 2px solid #000;
    }
    
    .project-btn.secondary {
        border: 2px solid #000;
    }
}