:root {
    /* Cosmic Black Theme */
    --cosmic-black: #0a0a0a;
    --void-dark: #111111;
    --space-gray: #1a1a1a;
    --star-white: #ffffff;
    --nebula-purple: #0004ff;
    --quantum-blue: #fda103;
    --pulsar-cyan: #f58f00;
    --nova-yellow: #ffb300;
    --supernova-red: #ff0000;
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-glow: 0 0 20px rgba(123, 44, 191, 0.5);
    --star-glow: 0 0 10px rgba(255, 255, 255, 0.8);
    --transition-cosmic: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    background-color: var(--cosmic-black);
    color: var(--star-white);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--pulsar-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    display: none; /* Initially hidden, shown by JS */
    transform: translate(-50%, -50%);
}

.cursor-dot {
    position: fixed;
    width: 4px;
    height: 4px;
    background-color: var(--pulsar-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.05s ease;
    display: none; /* Initially hidden, shown by JS */
    transform: translate(-50%, -50%);
}

/* Cosmic Background */
.cosmic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: visible; /* Changed from hidden to visible */
    pointer-events: none;
}

/* Update the stars section in style.css */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 90px 40px, #ddd, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #eee, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    /* Removed animation to prevent conflict with JS transforms */
    /* Optimized transform for hardware acceleration */
    transform: translate3d(0px, 0px, 0) rotate(0deg);
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
    backface-visibility: hidden;
    /* Reduced quality for better performance */
    image-rendering: optimizeSpeed;
}



.stars:nth-child(2) {
    background-size: 300px 300px;
    opacity: 0.5;
}

.stars:nth-child(3) {
    background-size: 400px 400px;
    opacity: 0.3;
}

@keyframes stars-drift {
    from { transform: translateY(0px); }
    to { transform: translateY(-200px); }
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(123, 44, 191, 0.5), 0 0 60px rgba(0, 245, 212, 0.2);
    }
    50% { 
        box-shadow: 0 0 40px rgba(123, 44, 191, 0.6), 0 0 70px rgba(0, 245, 212, 0.3);
    }
}

.comet {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--star-white);
    box-shadow: 0 0 10px var(--pulsar-cyan);
    border-radius: 50%;
    animation: comet-fly 15s linear infinite;
}

@keyframes comet-fly {
    0% {
        transform: translateX(-100px) translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(calc(100vh + 100px));
        opacity: 0;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

/* Section Headers with Cosmic Effects */
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--star-white);
    text-transform: uppercase;
    letter-spacing: 4px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 40px;
    transition: all 0.4s ease;
    cursor: default;
}

.section-title:hover {
    color: var(--pulsar-cyan);
    text-shadow: 0 0 20px var(--pulsar-cyan); /* Reduced from double shadow */
    letter-spacing: 6px;
    transform: translateX(-50%) scale(1.05);
}

.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--pulsar-cyan), transparent);
    transform: translateY(-50%);
}

.section-title::before {
    left: -20px;
    animation: line-pulse 2s infinite alternate;
}

.section-title::after {
    right: -20px;
    animation: line-pulse 2s infinite alternate-reverse;
}

@keyframes line-pulse {
    0% { width: 0; opacity: 0; }
    100% { width: 40px; opacity: 1; }
}

.section-subtitle {
    text-align: center;
    margin-bottom: 60px;
    color: var(--pulsar-cyan);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 300;
    transition: all 0.3s ease;
    cursor: default;
}

.section-subtitle:hover {
    color: var(--nova-yellow);
    text-shadow: 0 0 15px var(--nova-yellow);
    letter-spacing: 5px;
}

/* ============================================
   LOADING SCREEN - COSMIC BOOT WITH LOGOS
============================================ */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--cosmic-black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
}

.loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(123, 44, 191, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    width: 100%;
    max-width: 800px;
    padding: 40px;
    background: rgba(17, 17, 17, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    box-shadow: var(--neon-glow);
    backdrop-filter: blur(10px);
}

.terminal-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--pulsar-cyan);
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.terminal-output {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 180, 216, 0.3);
    border-radius: 4px;
    padding: 20px;
    overflow: hidden;
    font-family: 'Rajdhani', monospace;
    font-size: 1rem;
    color: var(--pulsar-cyan);
    position: relative;
}

.terminal-line {
    margin-bottom: 8px;
    opacity: 0;
    transform: translateX(-20px);
    animation: type-in 0.5s forwards;
    transition: all 0.3s ease;
    cursor: default;
}

.terminal-line:hover {
    color: var(--nova-yellow);
    text-shadow: 0 0 10px var(--nova-yellow);
    transform: translateX(5px);
}

@keyframes type-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Programming Language Logos */
.logos-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.programming-logo {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0;
    pointer-events: none;
    color: var(--pulsar-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 245, 212, 0.5));
    z-index: 9998;
}

