/* =========================================================
   AMD DIGITAL STUDIO
   PROFESSIONAL CV BUILDER
   CV.CSS
========================================================= */


/* =========================================================
   01. RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    background:
        linear-gradient(
            135deg,
            #f8faff 0%,
            #eef4ff 50%,
            #f8f7ff 100%
        );

    color: #172033;

    min-height: 100vh;

    line-height: 1.6;
}


/* =========================================================
   02. HEADER
========================================================= */

.cv-header {
    width: 100%;

    background: rgba(255, 255, 255, 0.88);

    border-bottom: 1px solid rgba(30, 60, 120, 0.08);

    backdrop-filter: blur(18px);

    position: sticky;

    top: 0;

    z-index: 1000;
}


.cv-header-inner {
    max-width: 1450px;

    margin: auto;

    padding: 18px 30px;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


.cv-logo {
    text-decoration: none;

    font-size: 1.35rem;

    font-weight: 800;

    letter-spacing: -0.5px;

    background:
        linear-gradient(
            90deg,
            #246bfe,
            #7b4dff
        );

    -webkit-background-clip: text;

    background-clip: text;

    color: transparent;
}


.back-home {
    text-decoration: none;

    color: #475569;

    font-size: 0.92rem;

    font-weight: 600;

    transition: 0.3s ease;
}


.back-home:hover {
    color: #246bfe;

    transform: translateX(-3px);
}


/* =========================================================
   03. INTRO
========================================================= */

.cv-builder {
    width: 100%;

    padding: 55px 25px 80px;
}


.cv-intro {
    max-width: 900px;

    margin: 0 auto 45px;

    text-align: center;
}


.intro-badge {
    display: inline-flex;

    align-items: center;

    padding: 7px 15px;

    border-radius: 50px;

    background: rgba(36, 107, 254, 0.08);

    border: 1px solid rgba(36, 107, 254, 0.14);

    color: #246bfe;

    font-size: 0.78rem;

    font-weight: 800;

    letter-spacing: 1.2px;

    margin-bottom: 15px;
}


.cv-intro h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);

    line-height: 1.1;

    letter-spacing: -1.5px;

    color: #101828;

    margin-bottom: 15px;
}


.cv-intro p {
    max-width: 680px;

    margin: auto;

    color: #64748b;

    font-size: 1.02rem;
}


/* =========================================================
   04. BUILDER CONTAINER
========================================================= */

.builder-container {
    max-width: 1450px;

    margin: auto;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(450px, 600px);

    gap: 30px;

    align-items: start;
}


/* =========================================================
   05. FORM SECTION
========================================================= */

.cv-form-section {
    min-width: 0;
}


.form-card {
    background: rgba(255, 255, 255, 0.94);

    border: 1px solid rgba(30, 60, 120, 0.08);

    border-radius: 20px;

    padding: 27px;

    margin-bottom: 22px;

    box-shadow:
        0 10px 35px rgba(25, 50, 100, 0.06);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.form-card:hover {
    box-shadow:
        0 16px 45px rgba(25, 50, 100, 0.09);
}


/* =========================================================
   06. FORM CARD TITLE
========================================================= */

.form-card-title {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 25px;
}


.step-number {
    width: 42px;

    height: 42px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #246bfe,
            #7048ff
        );

    color: white;

    font-size: 0.85rem;

    font-weight: 800;

    box-shadow:
        0 8px 18px rgba(36, 107, 254, 0.2);
}


.form-card-title h2 {
    color: #172033;

    font-size: 1.15rem;

    line-height: 1.2;

    margin-bottom: 3px;
}


.form-card-title p {
    color: #8a96a8;

    font-size: 0.82rem;
}


/* =========================================================
   07. FORM GRID
========================================================= */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.form-group {
    display: flex;

    flex-direction: column;

    gap: 7px;
}


.form-group label {
    color: #344054;

    font-size: 0.86rem;

    font-weight: 700;
}


