/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --accent-color: #333333;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --easing: cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference; /* Ensures nav is visible over white/images */
}

.logo { 
    font-weight: 700; 
    font-size: 1.2rem; 
    letter-spacing: -0.5px; 
    text-transform: uppercase;
}

.nav-links a { 
    margin-left: 2rem; 
    font-size: 0.9rem; 
    opacity: 0.7; 
    transition: opacity 0.3s; 
}

.nav-links a:hover { opacity: 1; }

/* --- HERO SECTION (KINETIC EFFECT) --- */
.hero-container {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: none; /* Hide default cursor for immersion */
}

/* The floating media that follows mouse */
.cursor-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 250px;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.3s ease;
    mix-blend-mode: exclusion; /* Creates the inverted color effect */
    overflow: hidden;
    border-radius: 8px;
}

.cursor-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    mix-blend-mode: difference; /* Text interacts with the image below */
}

.hero-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    border-bottom: 1px solid #222;
    padding-bottom: 1rem;
}

.hero-row h1 {
    font-size: clamp(4rem, 11vw, 12rem);
    line-height: 0.9;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px #fff; /* Hollow text style */
    text-transform: uppercase;
    transition: color 0.3s;
    display: inline-block;
    white-space: nowrap;
    will-change: transform; /* Optimizes rendering for the skew effect */
}

.hero-row:hover h1 {
    color: #fff;
    font-style: italic;
}

.row-tag {
    font-size: 1rem;
    color: #fff;
    margin-left: 2rem;
    font-family: monospace;
    opacity: 0.6;
}

/* --- INFINITE MARQUEE --- */
.marquee-section {
    padding: 4rem 0;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
    background: #000;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 10; /* Above hero */
}

.marquee-track {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

.client-logo {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0 3rem;
    text-transform: uppercase;
    transition: color 0.3s;
    max-height: 5rem;
    filter: opacity(0.5);
}

.client-logo:hover { 
    filter: opacity(1);
    text-shadow: 0 0 10px rgba(255,255,255,0.5); 
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- PORTFOLIO GRID --- */
.work-section {
    padding: 8rem 4rem;
    background: var(--bg-color);
    position: relative;
    z-index: 10;
}

.section-header {
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 4rem;
    opacity: 0.5;
    letter-spacing: 1px;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
    display: inline-block;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 4rem 2rem;
}

.project-card {
    cursor: pointer;
    opacity: 0;
    transform: translateY(50px);
    transition: transform 0.8s var(--easing), opacity 0.8s ease;
}

.image-container {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #1a1a1a;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.6s var(--easing), filter 0.4s;
}

.project-card:hover .image-container img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.project-info h3 { font-size: 1.5rem; margin-bottom: 0.5rem; font-weight: 500; color: #fff; }
.project-info span { font-size: 0.9rem; color: #666; font-family: monospace; }

/* --- FOOTER --- */
footer {
    padding: 6rem 4rem;
    text-align: center;
    border-top: 1px solid #222;
    background: #050505;
}

footer h2 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 2rem; font-weight: 800; }
footer a { 
    border-bottom: 1px solid #fff; 
    padding-bottom: 5px; 
    font-size: 1.2rem;
    transition: opacity 0.3s;
}
footer a:hover { opacity: 0.6; }

.copyrightfooter {
    padding-top: 4.5rem;
}

/* --- UTILS --- */
.reveal { opacity: 1 !important; transform: translateY(0) !important; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    nav { padding: 1.5rem; }
    .hero-container { cursor: default; height: 80vh; }
    .cursor-media { display: none; } /* Disable floating image on touch */
    .hero-row h1 { -webkit-text-stroke: 1px #fff; font-size: 13vw; }
    .row-tag { display: none; }
    .work-section { padding: 4rem 1.5rem; }
    .grid { grid-template-columns: 1fr; }
}