@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display.swap');

/* ========================== */
/* 1. CORE RESET & VARIABLES  */
/* ========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #081b29;
    color: #ededed;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* ========================== */
/* 2. HEADER & NAVIGATION     */
/* ========================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 10%;
    display: flex;
    background: #081b29; /* Added solid background so content doesn't show behind it on scroll */
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    position: relative;
    font-size: 25px;
    color: #ededed;
    text-decoration: none;
    font-weight: 600;
}

/* Hamburger Menu Icon (Hidden on Desktop) */
#menu-icon {
    font-size: 3.6rem;
    color: #ededed;
    cursor: pointer;
    display: none; /* Only shows on mobile */
}

.navbar a {
    font-size: 18px;
    color: #ededed;
    text-decoration: none;
    font-weight: 500;
    margin-left: 35px;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: #00abf0;
}

/* ========================== */
/* 3. SECTION LAYOUTS         */
/* ========================== */
.home-section,
.about-section,
.experience-section,
.projects-section,
.contact-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 10% 40px; /* Standard Padding */
}

/* Specific Home Section Layout */
.home-section {
    align-items: center;
    justify-content: space-between;
    flex-direction: row; /* Default to side-by-side */
}

.home-content,
.about-content,
.experience-content,
.projects-content,
.contact-content {
    max-width: 800px;
    position: relative;
    width: 100%;
}

/* Typography */
.home-content h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
}

.home-content h3 {
    font-size: 32px;
    font-weight: 700;
    color: #00abf0;
}

.section-title { /* Helper class if you want to use it */
    font-size: 48px;
    margin-bottom: 20px;
    text-align: left;
}

/* ========================== */
/* 4. BUTTONS & UI ELEMENTS   */
/* ========================== */
.btn-box {
    display: flex;
    justify-content: space-between;
    width: 345px;
    height: 50px;
    margin-top: 2rem;
}

.btn-box a, .project-card .btn, .contact-form .btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 150px; /* Default width */
    height: 100%;
    background: #00abf0;
    border: 2px solid #00abf0;
    border-radius: 8px;
    font-size: 19px;
    color: #081b29;
    text-decoration: none;
    font-weight: 600;
    z-index: 1;
    overflow: hidden;
    transition: .5s;
}

.btn-box a:hover, .project-card .btn:hover {
    color: #00abf0;
}

.btn-box a::before, .project-card .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #081b29;
    z-index: -1;
    transition: .5s;
}

.btn-box a:hover::before, .project-card .btn:hover::before {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 2px solid #00abf0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    color: #00abf0;
    margin-left: 20px;
}

/* ========================== */
/* 5. HOME IMAGE              */
/* ========================== */
.home-img {
    position: relative;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #00abf0, #800080);
    box-shadow: 0 0 20px #00abf0, 0 0 60px #00abf0;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: 50px; /* Space between text and image */
}

.home-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ========================== */
/* 6. PROJECTS GRID           */
/* ========================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding-bottom: 5rem;
    width: 100%;
}

.project-card {
    background: transparent;
    border: 2px solid #00abf0;
    padding: 2.5rem;
    border-radius: 15px;
    transition: 0.5s;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px #00abf0;
    background: rgba(0, 171, 240, 0.05);
}

.project-icon {
    font-size: 4rem;
    color: #00abf0;
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 22px;
    margin-bottom: 1rem;
    color: #00abf0;
}

.project-card p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.tech-tag {
    font-size: 0.8rem;
    background: #00abf0;
    color: #081b29;
    padding: 4px 12px;
    border-radius: 5px;
    font-weight: 600;
}

/* ========================== */
/* 7. CONTACT FORM            */
/* ========================== */
.contact-form {
    max-width: 600px;
    width: 100%;
    margin-top: 2rem;
}

.contact-form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-form .input-box input,
.contact-form textarea {
    width: 100%;
    padding: 1.2rem;
    font-size: 1rem;
    color: #ededed;
    background: transparent;
    border: 2px solid #00abf0;
    border-radius: 8px;
    outline: none;
}

.contact-form .input-box input {
    width: calc(50% - 0.5rem); /* Half width for desktop */
}

.contact-form textarea {
    resize: none;
    height: 150px;
    margin-bottom: 2rem;
}