.form-group input,
.form-group textarea {
    width: 100%;

    border: 1px solid #dbe2ec;

    background: #fbfcff;

    color: #172033;

    border-radius: 12px;

    padding: 13px 14px;

    font-family: inherit;

    font-size: 0.91rem;

    outline: none;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}


.form-group textarea {
    resize: vertical;

    min-height: 105px;
}


.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a6afbd;
}


.form-group input:focus,
.form-group textarea:focus {
    border-color: #246bfe;

    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(36, 107, 254, 0.09);
}


.form-group small {
    color: #8a96a8;

    font-size: 0.75rem;
}


/* =========================================================
   08. PHOTO UPLOAD
========================================================= */

.photo-upload {
    margin-top: 20px;
}


.photo-upload > label {
    display: block;

    margin-bottom: 8px;

    color: #344054;

    font-size: 0.86rem;

    font-weight: 700;
}


.photo-upload-box {
    min-height: 90px;

    border: 1.5px dashed #cbd5e1;

    border-radius: 14px;

    background: #fafcff;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 8px;

    position: relative;

    overflow: hidden;

    transition: 0.25s ease;
}


.photo-upload-box:hover {
    border-color: #246bfe;

    background: #f5f8ff;
}


.photo-upload-box input {
    position: absolute;

    inset: 0;

    opacity: 0;

    cursor: pointer;

    width: 100%;

    height: 100%;
}


.photo-upload-box span {
    color: #718096;

    font-size: 0.82rem;

    pointer-events: none;
}


/* =========================================================
   09. DYNAMIC ITEMS
========================================================= */

.dynamic-item {
    background: #f8faff;

    border: 1px solid #e4eaf2;

    border-radius: 15px;

    padding: 18px;

    margin-bottom: 14px;
}


.dynamic-item:last-child {
    margin-bottom: 0;
}


/* =========================================================
   10. ADD BUTTON
========================================================= */

.add-btn {
    margin-top: 17px;

    border: 1px solid #cbd9f5;

    background: #f4f7ff;

    color: #246bfe;

    padding: 10px 16px;

    border-radius: 10px;

    font-family: inherit;

    font-size: 0.84rem;

    font-weight: 700;

    cursor: pointer;

    transition: 0.25s ease;
}


.add-btn:hover {
    background: #246bfe;

    color: white;

    border-color: #246bfe;

    transform: translateY(-2px);
}


/* =========================================================
   11. GENERATE BUTTON
========================================================= */

.generate-area {
    margin-top: 5px;

    margin-bottom: 20px;
}


.generate-btn {
    width: 100%;

    border: none;

    border-radius: 15px;

    padding: 17px 22px;

    background:
        linear-gradient(
            135deg,
            #246bfe,
            #6b46ff
        );

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 14px;

    font-family: inherit;

    font-size: 1rem;

    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 12px 28px rgba(36, 107, 254, 0.22);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}


.generate-btn:hover {
    transform: translateY(-3px);

    box-shadow:
        0 17px 35px rgba(36, 107, 254, 0.3);

    filter: brightness(1.05);
}


.generate-btn:active {
    transform: translateY(0) scale(0.99);
}


.generate-arrow {
    font-size: 1.25rem;

    transition: 0.25s ease;
}


.generate-btn:hover .generate-arrow {
    transform: translateX(5px);
}


/* =========================================================
   12. PREVIEW SECTION
========================================================= */

.cv-preview-section {
    position: sticky;

    top: 92px;

    min-width: 0;
}


.preview-header {
    background: rgba(255, 255, 255, 0.94);

    border: 1px solid rgba(30, 60, 120, 0.08);

    border-radius: 18px 18px 0 0;

    padding: 17px 20px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    box-shadow:
        0 7px 25px rgba(25, 50, 100, 0.05);
}


.preview-header > div span {
    color: #246bfe;

    font-size: 0.68rem;

    font-weight: 800;

    letter-spacing: 1.2px;
}


