/* General Resets & Variables */
:root {
    --primary-color: #007bff; /* A nice blue for accents */
    --secondary-color: #6c757d; /* A subtle grey */
    --text-color-dark: #333;
    --text-color-light: #f4f4f4;
    --bg-light: #ffffff;
    --bg-dark: #f8f9fa;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --border-radius: 8px;
    --shadow-light: 0 4px 10px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color-dark);
    background: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color-dark);
    margin-bottom: 0.8em;
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 1.5em;
}

h3 {
    font-size: 2em;
    margin-bottom: 1em;
    text-align: center; /* Adjust as needed */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: darken(var(--primary-color), 10%); /* This would require a preprocessor like Sass or a JS function */
    /* For pure CSS, pick a slightly darker shade directly */
    color: #0056b3;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.primary-btn:hover {
    background-color: #0056b3; /* Darker shade */
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 15px; /* Space between buttons */
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    transform: translateY(-2px);
}

.tertiary-btn {
    background-color: var(--bg-dark);
    color: var(--primary-color);
    border: 1px solid #ddd;
}

.tertiary-btn:hover {
    background-color: #e9ecef;
}

/* Header */
.main-header {
    background: var(--bg-light);
    padding: 20px 0;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
}

.logo a {
    color: var(--text-color-dark);
}

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

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    font-weight: 600;
    color: var(--secondary-color);
    position: relative; /* For underline effect */
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after {
    width: 100%;
}


/* Sections */
section {
    padding: 80px 0;
    text-align: center;
}

section:nth-of-type(even) { /* Apply different background to alternate sections */
    background: var(--bg-dark);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) 40%, var(--bg-light) 40%, var(--bg-light) 100%); /* Example gradient background */
    color: var(--text-color-dark);
    padding: 100px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh; /* Make it take up more viewport height */
    text-align: left;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 800px;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    margin-bottom: 25px;
    box-shadow: var(--shadow-light);
}

.hero-section h2 {
    font-size: 3.5em;
    margin-bottom: 15px;
    line-height: 1.2;
    text-align: left;
}

.hero-section p {
    font-size: 1.3em;
    margin-bottom: 40px;
    max-width: 600px;
    text-align: left;
}

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


/* About Section */
.about-section .container {
    max-width: 900px;
}

.about-section h3 {
    margin-bottom: 40px;
}

.about-section p {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 50px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: left;
}

.skill-category {
    background: var(--bg-light);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4em;
}

.skill-category ul {
    list-style: none;
}

.skill-category ul li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.skill-category ul li::before {
    content: '✓'; /* Checkmark icon */
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}


/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-item {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.project-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.project-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
}

.project-item h4 {
    font-size: 1.5em;
    margin: 20px 20px 10px 20px;
    color: var(--primary-color);
}

.project-item p {
    margin: 0 20px 20px 20px;
    font-size: 0.95em;
    color: #555;
}

.project-item .btn {
    display: block; /* Make button full width of padding */
    width: calc(100% - 40px); /* Account for 20px padding on each side */
    margin: 0 20px 20px 20px;
}


/* Contact Section */
.contact-section .container {
    max-width: 700px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1em;
}

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
}

.contact-form button {
    align-self: flex-start; /* Align button to the left */
    width: auto; /* Button only takes necessary width */
}

.social-links a {
    display: inline-block;
    margin: 0 15px;
    font-size: 1.1em;
    color: var(--secondary-color);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Footer */
.main-footer {
    background: var(--text-color-dark);
    color: var(--text-color-light);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9em;
}


/* Responsive Design (Mobile First Approach) */
/* Adjustments for smaller screens */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        text-align: center;
    }

    .main-nav ul {
        margin-top: 20px;
        flex-wrap: wrap; /* Allow navigation items to wrap */
        justify-content: center;
    }

    .main-nav ul li {
        margin: 0 10px 10px 10px; /* Adjust spacing */
    }

    .hero-section {
        padding: 60px 0;
        text-align: center;
        background: var(--bg-light); /* Simpler background for mobile */
        color: var(--text-color-dark);
    }

    .hero-content {
        align-items: center; /* Center content on smaller screens */
    }

    .hero-section h2 {
        font-size: 2.5em;
        text-align: center;
    }

    .hero-section p {
        font-size: 1.1em;
        text-align: center;
    }

    .hero-section .btn {
        margin: 10px auto; /* Center buttons */
    }

    .project-grid {
        grid-template-columns: 1fr; /* Stack projects on small screens */
    }

    .about-section h3,
    .projects-section h3,
    .contact-section h3 {
        font-size: 1.8em;
    }

    .skill-category {
        margin-bottom: 20px;
    }
}