:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --dark: #1f2937;
    --darker: #111827;
    --light: #f9fafb;
    --gray: #9ca3af;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--darker);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(17, 24, 39, 0.95);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 8px;
    color: var(--secondary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--light);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--primary);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 26px;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 3px;
}

.theme-toggle::before {
    content: '☀️';
    position: absolute;
    left: 3px;
    font-size: 14px;
    transition: var(--transition);
}

.theme-toggle::after {
    content: '🌙';
    position: absolute;
    right: 3px;
    font-size: 14px;
    transition: var(--transition);
}

.theme-toggle span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    position: absolute;
    z-index: 1;
    transition: var(--transition);
    left: 3px;
}

body.light-mode .theme-toggle span {
    left: calc(100% - 23px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), transparent);
    opacity: 0.2;
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--secondary), transparent);
    opacity: 0.2;
    animation: float 10s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 60px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    color: var(--gray);
    max-width: 600px;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Projects Section */
.projects {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 40px;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: linear-gradient(145deg, #1a2233, #151b29);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    position: relative;
    opacity: 0;
    transform: translateY(50px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--light);
}

.project-desc {
    margin-bottom: 20px;
    color: var(--gray);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.project-tag {
    padding: 5px 12px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--secondary);
    gap: 8px;
}

/* About Section */
.about {
    padding: 100px 0;
    background: rgba(17, 24, 39, 0.7);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    font-size: 40px;
    margin-bottom: 25px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--gray);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.skill {
    padding: 8px 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 14px;
    transition: var(--transition);
}

.skill:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-3px);
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 0;
    background: var(--darker);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    font-size: 20px;
    transition: var(--transition);
}

.social-link:hover {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateY(-5px);
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 32px;
    }
}

/* Light mode */
body.light-mode {
    background-color: var(--light);
    color: var(--dark);
}

body.light-mode header.scrolled {
    background: rgba(249, 250, 251, 0.95);
}

body.light-mode nav a {
    color: var(--dark);
}

body.light-mode .project-card {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

body.light-mode .project-title {
    color: var(--dark);
}

body.light-mode .about {
    background: rgba(249, 250, 251, 0.7);
}

body.light-mode footer {
    background: var(--light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .social-link {
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark);
}

body.light-mode .skill {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
}