/* ----- Projects (cards used on listing blocks) ----- */
.project-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(2, 6, 23, .06);
    transition: .25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 40px rgba(2, 6, 23, .12);
}

.project-thumb {
    aspect-ratio: 16 / 10;
    background: linear-gradient(140deg, #dbeafe 0%, #eff6ff 100%);
    overflow: hidden;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-body { padding: 16px; }

.project-body h3 {
    margin: 0 0 8px;
    font-size: 20px;
    letter-spacing: -.01em;
}

.project-body p {
    margin: 0;
    color: #64748b;
    line-height: 1.65;
}


/* ----- Projects page (index) ----- */
.projects-page-hero {
    background:
        radial-gradient(900px 300px at 100% 0%, rgba(212, 168, 83, .18), transparent 60%),
        linear-gradient(130deg, #0a1428 0%, #10203f 55%, #0a1b36 100%);
    padding: 58px 0 52px;
    position: relative;
    overflow: hidden;
}

.projects-page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 18px;
}

.projects-page-breadcrumb a {
    color: rgba(255, 255, 255, .68);
    text-decoration: none;
    transition: color .2s ease;
}

.projects-page-breadcrumb a:hover {
    color: #e5b962;
}

.projects-page-breadcrumb svg {
    width: 14px;
    height: 14px;
    opacity: .55;
}

.projects-page-breadcrumb span {
    color: rgba(255, 255, 255, .88);
    position: relative;
    display: inline-block;
}

.projects-page-breadcrumb span::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d4a853, #e5b962);
}

.projects-page-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 22px;
    align-items: stretch;
}

.projects-page-hero-copy {
    padding: 8px 0;
}

.projects-page-hero-copy--standalone .projects-page-count {
    display: inline-flex;
    margin-top: 20px;
}

.projects-page-accent {
    display: block;
    width: 62px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d4a853, #e5b962);
    margin-bottom: 18px;
}

.projects-page-hero-copy h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
    color: #fff;
}

.projects-page-hero-copy p {
    margin: 12px 0 0;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.8;
    max-width: 680px;
}

.projects-page-hero-actions {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.projects-page-count {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(212, 168, 83, .45);
    background: rgba(212, 168, 83, .15);
    color: #fef9e7;
    font-size: 13px;
    font-weight: 700;
}

.projects-page-featured {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(212, 168, 83, .25);
    background: rgba(2, 10, 25, .6);
    box-shadow: 0 16px 40px rgba(2, 6, 23, .32);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.projects-page-featured:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 168, 83, .5);
    box-shadow: 0 22px 44px rgba(2, 6, 23, .4);
}

.projects-page-featured-media {
    height: 220px;
    background: #0f172a;
}

.projects-page-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.projects-page-featured-body {
    padding: 16px 16px 18px;
}

.projects-page-featured-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #e5b962;
}

.projects-page-featured h3 {
    margin: 0 0 6px;
    color: #f8fafc;
    font-size: 20px;
    line-height: 1.3;
}

.projects-page-featured p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
}

.projects-page-grid-section {
    padding: 50px 0 70px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.projects-page-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.projects-page-card {
    position: relative;
    text-decoration: none;
    color: inherit;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 18px rgba(2, 6, 23, .06);
    display: flex;
    flex-direction: column;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .32s ease, border-color .25s ease;
}

.projects-page-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 168, 83, .45);
    box-shadow: 0 22px 50px rgba(212, 168, 83, .18);
}

.projects-page-card-media {
    position: relative;
    height: 236px;
    background: linear-gradient(145deg, #fefce8 0%, #fef9e7 100%);
    overflow: hidden;
}

.projects-page-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, .34) 0%, transparent 52%);
    pointer-events: none;
}

.projects-page-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .55s cubic-bezier(.22, 1, .36, 1);
}

.projects-page-card:hover .projects-page-card-media img {
    transform: scale(1.06);
}

