* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --dark-bg: #0f172a;
    --light-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --accent: #22d3ee;
}

/* Light Mode */
body.light-mode {
    --dark-bg: #ffffff;
    --light-bg: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --accent: #0ea5e9;
}

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

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

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.theme-toggle i {
    transition: transform 0.3s;
}

body.light-mode .theme-toggle {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

@media (max-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 0.9rem;
    }
}

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

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    -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(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--light-bg) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    border-radius: 50%;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

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

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

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.8rem;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--light-bg);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    margin: 1rem auto;
    border-radius: 2px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

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

/* Skills Section */
.skills-section {
    padding: 6rem 0;
    background-color: var(--dark-bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-category {
    background: var(--light-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

.skill-category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s;
}

.skill-category:hover .skill-category-icon {
    transform: rotateY(360deg);
}

.skill-category-icon i {
    font-size: 2rem;
    color: white;
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.skill-badge {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.skill-badge:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Education & Experience Section */
.experience-section {
    padding: 6rem 0;
    background-color: var(--light-bg);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 3rem auto 0;
    padding: 0 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--accent));
}

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

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

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

.timeline-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px var(--light-bg);
}

.timeline-icon.education {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.timeline-icon.experience {
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
}

.timeline-icon i {
    font-size: 1.5rem;
    color: white;
}

.timeline-content {
    width: calc(50% - 50px);
    background: var(--dark-bg);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s;
}

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

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

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.timeline-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.highlight-badge {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: row;
    }
    
    .timeline-icon {
        left: 30px;
        transform: translateX(-50%);
    }
    
    .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background-color: var(--dark-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--light-bg);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

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

.project-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.project-link:hover {
    color: var(--accent);
    gap: 0.8rem;
}

/* About Contact Info */
.about-contact {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
}

.about-contact p {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.about-contact p:last-child {
    margin-bottom: 0;
}

.about-contact i {
    color: var(--accent);
    font-size: 1.2rem;
    width: 25px;
}

.about-contact a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}

.about-contact a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: var(--light-bg);
}

.contact-subtitle {
    text-align: center;
    color: var(--primary-color);
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 3rem;
}

.contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 3rem;
}

.contact-form {
    background: var(--dark-bg);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

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

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

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

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

.contact-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

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

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

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
}
