
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --orange: #eb6b0a;
  --orange-light: #fff3eb;
  --orange-border: #f8c9a6;
  --orange-dark: #cc5400;
  --dark: #1e2229;
  --mid: #3b4252;
  --muted: #5e6778;
  --card-bg: #f8f9fb;
  --border: #e6e8ee;
  --sidebar-bg: #1a1e24;
  --sidebar-card: #232832;
  --sidebar-border: #2e3543;
}

@page {
  size: A4 portrait;
  margin: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #6b7280;
  direction: ltr;
  color: var(--dark);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

/* ═════════════════════════════════════════════
   PAGE CANVAS (Exact A4: 210mm x 297mm)
═════════════════════════════════════════════ */
.page {
  width: 210mm;
  height: 297mm;
  max-height: 297mm;
  overflow: hidden;
  background: #ffffff;
  margin: 10px auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
}

/* ═════════════════════════════════════════════
   HEADER
═════════════════════════════════════════════ */
header {
  background: linear-gradient(135deg, #f07412 0%, #dd5a00 100%);
  display: flex;
  align-items: center;
  padding: 10px 14px;
  position: relative;
  overflow: hidden;
  min-height: 98px;
}

header::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 170px;
  height: 170px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.avatar-container {
  flex-shrink: 0;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  padding: 3px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  margin-right: 14px;
  margin-left: 2px;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.header-info {
  flex: 1;
  color: #ffffff;
  z-index: 1;
}

.h-name {
  font-size: 20pt;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.5px;
}

.h-role {
  font-size: 8.5pt;
  font-weight: 600;
  margin-top: 3px;
  opacity: 0.96;
  line-height: 1.35;
  color: #fff9f4;
}

.h-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.h-tag {
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 6.8pt;
  font-weight: 500;
  padding: 1.5px 7px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

/* Header Contacts Box */
.header-contacts {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  background: rgba(0, 0, 0, 0.22);
  padding: 6px 12px;
  border-radius: 7px;
  z-index: 1;
  min-width: 175px;
  border: 1px solid rgba(255,255,255,0.15);
}

.h-contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 7.4pt;
}

.h-contact-item svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.h-contact-item a {
  color: #ffffff;
  text-decoration: none;
}

.h-contact-item a:hover {
  text-decoration: underline;
}

/* ═════════════════════════════════════════════
   BODY TWO-COLUMN LAYOUT (Sidebar Left, Main Right)
═════════════════════════════════════════════ */
.body-container {
  display: grid;
  grid-template-columns: 67mm 1fr;
  overflow: hidden;
  height: 100%;
}

/* ─── SIDEBAR COLUMN (Left in LTR) ─── */
.col-side {
  background: var(--sidebar-bg);
  color: #d8dee9;
  padding: 9px 10px 6px 11px;
  display: flex;
  flex-direction: column;
  gap: 7.5px;
  overflow: hidden;
  border-right: 1px solid var(--sidebar-border);
}

/* ─── MAIN COLUMN (Right in LTR) ─── */
.col-main {
  padding: 9px 12px 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

/* ═════════════════════════════════════════════
   SECTION HEADINGS
═════════════════════════════════════════════ */
.sec-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 2px;
}

.sec-title-icon {
  width: 17px;
  height: 17px;
  background: var(--orange);
  color: #ffffff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sec-title-icon svg {
  width: 11px;
  height: 11px;
  stroke: #ffffff;
}

.sec-title-text {
  font-size: 8.8pt;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--dark);
}

.col-side .sec-title {
  border-bottom-color: var(--orange);
}

.col-side .sec-title-text {
  color: #ffffff;
}

/* ═════════════════════════════════════════════
   WORK EXPERIENCE CARDS
═════════════════════════════════════════════ */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 5.5px;
}

.exp-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--orange);
  border-radius: 5px;
  padding: 5px 9px 5px 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 2px;
  align-items: baseline;
}

.exp-card.featured {
  background: #fffbf7;
  border-color: var(--orange-border);
  border-left: 3.5px solid var(--orange);
}

.exp-header {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 5px;
}

.exp-co {
  font-size: 8.8pt;
  font-weight: 800;
  color: var(--dark);
}

.exp-badge {
  grid-column: 2;
  font-size: 6.8pt;
  font-weight: 700;
  color: var(--orange-dark);
  background: var(--orange-light);
  border: 1px solid var(--orange-border);
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

.exp-role-row {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 7.8pt;
  color: var(--mid);
  font-weight: 600;
}

.exp-role-row .role-title {
  color: #d15100;
}

.exp-loc {
  grid-column: 2;
  font-size: 6.8pt;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

.exp-desc {
  grid-column: 1 / -1;
  font-size: 7pt;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 1px;
  padding-top: 2px;
  border-top: 1px dashed #f0f0f0;
}

/* ═════════════════════════════════════════════
   TECHNICAL SKILLS
═════════════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
}

.sk-item {
  background: var(--card-bg);
  border: 1px solid #edf0f5;
  border-radius: 4px;
  padding: 3.5px 6px;
}

.sk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}

.sk-name {
  font-size: 8.2pt;
  font-weight: 800;
  color: var(--dark);
}

.dots {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8dde6;
}

.dot.on {
  background: var(--orange);
}

.sk-detail {
  font-size: 6.7pt;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 1px;
}

/* ═════════════════════════════════════════════
   ADDITIONAL / CREATIVE SKILLS
═════════════════════════════════════════════ */
.other-skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.other-sk-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 2.5px solid var(--orange);
  border-radius: 4px;
  padding: 4px 5px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.other-sk-icon {
  color: var(--orange);
  margin-bottom: 2px;
  display: flex;
  justify-content: center;
}

.other-sk-title {
  font-size: 7.2pt;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.25;
}

.other-sk-sub {
  font-size: 6.2pt;
  color: var(--muted);
  line-height: 1.25;
  margin-top: 2px;
}

/* ═════════════════════════════════════════════
   SIDEBAR SECTIONS
═════════════════════════════════════════════ */
/* Social & Profiles */
.social-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5px 6px;
}

.social-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--sidebar-card);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--sidebar-border);
  text-decoration: none;
  color: #e5e9f0;
  font-size: 7.2pt;
  transition: all 0.2s;
}

