/* Portfolio Page - Clean Mobile-First Design */

/* Hero Section */
.portfolio-hero {
    text-align: center;
    padding: 100px 20px 40px 20px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    margin-top: 90px; /* Account for fixed navbar */
}

.portfolio-title {
    font-size: 28px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

.portfolio-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Portfolio Section */
.portfolio-section {
    padding: 40px 0 60px 0;
    background: #fff;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Project Cards - Simple Design */
.project-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.project-card:hover {
    border-color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-card.featured {
    border-color: #333;
    border-width: 2px;
}

/* Project Images */
.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.project-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.has-link .project-image::after {
    content: '↗';
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(51, 51, 51, 0.9);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.has-link:hover .project-image::after {
    opacity: 1;
}

.has-link:hover .project-image img {
    transform: scale(1.05);
}

/* Project Info */
.project-info {
    padding: 20px;
}

.project-category {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.project-location {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 12px 0;
}

.location-area {
    font-weight: 500;
    color: #495057;
}

.location-detail {
    color: #6c757d;
}

.project-description {
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

/* Project Features - Simple Tags */
.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.feature {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

/* Project Links - Minimal */
.project-links {
    display: flex;
    gap: 8px;
}

.project-btn {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    flex: 1;
}

.project-btn.primary {
    background: #333;
    color: white;
}

.project-btn.primary:hover {
    background: #000;
}

.project-btn.secondary {
    background: transparent;
    color: #333;
    border: 1px solid #333;
}

.project-btn.secondary:hover {
    background: #333;
    color: white;
}

/* CTA Section - Clean */
.cta-section {
    padding: 60px 0;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.cta-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
}

.cta-title {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.cta-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.cta-btn {
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cta-btn.primary {
    background: #333;
    color: white;
}

.cta-btn.primary:hover {
    background: #000;
}

.cta-btn.secondary {
    background: white;
    color: #333;
    border: 1px solid #333;
}

.cta-btn.secondary:hover {
    background: #333;
    color: white;
}

/* Tablet - 640px+ */
@media (min-width: 640px) {
    .portfolio-hero {
        padding: 120px 40px 60px 40px;
    }
    
    .portfolio-title {
        font-size: 32px;
        margin-bottom: 20px;
    }
    
    .portfolio-subtitle {
        font-size: 18px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
        padding: 0 40px;
        max-width: 1000px;
    }
    
    .project-card.featured {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 300px 1fr;
        align-items: stretch;
    }
    
    .project-card.featured .project-image {
        height: auto;
        min-height: 200px;
    }
    
    .project-card.featured .project-info {
        padding: 32px;
    }
    
    .project-card.featured .project-title {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .project-card.featured .project-description {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .cta-title {
        font-size: 28px;
    }
}

/* Desktop - 1024px+ */
@media (min-width: 1024px) {
    .portfolio-section {
        padding: 60px 0 80px 0;
    }
    
    .portfolio-title {
        font-size: 36px;
        margin-bottom: 24px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
        max-width: 1200px;
        padding: 0 40px;
    }
    
    .project-card.featured {
        grid-column: 1 / 3;
        grid-row: 1 / 3;
        grid-template-columns: 1fr;
        grid-template-rows: 250px 1fr;
    }
    
    .project-card.featured .project-image {
        min-height: 250px;
    }
    
    .project-card.featured .project-info {
        padding: 40px;
    }
    
    .project-card.featured .project-title {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .project-card.featured .project-description {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .project-info {
        padding: 24px;
    }
    
    .project-title {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .project-description {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .cta-title {
        font-size: 32px;
    }
    
    .cta-subtitle {
        font-size: 18px;
    }
}

/* Touch devices */
@media (hover: none) {
    .project-card:hover {
        border-color: #e9ecef;
        box-shadow: none;
    }
    
    .project-card:active {
        transform: scale(0.98);
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .project-card {
        border-color: #495057;
    }
    
    .project-category,
    .feature {
        background: #495057;
        color: white;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading Error State */
.loading-error {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.loading-error h3 {
    color: #dc3545;
    margin-bottom: 12px;
    font-size: 20px;
}

.loading-error p {
    margin-bottom: 20px;
    font-size: 14px;
}

.reload-btn {
    background: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.reload-btn:hover {
    background: #000;
}