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

:root {
    --primary-color: #6c63ff;
    --secondary-color: #ff6584;
    --dark-color: #2a2a72;
    --light-color: #f8f9fd;
    --glass-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --border: 1px solid rgba(255, 255, 255, 0.18);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    overflow-x: hidden;
    min-height: 100vh;
}

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

.section {
    padding: 100px 0;
}

.dark-section {
    background: linear-gradient(to bottom, #2a2a72, #1a1a52);
    color: white;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.dark-section .section-title {
    color: white;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.highlight {
    color: var(--primary-color);
}

/* Navigation Styles */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    background: var(--glass-color);
    border-bottom: var(--border);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 15px 20px;
    background: rgba(42, 42, 114, 0.9);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

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

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

nav.scrolled .nav-links a {
    color: white;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

.btn-line {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 3px 0;
    transition: all 0.3s ease;
}

nav.scrolled .btn-line {
    background: white;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1555949963-aa79dcee981c?ixlib=rb-4.0.3&auto=format&fit=crop&w=1500&q=80') no-repeat center center/cover;
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    backdrop-filter: blur(10px);
    background: var(--glass-color);
    padding: 40px;
    border-radius: 20px;
    border: var(--border);
    box-shadow: var(--shadow);
    animation: fadeIn 1s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--dark-color);
}

.typing-container {
    min-height: 60px;
    margin-bottom: 20px;
}

.typed-text {
    font-weight: 600;
    color: var(--primary-color);
}

.cursor {
    display: inline-block;
    background-color: var(--primary-color);
    margin-left: 0.1rem;
    width: 3px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.arrow {
    width: 20px;
    height: 20px;
    border: 2px solid var(--dark-color);
    border-left: none;
    border-top: none;
    transform: rotate(45deg);
    margin: 5px auto;
    animation: bounce 2s infinite;
}

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

/* Intro Section */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.intro-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.quick-stats {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat p {
    font-size: 0.9rem;
    color: #666;
}

/* Tech Sphere Styles - Fixed Positioning */
.tech-sphere {
    position: relative;
    width: 400px; /* Increased size */
    height: 400px; /* Increased size */
    margin: 0 auto;
}

.sphere-item {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--glass-color);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    border: var(--border);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

.sphere-item:hover {
    transform: scale(1.2);
    color: var(--secondary-color);
    z-index: 10; /* Bring to front on hover */
}

/* Fixed positioning for 10 items - evenly spaced in a circle */
.sphere-item:nth-child(1) { top: 10%; left: 45%; transform: translateX(-50%); animation-delay: 0s; } /* Python */
.sphere-item:nth-child(2) { top: 15%; right: 20%; animation-delay: 0.6s; } /* TensorFlow */
.sphere-item:nth-child(3) { top: 30%; right: 10%; animation-delay: 1.2s; } /* PyTorch */
.sphere-item:nth-child(4) { bottom: 36%; right: 10%; animation-delay: 1.8s; } /* Computer Vision */
.sphere-item:nth-child(5) { bottom: 17%; right: 17%; animation-delay: 2.4s; } /* Django */
.sphere-item:nth-child(6) { bottom: 10%; left: 45%; transform: translateX(-50%); animation-delay: 3s; } /* Flutter */
.sphere-item:nth-child(7) { bottom: 15%; left: 20%; animation-delay: 3.6s; } /* IoT */
.sphere-item:nth-child(8) { bottom: 35%; left: 10%; animation-delay: 4.2s; } /* NLP */
.sphere-item:nth-child(9) { top: 30%; left: 10%; animation-delay: 4.8s; } /* LLM */
.sphere-item:nth-child(10) { top: 15%; left: 20%; animation-delay: 5.4s; } /* Deep Learning */

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

/* Improved tooltip positioning */
.sphere-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

.sphere-item:hover::after {
    opacity: 1;
}

/* Make sure the sphere container has enough space */
.intro-visual {
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Research Cards */
.research-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.research-card {
    background: var(--glass-color);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    border: var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    text-align: center;
}

.research-card:hover {
    transform: translateY(-10px);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: white;
}

.research-card h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.dark-section .research-card h3 {
    color: white;
}

.research-card p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.dark-section .card-link {
    color: #ffcc00;
}

.card-link:hover {
    color: var(--secondary-color);
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 50px;
}

.skills-category h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 1.3rem;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-item span {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.skill-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 5px;
    width: 0;
    transition: width 1s ease;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.contact-info p {
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-item i {
    width: 30px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-color);
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    background: var(--primary-color);
}

.contact-form {
    background: var(--glass-color);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    border: var(--border);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.2);
}

textarea.form-input {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-info h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .intro-grid,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .quick-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--glass-color);
        backdrop-filter: blur(10px);
        width: 250px;
        height: 100vh;
        padding: 40px 20px;
        transition: right 0.3s ease;
        box-shadow: var(--shadow);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .menu-btn {
        display: flex;
    }
    
    .menu-btn.active .btn-line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .menu-btn.active .btn-line:nth-child(2) {
        opacity: 0;
    }
    
    .menu-btn.active .btn-line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .section {
        padding: 80px 0;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

.hero-content {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.hero-content h1,
.hero-content p {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    color: white;
}

.scroll-indicator {
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.arrow {
    border-color: white;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
}