:root {
    /* Color Palette */
    --color-bg: #000000;
    --color-text-primary: #FFFFFF;
    --color-text-secondary: rgba(255, 255, 255, 0.5);

    --color-accent: #EE344A;
    /* Vibrant Red */
    --color-accent-hover: #D02035;
    --color-border-dim: rgba(255, 255, 255, 0.2);
    --color-white: #FFFFFF;

    /* Spacing System (8px grid) */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    /* Main edge margin */
    --space-4: 32px;
    --space-5: 40px;
    --space-6: 48px;
    --space-8: 64px;
    --space-10: 80px;

    /* Fonts */
    --font-display: 'Silkscreen', 'VT323', monospace;
    /* Pixel/Marquee */
    --font-sans: 'Inter', sans-serif;
    /* Body/Headings */
    --font-mono: 'JetBrains Mono', monospace;
    /* Tags/Meta */

    /* Layout */
    --header-height: 80px;
    --footer-height: 60px;
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    height: 100%;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    min-height: 100%;
    cursor: none;
    /* Hide default cursor */
}

/* Custom Cursor Styles */
/* Custom Cursor Styles */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 64px;
    height: 64px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 9999;
    /* Removed translate/margin hacks - positioning will be handled by JS centering */
    will-change: transform;
    mix-blend-mode: normal;
    /* Dark Red Filter Effect */
    filter: invert(15%) sepia(95%) saturate(6000%) hue-rotate(355deg) brightness(85%) contrast(120%);
}

@keyframes rainbow-flicker {
    0% {
        filter: sepia(1) saturate(500%) hue-rotate(0deg) brightness(1.2);
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        filter: sepia(1) saturate(500%) hue-rotate(360deg) brightness(1.2);
        opacity: 1;
    }
}

.cursor-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

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

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

/* --- Layout Structure --- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    padding: var(--space-3);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 100;
    color: #000000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    /* Added blur for legibility */
}

.header-left {
    display: flex;
    gap: var(--space-4);
}

.header-info {
    display: flex;
    gap: var(--space-6);
}

.site-header .info-block {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0.5px;
    color: #8B0000 !important;
    /* Dark Red */
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
    /* Required for transform */
}

.site-header .info-block::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header .info-block:hover {
    color: var(--color-accent) !important;
    transform: translateY(-1px);
}

.site-header .info-block:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.logo svg {
    display: block;
}

.menu-btn {
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 14px;
    padding: 0;
}

.menu-icon {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    /* Changed to white */
}

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-height);
    padding: 0 var(--space-3) var(--space-3) var(--space-3);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 100;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    pointer-events: none;
    /* Let clicks pass through empty areas */
}

.site-footer>* {
    pointer-events: auto;
}

.hire-link {
    color: var(--color-accent);
    font-weight: 600;
    transition: color 0.3s ease;
}

.hire-link:hover {
    color: var(--color-white);
}

.footer-right {
    color: var(--color-accent);
}

.separator {
    margin: 0 var(--space-1);
}

/* --- Hero Section --- */

.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3);
    text-align: center;
}

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

.hero-content h1 {
    font-family: var(--font-sans);
    font-size: clamp(32px, 6vw, 80px);
    /* Responsive sizing */
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-5);
}

.play-reel-btn {
    background: transparent;
    padding: 0;
    transition: transform 0.3s ease;
}

.play-reel-btn:hover {
    transform: scale(1.1);
}

/* --- Project Cases --- */

.project-case {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    padding: var(--space-4);
    overflow: hidden;
}

/* Marquee Background */
.marquee-container {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%) rotate(-5deg);
    /* Slight tilt for dynamism */
    white-space: nowrap;
    opacity: 0.05;
    /* Reduced opacity significantly */
    /* Subtle background */
    pointer-events: none;
    z-index: 0;
}

.hero-section .marquee-text {
    color: #8B0000;
    /* Dark Red */
    opacity: 0.1;
    /* Reduced opacity */
    /* Slightly nicer for color */
}

.marquee-text {
    font-family: var(--font-display);
    font-size: 15vw;
    /* Reduced from 25vw */
    /* Huge size */
    line-height: 0.8;
    color: var(--color-white);
    display: inline-block;
    padding-left: 100%;
    /* Start off screen */
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-100%, 0);
    }
}

.project-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
}

.project-tags {
    margin-bottom: var(--space-3);
    display: flex;
    justify-content: center;
    gap: var(--space-1);
}

.tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-dim);
    padding: 4px 8px;
    border-radius: 99px;
    /* Capsule */
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.project-title {
    font-family: var(--font-display);
    /* Use the pixel font for contrast or sans? Original used Sans for titles but let's check subagent: actually it said h1_large used specific styles. Let's use Sans for cleanliness but bold. */
    /* Subagent said: "Sans-Serif Font (untitledSans): Used for main headlines" */
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: clamp(40px, 8vw, 100px);
    margin-bottom: var(--space-4);
    letter-spacing: -0.03em;
}

.project-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    height: 48px;
    padding: 0 var(--space-4);
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #000;
    /* Black text on red for high contrast as per source */
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--color-white);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .site-header {
        height: auto;
        flex-wrap: wrap;
        backdrop-filter: blur(15px);
        background: rgba(255, 255, 255, 0.85);
    }

    .header-left {
        width: 100%;
        justify-content: space-between;
        margin-bottom: var(--space-2);
        align-items: center;
    }

    .header-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
    }

    .header-info .info-block {
        font-size: 10px;
    }

    .header-right {
        width: 100%;
        justify-content: center;
    }

    .project-case {
        justify-content: center;
        padding-bottom: 80px;
        /* Space for footer */
    }

    .marquee-text {
        font-size: 40vw;
        /* Even bigger on mobile relative to width */
    }

    .hero-footer-info {
        position: absolute;
        bottom: var(--space-10);
        left: 0;
        width: 100%;
        text-align: center;
        font-family: var(--font-mono);
        font-size: 12px;
        color: var(--color-text-secondary);
        padding: 0 var(--space-3);
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .marquee-text {
        animation: none;
        transform: translate(0, 0);
        /* Reset generic transform if needed */
        margin-left: 0;
    }

    .play-reel-btn:hover,
    .btn-primary:hover {
        transform: none;
    }
}

/* --- Slide Interaction Effects --- */

.hero-section,
.project-case,
.cases-overview-section,
.hire-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease, filter 1s ease;
    will-change: transform, opacity, filter;
}

.slide-inactive {
    transform: scale(0.92);
    opacity: 0.4;
    filter: grayscale(100%) blur(2px);
    pointer-events: none;
}

.slide-active {
    transform: scale(1);
    opacity: 1;
    filter: grayscale(0%) blur(0px);
    pointer-events: auto;
    z-index: 10;
}

/* Cursor Interaction State */
body.is-scrolling .custom-cursor {
    transform: scale(0.5);
    /* Shrink cursor while scrolling */
    background-color: #ff0044;
    /* Distinctive trigger color */
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

/* --- Text Effects --- */

@keyframes textFlowRed {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Apply directly to Hero and Project Titles */
.hero-content h1,
.project-title {
    background: linear-gradient(to right, #ffffff 20%, #8B0000 40%, #ff3333 50%, #8B0000 60%, #ffffff 80%);
    background-size: 200% auto;
    color: #ffffff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textFlowRed 6s linear infinite;
    /* Slower, more elegant speed */
}

/* Header Nav Styling */
.header-nav {
    text-align: right;
    display: flex;
    gap: var(--space-4);
    /* Space between links */
}

/* Ensure info-block behaves as link in right header */
.header-nav .info-block {
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.header-nav .info-block:hover {
    color: var(--color-accent) !important;
}

/* Header Navigation Buttons */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.header-nav-buttons {
    display: flex;
    gap: var(--space-2);
}

.header-btn {
    font-family: var(--font-mono);
    font-size: 13px;
    /* Slightly larger for readability */
    text-transform: uppercase;
    text-decoration: none;
    color: #8B0000;
    /* Dark Red Text */
    background-color: transparent;
    padding: 8px 12px;
    border: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.header-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-btn:hover {
    color: var(--color-accent);
    /* Brighter Red on Hover */
    background-color: rgba(139, 0, 0, 0.05);
    /* Very subtle background tint */
    transform: translateY(-1px);
    box-shadow: none;
    /* Removed heavy shadow */
}

.header-btn:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

@media (max-width: 768px) {
    .header-nav-buttons {
        gap: var(--space-2);
        width: 100%;
        justify-content: space-evenly;
    }

    /* Show all buttons on small screens */
    .header-nav-buttons .header-btn:not(:first-child) {
        display: flex;
    }

    .header-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 60px;
    }

    .site-header {
        padding: var(--space-2);
    }

    .project-case {
        padding: var(--space-2);
    }

    .project-title {
        font-size: 32px;
        /* Smaller, fixed size for mobile */
    }

    /* Ensure footer doesn't overlap content too much */
    .site-footer {
        background: linear-gradient(to top, #000000 0%, transparent 100%);
    }
}