/* --------------------------------------------------
    CV HEADER
-------------------------------------------------- */

#cv-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

#cv-header img {
    width: 50%;
    max-width: 100px;
    object-fit: cover;
    border-radius: 30px;
    aspect-ratio: 1 / 1;
}

.cv-header-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    flex: 1;
}

.cv-header-right h2 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin-top: 1rem;
}

.download-btn {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-muted);
    text-decoration: none;

    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.download-btn:hover {
    color: var(--text-main);
    cursor: pointer;
}


/* --------------------------------------------------
    CV BODY
-------------------------------------------------- */

#cv-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 5rem;
    width: 100%;
}

/* ---------- Left Section ---------- */

#cv-body-left {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 375px;
}

.cv-body-left-segment {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cv-body-left-segment h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Coustard', serif;
}

.cv-body-left-segment p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0.25rem 0;
}

/* default spans (like "Playing Age:", etc.) */
.cv-body-left-segment p span:not(.edu-title):not(.edu-detail) {
    display: inline-block;
    color: var(--text-main);
    margin-right: 0.5rem;
}

.edu-title {
    display: block;
    color: var(--text-main);
}

.edu-detail {
    display: block;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---------- Right Section ---------- */

#cv-body-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cv-body-right-segment {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cv-body-right-segment-title {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.cv-body-right-segment-title h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Coustard', serif;

    margin-bottom: 0.5rem;
}

.cv-body-right-segment-title span {
    flex: 1;
    height: 5px;
    background-color: var(--text-main);
    margin-left: 1rem;
}

.column-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;

    white-space: nowrap;
}

.column-container .column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.column-container .column p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.cv-body-right-segment ul {
    padding-left: 1.5rem;
    margin: 0;
}

.cv-body-right-segment ul li {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

/* ---------------- DROPDOWN (MOBILE) ---------------- */

.dropdown-arrow {
    display: none;
    width: 10px;
    height: 10px;

    border-right: 2px solid white;
    border-bottom: 2px solid white;

    transform: rotate(45deg);
    margin-left: auto;

    transition: transform 0.3s ease;
}

.cv-dropdown-content {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}


/* --------------------------------------------------
    RESPONSIVE DESIGN
-------------------------------------------------- */

@media (max-width: 768px) {

    #cv-body {
        flex-direction: column;
        gap: 2.5rem;
    }

    #cv-body-left {
        max-width: 100%;
    }

    #cv-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    #cv-header img {
        width: 120px;
        max-width: none;
        aspect-ratio: 1 / 1;
    }

    .cv-header-right h2 {
        font-size: 2.2rem;
    }

    .column-container {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        row-gap: 0.75rem;
        column-gap: 1rem;
        align-items: start;

        white-space: nowrap;

        width: 100%;
        max-width: 100%;
    }

    .column-container>* {
        min-width: 0;
    }

    .column-container p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .column-container .column {
        gap: 0.25rem;
    }

    .page-section {
        padding: 0 1rem;
    }

    #cv-body-right {
        gap: 2.5rem;
    }

    .cv-body-left-segment {
        gap: 0.4rem;
    }

    .cv-body-right-segment {
        gap: 0.75rem;
    }

    .cv-body-right-segment-title span {
        display: none;
    }

    .cv-body-left-segment p,
    .column-container .column p {
        font-size: 0.9rem;
    }

    .cv-body-left-segment,
    .cv-body-right-segment {
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Dropdown styles */
    .dropdown-arrow {
        display: block;
    }

    .cv-body-right-segment {
        cursor: pointer;
    }

    .cv-dropdown-content {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }

    .cv-body-right-segment.active .cv-dropdown-content {
        max-height: 500px;
        /* big enough for content */
        opacity: 1;
    }

    .cv-body-right-segment.active .dropdown-arrow {
        transform: rotate(225deg);
        /* points up */
    }
}