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

/* Neuebit Font */
@font-face {
    font-family: 'NeueBit';
    src: url('fonts/PPNeueBit-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PPMondwest';
    src: url('fonts/PPMondwest-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Dark Theme (Default) */
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #DDFF40;
    --secondary-color: #666666;
    --border-color: #333333;
    --cursor-size: 20px;
    --cursor-follower-size: 45px;
    --header-bg: rgba(0, 0, 0, 0.9);
    --section-gap: 8rem;
}

:root[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #0a0a0a;
    --accent-color: #ff0000;
    --secondary-color: #999999;
    --border-color: #e0e0e0;
    --header-bg: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"],
body[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #0a0a0a;
    --accent-color: #ff0000;
    --secondary-color: #999999;
    --border-color: #e0e0e0;
    --header-bg: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"],
html[data-theme="light"] body,
body[data-theme="light"] {
    background-color: #ffffff !important;
    color: #0a0a0a;
}

/* Ensure all sections are pure white in light mode */
html[data-theme="light"] section,
body[data-theme="light"] section,
html[data-theme="light"] .hero,
body[data-theme="light"] .hero,
html[data-theme="light"] .projects,
body[data-theme="light"] .projects,
html[data-theme="light"] .about,
body[data-theme="light"] .about,
html[data-theme="light"] .contact,
body[data-theme="light"] .contact {
    background-color: #ffffff !important;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    background-color: #000000;
    height: 100%;
}

body {
    font-family: 'NeueBit', 'Space Grotesk', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    cursor: none;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

html[data-theme="light"] {
    background-color: #ffffff !important;
}


html[data-theme="light"] {
    background-color: #ffffff !important;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 2px solid var(--text-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s, background-color 0.2s;
    mix-blend-mode: difference;
    opacity: 1;
    visibility: visible;
    display: block;
    background: transparent;
}

.cursor.active {
    width: calc(var(--cursor-size) * 1.5);
    height: calc(var(--cursor-size) * 1.5);
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    opacity: 0.3;
}

/* Light mode cursor visibility */
html[data-theme="light"] .cursor,
body[data-theme="light"] .cursor {
    mix-blend-mode: normal;
    border-color: #0a0a0a;
    background-color: transparent;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .cursor.active,
body[data-theme="light"] .cursor.active {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    opacity: 0.5;
    box-shadow: none;
}

.cursor-follower {
    position: fixed;
    width: var(--cursor-follower-size);
    height: var(--cursor-follower-size);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                width 0.3s, height 0.3s, border-color 0.3s;
    mix-blend-mode: difference;
    opacity: 1;
    visibility: visible;
    display: block;
}

body[data-theme="light"] .cursor-follower {
    border-color: rgba(0, 0, 0, 0.15);
    mix-blend-mode: normal;
}

html[data-theme="light"] .cursor-follower.active,
body[data-theme="light"] .cursor-follower.active {
    border-color: rgba(0, 0, 0, 0.3);
}

.cursor-follower.active {
    width: calc(var(--cursor-follower-size) * 1.3);
    height: calc(var(--cursor-follower-size) * 1.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 4rem;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-inner .nav {
    margin-left: auto;
    margin-right: 2rem;
}

.logo-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    line-height: 1;
    margin-bottom: 0;
    padding-bottom: 0;
}

.logo:hover {
    color: var(--accent-color);
}

.portfolio-label {
    font-family: 'PPMondwest', 'Space Grotesk', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-color);
    line-height: 1;
    margin-top: -0.1rem;
    opacity: 0.8;
    user-select: none;
    pointer-events: none;
}

.time-display {
    font-family: 'PPMondwest', 'Space Grotesk', monospace;
    font-size: 0.625rem;
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.2;
    margin-top: 0.1rem;
    opacity: 0.8;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
}

.coordinate-display {
    font-family: 'PPMondwest', 'Space Grotesk', monospace;
    font-size: 0.625rem;
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.2;
    margin-top: 0.1rem;
    opacity: 0.8;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.nav {
    display: flex;
    gap: 3rem;
}

.nav-link {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 0.9625rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navigation Dropdowns */
.nav-link-wrapper {
    position: relative;
    display: inline-block;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% - 0.25rem);
    left: 0;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    background: transparent;
    border: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease 0.05s, visibility 0.15s ease 0.05s;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: auto;
    white-space: nowrap;
}

.nav-link-wrapper:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.nav-dropdown:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'PPMondwest', 'Space Grotesk', monospace;
    font-size: 0.77rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: transparent;
    border: none;
    text-align: left;
    transition: color 0.3s ease;
    cursor: pointer;
    position: relative;
    margin: 0;
}

.dropdown-item:hover {
    color: var(--accent-color);
}

/* Legacy client-item styles (keeping for compatibility) */
.client-item {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

.client-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--accent-color);
}

/* Theme Toggle */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-color);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    border-color: var(--accent-color);
    transform: rotate(180deg);
}


/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 4rem 10rem;
    padding-top: calc(1.5rem * 2 + 1px + 2.5rem); /* Header top padding + bottom padding + border + logo height = exact header height, 0 visual gap */
    overflow: hidden;
    scroll-margin-top: 100px; /* Account for header height for scroll snapping */
}

@media (min-width: 769px) {
    .hero {
        padding-top: calc(1.5rem * 2 + 1px + 2.5rem); /* Exact header height, 0 visual gap */
        align-items: flex-start; /* Keep content at top on desktop too */
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero-video {
    width: clamp(40rem, 90vw, 120rem);
    height: clamp(24rem, 56vw, 72rem);
    object-fit: contain;
    margin-bottom: 0;
    display: block;
}

/* Invert video colors in light mode */
html[data-theme="light"] .hero-video,
body[data-theme="light"] .hero-video {
    filter: invert(1);
}

/* Hero Marquee */
.hero-marquee-container {
    width: 100%;
    margin-top: 0;
    margin-bottom: 12rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    display: flex;
}

.marquee-content {
    display: inline-block;
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    color: var(--secondary-color);
    padding-right: 3rem;
    animation: marquee 120s linear infinite;
}

.marquee-content:nth-child(2) {
    animation: marquee 120s linear infinite;
    animation-delay: -60s; /* Start second copy halfway through */
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Scroll Arrow */
.scroll-arrow {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: transform 0.1s ease-out;
    cursor: pointer;
    user-select: none;
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    display: inline-block;
    transform-origin: center;
    will-change: transform, font-size;
}

.section-arrow-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
    width: 100%;
}

/* Fixed Scroll Arrow at Bottom */
.scroll-arrow-fixed {
    position: fixed;
    bottom: 0.5rem;
    left: 50%;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: center;
    will-change: transform, font-size;
    z-index: 1000;
    pointer-events: none;
    transform: translateX(-50%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 0, 0, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Remove hero-bg gradient in light mode for pure white */
html[data-theme="light"] .hero-bg,
body[data-theme="light"] .hero-bg {
    background: transparent !important;
}

/* Section Styles */
section {
    position: relative;
    padding: var(--section-gap) 4rem;
    min-height: 100vh;
}

/* Scroll snap for home, work menu, about, and contact sections */
.hero,
.projects,
.about,
.contact {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.section-number {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
    letter-spacing: 0.2em;
}

.section-title {
    font-size: clamp(2rem, 6vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

/* Projects Section */
.projects {
    position: relative;
    scroll-margin-top: 100px; /* Account for header height */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.work-menu-title {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    width: 100%;
    max-width: 1400px;
    overflow: visible;
}

.project-item {
    position: relative;
    cursor: pointer;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 1rem 4rem;
    border-bottom: 1px solid var(--border-color);
    min-height: 180px;
    transform: translateY(0) scale(1);
    will-change: transform;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .project-item {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
}

.project-item:last-child {
    border-bottom: none;
}

.project-item.hidden {
    display: none;
}

.project-item:hover {
    opacity: 0.8;
    transform: translateY(0) scale(1.02);
}

/* Project Info - Left Side */
.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 50%;
}

.project-title {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    transition: font-size 0.3s ease;
}

.project-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-tag {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.project-item:hover .project-tag {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Thumbnails Container - Right Side */
.project-thumbnails-container {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

/* Consistent Thumbnail Framing - Right Side */
.project-thumbnail-wrapper {
    position: relative;
    width: fit-content;
    height: 200px;
    min-width: 200px;
    flex-shrink: 0;
    overflow: visible;
    transition: height 0.3s ease, width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Multiple thumbnails - scale down to fit */
.project-thumbnail-wrapper.multiple-thumbnails {
    height: 200px;
    flex: 0 0 auto;
    width: fit-content;
    min-width: 120px;
}

/* Multiple thumbnails maintain aspect ratio with uniform height */
.project-thumbnails-container.has-multiple .project-thumbnail-wrapper.multiple-thumbnails {
    width: auto;
    height: 200px;
}

.project-thumbnail-frame {
    position: relative;
    width: fit-content;
    height: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    overflow: hidden;
    transition: border-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.project-thumbnail-wrapper.multiple-thumbnails .project-thumbnail-frame {
    position: relative;
    width: auto;
    height: 100%;
}

.project-item:hover .project-thumbnail-frame {
    border-color: var(--accent-color);
}

.project-thumbnail {
    position: relative;
    width: auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-thumbnail img,
.project-thumbnail video {
    width: auto;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

.project-item:hover .project-thumbnail img,
.project-item:hover .project-thumbnail video {
    transform: scale(1.1);
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.02) 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

/* About Section */
.about {
    position: relative;
    margin-top: 4rem;
    scroll-margin-top: 100px; /* Account for header height */
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    line-height: 1.8;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
}

/* Contact Section */
.contact {
    position: relative;
    margin-top: 4rem;
}

.contact-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.contact-title {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-group input,
.form-group textarea {
    font-family: 'PPMondwest', 'Space Grotesk', sans-serif;
    font-size: 1rem;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 0;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-submit {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    cursor: pointer;
    transition: all 0.3s;
    align-self: flex-start;
}

.contact-submit:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

.contact-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.contact-status {
    min-height: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    text-align: center;
}

.contact-status.success {
    color: var(--accent-color);
}

.contact-status.error {
    color: #ff4444;
}

/* Footer */
.footer {
    padding: 4rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 0.875rem;
    color: var(--secondary-color);
    letter-spacing: 0.2em;
}

/* Parallax Elements */
[data-parallax] {
    will-change: transform;
    transition: transform 0.2s ease-out;
}

/* Loading Animation */
/* Slide animations for project items */
.project-item.slide-up {
    transform: translateY(-100vh) scale(1) !important;
    opacity: 0 !important;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.project-item.slide-down {
    transform: translateY(100vh) scale(1) !important;
    opacity: 0 !important;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.project-item.stay-at-top {
    position: fixed !important;
    top: var(--header-height, 100px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    z-index: 999 !important;
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    padding: 1rem 4rem !important;
}

.project-item.animating {
    pointer-events: none;
    z-index: 1000;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .project-item.slide-up,
    .project-item.slide-down,
    .project-item.stay-at-top {
        transition: opacity 0.3s ease, transform 0.3s ease !important;
    }
}

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

.project-item {
    animation: fadeIn 0.6s ease-out backwards;
}

.project-item[data-index="0"] {
    animation-delay: 0.1s;
}

.project-item[data-index="1"] {
    animation-delay: 0.2s;
}

.project-item[data-index="2"] {
    animation-delay: 0.3s;
}

.project-item[data-index="3"] {
    animation-delay: 0.4s;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 1rem 2rem;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .logo-wrapper {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .logo {
        font-size: 2rem;
        line-height: 1;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .portfolio-label {
        margin-top: -0.1rem;
    }

    .nav {
        gap: 1.5rem;
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .nav-link-wrapper {
        position: relative;
    }

    .nav-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        margin-top: 0.5rem;
        display: flex;
        gap: 0;
        padding: 0;
    }

    .nav-link-wrapper:hover .nav-dropdown,
    .nav-link-wrapper:active .nav-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .dropdown-item {
        padding: 0.5rem 0;
        font-size: 0.6rem;
    }

    section {
        padding: 6rem 2rem;
    }

    .project-item {
        flex-direction: column;
        gap: 2rem;
        padding: 1rem 2rem;
    }
    
    .project-item.stay-at-top {
        padding: 1rem 2rem !important;
    }
    
    .projects {
        padding: 1rem 0;
    }

    .project-info {
        max-width: 100%;
    }

    .project-thumbnail-wrapper {
        width: auto;
        height: 300px;
        max-width: 100%;
    }

    .hero {
        padding: 10rem 2rem 4rem;
        padding-top: calc(1.5rem * 2 + 1px + 2.5rem);
    }

    .hero-video {
        width: 100%;
        height: auto;
        max-width: 100vw;
        margin-bottom: 0;
    }

    .hero-marquee-container {
        margin-top: 0;
        margin-bottom: 4rem;
        padding: 0 1rem;
    }

    .marquee-content {
        font-size: 1.1rem;
    }

    .scroll-arrow-fixed {
        bottom: 1rem;
        font-size: 1.25rem;
        transform: translateX(-50%) !important;
    }

    .portfolio-label {
        font-size: 0.625rem;
        margin-top: 0;
    }

    .time-display {
        font-size: 0.5rem;
        margin-top: 0.05rem;
    }

    .coordinate-display {
        font-size: 0.5rem;
        margin-top: 0.05rem;
    }

    .about-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 1rem;
        padding: 0.75rem;
    }

    .contact-submit {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .project-title {
        font-size: 1.5rem;
    }

    .project-description {
        font-size: 0.875rem;
    }
}

/* Client Modal */
.client-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.client-modal.active {
    opacity: 1;
    visibility: visible;
}

.client-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.client-modal-content {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    margin: 5vh auto;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.client-modal.active .client-modal-content {
    transform: scale(1);
}

.client-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-modal-close:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: rotate(90deg);
}

.client-modal-header {
    padding: 4rem 4rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.client-modal-title {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.client-modal-projects {
    padding: 2rem 4rem 4rem;
}

.client-modal-projects .project-item {
    border-bottom: 1px solid var(--border-color);
}

.client-modal-projects .project-item:last-child {
    border-bottom: none;
}

/* Apply same hover effects to modal projects as homepage */
.client-modal-projects .project-item:hover {
    opacity: 0.8;
}

.client-modal-projects .project-item:hover .project-tag {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.client-modal-projects .project-item:hover .project-thumbnail-frame {
    border-color: var(--accent-color);
}

.client-modal-projects .project-item:hover .project-thumbnail img,
.client-modal-projects .project-item:hover .project-thumbnail video {
    transform: scale(1.1);
}

/* Fullscreen Media Viewer */
.media-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
}

.media-fullscreen.active {
    opacity: 1;
    visibility: visible;
}

.media-fullscreen-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
}

.media-fullscreen-content video,
.media-fullscreen-content img {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.media-fullscreen-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 50px;
    height: 50px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 20001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-fullscreen-close:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: rotate(90deg);
}

/* Make project videos clickable */
.project-video {
    cursor: pointer;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    background-color: #000;
}

/* Make project images clickable */
.project-image {
    cursor: pointer;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-item:hover .project-image {
    transform: scale(1.1);
}

/* Clients Page Styles */
.clients-page {
    position: relative;
    padding: 8rem 4rem 4rem;
}

.clients-page-content {
    max-width: 1400px;
    margin: 0 auto;
}

.clients-page-title {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 2.25rem; /* 10% smaller than XD.RAR logo (2.5rem) */
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4rem;
    color: var(--text-color);
}

.clients-list-paragraph {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.8;
    color: var(--text-color);
}

.clients-link {
    display: inline;
    text-decoration: none;
    transition: color 0.3s;
}

.clients-link::after {
    display: none; /* Remove underline on hover */
}

.clients-link:hover {
    color: var(--accent-color);
}

/* Client Page Styles */
.client-page {
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.client-page-content {
    width: 100%;
}

.client-page-title {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-color);
    margin-bottom: 4rem;
}

.client-page-projects {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.client-page-projects .project-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4rem;
}

.client-page-projects .project-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Clients Horizontal List */
.clients-horizontal-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-start;
}

.client-list-item {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 1rem 0;
    text-decoration: none;
    display: inline-block;
}

.client-list-item:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.client-list-item::after {
    content: ' ·';
    color: var(--secondary-color);
    margin-left: 0.5rem;
}

.client-list-item:last-child::after {
    content: '';
}

.client-card-projects {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.client-project-item {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.client-project-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.client-project-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.client-project-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.client-project-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.client-project-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.client-project-media-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.client-project-media {
    position: relative;
    width: auto;
    height: 300px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.client-project-media:hover {
    border-color: var(--accent-color);
}

.client-project-video,
.client-project-image {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.client-project-media:hover .client-project-video,
.client-project-media:hover .client-project-image {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .client-project-media {
        width: auto;
        height: 250px;
        max-width: 100%;
    }
    
    .clients-page {
        padding: 8rem 2rem 2rem;
    }
}

/* Archive Page Styles */
.archive-page {
    position: relative;
    padding: 8rem 4rem 4rem;
}

.archive-page-content {
    max-width: 1400px;
    margin: 0 auto;
}

.archive-page-title {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: var(--text-color);
}

/* Archive Filters */
.archive-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.archive-filter-btn {
    font-family: 'NeueBit', 'Space Grotesk', monospace;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.archive-filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.archive-filter-btn.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: rgba(var(--accent-color-rgb, 255, 255, 255), 0.1);
}

/* Archive Grid - Snap Scroll Layout */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    width: 100%;
    overflow-y: auto;
    max-height: calc(100vh - 20rem);
    scroll-snap-type: y proximity;
}

.archive-grid-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    border: none;
    transition: transform 0.3s ease;
    background: var(--bg-color);
}

.archive-grid-item:hover {
    transform: scale(1.02);
}

.archive-grid-item img,
.archive-grid-item video,
.archive-grid-item .archive-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.archive-grid-item video {
    background-color: #000;
}

/* Mobile: 3 columns */
@media (max-width: 768px) {
    .archive-page {
        padding: 8rem 2rem 2rem;
    }
    
    .archive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
        max-height: calc(100vh - 15rem);
    }
    
    .archive-filters {
        gap: 0.5rem;
    }
    
    .archive-filter-btn {
        font-size: 0.65rem;
        padding: 0.4rem 0.8rem;
    }
}


