/* ==========================================================================
   Ahmed Osama Mohammed — Single-Column 1-Page ATS-Standard Resume
   Technical Artist & Technical Game Designer
   100% Linear ATS Parser Compatible · Clean Typography · Exact 1-Page A4 Print
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #111827;        /* Crisp near-black for body & headings */
  --ink-2: #1f2937;      /* Dark slate for bullet text */
  --muted: #4b5563;      /* Neutral gray for dates & locations */
  --accent: #1d4ed8;     /* Professional subtle navy-blue accent */
  --rule: #d1d5db;       /* Clean section divider */
  --rule-dark: #111827;  /* Header underline */
  --desk: #e5e7eb;       /* Screen background outside paper */
  --sheet-w: 210mm;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--desk);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 8.6pt;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

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

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Top Action Bar (Screen Only — Hidden on Print)
   -------------------------------------------------------------------------- */
.action-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 5%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}

.action-bar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
}

.action-bar-title i {
  color: var(--accent);
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: 600 11.5px 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #1e40af;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Single-Column 1-Page A4 Sheet
   -------------------------------------------------------------------------- */
.cv-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px 60px;
}

.sheet {
  width: var(--sheet-w);
  min-height: 297mm;
  padding: 10mm 13mm;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Header (Standard Centered/Clean ATS Header)
   -------------------------------------------------------------------------- */
.cv-header {
  padding-bottom: 2.4mm;
  margin-bottom: 2.8mm;
  border-bottom: 1.2pt solid var(--rule-dark);
}

.cv-name {
  margin: 0;
  font-size: 20pt;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  text-transform: uppercase;
}

.cv-headline {
  margin: 1mm 0 0;
  font-size: 10.2pt;
  font-weight: 700;
  color: var(--accent);
}

.cv-tagline {
  margin: 0.4mm 0 0;
  font-size: 8.4pt;
  font-weight: 500;
  color: var(--ink-2);
}

.contact-line {
  margin: 1.6mm 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6mm 3mm;
  font-size: 7.9pt;
  color: var(--ink-2);
}

.contact-line li {
  display: inline-flex;
  align-items: center;
}

.contact-line li:not(:last-child)::after {
  content: "|";
  margin-left: 3mm;
  color: #9ca3af;
}

.contact-line a {
  color: var(--ink-2);
  font-weight: 500;
}

.contact-line a:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Sections (Standard Linear Single-Column)
   -------------------------------------------------------------------------- */
.cv-section {
  margin-bottom: 2.6mm;
}

.cv-section:last-of-type {
  margin-bottom: 0;
}

.cv-section-title {
  margin: 0 0 1.4mm;
  padding-bottom: 0.5mm;
  font-size: 9pt;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 0.75pt solid var(--rule);
}

/* Summary */
.summary-text {
  margin: 0;
  font-size: 8.3pt;
  line-height: 1.36;
  color: var(--ink-2);
}

/* Skills Table / Rows */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.7mm;
}

.skill-row {
  font-size: 8.1pt;
  line-height: 1.34;
  color: var(--ink-2);
}

.skill-row strong {
  color: var(--ink);
  font-weight: 700;
}

/* Experience Entries */
.job {
  margin-bottom: 2.1mm;
}

.job:last-child {
  margin-bottom: 0;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.job-title-line {
  font-size: 8.7pt;
  color: var(--ink);
}

.job-role {
  font-weight: 700;
  color: var(--ink);
}

.job-company {
  font-weight: 700;
  color: var(--accent);
}

.job-meta {
  font-size: 7.9pt;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.job-sub {
  font-size: 7.7pt;
  font-style: italic;
  color: var(--muted);
  margin: 0.1mm 0 0.5mm;
}

.job-bullets {
  margin: 0.5mm 0 0;
  padding-left: 3.8mm;
}

.job-bullets li {
  margin-bottom: 0.45mm;
  font-size: 8.1pt;
  line-height: 1.33;
  color: var(--ink-2);
}

.job-bullets li:last-child {
  margin-bottom: 0;
}

.job-bullets strong {
  color: var(--ink);
  font-weight: 600;
}

/* Projects */
.project-item {
  margin-bottom: 1.5mm;
}

.project-item:last-child {
  margin-bottom: 0;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.project-title {
  font-size: 8.4pt;
  font-weight: 700;
  color: var(--ink);
}

.project-stack {
  font-weight: 500;
  color: var(--muted);
  font-size: 7.8pt;
}

.project-link {
  font-size: 7.6pt;
  color: var(--accent);
  white-space: nowrap;
}

/* Education */
.edu-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 8.2pt;
  margin-bottom: 0.8mm;
}

.edu-row:last-child {
  margin-bottom: 0;
}

.edu-main strong {
  font-weight: 700;
  color: var(--ink);
}

.edu-sub {
  font-size: 7.9pt;
  color: var(--ink-2);
  margin-top: 0.2mm;
}

/* Responsive Mobile Screen View */
@media screen and (max-width: 820px) {
  .action-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .sheet {
    width: 100%;
    min-height: auto;
    padding: 20px 16px;
  }
  .job-header, .project-header, .edu-row {
    flex-direction: column;
    gap: 2px;
  }
}

/* Exact 1-Page A4 Print Rules */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 11mm;
  }

  html, body {
    background: #ffffff !important;
    font-size: 8.3pt !important;
    line-height: 1.31 !important;
    color: #111827 !important;
  }

  .action-bar {
    display: none !important;
  }

  .cv-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }

  .sheet {
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  .job, .project-item, .cv-section {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}
