:root {
    --bg-color: #0e0e0e;
    --text-color: #ffffff;
    --accent-color: #a0a0a0;
    --font-heading: 'Amatic SC', cursive;
    --font-subheading: 'Cormorant Garamond', serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; letter-spacing: 1px; }

.section-title {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #fff;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    transition: background 0.3s;
}

header.scrolled { background: rgba(0,0,0,0.95); }

.logo { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; }

nav ul { display: flex; gap: 30px; }
nav a { 
    font-family: var(--font-subheading); 
    font-size: 1.1rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    font-style: italic;
}
nav a:hover { color: #ccc; text-decoration: underline; }

.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('https://static.wixstatic.com/media/6b910d_6c1c5f89a155483cb6f3ac930c44176f~mv2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeIn 1.5s ease-out;
}

.hero h1 { font-size: 6rem; line-height: 1; margin-bottom: 10px; }
.hero p { 
    font-family: var(--font-subheading); 
    font-size: 1.5rem; 
    font-style: italic; 
    margin-bottom: 30px; 
}

.btn {
    display: inline-block;
    padding: 12px 35px;
    border: 1px solid white;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: var(--transition);
    background: rgba(0,0,0,0.4);
}
.btn:hover { background: white; color: black; }

.intro-summary {
    padding: 60px 10%;
    background: #111;
    text-align: center;
}
.intro-summary p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    color: #ddd;
}

.portfolio-split {
    display: flex;
    height: 80vh;
    width: 100%;
    overflow: hidden;
}

.split-item {
    flex: 1;
    position: relative;
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-left: 1px solid #222;
}

.split-item:hover { flex: 2; } 
.portfolio-split:hover .split-item:not(:hover) { filter: grayscale(100%) brightness(0.5); }

.split-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1s ease;
    z-index: 1;
}

.split-item:hover .split-bg { transform: scale(1.1); }

.split-content {
    position: relative;
    z-index: 2;
    text-align: center;
    background: rgba(0,0,0,0.5);
    padding: 20px 40px;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
}

.split-content h2 { font-size: 4rem; margin: 0; color: white; }
.split-content p { font-family: var(--font-subheading); font-size: 1.2rem; font-style: italic; }

.video-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.split-item:hover .video-overlay { opacity: 1; }

.clients { padding: 80px 10%; background-color: #0a0a0a; text-align: center; }

.logo-grid {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 40px; 
    align-items: center; 
    margin-top: 40px;
    opacity: 0.7;
    padding: 0 20px; 
}

.logo-grid img {
    width: clamp(
        120px, 
        18vw, 
        160px 
    );
    height: auto;
    filter: grayscale(100%) brightness(1.5);
    transition: 0.3s;
}

.logo-grid img:hover {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.05);
    opacity: 1;
}

.contact {
    padding: 100px 10%;
    background-image: url('https://static.wixstatic.com/media/6b910d_6c1c5f89a155483cb6f3ac930c44176f~mv2.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    text-align: center;
}
.contact::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
}
.contact-content { position: relative; z-index: 2; max-width: 600px; margin: 0 auto; }

.contact-link {
    font-size: 2rem;
    font-family: var(--font-heading);
    border-bottom: 2px solid #fff;
    padding-bottom: 5px;
}
.contact-link:hover { color: #ddd; border-color: #ddd; }

footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid #222;
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 768px) {
    h1 { font-size: 4rem; }
    .portfolio-split { flex-direction: column; height: auto; }
    .split-item { height: 50vh; }
    .split-item:hover { flex: 1; }
    .logo-grid { grid-template-columns: repeat(2, 1fr); }
    nav { display: none; }
}

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

.load-more-container {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 40px;
    width: 100%;
}

/* Ensure the button looks consistent with your theme */
.btn {
    cursor: pointer;
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
    padding: 15px 40px;
    font-family: var(--font-heading);
    font-size: 1.5rem; /* Larger font for Amatic SC */
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #fff;
    color: #000;
}

/* Smooth Fade In Animation for new images */
.fade-in {
    animation: fadeInImage 0.8s ease forwards;
    opacity: 0;
}

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

/* Masonry adjustments for large lists */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}

/* Mobile Breakpoints */
@media (max-width: 1024px) {
    .masonry-grid { column-count: 2; }
}

@media (max-width: 600px) {
    .masonry-grid { column-count: 1; }
}

/* --- EXISTING CSS FROM BEFORE GOES HERE --- */

/* --- FIX: HEADER OVERLAY & BACKGROUND --- */
/* We add a dark background to the header so it doesn't get lost or overlap messy content */
header {
    background-color: rgba(14, 14, 14, 0.95); /* Dark background matching body */
    backdrop-filter: blur(10px); /* Modern blur effect */
    border-bottom: 1px solid #222;
}

/* Push the hero down so it doesn't hide behind the fixed header */
.page-hero {
    margin-top: 80px; /* Adjust based on your header's actual height */
    height: 50vh; /* Keeps it neat, not taking up whole screen */
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    filter: brightness(0.6); /* Darkens image for text readability */
}

.page-hero .hero-content {
    position: relative;
    z-index: 2;
}

/* --- NO-JS MASONRY GRID --- */
.gallery-wrapper {
    padding: 60px 5%;
    background-color: #0e0e0e;
}

.css-masonry {
    /* This creates the masonry effect without JS */
    column-count: 3;
    column-gap: 20px;
}

.gallery-item {
    break-inside: avoid; /* Prevents images from being split across columns */
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    transition: transform 0.4s ease, filter 0.4s ease;
    cursor: zoom-in;
}

.gallery-item:hover img {
    transform: scale(1.03);
    filter: brightness(1.1);
}

/* --- RESPONSIVE COLUMNS --- */
@media (max-width: 1024px) {
    .css-masonry { column-count: 2; }
}
@media (max-width: 600px) {
    .css-masonry { column-count: 1; }
    .page-hero { margin-top: 60px; height: 40vh; }
}

/* --- PURE CSS LIGHTBOX (NO JS) --- */
/* This uses the CSS :target pseudo-class. 
   When you click a link with href="#img1", the element with id="img1" becomes the target.
*/

.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* When the lightbox ID is the URL target, display it */
.lightbox:target {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

/* Close Button Styling */
.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 3rem;
    font-family: var(--font-heading);
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
}

/* Clicking the background (the anchor itself) closes it by linking to #_ */
.lightbox:target {
    cursor: zoom-out;
}

/* --- ARCHIVE LINK SECTION --- */
.archive-link-container {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #222;
}

.archive-link-container h3 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.archive-link-container p {
    margin-bottom: 30px;
    font-family: var(--font-subheading);
    font-style: italic;
    color: #aaa;
}