*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

:root{
    --primary: #2563eb;   
    --secondary: #1e293b; 
    --accent: #38bdf8;   
    --bg: #f8fafc;
    --card: #ffffff;
}


body{
    background-color: var(--bg);
    color: var(--secondary);
}


header{
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
}

header h1{
    font-size: 2.2rem;
    font-weight: 600;
}

header h2{
    font-size: 1.1rem;
    font-weight: 300;
    margin-top: 10px;

}



nav{
    display: flex;
    justify-content: space-between;
    position: sticky;
    backdrop-filter: blur(10px);
    top: 0;
    height: 60px;
    width: 100%;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--card);
    box-shadow: 0 3px 5px gray;
    z-index: 999;
}

nav legend{
    font-size: 20px;
    font-weight: 600;
    font-style: italic;

}

nav .link{
    display: flex;
    gap: 40px;
}

nav a{
    padding: 8px 14px;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    border-radius: 8px;
    transition: 0.3s;
}

nav a:hover{
    background-color: var(--primary);
    color: white;
}


.container{
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80vh;
    padding: 60px 20px;
    gap: 40px;
    max-width: 1100px;
    margin: auto;
}

.info{
    text-align: center;
    flex: 1;
    padding: 25px;
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: 0.3s ease;
}

.info:hover{
    transform: translateY(-5px);
}

.info img{
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary);
}

.info h2{
    text-align: left;
    font-weight: 400;
    padding: 8px 0;
}

.skill{
    flex: 2;
    padding: 25px;
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: 0.3s ease;
}

.skill:hover{
    transform: translateY(-5px);
}

.skill h1{
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

.icon{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.icon i{
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--primary);
}

.content{
    margin: 10px 30px;
    line-height: 1.6;
}

.content h3{
    font-size: 25px;
    padding: 10px 0px;
}

.content p{
    font-size: 16px;
    font-weight: 400;
    font-family: 'Poppins', sans-serif;
}

footer{
    text-align: center;
    height: 60px;
    align-content: center;
    background-color: var(--secondary);
    color: white;
}

footer p{
    font-size: 14px;
    font-weight: 400;
}

/*Exercise 2 Compilation*/

.wrapper, .body, .grade-calculator{
    padding: 60px 20px;
}

.wrapper{
    align-content: center;
    min-height: 100vh;
    text-align: center;
}

.wrapper h1{
    font-style: italic;
    font-weight: 600;
    margin-bottom: 20px;
}

.wrap{
    max-height: 400px;
    border: 1px solid #ddd;
    display: flex;
    overflow-x: auto;
    transition: 0.3s;
}

.wrap::-webkit-scrollbar{
    width: 0;
}

.wrap .item{
    min-width: 350px;
    height: 350px;
    text-align: center;
    background-color: #ddd;
    margin: 10px 20px;
    border-radius: 20px;
    box-shadow: 3px 3px 10px black;

    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    gap: 15px;
}

.wrap .item:hover{
    transform: translateY(-5px);
}

h2{
    font-size: 30px;
    font-weight: 700;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

p{
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
}

button{
    border: none;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 22px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: 0.3s ease;
}

button:hover{
    background: var(--accent);
    transform: translateY(-2px);
}

button:active{
    box-shadow: 1px 1px 3px gray;
    transform: translateY(5px);
}

/*EXERCISE 3*/

.body{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: var(--bg);
}

.card{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 40px 20px;
    max-width: 1100px;
    margin: auto;
} 


.box{
    border-radius: 16px;
    text-align: center;
    padding: 20px;
    min-height: 15rem;  
    background: var(--card);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: 0.3s ease;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.box:hover{
    transform: translateY(-5px);
}

.box button{
    margin-top: 15px;
    width: 100%;
    max-width: 150px;
    align-self: center;
}

#first > p{
    font-size: 1rem;
    padding: 30px 10px;
}

#DarkMode > p{
    font-size: 1rem;
    padding: 30px 10px;
}

#DarkMode{
    transition: background-color 0.3s;
    
}

#DarkMode.darkmode{
    background-color: #333;
    color: #fff;
}

.box > input{
    display: block;
    padding: 0 5px;
    width: 50%;
    height: 30px;
    margin-left: 25%;   
}

#List p{
    padding: 10px 0px;
    margin: 10px 0px;
}

#List button{
    margin: 20px 0px;
}

#image1{
    display: block;
    margin: 10px auto;
}

.outcome{
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid #eee;
}

#result{
    margin-top: 10px;
    font-family: Arial, Helvetica, sans-serif;
    box-shadow: 2px 2px 5px black;
    border-radius: 15px;
}

.task-item{
    margin: 5px 0;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px ;
}



#addList{
    padding: 1px 2px;
    cursor: pointer;
}

.list-item{
    margin: 2px 0;
    padding: 3px;
    background: #f5f5f5;
}

#taskList{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: #333;
}

.task-item{
    display: flex;
    justify-content: space-around;
    width: 80%;
    align-content: center;
}

#btn{
    padding: 5px 10px;
    border-radius: 2px;
    background-color: red;
}

/*Exercise 4*/
.grade-calculator{
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to right, #333, gray, #f0f0f0 );
}

.grade-calculator h1{
    margin-bottom: 20px;
}

.model{
    background-color: #fff;
    width: 40%;
    height: 300px;
    align-content: center;
    text-align: center;
    border-radius: 20px;
    box-shadow: 2px 2px 10px black;
}

.input-group{
    margin: 10px 0;
    font-style: italic;
    font-weight: 600;
}

.results{
    font-weight: 600;
    margin-top: 10px;
}

/*This code is from Ai. The purpose of this code is to look my website profesional.*/
.info, .skill, .box, .item, .model{
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: 0.3s ease;
}

.info:hover, .skill:hover, .box:hover, .item:hover{
    transform: translateY(-5px);
}


@media (max-width: 768px){
    .container{
        flex-direction: column;
        text-align: center;
    }

    .info, .skill{
        width: 90%;
        margin: 10px 0;
    }

    .card{
        grid-template-columns: 1fr;
    }
}