/* ----- CSS Variables ----- */
:root {
    --color-primary: #FAF9F6; /* Soft Off-White */
    --color-secondary: #EBE5DF; /* Warm Beige */
    --color-accent: #C2A878; /* Soft Gold */
    --color-text-dark: #2C2C2C; /* Charcoal */
    --color-text-light: #737373; /* Medium Grey */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-primary);
    color: var(--color-text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 400;
}

/* ----- Navigation ----- */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    z-index: 100;
    transition: var(--transition-smooth);
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 0.9rem;
    letter-spacing: 4px;
    font-weight: 500;
    color: #fff;
    transition: color 0.4s ease;
}

#navbar.scrolled .logo {
    color: var(--color-text-dark);
}

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

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition-smooth);
}

#navbar.scrolled .nav-links a {
    color: var(--color-text-dark);
}

.nav-links a:hover {
    color: var(--color-accent);
}

/* ----- Hero Section ----- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: scale(1.05); /* Slight scale for parallax feel */
    animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    z-index: 2;
}

.hero-content {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    max-width: 100%;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 3;
    color: #fff;
}

.hero-text-left {
    text-align: left;
}

.hero-content .title {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.hero-content .date {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 0;
}

.btn-scroll {
    display: inline-block;
    padding: 15px 35px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    background: transparent;
}

.btn-scroll:hover {
    background: #fff;
    color: var(--color-text-dark);
}

/* ----- Gallery Section ----- */
.gallery-section {
    padding: 0.5rem 1rem 2rem 1rem;
    max-width: 100%;
    margin: 0 auto;
}

/* Portfolio Filter Bar */
.portfolio-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    padding-left: 1rem;
}

.filter-title-block h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--color-text-dark);
    margin-bottom: 0.2rem;
    line-height: 1;
}

.filter-subtitle {
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: #999;
    text-transform: uppercase;
}

.filter-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.filter-links a {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: #888;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.filter-links a:hover,
.filter-links a.active {
    color: var(--color-text-dark);
}

/* Masonry Grid */
.masonry-grid {
    column-count: 4;
    column-gap: 8px;
}

.grid-item {
    break-inside: avoid;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border-radius: 0;
}

.grid-item img,
.grid-item video {
    width: 100%;
    display: block;
    border-radius: 0;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.grid-item:hover img,
.grid-item:hover video {
    transform: scale(1.05);
}

/* Dark overlay on hover */
.grid-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.grid-item:hover::after {
    opacity: 1;
}

/* Video play button overlay */
.grid-item:has(.video-poster)::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    font-size: 3rem;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.grid-item:has(.video-poster):hover::before {
    transform: translate(-50%, -50%) scale(1.2);
    color: #fff;
}

/* ----- Footer ----- */
footer {
    background-color: var(--color-secondary);
    padding: 5rem 2rem;
    text-align: center;
}

.footer-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.footer-content p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.copyright {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.lightbox.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

#lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--color-accent);
}

/* ----- Animations ----- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.fade-in-up {
    animation: fadeInUp 1.5s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- Responsive Design ----- */
@media (max-width: 992px) {
    .masonry-grid {
        column-count: 2;
        column-gap: 4px;
    }

    .grid-item {
        margin-bottom: 4px;
    }

    .hero-content .title {
        font-size: 4rem;
    }

    .portfolio-filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        margin-bottom: 0;
        padding: 1rem;
        border-bottom: 1px solid #e5e5e5;
    }

    .filter-links {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 1.5rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-links::-webkit-scrollbar {
        display: none;
    }

    .filter-links li {
        flex-shrink: 0;
    }

    .gallery-section {
        padding: 0 0 1rem 0;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 2;
        column-gap: 3px;
    }

    .grid-item {
        margin-bottom: 3px;
    }
    
    .nav-links {
        display: none;
    }
    
    .logo {
        margin: 0;
    }
    
    .hero-content .title {
        font-size: 2.5rem;
    }
    
    .hero-content .subtitle {
        font-size: 0.8rem;
    }

    .hero-content {
        bottom: 20px;
    }

    .hero-action-right {
        bottom: 20px;
        right: 15px;
    }

    .btn-scroll {
        font-size: 0.7rem;
        padding: 8px 16px;
    }

    .filter-title-block h2 {
        font-size: 1.4rem;
    }

    .filter-subtitle {
        font-size: 0.65rem;
    }

    .filter-links a {
        font-size: 0.75rem;
    }

    .filter-links a.active {
        font-weight: 700;
        border-bottom: 2px solid var(--color-text-dark);
        padding-bottom: 2px;
    }

    footer {
        padding: 3rem 1.5rem;
    }

    .footer-content h3 {
        font-size: 1.8rem;
    }

    /* Video play button smaller on mobile */
    .grid-item:has(.video-poster)::before {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 40vh;
    }

    .hero-content .title {
        font-size: 2rem;
    }

    #navbar {
        padding: 1rem;
    }

    #navbar.scrolled {
        padding: 0.8rem 1rem;
    }

    .portfolio-filter-bar {
        padding: 0.8rem;
    }

    .filter-links {
        gap: 1.2rem;
    }
}
