:root {
    --projects-blue: #104c99;
    --projects-blue-dark: #0b376f;
    --projects-green: #70b83e;
    --projects-ink: #172b3d;
    --projects-muted: #5e7080;
    --projects-border: #dce5ec;
    --projects-surface: #f5f8fb;
}

.projects-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: url('../images/IMG_20181212_121538.jpg') center / cover no-repeat;
}

.projects-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(7, 42, 82, .9) 0%, rgba(16, 76, 153, .72) 52%, rgba(8, 45, 83, .42) 100%);
}

.projects-hero::after {
    content: '';
    position: absolute;
    right: -120px;
    bottom: -180px;
    z-index: -1;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
}

.projects-hero__content {
    display: flex;
    align-items: center;
    min-height: 400px;
    padding-top: 94px;
    padding-bottom: 44px;
}

.projects-hero__copy {
    width: 100%;
    max-width: 700px;
    color: #fff;
}

.projects-hero__eyebrow,
.projects-directory__kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.projects-hero__eyebrow {
    color: #d8eaff;
}

.projects-hero__eyebrow::before,
.projects-directory__kicker::before {
    content: '';
    width: 28px;
    height: 3px;
    margin-right: 10px;
    border-radius: 5px;
    background: var(--projects-green);
}

.projects-hero h1 {
    margin: 0 0 14px;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: clamp(38px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.12;
}

.projects-hero p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, .84);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

.projects-directory {
    padding: 72px 0 80px;
    background: linear-gradient(180deg, #fff 0, var(--projects-surface) 100%);
}

.projects-directory__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 21px;
    border-bottom: 1px solid var(--projects-border);
}

.projects-directory__kicker {
    margin-bottom: 7px;
    color: var(--projects-blue);
}

.projects-directory__header h2 {
    margin: 0;
    color: var(--projects-ink);
    font-family: 'Roboto', sans-serif;
    font-size: 29px;
    font-weight: 700;
    line-height: 1.25;
}

.projects-directory__count {
    flex: 0 0 auto;
    padding: 7px 13px;
    border: 1px solid #d7e4ee;
    border-radius: 18px;
    background: #fff;
    color: #526b7f;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 600;
}

.projects-list {
    display: grid;
    gap: 24px;
}

.project-card {
    display: grid;
    grid-template-columns: minmax(280px, 35%) minmax(0, 1fr);
    min-height: 265px;
    overflow: hidden;
    border: 1px solid var(--projects-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 24px rgba(22, 55, 82, .07);
    transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.project-card:hover {
    border-color: #c8d8e5;
    box-shadow: 0 15px 34px rgba(22, 55, 82, .12);
    transform: translateY(-2px);
}

.project-card__media {
    position: relative;
    display: block;
    min-height: 265px;
    overflow: hidden;
    border-right: 1px solid var(--projects-border);
    background: #edf3f7;
}

.project-card__media::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(105deg, #edf3f7 20%, #f8fafc 38%, #edf3f7 56%);
    background-size: 200% 100%;
    animation: project-image-loading 1.25s linear infinite;
    transition: opacity .25s ease;
}

.project-card__media.is-loaded::before,
.project-card__media.is-missing::before {
    opacity: 0;
    pointer-events: none;
}

.project-card__media img {
    position: relative;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 265px;
    padding: 18px;
    object-fit: contain;
    opacity: 0;
    transition: opacity .3s ease, transform .35s ease;
}

.project-card__media.is-loaded img {
    opacity: 1;
}

.project-card:hover .project-card__media.is-loaded img {
    transform: scale(1.015);
}

.project-card__placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: #7c91a2;
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    transition: opacity .2s ease, visibility .2s ease;
}

.project-card__media.is-loaded .project-card__placeholder {
    visibility: hidden;
    opacity: 0;
}

.project-card__placeholder svg {
    width: 42px;
    height: 42px;
    stroke: #8ba1b2;
    stroke-width: 1.35;
}

.project-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 34px 40px;
}

