/* --- UPDATED LIQUID METALLIC VARIABLES --- */
/* --- THEME VARIABLES --- */
/* --- THEME VARIABLES --- */
:root {
    /* Dark Mode (Default) */
    --bg-color: #050505; 
    --text-color: #ffffff;
    --blob-gradient: linear-gradient(45deg, #333, #888, #333);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.15);
    --accent: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.8);
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-color: #f0f0f0;
    --text-color: #1a1a1a;
    --blob-gradient: linear-gradient(45deg, #bbb, #fff, #bbb);
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.1);
    --accent: #000000;
    --card-shadow: rgba(0, 0, 0, 0.1);
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-color: #f0f0f0;
    --text-color: #1a1a1a;
    --blob-gradient: linear-gradient(45deg, #bbb, #fff, #bbb);
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.1);
    --accent: #000000;
    --card-shadow: rgba(0, 0, 0, 0.1);
}
/* --- RESET & FONTS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    
    /* --- SMOOTH PAGE TRANSITION START --- */
    opacity: 0; /* Start hidden */
    transition: opacity 0.6s ease-in-out; /* The "Butter" speed */
}

/* This class will be added by JS to fade the page in */
body.loaded {
    opacity: 1;
}
/* --- SMOOTH PAGE TRANSITION END --- */

/* This class will be added by JS to fade the page in */
body.loaded {
    opacity: 1;
}
/* --- SMOOTH PAGE TRANSITION END --- */

/* --- 3. LIQUID BACKGROUND ENGINE --- */
.gradient-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    overflow: hidden;
    filter: blur(80px) contrast(150%);
}

.blob {
    position: absolute;
    width: 500px; height: 500px;
    background: var(--blob-gradient);
    border-radius: 50%;
    opacity: 0.5;
    animation: liquidMove 20s infinite alternate ease-in-out;
}

.blob-1 { top: -10%; left: -10%; animation-duration: 15s; }
.blob-2 { bottom: -10%; right: -10%; width: 600px; }
.blob-3 { top: 40%; left: 30%; width: 300px; height: 300px; }

@keyframes liquidMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(100px, 50px) rotate(360deg); }
}


/* Add these blob shapes via HTML later */
.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(45deg, #fff, #555, #fff);
    border-radius: 50%;
    opacity: 0.5;
    animation: liquidMove 20s infinite alternate ease-in-out;
}

.blob-1 { top: -10%; left: -10%; animation-duration: 15s; }
.blob-2 { bottom: -10%; right: -10%; animation-delay: -5s; width: 600px; }
.blob-3 { top: 40%; left: 30%; width: 300px; height: 300px; animation-duration: 25s; }

@keyframes liquidMove {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(100px, 50px) scale(1.1) rotate(180deg); }
    100% { transform: translate(-50px, 100px) scale(1) rotate(360deg); }
}


/* --- NAV --- */
/* --- 4. NAVIGATION (Centered Toggle) --- */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 8%;
    position: fixed;
    width: 100%; top: 0; z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-center {
    display: flex; justify-content: center; align-items: center; flex: 1;
}

.theme-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    width: 45px; height: 45px;
    border-radius: 50%; cursor: pointer;
    font-size: 1.2rem; transition: 0.3s;
}

.theme-btn:hover { transform: scale(1.1); background: var(--text-color); color: var(--bg-color); }

.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-color); font-weight: 500; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); opacity: 0.7; }
/* 1. Laptop par icon ko hamesha ke liye hide rakho */
.hamburger {
    display: none !important; 
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
}


/* --- HERO SECTION --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    perspective: 1000px;
}

.hero-content { max-width: 600px; z-index: 10; }
.tagline { color: var(--accent); font-weight: 500; letter-spacing: 2px; text-transform: uppercase; }

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin: 15px 0;
}

.gradient-text {
    background: linear-gradient(to right, #ff00cc, #333399);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-content p { font-size: 1.2rem; margin-bottom: 30px; color: #ddd; }

/* Buttons */
.btn-group { display: flex; gap: 20px; }

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
}

.primary-btn {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 0, 204, 0.4);
    border: none;
    cursor: pointer;
}

.secondary-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn:hover { transform: translateY(-3px); }

/* --- 3D CUBE --- */
.cube-container { width: 300px; height: 300px; perspective: 1000px; margin-right: 5%; }

.cube {
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: autoRotate 20s infinite linear;
    transition: transform 0.2s ease-out;
}

.face {
    position: absolute;
    width: 300px; height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 50px rgba(255, 0, 204, 0.2);
    gap: 15px;
}

.face span { font-size: 1.2rem; font-weight: 600; letter-spacing: 2px; }

.front  { transform: translateZ(150px); }
.back   { transform: rotateY(180deg) translateZ(150px); }
.right  { transform: rotateY(90deg) translateZ(150px); }
.left   { transform: rotateY(-90deg) translateZ(150px); }
.top    { transform: rotateX(90deg) translateZ(150px); }
.bottom { transform: rotateX(-90deg) translateZ(150px); }

