/* CSS Variables for easy theme management */
:root {
    --primary-color: #007BFF;
    --primary-hover-color: #0056b3;
    --secondary-color: #6c757d;
    --background-color: #ffffff;
    --section-bg-color: #f8f9fa;
    --text-color: #343a40;
    --heading-color: #212529;
    --border-color: #dee2e6;
    --white-color: #fff;
    --shadow: 0 4px 8px rgba(0,0,0,0.1);
    --font-family: 'Poppins', sans-serif;
}

/* Basic Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header & Navigation */

/* Language Switch Button */
.btn-lang {
    background: var(--white-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    padding: 4px 18px;
    margin-left: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
    outline: none;
}
.btn-lang:hover {
    background: var(--primary-color);
    color: var(--white-color);
}
.btn-lang.active {
    background: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-hover-color);
}
header {
    background-color: var(--white-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

nav {
    height: 70px;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-menu li {
    margin-left: 25px;
}

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

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color) !important;
    border: 1px solid var(--primary-color);
}

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

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

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

/* General Section Styling */
section {
    padding: 80px 0;
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 20px;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px auto;
    color: var(--secondary-color);
}

.skill {
    min-height: calc(20vh - 210px);
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.3)), url('../assets/background/bg.jpg');
    background-size: cover;
    background-attachment: fixed;
}

/* Hero Section */
.hero {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)), url('../assets/background/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    gap: 40px;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.hero-text h1,
.hero-text p {
    color: var(--text-color);
    
}

.hero-summary {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons a {
    margin-right: 15px;
}

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

.hero-image img {
    max-width: 500px;
    /* border-radius: 50%; */
    /* box-shadow: var(--shadow); */
}

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

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

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

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

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

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

.timeline-item:nth-child(odd) .timeline-dot {
    right: -7.5px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -7.5px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--section-bg-color);
    border-radius: 8px;
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
}

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

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--heading-color);
}

.timeline-content .company {
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.skill-category h3 {
    font-size: 1.5rem;
    color: var(--heading-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background-color: #e2eefd;
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.soft-skills-list {
    list-style: none;
}

.soft-skills-list li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.soft-skills-list i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--white-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.project-year {
    /* position: absolute; */
    top: 15px;
    right: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(226, 238, 253, 0.95);
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 1;
}

.project-image {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 3:5 Aspect Ratio */
    overflow: hidden;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-content {
    padding: 20px;
}

.project-content h3 {
    color: var(--heading-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.project-content p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Education Section */
.education-item {
    max-width: 600px;
    margin: 0 auto 30px auto;
    text-align: center;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    background-color: var(--white-color);
}
.education-item h3 { color: var(--heading-color); }
.education-item p { color: var(--text-color); }
.education-date {
    font-style: italic;
    color: var(--secondary-color);
    margin-top: 5px;
}

/* Contact Section */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contact-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

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

.contact-link i {
    margin-right: 10px;
}

/* Footer */
footer {
    background-color: var(--heading-color);
    color: var(--white-color);
    text-align: center;
    padding: 20px 0;
}

/* Animations */
.fade-in { animation: fadeIn 0.8s ease-in-out forwards; }
.fade-in-delay-1 { animation: fadeIn 0.8s 0.2s ease-in-out forwards; }
.fade-in-delay-2 { animation: fadeIn 0.8s 0.4s ease-in-out forwards; }
.fade-in-delay-3 { animation: fadeIn 0.8s 0.6s ease-in-out forwards; }

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

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

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-image {
        grid-row: 1;
        margin-bottom: 30px;
    }
    .hero-text {
        align-items: center;
    }
    .hero-summary {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white-color);
        padding: 20px 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-menu li {
        margin: 10px 0;
        text-align: center;
    }
    .nav-toggle {
        display: block;
    }

    .timeline::after {
        left: 30px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    .timeline-dot {
        left: 22.5px;
    }
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-text h1 { font-size: 2.5rem; }
    .hero-image img { max-width: 200px; }
    .section-title { font-size: 2rem; }
}