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

:root {
    /* Light mode colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-secondary: linear-gradient(135deg, #06b6d4, #3b82f6);
    --beige: #3bb2f6;
    --green: #10b981;
    --purple: #8b5cf6;
    --orange: #f59e0b;
    --red: #ef4444;
    --yellow: #eab308;
    --gray: #6b7280;
}

[data-theme="dark"] {
    /* Dark mode colors */
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Particles Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: rgba(17, 24, 39, 0.8);
}

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

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--blue);
}

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

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

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    transform: scale(1.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: var(--bg-secondary);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu.active {
    display: flex;
}

.mobile-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: var(--bg-secondary);
    color: var(--blue);
}

/* Sections */
.section {
    padding: 5rem 1rem;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    padding: 8rem 1rem 5rem;
    text-align: center;
}

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

.hero-image {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--blue);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--blue);
    color: white;
}

/* About Section */
.about-content {
    max-width: 64rem;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-content p {
    margin-bottom: 1.5rem;
}

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

.skill-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.skill-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.skill-icon {
    font-size: 1.5rem;
    color: var(--blue);
    margin-right: 0.75rem;
}

.skill-icon-green {
    color: var(--green);
}

.skill-icon-purple {
    color: var(--purple);
}

.skill-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.skill-bar {
    width: 6rem;
    height: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 0.25rem;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--blue);
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

.skill-progress-green {
    background: var(--green);
}

.skill-progress-purple {
    background: var(--purple);
}

/* Experience Section */
.experience-timeline {
    position: relative;
    max-width: 48rem;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--blue);
}

.experience-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.experience-icon {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    background: var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 1.5rem;
}

.experience-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.experience-duration {
    color: var(--blue);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.experience-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

/* Tags */
.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tag-blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.tag-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
}

.tag-purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple);
}

.tag-orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange);
}

.tag-gray {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray);
}

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

.project-card {
    background: var(--bg-card);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.project-image-blue {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.project-image-green {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.project-image-purple {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 0.75rem;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.project-link:hover {
    color: var(--purple);
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 64rem;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.testimonial-rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.testimonial-rating i:first-child {
    color: var(--yellow);
    margin-right: 0.5rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.stars i {
    color: var(--yellow);
}

.testimonial-text {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.author-title {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

.contact-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 2rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

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

/* Responsive Design */
@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .contact-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .experience-timeline {
        padding-left: 1rem;
    }
    
    .timeline-line {
        left: 1rem;
    }
    
    .experience-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
        margin-right: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .section {
        padding: 3rem 0.75rem;
    }
    
    .hero {
        padding: 6rem 0.75rem 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .skill-card,
    .project-card,
    .testimonial-card {
        padding: 1.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Hover effects */
.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}