:root {
    --navy: #050810;
    --navy-light: #0D1424;
    --gold: #C9A84C;
    --white: #FFFFFF;
    --gray: #888888;
    
    --bg-color: var(--navy);
    --text-color: var(--white);
    --accent-color: var(--gold);
    --line-color: rgba(255,255,255,0.05);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.8s ease, color 0.8s ease;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.theme-navy { --bg-color: var(--navy); --text-color: var(--white); --line-color: rgba(255,255,255,0.05); }
body.theme-white { --bg-color: var(--white); --text-color: var(--navy); --line-color: rgba(5,8,16,0.05); }
body.theme-gold { --bg-color: var(--gold); --text-color: var(--navy); --accent-color: var(--white); --line-color: rgba(5,8,16,0.1); }

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none !important; }
::-webkit-scrollbar { width: 0; }

h1, h2, h3, h4 { font-family: 'Inter', sans-serif; font-weight: 500; letter-spacing: -0.03em; }
.italic-gold { font-family: 'Playfair Display', serif; font-style: italic; color: var(--accent-color); font-weight: 400; }
.mono-tag { font-family: 'Space Mono', monospace; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray); }
a { text-decoration: none; color: inherit; }

/* GRAIN & BLUEPRINT */
.grain-overlay {
    position: fixed; inset: 0; pointer-events: none; z-index: 9000;
    background-image: 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.85' 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;
}
.blueprint-grid { position: fixed; inset: 0; pointer-events: none; z-index: 0; display: flex; justify-content: space-between; padding: 0 5vw; }
.v-line { width: 1px; height: 100vh; background-color: var(--line-color); transition: background-color 0.8s ease; }

/* CURSOR */
.cursor-dot { position: fixed; width: 4px; height: 4px; background: var(--accent-color); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: background 0.8s ease; }
.cursor-bubble { position: fixed; width: 0px; height: 0px; background: var(--text-color); border-radius: 50%; pointer-events: none; z-index: 9998; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.8s ease; overflow: hidden; }
.cursor-bubble .cursor-text { font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--bg-color); opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.cursor-bubble.active { width: 80px; height: 80px; }
.cursor-bubble.active .cursor-text { opacity: 1; }

/* TERMINAL PRELOADER */
.preloader { position: fixed; inset: 0; background: #000; z-index: 10000; display: flex; align-items: center; padding: 5vw; }
.terminal-window { font-family: 'Space Mono', monospace; color: var(--gold); font-size: clamp(0.65rem, 2.5vw, 1.2rem); max-width: 800px; }
.terminal-cursor { display: inline-block; width: 10px; height: 1.2rem; background: var(--gold); animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* NAV */
.nav { position: fixed; top: 0; left: 0; width: 100%; padding: 40px 0; z-index: 8000; mix-blend-mode: difference; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; padding: 0 5vw; color: #fff; }
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; letter-spacing: 0.1em; font-weight: 700; }
.nav-menu-btn { background: none; border: none; width: 40px; height: 10px; display: flex; flex-direction: column; justify-content: space-between; }
.nav-menu-btn span { width: 100%; height: 2px; background: #fff; transition: 0.3s; }
.menu-overlay { position: fixed; inset: 0; background: rgba(5,8,16,0.95); backdrop-filter: blur(20px); z-index: 7999; display: flex; align-items: center; justify-content: center; clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); pointer-events: none; transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1); }
.menu-overlay.active { pointer-events: all; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.menu-bg-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line-color) 1px, transparent 1px), linear-gradient(90deg, var(--line-color) 1px, transparent 1px); background-size: 50px 50px; opacity: 0.1; z-index: -1; pointer-events: none; }
.menu-inner { display: flex; width: 100%; max-width: 1400px; padding: 0 5vw; justify-content: space-between; align-items: center; }
.menu-sys-info { display: flex; flex-direction: column; gap: 10px; color: var(--gray); font-size: 0.85rem; }
.menu-nav { display: flex; flex-direction: column; gap: 20px; text-align: left; }
.menu-link { display: flex; align-items: center; gap: 40px; font-family: 'Inter', sans-serif; font-size: clamp(3rem, 7vw, 7rem); font-weight: 800; text-transform: uppercase; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.2); transition: all 0.4s ease; overflow: hidden; }
.nav-text { position: relative; display: inline-block; transition: transform 0.4s ease, color 0.4s ease; }
.menu-link:hover { -webkit-text-stroke: 1px var(--white); color: var(--white); }
.menu-link:hover .nav-text { transform: translateX(20px); }
.nav-num { font-size: 1rem; color: var(--gold); margin-top: 15px; -webkit-text-stroke: 0; white-space: nowrap; flex-shrink: 0; }

