:root {
    --bg: #0b0b0b;
    --fg: #e1e1e1;
    --accent: #00ff9d; 
    --surface: #141414;
    --border: #333;
    
    --stroke-color: rgba(255, 255, 255, 0.3);
    --footer-bg: #050505;

    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    --bg: #f4f4f4;        
    --fg: #111111;        
    --accent: #008f11;   
    --surface: #ffffff;   
    --border: rgba(0, 0, 0, 0.15);       
    
    --stroke-color: rgba(0, 0, 0, 0.2);
    --footer-bg: #e8e8e8;
}

* { box-sizing: border-box; margin: 0; padding: 0; cursor: none; }

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.noise {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9000; opacity: 0.05;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    transform: translateZ(0);
    will-change: transform;
}

.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg); z-index: 9999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.loader-text { margin-bottom: 20px; font-family: var(--font-mono); font-size: 0.8rem; display: flex; justify-content: space-between; width: 300px; color: var(--fg); }
.loader-bar { width: 300px; height: 2px; background: var(--border); }
.bar-fill { width: 0%; height: 100%; background: var(--accent); }

.cursor-dot {
    position: fixed; top: 0; left: 0;
    width: 6px; height: 6px; 
    background: var(--fg); 
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; z-index: 9999;
    transition: opacity 0.3s ease;
    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 var(--stroke-color);
    display: flex; align-items: center; justify-content: center;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.3s ease, 
                border-color 0.3s ease; 
    will-change: transform;
}
[data-theme="light"] .cursor-outline { border-color: rgba(0,0,0,0.2); }

body.hovering .cursor-outline {
    transform: translate(-50%, -50%) scale(1.5);
    background-color: transparent;
    border-color: var(--accent);
}

body.viewing .cursor-outline {
    transform: translate(-50%, -50%) scale(2); 
    background-color: var(--accent);
    border-color: transparent;
}
body.viewing .cursor-dot { opacity: 0; }

.content-wrapper {
    position: relative;
    z-index: 2;
    background: var(--bg);
    margin-bottom: 100vh; 
    transition: background-color 0.5s ease;
}

.navbar {
    position: fixed; top: 0; width: 100%; padding: 30px 50px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 100;
}
.logo { font-family: var(--font-mono); font-size: 1.2rem; text-decoration: none; color: var(--fg); font-weight: 700; transition: color 0.3s; }
.dot { color: var(--accent); }
.nav-links { display: flex; gap: 40px; align-items: center;}
.nav-item {
    text-decoration: none; color: var(--fg); font-family: var(--font-mono); font-size: 0.8rem; position: relative; overflow: hidden;
    transition: color 0.3s;
}
.link-txt { display: inline-block; transition: transform 0.3s cubic-bezier(0.7, 0, 0.3, 1); }
.nav-item:not(.theme-nav):hover .link-txt { transform: translateY(-100%) rotate(2deg); }
.nav-item:not(.theme-nav)::after {
    content: "VIEW"; position: absolute; top: 100%; left: 0; color: var(--accent); transition: top 0.3s cubic-bezier(0.7, 0, 0.3, 1);
}
.nav-item:not(.theme-nav):hover::after { top: 0; }

