/* --- Basic Reset & Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Enables smooth scrolling on navigation link clicks */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

h1, h2, h3 {
    line-height: 1.2;
}

section {
    padding: 60px 20px;
    text-align: center;
}

section h2 {
    margin-bottom: 40px;
    font-size: 2.5rem;
}

/* --- Header & Navigation --- */
header {
    background-color: #fff;
    padding: 1rem 0;
    position: fixed; /* Sticks the header to the top */
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
}

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

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #007bff; /* A nice blue for hover effect */
}

/* --- Hero Section --- */
.hero {
    background-color: #333;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #0056b3;
}

/* --- About Section --- */
#about {
    max-width: 800px;
    margin: auto;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 30px;
    text-align: left;
}

.about-content img {
    border-radius: 50%; /* Makes the image circular */
    width: 150px;
    height: 150px;
    object-fit: cover;
}

/* --- Projects Section --- */
#projects {
    background-color: #fff;
}

.project-grid {
    display: grid;
    /* This creates a responsive grid that fits as many columns as possible */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: auto;
}

.project-card {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px); /* Lifts the card on hover */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

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

.project-card h3 {
    margin-bottom: 10px;
}

.project-card p {
    margin-bottom: 15px;
}

.project-card a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.project-card a:hover {
    text-decoration: underline;
}

/* --- Contact Section --- */
#contact {
    max-width: 600px;
    margin: auto;
}

.social-links {
    margin-top: 25px;
}

.social-links a {
    margin: 0 15px;
    color: #333;
    text-decoration: none;
    font-size: 1.1rem;
}

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

/* --- Footer --- */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* --- Responsive Design for Smaller Screens --- */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }
}