:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --code-bg: #1e293b;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --glow: 0 0 20px rgba(99, 102, 241, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
}

body.dark-mode section {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode section:nth-child(even) {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark-mode .bio-text p {
    color: #cbd5e1;
}

body.dark-mode .project-card {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .project-card p {
    color: #94a3b8;
}

body.dark-mode .project-title {
    color: #f1f5f9;
}

body.dark-mode .skill-item {
    background: #334155;
}

body.dark-mode .stat-card {
    background: #334155;
}

/* Navigation Menu */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease, background 0.3s ease;
}

.navbar.visible {
    transform: translateY(0);
}

body.dark-mode .navbar {
    background: rgba(30, 41, 59, 0.95);
}

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

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    gap: 30px;
    align-items: center;
    list-style: none;
}

.navbar-menu a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

body.dark-mode .navbar-menu a {
    color: #e2e8f0;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
}

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

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

/* Theme Toggle Button */
.theme-toggle {
    width: 60px;
    height: 30px;
    background: #cbd5e1;
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    outline: none;
}

body.dark-mode .theme-toggle {
    background: #475569;
}

.theme-toggle::before {
    content: '☀️';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

body.dark-mode .theme-toggle::before {
    content: '🌙';
    transform: translateX(30px);
    background: #1e293b;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s;
    border-radius: 3px;
}

body.dark-mode .mobile-menu-toggle span {
    background: #e2e8f0;
}

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

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

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

.content-wrapper {
    position: relative;
    z-index: 1;
}

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

header {
    background: transparent;
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
    backdrop-filter: blur(10px);
    z-index: -1;
}

.header-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

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

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

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(99, 102, 241, 0);
    }
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.3);
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    color: white;
    box-shadow: var(--glow);
    animation: float 3s ease-in-out infinite, pulse 2s infinite;
    position: relative;
    overflow: hidden;
}

.avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}

.tagline {
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    font-weight: 300;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.typing-effect {
    border-right: 2px solid white;
    padding-right: 5px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% {
        border-color: white;
    }
    50% {
        border-color: transparent;
    }
}

section {
    padding: 100px 0;
    background: white;
    margin: 30px 0;
    border-radius: 30px;
    box-shadow: var(--shadow);
    position: relative;
}

section:nth-child(even) {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    font-weight: 800;
}

h2:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.5);
}

.bio-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.bio-text {
    flex: 1;
    min-width: 300px;
}

.bio-text p {
    margin-bottom: 20px;
    font-size: 1.15rem;
    color: #475569;
    line-height: 1.8;
    position: relative;
    padding-left: 20px;
}

.bio-text p::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.skills {
    flex: 1;
    min-width: 300px;
}

.skill-item {
    margin-bottom: 30px;
    padding: 15px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 600;
    color: #1e293b;
}

.skill-bar {
    height: 12px;
    background: linear-gradient(to right, #e2e8f0, #cbd5e1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-level {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    position: relative;
    animation: slideIn 1.5s ease-out;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.5);
}

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

@keyframes slideIn {
    from {
        width: 0;
    }
}

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

.projects {
    padding-bottom: 100px;
}

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

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s;
}

.project-card:hover .project-image::before {
    animation: shine 1.5s;
}

@keyframes shine {
    0% {
        left: -50%;
    }
    100% {
        left: 150%;
    }
}

.project-image i {
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

.project-content {
    padding: 30px;
    position: relative;
    z-index: 1;
}

.project-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #1e293b;
    font-weight: 700;
}

.project-card p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-link {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

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

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

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

footer {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    padding: 60px 0 30px;
    text-align: center;
    margin-top: 50px;
    border-radius: 30px 30px 0 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color), var(--secondary-color));
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 30px 0;
}

.social-link {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.5);
}

.copyright {
    margin-top: 20px;
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* Scroll Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    z-index: 9999;
    transition: width 0.1s;
}

/* Stats Counter */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.stat-card {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.stat-label {
    color: #64748b;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .navbar-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    body.dark-mode .navbar-menu {
        background: rgba(30, 41, 59, 0.98);
    }
    
    .navbar-menu.active {
        transform: translateX(0);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.3rem;
    }
    
    section {
        padding: 60px 0;
        margin: 20px 10px;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .avatar {
        width: 140px;
        height: 140px;
        font-size: 50px;
    }
    
    h2 {
        font-size: 2.2rem;
    }
}
