/* --- 1. CORE VARIABLES & AESTHETICS --- */
:root {
    --bg: #050507;
    --accent: #00f0ff; /* Cyber Cyan */
    --accent-dim: rgba(0, 240, 255, 0.1);
    --secondary: #7000ff;
    --text-main: #ececec;
    --text-muted: #888888;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-head: 'Syncopate', sans-serif;
    --font-body: 'Urbanist', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    width: 100vw;
    cursor: none;
}

/* --- 3D SCENE CONTAINER (NEW) --- */
#webgl-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind text */
    pointer-events: none; /* Let clicks pass through */
    opacity: 0; /* Hidden until loaded */
    transition: opacity 1s ease;
}
#webgl-container.loaded {
    opacity: 1;
}

/* Button Styles */
.poster-button, .btn-glow {
    display: inline-block;
    padding: 1rem 3rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-body);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    transition: 0.3s ease;
    cursor: pointer;
    margin-right: 1rem;
}

.poster-button:hover, .btn-glow:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px var(--accent);
}

.btn-glow.small {
    padding: 0.8rem 1.5rem;
    font-size: 0.8rem;
    margin-top: 1.5rem;
    display: inline-block;
}

/* --- 2. PRELOADER --- */
#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-out;
}
.loader-content { text-align: center; font-family: var(--font-head); width: 300px; }
.loader-text { color: var(--accent); letter-spacing: 2px; margin-bottom: 15px; font-size: 0.8rem; animation: blink 0.5s infinite alternate; }
.loading-bar { width: 100%; height: 2px; background: #222; position: relative; overflow: hidden; }
.bar-fill { width: 0%; height: 100%; background: var(--accent); animation: loadProgress 2s ease-in-out forwards; }
.loader-status { margin-top: 10px; font-size: 0.6rem; color: #555; }
@keyframes loadProgress { 0% { width: 0%; } 50% { width: 40%; } 100% { width: 100%; } }
@keyframes blink { from { opacity: 0.5; } to { opacity: 1; } }

/* --- 3. CUSTOM CURSOR (Desktop Only) --- */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}
.cursor-dot { width: 6px; height: 6px; background-color: var(--accent); }
.cursor-outline {
    width: 40px; height: 40px;
    border: 1px solid var(--accent);
    transition: width 0.2s, height 0.2s, background 0.2s;
}

@media (hover: none) {
    * { cursor: auto !important; }
    .cursor-dot, .cursor-outline { display: none; }
}

/* --- 4. SCROLL BAR --- */
.scroll-progress-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    z-index: 10001;
    background: transparent;
}
.scroll-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    box-shadow: 0 0 10px var(--accent);
    transition: width 0.1s;
}

/* --- 5. BACKGROUND & NAVIGATION --- */
/* Pushed further back to make room for 3D plane at z-index: -1 */
#canvas-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; }

.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -2; opacity: 0.04;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
}

nav {
    position: fixed;
    top: 2rem; left: 50%;
    transform: translateX(-50%);
    width: 90%; max-width: 1000px;
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo { font-family: var(--font-head); font-weight: 700; color: white; text-decoration: none; font-size: 1rem; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
    color: var(--text-muted); text-decoration: none; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 1px; transition: 0.3s;
}
.nav-links a:hover { color: var(--accent); }

/* Mobile Menu Toggle */
.menu-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; }
.bar { width: 25px; height: 2px; background: white; transition: 0.3s; }

/* Mobile Overlay */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 7, 0.95);
    backdrop-filter: blur(20px);
    z-index: 99;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transform: translateY(-100%); transition: 0.5s ease-in-out;
}
.mobile-menu-overlay.active { transform: translateY(0); }
.mobile-links { list-style: none; text-align: center; }
.mobile-links li { margin: 2rem 0; }
.mobile-links a {
    font-family: var(--font-head); font-size: 2rem; color: white;
    text-decoration: none; text-transform: uppercase;
}
.mobile-links a:hover { color: var(--accent); }

/* --- 6. SECTIONS --- */
section {
    padding: 6rem 10%;
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
}
.hidden-element { opacity: 0; transform: translateY(50px); transition: all 1s ease-out; }
.show-element { opacity: 1; transform: translateY(0); }
.subtitle { color: var(--accent); font-family: var(--font-head); font-size: 0.9rem; letter-spacing: 2px; margin-bottom: 1rem; display: block; }

/* Hero */
.hero-title {
    font-family: var(--font-head);
    font-size: clamp(2.5rem, 6vw, 6rem);
    line-height: 1;
    text-transform: uppercase;
    background: linear-gradient(to right, #fff, #999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
}
.hero-desc { max-width: 600px; color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; margin-bottom: 2.5rem; }
.hero-stats { display: flex; gap: 3rem; margin-bottom: 3rem; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--text-muted); }
.hero-stats span { font-family: var(--font-head); font-size: 2rem; color: var(--accent); margin-bottom: 0.5rem; }

