:root {
  --primary: #434E5E;
  --primary-light: #58677c;
  --primary-muted: #aab4c3;
  --bg: #f0f2f5;
}

body {
  background: var(--bg);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: #333;
}

.resume-wrapper {
  padding: 2rem 1rem 4rem;
}

.resume-card {
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  overflow: hidden;
}

/* ── Header ── */
.resume-header {
  background: #b6babb;
  color: var(--primary);
  display: flex;
  align-items: stretch;
  min-height: 195px;
}

.resume-header .photo {
  width: 195px;
  min-width: 195px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.resume-header .header-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  gap: 1.5rem;
}

.resume-header h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: .12rem;
  margin: 0 0 .2rem;
  color: var(--primary);
  text-transform: uppercase;
}

.resume-header .subtitle {
  font-size: 1rem;
  color: var(--primary-light);
  margin-bottom: .6rem;
}

.contact-list,
.social-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .8rem;
}

.contact-list li + li { margin-top: .35rem; }
.social-list li + li  { margin-top: .5rem; }

.contact-list a,
.social-list a {
  color: var(--primary-light);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .45rem;
  transition: color .15s;
}
.contact-list a:hover,
.social-list a:hover { color: var(--primary); }

.social-list .icon-box {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  color: #fff;
  flex-shrink: 0;
}

/* ── Body ── */
.resume-body { padding: 2rem 2.5rem; }

/* ── Section titles ── */
.section-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12rem;
  color: var(--primary);
  padding-bottom: .5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1.5px solid #d5dae2;
}

/* ── Summary ── */
.summary-text {
  color: var(--primary-light);
  line-height: 1.75;
  font-size: .9rem;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 1.5rem; /* 24px */
}

/* vertical line — center at 7px from .timeline left edge */
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;       /* line left edge; center = 6+1 = 7px */
  top: 8px;
  bottom: 0;
  width: 2px;
  background: #d5dae2;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

/* dot — 12px wide, centered on the same 7px mark */
/* item starts at 24px from .timeline; dot left edge at 24 + (-23) = 1px; center = 1+6 = 7px ✓ */
.timeline-item::before {
  content: '';
  position: absolute;
  left: -23px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid var(--primary);
  background: #fff;
}

.timeline-item:last-child { padding-bottom: 0; }

.job-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 .2rem;
}

.job-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .78rem;
  color: var(--primary-muted);
  margin-bottom: .5rem;
}

.job-company {
  font-weight: 600;
  color: var(--primary-light);
}

.job-desc {
  font-size: .855rem;
  color: var(--primary-light);
  line-height: 1.65;
  margin-bottom: .5rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .4rem;
}

.tag {
  font-size: .67rem;
  font-weight: 600;
  padding: .18rem .45rem;
  border-radius: 3px;
  background: #eef0f5;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .03rem;
}

/* ── Skills ── */
.skill-cat-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1rem;
  color: var(--primary-light);
  margin: .75rem 0 .5rem;
}

.skill-cat-label:first-child { margin-top: 0; }

.skill-name {
  font-size: .78rem;
  color: var(--primary);
  margin-bottom: .2rem;
}

.progress {
  height: 5px !important;
  border-radius: 3px;
  background: #e8ecf1;
  margin-bottom: .6rem;
  overflow: hidden;
}

.progress-bar {
  background: var(--primary);
  border-radius: 3px;
}

.other-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.badge-light {
  font-size: .68rem;
  padding: .22rem .5rem;
  border-radius: 3px;
  background: #eef0f5;
  color: var(--primary-light);
  font-weight: 500;
}

/* ── Right column sections ── */
.edu-degree { font-weight: 700; color: var(--primary);       font-size: .875rem; }
.edu-org    { font-size: .8rem;  color: var(--primary-light); }
.edu-time   { font-size: .75rem; color: var(--primary-muted); }

.lang-entry { font-size: .85rem; }
.lang-name  { font-weight: 600;  color: var(--primary); }
.lang-level { color: var(--primary-muted); font-size: .78rem; margin-left: .25rem; }

.interest-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .85rem;
  color: var(--primary-light);
}
.interest-list li + li { margin-top: .2rem; }

/* ── Print ── */
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  body { background: #fff; margin: 0; }

  .resume-wrapper { padding: 0; }
  .resume-card    { box-shadow: none; border-radius: 0; max-width: 100%; }

  /* Keep header horizontal */
  .resume-header {
    display: flex !important;
    flex-direction: row !important;
    min-height: 150px;
  }
  .resume-header .photo {
    width: 150px !important;
    min-width: 150px !important;
  }
  .resume-header .header-info {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex: 1 !important;
    padding: 1rem 1.5rem !important;
    gap: 1rem !important;
  }

  /* Keep two-column body layout */
  .resume-body { padding: 1.25rem 1.75rem; }
  .row { display: flex !important; flex-wrap: nowrap !important; align-items: flex-start !important; }
  .col-lg-8 { width: 65% !important; flex: 0 0 65% !important; max-width: 65% !important; }
  .col-lg-4 { width: 35% !important; flex: 0 0 35% !important; max-width: 35% !important; }

  /* Only avoid breaks inside individual timeline items, not whole sections */
  .timeline-item { break-inside: avoid; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .resume-wrapper { padding: 0; }
  .resume-card    { border-radius: 0; box-shadow: none; }
  .resume-header  { flex-direction: column; }
  .resume-header .photo { width: 100%; height: 220px; min-width: unset; }
  .resume-header .header-info { flex-direction: column; align-items: flex-start; padding: 1.25rem; }
  .resume-body    { padding: 1.25rem; }
}