.projects-page-card-num {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(15, 23, 42, .62);
    border: 1px solid rgba(255, 255, 255, .14);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.projects-page-card-body {
    padding: 20px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.projects-page-card-body h3 {
    margin: 0 0 8px;
    font-size: 19px;
    color: #0f172a;
    line-height: 1.3;
    transition: color .2s ease;
}

.projects-page-card:hover .projects-page-card-body h3 {
    color: #b8860b;
}

.projects-page-card-body p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.projects-page-card-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.projects-page-card-link {
    font-size: 13px;
    font-weight: 700;
    color: #b8860b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap .2s ease;
}

.projects-page-card:hover .projects-page-card-link {
    gap: 10px;
}

.projects-page-card-link::after {
    content: "\2192";
    font-size: 15px;
}

.projects-page-card-arrow {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: grid;
    place-items: center;
    transition: background .25s ease, border-color .25s ease;
}

.projects-page-card-arrow svg {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: color .25s ease;
}

.projects-page-card:hover .projects-page-card-arrow {
    background: #d4a853;
    border-color: #d4a853;
}

.projects-page-card:hover .projects-page-card-arrow svg {
    color: #fff;
}

.projects-page-empty {
    grid-column: 1 / -1;
    padding: 56px 24px;
    text-align: center;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 15px;
}

.projects-page-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}


/* ----- Project detail page ----- */
.project-detail-hero {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    background: #0f172a;
}

.project-detail-hero--text {
    background:
        radial-gradient(900px 320px at 100% 0%, rgba(212, 168, 83, .18), transparent 55%),
        linear-gradient(130deg, #0a1428 0%, #10203f 55%, #0a1b36 100%);
    min-height: 320px;
}

.project-detail-hero-content {
    position: relative;
    z-index: 2;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 48px;
}

.project-detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
}

.project-detail-breadcrumb a {
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    transition: color .2s ease;
}

.project-detail-breadcrumb a:hover {
    color: #e5b962;
}

.project-detail-breadcrumb svg {
    width: 14px;
    height: 14px;
    opacity: .55;
}

.project-detail-hero-accent {
    display: block;
    width: 50px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d4a853, #e5b962);
    margin-bottom: 14px;
}

.project-detail-hero-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    max-width: 760px;
}

.project-detail-hero-summary {
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.7;
    max-width: 760px;
}

.project-detail-section {
    padding: 52px 0 74px;
    background: #fff;
}

.project-detail-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.project-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    color: #b8860b;
    margin-bottom: 28px;
    padding: 8px 16px 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(212, 168, 83, .4);
    background: #fefce8;
    transition: background .2s ease, border-color .2s ease, gap .2s ease;
}

.project-detail-back:hover {
    background: #fef9e7;
    border-color: rgba(212, 168, 83, .6);
    gap: 12px;
}

.project-detail-back svg {
    width: 16px;
    height: 16px;
}

.project-detail-cover {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 28px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 28px rgba(2, 6, 23, .08);
}

.project-detail-cover img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.project-detail-article {
    padding: 38px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(2, 6, 23, .06);
}

.project-detail-article-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.project-detail-article-header::before {
    content: "";
    width: 4px;
    height: 28px;
    border-radius: 4px;
    background: linear-gradient(180deg, #d4a853, #e5b962);
    flex-shrink: 0;
}

.project-detail-article-header h2 {
    margin: 0;
    font-size: clamp(21px, 2.5vw, 28px);
    color: #0f172a;
}

.project-detail-article-body {
    color: #334155;
    line-height: 1.9;
    font-size: 15px;
}

.project-detail-article-body p {
    margin: 0 0 16px;
}

.project-detail-cta {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.project-detail-cta-text {
    font-size: 14px;
    color: #64748b;
}

.project-detail-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #d4a853, #b8860b);
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    transition: transform .22s ease, box-shadow .22s ease;
}

.project-detail-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(212, 168, 83, .35);
}


/* Responsive tweaks for project pages */
@media (max-width: 1100px) {
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .projects-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .projects-page-hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .projects-page-hero {
        padding: 42px 0 36px;
    }

    .projects-page-card-media {
        height: 208px;
    }

    .projects-page-featured-media {
        height: 200px;
    }

    .project-detail-hero,
    .project-detail-hero--text {
        min-height: 260px;
    }

    .project-detail-hero-content {
        min-height: 260px;
        padding-bottom: 28px;
    }

    .project-detail-cover {
        margin-top: 24px;
    }

    .project-detail-cover img {
        aspect-ratio: 16 / 9;
    }

    .project-detail-article {
        padding: 22px 18px;
    }

    .project-grid,
    .projects-page-grid {
        grid-template-columns: 1fr;
    }
}