body { 
    margin: 0; 
    background-color: #050505; 
    color: #fff; 
    font-family: 'Space Mono', monospace;
    overflow-x: hidden;
    position: relative;
}

/* --- NOISE TEXTURE --- */
body::before {
    content: "";
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
    z-index: -1; /* Moved behind content */
    animation: noise-move 0.2s steps(4) infinite;
}

@keyframes noise-move {
    0% { transform: translate(0,0); }
    10% { transform: translate(-1%,-1%); }
    20% { transform: translate(-2%,1%); }
    30% { transform: translate(1%,-2%); }
    40% { transform: translate(-1%,3%); }
    50% { transform: translate(-2%,1%); }
    60% { transform: translate(3%,2%); }
    70% { transform: translate(2%,1%); }
    80% { transform: translate(-1%,-1%); }
    90% { transform: translate(1%,2%); }
    100% { transform: translate(1%,1%); }
}

/* --- STICKY HEADER --- */
header {
    position: fixed;
    top: -100px;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4rem;
    box-sizing: border-box;
    z-index: 2000;
    transition: top 0.5s cubic-bezier(0.85, 0, 0.15, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.visible {
    top: 0;
}

.header-logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: #fff;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
}

.header-logo::before, .header-logo::after {
    content: "11th Letter";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    mix-blend-mode: exclusion;
    transition: all 0.05s ease-out;
}
.header-logo::before { color: #00FFFF; z-index: -1; }
.header-logo::after { color: #FF00FF; z-index: -2; }

.header-logo:hover::before, .header-logo:hover::after {
    opacity: 0.8;
}

nav a {
    color: #888;
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav a:hover {
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

/* --- BACKGROUND CANVAS --- */
#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    z-index: 0;
    opacity: 0.2; /* Darker grid */
}

/* --- HERO SECTION --- */
#hero {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0; left: 0;
    z-index: 1;
    perspective: 1000px;
    transition: transform 0.5s cubic-bezier(0.85, 0, 0.15, 1);
}

header.visible ~ #hero {
    transform: translateY(80px);
}

/* The Glitch Container */
.glitch-wrapper {
    position: relative;
    text-align: center;
    width: 100%;
}

.logo {
    font-size: 15vw; /* Much bigger, approx 80% of width */
    width: 90%;
    margin: 0 auto;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: white;
    position: relative;
    user-select: none;
    cursor: crosshair;
    transition: opacity 0.2s;
    line-height: 1;
}

/* The Pseudo elements for the RGB Split */
.logo::before, .logo::after {
    content: "11TH LETTER";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0.8;
    mix-blend-mode: exclusion;
    transition: all 0.05s ease-out; /* Super fast transition for jitter */
}

.logo::before { color: #00FFFF; z-index: -1; } /* Cyan Channel */
.logo::after { color: #FF00FF; z-index: -2; } /* Magenta Channel */

/* Scroll Down Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: #00ffff;
    font-size: 2rem;
    cursor: pointer;
    animation: bounce 2s infinite;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.scroll-down-indicator:hover {
    opacity: 1;
    text-shadow: 0 0 10px #00ffff;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}

/* --- CONTENT SECTION --- */
#content {
    position: relative;
    z-index: 50; /* Ensure content is above hero */
    margin-top: 100vh;
    background: #050505;
    min-height: 100vh;
    padding: 6rem 4rem;
    transition: transform 0.5s cubic-bezier(0.85, 0, 0.15, 1);
}

header.visible ~ #content {
    transform: translateY(80px);
}

h2 { 
    font-size: 2.5rem; 
    color: #fff; 
    text-transform: uppercase; 
    letter-spacing: -2px;
    margin-bottom: 3rem;
    display: block;
    border: none;
}

/* Work Grid (3x2) */
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 8rem;
}

.work-card {
    background-color: #0a0a0a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 5 / 4; /* Maintain 5:4 across all screens */
    border: 1px solid #333; /* Darker default border */
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
    /* Start bright (no shadow overlay) */
    box-shadow: inset 0 0 0 0 rgba(0,0,0,0); 
    filter: brightness(1);
}

.work-card:hover {
    border-color: #00ffff;
    transform: scale(1.02);
    /* Dim on hover */
    box-shadow: inset 0 0 0 2000px rgba(0,0,0,0.4), 0 0 15px rgba(0, 255, 255, 0.6), 0 0 30px rgba(255, 0, 255, 0.4);
    z-index: 10;
}

.work-card::after {
    /* Blue V Arrow */
    content: "v";
    font-family: 'Space Mono', monospace;
    font-weight: bold;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: #00ffff;
    opacity: 0;
    transition: all 0.3s;
    text-shadow: 0 0 10px #00ffff;
}

.work-card:hover::after {
    opacity: 1;
    bottom: 1.5rem;
}

/* Detail View (Expandable) */
.work-detail {
    grid-column: 1 / -1;
    display: none;
    background: #000;
    margin-top: 1rem;
    border: 1px solid #00ffff;
    overflow: hidden;
    height: 0;
    opacity: 0;
}

.detail-container {
    display: flex;
    width: 100%;
    height: auto;
    align-items: stretch; /* Ensure both sides are same height */
}

.carousel-wrapper {
    flex: 1.5;
    position: relative;
    background: #050505;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    height: fit-content; /* Don't let it grow beyond its ratio */
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
}

.carousel-slide img, 
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill width, crop sides if needed, keep top/bottom visible relative to height */
    background: #000;
}

