.achievements-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    grid-template-rows: 240px 240px 200px;
    grid-template-areas:
        "main main side-top side-top"
        "main main side-mid side-mid"
        "bottom-left brain bottom-center bottom-right";
    gap: 22px;
    width: 100%;
}

.achievement-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(64, 191, 162, 0.12);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.achievement-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 15%, rgba(64, 191, 162, 0.28), transparent 45%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 1;
}

.achievement-card:hover {
    transform: translateY(-8px);
    border-color: rgba(40, 255, 190, 0.45);
    box-shadow:
        0 20px 36px rgba(0, 0, 0, 0.48),
        0 0 28px rgba(40, 255, 190, 0.25);
}

.achievement-card:hover::before {
    opacity: 1;
}

.achievement-media {
    position: absolute;
    inset: 0;
}

.achievement-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.35s ease;
}

.achievement-card:hover .achievement-media img {
    transform: scale(1.05);
}

.achievement-chip {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(64, 191, 162, 0.9), rgba(40, 255, 190, 0.9));
    color: #0a1a17;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 18px rgba(40, 255, 190, 0.35);
    z-index: 2;
}

.achievement-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(180deg, rgba(7, 12, 12, 0) 0%, rgba(7, 12, 12, 0.78) 58%, rgba(7, 12, 12, 0.92) 100%);
    color: #f4f8f7;
    z-index: 2;
}

.achievement-tag {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-color);
    font-weight: 600;
}

.achievement-overlay h3 {
    font-size: 1.12rem;
    margin: 0;
    line-height: 1.28;
}

.achievement-overlay p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(237, 240, 239, 0.85);
}

.achievement-date {
    font-size: 0.82rem;
    color: rgba(248, 250, 250, 0.7);
}

.achievement-main { grid-area: main; }
.achievement-side-top { grid-area: side-top; }
.achievement-side-mid { grid-area: side-mid; }
.achievement-bottom-left { grid-area: bottom-left; }
.achievement-bottom-center { grid-area: bottom-center; }
.achievement-bottom-right { grid-area: bottom-right; }
.achievement-brain { grid-area: brain; }

@media (max-width: 1100px) {
    .achievements-grid {
        grid-template-columns: 1.6fr 1fr;
        grid-template-rows: 220px 220px 200px 200px;
        grid-template-areas:
            "main main"
            "side-top side-mid"
            "bottom-left brain"
            "bottom-center bottom-right";
    }
}

@media (max-width: 800px) {
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: none;
        grid-auto-rows: 180px;
        grid-auto-flow: row dense;
        grid-template-areas: none;
        gap: 16px;
    }
    /* Auto-placement like a gallery */
    .achievement-main,
    .achievement-side-top,
    .achievement-side-mid,
    .achievement-bottom-left,
    .achievement-bottom-center,
    .achievement-bottom-right,
    .achievement-brain { grid-area: auto; }

    /* Feature the main card across both columns */
    .achievement-main { grid-column: 1 / -1; height: 220px; }

    .achievement-card {
        border-radius: 16px;
        height: 100%;
    }
    .achievement-overlay {
        padding: 10px;
    }
    .achievement-overlay h3 {
        font-size: 14px;
    }
    .achievement-overlay p {
        font-size: 12px;
        line-height: 14px;
    }
}
