.projects-main {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding-block: 0 34px;
    color: #17171b;
    background: #fff;
}

.projects-container {
    width: min(1220px, calc(100% - 48px));
    margin-inline: auto;
}

.projects-main h1,
.projects-main h2,
.projects-main p {
    margin-top: 0;
}

.projects-main h2 span,
.projects-main h1 span {
    color: #ec170e;
}

.projects-hero {
    overflow: hidden;
    color: #fff;
    background: linear-gradient(112deg, #450505 0%, #171014 36%, #171a22 75%, #4c0908 100%);
}

.projects-hero-inner {
    min-height: 370px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    position: relative;
}

.projects-hero-copy {
    position: relative;
    z-index: 1;
    padding: 38px 0 64px;
    max-width: 600px;
}

.projects-breadcrumb {
    margin-bottom: 20px;
    font-size: .82rem;
    font-weight: 600;
}

.projects-breadcrumb a {
    color: #ff5144;
    text-decoration: none;
}

.projects-breadcrumb span {
    margin-left: 6px;
}

.projects-hero h1 {
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    font-weight: 600;
    letter-spacing: -.04em;
    line-height: 1.05;
    margin-bottom: 8px;
}

.projects-hero-subtitle {
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    font-weight: 600;
}

.projects-hero-copy > p:not(.projects-hero-subtitle) {
    max-width: 480px;
    color: #e6e2e2;
    line-height: 1.65;
}

.projects-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.projects-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 22px;
    border: 1px solid #ef160e;
    border-radius: 50px;
    background: #ed160d;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
}

.projects-button:hover {
    color: #fff;
    background: #c80d08;
}

.projects-button-outline {
    border-color: #fff;
    background: transparent;
}

.projects-button-outline:hover {
    background: #fff;
    color: #17171b;
}

.projects-hero-image {
    align-self: stretch;
    position: relative;
}

.projects-hero-image::before {
    content: "";
    position: absolute;
    width: 100px;
    height: 150%;
    top: -25%;
    left: 53%;
    transform: rotate(42deg);
    background: linear-gradient(#ff331b, #b80000);
    opacity: .8;
}

.projects-hero-image img {
    position: absolute;
    bottom: 0;
    right: 0;
    width: min(100%, 560px);
    max-height: 100%;
    object-fit: contain;
    object-position: bottom;
}

.projects-stats {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: -30px;
    padding: 20px 10px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px #1c18201c;
}

.projects-stats > div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 4px 12px;
    border-right: 1px solid #e8e8eb;
}

.projects-stats > div:last-child {
    border: 0;
}

.projects-stat-icon {
    color: #ef2115;
    font-size: 2rem;
    line-height: 1;
}

.projects-stats p {
    margin: 0;
}

.projects-stats strong,
.projects-stats p span {
    display: block;
}

.projects-stats strong {
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 800;
}

.projects-stats p span {
    font-size: .78rem;
}

.projects-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.projects-filter-pill {
    border: 1px solid #ececef;
    background: #fff;
    color: #1a1a1f;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.2;
}

.projects-filter-pill.is-active {
    border-color: #eb1710;
    background: #eb1710;
    color: #fff;
}

.projects-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    border-radius: 18px;
    background: #fff;
    border: 1px solid #eeeef2;
    box-shadow: 0 8px 24px #15131710;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity .28s ease, transform .28s ease;
}

.project-card.is-hidden {
    opacity: 0;
    transform: translateY(10px) scale(.98);
    pointer-events: none;
}

.project-card[hidden] {
    display: none !important;
}

.project-card-image-wrap {
    height: 215px;
    padding: 8px;
    background: #f7f8fc;
    border-bottom: 1px solid #ececf2;
    display: grid;
    place-items: center;
}

.project-card-image-wrap img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
}

.project-card-body {
    padding: 14px 16px 16px;
}

.project-card-category {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #ec170e;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 10px;
}

.project-card h2 {
    font-size: 1.2rem;
    margin: 10px 0 8px;
    line-height: 1.25;
    letter-spacing: -.02em;
    font-weight: 650;
}

.project-card p {
    margin: 0;
    color: #4b4f57;
    line-height: 1.55;
    font-size: .86rem;
    min-height: 44px;
}

.project-card-inquiry {
    margin-top: 10px;
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    border: 1px solid #ef2920;
    color: #ef2920;
    text-decoration: none;
    font-size: 1rem;
    background: #fff;
    cursor: pointer;
}

.project-card-inquiry:hover {
    color: #fff;
    background: #ef2920;
}

.project-card-inquiry:focus-visible {
    outline: 3px solid #ff7a00;
    outline-offset: 2px;
}

