* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #050816;
    --vr-blue: #38BDF8;
    --ar-purple: #8B5CF6;
    --neon-cyan: #22D3EE;
    --soft-white: #F8FAFC;
    --glass-card: rgba(255,255,255,0.08);
    --text-gray: #94A3B8;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-dark);
    color: var(--soft-white);
    overflow-x: hidden;
    position: relative;
}

/* Cursor Glow Effect */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(56,189,248,0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: opacity 0.3s;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading-screen.hide {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-logo {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--vr-blue), var(--ar-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
}

.loader-hud {
    width: 120px;
    height: 120px;
    border: 3px solid transparent;
    border-top-color: var(--vr-blue);
    border-right-color: var(--ar-purple);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    margin: 0 auto;
    position: relative;
}

.loader-hud::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid transparent;
    border-bottom-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 2s linear infinite reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-scan {
    position: absolute;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    animation: scan 2s ease-in-out infinite;
}

@keyframes scan {
    0%, 100% { top: 30%; opacity: 0; }
    50% { top: 70%; opacity: 1; }
}

.loader-percentage {
    margin-top: 2rem;
    font-size: 1.2rem;
    color: var(--vr-blue);
    font-weight: 600;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--vr-blue), var(--ar-purple), var(--neon-cyan));
    z-index: 9998;
    transform-origin: left;
    transform: scaleX(0);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background: rgba(5,8,22,0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(56,189,248,0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--vr-blue), var(--ar-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover {
    color: var(--vr-blue);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--vr-blue);
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--soft-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0 5%;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(56,189,248,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56,189,248,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    transform-origin: center bottom;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    to { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: var(--vr-blue);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    to {
        transform: translateY(-100vh) translateX(var(--drift));
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--glass-card);
    border: 1px solid rgba(56,189,248,0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--neon-cyan);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--vr-blue), var(--ar-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.7s both;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.9s both;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 1.1s both;
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--vr-blue), var(--ar-purple));
    color: white;
    box-shadow: 0 10px 30px rgba(56,189,248,0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(56,189,248,0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--vr-blue);
    border: 2px solid var(--vr-blue);
}

.btn-secondary:hover {
    background: var(--vr-blue);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

/* Section Styles */
section {
    padding: 8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, var(--vr-blue), var(--ar-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: var(--glass-card);
    border: 1px solid rgba(56,189,248,0.2);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--vr-blue), var(--ar-purple));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.about-card:hover::before {
    transform: scaleX(1);
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: var(--vr-blue);
    box-shadow: 0 20px 40px rgba(56,189,248,0.2);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--vr-blue), var(--ar-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--soft-white);
}

.about-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Skills Section */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-chip {
    padding: 0.8rem 1.5rem;
    background: var(--glass-card);
    border: 1px solid rgba(56,189,248,0.3);
    border-radius: 50px;
    font-weight: 500;
    color: var(--soft-white);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    animation: skillFloat 3s ease-in-out infinite;
}

.skill-chip:nth-child(even) {
    animation-delay: 1.5s;
}

@keyframes skillFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.skill-chip:hover {
    background: linear-gradient(135deg, var(--vr-blue), var(--ar-purple));
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(56,189,248,0.4);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--glass-card);
    border: 1px solid rgba(56,189,248,0.2);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(56,189,248,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.project-card:hover::after {
    animation: shine 1.5s ease-in-out;
}

@keyframes shine {
    0% { top: -50%; right: -50%; }
    100% { top: 150%; right: 150%; }
}

.project-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    border-color: var(--vr-blue);
    box-shadow: 0 20px 60px rgba(56,189,248,0.3);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--soft-white);
}

.project-card p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(56,189,248,0.1);
    border: 1px solid rgba(56,189,248,0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--neon-cyan);
}

.project-link {
    display: inline-block;
    color: var(--vr-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.project-link:hover {
    color: var(--ar-purple);
    transform: translateX(5px);
}

/* AR/VR Experience Section */
.arvr-section {
    background: linear-gradient(135deg, rgba(56,189,248,0.05), rgba(139,92,246,0.05));
    position: relative;
    overflow: hidden;
}

.arvr-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.arvr-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 3rem;
}

.arvr-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sphere {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vr-blue), var(--ar-purple));
    box-shadow: 0 0 100px rgba(56,189,248,0.5);
    animation: sphereRotate 10s linear infinite;
    position: relative;
}

@keyframes sphereRotate {
    to { transform: rotate(360deg); }
}

.sphere::before {
    content: '';
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    background: var(--bg-dark);
    box-shadow: inset 0 0 50px rgba(56,189,248,0.3);
}

.scan-lines {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    animation: scanPulse 3s ease-in-out infinite;
}

@keyframes scanPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.3; }
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--glass-card);
    border: 1px solid rgba(56,189,248,0.2);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--vr-blue);
    box-shadow: 0 20px 40px rgba(56,189,248,0.2);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--soft-white);
}

.service-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Timeline Section */
.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--vr-blue), var(--ar-purple));
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: calc(50% - 2rem);
    background: var(--glass-card);
    border: 1px solid rgba(56,189,248,0.2);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.timeline-content:hover {
    border-color: var(--vr-blue);
    box-shadow: 0 10px 30px rgba(56,189,248,0.2);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--vr-blue);
}

.timeline-content p {
    color: var(--text-gray);
    line-height: 1.6;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 2rem;
    width: 20px;
    height: 20px;
    background: var(--vr-blue);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 20px var(--vr-blue);
}

/* Contact Section */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-form {
    background: var(--glass-card);
    border: 1px solid rgba(56,189,248,0.2);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--soft-white);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(56,189,248,0.3);
    border-radius: 10px;
    color: var(--soft-white);
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--vr-blue);
    box-shadow: 0 0 20px rgba(56,189,248,0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-info p {
    color: var(--text-gray);
    margin: 0;
}

.contact-info a {
    color: var(--vr-blue);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--ar-purple);
}

/* Footer */
footer {
    background: rgba(5,8,22,0.8);
    border-top: 1px solid rgba(56,189,248,0.1);
    padding: 3rem 5%;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--vr-blue), var(--ar-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-links h4 {
    color: var(--soft-white);
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-links a:hover {
    color: var(--vr-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(56,189,248,0.1);
    color: var(--text-gray);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5,8,22,0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--glass-card);
    border: 1px solid rgba(56,189,248,0.3);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    backdrop-filter: blur(10px);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-icon {
    font-size: 4rem;
    color: var(--vr-blue);
    margin-bottom: 1rem;
}

.modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5,8,22,0.95);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid,
    .about-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 0;
    }
    
    .timeline-item {
        flex-direction: column !important;
    }
    
    .timeline-content {
        width: calc(100% - 3rem);
        margin-left: 3rem;
    }
    
    .timeline-dot {
        left: 0;
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    section {
        padding: 4rem 5%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description,
    .about-content,
    .arvr-content p,
    .contact-content p {
        font-size: 1rem;
    }
}