.theme-nav {
    display: inline-block; padding: 8px 16px; border-radius: 20px; cursor: none;
    background: transparent; color: var(--fg); border: 1px solid var(--fg); transition: all 0.3s ease;
}
.theme-nav:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.hero { height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.hero-container { width: 90%; max-width: 1400px; position: relative; z-index: 2; }
.hero-title { font-family: var(--font-display); font-size: clamp(4rem, 15vw, 14rem); line-height: 0.85; text-transform: uppercase; }
.line { overflow: hidden; }
.word { display: inline-block; transform: translateY(100%); }
.text-outline { color: transparent; -webkit-text-stroke: 2px var(--stroke-color); transition: -webkit-text-stroke 0.5s ease; }

.hero-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 100px; }
.scroll-indicator { font-size: 0.9rem; color: #666; font-family: var(--font-mono); }
.hero-bio { max-width: 400px; font-size: 1.2rem; line-height: 1.5; text-align: right; }
.highlight { color: var(--accent); }

.warp-grid {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background-image: 
        linear-gradient(var(--stroke-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--stroke-color) 1px, transparent 1px);
    background-size: 100px 100px;
    transform: perspective(500px) rotateX(60deg) translateZ(0);
    z-index: 1; pointer-events: none;
    will-change: transform;
    opacity: 0.2;
}
html[data-theme="light"] .warp-grid {
    background-image: repeating-linear-gradient(135deg, var(--stroke-color), var(--stroke-color) 1px, transparent 1px, transparent 18px);
    background-size: 64px 64px;
    transform: none; 
    opacity: 0.4;
}

.section { padding: 150px 0; }
.container { width: 90%; max-width: 1400px; margin: 0 auto; }
.section-label { color: #666; margin-bottom: 50px; display: block; }

.project-row {
    display: grid; grid-template-columns: 0.4fr 1fr; border-top: 1px solid var(--border);
    padding: 60px 0; 
}

.project-info {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.project-row:hover .project-info { transform: translateX(20px); }

.project-id { color: var(--accent); font-size: 1.5rem; display: block; margin-bottom: 20px; }
.project-name { font-family: var(--font-display); font-size: 5rem; margin-bottom: 20px; }
.project-desc { color: #888; font-size: 1.1rem; margin-bottom: 20px; line-height: 1.5; max-width: 400px; }
.project-tags { list-style: none; display: flex; gap: 20px; color: #888; font-size: 0.9rem; }

.project-visual {
    height: 400px; position: relative; overflow: hidden; cursor: none;
    perspective: 1000px; transform-style: preserve-3d; border-radius: 8px; 
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.visual-inner {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    will-change: transform; transform-style: preserve-3d;
}
.visual-inner::after {
    content: ''; position: absolute; inset: 10px; z-index: -1;
    box-shadow: 0 50px 100px rgba(0,0,0,0.5);
    opacity: 0; transition: opacity 0.5s;
}
.project-visual:hover .visual-inner::after { opacity: 1; }

.placeholder-text { 
    font-family: var(--font-display); font-size: 3rem; 
    opacity: 0; transform: translateY(20px) translateZ(50px); 
    transition: 0.4s; color: white; text-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.project-visual:hover .placeholder-text { opacity: 1; transform: translateY(0) translateZ(50px); }

.marquee-section { padding: 100px 0; background: var(--accent); color: #000; overflow: hidden; }
.marquee-track { white-space: nowrap; overflow: hidden; transform: translateZ(0); }
.marquee-content { display: inline-block; font-family: var(--font-display); font-size: 8rem; animation: scroll 20s linear infinite; will-change: transform; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.exp-list { border-top: 1px solid var(--border); }

.exp-item {
    display: grid; grid-template-columns: 0.2fr 0.4fr 1fr; padding: 50px 0;
    border-bottom: 1px solid var(--border); position: relative;
}

.exp-item::before {
    content: ''; position: absolute; left: -20px; top: 0; height: 100%; width: 2px;
    background: var(--accent); transform: scaleY(0); transition: transform 0.4s ease; transform-origin: bottom;
}
.exp-item:hover::before { transform: scaleY(1); transform-origin: top; }

.exp-year, .exp-role, .exp-desc {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.exp-item:hover .exp-year, 
.exp-item:hover .exp-role, 
.exp-item:hover .exp-desc { 
    transform: translateX(15px); 
}

.exp-year { color: var(--accent); font-size: 0.9rem; }
.exp-role h3 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 5px; color: var(--fg); }
.exp-role span { color: #666; font-size: 0.9rem; }
.exp-desc { color: #888; font-size: 1rem; line-height: 1.6; max-width: 600px; }

.footer {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 100vh;
    background: var(--footer-bg); z-index: 1; 
    display: flex; flex-direction: column; justify-content: flex-end; 
    padding-bottom: 50px;
    transition: background 0.5s ease;
}

.huge-link {
    font-family: var(--font-display); font-size: clamp(4rem, 18vw, 15rem);
    text-decoration: none; color: var(--fg); line-height: 0.8; display: block;
    margin: 40px 0 100px 0; border-bottom: 1px solid var(--border); transition: color 0.3s;
}
.huge-link:hover { color: var(--accent); }

.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; margin-bottom: 100px; }
.label { display: block; color: #555; margin-bottom: 20px; font-size: 0.8rem; }
.link-item { display: block; color: var(--fg); text-decoration: none; font-family: var(--font-body); font-size: 1.2rem; margin-bottom: 10px; transition: color 0.2s, transform 0.2s; display: inline-block;}
.link-item:hover { color: var(--accent); transform: translateX(10px); }
.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; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--border); color: #666; font-size: 0.8rem; }
@keyframes blink { 50% { opacity: 0; } }

.switch-nav {
    background: var(--fg); 
    color: var(--bg); 
    margin-right: 15px; 
}
.switch-nav:hover {
    background: transparent;
    color: var(--fg);
}

[data-theme="light"] .switch-nav {
    background: #000 !important; 
    color: #fff !important;
}
[data-theme="light"] .switch-nav:hover {
    background: transparent !important;
    color: #000 !important;
}

@media (max-width: 768px) {
    .navbar { padding: 20px; }
    .nav-links { display: none; } 
    .project-row { grid-template-columns: 1fr; gap: 30px; }
    .project-visual { height: 350px; }
    .exp-item { grid-template-columns: 1fr; gap: 15px; padding: 40px 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .project-name { font-size: 3rem; }
    .huge-link { margin-top: 80px; }
    .content-wrapper { margin-bottom: 85vh; }
}