/* --- Global Styles & Variables --- */
:root {
    --primary-color: #3498db;  /* رنگ اصلی (آبی) */
    --secondary-color: #2c3e50; /* رنگ متن اصلی (تیره) */
    --light-gray: #f4f4f4;      /* پس‌زمینه بخش‌ها */
    --border-color: #ddd;
    --text-light: #555;
}

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

body {
    font-family: 'Tahoma', sans-serif; /* یک فونت خوانا */
    line-height: 1.6;
    background-color: #fff;
    color: var(--secondary-color);
}

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

h1, h2, h3, h4 {
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

/* --- Header --- */
.resume-header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid white;
}

.header-text h1 {
    color: white;
    margin-bottom: 0.25rem;
}

.header-text h2 {
    color: white;
    font-weight: 300;
}

/* --- Main Grid Layout --- */
.resume-grid {
    display: grid;
    grid-template-columns: 1fr; /* موبایل: تک ستونه */
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* --- Sidebar --- */
.sidebar {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
}

.sidebar section {
    margin-bottom: 2rem;
}

.contact-info ul {
    list-style: none;
}
.contact-info li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* Skills Progress Bar */
.skill-item {
    margin-bottom: 1rem;
}
.progress-bar {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}
.progress-bar .fill {
    height: 10px;
    background-color: var(--primary-color);
    display: block;
}

/* --- Main Content --- */
.main-content section {
    margin-bottom: 2.5rem;
}

.main-content h3 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    margin-bottom: 1.5rem;
}

/* Experience & Education */
.job-item, .edu-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
}
.job-item:last-child, .edu-item:last-child {
    border-bottom: none;
}

.job-item .date {
    font-style: italic;
    color: #777;
    font-size: 0.9rem;
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: 1fr; /* موبایل: تک ستونه */
    gap: 1rem;
}

.project-card {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 5px;
    transition: box-shadow 0.3s ease;
}
.project-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Footer --- */
.resume-footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    margin-top: 2rem;
}

/* --- Responsive (Desktop) --- */
@media (min-width: 768px) {
    .header-content {
        flex-direction: row; /* هدر افقی در دسکتاپ */
        text-align: right;
    }

    .resume-grid {
        /* جادوی گرید: ستون کناری ۳۰٪، ستون اصلی ۷۰٪ */
        grid-template-columns: 30% 1fr;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr); /* ۲ ستون برای پروژه‌ها */
    }
}