.contact-info {
    margin-top: 3rem;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info p i {
    color: #00abf0;
    font-size: 1.4rem;
}

.contact-info p a {
    color: #ededed;
    text-decoration: none;
}

/* ========================== */
/* 8. SOCIAL ICONS            */
/* ========================== */
.home-sci, .about-sci, .experience-sci, .projects-sci, .contact-sci {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.home-sci {
    position: absolute;
    bottom: 40px;
    left: 10%;
}

.home-sci a, .about-sci a, .experience-sci a, .projects-sci a, .contact-sci a {
    width: 40px;
    height: 40px;
    border: 2px solid #00abf0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #00abf0;
    text-decoration: none;
    transition: .5s;
}

.home-sci a:hover, .about-sci a:hover, .experience-sci a:hover, .contact-sci a:hover {
    background: #00abf0;
    color: #081b29;
    box-shadow: 0 0 10px #00abf0;
}

/* ========================== */
/* 9. LIGHT MODE & FOOTER     */
/* ========================== */
body.light-mode { background: #f0f2f5; color: #333; }
body.light-mode .header { background: #f0f2f5; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
body.light-mode .logo { color: #333; }
body.light-mode .logo::before { background: #f0f2f5; }
body.light-mode .navbar a { color: #333; }
body.light-mode .navbar a:hover, body.light-mode .navbar a.active { color: #007bff; }
body.light-mode #menu-icon { color: #333; }
body.light-mode .project-card { border-color: #007bff; }
body.light-mode .project-icon, body.light-mode .project-card h3 { color: #007bff; }
body.light-mode .tech-tag { background: #007bff; color: #fff; }
body.light-mode .home-content h3 { color: #007bff; }
body.light-mode .btn-box a { background: #007bff; border-color: #007bff; color: #fff; }
body.light-mode .btn-box a:hover { color: #007bff; background: transparent; }
body.light-mode .home-img { background: linear-gradient(45deg, #007bff, #b366ff); }
body.light-mode .contact-form .input-box input, body.light-mode .contact-form textarea { border-color: #007bff; color: #333; }

.footer {
    width: 100%;
    padding: 20px 10%;
    background: #000;
    color: #ededed;
    text-align: center;
    font-size: 14px;
    margin-top: auto;
}

/* ========================== */
/* 10. MOBILE RESPONSIVENESS  */
/* ========================== */

/* Tablet & Smaller Laptops (991px and below) */
@media (max-width: 991px) {
    .header {
        padding: 2rem 5%; /* Reduces header padding */
    }

    /* Stack Home Section Vertically */
    .home-section {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 120px; /* Space for fixed header */
        height: auto;
    }

    .home-content {
        order: 2; /* Puts text below image */
        margin-top: 2rem;
    }

    .home-img {
        order: 1; /* Puts image on top */
        width: 300px;
        height: 300px;
        margin-left: 0;
        margin-bottom: 20px;
    }

    .home-content h1 { font-size: 42px; }
    .home-content h3 { font-size: 26px; }

    .btn-box {
        margin: 2rem auto; /* Centers buttons */
    }

    .home-sci {
        position: static;
        justify-content: center;
        margin-top: 20px;
        width: 100%;
    }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
    .header {
        background: #081b29;
    }
    
    #menu-icon {
        display: block; /* Show hamburger menu */
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 4%;
        background: #081b29; /* Match body bg */
        border-top: 1px solid rgba(0,0,0,.1);
        display: none; /* Hidden by default */
        flex-direction: column;
        text-align: center;
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
    }

    .navbar.active {
        display: flex; /* Show when active class added by JS */
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 2rem 0;
    }

    /* Adjust padding for all sections to be consistent */
    .home-section, .about-section, .experience-section, .projects-section, .contact-section {
        padding: 100px 5% 40px; /* Reduces side padding to 5% */
    }

    /* Fix Contact Form width on mobile */
    .contact-form .input-box input {
        width: 100%; /* Stack inputs vertically */
    }

    .projects-grid {
        grid-template-columns: 1fr; /* Single column for projects */
    }
}

/* Very Small Screens (450px and below) */
@media (max-width: 450px) {
    html {
        font-size: 80%; /* Scales down all text slightly */
    }
    
    .home-content h1 { font-size: 36px; }
    
    .home-img {
        width: 260px;
        height: 260px;
    }
    
    .btn-box {
        width: 100%; /* Full width buttons container */
        flex-direction: column;
        height: auto;
        gap: 15px;
    }

    .btn-box a {
        width: 100%; /* Full width buttons */
        height: 50px;
    }
}
