/* =========================================================
   EXPERIENCE SECTION
   ========================================================= */

.experience {
    position: relative;
    width: 100%;
    padding: 8rem 0;
    background: var(--color-bg, #F8F7F4);
    color: var(--color-text, #18181B);
    overflow: hidden;
}

.experience__container {
    width: min(1400px, calc(100% - 8rem));
    margin: 0 auto;

    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) minmax(650px, 1.65fr);
    gap: 4.5rem;

    position: relative;
}


/* =========================================================
   INTRO
   ========================================================= */

.experience__intro {
    position: relative;
    padding-top: 1.5rem;
    padding-right: 1.5rem;
}

.experience__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.7rem;

    margin-bottom: 1.5rem;

    color: var(--color-primary, #14532D);

    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.experience__eyebrow-dot {
    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    border-radius: 50%;
    background: var(--color-primary, #14532D);

    box-shadow: 0 0 0 5px rgba(20, 83, 45, 0.08);
}


/* =========================================================
   HEADING
   ========================================================= */

.experience__heading {
    max-width: 520px;
    margin: 0;

    font-family: var(--font-heading, "Sora", sans-serif);
    font-size: clamp(3.4rem, 5vw, 5.7rem);
    /* font-size: 2.5rem; */
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.055em;

    color: var(--color-text, #18181B);

    text-wrap: balance;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.experience__description {
    max-width: 430px;

    margin: 2rem 0 0;

    color: #5F6368;

    font-family: var(--font-body, "Sora", sans-serif);
    font-size: 0.98rem;
    font-weight: 400;
    line-height: 1.75;
}


/* =========================================================
   DIVIDER
   ========================================================= */

.experience__divider {
    width: 48px;
    height: 1px;

    margin: 1.8rem 0 2rem;

    background: var(--color-primary, #14532D);
}


/* =========================================================
   STATS
   ========================================================= */

.experience__stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    margin-top: 0.5rem;
}

.experience__stat {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2rem;
}

.experience__stat-icon {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(20, 83, 45, 0.07);
    border-radius: 11px;

    background: #EEF5EF;
}

.experience__stat-icon img,
.experience__stat-icon svg {
    width: 24px;
    height: 24px;

    display: block;

    color: var(--color-primary, #14532D);
    stroke: currentColor;
    stroke-width: 1.8;
}

.experience__stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.experience__stat-number {
    color: var(--color-text, #18181B);

    font-family: var(--font-heading, "Sora", sans-serif);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.1;
}

.experience__stat-label {
    color: #686B72;

    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.3;
}


/* =========================================================
   RESUME
   ========================================================= */

.experience__resume {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;

    margin-top: 2.2rem;

    color: var(--color-primary, #14532D);

    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;

    transition:
        gap 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.3s ease;
}

.experience__resume-arrow {
    font-size: 1.15rem;
    line-height: 1;

    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.experience__resume:hover {
    gap: 1.1rem;
}

.experience__resume:hover .experience__resume-arrow {
    transform: translateX(3px);
}


/* =========================================================
   TIMELINE
   ========================================================= */

.experience__timeline {
    position: relative;

    display: flex;
    flex-direction: column;

    padding: 1.5rem 0 1rem;
}

.experience__timeline-line {
    position: absolute;

    top: 2.8rem;
    bottom: 2.8rem;

    left: 8.8rem;

    width: 1px;

    background: #D9DEDB;

    z-index: 0;
}


/* =========================================================
   EXPERIENCE ITEM
   ========================================================= */

.experience__item {
    position: relative;

    display: grid;
    grid-template-columns: 7.4rem 2.8rem minmax(0, 1fr);

    align-items: center;

    min-height: 120px;

    margin-bottom: 0.8rem;

    z-index: 1;
}

.experience__item:last-child {
    margin-bottom: 0;
}


/* =========================================================
   YEAR
   ========================================================= */

.experience__year {
    align-self: center;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    padding-right: 1rem;

    text-align: right;
}

.experience__year-range {
    color: var(--color-text, #18181B);

    font-family: var(--font-heading, "Sora", sans-serif);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;

    white-space: nowrap;
}

.experience__item.is-current .experience__year-range {
    color: var(--color-primary, #14532D);
}

.experience__year-status {
    margin-top: 0.4rem;

    color: #70747A;

    font-size: 0.66rem;
    font-weight: 400;
}


/* =========================================================
   TIMELINE DOT
   ========================================================= */

.experience__timeline-dot {
    position: relative;

    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 3;
}

.experience__timeline-dot span {
    width: 11px;
    height: 11px;

    border-radius: 50%;

    background: var(--color-text, #18181B);

    border: 2px solid var(--color-bg, #F8F7F4);
}

.experience__item.is-current .experience__timeline-dot span {
    width: 13px;
    height: 13px;

    background: var(--color-primary, #14532D);

    box-shadow:
        0 0 0 5px rgba(20, 83, 45, 0.08),
        0 0 0 9px rgba(20, 83, 45, 0.035);
}


/* =========================================================
   CARD
   ========================================================= */

.experience__card {
    position: relative;

    min-width: 0;
    min-height: 120px;

    padding: 1.15rem 1.25rem;

    border: 1px solid rgba(24, 24, 27, 0.07);
    border-radius: 17px;

    background: rgba(255, 255, 255, 0.72);

    box-shadow: 0 6px 22px rgba(24, 24, 27, 0.025);

    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.35s ease,
        box-shadow 0.45s ease,
        background 0.35s ease;
}

.experience__card:hover {
    transform: translateY(-3px);

    border-color: rgba(20, 83, 45, 0.13);

    background: rgba(255, 255, 255, 0.96);

    box-shadow: 0 16px 38px rgba(24, 24, 27, 0.06);
}


/* =========================================================
   CARD MAIN
   ========================================================= */

.experience__card-main {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;

    align-items: start;

    gap: 1rem;
}


/* =========================================================
   CARD ICON
   ========================================================= */

.experience__card-icon {
    width: 54px;
    height: 54px;

    flex: 0 0 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #EEF5EF;

    transition:
        background 0.35s ease,
        box-shadow 0.35s ease;
}

.experience__card-icon img,
.experience__card-icon svg {
    width: 27px;
    height: 27px;

    display: block;

    color: var(--color-primary, #14532D);
    stroke: currentColor;
    stroke-width: 1.8;
}


/* =========================================================
   CURRENT ICON
   ========================================================= */

.experience__item.is-current .experience__card-icon {
    background: var(--color-primary, #14532D);

    box-shadow:
        0 0 0 5px rgba(20, 83, 45, 0.08),
        0 9px 22px rgba(20, 83, 45, 0.13);
}

.experience__item.is-current .experience__card-icon svg {
    color: #FFFFFF;
    stroke: currentColor;
}


/* =========================================================
   CARD CONTENT
   ========================================================= */

.experience__card-content {
    min-width: 0;
}

.experience__card-title {
    margin: 0;

    color: var(--color-text, #18181B);

    font-family: var(--font-heading, "Sora", sans-serif);
    font-size: 1.02rem;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.experience__card-company {
    display: block;

    margin-top: 0.25rem;

    color: var(--color-primary, #14532D);

    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.3;
}

.experience__card-description {
    max-width: 650px;

    margin: 0.7rem 0 0;

    color: #60636A;

    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.65;
}


/* =========================================================
   CURRENT BADGE
   ========================================================= */

.experience__current-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;

    padding: 0.35rem 0.72rem;

    border-radius: 999px;

    background: #F0F6F1;

    color: var(--color-primary, #14532D);

    font-size: 0.62rem;
    font-weight: 600;

    white-space: nowrap;
}

.experience__current-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #22C55E;
}


/* =========================================================
   TAGS
   ========================================================= */

.experience__card-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;

    gap: 0.4rem;

    margin-top: 0.8rem;
}

.experience__tag {
    display: inline-flex;
    align-items: center;

    min-height: 25px;

    padding: 0.3rem 0.7rem;

    border: 1px solid rgba(20, 83, 45, 0.08);
    border-radius: 999px;

    background: #F7FAF7;

    color: #496050;

    font-size: 0.6rem;
    font-weight: 500;

    white-space: nowrap;
}


/* =========================================================
   MOBILE TOGGLE
   ========================================================= */

.experience__card-toggle {
    display: none;

    width: 34px;
    height: 34px;

    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid rgba(24, 24, 27, 0.07);
    border-radius: 50%;

    background: #FFFFFF;

    color: var(--color-text, #18181B);

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
}

.experience__card-toggle span {
    display: block;

    font-size: 1rem;
    line-height: 1;

    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.experience__item.is-open .experience__card-toggle span {
    transform: rotate(180deg);
}


/* =========================================================
   DECORATION
   ========================================================= */

.experience__intro::after {
    content: "";

    position: absolute;

    left: -7rem;
    bottom: -4rem;

    width: 220px;
    height: 150px;

    opacity: 0.35;

    background-image: radial-gradient(
        circle,
        rgba(20, 83, 45, 0.16) 1.2px,
        transparent 1.2px
    );

    background-size: 14px 14px;

    mask-image: linear-gradient(
        to top right,
        black,
        transparent 75%
    );

    pointer-events: none;

    z-index: -1;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .experience {
        padding: 6.5rem 0;
    }

    .experience__container {
        width: min(100% - 4rem, 950px);

        grid-template-columns:
            minmax(270px, 0.7fr)
            minmax(460px, 1.3fr);

        gap: 2.5rem;
    }

    .experience__intro {
        padding-right: 0.5rem;
    }

    .experience__heading {
        font-size: clamp(2.7rem, 5vw, 4rem);
    }

    .experience__description {
        font-size: 0.82rem;
    }

    .experience__timeline-line {
        left: 6.4rem;
    }

    .experience__item {
        grid-template-columns:
            5.2rem
            2.5rem
            minmax(0, 1fr);

        min-height: 100px;
    }

    .experience__card {
        min-height: 100px;

        padding: 0.9rem 1rem;
    }

    .experience__card-main {
        grid-template-columns:
            46px
            minmax(0, 1fr)
            auto;

        gap: 0.8rem;
    }

    .experience__card-icon {
        width: 46px;
        height: 46px;

        flex-basis: 46px;
    }

    .experience__card-icon img,
    .experience__card-icon svg {
        width: 23px;
        height: 23px;
    }

    .experience__card-title {
        font-size: 0.88rem;
    }

    .experience__card-company {
        font-size: 0.68rem;
    }

    .experience__card-description {
        font-size: 0.65rem;
    }

    .experience__year-range {
        font-size: 0.68rem;
    }

    .experience__year-status {
        font-size: 0.55rem;
    }
}


/* =========================================================
   SMALL TABLET
   ========================================================= */

@media (max-width: 800px) {

    .experience {
        padding: 5.5rem 0;
    }

    .experience__container {
        width: calc(100% - 3rem);

        grid-template-columns:
            250px
            minmax(0, 1fr);

        gap: 1.5rem;
    }

    .experience__heading {
        font-size: clamp(2.4rem, 5vw, 3.2rem);
    }

    .experience__description {
        max-width: 270px;

        font-size: 0.72rem;
    }

    .experience__timeline-line {
        left: 5.5rem;
    }

    .experience__item {
        grid-template-columns:
            4.5rem
            2.3rem
            minmax(0, 1fr);

        min-height: 85px;
    }

    .experience__card {
        min-height: 85px;

        padding: 0.8rem;
    }

    .experience__card-description,
    .experience__card-tags {
        display: none;
    }

    .experience__card-main {
        min-height: 54px;

        align-items: center;
    }

    .experience__stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 0.7rem;

        width: 100%;
        /* display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr)); */
        /* gap: 0.4rem; */
        margin-top: 1.7rem;
    }

    .experience__stat {
        min-width: 0;
        flex-direction: column;
        justify-content: center;
        gap: 0.3rem;
        padding: 0.6rem 0.2rem;
        border: 1px solid rgba(24, 24, 27, 0.055);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.65);
    }

    .experience__stat-icon {
        width: 40px;
        height: 40px;

        flex-basis: 40px;
    }

    .experience__stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .experience__stat-number {
        font-size: 0.95rem;
    }

    .experience__stat-label {
        font-size: 0.58rem;
    }

    .experience__stat-content{
        text-align: center;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .experience {
        padding: 5rem 0 4rem;
    }

    .experience__container {
        width: calc(100% - 2rem);
        display: block;
    }


    /* -----------------------------------------
       INTRO
       ----------------------------------------- */

    .experience__intro {
        display: flex;
        flex-direction: column;
        align-items: center;

        padding: 0;

        text-align: center;
    }

    .experience__eyebrow {
        margin-bottom: 0.9rem;

        font-size: 0.62rem;
    }

    .experience__eyebrow-dot {
        width: 6px;
        height: 6px;

        flex-basis: 6px;
    }

    .experience__heading {
        max-width: 340px;

        font-size: clamp(2.3rem, 9vw, 3rem);
        line-height: 1.04;
    }

    .experience__description {
        max-width: 350px;

        margin-top: 1rem;

        font-size: 0.68rem;
        line-height: 1.65;
    }

    .experience__divider {
        display: none;
    }


    /* -----------------------------------------
       STATS
       ----------------------------------------- */

    .experience__stats {
        width: 100%;

        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));

        gap: 0.4rem;

        margin-top: 1.7rem;
    }

    .experience__stat {
        min-width: 0;

        flex-direction: column;

        justify-content: center;

        gap: 0.3rem;

        padding: 0.6rem 0.2rem;

        border: 1px solid rgba(24, 24, 27, 0.055);
        border-radius: 10px;

        background: rgba(255, 255, 255, 0.65);
    }

    .experience__stat-icon {
        width: 30px;
        height: 30px;

        flex-basis: 30px;

        border-radius: 7px;
    }

    .experience__stat-icon svg {
        width: 15px;
        height: 15px;
    }

    .experience__stat-number {
        font-size: 0.8rem;
    }

    .experience__stat-label {
        width: 100%;

        font-size: 0.43rem;
        line-height: 1.2;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


    /* -----------------------------------------
       RESUME
       ----------------------------------------- */

    .experience__resume {
        margin-top: 1.4rem;

        font-size: 0.64rem;
    }


    /* -----------------------------------------
       TIMELINE
       ----------------------------------------- */

    .experience__timeline {
        margin-top: 2.4rem;

        padding: 0;
    }

    .experience__timeline-line {
        top: 1.2rem;
        bottom: 1.2rem;

        left: 9px;
    }

    .experience__item {
        display: grid;

        grid-template-columns:
            20px
            minmax(0, 1fr);

        align-items: start;

        min-height: 0;

        margin-bottom: 0.75rem;
    }


    /* -----------------------------------------
       HIDE DESKTOP YEAR COLUMN
       ----------------------------------------- */

    .experience__item > .experience__year {
        display: none;
    }


    /* -----------------------------------------
       TIMELINE DOT
       ----------------------------------------- */

    .experience__timeline-dot {
        width: 20px;
        min-height: 84px;

        align-items: flex-start;
        justify-content: center;

        padding-top: 1.15rem;
    }

    .experience__timeline-dot span {
        width: 8px;
        height: 8px;

        border-width: 1.5px;
    }

    .experience__item.is-current .experience__timeline-dot span {
        width: 10px;
        height: 10px;

        box-shadow:
            0 0 0 4px rgba(20, 83, 45, 0.08);
    }


    /* -----------------------------------------
       MOBILE CARD
       ----------------------------------------- */

    .experience__card {
        min-height: 84px;

        padding: 0.85rem 0.85rem;

        border-radius: 13px;

        cursor: default;
    }

    .experience__card:hover {
        transform: none;

        box-shadow:
            0 5px 20px rgba(24, 24, 27, 0.035);
    }


    /* -----------------------------------------
       CARD MAIN
       ----------------------------------------- */

    .experience__card-main {
        display: grid;

        grid-template-columns:
            40px
            minmax(0, 1fr)
            34px;

        gap: 0.7rem;

        align-items: center;
    }


    /* -----------------------------------------
       ICON
       ----------------------------------------- */

    .experience__card-icon {
        width: 40px;
        height: 40px;

        flex-basis: 40px;

        border-radius: 9px;
    }

    .experience__card-icon svg {
        width: 19px;
        height: 19px;
    }

    .experience__item.is-current .experience__card-icon {
        background: var(--color-primary, #14532D);

        box-shadow:
            0 0 0 4px rgba(20, 83, 45, 0.08),
            0 7px 18px rgba(20, 83, 45, 0.12);
    }

    .experience__item.is-current .experience__card-icon svg {
        color: #FFFFFF;
    }


    /* -----------------------------------------
       CONTENT
       ----------------------------------------- */

    .experience__card-content {
        min-width: 0;

        padding-right: 0.25rem;
    }

    .experience__card-title {
        font-size: 0.74rem;

        line-height: 1.35;
    }

    .experience__card-company {
        margin-top: 0.16rem;

        font-size: 0.54rem;
    }


    /* -----------------------------------------
       MOBILE YEAR
       -----------------------------------------

       IMPORTANT:
       The original PHP year remains outside the card.
       We visually position it over the card on mobile.
    */

    .experience__item > .experience__year {
        display: flex;

        position: absolute;

        top: 0.82rem;
        right: 0.8rem;

        z-index: 5;

        flex-direction: column;
        align-items: flex-end;

        padding: 0;

        text-align: right;

        pointer-events: none;
    }

    .experience__item > .experience__year .experience__year-range {
        font-size: 0.52rem;

        line-height: 1.2;
    }

    .experience__item > .experience__year .experience__year-status {
        margin-top: 0.18rem;

        font-size: 0.42rem;

        line-height: 1.2;
    }


    /* Current year */

    .experience__item.is-current > .experience__year .experience__year-range {
        color: var(--color-primary, #14532D);
    }

    .experience__item.is-current > .experience__year .experience__year-status {
        color: var(--color-primary, #14532D);
        font-weight: 600;
    }


    /* -----------------------------------------
       DESCRIPTION
       ----------------------------------------- */

    .experience__card-description {
        display: none;

        margin-top: 0.8rem;

        padding-top: 0.75rem;

        border-top: 1px solid rgba(24, 24, 27, 0.06);

        font-size: 0.59rem;
        line-height: 1.65;
    }

    .experience__item.is-open .experience__card-description {
        display: block;
    }


    /* -----------------------------------------
       TAGS
       ----------------------------------------- */

    .experience__card-tags {
        display: none;

        justify-content: flex-start;

        margin-top: 0.7rem;
    }

    .experience__item.is-open .experience__card-tags {
        display: flex;
    }

    .experience__tag {
        min-height: 20px;

        padding: 0.25rem 0.55rem;

        font-size: 0.43rem;
    }


    /* -----------------------------------------
       CURRENT BADGE
       ----------------------------------------- */

    .experience__current-badge {
        display: none;
    }


    /* -----------------------------------------
       RIGHT SIDE ARROW
       ----------------------------------------- */

    .experience__card-toggle {
        display: flex;

        width: 32px;
        height: 32px;

        margin-left: auto;

        flex-shrink: 0;

        border: 1px solid rgba(24, 24, 27, 0.07);
        border-radius: 50%;

        background: #FFFFFF;

        color: var(--color-text, #18181B);

        cursor: pointer;

        z-index: 6;
    }

    .experience__card-toggle span {
        font-size: 1rem;

        margin-bottom: .5rem;
        line-height: 1;

        transform: rotate(0deg);
    }

    .experience__item.is-open .experience__card-toggle span {
        transform: rotate(180deg);
        margin-top: 1.2rem;
    }


    /* -----------------------------------------
       OPEN CARD
       ----------------------------------------- */

    .experience__item.is-open .experience__card {
        border-color: rgba(20, 83, 45, 0.12);

        background: #FFFFFF;

        box-shadow:
            0 8px 26px rgba(24, 24, 27, 0.045);
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .experience__container {
        width: calc(100% - 1.5rem);
    }

    .experience__heading {
        font-size: 2.15rem;
    }

    .experience__stats {
        gap: 0.2rem;
    }

    .experience__stat {
        padding: 0.5rem 0.1rem;
    }

    .experience__stat-label {
        font-size: 0.37rem;
    }

    .experience__card {
        padding: 0.72rem;
    }

    .experience__card-main {
        grid-template-columns:
            36px
            minmax(0, 1fr)
            30px;

        gap: 0.55rem;
    }

    .experience__card-icon {
        width: 36px;
        height: 36px;

        flex-basis: 36px;
    }

    .experience__card-icon svg {
        width: 17px;
        height: 17px;
    }

    .experience__card-title {
        font-size: 0.68rem;
    }

    .experience__card-company {
        font-size: 0.49rem;
    }

    .experience__item > .experience__year {
        right: .45rem;
        top: 0.72rem;
    }

    .experience__item > .experience__year .experience__year-range {
        font-size: 0.48rem;
    }

    .experience__item > .experience__year .experience__year-status {
        font-size: 0.39rem;
    }

    .experience__card-toggle {
        width: 29px;
        height: 29px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .experience__card,
    .experience__resume,
    .experience__resume-arrow,
    .experience__card-toggle span,
    .experience__card-icon {
        transition: none;
    }
}