/* Wrapper and Profile Section Base */
.wrapper {
    /* Ensure wrapper doesn't clip the overlapping image if it has overflow: hidden */
    background-color: #fff; /* Original background */
    position: relative; /* Needed for z-index context if hero has complex content */
    z-index: 1;
}

.profile-content.section {
    /* Reduce top padding significantly as image positioning creates space */
    padding: 20px 0 40px 0;
    /* Remove negative margin-top, image will handle the overlap */
    position: relative; /* Crucial for child z-index and positioning context */
    background-color: #fff; /* Ensure background for content area */
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    /* Add margin to push it away from viewport edges on small screens if needed */
    margin-left: 10px;
    margin-right: 10px;
}
@media (min-width: 576px) {
    .profile-content.section {
         margin-left: auto; /* Center container on larger screens */
         margin-right: auto;
    }
}


/* Profile Card - Main container for image and info */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Profile Image Styling - Key changes for overlap */
.profile-image-wrapper {
     width: 100%; /* Allow wrapper to span width for centering */
     position: relative; /* Context for image's negative margin */
}

.circle-image {
    width: 150px; /* Default size */
    height: 150px; /* Default size */
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background-color: #eee;

    /* --- Overlap Logic --- */
    position: relative; /* Keep it relative to its wrapper */
    z-index: 2; /* Ensure image is above profile content background and hero background */
    margin-top: -75px; /* Pull image up by half its height (150px / 2) */
}

/* Profile Info Container - Needs top padding */
.profile-info {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
    padding-top: 45px;
}

/* Name and Metier Styling */
.profile-info .title {
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    font-size: 1.8em;
    line-height: 1.3em;
    font-weight: bold;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
}

.profile-info .title small {
    display: block;
    -webkit-font-smoothing: antialiased;
    font-size: 0.6em;
    font-weight: normal;
    color: #9a9a9a;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* Website Link */
.profile-info .website-link {
    display: block;
    margin-bottom: 20px;
    color: #1a73e8;
    word-break: break-all;
}
.profile-info .website-link:hover {
    text-decoration: underline;
}

/* Bio Styling */
.profile-info .bio {
    font-size: 2rem;
    font-weight: 400;
    color: #555;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 25px;
}

/* Settings Button Div */
.profile-info .settings-link-wrapper {
    margin-bottom: 25px;
}
.profile-info .settings-link-wrapper .btn {
     padding: 10px 20px;
}

/* Social Links Wrapper */
.profile-info .social-links-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px 20px;
    margin-top: 20px;
}

/* Individual Social Links */
.profile-info .social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    color: #333;
    transition: color 0.2s ease;
}
.profile-info .social-link i {
    font-size: 20px;
    transition: transform 0.2s ease;
}
.profile-info .social-link:hover {
     color: #000;
}
.profile-info .social-link:hover i {
    transform: scale(1.1);
}

/* --- Responsive Adjustments for Overlap --- */
@media (max-width: 767px) {
    .profile-content.section {
        padding-top: 15px; /* Adjust base padding */
    }
    .circle-image {
        width: 120px;
        height: 120px;
        margin-top: -60px; /* Adjust overlap: 120px / 2 */
    }
    .profile-info {
        /* Adjust padding: 60px (half image) + 25px (gap) = 85px */
        padding-top: 85px;
    }
    .profile-info .title {
        font-size: 1.6em;
    }
     .profile-info .bio {
         font-size: 0.95rem;
     }
}

@media (max-width: 575px) {
    .profile-content.section {
        padding-top: 10px; /* Adjust base padding */
         margin-left: 5px; /* Adjust edge margin */
         margin-right: 5px;
    }
    .circle-image {
        width: 100px;
        height: 100px;
        margin-top: -50px; /* Adjust overlap: 100px / 2 */
    }
    .profile-info {
        /* Adjust padding: 50px (half image) + 20px (gap) = 70px */
        padding-top: 70px;
    }
    .profile-info .title {
        font-size: 1.4em;
        margin-bottom: 10px;
    }
     .profile-info .bio {
         font-size: 0.9rem;
     }
     .profile-info .social-links-wrapper {
        gap: 10px 15px;
     }
     .profile-info .social-link {
         font-size: 0.85rem;
     }
     .profile-info .social-link i {
         font-size: 18px;
     }
}
