/* ── resume-shared.css ─────────────────────────────────────
   All structural styles shared by every resume template.
   Colours come from design-system.css variables.
──────────────────────────────────────────────────────────── */

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

body {
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-10) 16px;
}

/* ── Action bar ── */
.action-bar {
  width: 100%;
  max-width: var(--resume-max-width);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.btn-print {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 10px 22px; background: var(--accent); color: var(--white);
  border: none; border-radius: var(--radius); font-size: var(--text-lg);
  font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .2s;
}
.btn-print:hover { background: var(--accent2); }
.btn-back {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 10px 22px; background: transparent; color: var(--sidebar-bg);
  border: 2px solid var(--sidebar-bg); border-radius: var(--radius);
  font-size: var(--text-lg); font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all .2s;
}
.btn-back:hover { background: var(--sidebar-bg); color: var(--sidebar-heading); }

/* ── Resume card ── */
.resume {
  width: 100%; max-width: var(--resume-max-width);
  background: var(--white);
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: var(--space-11) 28px;
}
.sidebar h1 {
  font-size: var(--text-xl); font-weight: 700;
  color: var(--sidebar-heading); line-height: 1.3;
  margin-bottom: var(--space-1); letter-spacing: .5px;
}
.sidebar .title {
  font-size: var(--text-xxs); text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--sidebar-heading);
  font-weight: 700; margin-bottom: var(--space-8);
}
.sidebar-section { margin-bottom: 30px; }
.sidebar-section h2 {
  font-size: var(--text-xxs); text-transform: uppercase;
  letter-spacing: 2px; color: var(--sidebar-heading);
  font-weight: 800; margin-bottom: 14px; padding-bottom: 6px;
  border-bottom: 1px solid var(--sidebar-divider);
}
.contact-item {
  display: flex; align-items: flex-start;
  gap: var(--space-2); margin-bottom: var(--space-2);
  font-size: var(--text-sm); line-height: 1.5;
}
.contact-item .icon { color: var(--sidebar-heading); font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.contact-item a { color: var(--sidebar-text); text-decoration: none; word-break: break-all; }
.contact-item a:hover { color: var(--sidebar-heading); text-decoration: underline; }

.skill-group { margin-bottom: 14px; }
.skill-group-label {
  font-size: var(--text-xxs); text-transform: uppercase;
  letter-spacing: 1px; color: var(--sidebar-muted);
  font-weight: 700; margin-bottom: 6px;
}
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  background: var(--sidebar-tag-bg); color: var(--sidebar-tag-text);
  font-size: var(--text-xxs); padding: 3px 8px;
  border-radius: var(--radius); font-weight: 600;
  border: 1px solid var(--sidebar-tag-border);
}

.edu-item { margin-bottom: 12px; }
.edu-item .degree { font-size: var(--text-sm); font-weight: 700; color: var(--sidebar-heading); }
.edu-item .school { font-size: var(--text-xs); color: var(--sidebar-text); }
.edu-item .year   { font-size: var(--text-xxs); color: var(--sidebar-muted); }

.tech-list { list-style: none; padding: 0; margin: 0; }
.tech-list li {
  font-size: var(--text-xs); color: var(--sidebar-text);
  line-height: 1.5; padding: 5px 0 5px 14px; position: relative;
  border-bottom: 1px solid var(--sidebar-divider);
}
.tech-list li:last-child { border-bottom: none; }
.tech-list li::before {
  content: '›'; position: absolute; left: 0;
  color: var(--sidebar-heading); font-weight: 800; font-size: 13px; line-height: 1.4;
}

/* ── Main content ── */
.main { padding: var(--space-11) var(--space-10); }

.summary-text {
  font-size: var(--text-md); color: var(--muted); line-height: 1.7;
  padding: var(--space-4) var(--space-5);
  background: var(--light); border-left: 4px solid var(--accent);
  margin-bottom: 36px;
}

.section { margin-bottom: 34px; }
.section-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--accent); margin-bottom: 18px;
  display: flex; align-items: center; gap: var(--space-2);
}
.section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Experience */
.exp-item { margin-bottom: 22px; position: relative; padding-left: var(--space-4); }
.exp-item::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}
.exp-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; flex-wrap: wrap;
  gap: var(--space-1); margin-bottom: var(--space-1);
}
.exp-role  { font-size: var(--text-lg); font-weight: 700; color: var(--text); }
.exp-date  {
  font-size: var(--text-xxs); color: var(--white);
  background: var(--accent); padding: 2px 8px;
  border-radius: var(--radius); font-weight: 600; white-space: nowrap;
}
.exp-company { font-size: var(--text-sm); color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.exp-bullets { list-style: none; padding: 0; }
.exp-bullets li {
  font-size: var(--text-sm); color: var(--muted); line-height: 1.65;
  padding-left: 14px; position: relative; margin-bottom: 4px;
}
.exp-bullets li::before {
  content: '›'; position: absolute; left: 0;
  color: var(--accent); font-weight: 700;
}

/* JD match highlight */
.jd-match { background: #fefce8; border-left: 2px solid #eab308; padding-left: 10px !important; border-radius: 2px; }

/* Key project cards */
.proj-highlight-label {
  font-size: var(--text-xxs); text-transform: uppercase;
  letter-spacing: 1.5px; font-weight: 700; color: var(--accent); margin: 12px 0 8px;
}
.proj-highlight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.proj-highlight-card {
  background: var(--accent-light); border: 1px solid var(--accent-light-border);
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 10px 12px;
}
.proj-highlight-card.jd-match { background: #fefce8; border-color: #eab308; border-left-color: #ca8a04; }
.proj-highlight-name { font-size: var(--text-sm); font-weight: 700; color: var(--text); margin-bottom: 2px; }
.proj-highlight-url  {
  font-size: 10.5px; color: var(--accent); text-decoration: none;
  display: block; margin-bottom: 5px; word-break: break-all;
}
.proj-highlight-url:hover { text-decoration: underline; }
.proj-highlight-stack { font-size: var(--text-xxs); color: var(--accent2); font-weight: 600; margin-bottom: 5px; }
.proj-highlight-desc  { font-size: var(--text-xs); color: var(--muted); line-height: 1.55; }

/* Tech tags */
.all-skills { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-tag {
  background: var(--light); color: var(--text); font-size: var(--text-xs);
  padding: 4px 10px; border-radius: var(--radius); border: 1px solid var(--border); font-weight: 500;
}

/* ── Print ── */
@media print {
  @page { size: A4; margin: 0; }
  html {
    background: linear-gradient(to right, var(--sidebar-bg) var(--sidebar-width), var(--white) var(--sidebar-width)) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body   { background: transparent !important; padding: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .action-bar, .btn-print, .btn-back { display: none !important; }
  .resume { max-width: 100%; width: 100%; box-shadow: none; border-radius: 0; overflow: visible; background: transparent !important; }
  .sidebar { background: transparent !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .exp-date    { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .summary-text { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .jd-match    { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .resume { grid-template-columns: 1fr; }
  .sidebar { padding: var(--space-8) var(--space-6); }
  .main    { padding: var(--space-8) var(--space-6); }
  .proj-highlight-grid { grid-template-columns: 1fr; }
}
