/* =========================================================
   علی ایرانپور — استایل سایت شخصی
   ساختار: متغیرها » پایه » هدر » بخش‌ها » کامپوننت‌ها » فوتر » ریسپانسیو
   ========================================================= */

:root {
    --bg: #f4f6f9;
    --bg-soft: #eef1f6;
    --surface: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --heading: #111827;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.08);
    --border: #e5e7eb;
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
    --shadow-hover: 0 16px 40px rgba(17, 24, 39, 0.10);
    --radius: 16px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1420;
        --bg-soft: #131a29;
        --surface: #1a2233;
        --text: #d6dae3;
        --text-muted: #8b95a7;
        --heading: #f3f5f9;
        --accent: #5b8cff;
        --accent-hover: #7aa2ff;
        --accent-soft: rgba(91, 140, 255, 0.12);
        --border: #2a3548;
        --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
        --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.45);
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Yekan Bakh FaNum", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background-color: var(--bg);
    background-image: radial-gradient(circle at 20% 0%, var(--accent-soft), transparent 45%);
    color: var(--text);
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 860px;
    margin: auto;
    padding: 64px 20px 40px;
}

/* ---------- هدر / هیرو ---------- */

header {
    text-align: center;
    margin-bottom: 48px;
}

.avatar {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 0 auto 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.avatar-icon {
    width: 58px;
    height: 58px;
    color: rgba(255, 255, 255, 0.92);
}

/* عکس روی آیکن می‌نشیند؛ اگر فایل نبود، با onerror مخفی می‌شود و آیکن می‌ماند */
.avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

header h1 {
    font-size: 34px;
    font-weight: 800;
    color: var(--heading);
    margin: 0;
    letter-spacing: -0.2px;
}

/* عنوان شغلی داخل h1 (برای سئو) ولی با ظاهر زیرعنوان */
header h1 .role {
    display: block;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0;
}

header .meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 6px 16px;
    font-size: 14px;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
}

header .meta::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

header .meta a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

header .meta a:hover {
    text-decoration: underline;
}

header .lead {
    max-width: 560px;
    margin: 18px auto 0;
    font-size: 18px;
    color: var(--text);
    text-align: center;
    line-height: 1.85;
}

.hero-cta {
    margin-top: 24px;
}

/* ---------- نوار آمار ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 14px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat .num {
    display: block;
    font-size: 30px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.stat .stat-label {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ---------- بخش‌ها ---------- */

section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

h2 {
    font-size: 21px;
    color: var(--heading);
    margin: 0 0 20px;
    padding-right: 14px;
    border-right: 4px solid var(--accent);
}

p {
    font-size: 16.5px;
    margin: 0 0 16px;
    text-align: justify;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--accent);
}

/* ---------- حوزه‌های تمرکز ---------- */

.focus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.focus-item {
    padding: 22px 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.focus-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.focus-item .icon {
    font-size: 26px;
    display: block;
    margin-bottom: 10px;
}

.focus-item h3 {
    font-size: 16px;
    color: var(--heading);
    margin: 0 0 6px;
}

.focus-item p {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
    line-height: 1.7;
}

/* ---------- مهارت‌ها ---------- */

.skill-group {
    margin-bottom: 22px;
}

.skill-group:last-child {
    margin-bottom: 0;
}

.skill-group h3 {
    font-size: 15px;
    color: var(--accent);
    margin: 0 0 12px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tags li {
    padding: 7px 15px;
    font-size: 14px;
    color: var(--text);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.tags li:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- تحصیلات ---------- */

.edu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.edu li {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.edu li:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.edu-level {
    display: block;
    font-size: 13px;
    color: var(--accent);
}

.edu-degree {
    display: block;
    margin-top: 2px;
    font-size: 16px;
    font-weight: 600;
    color: var(--heading);
}

/* ---------- دکمه ---------- */

.btn {
    display: inline-block;
    margin-top: 6px;
    padding: 14px 34px;
    background-color: var(--accent);
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px var(--accent-soft);
}

/* ---------- ارتباط ---------- */

.contact {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 220px;
    padding: 16px 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
}

.contact-icon svg {
    width: 22px;
    height: 22px;
}

.contact-text {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

.contact-text .label {
    font-size: 13px;
    color: var(--text-muted);
}

.contact-text .value {
    font-size: 16px;
    font-weight: 600;
    color: var(--heading);
}

/* ---------- فوتر ---------- */

footer {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

footer p {
    margin: 0;
    text-align: center;
}

/* ---------- ریسپانسیو ---------- */

@media (max-width: 600px) {
    .container { padding: 44px 16px 32px; }
    header h1 { font-size: 27px; }
    header .tagline { font-size: 16px; }
    section { padding: 24px; }
    p { font-size: 15.5px; }
    .focus-grid { grid-template-columns: 1fr; }
    .contact { gap: 24px; }
    header .lead { font-size: 16px; }
    .stat { padding: 16px 8px; }
    .stat .num { font-size: 24px; }
    .stat .stat-label { font-size: 12px; }
    .contact-item { width: 100%; }
}
