/* ========================================
   Portfolio Page - Apple Glassmorphism Redesign
   ======================================== */

/* Page Hero Section */
.page-hero {
    background: #ffffff;
    padding: 140px 0 60px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    z-index: 1;
}

.page-hero-title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.page-hero-description {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    font-size: 1.25rem;
    color: #86868b;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
    font-weight: 400;
}

/* Page Background - Clean White */
.portfolio-section {
    padding: 80px 0 100px;
    background: #ffffff;
}

/* Grid Layout */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 3rem;
    align-items: start;
}

/* Card Container */
.portfolio-card {
    position: relative;
    border-radius: 24px; /* Large Apple-style radius */
    overflow: hidden;
    background: #ffffff;
    box-shadow: 
        0 10px 40px -10px rgba(0,0,0,0.1),
        0 0 0 1px rgba(0,0,0,0.02); /* Subtle border ring */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
    height: 420px; /* Reduced height for better aspect ratio */
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 
        0 20px 50px -12px rgba(0,0,0,0.15),
        0 0 0 1px rgba(0,0,0,0.02);
    z-index: 10;
}

/* Image Area - Fills the card */
.portfolio-card-image-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    border-radius: 0;
    box-shadow: none;
}

.portfolio-card:hover .portfolio-card-image-link {
    box-shadow: none;
}

.portfolio-card-image {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    background: #f0f0f2; /* Light gray frame background */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Shows full image without cropping */
    object-position: top center;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    display: block;
    padding: 40px 40px 120px 40px; /* Push image up to avoid glass overlap */
}

.portfolio-card:hover .portfolio-card-image img {
    transform: scale(1.05);
}

/* Glass Content Pane - Floating at Bottom */
.portfolio-card-content {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    padding: 1.5rem;
    
    /* The Glass Effect */
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1;
    transition: background 0.3s ease, transform 0.3s ease;
}

.portfolio-card:hover .portfolio-card-content {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px);
}

/* Typography - System Stack */
.portfolio-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    border: none;
    padding: 0;
}

.portfolio-category {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Tahoma", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8e8e93; /* Apple Gray */
    margin: 0;
}

.portfolio-year {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Tahoma", sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: #aeaeb2;
}

.portfolio-title {
    margin: 0;
}

.portfolio-title a {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Tahoma", sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1c1c1e; /* Apple Black */
    text-decoration: none;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.portfolio-description {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Tahoma", sans-serif;
    font-size: 0.95rem;
    color: #3a3a3c;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
    max-width: 100%;
}

/* Tags - Pills */
.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.portfolio-tags span {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Tahoma", sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.05);
    color: #1c1c1e;
    padding: 4px 10px;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.portfolio-card:hover .portfolio-tags span {
    background: rgba(0, 0, 0, 0.08);
}

/* Hide unused elements */
body .portfolio-overlay, body .view-project-btn {
    display: none;
}

/* ========================================
   CTA Section - Matching Home Page Style
   ======================================== */
body .cta-section {
    padding: 5rem 0;
    background: #fafafa;
}

body .cta-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05);
}

body .cta-icon {
    width: 80px;
    height: 80px;
    background: #000000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

body .cta-icon i {
    font-size: 2.5rem;
    color: #ffffff;
}

body .cta-title {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

body .cta-description {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    font-size: 1.15rem;
    color: #666666;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.05rem;
}

.btn-primary {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.btn-primary:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: transparent;
    color: #000000;
    border-color: #000000;
}

.btn-secondary:hover {
    background: #000000;
    color: #ffffff;
    transform: translateY(-2px);
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666666;
    font-size: 0.95rem;
}

.cta-feature i {
    color: #000000;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .cta-section {
        padding: 3rem 0;
    }
    
    .cta-card {
        padding: 3rem 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .cta-features {
        flex-direction: column;
        gap: 1rem;
    }
}
