:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --light-color: #f3f4f6;
    --dark-color: #1f2937;
    --text-color: #4b5563;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8fafc;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Header and Navigation */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem; 
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 2rem;
    padding: 0.5rem 0;
    letter-spacing: 0.5px; 
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    justify-content: center; 
}

.nav-links li {
    margin-left: 1.5rem;
}

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

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

.social-links {
    display: flex;
    align-items: center;
}

.social-links a {
    margin-left: 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

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

.language-switcher {
    display: flex;
    align-items: center;
    margin-left: 1.5rem;
}

.language-switcher button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.language-switcher button:hover,
.language-switcher button.active {
    color: var(--primary-color);
}

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

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    padding: 5rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    scroll-margin-top: 5rem;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

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

section:not(.visible) {
    opacity: 0;
    transform: translateY(30px);
    will-change: opacity, transform;
}

section.visible {
    animation: fadeInUp 0.8s ease forwards;
}

/* Section-specific animations */
#about.visible .about-image {
    animation: fadeInLeft 1s ease 0.2s forwards;
}

#about.visible .about-content {
    animation: fadeInRight 1s ease 0.4s forwards;
}

.skill-card, .project-card, .timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

section.visible .skill-card, 
section.visible .project-card, 
section.visible .timeline-item {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for cards */
section.visible .skill-card:nth-child(1),
section.visible .project-card:nth-child(1),
section.visible .timeline-item:nth-child(1) {
    transition-delay: 0.1s;
}

section.visible .skill-card:nth-child(2),
section.visible .project-card:nth-child(2),
section.visible .timeline-item:nth-child(2) {
    transition-delay: 0.2s;
}

section.visible .skill-card:nth-child(3),
section.visible .project-card:nth-child(3),
section.visible .timeline-item:nth-child(3) {
    transition-delay: 0.3s;
}

section.visible .skill-card:nth-child(4),
section.visible .project-card:nth-child(4),
section.visible .timeline-item:nth-child(4) {
    transition-delay: 0.4s;
}

section.visible .skill-card:nth-child(5),
section.visible .project-card:nth-child(5),
section.visible .timeline-item:nth-child(5) {
    transition-delay: 0.5s;
}

/* Additional entrance animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f3f4f6;
    text-align: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
}

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

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

/* About Section */
.about {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.about-image {
    flex: 1;
    min-width: 300px;
    opacity: 0;
    transform: translateX(-30px);
}

.about-content {
    flex: 2;
    min-width: 300px;
    opacity: 0;
    transform: translateX(30px);
}

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

.about-content ul {
    list-style-type: none;
    margin-bottom: 1.5rem;
}

.about-content ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.about-content ul li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

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

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

.timeline-item {
    padding: 1rem 2rem;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 2rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border: 3px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.left::after {
    right: -10px;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

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

.timeline-content .date {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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


.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    height: 250px; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.project-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

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

.project-content {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.github-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.github-link i {
    margin-right: 0.5rem;
}

.github-link:hover {
    color: var(--secondary-color);
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    transform: translateY(30px);
    opacity: 0;
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

section.visible .contact-form {
    transform: translateY(0);
    opacity: 1;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

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

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-info {
    flex: 1;
    min-width: 200px;
    margin-bottom: 1.5rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #f3f4f6;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

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

.footer-social {
    flex: 1;
    min-width: 200px;
    display: flex;
    justify-content: flex-start;
}

.footer-social a {
    color: white;
    font-size: 1.5rem;
    margin-right: 1.5rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 991px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .experience-timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item.right {
        left: 0;
    }
    
    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 20px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        background-color: white;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-120%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-links li {
        margin: 0.8rem 0;
        width: 100%;
    }
    
    .social-links, .language-switcher {
        margin-left: 0;
        margin-top: 0.8rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .about {
        flex-direction: column;
    }
    
    .about-image {
        order: -1;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-social {
        justify-content: center;
        margin-top: 1rem;
    }
}