.profile-header {
    color: var(--color-white);
    background: var(--color-black);
}

.profile-hero {
    min-height: 710px;
    display: flex;
    align-items: flex-end;
    padding: 0 0 110px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.28) 48%, rgba(0, 0, 0, 0.12) 100%), url("../../assets/images/profile-awards-hero.webp") center 2% / cover no-repeat;
}

.profile-hero-content {
    width: min(var(--container-width), calc(100% - 88px));
    margin: 0 auto;
}

.profile-hero h1 {
    margin: 0;
    max-width: 520px;
    font-size: 64px;
    font-weight: 800;
    line-height: 0.98;
}

.profile-intro {
    margin-top: calc(var(--section-cut-height) * -1);
    padding: calc(78px + var(--section-cut-height)) 0 104px;
    color: var(--color-white);
    background: var(--color-green);
    clip-path: polygon(0 0, var(--section-cut-edge) 0, var(--section-cut-width) var(--section-cut-height), 100% var(--section-cut-height), 100% 100%, 0 100%);
}

.profile-intro-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1fr);
    align-items: start;
    gap: 96px;
}

.profile-intro h2,
.awards-section h2,
.events-section h2 {
    margin: 0;
    font-size: 36px;
    font-weight: 800;
    line-height: 0.98;
}

.profile-intro p {
    margin: 54px 0 0;
    max-width: 650px;
    font-size: 22px;
    line-height: 1.18;
    text-align: right;
}

.awards-section {
    padding: 80px 0 122px;
    color: var(--color-black);
    background: var(--color-white);
}

.awards-carousel {
    position: relative;
    margin-top: 76px;
}

.smooth-scroll-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    cursor: grab;
}

.smooth-scroll-track::-webkit-scrollbar {
    display: none;
}

.smooth-scroll-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.awards-track {
    gap: 25px;
    align-items: stretch;
    padding: 0 2px 2px;
}

/* Kartu prestasi default-nya ramping; saat hover/focus kartu melebar dan kartu lain collapse. */
.award-card {
    position: relative;
    flex: 0 0 166px;
    height: 413px;
    overflow: hidden;
    color: var(--color-white);
    border-radius: 6px;
    scroll-snap-align: start;
    transition: flex-basis 520ms cubic-bezier(0.22, 1, 0.36, 1), filter 420ms ease;
}

.award-card:hover,
.award-card:focus-visible {
    flex-basis: 730px;
    outline: 0;
}

.award-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.award-card::after,
.event-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, 0.7) 100%);
}

.award-overlay,
.event-overlay {
    position: absolute;
    right: 16px;
    bottom: 31px;
    left: 16px;
    z-index: 1;
    transition: right 520ms cubic-bezier(0.22, 1, 0.36, 1), bottom 520ms cubic-bezier(0.22, 1, 0.36, 1), left 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.award-overlay p,
.event-overlay p {
    margin: 0 0 9px;
    font-size: 14px;
    line-height: 1.15;
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.award-overlay h3 {
    margin: 0;
    max-width: 420px;
    font-size: 24px;
    font-weight: 800;
    line-height: 0.98;
    transition: font-size 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.award-card:hover .award-overlay,
.award-card:focus-visible .award-overlay {
    right: 31px;
    bottom: 48px;
    left: 31px;
}

.award-card:hover .award-overlay h3,
.award-card:focus-visible .award-overlay h3 {
    font-size: 36px;
}

.award-rank {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-top: 13px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0;
    transition: right 520ms cubic-bezier(0.22, 1, 0.36, 1), bottom 520ms cubic-bezier(0.22, 1, 0.36, 1), margin 420ms ease, gap 420ms ease;
}

.award-card:hover .award-rank,
.award-card:focus-visible .award-rank {
    position: absolute;
    right: 0;
    bottom: 0;
    gap: 10px;
    margin-top: 0;
    font-size: 14px;
}

.award-rank strong {
    position: relative;
    display: inline-grid;
    width: 43px;
    height: 43px;
    place-items: center;
    color: var(--color-black);
    background: #ffc83d;
    border: 3px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    font-size: 21px;
    line-height: 1;
    transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.award-card:hover .award-rank strong,
.award-card:focus-visible .award-rank strong {
    transform: scale(1.04);
}

/* Pita medal dibuat dengan CSS agar tetap tajam dan tidak perlu aset tambahan. */
.award-rank strong::before,
.award-rank strong::after {
    content: "";
    position: absolute;
    top: calc(100% - 4px);
    width: 13px;
    height: 22px;
    background: #d91f2d;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%);
}

.award-rank strong::before {
    left: 5px;
    transform: rotate(10deg);
}

.award-rank strong::after {
    right: 5px;
    transform: rotate(-10deg);
}

.award-rank strong[data-rank="2"] {
    background: #cfd3d6;
}

.award-rank strong[data-rank="2"]::before,
.award-rank strong[data-rank="2"]::after {
    background: #85d46d;
}

.award-rank strong[data-rank="3"] {
    background: #f19a39;
}

.award-rank strong[data-rank="3"]::before,
.award-rank strong[data-rank="3"]::after {
    background: #1698f2;
}

.floating-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--color-white);
    font-size: 27px;
    background: rgba(255, 255, 255, 0.55);
    border: 0;
    border-radius: 999px;
    transform: translateY(-50%);
    cursor: pointer;
}

.floating-control-prev {
    left: -22px;
}

.floating-control-next {
    right: -22px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
}

.carousel-dots button {
    width: 16px;
    height: 16px;
    padding: 0;
    background: #dedede;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: width 260ms ease, background 260ms ease;
}

.carousel-dots .is-active {
    width: 47px;
    background: var(--color-black);
}

.events-section {
    position: relative;
    padding: calc(92px + var(--section-band-height)) 0 135px;
    color: var(--color-white);
    background: var(--color-black);
}

.events-section::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: calc(var(--section-band-height) + 2px);
    background: var(--color-white);
    clip-path: polygon(0 0, 100% 0, 100% var(--section-band-height), var(--section-cut-width) var(--section-band-height), var(--section-cut-edge) var(--section-cut-flat-height), 0 var(--section-cut-flat-height));
    pointer-events: none;
}

.events-track {
    gap: 34px;
    margin-top: 78px;
    padding-right: 90px;
}

.event-card {
    position: relative;
    flex: 0 0 350px;
    height: 520px;
    overflow: hidden;
    color: var(--color-white);
    background: #245f68;
    border-radius: 14px;
    scroll-snap-align: start;
}

.detail-card-link {
    position: absolute;
    inset: 0;
    z-index: 4;
}

.detail-card-link:focus-visible {
    outline: 3px solid var(--color-green);
    outline-offset: -3px;
}

.event-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card::before {
    content: "";
    position: absolute;
    inset: 44% 0 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(54, 199, 207, 0) 0%, rgba(48, 151, 163, 0.95) 52%, rgba(48, 141, 151, 1) 100%);
}

