html {
    box-sizing: border-box;
    scroll-behavior: smooth; /* Smooth scrolling for internal links */
}

*, *::before, *::after {
    box-sizing: inherit;
    margin: 0; /* Remove default margins */
    padding: 0; /* Remove default paddings */
}

body {
    font-family: 'Roboto', sans-serif; /* Use a custom font from Google Fonts */
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    margin: 0; /* Ensure no default body margin */
    overflow-x: hidden; /* Prevent horizontal scroll issues */
}

a {
    text-decoration: none; /* Remove underlines from links */
    color: #007bff; /* Default link color */
}

a:hover {
    color: #0056b3; /* Darker on hover */
}

img {
    max-width: 100%; /* Ensure images are responsive and don't overflow */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Remove extra space below images */
}

ul {
    list-style: none; /* Remove bullet points from lists */
}

/* Reusable Container Class */
.container {
    max-width: 1200px; /* Maximum width for content */
    margin: 0 auto; /* Center the container */
    padding: 0 20px; /* Add padding on sides for smaller screens */
}

/* Section Titles */
.section-title {
    font-size: 2.5rem; /* Responsive font size */
    font-weight: 600;
    text-align: center;
    margin-bottom: 60px;
    color: #222;
    position: relative;
    padding-bottom: 15px; /* Space for underline effect */
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
}


/* BUTTON STYLES */
.btn {
    display: inline-block; /* Allows padding and margin like a block, but stays inline */
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: transparent;
    color: #007bff;
    border: 1px solid #007bff;
}

.btn-secondary:hover {
    background-color: #007bff;
    color: #fff;
}

/* HEADER SECTION */
.header {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky; /* Sticky header */
    top: 0;
    z-index: 1000; /* Ensure header stays on top of other content */
}

.header-content {
    display: flex; /* Use Flexbox for alignment */
    justify-content: space-between; /* Pushes title and nav to opposite ends */
    align-items: center; /* Vertically center items */
}

.site-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #222;
}

/* Main Navigation (Desktop) */
.main-nav ul {
    display: flex; /* Flexbox for horizontal nav links on desktop */
}

.main-nav li {
    margin-left: 30px; /* Space between nav items */
}

.main-nav a {
    color: #555;
    font-weight: 400;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: #007bff;
}

.main-nav a:hover::after,
.main-nav a.active::after { /* Optional: .active class for current page */
    width: 100%;
}

/* Hamburger menu for mobile - hidden by default on desktop */
.hamburger-menu {
    display: none; /* Will be shown via media query on smaller screens */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1001; /* Ensure hamburger is above the slide-in menu */
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 5px;
    transition: all 0.3s ease;
}


/* HERO SECTION */
.hero-section {
    background-color: #e9f5ff; /* Light blue background */
    text-align: center;
    padding: 100px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px); /* Adjust based on header height, approx viewport height */
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.hero-intro {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 10px;
}

.hero-name {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem; /* Larger on desktop */
    font-weight: 600;
    color: #222;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-tagline {
    font-size: 1.5rem;
    color: #444;
    margin-bottom: 40px;
}

.hero-section .btn {
    margin: 0 10px; /* Space between buttons */
}

/* ABOUT SECTION */
.about-section {
    padding: 80px 0;
    background-color: #fff;
}

.about-grid {
    display: flex; /* Flexbox for image and text */
    align-items: center;
    gap: 40px; /* Space between image and text */
}

.about-image {
    flex: 1; /* Takes up available space */
    text-align: center;
}

.about-image img {
    width: 300px;
    height: 300px;
 
    border-radius: 50%; /* Make it circular */
    border: 5px solid #007bff;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.05); /* Slight zoom on hover */
}

.about-text {
    flex: 2; /* Text takes more space */
    font-size: 1.1rem;
    color: #444;
}

.about-text p {
    margin-bottom: 20px;
}

/* PROJECTS SECTION */
.projects-section {
    padding: 80px 0;
    background-color: #f0f5f9;
}

.project-grid {
    display: grid; /* Use CSS Grid for a clean layout */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 30px; /* Space between project cards */
}

.project-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Ensures border-radius applies to image */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Use flexbox internally for image and text */
    flex-direction: column; /* Stack content vertically */
}

.project-card:hover {
    transform: translateY(-10px); /* Lift effect on hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-card img {
    width: 100%;
    height: 200px; /* Fixed height for images */
    object-fit: cover; /* Crop images to fit */
    border-bottom: 1px solid #eee;
}

.project-info {
    padding: 20px;
    flex-grow: 1; /* Allows info section to take remaining height */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes links to bottom */
}

.project-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    color: #222;
    margin-bottom: 10px;
}

.project-info p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}

.project-links {
    display: flex; /* Flexbox for project buttons */
    gap: 15px;
    margin-top: auto; /* Pushes the links to the bottom */
}

