@font-face {
    font-family: 'Basier Square';
    src: url('fonts/basiersquare-regular-webfont.woff2') format('woff2'),
         url('fonts/basiersquare-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Basier Square';
    src: url('fonts/basiersquare-bold-webfont.woff2') format('woff2'),
         url('fonts/basiersquare-bold-webfont.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #050505;
    --text: #ffffff;
    --text-muted: #888888;
    --accent: #ffffff;

    --neg-bg: #ececec;
    --neg-text: #050505;
    --neg-text-muted: #666666;
    --neg-accent: #050505;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Basier Square', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Video Background Canvas */
#video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    filter: grayscale(100%) contrast(1.2) brightness(0.4) blur(10px);
    transition: opacity 0.8s ease;
}

#video-bg.active {
    opacity: 0.3;
}

/* Global Noise/Grain Overlay */
body::after {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.04;
    z-index: 9999;
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding: 1.5rem;
    background: transparent;
    mix-blend-mode: difference;
    z-index: 100;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: lowercase;
    letter-spacing: 0.2em;
    font-weight: bold;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.6;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem;
    position: relative;
}

/* Negative Section Setup */
section.negative {
    background-color: var(--neg-bg);
    color: var(--neg-text);
}

section.negative h2,
section.negative .meta,
section.negative p {
    color: var(--neg-text-muted);
}

section.negative .project a,
section.negative .project .project-content {
    color: var(--neg-text);
}

section.negative .createur a {
    color: var(--neg-text);
    border-color: var(--neg-text-muted);
}

section.negative .createur a:hover {
    border-color: var(--neg-accent);
}

.hero {
    text-align: center;
}

.logo {
    max-width: 400px;
    width: 90%;
    margin-bottom: 3rem;
    mix-blend-mode: difference;
}

.logo svg {
    width: 100%;
    height: auto;
    fill: #fff;
}

.logo-path {
    opacity: 0;
    transform: translateY(10px);
}

.logo-path.animate {
    animation: fadeInPath 0.5s ease-out forwards;
}

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

.hero p {
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: normal;
    max-width: 600px;
    margin: 0 auto;
    letter-spacing: 0.02em;
}

h2 {
    font-size: 0.75rem;
    text-transform: lowercase;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-bottom: 4rem;
    font-weight: bold;
}

section.negative h2 {
    color: var(--neg-text-muted);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    width: 100%;
}

.project {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.project-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    z-index: 0;
    /* Apply grainy/B&W modern style */
    filter: grayscale(100%) contrast(1.4) brightness(0.8);
    transition: opacity 0.5s ease, filter 0.5s ease, transform 0.5s ease;
}

.project.has-video:hover .project-video {
    opacity: 0.9;
    filter: grayscale(100%) contrast(1.1) brightness(1.1);
    transform: scale(1.05);
}

.project a, .project .project-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    aspect-ratio: 16 / 9;
    padding: 1rem;
    text-decoration: none;
    color: var(--text);
    position: relative;
    z-index: 1;
    background: transparent;
}

.project.has-video a, .project.has-video .project-content {
    background: rgba(5, 5, 5, 0.4);
    transition: background 0.4s ease;
}

.project.has-video:hover a, .project.has-video:hover .project-content {
    background: transparent;
}

section.negative .project a,
section.negative .project .project-content {
    background: var(--neg-bg);
}

section.negative .project.has-video a,
section.negative .project.has-video .project-content {
    background: rgba(236, 236, 236, 0.4);
}

section.negative .project.has-video:hover a,
section.negative .project.has-video:hover .project-content {
    background: transparent;
}

.project h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.project .meta {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: lowercase;
    letter-spacing: 0.15em;
    font-weight: bold;
}

#createurs {
    text-align: center;
}

.createurs-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.createur {
    text-align: center;
}

.createur h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.createur a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    border-bottom: 2px solid var(--text-muted);
    transition: color 0.3s, border-color 0.3s;
    padding-bottom: 2px;
}

.createur a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

section.negative .createur a {
    color: var(--neg-text);
    border-color: var(--neg-text-muted);
}

section.negative .createur a:hover {
    color: var(--neg-accent);
    border-color: var(--neg-accent);
}

.createur p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
    text-transform: lowercase;
    letter-spacing: 0.1em;
}

footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: lowercase;
    letter-spacing: 0.15em;
    background: transparent;
}

footer.negative {
    background-color: var(--neg-bg);
    color: var(--neg-text-muted);
}

@media (max-width: 600px) {
    nav {
        gap: 1.5rem;
        padding: 1rem;
    }

    nav a {
        font-size: 0.65rem;
    }

    .logo {
        max-width: 250px;
    }

    section {
        padding: 5rem 1.5rem;
    }
}
