/* ==========================================================================
   resume.css — صفحه‌ی رزومه (وابسته به tokenهای style.css)
   ========================================================================== */

/* ---------- Hero / سربرگ رزومه ---------- */
.cv-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--header-h) + 4.5rem) 0 4.5rem; border-bottom: 1px solid var(--line-soft); }
.cv-hero .ph { position: absolute; inset: 0; z-index: -2; min-height: 100%; }
.cv-hero .ph__glyph { display: none; }
.cv-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,10,8,0.72), rgba(11,10,8,0.94)); }
.cv-hero__grid { display: grid; grid-template-columns: 240px 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.cv-photo { position: relative; aspect-ratio: 3 / 4; }
.cv-photo::before { content: ""; position: absolute; inset: -12px 12px 12px -12px; border: 1px solid var(--line); }
.cv-photo > * { position: relative; z-index: 1; }
.cv-photo img, .cv-photo .ph { width: 100%; height: 100%; object-fit: cover; }
.cv-hero h1 { font-size: var(--fs-2xl); font-weight: 900; color: var(--white); margin-bottom: 0.3rem; }
.cv-hero__role { font-size: var(--fs-lg); color: var(--gold-2); margin: 0 0 1.4rem; font-weight: 500; }
.cv-hero__bio { max-width: 58ch; color: var(--text-on-dark); margin-bottom: 1.8rem; }
.cv-contact { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); margin-bottom: 1.8rem; }
.cv-contact li { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-sm); }
.cv-contact svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.cv-contact a:hover { color: var(--gold-2); }
.cv-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Layout ---------- */
.cv-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.cv-block { margin-bottom: var(--space-5); }
.cv-block:last-child { margin-bottom: 0; }
.cv-block > h2 { font-size: var(--fs-xl); margin-bottom: 1.6rem; display: flex; align-items: center; gap: 1rem; color: var(--text-on-light); }
.cv-block > h2::after { content: ""; flex: 1; height: 1px; background: var(--line-dark); }

/* ---------- Timeline (سوابق / تحصیلات) ---------- */
.cv-timeline { position: relative; padding-inline-start: 2rem; }
.cv-timeline::before { content: ""; position: absolute; inset-block: 0.6rem 0.4rem; inset-inline-start: 5px; width: 1px; background: var(--line-dark); }
.cv-item { position: relative; padding-bottom: 2.2rem; }
.cv-item:last-child { padding-bottom: 0; }
.cv-item::before { content: ""; position: absolute; inset-inline-start: -2rem; top: 0.75rem; width: 11px; height: 11px; border: 1px solid var(--gold-ink); background: var(--white); transform: rotate(45deg); }
.cv-item__date { font-size: var(--fs-xs); font-weight: 600; color: var(--gold-ink); letter-spacing: 0.04em; }
.cv-item h3 { font-size: 1.2rem; color: var(--text-on-light); margin: 0.1rem 0 0.1rem; }
.cv-item__org { font-size: var(--fs-sm); color: var(--text-muted-light); margin-bottom: 0.6rem; }
.cv-item p { margin: 0 0 0.6rem; font-size: var(--fs-sm); color: var(--text-muted-light); line-height: 1.9; }
.cv-item ul { list-style: disc; padding-inline-start: 1.2rem; margin: 0.3rem 0 0; }
.cv-item li { font-size: var(--fs-sm); color: var(--text-muted-light); line-height: 1.9; margin-bottom: 0.2rem; }
.cv-item li::marker { color: var(--gold-ink); }

/* ---------- Sidebar ---------- */
.cv-side { border: 1px solid var(--line-dark); background: #fbf9f4; padding: clamp(1.6rem, 3vw, 2.4rem); position: sticky; top: calc(var(--header-h) + 1.5rem); }
.cv-side .cv-block { margin-bottom: 2.2rem; }
.cv-side .cv-block > h2 { font-size: 1.1rem; margin-bottom: 1.1rem; }

.cv-skills li { margin-bottom: 1rem; }
.cv-skills li:last-child { margin-bottom: 0; }
.cv-skills__row { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-on-light); margin-bottom: 0.4rem; }
.cv-skills__bar { height: 3px; background: var(--line-dark); position: relative; overflow: hidden; }
.cv-skills__bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--lv, 50%); background: var(--gold-ink); }

.cv-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cv-tags li { font-size: var(--fs-xs); padding: 0.3rem 0.9rem; border: 1px solid var(--line-dark); color: var(--text-on-light); line-height: 1.8; }

.cv-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line-dark); font-size: var(--fs-sm); color: var(--text-on-light); }
.cv-list li:last-child { border-bottom: 0; }
.cv-list li span:last-child { color: var(--text-muted-light); }

.cv-awards li { padding: 0.8rem 0; border-bottom: 1px solid var(--line-dark); }
.cv-awards li:last-child { border-bottom: 0; }
.cv-awards b { display: block; font-size: var(--fs-sm); color: var(--text-on-light); font-weight: 600; }
.cv-awards small { font-size: var(--fs-xs); color: var(--text-muted-light); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cv-hero__grid { grid-template-columns: 1fr; }
  .cv-photo { max-width: 200px; }
  .cv-grid { grid-template-columns: 1fr; }
  .cv-side { position: static; }
}
@media (max-width: 640px) {
  .cv-hero { padding-top: calc(var(--header-h) + 2.5rem); padding-bottom: 3rem; }
  .cv-contact { flex-direction: column; }
  .cv-actions .btn { width: 100%; }
  .cv-timeline { padding-inline-start: 1.6rem; }
  .cv-item::before { inset-inline-start: -1.6rem; }
}

/* ---------- Print: رزومه‌ی تمیز روی کاغذ ---------- */
@media print {
  .cv-hero { padding: 1rem 0 1.5rem; background: #fff; border-bottom: 1px solid #000; }
  .cv-hero .ph, .cv-hero::after, .cv-photo::before, .cv-actions { display: none !important; }
  .cv-hero h1, .cv-hero__role, .cv-hero__bio, .cv-contact li { color: #000 !important; }
  .cv-hero__grid { grid-template-columns: 120px 1fr; }
  .section--light { padding-block: 1.5rem; }
  .cv-side { position: static; border-color: #999; background: #fff; }
  .cv-item { break-inside: avoid; }
}
