:root {
            --green: #0a5c36;
            --green-dark: #08482b;
            --grey-dark: #1a1a1a;
            --grey: #333333;
            --light: #f8f9fa;
            --shadow: 0 8px 30px rgba(0,0,0,0.12);
        }
        
        html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

       body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

*, *::before, *::after {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-width: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 80px 24px;
        }

        h1, h2 {
            font-family: 'Playfair Display', serif;
            color: inherit; /* Inherit color instead of forcing grey-dark */;
            text-align: center;
        }

        h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); margin-bottom: 20px; }
        h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 60px 0 40px; }

        /* Masonry Grid */
        #projects-grid {
            column-count: 3;
            column-gap: 30px;
        }

        .project-card {
            break-inside: avoid;
            margin-bottom: 30px;
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: all 0.4s ease;
            opacity: 0;
            transform: translateY(40px);
        }

        .project-card.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .project-card:hover {
            transform: translateY(-12px);
            box-shadow: 0 20px 50px rgba(10,92,54,0.25);
        }

        .project-card .image-wrapper {
            position: relative;
            overflow: hidden;
            height: 340px; /* Slightly taller for impact */
        }

        .project-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.7s ease;
        }

        .project-card:hover img {
            transform: scale(1.09);
        }

        .project-card .overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 28px;
            color: white;
            transition: all 0.4s ease;
        }

        .project-card .info {
            position: relative;
            z-index: 2;
        }

        .project-card h3 {
            font-size: 1.65rem;
            margin-bottom: 8px;
        }

        .project-card .location {
            font-size: 1.08rem;
            opacity: 0.92;
        }

        .project-card .actions {
            opacity: 0;
            transform: translateY(25px);
            transition: all 0.45s ease;
            margin-top: 18px;
            display: flex;
            gap: 14px;
        }

        .project-card:hover .actions {
            opacity: 1;
            transform: translateY(0);
        }

        .btn {
            background: var(--green);
            color: white;
            border: none;
            padding: 12px 26px;
            border-radius: 8px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn:hover {
            background: var(--green-dark);
            transform: translateY(-2px);
        }

        .btn-outline {
            background: transparent;
            border: 2px solid white;
        }

        /* Modal */
        #modal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.92);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            color: white;
        }

        .modal-content {
            max-width: 92%;
            max-height: 92vh;
            background: white;
            color: #333;
            border-radius: 16px;
            overflow: hidden;
            position: relative;
        }

        .close-btn {
            position: absolute;
            top: 20px;
            right: 30px;
            font-size: 3rem;
            cursor: pointer;
            color: white;
            z-index: 10;
        }

        .slider {
            height: 65vh;
            background: #000;
        }

        .slider img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .modal-info {
            padding: 35px;
            text-align: center;
        }

        /* Achievements & CTA unchanged */
        #achievements {
            background: var(--light);
            text-align: center;
        }

        .counters {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 40px;
        }

        .counter {
            font-size: 3.5rem;
            font-weight: bold;
            color: var(--green);
        }

        #cta {
            text-align: center;
            background: linear-gradient(to bottom, #f8f9fa, white);
        }

        .cta-buttons {
            display: flex;
            justify-content: center;
            gap: 24px;
            flex-wrap: wrap;
            margin-top: 32px;
        }

        .cta-buttons .btn {
            min-width: 220px;
            padding: 16px 36px;
            font-size: 1.15rem;
        }

     /* ============================================================
   TABLET — max-width: 1024px
   (already has column-count: 2, we polish spacing & touch)
   ============================================================ */
@media (max-width: 1024px) {

    .container {
        padding: 60px 20px;
    }

    #projects-grid {
        column-gap: 22px;
    }

    .project-card {
        margin-bottom: 22px;
    }

    /* Slightly shorter image on tablet */
    .project-card .image-wrapper {
        height: 300px;
    }

    /* Keep overlay actions visible on tablet (no hover on touch) */
    .project-card .actions {
        opacity: 1;
        transform: translateY(0);
    }

    .project-card h3 {
        font-size: 1.45rem;
    }

    .project-card .location {
        font-size: 1rem;
    }

    .project-card .overlay {
        padding: 22px;
    }
}


/* ============================================================
   MOBILE — max-width: 768px
   ============================================================ */
