/* General Styling */
:root {
    --primary-blue: #0056b3; /* Darker blue for accents */
    --secondary-blue: #e7f0fa; /* Light blue for backgrounds */
    --text-dark: #333;
    --text-light: #666;
    --white: #fff;
    --light-gray: #f8f8f8;
    --border-gray: #ddd;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-dark);
    background-color: var(--white);
}

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

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

h1 { font-size: 2.8em; }
h2 { font-size: 2.2em; text-align: center; margin-bottom: 40px;}
h3 { font-size: 1.6em; }

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

a:hover {
    color: #003d7a;
}

.button {
    display: inline-block;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.button:hover {
    background-color: #003d7a;
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-blue);
}

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

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

nav ul li a {
    font-weight: 600;
    color: var(--text-dark);
}

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

/* Hero Section */
#hero {
    position: relative;
    height: 80vh; /* Adjust as needed */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-video-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#hero::before { /* Overlay for better text readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 20px;
}

#hero h1 {
    color: var(--white);
    font-size: 3.5em;
    margin-bottom: 15px;
    line-height: 1.2;
}

#hero p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

/* About Section */
#about {
    padding: 60px 0;
    background-color: var(--light-gray);
    text-align: center;
}

#about p {
    max-width: 800px;
    margin: 20px auto;
    font-size: 1.1em;
    color: var(--text-light);
}

/* Portfolio Section */
#portfolio {
    padding: 60px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-item {
    background-color: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

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

.project-item img {
    width: 100%;
    height: 220px; /* Consistent image height */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-gray);
}

.project-item h3 {
    margin: 20px 15px 10px;
    font-size: 1.3em;
    color: var(--primary-blue);
}

.project-item p {
    font-size: 0.95em;
    color: var(--text-light);
    padding: 0 15px 15px;
    min-height: 70px; /* Ensure consistent excerpt height */
}

.project-item .project-link {
    display: block;
    background-color: var(--secondary-blue);
    color: var(--primary-blue);
    padding: 12px 15px;
    font-weight: 600;
    border-top: 1px solid var(--border-gray);
    transition: background-color 0.3s ease;
}

.project-item .project-link:hover {
    background-color: #d1e2f7;
}

/* Contact Section */
#contact {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

#contact h2 {
    color: var(--white);
}

#contact p {
    font-size: 1.1em;
    margin-bottom: 25px;
}

#contact a {
    color: var(--secondary-blue);
}

#contact a:hover {
    color: var(--white);
}

.social-links a {
    display: inline-block;
    margin: 0 10px;
    font-size: 1.1em;
    color: var(--secondary-blue);
    border: 1px solid var(--secondary-blue);
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--secondary-blue);
    color: var(--primary-blue);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 0 15px 10px;
    }

    #hero h1 {
        font-size: 2.5em;
    }

    #hero p {
        font-size: 1.1em;
    }

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

@media (max-width: 480px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.4em; }

    .hero-content {
        padding: 15px;
    }

    .button {
        padding: 10px 20px;
    }
}