@font-face{
    /*This takes the downloaded font and gives it a name to use in css*/ 
    src: url(fonts/DMSerifDisplay-Regular.ttf);
    font-family: DMSerif;
}
@font-face{
    /*This takes the downloaded font and gives it a name to use in css*/ 
    src: url(fonts/Montserrat-VariableFont_wght.ttf);
    font-family: Montserrat;
}

html, body{
    margin: 0;
    width: 100%;
    overflow-y: visible;
    overflow-x: clip;
}
html {
  scroll-padding-top: 80px; /* adjust to your header height */
  scroll-behavior: smooth;
}

/*Header*/
.header_container{
    position: sticky;
    top: 0;
    left: 0;
    background-color: #556B5A;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    overflow: visible;
}
.header_container.sticky{
    background-color: #556B5A;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0,25);
}
.header_container h1{
    font-family: DMSerif;
    color: #F7C5D8;
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 1px;
}

/*Navigation bar*/
.navbar ul{
    list-style-type: none;
    padding: 0px;
    margin: 0px;
    overflow: visible;  
    display: flex;
    gap: 10px;
}
.navbar a{
    color: #F7F5F0;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    text-align: center;
    font-family: Montserrat;
    border-radius: 20px;
    margin-top: 10px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.navbar a:hover{
    background-color: #F7C5D8;
}
.navbar li{
    float: none;
}
.navbar a.active{
    background-color: hsla(134, 11%, 45%, 0.763);
    color: #F7C5D8;
    font-weight: bold;
}

/*For the language button*/
 .language {
    position: relative;
    cursor: pointer;
    font-family: Montserrat;
    margin-top: 6px;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    text-align: center;
    font-family: Montserrat;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.language .selected-lang {
    padding: 5px 10px;
    background: #FFFFFF;
    border-radius: 15px;
    color: #3A405A;
}

.language ul {
    display: none;
    position: absolute;
    top: 45px;
    left: 0;
    background: #FFFFFF;
    color: #2A332E;
    padding: 5px 5px;
    list-style: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.language a{
    color: #2A332E;
}

.language:hover ul {
    display: block;
}

/*SECTIONS*/
.section{
    margin: 0px;
    padding: 0%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /*scroll-snap-align: start; Optional for "snapping"*/
}


#about{
    background-color: #F7F5F0;
}
#resume{
    background-color: #D9E2DD;
}
#contact{
    background-color: #F7F5F0;
}

/*For the about section*/
#main_photo img{
    width: 300px;
    border-radius: 20px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
    border: 5px solid hsl(337, 76%, 95%)
}

/*About section*/
.about_content{
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 100px;         /* less extreme */
    padding: 40px 40px; /* balanced */
    max-width: 100%;    /* ensures it cannot overflow */
    box-sizing: border-box;
}
.text_content {
    max-width: 500px;
}
.text_content h3{
    font-family: DMSerif;
    font-size: 3rem;
    color: #2A332E;
}
.text_content p{
    font-family: Montserrat;
    font-size: 1rem;
    line-height: 1.5;
    color: #3E4A44;
}
.text_content a{
    text-decoration: none;
    background-color: hsl(147, 10%, 18%);
    color: white;
    font-family: Montserrat;
    padding: 7px 15px;
    border-radius: 15px;
    display: inline-block;
    margin-top: 10px;
    transition: background-color 0.3s;
}
.about_content a:hover{
    background-color: hsl(147, 10%, 30%);
}

.about_me_box{
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-left: 2px;
    left: 0;
    margin-bottom: -110px;
    margin-top: 30px;
    width: 100%;
}

.about_me_left{
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    margin-left: 50px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
    background-color: hsl(28, 40%, 80%);
    border-radius: 15px;
    border: 5px solid hsl(337, 76%, 95%);
}

.hobbies_box{
    margin-left: 19px;
    width: 70%;
}
#hobbies h4{
    margin-top: 10px;
    font-size: 2.5rem;
    color: hsl(147, 10%, 18%);
}

#hobbies_list{
    list-style: none;
    display: flex;
    justify-content: space-evenly;
    padding: 0;
    margin-top: 20px;
}
#hobbies_list li{
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.2rem;
    color: hsl(150, 9%, 27%);
}

#img_yarn{
    width: 100px;
}
#img_scissors{
    margin-top: 12px;
    width: 75px;
}
#img_book{
    margin-top: 10px;
    width: 90px;
}
#img_paintbrush{
    margin-top: 10px;
    width: 55px;
}
#img_lightbulb{
    margin-top: 10px;
    width: 85px;
}

.about_me_info{
    text-align: center;  
}
.about_me_info h4{
    font-size: 1.7rem;
    color: hsl(147, 10%, 18%);
}
.about_me_info p{
    font-size: 1.1rem;
    color: hsl(150, 9%, 27%);
}

/*Resume section*/
#resume p, ul{
    font-family: Montserrat;
    color: #3E4A44;
}

#resume h3, h4{
    font-family: DMSerif;
    color: #2A332E;
}

.section h2{
    font-family: DMSerif;
    font-size: 4rem;
    color: hsl(337, 76%, 70%);
    text-shadow:3px 3px  white;
}
.section p{
    font-family: Montserrat;

}

.big_part_resume{
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    margin-left: 2px;
    left: 0;
    width: 95%;
}
.resume_right{
    display: flex;
    flex-direction: column;
    width: 70%;
    padding: 20px;
}
.skills{
    margin-right: 80px;
    margin-top: 100px;
    width: 30%;
}
#education{
    display: flex;
    flex-direction: column;
    background-color: hsl(28, 40%, 80%);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
    border: 5px solid hsl(337, 76%, 95%);
}
#education h3{
    font-size: 2.5rem;
    text-align: center;
}
#education h5{
    color: #2A332E;
}

