/* Basic Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

h1, h2 {
    color: #2c3e50;
}

/* Sticky Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    width: 100%;
    background: #00158f;
    color: #fff;
    text-align: center;
    z-index: 1000;
}

.sticky-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* New: Adjusted padding to 0 for a full-width nav bar in desktop mode */
    padding: 0;
}

.sticky-nav .nav-title {
    /* New: Add padding to the title to prevent it from touching the edge */
    padding: 0 20px;
}

.sticky-nav .nav-title h1 {
    font-size: 1.5em;
    margin: 0;
    color: #fff;
}

.sticky-nav nav {
    flex-grow: 1;
}

.sticky-nav nav ul {
    padding: 0;
    list-style: none;
    margin: 0;
    display: flex;
    justify-content: space-between;
    height: 100px;
}

.sticky-nav nav li {
    position: relative;
    flex: 1;
    transition: background-color 0.3s ease;
}

.sticky-nav nav li:hover {
    background-color: #1029bb;
}

.sticky-nav nav li.active-nav {
    background-color: #1a35c9;
}

.sticky-nav nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: color 0.3s ease;
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hide hamburger menu and mobile title by default on large screens */
.menu-toggle, .nav-title {
    display: none;
}

/* --- Underline-style Navigation --- */
.sticky-nav nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #00aeff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.sticky-nav nav li.active-nav a::after {
    transform: scaleX(1);
}

.sticky-nav nav li:not(.active-nav):hover a::after {
    transform: scaleX(1);
}

/* Hero Section with Parallax Background */
.hero-section {
    position: relative;
    margin-top: -101px;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-bg {
    background-image: url('images/IMG_1367.JPG');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.parallax-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #00158fa1, rgba(0, 0, 0, 0.4));
    z-index: -1;
}

/* Centered Content over the background */
.hero-content {
    text-align: center;
    color: #fff;
    z-index: 2;
    padding: 10px;
    background: transparent;
    border-radius: 8px;
}

.hero-content h1 {
    font-size: 7em;
    margin-bottom: 0em;
    color: #fff;
}

.hero-content p {
    font-size: 1.7em;
    margin-top: 0;
}

/* Style for the "View My Work" button */
.scroll-button {
    display: inline-block;
    padding: 12px 24px;
    margin-top: 20px;
    background-color: #00158f;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.scroll-button:hover {
    background-color: #1029bb;
}

/* Sections */
.section {
    padding: 60px 0;
    text-align: center;
    position: relative;
    z-index: 2;
    background-color: #f4f4f4;
}

.section:nth-child(even) {
    background: #ecf0f1;
}

/* Project & Gallery Grids */
.project-grid, .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.project-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.project-item:hover {
    transform: translateY(-5px);
}

.gallery-grid img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

/* Video Section */
.video-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.video-container iframe {
    width: 100%;
    max-width: 560px;
    height: 315px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
}

/* --- 
## Responsive Design for Mobile
---
*/
@media(max-width: 768px) {
    .container {
        width: 95%;
    }
    
    .sticky-nav .container {
        justify-content: space-between;
        align-items: center;
        padding: 0 10px;
    }
    
    .sticky-nav .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #00158f;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        transition: transform 0.3s ease-out;
        transform: translateY(-100%);
        opacity: 0;
        z-index: 999;
    }

    .sticky-nav .nav-links.active {
        display: block;
        transform: translateY(0);
        opacity: 1;
    }

    .sticky-nav .nav-links ul {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        height: auto;
    }

    .sticky-nav .nav-links li {
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .sticky-nav .nav-links a {
        display: block;
        padding: 15px 20px;
        width: 100%;
        height: auto;
    }

    /* Mobile Title */
    .nav-title {
        display: block;
        color: #fff;
        flex-grow: 1;
        text-align: center;
    }

    .nav-title h1 {
        font-size: 1.5em;
        margin: 0;
        padding: 0;
        color: #fff;
    }

    /* Hamburger Menu Button */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-left: 15px;
        order: -1;
    }

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: #fff;
        margin: 5px 0;
        transition: transform 0.3s ease;
    }

    /* Hero Section */
    .hero-content h1 {
        font-size: 3em;
    }

    .hero-content p {
        font-size: 1.2em;
    }
    
    /* General Content */
    .section {
        padding: 40px 0;
    }

    .project-grid, .gallery-grid {
        grid-template-columns: 1fr;
    }

    .video-container {
        flex-direction: column;
        align-items: center;
    }

    .video-container iframe {
        height: 200px;
    }
}

/* --- Image Modal Pop-up --- */
.modal {
    display: none;
    position: fixed; 
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    max-width: 90%;
    animation: fadeIn 0.5s;
}

.modal-content h3 {
    color: #fff;
    font-size: 1.5em;
    margin-top: 0;
}

#modal-image {
    max-width: 100%;
    max-height: 80vh; 
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.close-btn {
    color: #fff;
    position: absolute;
    top: 15px;
    right: 35px;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #ccc;
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}