/* --- GLOBAL STYLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; border: none; outline: none; scroll-behavior: smooth; font-family: 'Poppins', sans-serif; }

:root {
    --bg-color: #1f242d;
    --second-bg-color: #323946;
    --text-color: #fff;
    --main-color: #4c9100;
}

html { font-size: 65%; overflow-x: hidden; }
body { background: var(--bg-color); color: var(--text-color); font-size: 1.6rem; }

/* --- HEADER & NAV --- */
.header { position: fixed; top: 0; left: 0; width: 100%; padding: 2rem 9%; background: var(--bg-color); display: flex; justify-content: space-between; align-items: center; z-index: 100; }
.logo { font-size: 2.5rem; color: var(--text-color); font-weight: 600; cursor: default; }
.navbar a { font-size: 1.7rem; color: var(--text-color); margin-left: 4rem; transition: .3s; }
.navbar a:hover, .navbar a.active { color: var(--main-color); }
#menu-icon { font-size: 3.6rem; color: var(--text-color); display: none; }

.navbar a.active {
    color: var(--main-color);
    text-shadow: 0 0 15px rgba(76, 145, 0, 0.7); /* The Green Glow */
    border-bottom: 2px solid var(--main-color);
}

.navbar a {
    transition: .3s ease;
    border-bottom: 2px solid transparent;
}

/* --- SECTIONS --- */
section { min-height: 100vh; padding: 10rem 9% 2rem; }

/* Home Section */
.home { display: flex; justify-content: center; align-items: center; gap: 5rem; }
.home-content h3 { font-size: 3.2rem; font-weight: 700; }
.home-content h1 { font-size: 5.6rem; font-weight: 700; margin: -3px 0; }
.home-content p { font-size: 1.6rem; margin-top: 2rem; }

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3.5rem 1.5rem 3rem 0; /* Slightly increased top margin */
    transition: .5s ease;
}

.social-media a i {
    /* Resetting the font-icon defaults */
    display: block; 
    line-height: 1; 
    margin: 0;
    padding: 0;
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}


.btn { display: inline-block; padding: 1rem 2.8rem; background: var(--main-color); border-radius: 4rem; box-shadow: 0 0 1rem var(--main-color); font-size: 1.6rem; color: var(--bg-color); letter-spacing: .1rem; font-weight: 600; transition: .5s ease; }
.btn:hover { box-shadow: none; }

/* Image & Rotating Border */
.profile-card { position: relative; width: 35rem; height: 35rem; border-radius: 50%; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.profile-card::before { content: ''; position: absolute; width: 150%; height: 150%; background: conic-gradient(transparent, transparent, transparent, var(--main-color)); animation: rotate 4s linear infinite; }
.profile-card::after { content: ''; position: absolute; inset: .5rem; background: var(--bg-color); border-radius: 50%; z-index: 1; }
.profile-card img { width: 95%; height: 95%; border-radius: 50%; object-fit: cover; object-position: top; z-index: 2; position: relative; }


@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* About & expertise Alignment */
.heading { text-align: center; font-size: 4.5rem; margin-bottom: 5rem; }
.heading span { color: var(--main-color); }
.about {display: flex; justify-content: center; align-items: center; gap: 4rem; background: var(--second-bg-color); }
.about-img img { width: 35vw; border-radius: 2rem; }

.services-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 3rem;
    max-width: 1000px; 
    margin: 0 auto;
}
.services-box { flex: 1 1 30rem; background: var(--second-bg-color); padding: 3rem 2rem 4rem; border-radius: 2rem; text-align: center; border: .2rem solid var(--bg-color); transition: .5s ease; }
.services-box:hover { border-color: var(--main-color); transform: scale(1.02); }
.services-box h3, i{
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.portfolio-container {
    display: grid;
    /* Forces exactly 2 columns of equal width */
    grid-template-columns: repeat(2, 1fr); 
    gap: 3rem; /* Spacing between the boxes */
    padding: 0 9%; /* Matches the side margins of your other sections */
    max-width: 120rem;
    margin: 0 auto;
}

.portfolio-box {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    display: flex;
    aspect-ratio: 16 / 9; /* Maintains the 'dashboard' shape for both */
    background: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--second-bg-color);
}

.porftolio-p{
    text-align: center;
    margin-top: auto;
    margin-bottom: 2rem;
}

.porftolio-p span{
    color: var(--main-color);
}

.portfolio-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s ease;
}

.portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Darker gradient at bottom helps text stand out against white dashboards */
    background: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, 0.8)); 
    display: flex;
    
    /* Pushes text to the bottom */
    justify-content: flex-end; 
    align-items: center;
    flex-direction: column;
    
    padding: 0 4rem 3rem; /* Bottom padding for spacing */
    text-align: center;
    
    /* Move it down by default */
    transform: translateY(100%); 
    transition: .5s ease;
    z-index: 2; /* Forces it to sit on top of the image */
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0); /* Slides up on hover */
}

.portfolio-box:hover img {
    transform: scale(1.1);
}



.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* Allows inputs to drop to next line on small screens */
}

.contact form .input-box input {
    width: 49%; /* Keeps them side-by-side */
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
}

/* On very small screens, make inputs 100% wide */
@media (max-width: 520px) {
    .contact form .input-box input {
        width: 100%;
    }
}

/* --- RESPONSIVENESS --- */
@media (max-width: 1200px) { html { font-size: 55%; } }
@media (max-width: 991px) { .header { padding: 2rem 3%; } section { padding: 10rem 3% 2rem; } }
@media (max-width: 768px) {
    #menu-icon { display: block; }
    .navbar { position: absolute; top: 100%; left: 0; width: 100%; padding: 1rem 3%; background: var(--bg-color); border-top: .1rem solid rgba(0,0,0,.2); box-shadow: 0 .5rem 1rem rgba(0,0,0,.2); display: none; }
    .navbar.active { display: block; }
    .navbar a { display: block; font-size: 2rem; margin: 3rem 0; }
    .home { flex-direction: column; }
    .home-content h1 { font-size: 5rem; }
    .about { flex-direction: column-reverse; }
    .services-container, 
    .portfolio-container {
        grid-template-columns: 1fr;
    }
}
