/* General Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    
    background-image: url('images/bg-img1.jpg'); 
    background-repeat: repeat;
    background-position: center top;
    background-attachment: fixed;
    
    color: #212529;
    
    /* Page Transition Fade Effect */
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

body.fade-out {
    opacity: 0;
}

body.lightbox-open,
body.nav-open,
body.modal-open {
    overflow: hidden;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    z-index: 1000;
}

.logo-link {
    text-decoration: none;
    color: #212529;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 1.1rem;
}

/* Hamburger Toggle Button */
.hamburger-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2001;
    position: relative;
}

.hamburger-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #212529;
    border-radius: 2px;
    transition: transform 0.4s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.hamburger-toggle.active .bar {
    background-color: #212529;
}

.hamburger-toggle.active .bar:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.hamburger-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-toggle.active .bar:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* Full-Screen Flowing Navigation Overlay */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    
    background-image: url('images/bg-img1.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.5s ease;
}

.nav-menu a {
    text-decoration: none;
    color: #212529;
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu.active a {
    opacity: 1;
    transform: translateY(0);
}

.nav-menu.active a:nth-child(1) { transition-delay: 0.15s; }
.nav-menu.active a:nth-child(2) { transition-delay: 0.25s; }
.nav-menu.active a:nth-child(3) { transition-delay: 0.35s; }
.nav-menu.active a:nth-child(4) { transition-delay: 0.45s; }

nav a.active-link {
    font-weight: 600;
    border-bottom: 2px solid #212529;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 30px 10px 40px 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid #e1e1e1;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.25rem;
    color: #6c757d;
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

    .nav-menu a {
        font-size: 1.6rem;
    }
}

/* Projects Section */
.projects {
    padding: 30px 8% 8% 8%;
    border-top: 1px solid #e9ecef;
    background-color: rgba(255, 255, 255, 0.5);
}

.projects h2 {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

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

.project-card {
    background-color: #ffffff;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.project-card h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #212529;
    margin-bottom: 5px;
}

.project-card p {
    color: #6c757d;
    font-size: 0.98rem;
}

/* Gallery Section */
.gallery-section {
    padding: 30px 8% 8% 8%;
    background-color: rgba(255, 255, 255, 0.5);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.gallery-card {
    background-color: #ffffff;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.gallery-card-info h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #212529;
    margin-bottom: 5px;
}

.gallery-card-info p {
    color: #6c757d;
    font-size: 0.98rem;
}

/* Responsive Image Styling */
.project-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain; 
    background-color: #ffffff; 
    display: block;
    margin-bottom: 15px;
    border-radius: 2px;
    cursor: pointer;
    box-sizing: border-box;

}

@media (min-width: 992px) {
    .project-grid, .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); 
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .project-grid, .gallery-grid {
        grid-template-columns: 1fr; 
        gap: 20px;
    }

    .project-card, .gallery-card {
        width: 100%;
        box-sizing: border-box; 
    }

    .project-img {
        aspect-ratio: 4 / 3; 
    }
}

/* About Section */
.about-section {
    max-width: 850px;
    margin: 40px auto;
    padding: 35px;
    background-color: rgba(10, 25, 47, 0.85); 
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.about-section h2 {
    font-size: 1.7rem;
    color: #f8f9fa;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    letter-spacing: 0.5px;
}

.about-lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #e9ecef;
    margin-bottom: 20px;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #ced4da;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .about-section p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

.about-section strong {
    color: #ffffff;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-size: 0.85rem;
    background-color: #ffffff;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    z-index: 3000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90vw;  
    max-height: 80vh; 
    object-fit: contain;
}

#lightbox-title {
    color: #ffffff;
    font-family: sans-serif;
    font-size: 1rem;
    text-align: center;
    margin-top: 12px;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 3001;
}

.close-btn:hover {
    color: #939596;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #939596;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    z-index: 3001;
}

.nav-btn:hover {
    color: #939596;
}

.prev-btn {
    left: 30px;
}

.next-btn {
    right: 30px;
}

/* Back to Top Button Styles */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background-color: #212529;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #495057;
}

/* Contact Modal Styles */
.contact-modal {
    display: none;
    position: fixed;
    z-index: 4000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
}

.contact-modal.active {
    display: flex;
}

.contact-modal-content {
    background-image: url('images/bg-img1.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    padding: 5rem 4rem;
    border-radius: 4px;
    max-width: 450px;
    width: 90%;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #212529;
}

.contact-close-btn {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    color: #495057;
}

.contact-close-btn:hover {
    color: #000000;
}

.contact-modal-content h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #212529;
}

.contact-subtitle {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    font-size: 1rem;
}

.contact-item strong {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #495057;
    margin-bottom: 0.2rem;
}

.contact-item a, 
.contact-item span {
    color: #212529;
    text-decoration: underline;
}

.contact-item span {
    text-decoration: none;
}