/*All*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "M PLUS Rounded 1c", sans-serif;
}



/* The style of header section*/
#header {
    display: flex;            
    padding-left: 1cm;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding:15px 30px ;
}

#header h2{
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-size: 30px;
    margin-top: 10px;
}



/* the style of navigation section*/
#navigation{
    margin-left: auto;
    display: flex;
    list-style: none;
    padding: 10px;
    gap: 2cm;
    padding-right: 1.5cm;
    font-size: 18px
}

#navigation a{
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-size: 25px;
    color:rgb(58, 58, 55);;
}

#navigation a:hover {
    text-decoration: underline;
}

/* All links */
a {
    text-decoration: none;
}

/* main content */

#maincontent .background-image{
    background-size: cover;
    background-position: center;               
    background-repeat: no-repeat;      
    animation: fadeIn 1.5s ease-in-out
    
}

#maincontent img{
    width: 1440px;
    height: 800px;
}

#maincontent h3{
    font-weight: 600;
    font-size: 45px;
    color: white;
    top: 20%;
    left: 5%;
    animation: fadeIn 1.5s ease-in-out; /* Text slowy appear*/
}

#maincontent h4{
    color: #ffffff;
    font-weight: 600;
    font-size:20px ;
    top: 30%;
    left: 5%;
    animation: fadeIn 1.5s ease-in-out;
}


#button{
    top: 80%;
    left: 42%;
}



#button a {
    display: inline-block;             
    color: white;
    font-size: 30px;
    font-weight: 600;                   
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);  /* shadow is generated by AI */
    letter-spacing: 0.5px;
    animation: fadeIn 1.5s ease-in-out;
    
} 

#button a:hover {
     text-decoration: underline;
}

#maincontent h3,
#maincontent h4,
#button {
    position: absolute;
    z-index: 2;
    color: white;
}

/* contents slowly apper --Used AI */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px); 
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}





/* portfolio page */

.portfolio h2{
    margin: 1cm;
    animation: fadeIn 1.5s ease-in-out
}


.box{
    display: grid;
    gap: 20px; /* space */             
    padding: 0 20px; 
    margin-top: 3cm;
    justify-content: center;
    grid-template-columns: 1fr;
    max-width: 1200px;                      /*Control the overall width*/
    width: 100%;
    margin: 100px auto;                     /*left and right sides are equal */
    animation: fadeIn 1.5s ease-in-out      /* Used AI to generate how to slowly apear*/
}

.workbox{
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1 / 1;    /* Used AI */
    position: relative;
    float: left;
    animation: fadeIn 1.5s ease-in-out
}


/* the image covers the entire graphic  */
.workbox img {
    width: 100%;
    height: 100%;
    object-fit: cover;        
    display: block;
    transition: 0.3s ease;
}

.workbox:hover img {
    opacity: 0.5;      /* turning half transparent */
}


.workbox p{
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
    color: #ffffff;
}

.workbox h3{
    font-size: 30px;
    margin-bottom: 0.2rem;
    font-weight: 600;
    color: #ffffff;
}

/* The text over the image*/
.text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);            /* Text in the middle--- !Used AI*/
    width: 100%;                
    color: white;
    padding: 1rem 0.8rem 0.8rem;
    text-align: center;
    box-sizing: border-box;
}

.portfolio{
    font-size: 25px;
    font-weight: 600;
    color: rgb(14, 100, 71);
}

@media screen and (min-width: 640px) {
    .box {
        grid-template-columns: repeat(2, 1fr);      /* flex grid */
    }
}

@media screen and (min-width: 960px) {
    .box {
        grid-template-columns: repeat(3, 1fr);
    }
}




/* About Me page */
#about-content h2{
    padding: 20px;
    margin: 20px;
    font-weight: 600;
    font-size: 50px;
    color: #1e293b;
    max-width: 700px;
}

#about-content p{
    padding: 20px;
    margin: 20px;
    color: #1e293b;
    font-weight: 400;
    max-width: 700px;
}

#about-content{
    padding: 40px;
    max-width: 1000px;
    animation: fadeIn 1.5s ease-in-out
}


.about-image img{
    width: 40%;
    margin-left: 800px;
    margin-top: -350px;

}

/* Footer section */

#footer{
    background-color: #dfdfdf;
    padding: 40px 60px;
}

#footer h2 {
    font-size: 30px;
    margin-bottom: 20px;
    color: #333;
}

#footer input,
#footer textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    font-size: 15px;
}

#footer .footer-button{
    width: 10%;
    border: 30px;
    margin-top: 10px;
    background-color: #b3b1b1;
}

#footer .footer-button:hover {
    background-color: #9b9a9a;
}

.actions{
    list-style: none;
}