/* General Body and Container Styles */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background: #333;
    color: #fff;
    padding: 1rem 0;
    border-bottom: #77aaff 3px solid;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    float: left;
    margin: 0;
    padding: 0;
    font-size: 2em;
}

header nav {
    float: right;
    margin-top: 10px;
}

header ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

header li {
    display: inline;
    padding: 0 15px;
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
    transition: color 0.3s ease;
}

header a:hover {
    color: #77aaff;
}

/* Hero Section */
#hero {
    background: url('hero-background.jpg') no-repeat center center/cover;
    color: #fff;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay for readability */
}

.hero-content {
    position: relative; /* Bring content above overlay */
    z-index: 1;
}

#hero h2 {
    font-size: 3.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

#hero p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.button {
    display: inline-block;
    color: #fff;
    background: #77aaff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.button:hover {
    background: #5588cc;
}

/* Section Padding */
.section-padding {
    padding: 60px 0;
    text-align: center;
}

/* About Section */
#about {
    background: #fff;
}

.about-content {
    display: flex;
    flex-wrap: wrap; /* Allows content to wrap on smaller screens */
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #77aaff;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.about-content p {
    flex: 1; /* Allows text to take up remaining space */
    text-align: left;
    max-width: 600px;
}


/* Portfolio Gallery */
#portfolio {
    background: #e6e6e6;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    text-align: left;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

.overlay h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.overlay p {
    font-size: 0.9em;
    margin-bottom: 0;
}

/* Contact Section */
#contact {
    background: #fff;
}

.contact-form {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
}

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
}

.contact-form button {
    width: 100%;
    padding: 12px;
    background: #77aaff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background 0.3s ease;
}

.contact-form button:hover {
    background: #5588cc;
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    color: #333;
    font-size: 2em;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #77aaff;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1,
    header nav {
        float: none;
        text-align: center;
    }

    header nav ul {
        padding-top: 10px;
    }

    header li {
        display: block;
        padding: 5px 0;
    }

    #hero h2 {
        font-size: 2.5em;
    }

    .about-content {
        flex-direction: column;
    }

    .about-content p {
        text-align: center;
    }

    .gallery {
        grid-template-columns: 1fr; /* Stack items vertically on small screens */
    }

    .contact-form {
        padding: 15px;
    }
}