@keyframes autoRotate {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* --- COMMON SECTIONS --- */
.container { padding: 80px 10%; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 50px; }

.page-header {
    padding-top: 150px;
    text-align: center;
    padding-bottom: 50px;
}

.page-header h1 { font-size: 3.5rem; margin-bottom: 10px; }
.page-header p { font-size: 1.2rem; color: #ccc; }

/* --- SERVICES & CARDS --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.glass-card {
    background: var(--glass-bg);
    padding: 40px;
    border-radius: 20px;
    border: var(--glass-border);
    backdrop-filter: blur(30px) saturate(150%); /* Thicker liquid blur */
    -webkit-backdrop-filter: blur(30px);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    border: 1px solid rgba(255, 255, 255, 0.4); /* High-shine shine */
    box-shadow: 0 15px 50px rgba(255,255,255,0.1);
}
/* Service Page Specifics */
.service-box { text-align: left; transition: 0.3s; position: relative; }
.service-box:hover { transform: translateY(-10px) scale(1.02); border-color: var(--accent); }
.icon-large { font-size: 3rem; color: var(--accent); margin-bottom: 20px; display: block; }
.service-list { list-style: none; margin: 20px 0; color: #ddd; }
.service-list li { margin-bottom: 10px; padding-left: 20px; position: relative; }
.service-list li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }

/* Timeline */
.timeline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-top: 50px; }
.timeline-item { flex: 1; min-width: 200px; text-align: center; padding: 20px; position: relative; }
.num { font-size: 4rem; font-weight: bold; color: rgba(255, 255, 255, 0.05); position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: -1; }

/* --- CONTACT FORM --- */
.glass-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--glass-bg);
    padding: 50px;
    border-radius: 20px;
    border: var(--glass-border);
    backdrop-filter: blur(10px);
}

.input-group { position: relative; margin-bottom: 30px; }
.input-group input, .input-group textarea {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    color: white;
    outline: none;
    font-size: 1rem;
}

.input-group label {
    position: absolute;
    top: 10px; left: 0;
    pointer-events: none;
    transition: 0.3s;
    color: #ddd;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:valid ~ label {
    top: -20px; font-size: 0.8rem; color: var(--accent);
}

/* --- PROJECTS PAGE --- */
.filter-buttons { margin-top: 30px; }
.filter-btn { padding: 10px 20px; background: transparent; border: 1px solid white; color: white; margin: 0 5px; border-radius: 20px; cursor: pointer; transition: 0.3s; }
.filter-btn:hover, .filter-btn.active { background: var(--accent); border-color: var(--accent); }

.project-img { height: 200px; width: 100%; border-radius: 10px; margin-bottom: 20px; }
.badge { display: inline-block; padding: 5px 10px; background: rgba(255,255,255,0.1); font-size: 0.8rem; border-radius: 5px; margin-top: 10px; color: var(--accent); }
.project-item { transition: 0.5s ease; }
.project-item.hide { display: none; }

footer { text-align: center; padding: 30px; color: rgba(255,255,255,0.6); }

/* --- MOBILE --- */
@media (max-width: 768px) {
    #hero { flex-direction: column; text-align: center; padding-top: 120px; }
    .hero-content { margin-bottom: 50px; }
    .cube-container { width: 200px; height: 200px; margin: 0; }
    .face { width: 200px; height: 200px; font-size: 2rem; }
    .front { transform: translateZ(100px); }
    .back { transform: rotateY(180deg) translateZ(100px); }
    .right { transform: rotateY(90deg) translateZ(100px); }
    .left { transform: rotateY(-90deg) translateZ(100px); }
    .top { transform: rotateX(90deg) translateZ(100px); }
    .bottom { transform: rotateX(-90deg) translateZ(100px); }
    h1 { font-size: 2.5rem; }
    .nav-links { display: none; }
    .hamburger { display: block; }
    .btn-group { justify-content: center; }
}
/* --- 1. ENABLE SMOOTH SCROLLING --- */
html {
    scroll-behavior: smooth;
}

/* --- 2. SCROLL ANIMATION CLASSES --- */
/* Initial state: Invisible, pushed down, and blurry */
.hidden {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(100px); /* Starts 100px lower */
    transition: all 1s ease-out; /* Takes 1 second to float up */
}

/* Final state: Visible, normal position, sharp */
.show {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Optional: Staggered delay for child elements (if you want them to pop in one by one) */
.glass-card:nth-child(2) { transition-delay: 200ms; }
.glass-card:nth-child(3) { transition-delay: 400ms; }
/* --- 3D MODEL STYLING --- */
.model-container {
    width: 400px;
    height: 400px;
    margin: 0 auto; /* Centers it */
    position: relative;
    z-index: 10;
}

model-viewer {
    width: 100%;
    height: 100%;
    background-color: transparent; /* No white box background */
    --poster-color: transparent;
}

/* Mobile responsive size */
@media (max-width: 768px) {
    .model-container {
        width: 300px;
        height: 300px;
    }
}