#resume h5{
    font-family: DMSerif;
    font-size: 1.2rem;
    font-style: italic;
}
#ucr{
   padding-left: 10%;
}
#erasmus{
   padding-left: 10%;
}

.big_part_resume h3{
    font-family: DMSerif;
    font-size: 2rem;
}
.big_part_resume h4{
    font-family: DMSerif;
    font-size: 1.5rem;
}
.big_part_resume p, ul{
    font-family: Montserrat;
}

details > summary {
    cursor: pointer;
    width: fit-content;
    transition: background-color 0.3s;
    padding: 2px;
    margin: 5px;
}
details > summary:hover{
    background-color: hsl(337, 76%, 92%);
    border-radius: 15px;
}
details > p{
    margin-left: 25px;
}

#certificates h5{
    color: hsl(147, 10%, 18%);
}

/*For the work experience*/
.small_part_resume{
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    margin-left: 2px;
    left: 0;
    width: 95%;
    gap: 50px;
    overflow-x: hidden;
}
.small_part_resume h3{
    font-size: 2rem;
}

.academic_expierences{
    background-color: hsl(28, 40%, 80%);
    border-radius: 15px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
    width: 50%;
    padding: 20px;
    margin-top: 100px;
    border: 5px solid hsl(337, 76%, 95%);
}
.academic_expierences summary{
    color: #3E4A44;
}
.experience_summary{
    font-family: DMSerif;
    font-size: 1.3rem;
}

/*For the timeline for workexperience*/
.timeline{
    position: relative;
    padding-left: 40px;
    margin: 40px 0;
    overflow-x: hidden;
}
.timeline::before{
    content: "";
    position: absolute;
    left: 20px;
    top: 25px;
    width: 3px;
    height: 84%;
    background-color: hsl(147, 10%, 18%);
    border-radius: 2px;
}
.timeline-item{
    position: relative;
    margin-bottom: 40px;
}
.timeline-item::before{
    content: "";
    position: absolute;
    left: -26px;
    top: 5px;
    width: 12px;
    height: 12px;
    background-color: hsl(337, 76%, 70%);
    border-radius: 50%;
    border: 2px solid hsl(337, 76%, 95%);
    box-shadow: 0 0 0 2px hsl(147, 10%, 18%);
}
.timeline-item .date{
    font-style: italic;
    font-size: 1.1rem;
    color: #2A332E;
}
.timeline-item p{
    margin-top: 5px;
    line-height: 1.4;
}

#resume a{
    background-color: hsl(28, 40%, 80%);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
    margin-top: 15px;
    margin-bottom: 30px;
    font-family: Montserrat;
    transition: background-color 0.3s;
    text-decoration: none;
    color: hsl(147, 10%, 18%);
    font-weight: bold;
    border: 5px solid hsl(337, 76%, 95%);
}
#resume a:hover{
    background-color: hsl(28, 40%, 85%);
}

/*For contact section*/
#contact{
    padding-bottom: 30px;
}
#contact p{
    margin-top: 5px;
    font-size: 1.2rem;
}




footer{
    text-align: center;
    padding: 10px;
    margin-top: 0px;
    background-color: #556B5A;
    font-family: Montserrat;
    color: #F7C5D8;
    font-weight: bold;
}
/*For a smaller screen*/
@media (max-width: 768px) {
    /*For the navigation bar*/
    .header_container h1{
        font-size: 1.2rem;
        margin-left: -30px;
    }
    .navbar{
        margin-left: 10px;
        margin-right: 40px;
    }
    .navbar a{
        font-size: 0.7rem;
    }
    .selected-lang{
        font-size: 0.7rem;
        margin-right: -30px;
    }

    /*For the about me part*/
    .about_content{
        margin-right: 20px;
    }
    .about_content h3{
        font-size: 2rem;
    }
    .about_content p{
        font-size: 0.9rem;
    }
    .aboutme-layout {
        flex-direction: column;
        align-items: center;
        padding: 20px 20px;
        gap: 10px;
    }
    #main_photo{
        text-align: center;
    }
    #main_photo img {
        width: 50%;
    }
    .text_content {
        text-align: center;
        max-width: 90%;
        margin-left: 30px;
        padding: 0;
        margin-top: -100px;
    }

    .about_me_box{
        flex-direction: column;
        align-items: center;
        margin-bottom: 0px;
        margin-left: 0px;
        padding-left: 0;
    }
    .about_me_left{
        margin-left: 0;
    }
    .about_me_left h4{
        font-size: 1.3rem;
    }
    .about_me_left p{
        font-size: 1rem;
    }
    .hobbies_box{
        margin-top: 20px;
        margin-left: 0;
    }
    #hobbies h4{
        font-size: 1.6rem;
    }
    #hobbies_list{
        margin-left: -60px;
        gap: 10px;
        margin-right: 40px;
    }
    #hobbies_list li{
        font-size: 0.9rem;
    }

    /*For the resume part*/
    .big_part_resume{
        flex-direction: column-reverse;
        align-items: center;
    }
    #education{
        margin-left: -55px;
        margin-right: -55px;
        padding-left: 0px;
    }
    #education h3{
        font-size: 1.8rem;
    }
    #education h4{
        font-size: 1.3rem;
    }

    .skills{
        margin-top: -20px;
        margin-left: 80px;
        width: 90%;
    }

    .academic_expierences{
        width: 87%;
    }
    .small_part_resume{
        flex-direction: column;
        align-items: center;
    }

    #contact h2{
        font-size: 3rem;
    }
}