/* Base Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #93c5fd;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --dark: #1e293b;
    --dark-gray: #334155;
    --gray: #94a3b8;
    --light-gray: #e2e8f0;
    --light: #f8fafc;
    --white: #ffffff;
    --card-bg: #ffffff;
    --body-bg: #f1f5f9;
    --error: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--body-bg);
    color: var(--dark);
    line-height: 1.6;
    transition: all 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

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

.section {
    padding: 100px 0;
}

.section.bg-light {
    background-color: var(--light);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    display: inline-block;
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    bottom: -10px;
    left: 15%;
    border-radius: 2px;
}

.view-all {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary);
    font-weight: 500;
    transition: all 0.3s;
}

.view-all:hover {
    color: var(--primary-dark);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.6);
}

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

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

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Header Styles */
header {
    background-color: var(--card-bg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
}

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

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

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

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--dark);
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 20px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.section-hero {
    padding: 180px 0 100px;
    text-align: center;
}

.section-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.section-hero p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* About Section */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--gray);
}

.about-cta {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.approach-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    text-align: center;
}

.approach-card:hover {
    transform: translateY(-10px);
}

.approach-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.approach-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

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

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border-radius: 50%;
    top: 30px;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -50px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -50px;
}

.timeline-date {
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.timeline-company {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.timeline-desc {
    color: var(--gray);
    margin-bottom: 20px;
}

.timeline-desc li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.timeline-desc li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.timeline-tech span {
    background-color: var(--light-gray);
    color: var(--dark);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skills-category {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.skills-category h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills-category h3 i {
    font-size: 1.5rem;
    color: var(--primary);
}

.skills-meter {
    margin-top: 20px;
}

.skill-bar {
    margin-bottom: 15px;
}

.skill-name {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.skill-level {
    height: 8px;
    background-color: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-level::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width 1s ease-out;
}

.skill-level[data-level="95"]::after {
    width: 95%;
}

.skill-level[data-level="90"]::after {
    width: 90%;
}

.skill-level[data-level="85"]::after {
    width: 85%;
}

.skill-level[data-level="80"]::after {
    width: 80%;
}

/* Projects Section */
.projects-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    background-color: var(--light-gray);
    color: var(--dark);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary);
    color: var(--white);
}

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

.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-links {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.project-link {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.project-link:hover {
    background-color: var(--primary);
    color: var(--white);
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.project-desc {
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tech span {
    background-color: var(--light-gray);
    color: var(--dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Open Source Section */
.opensource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.opensource-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.opensource-card:hover {
    transform: translateY(-10px);
}

.opensource-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.opensource-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.opensource-card p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-text h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary);
}

.contact-text p, .contact-text a {
    color: var(--gray);
    transition: color 0.3s;
}

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

.contact-social h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.contact-form {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray);
    border-radius: 6px;
    background-color: transparent;
    color: var(--dark);
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.g-recaptcha {
    margin-bottom: 20px;
}

.btn-loading {
    display: none;
}

.form-message {
    margin-top: 20px;
    padding: 10px 15px;
    border-radius: 6px;
    display: none;
}

.form-message.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
    display: block;
}

.form-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
    display: block;
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px;
    text-align: left;
    background-color: var(--card-bg);
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--primary);
}

.faq-question.active::after {
    content: '-';
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer p {
    padding-bottom: 20px;
    color: var(--gray);
}

.faq-question.active + .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px;
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.footer-about p {
    color: var(--gray);
}

.footer-links h3, .footer-contact h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--gray);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
}

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

.footer-bottom {
    border-top: 1px solid var(--light-gray);
    padding-top: 30px;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

.copyright {
    color: var(--gray);
    font-size: 0.9rem;
}

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

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* Responsive Styles */
@media (max-width: 1200px) {
    .section {
        padding: 80px 0;
    }
}

@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        margin-bottom: 40px;
    }
    
    .timeline::before {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: 11px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--card-bg);
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 15px 20px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .section-hero h1 {
        font-size: 2.2rem;
    }
    
    .section-hero p {
        font-size: 1rem;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .about-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn-loading {
    display: none;
}