.preview-header h2 {
    color: #172033;

    font-size: 1.05rem;

    margin-top: 2px;
}


.preview-status {
    color: #16a34a;

    font-size: 0.75rem;

    font-weight: 700;
}


/* =========================================================
   13. CV DOCUMENT
========================================================= */

.cv-document {
    width: 100%;

    background: white;

    min-height: 850px;

    box-shadow:
        0 15px 50px rgba(20, 40, 80, 0.12);

    overflow: hidden;
}


/* =========================================================
   14. CV DOCUMENT HEADER
========================================================= */

.cv-document-header {
    padding: 42px 38px 30px;

    display: flex;

    align-items: center;

    gap: 25px;

    background:
        linear-gradient(
            135deg,
            #f7faff,
            #ffffff
        );

    border-bottom: 3px solid #246bfe;
}


.cv-profile-photo {
    width: 105px;

    height: 105px;

    flex-shrink: 0;

    border-radius: 50%;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #eaf1ff,
            #f3efff
        );

    display: flex;

    align-items: center;

    justify-content: center;
}


.cv-profile-photo img {
    width: 100%;

    height: 100%;

    object-fit: cover;

    display: none;
}


.cv-name-area {
    min-width: 0;
}


.cv-name-area h1 {
    color: #111827;

    font-size: 2rem;

    line-height: 1.1;

    font-weight: 800;

    letter-spacing: -0.8px;

    overflow-wrap: anywhere;
}


.cv-name-area h2 {
    color: #246bfe;

    font-size: 1rem;

    margin-top: 7px;

    font-weight: 700;

    overflow-wrap: anywhere;
}


.cv-contact {
    display: flex;

    flex-wrap: wrap;

    gap: 7px 15px;

    margin-top: 12px;
}


.cv-contact span {
    color: #64748b;

    font-size: 0.68rem;

    overflow-wrap: anywhere;
}


/* =========================================================
   15. CV BODY
========================================================= */

.cv-document-body {
    padding: 30px 38px 45px;
}


.cv-section {
    margin-bottom: 25px;
}


.cv-section:last-child {
    margin-bottom: 0;
}


.cv-section h3 {
    color: #246bfe;

    font-size: 0.77rem;

    font-weight: 800;

    letter-spacing: 1.4px;

    padding-bottom: 7px;

    margin-bottom: 11px;

    border-bottom: 1px solid #dce5f2;
}


.cv-section p {
    color: #4b5563;

    font-size: 0.77rem;

    line-height: 1.7;

    white-space: pre-line;

    overflow-wrap: anywhere;
}


/* =========================================================
   16. EXPERIENCE / EDUCATION / PROJECTS
========================================================= */

.preview-item {
    margin-bottom: 15px;
}


.preview-item:last-child {
    margin-bottom: 0;
}


.preview-item-title {
    color: #172033;

    font-size: 0.86rem;

    font-weight: 800;
}


.preview-item-subtitle {
    color: #246bfe;

    font-size: 0.73rem;

    font-weight: 700;

    margin-top: 2px;
}


.preview-item-date {
    color: #8a96a8;

    font-size: 0.68rem;

    margin-top: 2px;
}


.preview-item-description {
    color: #5d6878;

    font-size: 0.72rem;

    line-height: 1.6;

    margin-top: 5px;

    white-space: pre-line;
}


.empty-preview {
    color: #a0aaba !important;

    font-style: italic;
}


/* =========================================================
   17. SKILLS
========================================================= */

.skills-list {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}


.skills-list span {
    display: inline-block;

    padding: 5px 10px;

    border-radius: 6px;

    background: #eef4ff;

    color: #246bfe;

    font-size: 0.68rem;

    font-weight: 700;
}


/* =========================================================
   18. DOWNLOAD AREA
========================================================= */

.download-area {
    background: rgba(255, 255, 255, 0.94);

    border: 1px solid rgba(30, 60, 120, 0.08);

    border-top: none;

    padding: 17px;

    border-radius: 0 0 18px 18px;
}


