/* General Styling */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #000000;
    color: #e0e0e0;
}

h1, h2, h3 {
    color: #e0e0e0;
    font-weight: 700;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }

a {
    color: #4CAF50; /* A vibrant green accent color */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #66BB6A;
}

/* Layout and Containers */
header {
    background: #1e1e1e;
    padding: 1em 5%;
    position: fixed;
    width: 90%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.5em;
    font-weight: 700;
    color: #e0e0e0;
}

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

nav ul li {
    margin-left: 2em;
}

main {
    padding-top: 6em; /* To account for the fixed header */
}

section {
    padding: 4em 5%;
    max-width: 1200px;
    margin: 0 auto;
}

footer {
    background: #1e1e1e;
    text-align: center;
    padding: 2em 5%;
    margin-top: 2em;
    border-top: 1px solid #333;
}

/* Buttons and CTAs */
.cta-button {
    display: inline-block;
    background-color: #4CAF50;
    color: #fff;
    padding: 0.8em 1.5em;
    border-radius: 5px;
    margin-top: 1em;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #66BB6A;
}

/* Home Page Sections */
#hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 50px;
}

.hero-content {
    flex: 1;
    padding-right: 20px;
}

.hero-image {
    flex: 1;
    text-align: right;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

#hero h1 {
    font-size: 3em;
    margin-bottom: 0.5em;
}

#hero p {
    font-size: 1.2em;
    max-width: 600px;
    margin: 0 auto 2em;
}

#services-preview, #featured-projects {
    text-align: center;
}

.services-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2em;
    margin-top: 2em;
}

.service-item, .project-card {
    background: #1e1e1e;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.service-item:hover, .project-card:hover {
    transform: translateY(-5px);
}

.service-item img {
    width: 100%;
    height: auto;
    margin-bottom: 1em;
}

.project-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1em;
}

/* Services Page */
.service-detail {
    margin-bottom: 3em;
}

.service-detail ul {
    list-style: none;
    padding-left: 0;
}

.service-detail li {
    background: #282828;
    padding: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.pricing-section {
    text-align: center;
    margin-top: 4em;
    padding-top: 2em;
    border-top: 1px solid #333;
}

/* Portfolio Page */
.project-entry {
    display: flex;
    gap: 3em;
    margin-bottom: 5em;
    align-items: center;
    background: #1e1e1e;
    padding: 2em;
    border-radius: 8px;
}

.project-entry:nth-child(even) {
    flex-direction: row-reverse;
}

.project-entry img {
    width: 40%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.project-entry .project-content {
    width: 60%;
}

.github-link {
    display: inline-block;
    margin-top: 1em;
    font-style: italic;
    color: #4CAF50;
}

/* About Page */
.profile-card {
    display: flex;
    gap: 2em;
    align-items: flex-start;
}

.profile-card .headshot {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 3px solid #4CAF50;
}

.profile-text {
    flex: 1;
}

/* Contact Page */
#contact-form-section {
    max-width: 600px;
    margin: 0 auto;
}

#contact-form label {
    display: block;
    margin-top: 1em;
    font-weight: 700;
}

#contact-form input, #contact-form textarea {
    width: 100%;
    padding: 0.8em;
    margin-top: 0.5em;
    background: #282828;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
}

#contact-form button {
    width: 100%;
    margin-top: 1.5em;
    cursor: pointer;
}

.contact-info {
    margin-top: 3em;
}

.contact-info a {
    word-wrap: break-word;
}

/* --- Responsive Design for Smaller Screens --- */
@media (max-width: 768px) {
    /* General adjustments */
    body {
        font-size: 14px;
    }

    header {
        padding: 0.8em 2%;
        width: 96%;
    }
    
    main {
        padding-top: 5em;
    }

    section {
        padding: 3em 2%;
    }

    /* Navigation */
    nav {
        flex-direction: row; /* Keep it horizontal */
        flex-wrap: wrap; /* Allow items to wrap to the next line if needed */
        justify-content: center; /* Center items when they wrap */
    }

    nav .logo {
        margin-bottom: 0.5em; /* Small margin to separate from the links if it wraps */
        margin-right: 1em; /* Add some space between logo and links on a single line */
    }

    nav ul {
        flex-direction: row; /* Keep list items horizontal */
        flex-wrap: wrap; /* Allow the list items to wrap */
        align-items: center;
        justify-content: center;
        width: 100%; /* Ensure the list takes full width to wrap correctly */
        margin-top: 0.5em; /* Add a little space from the logo if it wraps */
    }

    nav ul li {
        margin: 0.5em 0.5em; /* Adjust margins for better spacing on mobile */
    }

    /* Hero Section */
    #hero {
        flex-direction: column;
        text-align: center;
        padding: 2em 0;
    }

    .hero-content, .hero-image {
        flex: none; /* Reset flex-grow */
        width: 100%;
        padding-right: 0;
    }

    .hero-image {
        margin-top: 2em;
        text-align: center; /* Center the image on mobile */
    }
    
    #hero h1 {
        font-size: 2em;
    }

    /* Grids */
    .services-grid, .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Project Entries */
    .project-entry {
        flex-direction: column;
        gap: 1em;
        margin-bottom: 2em;
    }

    .project-entry:nth-child(even) {
        flex-direction: column; /* Override the row-reverse for mobile */
    }

    .project-entry img,
    .project-entry .project-content {
        width: 100%;
    }
    
    .project-entry img {
        margin-bottom: 1em;
    }

    /* About Page Profile Card */
    .profile-card {
        flex-direction: column;
        align-items: center;
        gap: 1em;
    }

    .profile-card .headshot {
        width: 150px;
        height: 150px;
    }

    .profile-text {
        text-align: center;
    }
}