.btn-project {
    padding: 8px 15px;
    font-size: 0.9rem;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.btn-project i {
    margin-left: 8px; /* Space for icon */
}

.btn-project:hover {
    background-color: #e0e0e0;
    color: #007bff;
    border-color: #007bff;
}


/* CONTACT SECTION */
.contact-section {
    padding: 80px 0;
    background-color: #fff;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto; /* Center the form */
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block; /* Make labels stack above inputs */
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif; /* Inherit font */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.contact-form .btn-primary {
    width: 100%; /* Make submit button full width */
    padding: 15px;
    font-size: 1.1rem;
}

.social-links {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.social-links p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #555;
}

.social-links a {
    font-size: 2.5rem; /* Size of social icons */
    margin: 0 15px;
    color: #555;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #007bff;
}

/* FOOTER SECTION */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
}

.footer p {
    margin-bottom: 5px;
}

/* ==================================== */
/* RESPONSIVE DESIGN - MEDIA QUERIES  */
/* ==================================== */

/* Small devices (phones, 768px and below) */
@media (max-width: 768px) {
    .header-content {
        /* Adjusted for better alignment on small screens */
        flex-wrap: nowrap; /* Prevent wrapping header content on one line */
        justify-content: space-between; /* Keep title and hamburger at ends */
    }

    .site-title {
        font-size: 1.8rem; /* Make title smaller on mobile */
        margin-bottom: 0; /* Remove extra space below title */
    }

    /* Hide the main navigation on small screens by default */
    .main-nav ul {
        position: fixed; /* Fix to viewport */
        top: 0; /* Align to top of viewport */
        right: -100%; /* Initially hide off-screen to the right */
        width: 70%; /* Width of the slide-in menu */
        max-width: 300px; /* Max width for larger phones/small tablets */
        height: 100%; /* Full viewport height */
        background-color: #fff; /* White background for the menu */
        flex-direction: column; /* Stack links vertically */
        justify-content: center; /* Center links vertically */
        align-items: center; /* Center links horizontally */
        padding: 60px 20px; /* Add padding inside the menu */
        box-shadow: -5px 0 15px rgba(0,0,0,0.2); /* Shadow for slide-in effect */
        transition: right 0.3s ease-in-out; /* Smooth slide transition */
        z-index: 999; /* Below hamburger but above page content */
    }

    /* When .active class is added by JS, slide the menu into view */
    .main-nav ul.active {
        right: 0;
    }

    .main-nav li {
        margin: 15px 0; /* Spacing between nav items when stacked */
        width: 100%; /* Full width for clickable area */
        text-align: center;
    }

    .main-nav a {
        display: block; /* Make links fill their list item */
        font-size: 1.2rem; /* Larger font for mobile links */
        padding: 10px 0; /* Padding for tap area */
        color: #333;
    }

    .main-nav a::after {
        /* Remove underline animation on mobile nav links */
        display: none;
    }

    /* Show the hamburger menu icon on small screens */
    .hamburger-menu {
        display: flex; /* Show it */
        /* No margin-left: auto needed if header-content is space-between */
    }

    /* Hamburger animation when active (transforms into an 'X') */
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0; /* Hide middle bar */
    }
    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }


    /* Existing mobile responsive adjustments */
    .hero-section {
        padding: 80px 0;
        min-height: auto; /* Allow content to define height */
    }

    .hero-name {
        font-size: 2.5rem; /* Adjust font size for mobile */
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .hero-section .btn {
        display: block; /* Stack buttons vertically */
        margin: 15px auto; /* Center and add vertical space */
        width: 80%; /* Make buttons a bit narrower */
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .about-grid {
        flex-direction: column; /* Stack image and text vertically */
        text-align: center;
    }

    .about-image {
        margin-bottom: 25px;
    
    }

    .project-grid {
        grid-template-columns: 1fr; /* Single column for projects on mobile */
    }

    .contact-form {
        padding: 25px;
    }

    .social-links a {
        font-size: 2rem; /* Smaller icons on mobile */
        margin: 0 10px;
    }
}

/* Medium devices (tablets, 769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* For tablets, we might want the full nav, or still a hamburger.
       Your current CSS hides the hamburger and shows the nav by default above 768px.
       If you want hamburger for tablets too, adjust the max-width in the @media (max-width: 768px)
       to a higher value like (max-width: 1024px) or create a new media query.
       For now, it behaves like desktop on tablets.
    */
    .hero-name {
        font-size: 3rem;
    }

    .hero-tagline {
        font-size: 1.3rem;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 2 or 3 columns */
    }

    .about-grid {
        /* Can stack on medium too, depends on design. Keeping flex for wider tablet views */
        /* flex-direction: column; */
        gap: 30px;
    }

    .about-image img {
      max-width: 200px;
    }
}