/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --accent: #ec4899;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --transition: all 0.3s ease;
    --transition-slow: all 0.6s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Custom Cursor */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.3s ease;
    transform: translate(-50%, -50%);
}

.cursor.hover {
    transform: translate(-50%, -50%) scale(1.5);
    background: rgba(99, 102, 241, 0.1);
}

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

.loader-content {
    text-align: center;
}

.loader-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary);
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: var(--dark-light);
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    animation: loadBar 2s ease-in-out forwards;
}

@keyframes loadBar {
    to { width: 100%; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--light);
}

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

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

.nav-link {
    position: relative;
    color: var(--gray);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--light);
    transition: var(--transition);
}

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

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

.hero-title {
    font-size: 3.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-reveal {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: textReveal 0.8s ease forwards;
}

.text-reveal.delay-1 {
    animation-delay: 0.2s;
}

.text-reveal.delay-2 {
    animation-delay: 0.4s;
}

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--light);
}

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

.magnetic {
    transition: transform 0.3s ease;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--gray);
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
    transform: rotate(45deg);
    margin-top: 0.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(10px); }
}

/* About Section */
.about {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.125rem;
}

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

.about-image img {
    border-radius: 20px;
    width: 100%;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
}

/* Skills Section */
.skills {
    padding: 8rem 0;
    background: var(--dark-light);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skill-list li {
    margin: 1rem 0;
    text-align: left;
}

.skill-bar {
    height: 8px;
    background: var(--dark);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.skill-progress {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 1.5s ease;
}

/* Experience Section */
.experience {
    padding: 8rem 0;
}

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

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

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

.timeline-content {
    background: var(--dark-light);
    border-radius: 15px;
    padding: 2rem;
    width: 45%;
}

.timeline-item:nth-child(odd) {
    justify-content: flex-end;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 2rem;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 2rem;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 2rem;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: var(--dark-light);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: var(--dark-light);
}

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

.company {
    color: var(--secondary);
}

/* Projects Section */
.projects {
    padding: 8rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--dark-light);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Gallery Section */
.gallery {
    padding: 8rem 0 0;
}

.gallery-container {
    overflow: hidden;
    padding: 2rem 0;
}

.gallery-track {
    display: flex;
    gap: 2rem;
    animation: scroll 30s linear infinite;
}

.gallery-item {
    flex-shrink: 0;
    width: 300px;
    border-radius: 20px;
    overflow: hidden;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-300px * 6 - 2rem * 6)); }
}

/* Contact Section */
.contact {
    padding: 8rem 0;
    background: var(--dark-light);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--dark);
    border: 1px solid var(--dark-light);
    border-radius: 10px;
    color: var(--light);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

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

/* Footer */
.footer {
    padding: 2rem 0;
    background: var(--dark);
    border-top: 1px solid var(--dark-light);
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

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

.particle {
    position: absolute;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container,
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .skills-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: var(--dark);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        right: 0;
    }
}

@media (max-width: 768px) {
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
    }
}