:root {
    --gap-size: 40px;
    --gap-size-mobile: 15px;
    --overlay-bg: rgba(255, 255, 255, 0.9);
    --text-color: #000;
    --bg-color: #fff;
    --transition-speed: 0.4s;
    --font-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

html {
    overflow-y: scroll;
    /* Force vertical scrollbar to prevent layout jump */
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 41px 7.5% 60px;
    /* Top 41px, Sides 7.5%, Bottom 60px */
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- HEADER --- */
header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* 3 columns: Left Nav, Center Logo, Right Nav */
    align-items: center;
    margin-bottom: 45px;
    padding-bottom: 20px;
    position: relative;
    z-index: 100;
}

/* Nav Left (Col 1) */
.nav-left {
    grid-column: 1;
    justify-self: start;
}

/* Nav Right (Col 3) */
.nav-right {
    grid-column: 3;
    justify-self: end;
}

.logo {
    grid-column: 2;
    /* Center column */
    justify-self: center;
}

.logo img {
    height: 90px;
    /* Bigger logo as requested */
    display: block;
    width: auto;
}

/* Shared Nav Styles */
.nav-left ul,
.nav-right ul {
    display: flex;
    gap: 30px;
    list-style: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
    margin: 0;
    padding: 0;
}

.nav-left a,
.nav-right a {
    display: inline-block;
    transform: scaleY(1.15);
    transform-origin: center;
}

.nav-left a:hover,
.nav-right a:hover {
    opacity: 0.6;
    transition: opacity 0.3s;
}

/* Hamburger Icon (Hidden on Desktop) */
.burger-menu {
    display: none;
    /* Default hidden */
    grid-column: 3;
    justify-self: end;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    z-index: 200;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #000;
    transition: all 0.3s ease;
}

/* Burger Animation State */
body.menu-open .burger-menu span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

body.menu-open .burger-menu span:nth-child(2) {
    opacity: 0;
}

body.menu-open .burger-menu span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Nav Overlay (Hidden by default) */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 90;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-overlay ul {
    list-style: none;
    text-align: center;
    gap: 40px;
    display: flex;
    flex-direction: column;
}

.mobile-nav-overlay a {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 300;
    color: #000;
}

/* --- GRID --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-size);
    width: 100%;
}

.grid-item {
    position: relative;
    display: block;
    /* Make anchor act as block */
    overflow: hidden;
    background: #f4f4f4;
}

/* Aspect Ratio 5:6 (Height / Width = 6/5 = 1.2 = 120%) */
.grid-item-inner {
    position: relative;
    width: 100%;
    padding-top: 120%;
    /* 5:6 Aspect Ratio */
}

.grid-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
    /* Removed zoom transition */
}

/* Overlay Effect */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    z-index: 10;
}

.overlay h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
    transform: translateY(15px);
    transition: transform var(--transition-speed) ease;
}

/* Hover States & Mobile Touch Active State */
.grid-item:hover img,
.grid-item.hover-active img {
    transform: none;
    /* No Zoom */
}

.grid-item:hover .overlay,
.grid-item.hover-active .overlay {
    opacity: 1;
}

.grid-item:hover .overlay h3,
.grid-item.hover-active .overlay h3 {
    transform: translateY(0);
}

/* --- PROJECT PAGE --- */
.project-container {
    width: 100%;
    max-width: 1100px;
    /* Limit max width for readability on huge screens, or remove for full bleed */
    margin: 0 auto;
}

.project-info {
    text-align: center;
    margin-bottom: 80px;
    padding: 0 20px;
}

.project-info h1 {
    font-size: 24px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.project-info .client {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.project-info .credits {
    font-size: 11px;
    line-height: 1.6;
    color: #888;
}

.project-info .credits span {
    color: #000;
}

.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 60px;
    /* Space between images */
    margin-bottom: 100px;
}

.project-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.project-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.project-nav a:hover {
    text-decoration: underline;
}

/* --- INTRO TEXT (SEO) --- */
.intro-text {
    max-width: 1000px;
    margin: 80px auto 0;
    /* Top margin similar to footer */
    padding: 0 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    font-size: 12px;
    line-height: 1.7;
    color: #444;
    text-align: justify;
    font-weight: 300;
}

@media (max-width: 768px) {
    .intro-text {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 60px;
        text-align: left;
    }
}

/* --- FOOTER --- */
footer {
    margin-top: 100px;
    text-align: center;
    font-size: 10px;
    /* Reduced from 11px */
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    /* Reduced from 1px */
}

/* --- RESPONSIVE --- */

/* Tablet & Smaller Desktop */
@media (max-width: 1120px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Switch to Burger on Tablet */
    .nav-left,
    .nav-right {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    body {
        padding: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }

    .logo img {
        height: 35px;
    }

    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--gap-size-mobile);
    }

    header {
        margin-bottom: 40px;
    }

    /* For VERY small screens, maybe 1 col? 
       User said 2 cols on mobile, but Odalisques often does 1.
       Let's stick to user request: "en deux quand ca devient trop petit ou sur version mobile"
       So keeping 2 columns even on mobile.
    */
}

/* --- CONTACT PAGE --- */
.contact-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.contact-text {
    flex: 1;
    text-align: left;
    min-width: 200px;
}

.contact-visual {
    flex: 0 0 300px;
    max-width: 100%;
}

.contact-visual img {
    width: 100%;
    height: auto;
    display: block;
}

.contact-text h1 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 400;
    color: #000;
}

.contact-text p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 5px;
    font-weight: 300;
    color: var(--text-color);
}

.contact-text a {
    color: inherit;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.contact-text a:hover {
    border-color: #000;
}

.nav-right a.active,
.mobile-nav-overlay a.active {
    /* Style for active link if needed */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
        text-align: center;
        margin-top: 40px;
        gap: 40px;
        max-width: 100%;
    }

    .contact-text {
        text-align: center;
    }

    .contact-visual {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
    }
}

/* --- FOOTER RESPONSIVE --- */
.footer-content {
    display: inline-block;
}

.footer-line,
.footer-sep {
    display: inline;
}

@media (max-width: 768px) {
    .footer-line {
        display: block;
        margin-bottom: 3px;
        line-height: 1.4;
    }

    .footer-sep {
        display: none;
    }

    footer {
        margin-top: 60px;
        padding-bottom: 30px;
    }
}

/* --- SCROLL TOP BUTTON --- */
#scrollTop {
    position: fixed;
    bottom: 50px;
    /* Mobile style applied globally */
    right: 40px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.5);
    /* 50% transparent white */
    color: #000;
    /* Minimalist border removed */
    border: none;
    /* Override default button border */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.2s ease;
    z-index: 900;
    /* Above images but below overlay menu if needed */
}

#scrollTop.visible {
    opacity: 1;
    pointer-events: all;
}

@media (hover: hover) {
    #scrollTop:hover {
        transform: translateY(-3px);
        background-color: #000;
        color: #fff;
    }
}

#scrollTop svg {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
    display: block;
}