@keyframes logo-pop {
    0% {
        opacity: 0;
        transform: scale(0) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(1) translateY(-20px);
    }
}

.programming-logo.pop {
    animation: logo-pop 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.loading-counter {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--supernova-red);
    text-shadow: 0 0 10px rgba(239, 71, 111, 0.5);
    margin: 20px 0;
}

.progress-bar-container {
    width: 400px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 20px 0;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--supernova-red), var(--nebula-purple));
    border-radius: 2px;
    position: relative;
    transition: width 0.1s linear;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

/* ============================================
   MAIN CONTENT
============================================ */
.main-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.main-content.visible {
    opacity: 1;
    visibility: visible;
}

/* Navigation - Cosmic Panel */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(17, 17, 17, 0.95);
    padding: 15px 0;
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.neon-chip {
    display: inline-block;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--nebula-purple), var(--quantum-blue));
    color: var(--star-white);
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.neon-chip::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    animation: chip-shine 3s infinite;
}

@keyframes chip-shine {
    to { transform: translateX(100%); }
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--pulsar-cyan);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    color: var(--star-white);
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    padding: 8px 16px;
    position: relative;
    transition: var(--transition-cosmic);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link::before {
    content: '//';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: opacity 0.3s;
    color: var(--pulsar-cyan);
}

.nav-link:hover,
.nav-link.active {
    color: var(--pulsar-cyan);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

/* ============================================
   HOME SECTION - COSMIC TERMINAL
============================================ */
.home-section {
    padding-top: 150px;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.home-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Cosmic Terminal */
.cosmic-terminal {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.9), rgba(26, 26, 26, 0.9));
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 
        0 0 30px rgba(123, 44, 191, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.cosmic-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--supernova-red), var(--nebula-purple));
}

.terminal-content {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 245, 212, 0.2);
    border-radius: 4px;
    padding: 25px;
    min-height: 320px;
    font-family: 'Rajdhani', monospace;
    font-size: 1rem;
    color: var(--pulsar-cyan);
    line-height: 1.8;
    position: relative;
    overflow: hidden;
}

.terminal-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 50%, rgba(0, 245, 212, 0.03) 50%);
    background-size: 100% 4px;
    pointer-events: none;
}

/* Profile Card */
.cosmic-card {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.95), rgba(26, 26, 26, 0.95));
    border-radius: 12px;
    padding: 40px;
    border: 1px solid var(--glass-border);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform-style: preserve-3d;
    transition: var(--transition-cosmic);
    position: relative;
    overflow: hidden;
}

.cosmic-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(123, 44, 191, 0.4);
}

.cosmic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--supernova-red), var(--nebula-purple));
}

.card-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
}

.card-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--nebula-purple), var(--quantum-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--star-white);
    position: relative;
}

.card-avatar::after {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    border: 2px solid var(--pulsar-cyan);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--star-white);
    letter-spacing: 2px;
    transition: all 0.3s ease;
    cursor: default;
}

.card-title:hover {
    color: var(--pulsar-cyan);
    text-shadow: 0 0 20px var(--pulsar-cyan);
    letter-spacing: 4px;
}

.card-subtitle {
    font-family: 'Rajdhani', sans-serif;
    color: var(--pulsar-cyan);
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: default;
}

.card-subtitle:hover {
    color: var(--supernova-red);
    text-shadow: 0 0 10px var(--supernova-red);
}

.card-body {
    margin-bottom: 30px;
}

.card-text {
    color: var(--star-white);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: default;
}

.card-text:hover {
    color: var(--pulsar-cyan);
    text-shadow: 0 0 8px rgba(0, 245, 212, 0.3);
    transform: translateX(5px);
}

.highlight {
    color: var(--pulsar-cyan);
    background: rgba(0, 245, 212, 0.1);
    padding: 0 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
    cursor: default;
}

.highlight:hover {
    color: var(--nova-yellow);
    background: rgba(255, 209, 102, 0.2);
    text-shadow: 0 0 10px var(--nova-yellow);
    padding: 0 6px;
}

.card-footer {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(239, 71, 111, 0.1);
    color: var(--supernova-red);
    padding: 10px 20px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    border: 1px solid rgba(239, 71, 111, 0.3);
    transition: var(--transition-cosmic);
    cursor: default;
}

.tech-tag:hover {
    background: rgba(239, 71, 111, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 71, 111, 0.4);
    border-color: var(--supernova-red);
    text-shadow: 0 0 10px var(--supernova-red);
}

/* ============================================
   SCROLL EFFECTS
============================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scroll-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   PROJECTS SECTION - COSMIC GRID
============================================ */
.projects-section {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.8), rgba(26, 26, 26, 0.8));
    position: relative;
    overflow: hidden;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

