/* styling variables */
:root {
    --primary-color: #1c369b;
    --secondary-color: #f39c12;
    --background-color: #f9f9f9;
    --text-color: #333;
    --font-family: Arial, sans-serif;
    --max-width: 1200px;
}

/* base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* nav */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: var(--primary-color);
    color: #fff;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    color:var(--secondary-color);
}

/* hero section */
.hero {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(to bottom, #6ab7d7, var(--primary-color));
    color: #fff;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2 rem;
    margin-bottom: 40px;
}

.hero button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    background-color: var(--secondary-color);
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.hero button:hover {
    background-color: #e67e22;
}

/* about me section */
.about {
    max-width: 800px;
    margin: 50px auto;
    padding: 0 20px;
    text-align: center;
}

.about h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.about p {
    font-size: 1rem;
    line-height: 1.8;
    text-align: center;
}

/* project section */
.projects h2 {
    text-align: center;
}

.project-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 20px;
}

.project-card {
    flex: 1 1 400px;
    max-width: 500px;
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.project-card img {
    width: 100%;
    max-width: 400px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 15px;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.project-card h3 {
    margin-bottom: 12px;
    margin-left: 10px;
    text-align: center; 
    font-size: 1.25rem;
}

.project-card p {
    text-align: left;
    font-size: 1rem;
    line-height: 1.5;
}

/* footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: var(--primary-color);
    color: #fff;
}

/* responsive design */
@media (max-width: 768px){
    /* nav section */
    nav ul {
        flex-direction: column; 
        gap: 10px;
    }

    nav {
        padding: 15px 20px;
    }

    /* hero section */
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .hero button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /*  about section  */
    .about {
        padding: 0 10px;
    }

    .about h2 {
        font-size: 1.5rem;
    }

    .about p {
        font-size: 0.9rem;
    }

    /* --- projects section --- */
    .project-row {
        flex-direction: column;
        gap: 20px;
    }

    .project-card {
        flex-direction: column;
        max-width: 90%;
        padding: 15px;
    }

    .project-card img {
        width: 100%;
    }

}

