/* Root Variables */
:root {
    --primary: #8B5CF6;
    --primary-dark: #7C3AED;
    --secondary: #06B6D4;
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    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;
}

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

.logo span {
    color: var(--primary);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 20px 50px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 50px;
}

.hero-content {
    flex: 1;
    animation: fadeInUp 1s ease;
}

.greeting {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.name {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    line-height: 1.2;
}

.tagline {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

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

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

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

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blob {
    width: 350px;
    height: 350px;
    background: var(--gradient);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: blob 8s ease-in-out infinite;
    opacity: 0.8;
}

.profile-image {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    animation: float 3s ease-in-out infinite;
}

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

@keyframes blob {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--bg-card);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.about-text strong {
    color: var(--primary);
}

.about-info {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.info-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

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

.skill-category {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-10px);
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary);
    transform: scale(1.05);
}

/* Projects Section */
.projects {
    background: var(--bg-card);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-dark);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.project-image {
    height: 150px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 4rem;
    color: white;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tags span {
    background: rgba(6, 182, 212, 0.2);
    color: var(--secondary);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.project-link:hover {
    gap: 10px;
}

.view-all {
    text-align: center;
    margin-top: 50px;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient);
}

.timeline-item {
    padding-left: 60px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: 12px;
    top: 5px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
}

.timeline-content {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
}

.timeline-content h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.timeline-date {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timeline-content p:last-child {
    color: var(--text-secondary);
}

/* Education Section */
.education {
    background: var(--bg-card);
}

.education-grid {
    max-width: 600px;
    margin: 0 auto;
}

.education-card {
    background: var(--bg-dark);
    padding: 40px;
    border-radius: 15px;
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.education-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.education-icon i {
    font-size: 1.5rem;
    color: white;
}

.education-content h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.institution {
    color: var(--primary);
    margin-bottom: 5px;
}

.education-date {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.education-content p:last-child {
    color: var(--text-secondary);
}

/* Contact Section */
.contact-intro {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: -30px auto 50px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 50px;
    height: 50px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.contact-item a, .contact-item span {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--bg-card);
    padding: 30px 0;
}

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

.footer-content p {
    color: var(--text-secondary);
}

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

.footer-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image {
        order: 1;
    }
    
    .description {
        margin: 0 auto 30px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .blob {
        width: 250px;
        height: 250px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .education-card {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
    
    .timeline-dot {
        left: 2px;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Typing Animation */
.typing-text {
    overflow: hidden;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    animation: typing 3s steps(50) infinite, blink 0.7s step-end infinite;
}

@keyframes typing {
    0%, 100% { width: 0; }
    50% { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
}


/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}


/* Selection styling */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}


/* Loading animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}


/* Pulse animation for buttons */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.btn-primary:hover {
    animation: pulse 1.5s infinite;
}


/* Glow effect for cards */
.project-card:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.skill-category:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
}


/* Gradient text animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.name {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}


/* Improved focus states for accessibility */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}


/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading] {
    opacity: 0;
}


/* Card tilt effect */
.project-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}


/* Timeline animation */
.timeline-item {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideIn 0.6s ease forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* Skill tag hover scale */
.skill-tag {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


/* Contact item slide effect */
.contact-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}


/* Form input animation */
.form-group input, .form-group textarea {
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.2);
}


/* Footer link hover */
.footer-links a {
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    transform: translateY(-3px);
}


/* Section title underline animation */
.section-title::after {
    transition: width 0.5s ease;
}

.section-title:hover::after {
    width: 120px;
}


/* Navigation link active state */
.nav-links a.active {
    color: var(--primary);
}

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


/* Hero content stagger animation */
.hero-content > * {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }
.hero-content > *:nth-child(6) { animation-delay: 0.6s; }


/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* Dark mode improvements */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--bg-dark);
    }
}


/* Cursor trail styling */
.cursor-trail {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.5;
    animation: fadeOut 0.5s ease forwards;
    z-index: 9998;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(2);
    }
}
