/* Printable résumé — generated from the same SQL Server data as the site. A4, single column, ATS-friendly. */

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/vazirmatn-var.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --accent: #6d4ae8;
    --accent-2: #0891b2;
}

* { box-sizing: border-box; }

html { background: #e9ecf3; }

body {
    margin: 0;
    font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
    font-size: 10.6pt;
    line-height: 1.75;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

[lang="en"] body { line-height: 1.55; }

a { color: inherit; text-decoration: none; }

.icon { flex: none; color: var(--accent); }
html[dir="ltr"] .flip-ltr { transform: scaleX(-1); }

/* Toolbar (screen only) */
.toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(233, 236, 243, .9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #d5dae5;
}

.tb-spacer { flex: 1; }

.tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #cfd5e2;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.tb-btn .icon { color: currentColor; }
.tb-btn:hover { border-color: #aab3c6; }
.tb-primary { color: #fff; background: var(--ink); border-color: var(--ink); }
.tb-primary:hover { background: #1e293b; }

/* Sheet */
.sheet {
    width: 210mm;
    min-height: 297mm;
    margin: 24px auto 48px;
    padding: 16mm 17mm 14mm;
    background: #fff;
    box-shadow: 0 20px 60px -20px rgba(15, 23, 42, .35);
    border-radius: 4px;
}

@media (max-width: 860px) {
    .sheet { width: auto; min-height: 0; margin: 12px; padding: 22px 18px; }
}

.cv-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 24px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--ink);
}

.cv-name { margin: 0; font-size: 25pt; font-weight: 900; line-height: 1.2; }
[lang="en"] .cv-name { letter-spacing: -.02em; }

.cv-title {
    margin: 2px 0 0;
    font-size: 12.5pt;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cv-contact {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 1px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 9.2pt;
    color: var(--ink-2);
}

.cv-contact li { display: flex; align-items: center; gap: 6px; }

.cv-section { margin-top: 12px; }

.cv-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    font-size: 10pt;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--accent);
}

[lang="fa"] .cv-section h2 { letter-spacing: 0; font-size: 11pt; }

.cv-section h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.cv-section > p { margin: 0; color: var(--ink-2); }

.cv-item { margin-bottom: 9px; break-inside: avoid; }
.cv-item-tight { margin-bottom: 6px; }

.cv-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.cv-item h3 { margin: 0; font-size: 10.8pt; font-weight: 800; }
.cv-org { font-weight: 600; color: var(--ink-2); }
.cv-sub { margin-bottom: 2px !important; font-size: 10pt !important; color: var(--ink-2); }

.cv-date { flex: none; font-size: 9pt; color: var(--muted); white-space: nowrap; }
.cv-link { margin-inline-start: 8px; font-size: 8.8pt; font-weight: 500; color: var(--accent-2); }

.cv-desc { margin: 1px 0 0; color: var(--ink-2); }
.cv-stack { margin: 1px 0 0; font-size: 8.8pt; color: var(--muted); text-align: start; }
html[dir="rtl"] .cv-stack { text-align: right; }

.cv-item ul { margin: 3px 0 0; padding-inline-start: 18px; color: var(--ink-2); }
.cv-item li { margin-bottom: 1px; }
.cv-item li::marker { color: var(--accent); }

.cv-compact { margin: 0; padding-inline-start: 18px; color: var(--ink-2); }
.cv-compact li { margin-bottom: 1px; }

.cv-skills { margin: 0; }
.cv-skills > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 2px 0; }
.cv-skills dt { font-weight: 700; color: var(--ink); }
.cv-skills dd { margin: 0; color: var(--ink-2); }
html[dir="rtl"] .cv-skills dd { text-align: right; }

.cv-foot {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 8.5pt;
    color: var(--muted);
    text-align: center;
}

@page { size: A4; margin: 0; }

@media print {
    html, body { background: #fff; }
    .toolbar { display: none; }
    .sheet { width: auto; min-height: 0; margin: 0; padding: 14mm 15mm 12mm; box-shadow: none; border-radius: 0; }
    a { color: inherit; }
}