/* Project Card */
.project-card {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.9), rgba(26, 26, 26, 0.9));
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: var(--transition-cosmic);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--nebula-purple), var(--quantum-blue));
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(123, 44, 191, 0.3);
}

.project-header {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.project-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--nebula-purple), var(--quantum-blue));
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--star-white);
    position: relative;
}

.project-icon::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    border: 2px solid var(--pulsar-cyan);
    border-radius: 8px;
    opacity: 0;
    transition: var(--transition-cosmic);
}

.project-card:hover .project-icon::after {
    opacity: 1;
    animation: pulse-square 2s infinite;
}

.project-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--star-white);
    transition: all 0.3s ease;
    cursor: default;
}

.project-title:hover {
    color: var(--pulsar-cyan);
    text-shadow: 0 0 15px var(--pulsar-cyan);
    letter-spacing: 2px;
}

.project-body {
    padding: 30px;
    flex-grow: 1;
}

.project-description {
    color: var(--star-white);
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    cursor: default;
}

.project-description:hover {
    color: var(--pulsar-cyan);
    text-shadow: 0 0 8px rgba(0, 245, 212, 0.3);
}

.tech-stack {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stack-tag {
    background: rgba(0, 245, 212, 0.1);
    color: var(--pulsar-cyan);
    padding: 8px 16px;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 245, 212, 0.2);
    transition: all 0.3s ease;
    cursor: default;
}

.stack-tag:hover {
    background: rgba(0, 245, 212, 0.2);
    border-color: var(--pulsar-cyan);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 245, 212, 0.4);
    text-shadow: 0 0 10px var(--pulsar-cyan);
}

.project-footer {
    padding: 25px 30px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 15px;
}

.project-btn {
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    transition: var(--transition-cosmic);
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.demo-btn {
    background: linear-gradient(135deg, var(--supernova-red), #ff6b6b);
    color: white;
    border: none;
}

.demo-btn:hover {
    background: linear-gradient(135deg, #ff6b6b, var(--supernova-red));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(239, 71, 111, 0.4);
}

.code-btn {
    background: transparent;
    color: var(--pulsar-cyan);
    border: 1px solid var(--pulsar-cyan);
}

.code-btn:hover {
    background: rgba(0, 245, 212, 0.1);
    transform: translateY(-3px);
}

/* Cosmic Animation */
.cosmic-animation {
    position: relative;
    height: 120px;
    width: 100%;
    overflow: hidden;
    margin-top: 60px;
    background: rgba(17, 17, 17, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.orbit-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid var(--pulsar-cyan);
    border-radius: 50%;
    top: 50%;
    left: -40px;
    transform: translateY(-50%);
    animation: orbit-spin 20s linear infinite;
}

@keyframes orbit-spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.orbit-text {
    font-family: 'Orbitron', sans-serif;
    color: var(--pulsar-cyan);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 0 15px var(--pulsar-cyan); /* Simplified shadow */
    animation: float 3s ease-in-out infinite, glow-pulse 2s ease-in-out infinite;
    white-space: nowrap;
    cursor: default;
    transition: all 0.3s ease;
}

.orbit-text:hover {
    animation: float-fast 1s ease-in-out infinite, glow-pulse-fast 0.8s ease-in-out infinite;
    letter-spacing: 6px;
    color: var(--nova-yellow);
    text-shadow: 0 0 25px var(--nova-yellow); /* Simplified shadow */
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0px);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-15px);
    }
}

@keyframes float-fast {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0px) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-20px) scale(1.05);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        text-shadow: 0 0 15px var(--pulsar-cyan);
        filter: brightness(1);
    }
    50% {
        text-shadow: 0 0 25px var(--pulsar-cyan);
        filter: brightness(1.3);
    }
}

@keyframes glow-pulse-fast {
    0%, 100% {
        filter: brightness(1.2);
    }
    50% {
        filter: brightness(1.8);
    }
}

/* ============================================
   TECH STACK - COSMIC ELEMENTS
============================================ */
.tech-section {
    background: var(--cosmic-black);
    position: relative;
}

.cosmic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin: 60px 0;
    perspective: 1000px;
}

.cosmic-element {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.9), rgba(26, 26, 26, 0.9));
    border-radius: 12px;
    padding: 30px 20px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease; /* Reduced from 0.5s for snappier response */
    text-align: center;
    position: relative;
    transform-style: preserve-3d;
    overflow: hidden;
    backface-visibility: hidden; /* Performance optimization */
}

.cosmic-element::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.2), rgba(0, 245, 212, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease; /* Reduced from 0.5s */
    border-radius: 12px;
    z-index: 0;
}

.cosmic-element:hover::before {
    opacity: 1;
}

.cosmic-element:hover {
    transform: rotateY(15deg) translateY(-15px) scale(1.05);
    box-shadow: 0 0 30px rgba(123, 44, 191, 0.5), 0 0 60px rgba(0, 245, 212, 0.2); /* Reduced from 40px and 80px */
    border-color: var(--pulsar-cyan);
}

