:root {
    --tg-ink: #18231d;
    --tg-forest: #163d2b;
    --tg-lime: #bedb45;
    --tg-cream: #f4f1e9;
    --tg-paper: #fffdf8;
    --tg-muted: #637068;
}

.tg-project-shell {
    width: min(1240px, calc(100% - 48px));
    margin-inline: auto;
}

.tg-project-single,
.tg-portfolio-archive {
    color: var(--tg-ink);
    background: var(--tg-paper);
}

.tg-project-hero {
    position: relative;
    min-height: clamp(360px, 42vw, 460px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: #fff;
    background: var(--tg-forest);
}

.tg-project-hero.has-background {
    background-image: linear-gradient(90deg, rgba(8, 24, 16, .88) 0%, rgba(8, 24, 16, .44) 58%, rgba(8, 24, 16, .22) 100%), var(--tg-hero-image);
    background-position: center;
    background-size: cover;
}

.tg-project-hero__inner {
    position: relative;
    padding-block: clamp(48px, 7vw, 64px);
}

.tg-project-back {
    position: absolute;
    top: 42px;
    color: rgba(255, 255, 255, .8);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
}

.tg-project-back:hover { color: var(--tg-lime); }

.tg-project-eyebrow,
.tg-project-kicker {
    display: block;
    margin-bottom: 12px;
    color: var(--tg-lime);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.tg-project-hero h1,
.tg-portfolio-hero h1 {
    max-width: 930px;
    margin: 0;
    color: inherit;
    font-size: clamp(38px, 4.7vw, 60px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -.015em;
}

.tg-project-single .tg-project-hero h1 {
    max-width: 780px;
    font-size: clamp(38px, 4.8vw, 64px);
}

.tg-project-intro,
.tg-project-gallery-section,
.tg-portfolio-listing {
    padding-block: clamp(48px, 5vw, 64px);
}

.tg-project-intro__grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(50px, 9vw, 140px);
}

.tg-project-intro h2,
.tg-project-section-heading h2,
.tg-project-cta h2 {
    margin: 0;
    color: var(--tg-ink);
    font-size: clamp(30px, 3.3vw, 44px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -.015em;
}

.tg-project-intro__content {
    color: var(--tg-muted);
    font-size: 17px;
    line-height: 1.7;
}

.tg-project-intro__content p:first-child { margin-top: 0; }

.tg-project-facts {
    display: flex;
    gap: 60px;
    margin: 44px 0 0;
    padding-top: 30px;
    border-top: 1px solid #d9ddd7;
}

.tg-project-facts div { min-width: 130px; }
.tg-project-facts dt { color: var(--tg-muted); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tg-project-facts dd { margin: 7px 0 0; color: var(--tg-ink); font-size: 17px; font-weight: 600; }

.tg-project-gallery-section,
.tg-portfolio-listing { background: var(--tg-cream); }

.tg-project-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 28px;
    margin-bottom: 30px;
}

.tg-project-section-heading p {
    max-width: 360px;
    margin: 0 0 5px;
    color: var(--tg-muted);
    font-size: 16px;
    line-height: 1.6;
}

.tg-project-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.tg-project-gallery__item {
    position: relative;
    display: block;
    aspect-ratio: 1.18 / 1;
    min-height: 0;
    overflow: hidden;
    background: #dfe2db;
}

.tg-project-gallery__item.is-featured { grid-column: auto; grid-row: auto; }

.tg-project-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
}

.tg-project-gallery__item:hover img { transform: scale(1.035); }

.tg-project-gallery__zoom {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--tg-ink);
    background: var(--tg-lime);
    font-size: 28px;
    line-height: 1;
    transform: scale(.85);
    opacity: 0;
    transition: .25s ease;
}

.tg-project-gallery__item:hover .tg-project-gallery__zoom { transform: scale(1); opacity: 1; }

.tg-project-cta { padding-block: 64px; color: #fff; background: var(--tg-forest); }
.tg-project-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.tg-project-cta h2 { color: #fff; }
.tg-project-cta a {
    flex: 0 0 auto;
    padding: 18px 24px;
    color: var(--tg-ink);
    background: var(--tg-lime);
    font-weight: 700;
    text-decoration: none;
}
.tg-project-cta a span { margin-left: 22px; }

.tg-portfolio-hero {
    position: relative;
    min-height: 0 !important;
    height: auto !important;
    padding-block: clamp(44px, 4.2vw, 58px);
    overflow: hidden;
    color: #fff;
    background: var(--tg-forest);
}

.tg-portfolio-hero::after {
    position: absolute;
    right: -8%;
    bottom: -70%;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(190, 219, 69, .14);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.tg-portfolio-hero .tg-project-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    grid-template-areas:
        "eyebrow description"
        "title description";
    column-gap: clamp(48px, 8vw, 130px);
    align-items: end;
}

.tg-portfolio-hero .tg-project-eyebrow {
    grid-area: eyebrow;
    margin-bottom: 10px;
}

.tg-portfolio-archive .tg-portfolio-hero h1 {
    grid-area: title;
    max-width: 620px;
    padding-left: 20px;
    border-left: 3px solid var(--tg-lime);
    font-size: clamp(38px, 3.8vw, 52px);
    line-height: 1.04;
}

.tg-portfolio-listing .tg-project-section-heading h2 {
    font-size: clamp(30px, 3vw, 38px);
}

.tg-portfolio-hero p {
    grid-area: description;
    align-self: end;
    justify-self: end;
    max-width: 560px;
    margin: 0;
    padding-bottom: 5px;
    color: rgba(255, 255, 255, .74);
    font-size: clamp(16px, 1.25vw, 18px);
    line-height: 1.55;
}

.tg-portfolio-grid.tg-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 22px;
}

.tg-portfolio-card { margin: 0; background: transparent; }
.tg-portfolio-card__link { display: block; color: inherit; text-decoration: none; }
.tg-portfolio-card__image { position: relative; aspect-ratio: 1.18 / 1; overflow: hidden; background: #dfe2db; }
.tg-portfolio-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.65,.3,1); }
.tg-portfolio-card__link:hover .tg-portfolio-card__image img { transform: scale(1.04); }
.tg-portfolio-card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #ced6cc, #e7e4db); }
.tg-portfolio-card__arrow {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--tg-ink);
    background: var(--tg-lime);
    font-size: 20px;
    transition: transform .3s ease;
}
.tg-portfolio-card__link:hover .tg-portfolio-card__arrow { transform: rotate(-35deg); }
.tg-portfolio-card__body { padding: 16px 3px 0; }
.tg-portfolio-card__type { color: var(--tg-forest); font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.tg-portfolio-card h3 { margin: 7px 0 11px; color: var(--tg-ink); font-size: clamp(19px, 1.45vw, 23px); font-weight: 500; line-height: 1.18; letter-spacing: -.01em; }
.tg-portfolio-card__cta { color: var(--tg-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; }

@media (max-width: 1100px) {
    .tg-portfolio-grid.tg-portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tg-project-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    .tg-project-shell { width: min(100% - 32px, 1240px); }
    .tg-project-hero { min-height: 340px; }
    .tg-project-hero__inner { padding-block: 44px; }
    .tg-project-intro__grid,
    .tg-portfolio-grid.tg-portfolio-grid { grid-template-columns: 1fr; }
    .tg-project-intro__grid { gap: 42px; }
    .tg-project-section-heading,
    .tg-project-cta__inner { align-items: flex-start; flex-direction: column; }
    .tg-project-gallery { grid-template-columns: 1fr; }
    .tg-project-gallery__item,
    .tg-project-gallery__item.is-featured { grid-column: auto; grid-row: auto; min-height: 240px; }
    .tg-project-facts { flex-wrap: wrap; gap: 28px; }
    .tg-project-gallery__zoom { opacity: 1; transform: scale(1); }
    .tg-portfolio-hero .tg-project-shell {
        display: block;
    }
    .tg-portfolio-hero p {
        max-width: 520px;
        margin-top: 22px;
        padding-bottom: 0;
    }
    .tg-portfolio-hero { padding-block: 44px; }
    .tg-project-hero h1,
    .tg-portfolio-hero h1 { font-size: clamp(34px, 9vw, 44px); }
    .tg-project-intro h2,
    .tg-project-section-heading h2,
    .tg-project-cta h2 { font-size: clamp(28px, 8vw, 36px); }
    .tg-project-intro__content { font-size: 16px; }
}
