/* --- CSS VARIABLES --- */
:root {
    --bg-base: #020205;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-blue: rgba(14, 30, 64, 0.4);
    --accent-glow: #1e3a8a;
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-bg-hover: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-border-light: rgba(255, 255, 255, 0.15);
    --glass-blur: blur(20px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
    
    /* Spacing & Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

/* --- RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html.smooth-scroll {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- BACKGROUNDS (Cinematic Space) --- */
canvas#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;
    pointer-events: none;
}

.vignette-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-base) 100%);
    z-index: -2;
    pointer-events: none;
    transition: transform 0.1s linear; /* For Parallax */
}

.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    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)' opacity='0.05'/%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 { font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.hero-title { font-size: clamp(3rem, 8vw, 6rem); margin-bottom: 0.5rem; }
.section-title { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 3rem; }
.section-title span { color: var(--text-muted); }
.subtitle { font-size: clamp(0.9rem, 2vw, 1.1rem); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.tagline { font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 300; color: var(--text-muted); margin-bottom: 2.5rem; }

/* --- GLASSMORPHISM SYSTEM --- */
.glass-panel, .glass-card, .glass-nav, .glass-btn, .glass-footer {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Glass Reflections */
.glass-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
}
.glass-reflection {
    position: absolute;
    top: 0; left: -150%; width: 150%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: all 0.6s ease;
    z-index: 1;
    pointer-events: none;
}
.glass-card:hover .glass-reflection { left: 150%; }
.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px 0 rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(30, 58, 138, 0.1);
}

/* --- BUTTONS --- */
.glass-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 1rem 2rem; border-radius: 100px;
    color: var(--text-main); text-decoration: none; font-weight: 500;
    cursor: pointer; transition: var(--transition-smooth);
    position: relative; overflow: hidden;
}
.primary-btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); }
.primary-btn:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.4); transform: scale(1.02); }
.secondary-btn:hover { background: rgba(255, 255, 255, 0.05); }
.small-btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; }
.text-btn { background: transparent; border: none; box-shadow: none; padding: 0.6rem; }
.text-btn:hover { transform: translateX(5px); color: #fff; }
.icon-btn { width: 50px; height: 50px; padding: 0; border-radius: 50%; }

/* --- COMPONENTS --- */
/* Scroll Progress */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; background: #fff;
    width: 0%; z-index: 1000; box-shadow: 0 0 10px #fff; transition: width 0.1s ease;
}

/* Navbar */
.glass-nav {
    position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 90%; border-radius: 100px; z-index: 100;
    padding: 0.8rem 2rem; transition: var(--transition-smooth);
}
.glass-nav.scrolled { 
    top: 0; 
    width: 100%; 
    max-width: 100%; /* <-- This is the magic line that removes the cap */
    border-radius: 0; 
    padding: 1rem 2rem; 
    background: rgba(2, 2, 5, 0.6); 
    border-left: none;
    border-right: none;
    border-top: none;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 1.5rem; font-weight: 700; color: #fff; text-decoration: none; }
.brand span { color: var(--text-muted); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; transition: var(--transition-smooth); position: relative; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 2px; background: #fff; border-radius: 2px;
}
.mobile-menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* Layout Utilities */
.section { padding: 8rem 2rem; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.container { max-width: 90%; margin: 0 auto; width: 100%; }
.py-small { min-height: auto; padding: 4rem 2rem; }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.flex-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.center-btns { justify-content: center; margin-top: 2rem; }

/* Hero Specifics */
.hero-title .word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.hero-title .char { display: inline-block; transform: translateY(100%); transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.hero-title.revealed .char { transform: translateY(0); }

.profile-card {
    padding: 3rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(14,30,64,0.1) 100%);
    transform-style: preserve-3d; /* For mouse tilt */
}
.avatar-placeholder {
    width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,0.05);
    display: flex; justify-content: center; align-items: center; border: 1px solid var(--glass-border);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5); transform: translateZ(30px);
}
.avatar-placeholder svg { width: 40px; height: 40px; color: var(--text-muted); }
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; transform: translateZ(20px); }
.glass-chip { padding: 0.4rem 0.8rem; font-size: 0.8rem; border-radius: 100px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); }
.divider { width: 50px; height: 1px; background: var(--glass-border-light); transform: translateZ(10px); }
.profile-line { color: var(--text-muted); font-size: 0.9rem; transform: translateZ(15px); }

