@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=Inter:wght@400;600;700&display=swap');


#portfolio { 
    background:#dcedc8;
    padding: 7rem 1rem;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.portfolio-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

/* === Slide-in with Blur Animation === */
.portfolio-header,
.card {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform, filter;
}

.portfolio-header.reveal,
.card.reveal {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
}

/* Stagger delays */
.card.reveal:nth-child(1) { transition-delay: 0.05s; }
.card.reveal:nth-child(2) { transition-delay: 0.15s; }
.card.reveal:nth-child(3) { transition-delay: 0.25s; }
.card.reveal:nth-child(4) { transition-delay: 0.35s; }

/* Respect motion preferences */
@media (prefers-reduced-motion: reduce) {
    .portfolio-header,
    .card {
        transition: none;
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* === Header === */
.portfolio-header {
    margin-bottom:3rem;
    text-align: center;
}

.portfolio-header h2 {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #555;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.portfolio-header p {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: #000000;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

/* === Cards Grid === */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    align-items: stretch;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s ease;
}

.card.reveal {
    transition: opacity 0.8s ease,
                transform 0.3s ease,
                filter 0.8s ease,
                box-shadow 0.3s ease;
}

.card.reveal:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* === Card Image === */
.card-image {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
    flex-shrink: 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s ease;
    display: block;
}

.card.reveal:hover .card-image img {
    transform: scale(1.06);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card.reveal:hover .card-overlay {
    opacity: 1;
}

/* === Card Content === */
.card-content {
    padding: 1.25rem 1.5rem;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2e7d32;
    margin: 0;
    line-height: 1.4;
}

.card-date {
    font-size: 0.9rem;
    color: #7cb342;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.card-date i {
    font-size: 0.85rem;
}


/* ================= MOBILE RESPONSIVE ================= */


/* Tablet Landscape (769px - 1023px) */
@media (max-width: 1180px) and (min-width: 769px) {
    .portfolio-container {
        padding: 3.5em 2.5rem;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .card-image {
        height: 260px;
    }
}

/* Tablet Portrait (601px - 819px) */
@media (max-width: 768px) and (min-width: 601px) {
    .portfolio-container {
        padding: 3em 2rem;
        width: 100%;
    }

    .portfolio-header h2 {
        font-size: 0.85rem;
    }

    .portfolio-header p {
    font-size: clamp(2rem, 5vw, 2.5rem);
    
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }

    .card-image {
        height: 260px;
    }

    .card-content {
        padding: 1rem 1.1rem;
    }

    .card-title {
        font-size: 0.95rem;
    }
}

/* Mobile (480px - 600px) */
@media (max-width: 600px) and (min-width: 481px) {
    .portfolio-container {
        padding: 2.5em 1.2rem;
        width: 100%;
    }

    .portfolio-header h2 {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .portfolio-header p {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .card-image {
        height: 260px;
    }

    .card-content {
        padding: 1rem 1.1rem;
    }

    .card-title {
        font-size: 1rem;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    #portfolio {
        padding: 8px 0.8rem 1.5rem;
    }

    .portfolio-container {
        padding: 5em 0.8rem;
        width: 100%;
        max-width: 100%;
    }

    .portfolio-header {
        margin-bottom: 1.5rem;
    }

    .portfolio-header h2 {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }

    .portfolio-header p {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }

    .card {
        border-radius: 10px;
    }

    .card-image {
        height: 260px;
    }

    .card-content {
        padding: 0.9rem 1rem;
    }

    .card-title {
        font-size: 0.95rem;
    }

    .card-date {
        font-size: 0.82rem;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .portfolio-container {
        padding: 1.5em 0.6rem;
    }

    .portfolio-header h2 {
        font-size: 0.85rem;
    }

    .card-image {
        height: 260px;
    }

    .card-content {
        padding: 0.8rem 0.9rem;
    }

    .card-title {
        font-size: 0.88rem;
    }
}