:root {
    --page-accent: #0a6f8a;
    --project-ink: #092a36;
    --project-blue: #0a6f8a;
    --project-teal: #0e766f;
    --project-gold: #d6a842;
    --project-mist: #eef7f8;
    --project-line: rgba(219, 230, 229, 0.96);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduce section padding for compact layout */
.subpage-main .section {
    padding: clamp(40px, 5vw, 64px) 0;
}

.subpage-main .section + .section {
    padding-top: clamp(32px, 4vw, 48px);
}

.project-hero {
    --subpage-position: center;
    align-items: end;
}

.project-hero .container {
    transform: translateY(-80px);
}

.project-hero .subpage-hero-overlay-start {
    stop-color: rgba(7, 30, 41, 0.95);
}

.project-hero .subpage-hero-overlay-mid {
    stop-color: rgba(7, 30, 41, 0.62);
}

.project-hero .subpage-hero-overlay-end {
    stop-color: rgba(10, 111, 138, 0.22);
}

.project-hero .container {
    padding-block: clamp(58px, 10vw, 108px);
}

.project-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
    gap: clamp(28px, 5vw, 66px);
    align-items: end;
}

.project-hero-copy h1 {
    max-width: 940px;
    font-size: clamp(2.75rem, 6.6vw, 5.15rem);
    line-height: 0.98;
}

.project-hero-copy p:not(.section-kicker) {
    max-width: 760px;
}

.project-hero-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-card);
    padding: clamp(22px, 3vw, 30px);
    background: rgba(255, 255, 255, 0.11);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
}

.project-hero-panel::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.18) 48%, transparent 100%);
    content: "";
    transform: translateX(-120%);
    animation: project-sheen 5.8s ease-in-out infinite;
}

.project-hero-panel span,
.project-number,
.project-stat strong,
.client-logo-card figcaption {
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.project-hero-panel span,
.project-hero-panel strong,
.project-hero-panel p {
    position: relative;
    z-index: 1;
}

.project-hero-panel span {
    display: block;
    color: #bfe9ea;
}

.project-hero-panel strong {
    display: block;
    margin-top: 14px;
    color: #ffffff;
    font-size: clamp(3.8rem, 8vw, 6.4rem);
    line-height: 0.9;
}

.project-hero-panel p {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
}

.project-main {
    color: #263946;
}

.project-intro {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, #ffffff 0%, rgba(238, 247, 248, 0.78) 100%);
}

.project-intro::before {
    position: absolute;
    top: 0;
    right: max(20px, calc((100vw - var(--container)) / 2));
    width: min(44vw, 520px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(214, 168, 66, 0.86), transparent);
    content: "";
}

.project-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1fr);
    gap: clamp(30px, 6vw, 82px);
    align-items: center;
}

.project-intro-copy h2,
.project-section-head h2 {
    margin: 0;
    color: var(--project-ink);
    font-size: clamp(2.1rem, 4.3vw, 3.65rem);
    line-height: 1.04;
}

.project-intro-copy p:not(.section-kicker),
.project-section-head p {
    margin: 20px 0 0;
    color: var(--color-muted);
    font-size: clamp(1rem, 1.7vw, 1.14rem);
}

.project-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.project-stat {
    min-height: 164px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--project-line);
    border-radius: var(--radius-card);
    padding: 22px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(10, 48, 56, 0.08);
}

.project-stat strong {
    display: inline-flex;
    width: max-content;
    min-height: 30px;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    color: var(--project-ink);
    background: rgba(214, 168, 66, 0.18);
}

.project-stat span {
    color: #344a56;
    font-weight: 720;
}

.project-list-section {
    background:
        linear-gradient(135deg, rgba(9, 42, 54, 0.98), rgba(11, 29, 38, 0.98)),
        url("../images/header-menu-3.png") center / cover;
}

.project-section-head {
    max-width: 900px;
    margin-bottom: clamp(30px, 5vw, 54px);
}

.project-section-head-wide {
    max-width: 980px;
}

.project-section-head span {
    color: var(--project-blue);
    font-weight: 800;
}

.project-section-head h2 {
    color: #ffffff;
}

.project-section-head p {
    color: rgba(255, 255, 255, 0.75);
}

.profile-filters {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(140px, 0.8fr);
    gap: 16px;
    margin-top: clamp(30px, 5vw, 50px);
    align-items: start;
}

