/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rajdhani', 'Inter', sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

/* Anime-style background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #00ffff, transparent),
        radial-gradient(2px 2px at 40px 70px, #ff00ff, transparent),
        radial-gradient(1px 1px at 90px 40px, #ffff00, transparent),
        radial-gradient(1px 1px at 130px 80px, #00ff00, transparent),
        radial-gradient(2px 2px at 160px 30px, #ff0080, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

@keyframes sparkle {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

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

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    text-align: center;
    color: #fff;
}

.cube {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 2s infinite linear;
}

.face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #fff;
}

.front { transform: rotateY(0deg) translateZ(30px); }
.back { transform: rotateY(180deg) translateZ(30px); }
.right { transform: rotateY(90deg) translateZ(30px); }
.left { transform: rotateY(-90deg) translateZ(30px); }
.top { transform: rotateX(90deg) translateZ(30px); }
.bottom { transform: rotateX(-90deg) translateZ(30px); }

@keyframes rotate {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo .logo-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(45deg, #00ffff 0%, #ff00ff 50%, #ffff00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px #00ffff); }
    to { filter: drop-shadow(0 0 15px #ff00ff); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    z-index: 2;
    padding: 0 50px;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    opacity: 0;
    animation: slideInUp 1s ease 0.5s forwards;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.gradient-text {
    background: linear-gradient(45deg, #00ffff 0%, #ff00ff 30%, #ffff00 60%, #00ff00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite, heroGlow 2s ease-in-out infinite alternate;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes heroGlow {
    from { 
        filter: drop-shadow(0 0 10px #00ffff) drop-shadow(0 0 20px #ff00ff);
        transform: scale(1);
    }
    to { 
        filter: drop-shadow(0 0 20px #ff00ff) drop-shadow(0 0 30px #00ffff);
        transform: scale(1.02);
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: slideInUp 1s ease 0.7s forwards;
}

.hero-description {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 2rem;
    max-width: 500px;
    opacity: 0;
    animation: slideInUp 1s ease 0.9s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: slideInUp 1s ease 1.1s forwards;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, #00ffff 0%, #ff00ff 100%);
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 255, 255, 0.4), 0 0 20px rgba(255, 0, 255, 0.3);
    border-color: #00ffff;
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.social-links {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation: slideInUp 1s ease 1.3s forwards;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
}

.hero-3d {
    flex: 1;
    height: 100%;
    position: relative;
}

#hero-canvas {
    width: 100%;
    height: 100%;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: #667eea;
    position: relative;
    animation: bounce 2s infinite;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -3px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
    transform: rotate(45deg);
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #fff;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
}

/* About Section */
.about {
    background: #111;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: #ccc;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
}

.about-3d {
    height: 400px;
}

#about-canvas {
    width: 100%;
    height: 100%;
}

/* Skills Section */
.skills {
    background: #0a0a0a;
}

.skills-3d {
    height: 300px;
    margin-bottom: 3rem;
}

#skills-canvas {
    width: 100%;
    height: 100%;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.skill-category h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Experience Section */
.experience {
    background: #111;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 15px;
    height: 15px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 45%;
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 55%;
}

.timeline-header {
    margin-bottom: 1rem;
}

.timeline-header h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.company {
    color: #667eea;
    font-weight: 600;
    margin-right: 1rem;
}

.duration {
    color: #888;
    font-size: 0.9rem;
}

.timeline-details {
    color: #ccc;
    margin-bottom: 1rem;
}

.timeline-details li {
    margin-bottom: 0.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* Contact Section */
.contact {
    background: #0a0a0a;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: #ccc;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ccc;
}

.contact-item i {
    color: #667eea;
    width: 20px;
}

.contact-3d {
    height: 400px;
}

#contact-canvas {
    width: 100%;
    height: 100%;
}

/* Blog Section */
.blog {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
}

.blog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%2300ffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.blog-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-intro p {
    color: #ccc;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.blog-3d {
    height: 200px;
    margin-bottom: 3rem;
}

#blog-canvas {
    width: 100%;
    height: 100%;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.blog-card:hover::before {
    left: 100%;
}

.blog-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: #00ffff;
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.2), 0 0 30px rgba(255, 0, 255, 0.1);
}

.blog-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.blog-icon {
    color: #00ffff;
    font-size: 1.5rem;
}

.blog-date {
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.blog-card h3 {
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.blog-card p {
    color: #ccc;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.blog-tag {
    background: rgba(255, 0, 255, 0.2);
    color: #ff00ff;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 0, 255, 0.3);
}

.blog-link {
    color: #00ffff;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.blog-link::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.blog-link:hover {
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
}

.blog-link:hover::after {
    transform: translateX(5px);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    padding: 2rem 0;
    text-align: center;
    color: #888;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(10, 10, 10, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats {
        justify-content: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0 !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn {
        width: fit-content;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
}
