/* modal overlay: center content and dim background */
.modal {
    /* previously display: none */
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(.85, 0, .25, 1);
}

/* visible state */
.modal.open {
    opacity: 1;
    pointer-events: auto;
}

/* keep content scrollable but hide scrollbar visuals (unchanged) */
.aboutMe-content {
    width: min(1100px, 75%);
    background: rgba(0,0,0,0.5);
    border: 1px solid rgb(255, 255, 255);
    border-radius: 12px;
    padding: 2.25rem;
    box-sizing: border-box;
    color: #FFFFFF;
    position: relative;
    box-shadow: 0 18px 50px rgba(0,0,0,0.6), 0 6px 18px rgba(0,0,0,0.45);
    line-height: 1.4;
    max-height: calc(100vh - 8rem);}

/* animate content with transform + opacity (open class on modal drives this) */
.aboutMe-content {
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(.85, 0, .25, 1), opacity 0.5s ease;
}
/* when overlay has .open, show content */
.modal.open .aboutMe-content {
    transform: translateY(0);
    opacity: 1;
}

/* header layout: picture left, info right */
.about-header {
    display: flex;
    gap: 1rem;
    align-items: stretch;         /* allow image to stretch to same height as text block */
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* profile pic sizing and spacing */
.profilePic {
    aspect-ratio: 1 / 1;
    width: auto;
    height: 100%;                 /* stretch to header height */
    max-height: 150px;            /* safety cap so it doesn't get huge on very large screens */
    object-fit: cover;          /* avoid cropping */
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.04);
    background: rgba(0,0,0,0.04);
    flex: 0 0 auto;
    align-self: stretch;
}

.about-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start; 
    text-align: left;
    padding: 0.25rem 0;
    flex: 1;    
    line-height: 1.5;           
}

/* big centered name */
.about-info h3 {
    margin: 0;
    padding: 0;
    font-size: 3rem;            /* increase to make name prominent */
    font-weight: 800;
    text-align : left;
}

/* education directly underneath */
.about-info h4,
.about-info .education {
    font-family: 'Montserrat', sans-serif;
    margin: 0.25rem 0 0 0;
    font-size: 1.25rem;
    font-weight: 600;
    text-align : left;
    color: rgba(255,255,255,0.9);
}

/* body paragraph / details take full width under header */
.about-body {
    font-family: 'Montserrat', sans-serif;
    margin-top: 1rem;
    width: 100%;
    box-sizing: border-box;

    /* add horizontal breathing room for paragraph content */
    padding-inline: 2rem;        /* increase left/right margin for paragraph content */
    padding-block-end: 0.5rem;
}

/* close button (kept visual style) */
.aboutMeclose {
    position: absolute;
    right: 1rem;
    top: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(80,160,255,0.12), rgba(40,110,255,0.16));
    border: 1px solid rgba(80,140,255,0.28);
    color: #EAF7FF;
    border-radius: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(40,110,255,0.10), 0 2px 6px rgba(0,0,0,0.35);
    transition:
        transform .20s cubic-bezier(.2,.9,.25,1),
        box-shadow .20s ease,
        background .20s ease,
        color .12s ease;
    line-height: 1;
}

.aboutMeclose:hover,
.aboutMeclose:focus {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(40,110,255,0.18), 0 6px 18px rgba(0,0,0,0.45);
    background: linear-gradient(135deg, rgba(80,160,255,0.18), rgba(30,95,255,0.26));
    outline: none;
}

/* responsive adjustments */
@media (max-width: 700px) {
    .about-header {
        flex-direction: column;
        align-items: center;
    }
    .profilePic {
        width: 120px;
        height: auto;              /* don't force full stretch on small screens */
        max-height: none;
    }
    .about-info h3 { font-size: 1.6rem; }
    .about-info h4, .about-info .education { font-size: 0.95rem; }
}