/* Reset & Base Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #fafafa;
    --color-text: #1a1a1a;
    --color-text-light: #666666;
    --font-serif: 'Lora', serif;
    --font-sans: 'Inter', sans-serif;
    --spacing-section: 120px;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.6;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.4s ease, padding 0.4s ease;
}

.header.scrolled {
    background: rgba(250, 250, 250, 0.95);
    padding: 1.5rem 4rem;
    backdrop-filter: blur(10px);
}

.logo {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: 3rem;
}

.nav a {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Hide Hamburger on Desktop */
.hamburger {
    display: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 5rem;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        height: 60vh !important;
        min-height: 60vh !important;
        margin-bottom: 30px !important;
    }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    /* Fallback */
    background-size: cover;
    background-position: center;
    z-index: -1;
    transform: scale(1);
    transition: transform 10s ease-out;
    /* Slow zoom effect */
}

/* We will trigger this class via JS to make a slow breathing zoom */
.hero-bg.animate-zoom {
    transform: scale(1.05);
}

.hero-content {
    text-align: center;
    color: #ffffff;
    max-width: 800px;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Intro / About */
.intro {
    padding: var(--spacing-section) 2rem;
    display: flex;
    justify-content: center;
    text-align: center;
}

.intro-container {
    max-width: 800px;
}

.intro h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.intro p {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.link-btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 0.5rem;
}

/* Portfolio Grid */
.portfolio {
    padding: 0 4rem var(--spacing-section) 4rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem 2rem;
}

.portfolio-item {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #f0f0f0;
    aspect-ratio: 1/1;
}

.portfolio-item.full-width {
    grid-column: 1 / -1;
    aspect-ratio: 1/1;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    line-height: 1.3;
    margin-bottom: 0;
    font-family: var(--font-serif);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.portfolio-overlay p {
    font-size: 0.8rem;
    font-family: var(--font-sans);
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

/* Project Pages specific */
.project-page {
    padding-top: 120px;
    /* offset for header */
}

.project-hero {
    padding: 4rem 4rem 2rem 4rem;
    text-align: center;
}

.project-hero h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.project-hero p {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.project-gallery {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

/* Services Section */
.services {
    padding: 2rem 4rem var(--spacing-section) 4rem;
}

.services-header {
    text-align: center;
    margin-bottom: 6rem;
}

.services-header h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.services-header p {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.services-grid {
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.service-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.service-item.reverse {
    direction: rtl;
    /* simple trick to swap columns */
}

.service-item.reverse>* {
    direction: ltr;
    /* reset text alignment inside */
}

.service-img {
    aspect-ratio: 3/4;
    overflow: hidden;
    background-color: #f0f0f0;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}

.service-item:hover .service-img img {
    transform: scale(1.05);
}

.service-text {
    max-width: 400px;
}

.service-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.service-text p {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-light);
}

/* About Studio */
.about-studio {
    padding: 0 4rem var(--spacing-section) 4rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 6rem;
    align-items: center;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.about-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #f0f0f0;
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer */
.footer {
    padding: 4rem;
    border-top: 1px solid #eaeaea;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

.footer-col p,
.footer-col a {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* Fade Up Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-delay-1 {
    transition-delay: 0.2s;
}

/* Base style overrides for generated specific elements */
.project-details {
    padding: 0 2rem;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --spacing-section: 80px;
    }

    .portfolio-filters {
        margin-top: 80px !important;
    }

    .page-content-padding {
        padding-top: 80px !important;
    }

    .header {
        padding: 1.5rem 2rem;
        /* Revert to row to align logo and hamburger side-by-side */
        flex-direction: row;
        gap: 1rem;
    }

    .header.scrolled {
        padding: 1rem 2rem;
    }

    /* Hamburger Icon Container */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
        z-index: 1001;
    }

    /* Hamburger Lines */
    .hamburger span {
        display: block;
        height: 2px;
        width: 100%;
        background-color: var(--color-text);
        transition: all 0.3s ease;
    }

    /* Hamburger Animation to 'X' */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Fullscreen Mobile Navigation Overlay */
    .nav {
        position: fixed;
        top: 0;
        left: 100%;
        /* Hidden off-screen by default */
        width: 100%;
        height: 100vh;
        background: rgba(250, 250, 250, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: left 0.4s ease-in-out;
        z-index: 1000;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    .nav.active {
        left: 0;
        /* Slide in */
    }

    .nav a {
        font-size: 1.5rem;
        font-weight: 400;
    }

    .lang-select {
        margin-left: 0 !important;
        margin-top: 2rem;
        font-size: 1.2rem;
    }

    .hero-content {
        padding: 0 20px;
        box-sizing: border-box;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        padding: 0;
    }

    .intro {
        text-align: center;
    }

    .intro h2 {
        font-size: 2rem;
    }

    .portfolio {
        padding: 0 2rem var(--spacing-section) 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .services-header {
        margin-bottom: 3rem;
        text-align: center;
    }

    .services-header h2 {
        font-size: 2.2rem;
    }

    .project-hero {
        padding: 2rem 2rem 1rem 2rem;
        text-align: center;
    }

    .project-hero p {
        text-align: center;
    }

    .project-gallery {
        padding: 2rem;
        gap: 2rem;
    }

    .services-grid {
        gap: 4rem;
    }

    .service-item {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-item.reverse {
        direction: ltr;
    }

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

    .service-text h3 {
        font-size: 1.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

    .about-text h2 {
        font-size: 2.2rem;
    }

    .services,
    .about-studio {
        padding: 0 2rem var(--spacing-section) 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .page-content-padding {
        padding-top: 80px;
    }
}

/* --- Lightbox Gallery --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1001;
}

.lightbox-close:hover {
    color: #bbb;
}

.lightbox-nav {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    color: white;
    font-size: 3rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox-nav:hover {
    opacity: 0.8;
}

.lightbox-prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 5%;
}

.lightbox-next {
    right: 0;
    justify-content: flex-end;
    padding-right: 5%;
}

/* Padding for secondary pages to prevent header overlap */
.page-content-padding {
    padding-top: 120px;
}