/* =========================================================
   General Layout
   ========================================================= */

/* Main wrapper
   Prevents horizontal scroll from long lines */
.intro-wrapper {
    display: flex;
    width: 100%;
    overflow-x: hidden;
}

/* =========================================================
   Profile Section Styling
   ========================================================= */

.profile-section {
    background-color: var(--photo-bg);
    width: 35vw;
    min-width: 320px;
    max-width: 500px;
    height: 90vh;
    overflow: hidden;
    position: relative;
    max-height: 800px;
}

.profile-section>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    position: absolute;
    bottom: 0;
    left: 0;
    filter: grayscale(100%);
}

/* =========================================================
   Heading Section Styling
   ========================================================= */

.heading-section {
    width: calc(100% - 700px);
    display: flex;
    flex-direction: column;
    margin: 50px auto;
}

.resume-btn-container {
    width: fit-content;
}

/* =========================================================
   Name Title Styling
   ========================================================= */

/* Name title alignment
   Shifted right by 15px for visual balance */
.name-title {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 30px;
    left: 15px;
}

/* Decorative line
   Extends to end of screen (200vw) */
.name-title::after {
    content: '';
    position: absolute;
    height: 1px;
    width: 200vw;
    background-color: var(--white-color);
    left: 260px;
    top: 105px;
}

.name-title>span {
    font-size: 80px;
    font-weight: 800;
}

.first-name {
    position: relative;
    bottom: -45px;
    left: -100px;
}

/* =========================================================
   Intro Brief Styling
   ========================================================= */

.intro-brief {
    margin-bottom: 50px;
    font-size: 12px;
}

/* =========================================================
   Responsive Adjustments
   ========================================================= */

@media (max-width: 860px) {

    .profile-section {
        width: 45%;
    }

    .profile-section>img {
        object-position: center;
    }

    .name-title::after {
        content: initial;
    }

    .first-name {
        left: -10px
    }

    .heading-section {
        width: 50%;
    }
}

@media (max-width: 768px) {

    /* Prevent horizontal overflow on mobile */
    .main-container {
        padding: 0;
        margin: 0;
        overflow-x: hidden;
    }

    .intro-wrapper {
        flex-direction: column;
        justify-content: flex-start;
        height: fit-content !important;
        min-height: 0 !important;
    }

    .resume-btn-container {
        width: auto;
        display: block;
        margin-top: 10px;
    }

    .profile-section {
        width: 100%;
        max-width: none;
        height: 35vh;
        min-height: 250px;
        overflow: hidden;
        margin-bottom: 20px;
        background-color: var(--photo-bg);
    }

    .profile-section>img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: bottom center;
        position: absolute;
        bottom: 0;
        left: 0;
        transform: none;
        margin: 0;
    }

    .heading-section {
        width: 100%;
        margin: 0;
        padding: 0 20px 40px 20px;
        box-sizing: border-box;
        text-align: center;
        align-items: center;
    }

    /* Flexible text alignment */
    .name-title {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0 auto 20px auto;
        flex-wrap: wrap;
    }

    /* Font scaling */
    .name-title>span {
        font-size: calc(var(--mobile-font-h1) * 1.5);
        margin: 0 5px;
        line-height: 1.2;
    }

    .first-name {
        position: static;
        left: auto;
        bottom: auto;
    }

    .name-title::after {
        content: none;
    }

    .intro-brief {
        text-align: center;
        margin: 0 auto 30px auto;
        width: 100%;
        line-height: 1.6;
    }

    .heading-section>a {
        text-align: center;
        width: auto;
        margin: 0 auto;
        display: block;
    }

    .heading-section>a>button {
        margin-top: 10px;
    }
}