/* SECTIONS */
.section { position: relative; z-index: 10; padding: 0 5vw; width: 100%; }

/* HERO & MARQUEE */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding-top: 120px; padding-bottom: 40px; overflow: hidden; position: relative; }
.marquee-wrapper { position: absolute; top: 50%; left: 0; transform: translateY(-50%); width: 100vw; overflow: hidden; z-index: -1; pointer-events: none; opacity: 0.1; }
.marquee-content { font-family: 'Inter', sans-serif; font-size: 20vw; font-weight: 700; white-space: nowrap; color: transparent; -webkit-text-stroke: 2px var(--white); will-change: transform; }
.hero-top-text { display: flex; justify-content: space-between; position: relative; z-index: 10; }
.hero-center { display: flex; justify-content: center; align-items: center; flex-grow: 1; position: relative; z-index: 10; }

/* HERO WIDGETS & CORE */
.hero { position: relative; }
.hero-core-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(201, 168, 76, 0.15) 0%, rgba(5, 8, 16, 0) 70%); border-radius: 50%; z-index: 0; pointer-events: none; filter: blur(60px); }
.hero-widgets { position: absolute; bottom: 40px; left: 5vw; right: 5vw; display: flex; justify-content: flex-end; align-items: flex-end; z-index: 20; }
.widget { background: rgba(13, 20, 36, 0.4); border: 1px solid var(--line-color); backdrop-filter: blur(10px); padding: 15px; border-radius: 4px; }
.widget-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px solid var(--line-color); padding-bottom: 10px; }
.terminal-widget { width: 280px; font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--gray); }
.terminal-lines { display: flex; flex-direction: column; gap: 8px; height: 60px; overflow: hidden; justify-content: flex-end; }
.terminal-lines div { opacity: 0; animation: fadeUpIn 0.3s forwards; }
.text-gold { color: var(--gold); }
@keyframes fadeUpIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.hero-title { font-size: clamp(4rem, 10vw, 12rem); line-height: 1.1; text-align: center; text-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.hero-media-wrap { width: 100%; height: 35vh; position: relative; margin-top: 4vh; z-index: 1; }
.hero-media-mask { width: 100%; height: 100%; overflow: hidden; clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); }
.parallax-img { width: 100%; height: 130%; object-fit: cover; transform: scale(1.1); transform-origin: center top; }

/* MANIFESTO & HOVER REVEAL */
.manifesto { padding-top: 200px; padding-bottom: 200px; }
.manifesto-inner { position: relative; }
.abs-top-left { position: absolute; top: -40px; left: 0; }
.manifesto-text { font-size: clamp(2rem, 5vw, 5.5rem); line-height: 1.1; max-width: 90%; }
.hover-trigger { position: relative; transition: color 0.3s; }
.hover-trigger:hover { color: var(--navy-light); }
.hover-reveal-container { position: fixed; top: 0; left: 0; width: 300px; height: 400px; pointer-events: none; z-index: 9000; opacity: 0; transform: scale(0.8) translate(-50%, -50%); transition: opacity 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); overflow: hidden; border-radius: 8px; }
.hover-reveal-container.active { opacity: 1; transform: scale(1) translate(-50%, -50%); }
.hover-reveal-container img { width: 100%; height: 100%; object-fit: cover; }

/* SERVICES */
.services { padding-top: 150px; padding-bottom: 150px; }
.section-header { margin-bottom: 100px; }
.service-blocks { display: flex; flex-direction: column; gap: 150px; }
.service-block { display: grid; grid-template-columns: 100px 1fr 1fr; gap: 60px; align-items: center; }
.service-block.reverse { grid-template-columns: 1fr 1fr 100px; }
.service-block.reverse .service-num { grid-column: 3; grid-row: 1; text-align: right; }
.service-block.reverse .service-content { grid-column: 2; grid-row: 1; }
.service-block.reverse .service-media { grid-column: 1; grid-row: 1; }
.service-content h3 { font-size: clamp(2rem, 4vw, 4rem); line-height: 1.1; margin-bottom: 30px; }
.service-content p { font-size: 1.1rem; color: var(--gray); max-width: 400px; line-height: 1.6; }
.service-media { aspect-ratio: 4/5; width: 100%; }
.clip-mask { width: 100%; height: 100%; overflow: hidden; clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); }

