/* ═══════════════════════════════════════════════
   RECENT PROJECTS — Section
═══════════════════════════════════════════════ */

.rp-section {
    --rp-bg:          #0c0c0c;
    --rp-text:        #ffffff;
    --rp-muted:       rgba(255, 255, 255, 0.45);
    --rp-accent:      #c9a96e;        /* gold */
    --rp-gap:         28px;
    --rp-radius:      2px;

    background-color: var(--rp-bg);
    color: var(--rp-text);
    padding: clamp(60px, 8vw, 120px) clamp(24px, 5vw, 80px);
}


/* ── Header ─────────────────────────────────── */

.rp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: clamp(40px, 6vw, 80px);
}

.rp-header__eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rp-accent);
    margin-bottom: 12px;
}

.rp-header__title {
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 300;
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.1;
}

.rp-header__desc {
    max-width: 320px;
    text-align: right;
    font-size: clamp(13px, 1.2vw, 15px);
    color: var(--rp-muted);
    line-height: 1.65;
    margin: 0;
}


/* ── Grid ───────────────────────────────────── */

.rp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--rp-gap);
}


/* ── Card ───────────────────────────────────── */

.rp-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* JS adds this class when card enters viewport */
.rp-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger via nth-child */
.rp-card:nth-child(2) { transition-delay: 0.1s; }
.rp-card:nth-child(3) { transition-delay: 0.15s; }
.rp-card:nth-child(4) { transition-delay: 0.22s; }

.rp-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}


/* ── Image ──────────────────────────────────── */

.rp-card__media {
    position: relative;
    overflow: hidden;
    background-color: #1a1a1a;
    border-radius: var(--rp-radius);
    aspect-ratio: 16 / 10;   /* consistent card height */
}

.rp-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    /* Grayscale by default, color on hover */
    filter: grayscale(100%) brightness(0.85);
    transform: scale(1);
    transition:
        filter 0.6s ease,
        transform 0.7s ease;
}

.rp-card__link:hover .rp-card__img,
.rp-card__link:focus-visible .rp-card__img {
    filter: grayscale(0%) brightness(0.95);
    transform: scale(1.04);
}


/* ── Year Badge ─────────────────────────────── */

.rp-card__year {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(12, 12, 12, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--rp-text);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border-radius: 2px;
    pointer-events: none;
}


/* ── Card Meta ──────────────────────────────── */

.rp-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    gap: 16px;
}

.rp-card__info {
    flex: 1;
}

.rp-card__title {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 300;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.rp-card__link:hover .rp-card__title {
    color: var(--rp-accent);
}

.rp-card__category {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--rp-muted);
    margin: 0;
}

/* Decorative dash — the horizontal line on the right */
.rp-card__dash {
    display: block;
    width: 32px;
    height: 1px;
    background-color: var(--rp-muted);
    flex-shrink: 0;
    transition: width 0.4s ease, background-color 0.3s ease;
}

.rp-card__link:hover .rp-card__dash {
    width: 48px;
    background-color: var(--rp-accent);
}


/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

/* Tablet — stack header, keep 2 cols */
@media ( max-width: 1024px ) {
    .rp-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .rp-header__desc {
        text-align: left;
        max-width: 100%;
    }
}

/* Mobile — single column */
@media ( max-width: 640px ) {
    .rp-grid {
        grid-template-columns: 1fr;
    }

    .rp-card__media {
        aspect-ratio: 4 / 3;
    }
}