/* ══════════════════════════════════════════
   RESET
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════════
   SCREEN SHELL
══════════════════════════════════════════ */
body {
  background: #F6F6F1;
  font-family: 'Barlow', sans-serif;
  padding: 68px 16px 80px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(109,40,217,0.10) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════════════════
   PRINT BAR (screen only)
══════════════════════════════════════════ */
.print-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(246,246,241,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124,58,237,0.20);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
}
.back-link {
  color: rgba(13,13,13,0.45);
  text-decoration: none;
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.back-link:hover { color: #555; }
.bar-title {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: rgba(13,13,13,0.30);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.print-btn {
  background: #555;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 26px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.print-btn:hover {
  box-shadow: 0 0 28px rgba(124,58,237,0.6), 0 0 56px rgba(124,58,237,0.2);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════
   CV PAGE — shared base for both sides
══════════════════════════════════════════ */
.cv-page {
  position: relative;
  z-index: 1;
  width: 794px;
  min-height: 1123px;
  margin: 0 auto 32px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.15),
    0 8px 40px rgba(0,0,0,0.12),
    0 0 60px rgba(124,58,237,0.06);
  border-radius: 2px;
  overflow: hidden;
}

/* 4 px purple accent stripe at the very top — ONLY color fill on the page */
.cv-page::before {
  content: '';
  display: block;
  height: 4px;
  background: #555;
  flex-shrink: 0;
}

.cv-inner {
  padding: 32px 42px 36px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════════
   PAGE 1 — HEADER
══════════════════════════════════════════ */
.cv-header {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 20px;
  align-items: start;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid #DEDEDE;
}

.cv-name {
  font-size: 36px;
  font-weight: 900;
  color: #0D0D0D;
  letter-spacing: -1.2px;
  line-height: 1;
  margin-bottom: 5px;
}
.cv-name span { color: hsl(0, 0%, 14%); }

.cv-tagline {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  margin-bottom: 13px;
}

.cv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 10px;
  color: #555;
}
.cv-meta-item { display: flex; align-items: center; gap: 5px; }
.cv-meta-label {
  font-family: 'Space Mono', monospace;
  font-size: 7.5px;
  color: #BBBBBB;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cv-photo {
  width: 80px;
  height: 107px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #E0E0E0;
}
.cv-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ══════════════════════════════════════════
   TWO-COLUMN BODY
══════════════════════════════════════════ */
.cv-body {
  display: grid;
  grid-template-columns: 1fr 206px;
  flex: 1;
}

.col-left {
  padding-right: 26px;
  border-right: 1px solid #EBEBEB;
}
.col-right {
  padding-left: 26px;
}

/* ══════════════════════════════════════════
   SECTION HEADINGS
══════════════════════════════════════════ */
.sec { margin-bottom: 20px; }
.sec:last-child { margin-bottom: 0; }

.sec-title {
  font-family: 'Space Mono', monospace;
  font-size: 7.5px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #555;
  margin-bottom: 11px;
  padding-bottom: 5px;
  border-bottom: 1px solid #EBEBEB;
}

/* ══════════════════════════════════════════
   JOB ENTRIES
══════════════════════════════════════════ */
.job { margin-bottom: 12px; }
.job:last-child { margin-bottom: 0; }

.job-hd {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.job-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #0D0D0D;
  flex: 1;
  line-height: 1.3;
}
.job-date {
  font-family: 'Space Mono', monospace;
  font-size: 8.5px;
  color: #AAAAAA;
  white-space: nowrap;
  flex-shrink: 0;
}
.job-co {
  font-size: 10px;
  font-weight: 600;
  color: #555;
  margin: 2px 0 3px;
}
.job-desc {
  font-size: 10.5px;
  color: #444;
  line-height: 1.57;
}
.job-sep {
  height: 1px;
  background: #F2F2F2;
  margin: 11px 0;
}

/* ══════════════════════════════════════════
   STATS (right column — page 1)
══════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.stat-item {
  text-align: center;
  padding: 9px 4px;
  border: 1px solid #E8E8E8;
  border-radius: 4px;
}
.stat-val {
  font-size: 17px;
  font-weight: 900;
  color: #555;
  line-height: 1;
}
.stat-lbl {
  font-family: 'Space Mono', monospace;
  font-size: 7px;
  color: #AAAAAA;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 3px;
}

/* ══════════════════════════════════════════
   INFO ITEMS (right column)
══════════════════════════════════════════ */
.info-item {
  margin-bottom: 8px;
  font-size: 10.5px;
  color: #444;
  line-height: 1.5;
}
.info-item:last-child { margin-bottom: 0; }
.info-label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 7.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #BBBBBB;
  margin-bottom: 1.5px;
}

/* ══════════════════════════════════════════
   SKILL TAGS — monochrome chips
══════════════════════════════════════════ */
.tag {
  display: inline-block;
  background: #F5F5F5;
  border: 1px solid #E0E0E0;
  color: #333;
  font-size: 8.5px;
  padding: 2.5px 7px;
  border-radius: 2px;
  margin: 1.5px 1.5px 1.5px 0;
  line-height: 1.6;
}

/* ══════════════════════════════════════════
   EDUCATION ENTRIES
══════════════════════════════════════════ */
.edu-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 8px;
  align-items: start;
  margin-bottom: 10px;
}
.edu-item:last-child { margin-bottom: 0; }
.edu-deg {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: #555;
  padding-top: 1px;
}
.edu-prog {
  font-size: 11px;
  font-weight: 600;
  color: #0D0D0D;
  line-height: 1.3;
}
.edu-school {
  font-size: 9.5px;
  color: #777;
  margin-top: 1.5px;
}

/* ══════════════════════════════════════════
   AWARD LIST ITEMS
══════════════════════════════════════════ */
.award-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 10.5px;
  color: #333;
  margin-bottom: 5px;
  font-weight: 500;
}
.award-item::before {
  content: '—';
  color: #555;
  font-weight: 700;
  font-size: 10px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   PAGE 2 — RUNNING HEADER
══════════════════════════════════════════ */
.running-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #DEDEDE;
}
.rh-name {
  font-size: 14px;
  font-weight: 900;
  color: #0D0D0D;
  letter-spacing: -0.4px;
}
.rh-name span { color: #555; }
.rh-meta {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  color: #BBBBBB;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ══════════════════════════════════════════
   REFERENCE QUOTE (page 2, full-width bottom)
══════════════════════════════════════════ */
.quote-block {
  padding-top: 18px;
  margin-top: 22px;
  border-top: 1px solid #DEDEDE;
}
.quote-mark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 40px;
  color: #555;
  line-height: 0;
  vertical-align: -14px;
  margin-right: 3px;
  opacity: 0.65;
}
.quote-text {
  font-size: 10px;
  color: #555;
  font-style: italic;
  font-weight: 300;
  line-height: 1.7;
}
.quote-src {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  color: #BBBBBB;
  margin-top: 7px;
  letter-spacing: 0.2px;
}

/* ══════════════════════════════════════════
   PAGE FOOTER — website button (prints too)
══════════════════════════════════════════ */
.page-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #EBEBEB;
  display: flex;
  justify-content: flex-end;
}
.website-btn {
  display: inline-block;
  background: #3B3B3B;
  color: #fff !important;
  text-decoration: none;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 6px 18px;
  border-radius: 999px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ══════════════════════════════════════════
   PRINT
══════════════════════════════════════════ */
@media print {
  @page { size: A4 portrait; margin: 0; }

  html, body {
    background: white !important;
    padding: 0 !important;
  }
  body::before { display: none !important; }
  .print-bar   { display: none !important; }

  .cv-page {
    width: 210mm;
    min-height: 297mm;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    page-break-after: always;
    break-after: page;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .cv-page:last-child {
    page-break-after: avoid;
    break-after: avoid;
  }
}