.profile-search-wrap {
    position: relative;
}

.profile-search-input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-control);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.profile-search-input::placeholder {
    color: #ffffff;
}

.profile-search-input:focus {
    outline: none;
    border-color: var(--project-gold);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(214, 168, 66, 0.2);
}

.profile-search-wrap::before {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    content: '';
}

.profile-filter-group {
    position: relative;
}

.profile-filter-select {
    width: 100%;
    padding: 14px 38px 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-control);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    transition: all 0.25s ease;
}

.profile-filter-select option {
    background: #092a36;
    color: #ffffff;
    font-weight: 500;
}

.profile-filter-select:focus {
    outline: none;
    border-color: var(--project-gold);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(214, 168, 66, 0.2);
}

.profile-filter-group::after {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(255, 255, 255, 0.6);
    pointer-events: none;
    content: '';
}

.profile-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.profile-project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-card);
    padding: 24px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.profile-project-card::before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--project-blue), var(--project-teal), var(--project-gold));
    content: '';
}

.profile-project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.profile-card-number {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(10, 111, 138, 0.3), rgba(14, 118, 111, 0.3));
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.profile-card-category {
    padding: 6px 14px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.profile-card-instansi {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.profile-card-kegiatan {
    flex: 1;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.55;
}

.profile-no-results {
    margin-top: 40px;
    padding: 60px 20px;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.03);
}

.profile-no-results p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    font-weight: 500;
}

.profile-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding: 20px;
}

.pagination-button {
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-control);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pagination-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--project-gold);
    transform: translateY(-2px);
}

.pagination-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
}

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

.project-card {
    position: relative;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid var(--project-line);
    border-radius: var(--radius-card);
    padding: clamp(18px, 2.4vw, 24px);
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(10, 48, 56, 0.07);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.project-card::after {
    position: absolute;
    inset: auto 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--project-blue), var(--project-gold));
    content: "";
    opacity: 0.82;
    transform: scaleX(0.28);
    transform-origin: left;
    transition: transform 0.24s ease;
}

.project-card:hover,
.project-card:focus-within {
    border-color: rgba(10, 111, 138, 0.34);
    box-shadow: 0 24px 56px rgba(10, 48, 56, 0.12);
    transform: translateY(-4px);
}

.project-card:hover::after,
.project-card:focus-within::after {
    transform: scaleX(1);
}

.project-card-wide {
    grid-column: span 2;
}

.project-card-featured {
    grid-column: span 2;
    color: #ffffff;
    border-color: rgba(10, 75, 83, 0.28);
    background:
        linear-gradient(135deg, rgba(9, 42, 54, 0.98), rgba(10, 111, 138, 0.9)),
        url("../images/header-menu-3.png") center / cover;
    box-shadow: 0 26px 70px rgba(10, 48, 56, 0.18);
}

.project-card-featured::after {
    background: linear-gradient(90deg, var(--project-gold), rgba(255, 255, 255, 0.88));
}

.project-number {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--project-blue);
    background: rgba(10, 111, 138, 0.09);
}

