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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-text: #e2e8f0;
    --light-text: #94a3b8;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] {
    --dark-bg: #f8fafc;
    --dark-card: #ffffff;
    --dark-text: #1e293b;
    --light-text: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient);
    z-index: 9999;
    transition: width 0.1s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--dark-text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* Smooth fade-in for sections */
section {
    animation: fadeIn 0.6s ease-in;
}

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

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

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

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

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

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

.nav-menu a {
    color: var(--dark-text);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-menu a {
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

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

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

.theme-toggle {
    background: var(--dark-card);
    border: 2px solid var(--primary-color);
    color: var(--dark-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    transform: rotate(180deg);
}

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

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

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0 50px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.greeting {
    display: block;
    font-size: 1.5rem;
    color: var(--light-text);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

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

.typing-text::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--primary-color);
}

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

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 2rem;
}

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

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

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

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

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

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

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

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

.social-links a:hover {
    background: var(--gradient);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

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

.profile-card {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--dark-card);
    border-radius: 20px;
    margin: 5px;
}

.profile-avatar {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.profile-card:hover .profile-img {
    transform: scale(1.05);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

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

.scroll-indicator a {
    color: var(--light-text);
    font-size: 1.5rem;
    text-decoration: none;
}

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

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--light-text);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Skills Section */
.skills-section {
    background: var(--dark-bg);
    position: relative;
    z-index: 1;
}

.skills-container {
    max-width: 800px;
    margin: 0 auto;
}

.skill-item {
    margin-bottom: 2rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: 600;
    color: var(--dark-text);
}

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

.skill-bar {
    height: 10px;
    background: var(--dark-card);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease;
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* About Section */
.about {
    background: var(--dark-card);
    position: relative;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--light-text);
    line-height: 1.8;
}

.skills {
    margin-top: 2rem;
}

.skills h3 {
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: var(--dark-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--light-text);
    font-size: 1rem;
}

/* Projects Section */
.projects {
    position: relative;
    z-index: 1;
}

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

.project-card {
    background: var(--dark-card);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

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

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

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.3rem;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.project-link {
    color: var(--primary-color);
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.3s;
}

.project-link:hover {
    transform: scale(1.2);
}

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

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.project-language {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-text);
    font-size: 0.9rem;
}

.language-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
}

.project-stats {
    display: flex;
    gap: 1rem;
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Skeleton Loading */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}

.skeleton-header {
    height: 24px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.skeleton-content {
    height: 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

@keyframes skeleton-loading {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Timeline Section */
.timeline-section {
    background: var(--dark-bg);
    position: relative;
    z-index: 1;
}

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

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

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

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient);
    border: 4px solid var(--dark-bg);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.timeline-content {
    background: var(--dark-card);
    padding: 1.5rem;
    border-radius: 15px;
    width: 45%;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    margin-left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.timeline-content h3 {
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.timeline-content p {
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Contact Section */
.contact {
    background: var(--dark-card);
    position: relative;
    z-index: 1;
}

.contact-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
}

.contact-form-container {
    background: var(--dark-bg);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--dark-card);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    color: var(--dark-text);
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.form-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.form-group textarea + i {
    top: 1.5rem;
    transform: none;
}

.contact-form .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    cursor: pointer;
    border: none;
}

.contact-form .btn i {
    transition: transform 0.3s;
}

.contact-form .btn:hover i {
    transform: translateX(5px);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: start;
    padding: 1.5rem;
    background: var(--dark-bg);
    border-radius: 15px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.contact-item:hover {
    transform: translateX(5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.contact-item p {
    color: var(--light-text);
}

.contact-social h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark-bg);
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark-text);
    transition: all 0.3s;
    border: 1px solid transparent;
}

.social-btn:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.social-btn i {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.social-btn.github i { color: #fff; }
.social-btn.linkedin i { color: #0077b5; }
.social-btn.instagram i { color: #e4405f; }

/* Footer */
.footer {
    background: var(--dark-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.footer p {
    color: var(--light-text);
    margin-bottom: 0.5rem;
}

.footer i {
    color: var(--accent-color);
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.7;
}

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

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--dark-card);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: row;
        justify-content: space-around;
    }

    .stat-card {
        flex: 1;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .profile-card {
        width: 250px;
        height: 250px;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: row !important;
        padding-left: 3rem;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-content {
        width: 100%;
        margin: 0 !important;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .greeting {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-stats {
        flex-direction: column;
    }
}