/* HORIZONTAL WORK PORTFOLIO */
.horizontal-work { padding-top: 150px; height: 100vh; overflow: hidden; position: relative; }
.horizontal-header { position: absolute; top: 100px; left: 5vw; z-index: 20; }
.horizontal-pin-wrapper { height: 100%; display: flex; align-items: center; }
.horizontal-track { display: flex; gap: 10vw; padding-left: 10vw; padding-right: 10vw; }
.horizontal-item { width: 60vw; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }
.item-img-wrap { width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 4px; position: relative; background: #000; }
.item-img-wrap img, .item-img-wrap iframe { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; filter: grayscale(50%) brightness(0.7); border: none; }
.project-overlay { position: absolute; inset: 0; background: rgba(5,8,16,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.4s ease; backdrop-filter: blur(4px); z-index: 10; color: var(--gold); font-size: 1.2rem; }
.horizontal-item:hover .item-img-wrap img, .horizontal-item:hover .item-img-wrap iframe { transform: scale(1.05); filter: grayscale(0%) brightness(1); }
.horizontal-item:hover .project-overlay { opacity: 1; }
.item-info h3 { font-size: clamp(2rem, 4vw, 4rem); }

/* CONTACT */
.contact { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.massive-text { font-size: clamp(5rem, 15vw, 15rem); line-height: 0.8; margin-bottom: 80px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; }
.email-link { font-size: clamp(2rem, 4vw, 4rem); display: block; margin-top: 20px; transition: color 0.3s; }
.email-link:hover { color: var(--white); }
.cyber-form { display: flex; flex-direction: column; gap: 30px; }
.cyber-form input { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--line-color); padding: 20px 0; font-family: 'Space Mono', monospace; font-size: 1rem; color: var(--text-color); }
.cyber-form input:focus { outline: none; border-bottom-color: var(--navy); }
.cyber-btn { align-self: flex-start; margin-top: 20px; background: transparent; border: 1px solid var(--text-color); color: var(--text-color); font-family: 'Space Mono', monospace; padding: 15px 40px; font-size: 0.9rem; letter-spacing: 0.1em; transition: all 0.3s; }
.cyber-btn:hover { background: var(--text-color); color: var(--bg-color); }

/* SplitType utility */
.word, .char { overflow: hidden; vertical-align: bottom; }
.line { vertical-align: bottom; display: block; }
.split-inner { padding-bottom: 0.3em; margin-bottom: -0.3em; display: inline-block; overflow: hidden; }

@media (max-width: 768px) {
    .hero-title { 
        font-size: clamp(3.5rem, 15vw, 6rem); 
        font-weight: 800; 
        text-shadow: 0 10px 30px rgba(0,0,0,0.8); 
        letter-spacing: -0.04em; 
        line-height: 1.1;
    }
    .marquee-content { font-size: 80vw; -webkit-text-stroke: 1px var(--white); }
    .service-block, .service-block.reverse { display: grid; grid-template-columns: 1fr; gap: 40px; }
    .service-block .service-content, .service-block.reverse .service-content { grid-column: 1; grid-row: 1; }
    .service-block .service-media, .service-block.reverse .service-media { grid-column: 1; grid-row: 2; }
    .service-num { display: none; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .horizontal-item { width: 90vw; }
    .item-img-wrap { aspect-ratio: 4/3; }
    .item-info h3 { font-size: clamp(2.5rem, 11vw, 4rem); }
    .project-overlay { opacity: 1; background: rgba(5,8,16,0.35); }
    .menu-overlay { align-items: flex-start; overflow-y: auto; }
    .menu-inner { flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 30px; padding-top: 120px; padding-bottom: 40px; }
    .menu-sys-info { margin-bottom: 10px; }
    .menu-link { gap: 15px; font-size: clamp(2.2rem, 11vw, 4rem); }
    .nav-num { margin-top: 8px; font-size: 0.85rem; }
}