.download-btn {
    width: 100%;

    border: none;

    border-radius: 12px;

    padding: 14px 18px;

    background: #172033;

    color: white;

    font-family: inherit;

    font-size: 0.9rem;

    font-weight: 800;

    cursor: pointer;

    transition: 0.25s ease;
}


.download-btn:hover {
    background: #246bfe;

    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(36, 107, 254, 0.2);
}


/* =========================================================
   19. FOOTER
========================================================= */

.cv-footer {
    text-align: center;

    padding: 25px;

    color: #8a96a8;

    font-size: 0.78rem;
}


/* =========================================================
   20. SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width: 8px;
}


::-webkit-scrollbar-track {
    background: #f1f5f9;
}


::-webkit-scrollbar-thumb {
    background: #c5d1e3;

    border-radius: 20px;
}


::-webkit-scrollbar-thumb:hover {
    background: #246bfe;
}


/* =========================================================
   21. TABLET
========================================================= */

@media (max-width: 1100px) {

    .builder-container {
        grid-template-columns: 1fr;
    }


    .cv-preview-section {
        position: relative;

        top: auto;

        max-width: 760px;

        width: 100%;

        margin: 0 auto;
    }

}


/* =========================================================
   22. MOBILE
========================================================= */

@media (max-width: 700px) {

    .cv-builder {
        padding:
            35px
            14px
            55px;
    }


    .cv-header-inner {
        padding: 15px 17px;
    }


    .cv-logo {
        font-size: 1.05rem;
    }


    .back-home {
        font-size: 0.78rem;
    }


    .cv-intro {
        margin-bottom: 30px;
    }


    .cv-intro h1 {
        font-size: 2rem;

        letter-spacing: -0.8px;
    }


    .cv-intro p {
        font-size: 0.88rem;
    }


    .form-card {
        padding: 20px;

        border-radius: 17px;
    }


    .form-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }


    .form-card-title {
        align-items: flex-start;
    }


    .step-number {
        width: 38px;

        height: 38px;

        border-radius: 11px;
    }


    .cv-document-header {
        padding: 30px 23px 24px;

        gap: 17px;

        align-items: flex-start;
    }


    .cv-profile-photo {
        width: 75px;

        height: 75px;
    }


    .cv-name-area h1 {
        font-size: 1.4rem;
    }


    .cv-name-area h2 {
        font-size: 0.82rem;
    }


    .cv-contact {
        flex-direction: column;

        gap: 2px;

        margin-top: 9px;
    }


    .cv-document-body {
        padding:
            24px
            23px
            35px;
    }


    .cv-section {
        margin-bottom: 21px;
    }


    .generate-btn {
        padding: 15px;

        font-size: 0.9rem;
    }

}


/* =========================================================
   23. SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .cv-header-inner {
        flex-direction: column;

        gap: 7px;

        align-items: flex-start;
    }


    .cv-intro h1 {
        font-size: 1.7rem;
    }


    .form-card {
        padding: 16px;
    }


    .cv-document-header {
        flex-direction: column;

        align-items: flex-start;
    }


    .cv-name-area h1 {
        font-size: 1.55rem;
    }


    .cv-document-body {
        padding:
            22px
            18px
            30px;
    }

}


/* =========================================================
   24. PDF MODE
========================================================= */

.pdf-mode {
    box-shadow: none !important;

    width: 794px !important;

    min-height: 1123px !important;

    margin: 0 !important;
}


/* =========================================================
   25. PRINT
========================================================= */

@media print {

    body {
        background: white;
    }


    .cv-header,
    .cv-intro,
    .cv-form-section,
    .preview-header,
    .download-area,
    .cv-footer {
        display: none !important;
    }


    .builder-container {
        display: block;

        max-width: none;
    }


    .cv-preview-section {
        position: static;

        width: 100%;
    }


    .cv-document {
        box-shadow: none;

        width: 100%;
    }

}