.carousel-btn {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 50px; height: 50px;
    background: rgba(0,0,0,0.8);
    border: 1px solid #333;
    color: #fff;
    cursor: pointer;
    z-index: 10;
}

.carousel-btn:hover { border-color: #00ffff; color: #00ffff; }
.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }

.detail-info {
    flex: 1;
    padding: 3rem; /* Reduced from 4rem for mid-scale */
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #000;
    border-left: 1px solid #1a1a1a;
    overflow: hidden; /* Prevent text from forcing height */
}

.detail-info h3 { font-size: 1.8rem; margin-bottom: 1rem; color: #00ffff; }
.detail-info p { font-size: 0.95rem; line-height: 1.6; color: #888; margin-bottom: 1.5rem; }
.detail-info .links { display: flex; flex-direction: column; gap: 0.8rem; }
.detail-info .links a { color: #fff; text-decoration: none; border-bottom: 1px solid #fff; font-size: 0.9rem; transition: all 0.3s; width: fit-content; }
.detail-info .links a:hover { color: #00ffff; border-color: #00ffff; text-shadow: 0 0 8px rgba(0, 255, 255, 0.5); }

/* Featured Clients */
.clients-section {
    margin-bottom: 8rem;
}

.client-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.client-logo-box {
    height: 180px;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.client-logo-box:hover {
    border-color: #ff00ff;
    background: #000;
}

.client-logo-box .logo-placeholder {
    width: 40px; height: 40px;
    border: 2px solid #333;
    margin-bottom: 1rem;
    transform: rotate(45deg);
}

.client-logo-box:hover .logo-placeholder {
    border-color: #ff00ff;
    box-shadow: 0 0 10px #ff00ff;
}

.client-logo-box span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #555;
}

.client-logo-box:hover span { color: #fff; }

/* About Section */
.about-section {
    padding: 10rem 0;
    display: flex;
    gap: 6rem;
    border-top: 1px solid #1a1a1a;
}

.about-text { flex: 1; }
.about-text h2 { margin-bottom: 2rem; }
.about-text p { font-size: 1.5rem; line-height: 1.4; color: #fff; max-width: 600px; }

.about-visual { 
    flex: 1; 
    height: 400px; 
    background-color: #0a0a0a; 
    background-size: cover;
    background-position: center;
    border: 1px solid #1a1a1a;
    position: relative;
    overflow: hidden;
}

.about-visual::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 0, 255, 0.05) 10px, rgba(255, 0, 255, 0.05) 11px);
    z-index: 1;
    pointer-events: none;
}

/* --- CURSOR --- */
#cursor {
    position: fixed; top: 0; left: 0;
    width: 20px; height: 20px;
    border: 1px solid #fff;
    transform: translate(-50%, -50%) rotate(45deg);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.2s, height 0.2s;
}

/* --- RESPONSIVE MOBILE ADJUSTMENTS --- */
@media (max-width: 1400px) {
    .work-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-info { padding: 2rem; }
    .detail-info h3 { font-size: 1.5rem; }
    .detail-info p { font-size: 0.85rem; margin-bottom: 1rem; }
}

@media (max-width: 1024px) {
    header { padding: 0 2rem; height: 60px; }
    .header-logo { font-size: 1.2rem; }
    #content { padding: 4rem 2rem; }
    .detail-container { flex-direction: column; height: auto; }
    .carousel-wrapper { flex: none; width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .detail-info { flex: none; border-left: none; border-top: 1px solid #1a1a1a; padding: 2rem; }
}

@media (max-width: 768px) {
    .logo { font-size: 20vw; }
    .work-grid { grid-template-columns: 1fr; }
    .carousel-wrapper { width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .detail-info h3 { font-size: 1.5rem; }
    .about-section { flex-direction: column; padding: 4rem 0; gap: 3rem; }
    .about-visual { width: 100%; height: 300px; }
}