@media (max-width: 768px) {

    .container {
        padding: 44px 16px;
    }

    h1 {
        font-size: clamp(2rem, 8vw, 2.8rem);
        margin-bottom: 16px;
        line-height: 1.2;
    }

    h2 {
        font-size: clamp(1.6rem, 6.5vw, 2.2rem);
        margin: 40px 0 28px;
        line-height: 1.25;
    }

    /* Single column already set — refine gap */
    #projects-grid {
        column-count: 1;
        column-gap: 0;
    }

    .project-card {
        margin-bottom: 20px;
        border-radius: 12px;
    }

    /* Shorter image on mobile — saves scroll */
    .project-card .image-wrapper {
        height: 240px;
    }

    /* Always show overlay content on touch devices */
    .project-card .actions {
        opacity: 1;
        transform: translateY(0);
    }

    /* Disable hover lift — prevents sticky state on touch */
    .project-card:hover {
        transform: none;
        box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    }

    .project-card h3 {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }

    .project-card .location {
        font-size: 0.95rem;
    }

    .project-card .overlay {
        padding: 18px 16px;
    }

    .project-card .actions {
        margin-top: 12px;
        gap: 10px;
    }

    /* Buttons — full accessible tap target */
    .btn {
        padding: 11px 22px;
        font-size: 0.95rem;
        min-height: 44px;
        border-radius: 7px;
        flex: 1 1 auto;
        text-align: center;
    }

    /* Modal */
    .modal-content {
        max-width: 98%;
        max-height: 96vh;
        border-radius: 10px;
    }

    .close-btn {
        top: 12px;
        right: 16px;
        font-size: 2.4rem;
    }

    .slider {
        height: 52vw;
        min-height: 200px;
        max-height: 60vh;
    }

    .modal-info {
        padding: 20px 16px;
    }

    /* Achievements */
    .counters {
        gap: 28px;
    }

    .counter {
        font-size: 2.6rem;
    }

    /* CTA buttons */
    .cta-buttons {
        gap: 14px;
        margin-top: 24px;
    }

    .cta-buttons .btn {
        min-width: unset;
        width: 100%;
        max-width: 320px;
        padding: 14px 28px;
        font-size: 1.05rem;
        min-height: 50px;
    }
}


/* ============================================================
   SMALL MOBILE — max-width: 480px
   ============================================================ */
@media (max-width: 480px) {

    .container {
        padding: 32px 14px;
    }

    h1 {
        font-size: clamp(1.8rem, 8.5vw, 2.4rem);
        margin-bottom: 14px;
    }

    h2 {
        font-size: clamp(1.45rem, 7vw, 1.9rem);
        margin: 32px 0 22px;
    }

    .project-card {
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .project-card .image-wrapper {
        height: 220px;
    }

    .project-card h3 {
        font-size: 1.15rem;
    }

    .project-card .location {
        font-size: 0.88rem;
    }

    .project-card .overlay {
        padding: 14px 13px;
    }

    .project-card .actions {
        gap: 8px;
        flex-wrap: wrap;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
        min-height: 44px;
        border-radius: 6px;
    }

    /* Modal */
    .close-btn {
        top: 10px;
        right: 12px;
        font-size: 2rem;
    }

    .slider {
        height: 56vw;
        min-height: 180px;
    }

    .modal-info {
        padding: 16px 14px;
    }

    /* Achievements */
    .counter {
        font-size: 2.2rem;
    }

    /* CTA */
    .cta-buttons .btn {
        max-width: 100%;
        padding: 13px 22px;
        font-size: 1rem;
    }
}


/* ============================================================
   EXTRA SMALL — max-width: 360px
   ============================================================ */
@media (max-width: 360px) {

    .container {
        padding: 26px 12px;
    }

    h1 {
        font-size: clamp(1.6rem, 9vw, 2rem);
    }

    h2 {
        font-size: clamp(1.3rem, 7.5vw, 1.65rem);
        margin: 26px 0 18px;
    }

    .project-card .image-wrapper {
        height: 195px;
    }

    .project-card h3 {
        font-size: 1.05rem;
    }

    .project-card .location {
        font-size: 0.83rem;
    }

    .project-card .overlay {
        padding: 12px 11px;
    }

    .btn {
        padding: 9px 14px;
        font-size: 0.85rem;
    }

    .counter {
        font-size: 1.9rem;
    }
}


/* ============================================================
   SAFE AREA — iPhone notch / home bar support
   ============================================================ */
@supports (padding: env(safe-area-inset-bottom)) {
    .container {
        padding-left:  max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
    }

    #cta {
        padding-bottom: calc(32px + env(safe-area-inset-bottom));
    }
}


/* ============================================================
   REDUCED MOTION — accessibility
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .project-card,
    .project-card img,
    .project-card .actions,
    .project-card .overlay {
        transition: none;
        animation: none;
    }

    .project-card.fade-in {
        opacity: 1;
        transform: none;
    }
}
