:root {
  --navy: #0d2f55;
  --blue: #1768ac;
  --ink: #16202a;
  --muted: #647180;
  --line: #dbe4ee;
  --soft: #f4f7fa;
  --white: #ffffff;
}

* { box-sizing: border-box; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
html, body { margin: 0; padding: 0; background: #dfe5eb; color: var(--ink); font-family: Inter, Arial, sans-serif; }
body { padding: 24px 0; }
.resume { width: 210mm; margin: 0 auto; }
.page {
  position: relative;
  width: 210mm;
  min-height: 297mm;
  padding: 16mm 16mm 14mm;
  background: var(--white);
  box-shadow: 0 12px 36px rgba(26, 42, 58, .16);
  page-break-after: always;
  overflow: hidden;
}
.page + .page { margin-top: 22px; }

.hero { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.identity { display: flex; align-items: center; gap: 18px; }
.avatar { width: 76px; height: 76px; border-radius: 22px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); flex: 0 0 76px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 24%; display: block; filter: grayscale(100%) contrast(1.04); }
.eyebrow, .section-kicker { margin: 0 0 7px; color: var(--blue); font-size: 10px; line-height: 1.2; letter-spacing: .16em; font-weight: 800; }
h1 { margin: 0; color: var(--navy); font-size: 31px; line-height: 1.05; letter-spacing: -.04em; }
h2 { margin: 7px 0 4px; font-size: 16px; font-weight: 700; }
.tagline { margin: 0; color: var(--muted); font-size: 10.5px; }
.contact { min-width: 215px; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 7px; font-size: 9.5px; color: var(--muted); text-align: right; }
.contact a { color: var(--navy); text-decoration: none; font-weight: 600; }

.intro-grid { display: grid; grid-template-columns: 1.5fr .9fr; gap: 14px; margin: 18px 0; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--white); }
.summary h3, .section-heading h3 { margin: 0 0 9px; color: var(--navy); font-size: 18px; line-height: 1.25; letter-spacing: -.02em; }
.summary p:last-child, .tech-text { margin: 0; color: #394858; font-size: 10px; line-height: 1.6; }
.dark-card { background: var(--navy); color: white; border: none; }
.light { color: #9bc8ef; }
.metric { display: grid; grid-template-columns: 62px 1fr; align-items: baseline; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.16); }
.metric:first-of-type { border-top: none; }
.metric strong { font-size: 18px; letter-spacing: -.03em; }
.metric span { color: #d7e5f1; font-size: 8.8px; line-height: 1.35; }

.experience { margin-top: 12px; }
.section-heading { margin-bottom: 10px; }
.section-heading span { color: var(--muted); font-size: 9.5px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
h4 { margin: 0 0 7px; color: var(--navy); font-size: 11px; }
ul { margin: 0; padding-left: 16px; }
li { margin: 0 0 6px; color: #394858; font-size: 9px; line-height: 1.45; }
li::marker { color: var(--blue); }
.skills-strip { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.skills-strip span, .chips span, .competencies span { border-radius: 999px; background: var(--soft); color: var(--navy); font-size: 8px; font-weight: 700; padding: 6px 9px; }

.engineering-value {
  display: grid;
  grid-template-columns: .78fr 1.72fr;
  gap: 16px;
  margin-top: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #f7f9fc 0%, #eef4fa 100%);
}
.value-intro h3 { margin: 0 0 7px; color: var(--navy); font-size: 14px; line-height: 1.25; letter-spacing: -.02em; }
.value-intro p:last-child { margin: 0; color: #516171; font-size: 8.6px; line-height: 1.5; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.value-card { min-height: 112px; padding: 11px; border-radius: 11px; background: #ffffff; border: 1px solid #dbe4ee; }
.value-no { display: block; margin-bottom: 14px; color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.value-card h4 { margin-bottom: 6px; font-size: 9.5px; line-height: 1.25; }
.value-card p { margin: 0; color: #4a5a6b; font-size: 7.6px; line-height: 1.45; }

.compact { margin-bottom: 14px; }
.projects { margin-bottom: 18px; }
.project { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.project.featured { padding: 15px; margin-bottom: 2px; border: none; border-radius: 14px; background: var(--soft); }
.project-no { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.project h4 { margin-bottom: 5px; font-size: 11.5px; }
.project p { margin: 0; color: #475666; font-size: 9px; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.chips span { background: white; border: 1px solid var(--line); padding: 4px 7px; font-size: 7px; }
.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.competencies { display: flex; flex-wrap: wrap; gap: 6px; }
.competencies span { font-size: 7.5px; }
.note { margin-top: 14px; padding: 12px 14px; border-left: 4px solid var(--blue); background: var(--soft); color: #425364; font-size: 8.6px; line-height: 1.45; }
.note strong { color: var(--navy); }
.page-footer { position: absolute; left: 16mm; right: 16mm; bottom: 8mm; display: flex; justify-content: space-between; color: #91a0af; font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }

@media screen and (max-width: 820px) {
  body { padding: 0; background: var(--white); }
  .resume, .page { width: 100%; }
  .page { min-height: 0; padding: 28px 20px 58px; box-shadow: none; overflow: visible; }
  .page + .page { margin-top: 0; border-top: 8px solid var(--soft); }
  .hero, .identity { align-items: flex-start; }
  .hero { flex-direction: column; }
  .contact { min-width: 0; align-items: flex-start; text-align: left; }
  .intro-grid, .engineering-value, .bottom-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: repeat(3, 1fr); }
  .page-footer { left: 20px; right: 20px; bottom: 20px; }
}

@media screen and (max-width: 560px) {
  .identity { flex-direction: column; }
  h1 { font-size: 28px; }
  .intro-grid, .two-col, .value-grid { grid-template-columns: 1fr; }
  .engineering-value { gap: 14px; }
  .value-card { min-height: 0; }
  .project { grid-template-columns: 26px 1fr; }
  .contact a { overflow-wrap: anywhere; }
}

@page { size: A4; margin: 0; }
@media print {
  :root { color-scheme: light; }
  html, body { background: white !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body { padding: 0; }
  .resume { width: auto; margin: 0; }
  .page { box-shadow: none; margin: 0 !important; background: #ffffff !important; }
  .dark-card { background: #0d2f55 !important; color: #ffffff !important; }
  .project.featured, .note, .skills-strip span, .competencies span { background: #f4f7fa !important; }
  .engineering-value { background: #eef4fa !important; }
  .value-card { background: #ffffff !important; }
  .chips span { background: #ffffff !important; }
}
