:root {
    --ey-projects-black: #07080a;
    --ey-projects-surface: #0d0f12;
    --ey-projects-surface-light: #14171b;
    --ey-projects-border: #25292e;
    --ey-projects-white: #ffffff;
    --ey-projects-muted: #a9afb7;
    --ey-projects-gold: #f4c400;
    --ey-projects-gold-dark: #cfa600;
}

.ey-projects-section,
.ey-projects-section * {
    box-sizing: border-box;
}

.ey-projects-section {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    padding: clamp(58px, 6vw, 94px) 0 clamp(68px, 7vw, 108px);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, rgba(244, 196, 0, 0.07), transparent 30%),
        var(--ey-projects-black);
    color: var(--ey-projects-white);
}

.ey-projects-container {
    width: min(calc(100% - 40px), 1320px);
    margin: 0 auto;
}

.ey-projects-heading {
    margin: 0 auto 34px;
    text-align: center;
}

.ey-projects-heading__eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--ey-projects-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ey-projects-heading h2 {
    margin: 0;
    color: var(--ey-projects-white);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.08;
}

.ey-project-filters {
    margin: 0 auto clamp(34px, 4vw, 52px);
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    border: 1px solid var(--ey-projects-border);
    border-radius: 12px;
    background: rgba(13, 15, 18, 0.92);
}

.ey-project-filter {
    min-height: 42px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--ey-projects-white);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.ey-project-filter:hover,
.ey-project-filter:focus-visible {
    color: var(--ey-projects-gold);
    border-color: rgba(244, 196, 0, 0.45);
    transform: translateY(-1px);
}

.ey-project-filter.is-active {
    border-color: var(--ey-projects-gold);
    background: var(--ey-projects-gold);
    color: #090a0b;
}

.ey-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(20px, 2vw, 30px);
    row-gap: clamp(32px, 4vw, 48px);
}

.ey-project-card {
    min-width: 0;
}

.ey-project-card__image-link {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    overflow: hidden;
    border: 1px solid var(--ey-projects-border);
    border-radius: 4px;
    background: var(--ey-projects-surface);
}

.ey-project-card__image-link::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent 55%,
        rgba(0, 0, 0, 0.46) 100%
    );
}

.ey-project-card__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition:
        transform 0.45s ease,
        filter 0.45s ease;
}

.ey-project-card:hover .ey-project-card__image {
    transform: scale(1.035);
    filter: brightness(1.04);
}

.ey-project-card__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--ey-projects-muted);
    font-size: 13px;
    font-weight: 700;
}

.ey-project-card__category {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 7px 10px;
    border: 1px solid rgba(244, 196, 0, 0.6);
    border-radius: 6px;
    background: rgba(7, 8, 10, 0.86);
    color: var(--ey-projects-gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    backdrop-filter: blur(7px);
}

.ey-project-card__content {
    padding: 14px 2px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 16px;
}

.ey-project-card__title {
    margin: 0;
    color: var(--ey-projects-white);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.42;
}

.ey-project-card__title a {
    color: inherit;
    text-decoration: none;
}

.ey-project-card__title a:hover,
.ey-project-card__title a:focus-visible {
    color: var(--ey-projects-gold);
}

.ey-project-card__button {
    min-width: 70px;
    min-height: 36px;
    padding: 9px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ffffff;
    border-radius: 7px;
    background: transparent;
    color: var(--ey-projects-white);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.ey-project-card__button:hover,
.ey-project-card__button:focus-visible {
    border-color: var(--ey-projects-gold);
    background: var(--ey-projects-gold);
    color: #08090a;
    transform: translateY(-1px);
}

.ey-projects-pagination {
    margin-top: clamp(48px, 5vw, 72px);
}

.ey-projects-pagination .page-numbers {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
}

.ey-projects-pagination .page-numbers li {
    margin: 0;
}

.ey-projects-pagination a.page-numbers,
.ey-projects-pagination span.page-numbers {
    min-width: 40px;
    min-height: 40px;
    padding: 9px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ey-projects-border);
    border-radius: 7px;
    background: var(--ey-projects-surface);
    color: var(--ey-projects-muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.ey-projects-pagination a.page-numbers:hover,
.ey-projects-pagination a.page-numbers:focus-visible {
    border-color: var(--ey-projects-gold);
    color: var(--ey-projects-gold);
}

.ey-projects-pagination .page-numbers.current {
    border-color: var(--ey-projects-gold);
    background: var(--ey-projects-gold);
    color: #08090a;
}

.ey-projects-empty {
    padding: 52px 24px;
    border: 1px solid var(--ey-projects-border);
    border-radius: 8px;
    background: var(--ey-projects-surface);
    color: var(--ey-projects-muted);
    text-align: center;
}

.ey-projects-empty p {
    margin: 0;
}

/* Individual project page */
.ey-project-single {
    width: 100%;
    padding: clamp(52px, 6vw, 92px) 0;
    background: var(--ey-projects-black);
    color: var(--ey-projects-white);
}

.ey-project-single__container {
    width: min(calc(100% - 36px), 1180px);
    margin: 0 auto;
}

.ey-project-single__back {
    margin-bottom: 26px;
}

.ey-project-single__back a {
    color: var(--ey-projects-gold);
    font-weight: 700;
    text-decoration: none;
}

.ey-project-single__title {
    margin: 0 0 14px;
    color: var(--ey-projects-white);
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
}

.ey-project-single__location {
    margin: 0 0 30px;
    color: var(--ey-projects-muted);
    font-size: 16px;
}

.ey-project-single__image {
    width: 100%;
    max-height: 680px;
    display: block;
    object-fit: cover;
    border: 1px solid var(--ey-projects-border);
    border-radius: 5px;
}

.ey-project-single__content {
    width: min(100%, 840px);
    margin: 42px auto 0;
    color: #e5e7eb;
    font-size: 17px;
    line-height: 1.8;
}

.ey-project-single__content a {
    color: var(--ey-projects-gold);
}

@media (max-width: 920px) {
    .ey-projects-container {
        width: min(calc(100% - 28px), 820px);
    }

    .ey-projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ey-project-filter {
        padding-inline: 14px;
    }
}

@media (max-width: 620px) {
    .ey-projects-section {
        padding-top: 44px;
    }

    .ey-projects-container {
        width: calc(100% - 22px);
    }

    .ey-project-filters {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ey-project-filter:first-child {
        grid-column: 1 / -1;
    }

    .ey-projects-grid {
        grid-template-columns: 1fr;
        row-gap: 34px;
    }

    .ey-project-card__title {
        font-size: 14px;
    }

    .ey-project-card__button {
        min-width: 66px;
        min-height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ey-project-card__image,
    .ey-project-card__button,
    .ey-project-filter {
        transition: none;
    }
}