.project-card__duration {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: var(--projects-blue);
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.project-card__duration svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.project-card__duration--label {
    letter-spacing: .08em;
    text-transform: uppercase;
}

.project-card h3 {
    margin: 0 0 12px;
    font-family: 'Roboto', sans-serif;
    font-size: clamp(21px, 2.2vw, 27px);
    font-weight: 700;
    line-height: 1.3;
}

.project-card h3 a {
    color: var(--projects-ink);
    transition: color .2s ease;
}

.project-card h3 a:hover,
.project-card h3 a:focus {
    color: var(--projects-blue);
}

.project-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 20px;
    color: var(--projects-muted);
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(16, 76, 153, .3);
    color: var(--projects-blue);
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 700;
    transition: gap .2s ease, color .2s ease, border-color .2s ease;
}

.project-card__link svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.project-card__link:hover,
.project-card__link:focus {
    gap: 10px;
    border-color: var(--projects-green);
    color: var(--projects-green);
}

.projects-pagination {
    margin-top: 36px;
}

.projects-pagination .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin: 0;
}

.projects-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 7px 11px;
    border: 1px solid #d5e1e9;
    border-radius: 7px !important;
    background: #fff;
    color: var(--projects-blue);
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    box-shadow: none;
}

.projects-pagination .page-link:hover,
.projects-pagination .page-link:focus {
    border-color: var(--projects-blue);
    background: #edf4fb;
}

.projects-pagination .page-item.active .page-link {
    border-color: var(--projects-blue);
    background: var(--projects-blue);
    color: #fff;
}

.projects-pagination .page-item.disabled .page-link {
    color: #a0acb6;
    background: #f3f6f8;
}

.projects-empty {
    padding: 66px 24px;
    border: 1px dashed #c5d5e1;
    border-radius: 12px;
    background: #fff;
    color: var(--projects-muted);
    font-family: 'Roboto', sans-serif;
    text-align: center;
}

.projects-empty > svg {
    width: 50px;
    height: 50px;
    margin-bottom: 14px;
    stroke: var(--projects-blue);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.35;
}

.projects-empty h3 {
    margin: 0 0 7px;
    color: var(--projects-ink);
    font-size: 22px;
}

.projects-empty p {
    margin: 0;
}

@keyframes project-image-loading {
    to { background-position-x: -200%; }
}

@media (max-width: 991.98px) {
    .projects-hero__content {
        min-height: 360px;
    }

    .projects-directory {
        padding: 60px 0 70px;
    }

    .project-card {
        grid-template-columns: minmax(240px, 38%) minmax(0, 1fr);
    }

    .project-card__body {
        padding: 29px 30px;
    }
}

@media (max-width: 767.98px) {
    .projects-hero__content {
        min-height: 330px;
        padding-top: 82px;
        padding-bottom: 34px;
    }

    .projects-hero p {
        font-size: 14px;
    }

    .projects-directory {
        padding: 48px 0 58px;
    }

    .projects-directory__header {
        align-items: flex-start;
        margin-bottom: 24px;
    }

    .projects-directory__header h2 {
        font-size: 25px;
    }

    .project-card {
        display: block;
        min-height: 0;
    }

    .project-card__media {
        min-height: 240px;
        border-right: 0;
        border-bottom: 1px solid var(--projects-border);
    }

    .project-card__media img {
        height: 240px;
        min-height: 240px;
        padding: 14px;
    }

    .project-card__body {
        padding: 27px 26px 29px;
    }
}

@media (max-width: 479.98px) {
    .projects-hero__content {
        min-height: 305px;
    }

    .projects-hero h1 {
        font-size: 35px;
    }

    .projects-directory__header {
        display: block;
    }

    .projects-directory__count {
        display: inline-block;
        margin-top: 14px;
    }

    .projects-list {
        gap: 18px;
    }

    .project-card__media,
    .project-card__media img {
        height: 210px;
        min-height: 210px;
    }

    .project-card__body {
        padding: 24px 21px 26px;
    }

    .project-card h3 {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card,
    .project-card__media img,
    .project-card__link {
        transition: none;
    }

    .project-card__media::before {
        animation: none;
    }
}
