/* ===================================
   3D Portfolio - Main Stylesheet
   =================================== */

/* CSS Variables */
:root {
    --color-primary: #00d4ff;
    --color-secondary: #ff006e;
    --color-accent: #8338ec;
    --color-bg: #0a0a0a;
    --color-bg-light: #1a1a1a;
    --color-text: #ffffff;
    --color-text-dim: #a0a0a0;
    --color-success: #06ffa5;
    --color-error: #ff006e;
    
    --font-primary: 'Rajdhani', sans-serif;
    --font-accent: 'Orbitron', sans-serif;
    
    --transition-fast: 0.3s ease;
    --transition-normal: 0.5s ease;
    --transition-slow: 0.8s ease;
    
    --z-canvas: -1;
    --z-content: 1;
    --z-nav: 100;
    --z-loading: 1000;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* WebGL Canvas */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-canvas);
    pointer-events: none;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.loader-circle {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(0, 212, 255, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-family: var(--font-accent);
    font-size: 1.2rem;
    color: var(--color-primary);
    letter-spacing: 2px;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: var(--z-nav);
    transition: transform var(--transition-fast);
}

#navbar.hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-accent);
    font-size: 1.8rem;
    font-weight: 900;
}

.logo-text {
    color: var(--color-primary);
}

.logo-accent {
    color: var(--color-text);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    transition: var(--transition-fast);
}

/* Container & Sections */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    min-height: 100vh;
    padding: 100px 0;
    position: relative;
    z-index: var(--z-content);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-accent);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.title-underline {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-family: var(--font-accent);
    font-size: 5rem;
    font-weight: 900;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--color-primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--color-secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 31px, 0); }
    10% { clip: rect(70px, 9999px, 71px, 0); }
    20% { clip: rect(121px, 9999px, 6px, 0); }
    30% { clip: rect(105px, 9999px, 102px, 0); }
    40% { clip: rect(31px, 9999px, 5px, 0); }
    50% { clip: rect(85px, 9999px, 140px, 0); }
    60% { clip: rect(20px, 9999px, 60px, 0); }
    70% { clip: rect(41px, 9999px, 20px, 0); }
    80% { clip: rect(56px, 9999px, 120px, 0); }
    90% { clip: rect(15px, 9999px, 95px, 0); }
    100% { clip: rect(65px, 9999px, 40px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 119px, 0); }
    10% { clip: rect(20px, 9999px, 140px, 0); }
    20% { clip: rect(80px, 9999px, 10px, 0); }
    30% { clip: rect(115px, 9999px, 90px, 0); }
    40% { clip: rect(50px, 9999px, 60px, 0); }
    50% { clip: rect(95px, 9999px, 70px, 0); }
    60% { clip: rect(30px, 9999px, 25px, 0); }
    70% { clip: rect(71px, 9999px, 45px, 0); }
    80% { clip: rect(86px, 9999px, 100px, 0); }
    90% { clip: rect(45px, 9999px, 55px, 0); }
    100% { clip: rect(75px, 9999px, 15px, 0); }
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--color-text-dim);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--color-primary);
    border-radius: 15px;
    margin: 0 auto 10px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 2px;
    animation: mouseScroll 2s infinite;
}

@keyframes mouseScroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    font-family: var(--font-accent);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-bg);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-bg);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-text);
}

.btn-outline:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.profile-3d-container {
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: var(--z-content);
}

#profile-3d img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 10px;
}




.profile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 120px;
    color: rgba(0, 212, 255, 0.3);
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    color: var(--color-text);
    font-size: 1.3rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--color-primary);
    color: var(--color-bg);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.4);
}

.about-tagline {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.about-bio {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-dim);
    margin-bottom: 2rem;
}

.skills-container {
    margin: 2rem 0;
    min-height: 300px;
}

/* Products Section */
.products-section {
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.02) 0%, transparent 100%);
}

.section-subtitle {
    color: var(--color-text-dim);
    font-size: 1.1rem;
    margin-top: 1rem;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 110, 0.1));
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.1) rotate(2deg);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-bg);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.product-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.product-description {
    color: var(--color-text-dim);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 2rem;
    color: var(--color-primary);
    font-weight: 900;
    font-family: var(--font-accent);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.btn-product {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.btn-product::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-product:hover::before {
    width: 300px;
    height: 300px;
}

.btn-product span,
.btn-product i {
    position: relative;
    z-index: 1;
}

.btn-product i {
    transition: transform var(--transition-fast);
}

.btn-product:hover i {
    transform: translateX(5px);
}

/* Business/Projects Grid */
.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.business-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

.business-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

.business-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.business-content {
    padding: 1.5rem;
}

.business-title {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.business-description {
    color: var(--color-text-dim);
    margin-bottom: 1rem;
}

.business-date {
    font-size: 0.9rem;
    color: var(--color-primary);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    perspective: 1000px;
}

.blog-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.blog-category {
    display: inline-block;
    padding: 5px 15px;
    background: var(--color-primary);
    color: var(--color-bg);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.blog-title {
    font-size: 1.4rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.blog-excerpt {
    color: var(--color-text-dim);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-text-dim);
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-3d {
    width: 100%;
    height: 500px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
}

.contact-form {
    width: 100%;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 5px;
    color: var(--color-text);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width var(--transition-fast);
}

.form-group input:focus ~ .input-border,
.form-group textarea:focus ~ .input-border {
    width: 100%;
}

.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: rgba(6, 255, 165, 0.1);
    color: var(--color-success);
    border: 1px solid var(--color-success);
    display: block;
}

.form-message.error {
    background: rgba(255, 0, 110, 0.1);
    color: var(--color-error);
    border: 1px solid var(--color-error);
    display: block;
}

/* Footer */
.footer {
    background: rgba(10, 10, 10, 0.95);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
}

.footer-content p {
    color: var(--color-text-dim);
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 70%;
        height: calc(100vh - 70px);
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        padding: 2rem;
        transition: right var(--transition-fast);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .business-grid,
    .blog-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }
}
