:root {
    --dark-bg: #050505;
    --dark-fg: #f4f4f4;
    --light-bg: #e6e6e6;
    --light-fg: #111111;
    --accent: #00ff9d; 

    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; cursor: none; }

body { background: var(--dark-bg); font-family: var(--font-body); overflow-x: hidden; }
.mono { font-family: var(--font-mono); text-transform: uppercase; }

.noise {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 9000; opacity: 0.04;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    transform: translateZ(0); will-change: transform;
}

.cursor-dot {
    position: fixed; top: 0; left: 0; width: 6px; height: 6px; 
    background: #fff; border-radius: 50%;
    transform: translate(-50%, -50%); mix-blend-mode: difference; 
    pointer-events: none; z-index: 9999; will-change: transform;
}
.cursor-wrapper { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9998; will-change: transform; }
.cursor-outline {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.4);
    transform: translate(-50%, -50%) scale(1); mix-blend-mode: difference; 
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease; 
    will-change: transform;
}
body.hovering .cursor-outline { transform: translate(-50%, -50%) scale(1.5); background-color: transparent; }
body.viewing .cursor-outline { transform: translate(-50%, -50%) scale(2); background-color: #fff; border: transparent; }
body.viewing .cursor-dot { opacity: 0; }

.preloader-v2 {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    overflow: hidden; pointer-events: none;
}
.preloader-bg-left {
    position: absolute; top: 0; left: 0; width: 50vw; height: 100vh;
    background: var(--dark-bg);
}
.preloader-bg-right {
    position: absolute; top: 0; right: 0; width: 50vw; height: 100vh;
    background: var(--light-bg);
}
.preloader-text {
    position: relative; z-index: 2;
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 12rem);
    color: #fff;
    mix-blend-mode: difference;
    line-height: 0.8;
    transform-origin: center center;
    will-change: transform, opacity;
    white-space: nowrap;
    display: flex; gap: 20px;
}
.terminal-logs {
    position: absolute; bottom: 30px; left: 30px; z-index: 2;
    font-family: var(--font-mono); font-size: 0.8rem; color: #fff; 
    mix-blend-mode: difference; display: flex; flex-direction: column; 
    gap: 5px; opacity: 0.8; will-change: opacity;
}
.log-line {
    animation: typeIn 0.1s ease-out forwards;
}
@keyframes typeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.split-left {
    position: fixed; top: 0; left: 0; width: 50vw; height: 100vh;
    background: var(--dark-bg); color: var(--dark-fg);
    padding: 40px 5vw;
    display: flex; flex-direction: column; justify-content: space-between;
    z-index: 10;
    overflow: hidden; 
}

.ambient-glow {
    position: absolute; top: 0; left: 0;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(0, 255, 157, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    transform: translate(-50%, -50%);
    pointer-events: none; z-index: 0;
    will-change: transform;
}

.scroll-track {
    position: absolute; right: 0; top: 0;
    width: 1px; height: 100%;
    background: rgba(255,255,255,0.05); z-index: 5;
}
.scroll-fill {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 0%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent); 
}

.left-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.left-header { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.2rem; text-decoration: none; color: var(--dark-fg); font-weight: 700; }
.dot { color: var(--accent); }
.back-btn { font-size: 0.8rem; text-decoration: none; color: var(--dark-bg); background: var(--dark-fg); padding: 8px 16px; border-radius: 20px; transition: transform 0.3s; }
.back-btn:hover { transform: scale(1.05); }

.left-middle { display: flex; flex-direction: column; justify-content: center; }
.telemetry { margin-bottom: 20px; font-size: 0.75rem; color: rgba(255,255,255,0.6); display: flex; flex-direction: column; gap: 8px; letter-spacing: 1px; }
.telemetry .highlight { color: var(--accent); }
.telemetry .glow { text-shadow: 0 0 8px rgba(0, 255, 157, 0.6); }
.telemetry .dim { opacity: 0.5; }

.dynamic-title {
    font-size: clamp(4rem, 8vw, 10rem); line-height: 0.9;
    color: transparent; -webkit-text-stroke: 1.5px var(--dark-fg);
    transition: text-shadow 0.2s; 
}
.dynamic-title.scrambling {
    -webkit-text-stroke: 1.5px var(--accent);
    text-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

.left-footer { display: flex; justify-content: space-between; font-size: 0.8rem; opacity: 0.6; }
.status-live { display: flex; align-items: center; gap: 10px; color: var(--accent); }
.blink-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

.hover-preview-container {
    position: absolute; top: 50%; left: 50%;
    width: 70%; height: 50%; transform: translate(-50%, -50%) scale(0.9);
    pointer-events: none; z-index: 1; opacity: 0; 
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden; border-radius: 10px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.hover-preview-container.active { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
.hover-preview-inner { width: 100%; height: 100%; background-size: cover; background-position: center; filter: grayscale(50%); }

.split-right {
    margin-left: 50vw; width: 50vw; min-height: 100vh;
    background: var(--light-bg); color: var(--light-fg);
    position: relative; z-index: 5;
}

.right-section {
    min-height: 100vh; padding: 150px 5vw;
    display: flex; flex-direction: column; justify-content: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.hero-text { font-family: var(--font-display); font-size: clamp(3rem, 5vw, 6rem); line-height: 0.9; margin-bottom: 30px; }
.highlight { color: var(--accent); }
.hero-subtext { font-size: 1.2rem; line-height: 1.6; color: #555; max-width: 80%; }

.work-item { padding: 60px 0; border-top: 1px solid rgba(0,0,0,0.1); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.work-item:hover { transform: translateX(20px); }
.work-meta { font-size: 0.9rem; color: var(--accent); margin-bottom: 10px; }
.work-name { font-family: var(--font-display); font-size: 4rem; margin-bottom: 20px; }
.work-tags { list-style: none; display: flex; gap: 15px; font-size: 0.8rem; color: #666; }

.career-item { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 40px 0; border-top: 1px solid rgba(0,0,0,0.1); }
.career-year { color: var(--accent); font-size: 0.9rem; }
.career-company { font-family: var(--font-display); font-size: 3rem; }
.career-role { font-size: 1rem; color: #666; }

.contact-section { align-items: center; border-bottom: none; }
.huge-contact { font-family: var(--font-display); font-size: clamp(5rem, 10vw, 10rem); text-decoration: none; color: var(--light-fg); text-align: center; line-height: 0.8; transition: color 0.3s ease; }
.huge-contact:hover { color: var(--accent); }

.audio-toggle { 
    cursor: none; 
    pointer-events: auto; 
    display: inline-block; 
    transition: color 0.3s, text-shadow 0.3s;
}
.audio-toggle:hover { 
    color: var(--accent); 
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.4); 
}
.audio-toggle.playing span { 
    color: var(--accent); 
    opacity: 1; 
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.6); 
}

@media (max-width: 900px) {
    .split-layout { display: block; }
    .split-left { position: relative; width: 100vw; height: 60vh; padding: 30px 20px; }
    .split-right { margin-left: 0; width: 100vw; }
    .dynamic-title { font-size: 4rem; }
    .right-section { min-height: auto; padding: 80px 20px; }
    .hover-preview-container, .scroll-track, .ambient-glow { display: none; }
}