.event-overlay {
    display: flex;
    flex-direction: column;
    z-index: 2;
    min-height: 45%;
}

.event-overlay h3 {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 800;
    line-height: 0.95;
}

.event-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 16px;
    margin-top: auto;
}

.event-overlay address {
    min-width: 0;
    margin: 0;
    color: rgba(139, 192, 203, 1);
    font-size: 12px;
    line-height: 1.45;
    font-style: normal;
    overflow-wrap: anywhere;
}

.event-overlay address strong,
.event-overlay address span {
    display: block;
}

.event-overlay address strong {
    margin-bottom: 7px;
    color: var(--color-white);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.15;
}

.event-overlay time {
    display: grid;
    gap: 4px;
    min-width: 44px;
    color: rgba(139, 192, 203, 1);
    font-size: 13px;
    line-height: 1.25;
    text-align: right;
    white-space: normal;
}

.event-overlay time span:first-child {
    color: var(--color-white);
    font-weight: 500;
}

@media (max-width: 1024px) {
    .profile-intro-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .profile-intro p {
        margin-top: 0;
        text-align: left;
    }

    .award-card:hover,
    .award-card:focus-visible {
        flex-basis: min(620px, calc(100vw - 80px));
    }
}

@media (max-width: 576px) {
    .profile-hero {
        min-height: 500px;
        padding-bottom: 80px;
    }

    .profile-hero-content {
        width: calc(100% - 48px);
    }

    .profile-hero h1 {
        font-size: 46px;
    }

    .profile-intro,
    .events-section {
        margin-top: calc((var(--section-cut-height) + 2px) * -1);
    }

    .profile-intro h2,
    .awards-section h2,
    .events-section h2 {
        font-size: 30px;
    }

    .profile-intro p {
        font-size: 18px;
    }

    .awards-section {
        padding-bottom: 88px;
    }

    .award-card,
    .award-card:hover,
    .award-card:focus-visible {
        flex-basis: calc(100vw - 72px);
        height: 410px;
    }

    .award-overlay,
    .award-card:hover .award-overlay,
    .award-card:focus-visible .award-overlay {
        right: 20px;
        bottom: 34px;
        left: 20px;
    }

    .award-overlay h3,
    .award-card:hover .award-overlay h3,
    .award-card:focus-visible .award-overlay h3 {
        font-size: 28px;
    }

    .award-rank,
    .award-card:hover .award-rank,
    .award-card:focus-visible .award-rank {
        position: static;
        gap: 0;
        margin-top: 13px;
        font-size: 0;
    }

    .events-track {
        gap: 20px;
        padding-right: 46px;
    }

    .event-card {
        flex-basis: calc(100vw - 72px);
        height: 450px;
    }

    .event-overlay {
        right: 18px;
        bottom: 24px;
        left: 18px;
    }

    .event-meta {
        gap: 12px;
    }

    .event-overlay time {
        position: static;
    }

    .floating-control {
        display: none;
    }
}