.projects-contact {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 28px 36px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(115deg, #9f0000, #ee1008);
}

.projects-contact h2 {
    font-size: 2rem;
    margin-bottom: 6px;
    font-weight: 650;
    line-height: 1.15;
}

.projects-contact p {
    margin: 0;
    max-width: 670px;
    font-size: 1rem;
}

.projects-contact a {
    flex-shrink: 0;
    padding: 12px 22px;
    color: #b90000;
    background: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 800;
}

.projects-contact a:hover {
    background: #fff1f1;
}

.projects-main a:focus-visible,
.projects-main button:focus-visible {
    outline: 3px solid #ff7a00;
    outline-offset: 2px;
}

.project-inquiry-modal[hidden] {
    display: none;
}

.project-inquiry-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.project-inquiry-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 12, 0.68);
}

.project-inquiry-modal__dialog {
    position: relative;
    width: min(100%, 430px);
    padding: 1.35rem 1.25rem 1.2rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.project-inquiry-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: #f2f2f6;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.project-inquiry-modal__eyebrow {
    margin: 0;
    color: #e21d14;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.project-inquiry-modal h2 {
    margin: 0.3rem 0 0.6rem;
    font-size: 1.45rem;
    line-height: 1.15;
    font-weight: 700;
}

.project-inquiry-modal__text {
    margin: 0;
    color: #444954;
    line-height: 1.55;
    font-size: 0.92rem;
}

.project-inquiry-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.project-inquiry-modal__actions a {
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
}

.project-inquiry-modal__actions a[data-project-gmail] {
    border: 1px solid #d9dde6;
    color: #1b1f2a;
    background: #fff;
}

.project-inquiry-modal__actions a[data-project-contact] {
    border: 1px solid #ec170e;
    color: #fff;
    background: #ec170e;
}

@media (max-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .projects-container {
        width: min(100% - 32px, 620px);
    }

    .projects-hero-inner {
        grid-template-columns: 1fr;
    }

    .projects-hero-copy {
        padding: 34px 0 14px;
    }

    .projects-hero-image {
        height: 255px;
    }

    .projects-hero-image img {
        right: 50%;
        transform: translateX(50%);
    }

    .projects-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 0;
        margin-top: -20px;
    }

    .projects-stats > div:nth-child(2) {
        border-right: 0;
    }

    .projects-stats > div {
        justify-content: flex-start;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card-image-wrap {
        height: 205px;
    }

    .projects-contact {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px;
    }

    .projects-contact h2 {
        font-size: 1.6rem;
    }

    .projects-contact p {
        font-size: .92rem;
    }
}

@media (max-width: 640px) {
    .projects-hero {
        min-height: 15.5rem;
        margin: 0.45rem 0.5rem 0.95rem;
        transform: translateY(-3px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 1rem;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), 0 0 20px rgba(229, 0, 0, 0.12);
        background:
            radial-gradient(ellipse at 72% 78%, rgba(150, 18, 24, 0.2), transparent 48%),
            linear-gradient(155deg, #09090b, #121014 72%, #0b090b);
    }

    .projects-hero-inner {
        min-height: inherit;
        grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
        align-items: center;
        gap: 0.2rem;
        padding: 1rem 0.75rem;
    }

    .projects-hero-copy {
        max-width: none;
        padding: 0;
    }

    .projects-breadcrumb {
        margin-bottom: 0.55rem;
        font-size: 0.58rem;
    }

    .projects-hero h1 {
        font-size: clamp(1.35rem, 5.2vw, 2rem);
        line-height: 1.02;
    }

    .projects-hero-subtitle {
        font-size: clamp(0.72rem, 2.8vw, 0.86rem);
    }

    .projects-hero-copy > p:not(.projects-hero-subtitle) {
        margin-block: 0.45rem 0.65rem;
        font-size: clamp(0.48rem, 2.6vw, 0.82rem);
        line-height: 1.4;
    }

    .projects-actions {
        margin-top: 0;
        gap: 0;
    }

    .projects-button {
        min-height: 0.45rem;
        gap: 0.35rem;
        padding: 0.45rem 0.65rem;
        font-size: clamp(0.62rem, 2.5vw, 0.75rem);
        text-align: center;
    }

    .projects-button-outline {
        display: none;
    }

    .projects-hero-image {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 88%;
        min-height: 0;
        aspect-ratio: 1 / 0.96;
        align-self: center;
    }

    .projects-hero-image::before {
        display: none;
    }

    .projects-hero-image img {
        position: static;
        width: 100%;
        height: 100%;
        transform: none;
        object-fit: contain;
        object-position: 58% center;
    }
}
