/* Reset and Base Styles */
.view-demo {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 16px;
  background-color: #007bff;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.view-demo:hover {
  background-color: #0056b3;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e4e6ea;
    background: #0f1419;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 3D Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, #0f1419, #1a202c, #2d3748, #15202b);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(97, 218, 251, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(97, 218, 251, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(97, 218, 251, 0.6);
    border-radius: 50%;
    animation: floatParticles 20s linear infinite;
}

.particle:nth-child(1) { width: 4px; height: 4px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { width: 3px; height: 3px; left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { width: 5px; height: 5px; left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { width: 2px; height: 2px; left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { width: 4px; height: 4px; left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { width: 6px; height: 6px; left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { width: 3px; height: 3px; left: 80%; animation-delay: 14s; }
.particle:nth-child(9) { width: 5px; height: 5px; left: 90%; animation-delay: 16s; }

@keyframes floatParticles {
    0% { 
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

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

/* Header */
header {
    background: rgba(21, 32, 43, 0.9);
    backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(97, 218, 251, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #61dafb;
    text-shadow: 0 0 20px rgba(97, 218, 251, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(97, 218, 251, 0.5); }
    to { text-shadow: 0 0 30px rgba(97, 218, 251, 0.8); }
}

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

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

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #61dafb, #4fa8c5);
    transition: width 0.3s ease;
}

.nav-links a:hover::before {
    width: 100%;
}

.nav-links a:hover {
    color: #61dafb;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    perspective: 1000px;
}

.hero-content {
    transform-style: preserve-3d;
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: rotateX(0deg) rotateY(0deg) translateZ(0px); }
    25% { transform: rotateX(5deg) rotateY(-5deg) translateZ(20px); }
    50% { transform: rotateX(0deg) rotateY(0deg) translateZ(0px); }
    75% { transform: rotateX(-5deg) rotateY(5deg) translateZ(20px); }
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(97, 218, 251, 0.5);
    animation: slideInDown 1s ease 0.2s both, textGlow 3s ease-in-out infinite alternate;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes textGlow {
    from { text-shadow: 0 0 30px rgba(97, 218, 251, 0.5); }
    to { text-shadow: 0 0 50px rgba(97, 218, 251, 0.8); }
}

.hero-content .subtitle {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #61dafb;
    font-weight: 600;
    animation: slideInUp 1s ease 0.4s both, pulse 2s ease-in-out infinite;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: #a0aec0;
    animation: fadeIn 1s ease 0.6s both;
}

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

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideInUp 1s ease 0.8s both;
}

.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

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

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

.btn-primary {
    background: linear-gradient(45deg, #61dafb, #4fa8c5);
    color: #0f1419;
    box-shadow: 0 10px 30px rgba(97, 218, 251, 0.3);
}

.btn-primary:hover {
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 0 20px 40px rgba(97, 218, 251, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #61dafb;
    border: 2px solid #61dafb;
    box-shadow: 0 10px 30px rgba(97, 218, 251, 0.2);
}

.btn-secondary:hover {
    background: rgba(97, 218, 251, 0.1);
    transform: translateY(-5px) rotateX(-10deg);
    box-shadow: 0 20px 40px rgba(97, 218, 251, 0.3);
}

/* Sections */
section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #ffffff;
    position: relative;
    animation: slideInScale 0.8s ease both;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #61dafb, #4fa8c5);
    border-radius: 2px;
}

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    text-align: center;
    perspective: 1000px;
}

.profile-img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(45deg, #61dafb, #4fa8c5, #61dafb);
    background-size: 200% 200%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #0f1419;
    margin: 0 auto;
    font-weight: bold;
    border: 4px solid rgba(97, 218, 251, 0.3);
    box-shadow: 0 20px 60px rgba(97, 218, 251, 0.3);
    animation: rotate3D 8s ease-in-out infinite, gradientRotate 6s ease infinite;
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: rotateY(180deg) scale(1.1);
}

@keyframes rotate3D {
    0%, 100% { transform: rotateX(0deg) rotateY(0deg); }
    25% { transform: rotateX(10deg) rotateY(10deg); }
    50% { transform: rotateX(0deg) rotateY(0deg); }
    75% { transform: rotateX(-10deg) rotateY(-10deg); }
}

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

.about-text {
    animation: slideInRight 1s ease 0.3s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #61dafb;
}

.about-text p {
    margin-bottom: 1rem;
    color: #a0aec0;
    line-height: 1.8;
}

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

.skill-category {
    background: rgba(45, 55, 72, 0.8);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(97, 218, 251, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    transform-style: preserve-3d;
    animation: fadeInUp 0.6s ease both;
}

.skill-category:nth-child(even) {
    animation-delay: 0.2s;
}

.skill-category:nth-child(3n) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px) rotateX(-10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

.skill-category:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    border-color: #61dafb;
    box-shadow: 0 20px 40px rgba(97, 218, 251, 0.2);
}

.skill-category h3 {
    color: #61dafb;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

.skill-tag {
    background: rgba(74, 85, 104, 0.8);
    color: #e4e6ea;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    border: 1px solid rgba(97, 218, 251, 0.5);
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: rgba(97, 218, 251, 0.2);
    color: #61dafb;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(97, 218, 251, 0.3);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.project-card {
    background: rgba(45, 55, 72, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(97, 218, 251, 0.3);
    overflow: hidden;
    transition: all 0.5s ease;
    transform-style: preserve-3d;
    backdrop-filter: blur(10px);
    animation: projectSlide 0.8s ease both;
}

.project-card:nth-child(even) {
    animation-delay: 0.2s;
}

@keyframes projectSlide {
    from {
        opacity: 0;
        transform: translateX(-100px) rotateY(-20deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotateY(0deg);
    }
}

.project-card:hover {
    transform: translateY(-15px) rotateX(10deg) rotateY(-5deg);
    border-color: #61dafb;
    box-shadow: 0 25px 50px rgba(97, 218, 251, 0.3);
}

.project-header {
    background: linear-gradient(135deg, rgba(74, 85, 104, 0.9), rgba(45, 55, 72, 0.9));
    color: #ffffff;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(97, 218, 251, 0.3);
    position: relative;
    overflow: hidden;
}

.project-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(97, 218, 251, 0.1), transparent);
    transition: left 0.5s;
}

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

.project-header h3 {
    margin-bottom: 0.5rem;
    color: #61dafb;
}

.project-body {
    padding: 1.5rem;
}

.project-body p {
    color: #a0aec0;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    background: rgba(74, 85, 104, 0.8);
    color: #61dafb;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(97, 218, 251, 0.5);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(97, 218, 251, 0.2);
    transform: scale(1.1);
}

/* Contact Section */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    animation: fadeInUp 0.8s ease both;
}

.contact-content p {
    color: #a0aec0;
    margin-bottom: 2rem;
}

.contact-info {
    background: rgba(45, 55, 72, 0.8);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(97, 218, 251, 0.3);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(97, 218, 251, 0.2);
}

.contact-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: scale(1.05);
}

.contact-item span:first-child {
    font-size: 1.5rem;
    animation: bounce 2s ease-in-out infinite;
}

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

.contact-item a {
    color: #61dafb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #4fa8c5;
    text-shadow: 0 0 10px rgba(97, 218, 251, 0.5);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-links a {
    padding: 15px 30px;
    background: linear-gradient(45deg, #61dafb, #4fa8c5);
    color: #0f1419;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(97, 218, 251, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-links a::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;
}

.contact-links a:hover::before {
    left: 100%;
}

.contact-links a:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(97, 218, 251, 0.4);
}

/* Footer */
footer {
    background: rgba(15, 20, 25, 0.9);
    color: #a0aec0;
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(97, 218, 251, 0.3);
    backdrop-filter: blur(10px);
}

/* Scroll animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

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

/* Cursor animation */
@keyframes cursorFade {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(3); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links { display: none; }
    
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content .subtitle { font-size: 1.2rem; }
    
    .about-content { 
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .profile-img { 
        width: 200px;
        height: 200px;
        font-size: 3rem;
    }
    
    .contact-links { 
        flex-direction: column;
        align-items: center;
    }
    
    .particles { display: none; }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}