.social-item:hover {
  background: #2e3544;
  border-color: var(--orange);
  color: #fff;
}

.social-item svg {
  flex-shrink: 0;
  color: var(--orange);
}

.social-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Personal Info */
.p-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 7.6pt;
  color: #c8d0e0;
  margin-bottom: 2.5px;
}

.p-dot {
  width: 5.5px;
  height: 5.5px;
  background: var(--orange);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Education */
.edu-item {
  position: relative;
  padding-left: 9px;
  margin-bottom: 4px;
  border-left: 2px solid var(--sidebar-border);
}

.edu-item:last-child {
  margin-bottom: 0;
}

.edu-deg {
  font-size: 8.2pt;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
}

.edu-deg::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 4px;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
}

.edu-field {
  font-size: 7.2pt;
  color: #b0b8c8;
  line-height: 1.3;
}

.edu-inst {
  font-size: 6.6pt;
  color: #7b8599;
}

/* Certifications */
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 7.2pt;
  color: #c8d0e0;
  background: var(--sidebar-card);
  padding: 2.5px 6px;
  border-radius: 4px;
  border: 1px solid var(--sidebar-border);
}

.cert-dot {
  width: 5px;
  height: 5px;
  background: var(--orange);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Tags */
.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3.5px;
}

.tag {
  font-size: 6.6pt;
  font-weight: 700;
  background: var(--orange);
  color: #ffffff;
  border-radius: 3px;
  padding: 2px 6px;
  text-align: center;
}

.tag.dark {
  background: var(--sidebar-card);
  color: #aab5c8;
  border: 1px solid var(--sidebar-border);
}

/* Languages */
.lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-name {
  font-size: 8pt;
  font-weight: 700;
  color: #ffffff;
}

.col-side .dot {
  background: #3a4252;
}

.col-side .dot.on {
  background: var(--orange);
}

.update-stamp {
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid var(--sidebar-border);
  font-size: 6.8pt;
  color: #727c91;
  text-align: center;
  font-weight: 500;
}

/* ═════════════════════════════════════════════
   FOOTER
═════════════════════════════════════════════ */
footer {
  background: var(--dark);
  color: #9aa5b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3.5px 16px;
  font-size: 7.2pt;
  border-top: 2px solid var(--orange);
}

footer a {
  color: #cbd5e1;
  text-decoration: none;
}

/* ═════════════════════════════════════════════
   PRINT MEDIA
═════════════════════════════════════════════ */
@media print {
  body {
    background: #ffffff;
  }
  .page {
    margin: 0;
    width: 210mm;
    height: 297mm;
    max-height: 297mm;
    box-shadow: none;
    page-break-after: avoid;
    page-break-inside: avoid;
  }
}

.res-inline-en-1 {grid-column: 1 / -1;}
.res-inline-en-2 {font-size: 6.6pt; color: #9aa5b8; margin: 1px 0 4px;}
.res-inline-en-3 {font-size: 6.6pt; color: #9aa5b8; margin-top: 1px;}
/* Screen-only print controls; excluded from paper output. */
.resume-tools{position:fixed;z-index:999;left:16px;bottom:16px;display:flex;align-items:center;justify-content:center;gap:7px;background:#ffffffec;border:1px solid #d8e1df;box-shadow:0 9px 32px #18332c30;padding:7px;border-radius:15px;font:700 12px/1.5 Tahoma,Arial,sans-serif;direction:rtl}
.resume-tools a,.resume-tools button{font:inherit;display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:6px 12px;text-decoration:none;color:#20483f;background:#f0f5f0;border:1px solid #d9e8dd;border-radius:10px;cursor:pointer;white-space:nowrap}
.resume-tools .resume-tools-print{background:#2f6b5c;color:#fff;border-color:#2f6b5c}
.resume-tools .resume-tools-print:hover{background:#235044}
.resume-tools :focus-visible{outline:3px solid #62a689;outline-offset:2px}
@media(max-width:550px){.resume-tools{right:8px;left:8px;bottom:8px;padding:6px;gap:5px}.resume-tools a,.resume-tools button{min-width:0;flex:1;font-size:10px;padding:6px 5px}}
@media print{.resume-tools{display:none!important}html,body{print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important}}
