/* =====================================
   RESET / BASE
===================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    background: #111;
    color: #e6e2db;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

@media (hover: hover) and (pointer: fine) {
    html, body {
        cursor: none;
    }
}

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


/* =====================================
   NAV
===================================== */

.nav {
    position: fixed;
    inset: 0 0 auto 0;
    width: 100%;
    padding: 16px 20px;
    z-index: 100;

    background: rgba(20, 20, 20, 0.65);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);

    transition: transform 0.35s ease, opacity 0.35s ease;
}

.nav.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 1;
}

.nav-logo img {
    height: 26px;
    display: block;
    cursor: pointer;
}


/* =====================================
   NAV – MOBILE
===================================== */

@media (max-width: 900px) {

    .nav-inner {
        justify-content: flex-end;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 20px;

        flex-direction: column;
        align-items: flex-end;
        gap: 18px;

        padding: 24px 16px;
        background: #151515;

        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
    }
}


/* =====================================
   HERO
===================================== */

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.slideshow,
.slide {
    position: absolute;
    inset: 0;
}

.slide {
    background-size: cover;
    background-position: center;
    backface-visibility: hidden; /*Prevents GPU flicker on some browsers.*/

    opacity: 0;
    transform: scale(1.04);
    transition:
        opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 6s ease;

    will-change: opacity, transform;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.15);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;

    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.35) 0%,
        rgba(0,0,0,0.55) 50%,
        rgba(0,0,0,0.8) 100%
    );
}


/* Overlay */

.overlay {
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;

    opacity: 0;
    transform: translateY(20px);
    animation: heroFade 1.2s ease forwards 0.3s;
}

.logo,
.tagline {
    transform: translateY(20px);
    animation: heroFade 1s ease forwards;
}

.logo {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 500;
    letter-spacing: 2px;
    margin: 0 0 12px;
}

.tagline {
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.75;
    animation-delay: 0.2s;
}

@keyframes heroFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =====================================
   WORK SECTION
===================================== */

.work-preview {
    background: #151515;
    padding: 120px 20px 140px;
}

@media (min-width: 900px) {
    .work-preview {
        padding: 160px 60px 180px;
    }
}

.section-title {
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-divider {
    max-width: 1200px;
    margin: 0 auto 60px;
    height: 1px;
    background: rgba(255,255,255,0.08);
}


/* =====================================
   GRID
===================================== */

.grid {
    max-width: 1200px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 700px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-item {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.grid-item.reveal {
    opacity: 1;
    transform: translateY(0);
}

.grid-item:hover {
    transform: translateY(-4px);
}

.grid-image {
    position: relative;
    width: 100%;
    padding-top: 65%;
    background-size: cover;
    background-position: center;
}

.grid-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    transition: background 0.4s ease;
}

.grid-item:hover .grid-image::after {
    background: rgba(0,0,0,0.45);
}

.grid-caption {
    margin-top: 6px;
}

.grid-caption h3 {
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: 2px;
    font-weight: 500;
    opacity: 0.9;
}


/* =====================================
   NOISE FILTER
===================================== */

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;

    opacity: 0.035;

    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)'/%3E%3C/svg%3E");

    mix-blend-mode: overlay;
}


/* =====================================
   CUSTOM CURSOR
===================================== */

.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;

    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    pointer-events: none;

    transform: translate(-50%, -50%) scale(0);
    opacity: 0;

    transition:
        transform 0.12s ease,
        width 0.2s ease,
        height 0.2s ease,
        border-color 0.2s ease,
        opacity 0.2s ease;

    z-index: 10000;
}

.cursor::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