.cosmic-element > * {
    position: relative;
    z-index: 1;
}

.element-glow {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(0, 245, 212, 0.1);
    border-radius: 8px;
    pointer-events: none;
    transition: all 0.5s ease;
}

.cosmic-element:hover .element-glow {
    border-color: rgba(0, 245, 212, 0.8);
    box-shadow: inset 0 0 20px rgba(0, 245, 212, 0.3);
}

.element-icon {
    font-size: 3rem;
    color: var(--pulsar-cyan);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(0, 245, 212, 0.5));
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cosmic-element:hover .element-icon {
    color: var(--nova-yellow);
    filter: drop-shadow(0 0 20px rgba(255, 209, 102, 0.8));
    transform: rotateY(360deg) scale(1.2);
}

.element-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--star-white);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.cosmic-element:hover .element-name {
    color: var(--nova-yellow);
    text-shadow: 0 0 10px rgba(255, 209, 102, 0.5);
}

.element-type {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: var(--pulsar-cyan);
    margin-top: 10px;
    transition: all 0.3s ease;
}

.cosmic-element:hover .element-type {
    color: var(--supernova-red);
    text-shadow: 0 0 10px rgba(239, 71, 111, 0.5);
}

/* ============================================
   CONTACT SECTION - COSMIC NODES
============================================ */
.contact-section {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.9), rgba(26, 26, 26, 0.9));
    position: relative;
}

.nodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin: 60px 0;
}

.cosmic-node {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.95), rgba(26, 26, 26, 0.95));
    border-radius: 12px;
    padding: 40px 30px;
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: var(--transition-cosmic);
    position: relative;
    overflow: hidden;
}

.cosmic-node::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--supernova-red), var(--nebula-purple));
}

.cosmic-node:hover {
    transform: translateY(-15px);
    box-shadow: 0 0 40px rgba(123, 44, 191, 0.4);
}

.node-orb {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--nebula-purple), var(--quantum-blue));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: var(--star-white);
    transition: var(--transition-cosmic);
}

.cosmic-node:hover .node-orb {
    transform: rotateY(180deg) scale(1.1);
}

.node-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--star-white);
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: default;
}

.node-title:hover {
    color: var(--pulsar-cyan);
    text-shadow: 0 0 15px var(--pulsar-cyan);
    letter-spacing: 2px;
}

.node-desc {
    font-family: 'Rajdhani', sans-serif;
    color: var(--star-white);
    font-size: 0.9rem;
    line-height: 1.6;
    transition: all 0.3s ease;
    cursor: default;
}

.node-desc:hover {
    color: var(--pulsar-cyan);
    text-shadow: 0 0 8px rgba(0, 245, 212, 0.3);
}

.node-link {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 30px;
    background: transparent;
    color: var(--pulsar-cyan);
    border: 1px solid var(--pulsar-cyan);
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-cosmic);
}

.node-link:hover {
    background: rgba(0, 245, 212, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 245, 212, 0.2);
}

/* ============================================
   FOOTER - COSMIC SIGNATURE
============================================ */
.footer {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.95), rgba(26, 26, 26, 0.95));
    padding: 50px 0;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(0, 245, 212, 0.1);
}

.signature {
    display: flex;
    align-items: center;
    gap: 20px;
}

.signature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--nebula-purple), var(--quantum-blue));
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--star-white);
}

.signature-text {
    font-family: 'Orbitron', sans-serif;
    color: var(--pulsar-cyan);
    font-size: 1rem;
}

.signature-year {
    color: var(--supernova-red);
    font-weight: bold;
}

.footer-tech {
    font-family: 'Rajdhani', sans-serif;
    color: var(--star-white);
    font-size: 0.9rem;
    text-align: right;
}

.tech-pulse {
    color: var(--pulsar-cyan);
    animation: tech-pulse 2s infinite;
}

@keyframes tech-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   RESPONSIVE STYLES
============================================ */
@media (max-width: 1200px) {
    .cosmic-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .home-split {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .cosmic-terminal {
        max-width: 100%;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .cosmic-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .nodes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(17, 17, 17, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-top: 1px solid var(--glass-border);
        backdrop-filter: blur(10px);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 10px;
    }
    
    .menu-bar {
        width: 25px;
        height: 2px;
        background: var(--pulsar-cyan);
        transition: var(--transition-cosmic);
    }
    
    .section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .cosmic-card {
        padding: 30px;
    }
    
    .card-title {
        font-size: 2rem;
    }
    
    .cosmic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nodes-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .cosmic-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .project-footer {
        flex-direction: column;
    }
    
    .cosmic-terminal {
        padding: 20px;
    }
    
    .terminal-content {
        padding: 15px;
        font-size: 0.9rem;
    }
}
