/* =====================================================================
   CHANGELOG PAGE — changelog-page.css
   ===================================================================== */


/* HERO
   --------------------------------------------------------------------- */

.cl-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    position: relative;
    z-index: 2;
}

.cl-hero .cl-hero__inner {
    max-width: 1150px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 0 25px;
}

.cl-hero .cl-hero__inner .cl-hero__badge {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.cl-hero .cl-hero__inner .cl-hero__headline {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-ink);
    line-height: 1.2;
    margin: 0;
}

.cl-hero .cl-hero__inner .cl-hero__subheadline {
    font-size: 15px;
    color: var(--color-muted);
    line-height: 1.7;
    max-width: 600px;
    margin: 0;
}

/* CONTRIBUTION HEATMAP (GITHUB-STYLE — ONE SQUARE PER DAY, PAST 12 MONTHS) */

.cl-hero .cl-hero__inner .cl-heatmap {
    /* FLUID CELL MODEL: COLUMNS FLEX TO FILL THE CARD SO THE FULL YEAR FITS ON DESKTOP/LAPTOP.
       --cl-cell-min IS THE SMALLEST LEGIBLE COLUMN WIDTH — ONCE 53 COLUMNS NO LONGER FIT,
       THE GRID OVERFLOWS AND THE VIEWPORT SCROLLS HORIZONTALLY (NARROW SCREENS ONLY). */
    --cl-cell-min: 13px;
    --cl-cell-gap: 3px;
    width: 100%;
    max-width: 1100px;
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px;
    border-radius: 25px;
    background: var(--color-surface);
    border: 1px solid rgba(28, 145, 228, 0.08);
    box-shadow: 0 10px 50px rgba(28, 145, 228, 0.06), 0 2px 10px rgba(15, 23, 42, 0.03);
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport {
    position: relative;
    width: 100%;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(28, 145, 228, 0.3) transparent;
    padding-bottom: 10px;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__scroll .cl-heatmap__inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 0 auto;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__scroll .cl-heatmap__inner .cl-heatmap__months {
    display: flex;
    width: 100%;
    gap: var(--cl-cell-gap);
}

/* ONE MONTH LABEL PER WEEK COLUMN — SAME flex/min-width/gap AS .cl-heatmap__week
   SO LABELS STAY ALIGNED OVER THEIR COLUMNS AT EVERY WIDTH. SPARSE LABELS OVERFLOW
   FREELY INTO THE BLANK SPANS THAT FOLLOW THEM. */

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__scroll .cl-heatmap__inner .cl-heatmap__months .cl-heatmap__month {
    flex: 1 1 0;
    min-width: var(--cl-cell-min);
    font-size: 15px;
    line-height: 1;
    color: var(--color-muted);
    white-space: nowrap;
    overflow: visible;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__scroll .cl-heatmap__inner .cl-heatmap__grid {
    display: flex;
    width: 100%;
    gap: var(--cl-cell-gap);
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__scroll .cl-heatmap__inner .cl-heatmap__grid .cl-heatmap__week {
    flex: 1 1 0;
    min-width: var(--cl-cell-min);
    display: flex;
    flex-direction: column;
    gap: var(--cl-cell-gap);
}

/* EACH DAY SQUARE FILLS ITS FLUID COLUMN (width: 100% + aspect-ratio: 1) SO THE WHOLE
   GRID SCALES WITH THE CARD. INTER-SQUARE SPACING COMES FROM THE gap ON .cl-heatmap__week
   (VERTICAL) AND .cl-heatmap__grid (HORIZONTAL). */

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__day {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 25%;
    background-color: #e7ecf3;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__day.cl-heatmap__day--l0 {
    background-color: #e7ecf3;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__day.cl-heatmap__day--l1 {
    background-color: #cbe6fa;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__day.cl-heatmap__day--l2 {
    background-color: #8fcdf3;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__day.cl-heatmap__day--l3 {
    background-color: #4fb0ec;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__day.cl-heatmap__day--l4 {
    background-color: #1c91e4;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__day.cl-heatmap__day--out {
    background-color: transparent;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__day:not(.cl-heatmap__day--out):hover {
    outline: 1px solid rgba(28, 145, 228, 0.45);
    outline-offset: -1px;
}

/* EDGE FADES ARE SCROLL HINTS — SHOWN ONLY WHEN THE GRID ACTUALLY OVERFLOWS
   (JS ADDS .cl-heatmap__viewport--scrollable). HIDDEN BY DEFAULT SO THEY NEVER
   DIM REAL SQUARES WHEN THE FULL YEAR FITS (DESKTOP/LAPTOP). */

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    pointer-events: none;
    z-index: 2;
    display: none;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport.cl-heatmap__viewport--scrollable .cl-heatmap__fade {
    display: block;
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__fade.cl-heatmap__fade--left {
    left: 0;
    background: linear-gradient(to right, var(--color-surface), rgb(from var(--color-surface) r g b / 0));
}

.cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__fade.cl-heatmap__fade--right {
    right: 0;
    background: linear-gradient(to left, var(--color-surface), rgb(from var(--color-surface) r g b / 0));
}


/* TIMELINE SECTION
   --------------------------------------------------------------------- */

.cl-timeline {
    background: var(--color-surface);
    position: relative;
    z-index: 1;
}

.cl-timeline::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C360,80 720,0 1440,40 L1440,80 L0,80 Z' fill='%23ffffff'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.cl-timeline .content-inner .cl-timeline__track {
    position: relative;
    padding-left: 50px;
    max-width: 900px;
    margin: 0 auto;
}

.cl-timeline .content-inner .cl-timeline__track::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 18px;
    width: 2px;
    background: linear-gradient(180deg, rgba(28, 145, 228, 0.2) 0%, rgba(28, 145, 228, 0.05) 100%);
}


/* DATE GROUP
   --------------------------------------------------------------------- */

.cl-timeline .content-inner .cl-timeline__track .cl-date-group {
    padding-bottom: 25px;
}

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    position: relative;
}

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__header .cl-date-group__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid var(--color-surface);
    box-shadow: 0 0 0 2px rgba(28, 145, 228, 0.3);
    position: absolute;
    left: -43px;
    flex-shrink: 0;
}

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__header .cl-date-group__date {
    font-weight: 700;
    color: var(--color-ink);
    font-size: 15px;
}

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__header .cl-date-group__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(28, 145, 228, 0.08);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
}


/* ENTRIES
   --------------------------------------------------------------------- */

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 25px;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}