/* Scroll Indicator */
.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; opacity: 1; transition: opacity 0.3s; }
.scroll-indicator.hidden { opacity: 0; pointer-events: none; }
.mouse { width: 24px; height: 36px; border: 2px solid var(--text-muted); border-radius: 12px; position: relative; }
.mouse::before { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background: #fff; border-radius: 50%; animation: scroll 1.5s infinite; }
.scroll-indicator span { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
@keyframes scroll { 0% { top: 6px; opacity: 1; } 100% { top: 20px; opacity: 0; } }

/* Grids */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.mini-card { padding: 1.5rem; border-radius: var(--radius-md); display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; font-weight: 500; }
.mini-card .icon { font-size: 1.5rem; }

.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.project-card { display: flex; flex-direction: column; }
.project-image-placeholder { height: 250px; background: rgba(0,0,0,0.3); border-bottom: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.9rem; }
.project-content { padding: 2rem; display: flex; flex-direction: column; gap: 1rem; flex-grow: 1; }
.project-content h3 { font-size: 1.5rem; }
.project-content p { color: var(--text-muted); font-size: 0.95rem; }
.project-links { margin-top: auto; display: flex; align-items: center; gap: 1rem; padding-top: 1rem; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.service-card { padding: 2.5rem 2rem; }
.service-card h3 { margin-bottom: 1rem; font-size: 1.3rem; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Philosophy Quote */
.quote-block { padding: 4rem; border-radius: var(--radius-lg); position: relative; overflow: hidden; text-align: center; max-width: 800px; }
.quote-block blockquote { font-family: var(--font-serif); font-size: clamp(1.5rem, 4vw, 2.5rem); line-height: 1.4; color: var(--text-muted); }
.quote-block strong { color: #fff; font-family: var(--font-sans); }
.light-sweep { position: absolute; bottom: 0; left: -100%; width: 50%; height: 2px; background: linear-gradient(90deg, transparent, #fff, transparent); animation: sweep 4s infinite linear; }
@keyframes sweep { 0% { left: -100%; } 100% { left: 200%; } }

/* Footer */
.glass-footer { margin-top: 4rem; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 4rem 2rem 2rem; border-bottom: none; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--text-muted); margin-top: 0.5rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 1rem; }
.footer-bottom { text-align: center; color: var(--text-muted); font-size: 0.8rem; border-top: 1px solid var(--glass-border); padding-top: 2rem; }

/* Back to Top */
#back-to-top { position: fixed; bottom: 2rem; right: 2rem; z-index: 99; opacity: 0; pointer-events: none; transform: translateY(20px); }
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* --- ANIMATIONS & OBSERVER CLASSES --- */
.reveal-item {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-item.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* --- RESPONSIVE / MEDIA QUERIES --- */
@media (max-width: 992px) {
    .split-layout { grid-template-columns: 1fr; text-align: center; }
    .hero-content { display: flex; flex-direction: column; align-items: center; }
    .hero-visual { padding: 0 2rem; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-social { justify-content: center; }
}
@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .mobile-menu-toggle { display: block; }
    .section { padding: 6rem 1.5rem; }
    .quote-block { padding: 2rem; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal-item { opacity: 1; filter: none; transform: none; transition: none; }
    .hero-title .char { transform: none; transition: none; }
}

/* WebGL Stripe Gradient Background */
#gradient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -4; /* Placed completely in the back */
    --gradient-color-1: #00D4EA; 
    --gradient-color-2: #FFFF00; 
    --gradient-color-3: #00031B;  
    --gradient-color-4: #00031B;
}