/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
}

/* Link Styles */
a {
    text-decoration: none;
    color: inherit;
}

connectlink {
    display: block;
    font-size: 1.1em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 0;
    margin-right: 0;
    color: #345779;
    font-weight: bold;
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}
connectlink::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgb(0, 113, 227); /* Transparent blue */
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

connectlink:hover {
    transform: scale(1.15); /* Zoom in effect */
}

connectlink:hover::after {
    opacity: 1; /* Show the blue highlight on hover */
}

/* Header and Navigation */
header {
    position: fixed;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 1200px;
    margin: auto;
}

.logo {
    font-size: 1.5em;
    font-weight: 600;
}

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

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: rgb(0, 113, 227);
}

/* Hero Section */
.hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

/* JavaScript will dynamically set the background image for the hero section based on HDR support */

/* Hero Content */
.hero-content h1 {
    font-size: 3em;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.5em;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #0071e3;
    color: #fff;
    border-radius: 25px;
    font-size: 1em;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #005bb5;
}

/* Sections */
section {
    padding: 80px 20px;
}

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

.about, .projects, .contact {
    text-align: center;
}

.about h2, .projects h2, .contact h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    position: relative;
}

.about h2::after, .projects h2::after, .contact h2::after {
    content: '';
    width: 60px;
    height: 3px;
    background-color: #0071e3;
    display: block;
    margin: 10px auto 0;
}

/* Projects Grid */
.projects .project-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    margin-top: 40px;
}

.project-item {
    background-color: #d5e3e9;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.project-item img {
    max-width: 100%;
    border-radius: 5px;
    margin-bottom: 15px;
}

.project-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.project-item p {
    font-size: 1em;
    color: #666;
}

/* Footer */
footer {
    background-color: #f5f5f5;
    padding: 20px 0;
    text-align: center;
}

footer p {
    margin-bottom: 10px;
    color: #666;
}

.social-links a {
    margin: 0 10px;
    color: #333;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #0071e3;
}
.small-text {
    font-size: 0.5rem; /* Adjust the size as needed */
}

/* Gallery Section */
.gallery {
    padding: 80px 20px;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 aspect ratio (height is 75% of the width) */
    border-radius: 10px;
}

.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the container, maintaining the aspect ratio */
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.return-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #7aafe4;
    color: rgb(214, 214, 214);
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
}

.return-btn:hover {
    background-color: #4f80b1;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* General mobile styles */
    .navbar {
        flex-direction: column;
        transition: padding 0.3s ease-in-out; /* Added transition for smooth collapsing */
        padding: 20px 40px; /* Default padding */
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        transition: margin 0.3s ease-in-out; /* Added transition for smooth collapsing */
    }

    .nav-links li {
        margin: 10px 0;
    }

    .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-content p {
        font-size: 1.2em;
    }

    .projects .project-grid {
        flex-direction: column;
        align-items: center;
    }

    .project-item {
        width: 100%;
    }

    /* Shrinking/Folding Navigation Bar */
    header {
        transition: transform 0.3s ease-in-out; /* Added transition for smooth hiding */
        transform: translateY(0); /* Default position */
        position: fixed;
        width: 100%;
        z-index: 1000;
    }

    header.shrink {
        padding: 10px 20px;
        background-color: rgba(255, 255, 255, 0.9);
    }

    header.shrink .navbar {
        padding: 10px 20px;
    }

    .logo {
        font-size: 1.2em;
        transition: font-size 0.3s ease-in-out;
    }

    header.shrink .logo {
        font-size: 1em;
    }

    header.hidden {
        transform: translateY(-100%); /* Move the header out of view */
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Mobile tap effect for zoom */
    .gallery-item:active .gallery-img {
        transform: scale(1.1);
    }
}