/* Layouts */
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.tech-box { border: 1px solid var(--accent); padding: 2rem; background: var(--accent-dim); }
.tech-box ul { list-style: none; margin-top: 1rem; }
.tech-box li { margin-bottom: 0.5rem; padding-left: 1rem; border-left: 2px solid var(--secondary); }

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(250px, auto);
    gap: 1.5rem;
}
.bento-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    transition: 0.4s;
    display: flex; flex-direction: column; justify-content: space-between;
}
.bento-card:hover { border-color: var(--accent); transform: translateY(-5px); }
.bento-card.large { grid-column: span 2; }
.bento-number { font-family: var(--font-head); font-size: 2rem; opacity: 0.1; position: absolute; top: 1rem; right: 1.5rem;}
.bento-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: #fff; }
.bento-card p { font-size: 0.95rem; color: #aaa; line-height: 1.5; }

/* Results Graph Styles */
.data-vis-container { display: flex; gap: 3rem; align-items: center; border-top: 1px solid var(--glass-border); padding-top: 2rem; }
.graph-svg-container {
    width: 100%; max-width: 350px; position: relative;
    background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border); padding: 1rem; border-radius: 10px;
}
.graph-title {
    font-family: var(--font-head); color: var(--accent); font-size: 0.7rem; letter-spacing: 1px;
    margin-bottom: 1rem; text-align: center;
}
.tech-graph { width: 100%; height: 200px; filter: drop-shadow(0 0 5px var(--accent-dim)); }
.graph-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawGraph 3s ease-out forwards;
}
@keyframes drawGraph { to { stroke-dashoffset: 0; } }
.graph-axes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.y-label, .x-label { position: absolute; font-size: 0.6rem; color: #666; }
.y-label.top { top: 35px; left: 5px; }
.y-label.mid { top: 55px; left: 5px; }
.y-label.low { top: 75px; left: 5px; }
.x-label.left { bottom: 5px; left: 10px; }
.x-label.right { bottom: 5px; right: 10px; }

/* Team Section */
.team-showcase { display: flex; flex-direction: column; align-items: center; margin-bottom: 4rem; }
.holo-frame { position: relative; width: 100%; max-width: 800px; padding: 10px; border: 1px solid var(--glass-border); background: rgba(0,0,0,0.5); overflow: hidden; }
.team-photo { width: 100%; height: auto; display: block; filter: grayscale(80%) contrast(1.2); transition: 0.5s; }
.holo-frame:hover .team-photo { filter: grayscale(0%) contrast(1); }
.holo-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 240, 255, 0.05) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%; pointer-events: none; z-index: 2;
}
.corner-decor { position: absolute; width: 20px; height: 20px; border: 2px solid var(--accent); transition: 0.3s; }
.corner-decor.top-left { top: -2px; left: -2px; border-bottom: none; border-right: none; }
.corner-decor.bottom-right { bottom: -2px; right: -2px; border-top: none; border-left: none; }
.holo-frame:hover .corner-decor { width: 100%; height: 100%; opacity: 0.5; }
.team-caption { margin-top: 1rem; color: var(--accent); font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 3px; text-transform: uppercase; }
.team-strip { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--glass-border); padding: 2rem 0; transition: 0.3s; }
.team-strip:hover { padding-left: 1rem; border-color: var(--accent); }
.team-name { font-family: 'Cinzel', serif; font-size: 1.5rem; margin-top: 0.5rem; color: white;}
.team-role { color: var(--accent); font-size: 0.8rem; text-transform: uppercase; }

/* Impact Section */
.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-top: 2rem; }
.impact-card { background: linear-gradient(180deg, var(--glass), transparent); border-top: 1px solid var(--glass-border); padding: 2rem; text-align: center; transition: 0.3s; }
.impact-card:hover { background: var(--glass); border-top-color: var(--accent); transform: translateY(-5px); }
.impact-card h3 { color: #fff; margin-bottom: 1rem; font-family: var(--font-head); }
.impact-card p { color: var(--text-muted); line-height: 1.6; }
.impact-card.accent { border: 1px solid var(--accent-dim); box-shadow: inset 0 0 20px var(--accent-dim); }
.highlight-text { color: var(--accent); font-weight: bold; font-size: 1.2rem; }

/* Contact Form Styles */
.contact-section { align-items: flex-start; }
.contact-container { width: 100%; max-width: 1200px; margin: 0 auto; }
.contact-layout { align-items: start; }
.form-box { background: rgba(255,255,255,0.02); padding: 2rem; border: 1px solid var(--glass-border); border-radius: 10px; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-family: var(--font-head); font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.5rem; letter-spacing: 1px; }

input, select, textarea {
    width: 100%; padding: 1rem; background: rgba(0,0,0,0.5); border: 1px solid var(--glass-border);
    color: white; font-family: var(--font-body); font-size: 1rem; transition: 0.3s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 15px rgba(0, 240, 255, 0.1); }
select option { background: #000; color: white; }

footer { text-align: center; padding: 4rem; color: #444; font-size: 0.8rem; }

/* --- 8. RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    section { padding: 4rem 5%; }
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-card.large { grid-column: span 2; }
    .hero-title { font-size: 4rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-toggle { display: flex; }
    .split-layout { grid-template-columns: 1fr; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card.large { grid-column: auto; }
    .data-vis-container { flex-direction: column; }
    .graph-svg-container { max-width: 100%; }
}