/* --- General Styles --- */
:root {
    --primary-color: #007BFF; /* شینێکی مۆدێرن */
    --secondary-color: #f4f4f4;
    --dark-color: #333;
    --light-color: #fff;
    --font-ku: 'Noto Kufi Arabic', sans-serif;
    --font-en: 'Poppins', sans-serif;
}

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

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

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
    overflow: hidden;
}

section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* --- Language Specific Styles --- */
html[lang="en"] body {
    font-family: var(--font-en);
}
.lang-en {
    display: none;
}

/* --- Header & Navigation --- */
header {
    background: var(--light-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

#lang-toggle {
    background: var(--primary-color);
    color: var(--light-color);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

#lang-toggle:hover {
    background: #0056b3;
}


/* --- Hero Section --- */
#hero {
    background: var(--secondary-color);
    padding: 10rem 0 6rem 0;
    text-align: center;
    margin-top: 60px; /* To avoid overlap with fixed header */
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

#hero h2 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 1.5rem;
}

#hero p {
    max-width: 600px;
    margin: auto;
    margin-bottom: 2rem;
}

.cta-buttons .btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    margin: 0.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

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

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

.cta-buttons .btn:hover {
    transform: translateY(-3px);
}

/* --- Experience Timeline --- */
#experience {
    background: var(--secondary-color);
}

.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;
}

html[dir="rtl"] .timeline::after {
    left: auto;
    right: 50%;
    margin-right: -1.5px;
}

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

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

html[dir="rtl"] .timeline-item::after {
    left: -10px;
    right: auto;
}

.timeline-item:nth-child(odd) {
    left: 0;
}
html[dir="rtl"] .timeline-item:nth-child(odd) {
    left: auto;
    right: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}
html[dir="rtl"] .timeline-item:nth-child(even) {
    left: auto;
    right: 50%;
}


html[dir="rtl"] .timeline-item:nth-child(even)::after {
    left: auto;
    right: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.timeline-content .company {
    font-weight: bold;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

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

.skill-category h3 {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.skill p {
    margin-bottom: 0.5rem;
}

.skill-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    width: 100%;
}

.skill-level {
    background: var(--primary-color);
    height: 100%;
    border-radius: 10px;
    width: 0; /* Initial width for animation */
    transition: width 1.5s ease-in-out;
}

/* --- Education Section --- */
#education {
    background: var(--secondary-color);
}
.education-item {
    background: var(--light-color);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --- Contact & Footer --- */
#contact {
    text-align: center;
}
.contact-info p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}
.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
}
footer {
    background: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 1.5rem 0;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    #hero h1 { font-size: 2.5rem; }
    #hero h2 { font-size: 1.2rem; }

    /* Timeline on smaller screens */
    .timeline::after {
        left: 31px;
    }
    html[dir="rtl"] .timeline::after {
        left: auto;
        right: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    html[dir="rtl"] .timeline-item {
        padding-left: 25px;
        padding-right: 70px;
    }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) {
        left: 0;
    }
     html[dir="rtl"] .timeline-item:nth-child(odd), html[dir="rtl"] .timeline-item:nth-child(even) {
        right: 0;
        left: auto;
    }
    .timeline-item::after {
        left: 21px;
    }
    html[dir="rtl"] .timeline-item::after {
        left: auto;
        right: 21px;
    }
}