:root {
    --primaryColor: #764007;
    --secondaryColor: #d49453;
    --lightColor: #ffffff;
    --bgColor-1: #171a1c;
    --bgColor-2: #22282a;
    --padding: 8%;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: "Josefin Sans", sans-serif;
    font-size: 16px;
    color: var(--lightColor);
    scroll-behavior: smooth;
}

/* --- Global Section Styles --- */
section {
    width: 100%;
    padding: 4rem var(--padding);
}

span {
    color: var(--primaryColor);
}

h1 {
    font-size: 4.65rem;
    margin: 1.7rem 0;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 3.5rem;
}

h4 {
    font-size: 1.25rem;
    letter-spacing: 0.12rem;
    color: var(--secondaryColor);
}

p {
    color: var(--secondaryColor);
    letter-spacing: 1px;
    line-height: 1.8rem;
    font-size: 1rem;
}

/* --- Home & Nav --- */
.home {
    min-height: 100vh;
    background-color: var(--bgColor-1);
    display: flex;
    flex-direction: column;
    padding: 0; /* Nav and content handle padding */
}

nav {
    padding: 2.8rem var(--padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 100;
}

nav h2 {
    font-size: 2.2rem;
    letter-spacing: 0.12rem;
    cursor: pointer;
}

nav ul li {
    list-style-type: none;
    display: inline-block;
    margin: .8rem 1.5rem;
}

nav ul li a {
    color: var(--lightColor);
    text-decoration: none;
    text-transform: capitalize;
    transition: .4s;
}

nav ul li a:hover {
    color: var(--primaryColor);
}

.btn {
    background-color: var(--primaryColor);
    color: var(--lightColor);
    text-decoration: none;
    font-weight: bold;
    padding: .81rem 1.8rem;
    border-radius: 30px;
    border: 2px solid transparent;
    transition: .4s;
    display: inline-block;
}

.btn:hover {
    background-color: transparent;
    border: 2px solid var(--primaryColor);
}

.content {
    flex-grow: 1;
    padding: 0 var(--padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cont {
    position: relative;
    max-width: 600px;
}

.social {
    margin-top: 3.5rem;
}

.social img {
    margin-right: 2rem;
    width: 3rem;
    border-radius: 50%;
    background-color: var(--primaryColor);
    transition: .4s;
    padding: 5px;
}

.social img:hover {
    transform: scale(1.1);
    background-color: var(--secondaryColor);
}

/* --- Home Image (The Shape & Pic) --- */
.ima {
    width: 40%;
    height: 500px; /* Fixed height for desktop */
    position: relative;
    align-self: flex-end;
}

.ima img {
    position: absolute;
    bottom: 0;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
    transition: bottom 1s, left 1s;
}

.ima:hover .shape {
    bottom: 40px;
}

.ima:hover .pic {
    left: 45%;
}

/* --- About --- */
.about {
    background-color: var(--bgColor-2);
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 2rem;
}

.about .contaner-imges {
    width: 35%;
}

.about .contaner-imges img {
    width: 100%;
}

.about .contaner-texts {
    width: 45%;
}

h5 {
    font-size: 1.37rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

/* --- Services --- */
.Services {
    background-color: var(--bgColor-1);
}

.text-cenrter {
    text-align: center;
    margin-bottom: 3rem;
}

.box {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.card {
    width: 300px;
    background-color: var(--bgColor-2);
    border-radius: 20px;
    padding: 1.3rem 2rem;
    text-align: center;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

.card i {
    font-size: 3.12rem;
    color: var(--primaryColor);
    margin: 2rem;
}

/* --- Skills --- */
.skills {
    background-color: var(--bgColor-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.skills .contaner-imges {
    width: 35%;
}

.skills .contaner-imges img {
    width: 100%;
}

.skills .contaner-skills {
    width: 60%;
}

.content-skills {
    display: flex;
    flex-wrap: wrap;
    margin-top: 4rem;
    gap: 1.5rem;
}

.skill {
    width: 95px;
    height: 95px;
    background-color: var(--lightColor);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s;
}

.skill:hover {
    transform: scale(1.1);
}

.skill img {
    width: 60%;
    height: auto;
}

/* --- Footer --- */
footer {
    padding: 2rem var(--padding);
    background-color: var(--bgColor-1);
}

footer .content-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

footer .content-footer p {
    color: var(--lightColor);
    width: 100%;
    max-width: 500px;
    margin-top: 1rem;
}

footer .content-footer .end {
    color: var(--primaryColor);
    margin-top: 1rem;
}

/* --- MEDIA QUERIES (RESPONSIVENESS) --- */

/* Tablets & Small Laptops */
@media screen and (max-width: 991px) {
    :root { --padding: 5%; }
    h1 { font-size: 3.5rem; }
    .about, .skills { flex-direction: column; text-align: center; }
    .about .contaner-imges, .about .contaner-texts,
    .skills .contaner-imges, .skills .contaner-skills { width: 100%; }
    .content-skills { justify-content: center; }
}

/* Mobile Devices */
@media screen and (max-width: 768px) {
    nav { flex-direction: column; gap: 1.5rem; }
    nav ul { display: flex; flex-wrap: wrap; justify-content: center; padding: 0; }
    nav ul li { margin: 0.5rem 1rem; }
    
    .content {
        flex-direction: column; /* Stack vertically */
        text-align: center;
        padding-bottom: 3rem;
    }
    
    .cont { order: 1; margin-bottom: 2rem; }
    
    /* Ensure the Image Container shows up on Mobile */
    .ima {
        display: block; 
        width: 100%; 
        height: 400px; /* Reduced height for mobile screens */
        order: 2; /* Shows under the text */
        align-self: center;
    }

    .ima img {
        height: 100%; /* Make images fit the 400px height */
        width: auto;
    }

    h1 { font-size: 2.8rem; }
    h3 { margin-bottom: 2rem; }
    .social { margin-top: 2rem; justify-content: center; display: flex; }
    .social img { margin: 0 0.5rem; }
}

@media screen and (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    .ima { height: 300px; } /* Even smaller for very small phones */
    .skill { width: 70px; height: 70px; }
}