/* ENTRY HEADER */

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry .cl-entry__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}


/* CATEGORY TAGS */

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry .cl-entry__header .cl-entry__tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry .cl-entry__header .cl-entry__tag.cl-entry__tag--new { background: var(--color-accent); }

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry .cl-entry__header .cl-entry__tag.cl-entry__tag--improvement { background: var(--color-primary); }

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry .cl-entry__header .cl-entry__tag.cl-entry__tag--ai { background: var(--color-secondary); }

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry .cl-entry__header .cl-entry__tag.cl-entry__tag--integration { background: #10b981; }

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry .cl-entry__header .cl-entry__tag.cl-entry__tag--performance { background: #94a3b8; }


/* RELATIVE TIME */

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry .cl-entry__header .cl-entry__time {
    font-size: 11px;
    color: var(--color-muted);
    font-weight: 500;
}


/* ENTRY CONTENT */

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry .cl-entry__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-ink);
    line-height: 1.5;
    margin: 0;
}

.cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry .cl-entry__desc {
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.6;
    margin: 10px 0 0;
}


/* CTA SECTION
   --------------------------------------------------------------------- */

.cl-cta {
    background: var(--color-ink);
    position: relative;
    z-index: 1;
}

.cl-cta::before {
    content: "";
    position: absolute;
    top: -79px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C360,80 720,0 1440,40 L1440,80 L0,80 Z' fill='%230f172a'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.cl-cta .cl-cta__inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 0 25px;
}

.cl-cta .cl-cta__inner .cl-cta__title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
}

.cl-cta .cl-cta__inner .cl-cta__subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
}


/* RESPONSIVE — TABLET (768px+)
   --------------------------------------------------------------------- */

@media (min-width: 768px) {

    .cl-hero .cl-hero__inner .cl-hero__headline {
        font-size: 36px;
    }

    .cl-cta .cl-cta__inner .cl-cta__title {
        font-size: 32px;
    }

}


/* RESPONSIVE — DESKTOP (1024px+)
   --------------------------------------------------------------------- */

@media (min-width: 1024px) {

    .cl-hero .cl-hero__inner .cl-hero__headline {
        font-size: 42px;
    }

    .cl-hero .cl-hero__inner .cl-hero__subheadline {
        font-size: 16px;
    }

    .cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__scroll .cl-heatmap__inner .cl-heatmap__months .cl-heatmap__month {
        font-size: 16px;
    }

    .cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__entries .cl-entry {
        padding: 25px 50px;
    }

    .cl-cta .cl-cta__inner .cl-cta__title {
        font-size: 36px;
    }

}


/* RESPONSIVE — MOBILE (max 639px)
   --------------------------------------------------------------------- */

@media (max-width: 639px) {

    .cl-timeline .content-inner .cl-timeline__track {
        padding-left: 25px;
    }

    .cl-timeline .content-inner .cl-timeline__track::before {
        left: 6px;
    }

    .cl-timeline .content-inner .cl-timeline__track .cl-date-group .cl-date-group__header .cl-date-group__dot {
        width: 12px;
        height: 12px;
        left: -25px;
    }

    .cl-hero .cl-hero__inner .cl-heatmap {
        padding: 10px;
    }

    .cl-hero .cl-hero__inner .cl-heatmap .cl-heatmap__viewport .cl-heatmap__fade {
        width: 25px;
    }

    .cl-timeline::before {
        height: 50px;
        top: -49px;
    }

    .cl-cta::before {
        height: 50px;
        top: -49px;
    }

}