.project-card-featured .project-number {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.project-card h3 {
    margin: 28px 0 0;
    color: var(--project-ink);
    font-size: clamp(1.02rem, 1.8vw, 1.22rem);
    line-height: 1.18;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.project-card p {
    margin: 14px 0 0;
    color: var(--color-muted);
    overflow-wrap: anywhere;
}

.project-card-featured h3 {
    color: #ffffff;
}

.project-card-featured p {
    color: rgba(255, 255, 255, 0.82);
}

.client-logo-section {
    background:
        linear-gradient(180deg, #ffffff 0%, rgba(244, 248, 247, 0.72) 100%);
}

.client-logo-section .project-section-head h2 {
    color: var(--project-ink);
}

.client-logo-section .project-section-head p {
    color: var(--color-muted);
}

.client-logo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.client-logo-card {
    min-height: 176px;
    display: grid;
    grid-template-rows: minmax(84px, 1fr) auto;
    gap: 16px;
    align-items: center;
    justify-items: center;
    margin: 0;
    border: 1px solid var(--project-line);
    border-radius: var(--radius-card);
    padding: 18px 18px 18px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 247, 0.82)),
        #ffffff;
    box-shadow: 0 14px 34px rgba(10, 48, 56, 0.07);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.client-logo-card:hover,
.client-logo-card:focus-within {
    border-color: rgba(214, 168, 66, 0.52);
    box-shadow: 0 24px 56px rgba(10, 48, 56, 0.12);
    transform: translateY(-4px);
}

.client-logo-card img {
    width: min(100%, 168px);
    max-height: 84px;
    object-fit: contain;
    filter: saturate(0.86) contrast(1.02);
    transition: filter 0.24s ease, transform 0.24s ease;
}

.client-logo-card:hover img,
.client-logo-card:focus-within img {
    filter: saturate(1.06) contrast(1.05);
    transform: scale(1.04);
}

.client-logo-card figcaption {
    color: #344a56;
    text-align: center;
    overflow-wrap: anywhere;
}

@keyframes project-sheen {
    0%,
    54% {
        transform: translateX(-120%);
    }

    76%,
    100% {
        transform: translateX(120%);
    }
}

@supports (animation-timeline: view()) {
    .project-card,
    .client-logo-card,
    .project-stat {
        animation: project-rise both;
        animation-timeline: view();
        animation-range: entry 8% cover 26%;
    }

    @keyframes project-rise {
        from {
            opacity: 0.24;
            translate: 0 18px;
        }

        to {
            opacity: 1;
            translate: 0;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-hero-panel::before,
    .project-card,
    .client-logo-card,
    .project-stat {
        animation: none;
    }

    .project-card,
    .client-logo-card,
    .project-stat,
    .client-logo-card img {
        transition: none;
    }
}

@media (max-width: 1040px) {
    .project-list,
    .client-logo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-filters {
        grid-template-columns: 1fr minmax(140px, 0.8fr);
    }
}

@media (max-width: 920px) {
    .project-hero-inner,
    .project-intro-grid {
        grid-template-columns: 1fr;
    }

    .project-hero-inner {
        align-items: start;
    }

    .project-hero-panel {
        max-width: 520px;
    }

    .profile-filters {
        grid-template-columns: 1fr;
    }

    .profile-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 720px) {
    .project-list,
    .project-stat-grid,
    .client-logo-grid {
        grid-template-columns: 1fr;
    }

    .project-card-wide,
    .project-card-featured {
        grid-column: auto;
    }

    .profile-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .project-hero {
        align-items: end;
    }

    .project-hero-inner {
        gap: 12px;
    }

    .project-hero-panel {
        display: none;
    }

    .project-intro-copy h2,
    .project-section-head h2 {
        font-size: clamp(1.9rem, 10vw, 2.65rem);
    }

    .project-stat,
    .project-card,
    .client-logo-card {
        min-height: auto;
    }

    .profile-filters {
        gap: 12px;
    }

    .profile-search-input,
    .profile-filter-select {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .profile-search-input {
        padding-left: 42px;
    }

    .profile-search-wrap::before {
        left: 14px;
        width: 18px;
        height: 18px;
    }

    .profile-project-card {
        padding: 20px;
    }

    .profile-card-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .profile-card-instansi {
        font-size: 1.05rem;
    }

    .profile-card-kegiatan {
        font-size: 0.9rem;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    .profile-filters {
        grid-template-columns: minmax(0, 2fr) minmax(140px, 0.8fr);
        gap: 12px;
        margin-top: 20px;
    }

    .profile-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 24px;
        gap: 16px;
    }

    .profile-project-card {
        padding: 18px;
    }

    .profile-card-header {
        margin-bottom: 12px;
    }

    .profile-card-instansi {
        margin-bottom: 8px;
        font-size: 1rem;
    }

    .profile-card-kegiatan {
        margin-bottom: 14px;
        font-size: 0.85rem;
    }
}

@media (orientation: portrait) and (max-width: 640px) {
    .project-hero {
        min-height: auto;
        aspect-ratio: 12 / 5;
        background-size:
            cover,
            100% auto;
    }

    .project-hero .container {
        padding: 12px 0;
    }

    .project-hero-copy {
        transform: translateY(40px);
    }

    .project-hero-copy h1 {
        font-size: 1.3rem;
        line-height: 1;
    }

    .project-hero-copy p:not(.section-kicker) {
        margin-top: 7px;
        font-size: 0.62rem;
        line-height: 1.2;
    }

    .project-hero-copy .section-kicker {
        margin-bottom: 5px;
        font-size: 0.54rem;
    }
}
