/* Box-sizing */
html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}

/* Body & layout */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* fill screen */
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    font-size: 17px;
    color: #333;
    background-color: #f9f9f9;
}

main {
    flex: 1; /* grow main to push footer down */
}

/* Header */
header {
    background-color: RGB(0,127,162);
    color: #fff;
    text-align: center;
    padding: 30px 20px;
}

header h1 {
    margin: 0;
    font-size: 2.2em;
}

header p {
    margin-top: 5px;
    font-size: 1em;
}

/* Intro Section */
.intro {
    display: flex;
    justify-content: center;
    padding: 40px 20px 20px 20px;
}

.intro-content {
    display: flex;
    flex-wrap: wrap;
    max-width: 1000px;
    gap: 40px;
    align-items: center;
}

.photo {
    width: 300px;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text {
    flex: 1;
    min-width: 280px;
}

.text p {
    font-size: 1em;
}

.text a {
    color: RGB(0,127,162);
    text-decoration: none;
}

.text a:hover {
    text-decoration: underline;
}

/* About Me */
.about-me-header {
    text-align: center;
    margin-top: 25px;
}

.about-me-header h1 {
    color: RGB(0,127,162);
    font-size: 1.4em;
}

.info-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 20px 0 60px 0;
}

.info-box, .info-box-special {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    padding: 25px 30px;
    max-width: 300px;
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-box en {
    color: RGB(0,127,162);
    font-weight: bold;
}

.info-box-special:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cv-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: RGB(0,127,162);
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cv-button:hover {
    background-color: #fff;
    color: RGB(0,127,162);
}


/* MathPhDInFrance */
.phd-box-section {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
}

.phd-box {
    background-color: #fff;
    max-width: 1000px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    padding: 25px 30px;
}

.phd-box h1 {
    color: RGB(0,127,162);
}

.phd-box a {
    color: RGB(0,127,162);
    text-decoration: none;
}

.phd-box a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 10px 20px;
    background-color: RGB(0,127,162);
    color: #fff;
}

footer i {
    font-style: italic;
}


.mobile-cv-section {
    display: none;
}



.cv-button-mobile-wrapper {
    margin: 0;              /* remove default paragraph margins */
    padding: 0;             /* no extra padding */
}




/* Responsive */

/* Tablets */
@media (max-width: 1024px) {

header {
    background-color: RGB(0,127,162);
    color: #fff;
    text-align: center;
    padding: 20px 10px;
    margin-bottom: 30px;
}


    .intro-content {
        flex-direction: column; /* stack photo and text */
    }
    .photo {
        width: 700px;
        height: 800px;
        margin: 0 auto; /* center the photo */
    }
    .text {
        text-align: justify; /* keep text left-aligned */
    }
    
     html, body {
        font-size: 30px;      /* base font much larger */
        line-height: 1.6;     /* more spacing */
        
    }
    
    
    header h1 {
        font-size: 80px;       /* large header */
    }

    header p {
        font-size: 35px;     /* larger subtitle */
    }

    .text p {
        font-size: 1.3em;     /* big paragraphs */
        line-height: 1.8;     /* generous line spacing */
        text-align: justify;     /* left-aligned like in Reader mode */
        margin-bottom: 1em;
        padding-left: 50px;
        padding-right: 50px;
    }
    
   
    
    .about-me-header h1 {
    color: RGB(0,127,162);
    font-size: 2em;
    text-align: justify;
    margin-left: 0.5em;
}

.cv-button:hover {
    background-color: #f9f9f9;
    color: RGB(0,127,162);
}

.mobile-cv-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 30px;           /* as you wanted */
        text-align: center;
                       /* space between text and button */
        margin-top: -50px; /* a touch of breathing room */ 
        margin-bottom: 30px;
    }

    .mobile-cv-section p {
        font-size: 1.3em;             /* scale relative to section */
    }
    
     /* Hide the entire "More about me" section except CV button */
    .about-me .about-me-header,
    .about-me .info-boxes {
        display: none;
    }

     footer {
        font-size: 1.3em;
    }
    
    
    
    
}

/* Small tablets / large phones */
@media (max-width: 768px) {
    html, body {
        font-size: 16px;
    }
    header h1 {
        font-size: 1.8em;
    }
    .intro {
        padding: 30px 10px 20px 10px;
    }
    .photo {
        width: 200px;
        height: 250px;
    }
    .info-boxes {
        flex-direction: column;
        gap: 20px;
        margin: 20px 10px 40px 10px;
    }
    .info-box, .info-box-special {
        max-width: 100%;
    }
}

/* Phones */
@media (max-width: 480px) {
    html, body {
        font-size: 20px;      /* base font much larger */
        line-height: 1.6;     /* more spacing */
    }

    header h1 {
        font-size: 2em;       /* large header */
    }

    header p {
        font-size: 1.2em;     /* larger subtitle */
    }

    .text p {
        font-size: 1.3em;     /* big paragraphs */
        line-height: 1.8;     /* generous line spacing */
        text-align: left;     /* left-aligned like in Reader mode */
        margin-bottom: 1em;
    }

    .info-box, .info-box-special, .phd-box {
        font-size: 1.2em;     /* bigger box text */
        padding: 35px 25px;   /* more padding for readability */
        text-align: left;     /* left-aligned content */
    }

    .cv-button {
        padding: 12px 24px;   /* bigger tappable button */
        font-size: 16px;
    }

    .intro {
        padding: 40px 20px 20px 20px; /* more breathing room */
    }

    .photo {
        width: 220px;
        height: 280px;        /* scale image nicely */
        margin: 0 auto;
    }
    
    
}


