:root {
  --ink: #10212b;
  --text: #182b35;
  --copy: #4d626d;
  --muted: #687d87;
  --paper: #eaf2f5;
  --panel: #ffffff;
  --line: #385766;
  --accent: #5ca4c8;
  --soft: #d9edf4;
  --soft-strong: #c7e2ec;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(56, 87, 102, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 87, 102, 0.07) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.cv-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1060px, calc(100% - 32px));
  margin: 18px auto;
}

.back-link,
.print-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
}

.print-button {
  background: var(--accent);
}

.cv-sheet {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto 40px;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 8px 8px 0 var(--ink);
}

.cv-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 196px;
  gap: 30px;
  align-items: stretch;
  padding: 28px 32px;
  background:
    linear-gradient(90deg, var(--soft-strong), var(--soft) 62%, #eef7fa);
}

.cv-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--line);
  font-size: 0.8rem;
  font-weight: 950;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(3.1rem, 6vw, 5.2rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.profile {
  max-width: 690px;
  margin-bottom: 0;
  color: var(--copy);
  font-size: 0.98rem;
  line-height: 1.58;
}

.headline-stack {
  margin: -3px 0 10px;
  color: var(--line);
  font-size: 0.76rem;
  font-weight: 900;
}

.contact-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  justify-content: start;
  gap: 9px 16px;
  margin-top: 18px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 980px) and (min-width: 821px) {
  .contact-data {
    grid-template-columns: repeat(2, minmax(0, max-content));
  }
}

.contact-data > a,
.contact-data > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.contact-data svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--line);
  stroke-width: 2.2;
}

.contact-data i {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  color: var(--line);
  font-style: normal;
  font-size: 0.56rem;
  font-weight: 950;
  line-height: 1;
}

.contact-data i[data-lucide="mail"]::before {
  content: "@";
}

.contact-data i[data-lucide="phone"]::before {
  content: "T";
}

.contact-data i[data-lucide="linkedin"]::before {
  content: "in";
}

.contact-data i[data-lucide="github"]::before {
  content: "GH";
  font-size: 0.44rem;
}

.contact-data i[data-lucide="globe"]::before {
  content: "WEB";
  font-size: 0.38rem;
}

.contact-data i[data-lucide="map-pin"]::before {
  content: "AR";
  font-size: 0.45rem;
}

.contact-data svg + ::before,
.contact-data svg::before {
  content: none;
}

.cv-photo {
  min-height: 238px;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--ink);
  overflow: hidden;
}

.cv-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.recruiter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.cv-main {
  min-width: 0;
  padding: 26px 28px 34px 32px;
}

.cv-main > section + section {
  margin-top: 24px;
}

.cv-sidebar {
  padding: 26px 24px;
  border-left: 2px solid var(--line);
  background: var(--soft);
}

.cv-sidebar section + section {
  margin-top: 28px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--line);
}

.section-title h2,
.cv-sidebar h2 {
  margin-bottom: 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.section-title span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cv-project {
  padding: 14px;
  border: 2px solid var(--line);
  background: #ffffff;
}

.cv-project + .cv-project {
  margin-top: 13px;
}

.project-heading,
.experience-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.project-heading h3,
.experience-heading h3 {
  margin-bottom: 3px;
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-heading p,
.experience-heading p,
.project-heading > a,
.project-heading > span,
.experience-heading > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
}

.project-heading > a,
.project-heading > span,
.experience-heading > span {
  flex: 0 0 auto;
  text-align: right;
}

.cv-project > p,
.experience-item > p {
  color: var(--copy);
  line-height: 1.45;
}

.cv-project > p {
  margin: 10px 0;
}

.cv-project ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cv-project li {
  margin-top: 5px;
  color: var(--copy);
  line-height: 1.4;
}

.cv-project li::before {
  content: "\2713";
  margin-right: 8px;
  color: var(--line);
  font-weight: 950;
}

.project-stack {
  margin: 11px -14px -14px !important;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  background: var(--soft-strong);
  color: var(--ink) !important;
  font-size: 0.72rem;
  font-weight: 850;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.value-grid article {
  padding: 13px;
  border: 2px solid var(--line);
  background: #ffffff;
}

.value-grid h3 {
  margin-bottom: 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.value-grid p {
  margin-bottom: 0;
  color: var(--copy);
  font-size: 0.82rem;
  line-height: 1.45;
}

.achievement-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.achievement-list li {
  color: var(--copy);
  font-size: 0.82rem;
  line-height: 1.4;
}

.achievement-list li::before {
  content: "\2713";
  margin-right: 7px;
  color: var(--line);
  font-weight: 950;
}

.featured-experience {
  padding-top: 0;
}

.experience-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(56, 87, 102, 0.3);
}

.experience-item:first-of-type {
  padding-top: 0;
}

.experience-item > p {
  margin: 8px 0 0;
}

.stack-group + .stack-group {
  margin-top: 14px;
}

.stack-group h3,
.sidebar-item h3 {
  margin-bottom: 3px;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.stack-group p,
.sidebar-item p,
.compact-copy {
  margin-bottom: 0;
  color: var(--copy);
  font-size: 0.78rem;
  line-height: 1.45;
}

.side-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-list li {
  padding: 7px 0;
  border-bottom: 1px solid rgba(56, 87, 102, 0.25);
  color: var(--copy);
  font-size: 0.78rem;
  line-height: 1.4;
}

.side-list li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border: 2px solid var(--line);
  background: var(--panel);
}

.sidebar-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(56, 87, 102, 0.25);
}

.sidebar-item:first-of-type {
  padding-top: 0;
}

@media (max-width: 820px) {
  .cv-heading,
  .recruiter-layout {
    grid-template-columns: 1fr;
  }

  .cv-photo {
    width: min(300px, 100%);
    min-height: 300px;
    margin: 0 auto;
  }

  .contact-data {
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
    white-space: normal;
  }

  .value-grid {
    grid-template-columns: 1fr;
  }

  .cv-sidebar {
    border-top: 2px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 540px) {
  .cv-toolbar,
  .cv-sheet {
    width: calc(100% - 18px);
  }

  .cv-toolbar {
    flex-direction: column;
  }

  .cv-heading,
  .cv-main,
  .cv-sidebar {
    padding: 20px;
  }

  h1 {
    font-size: 2.7rem;
  }

  .contact-data {
    grid-template-columns: 1fr;
  }

  .project-heading,
  .experience-heading,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .project-heading > a,
  .project-heading > span,
  .experience-heading > span {
    text-align: left;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    width: 210mm;
    height: 297mm;
    margin: 0;
    background: #ffffff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    overflow: hidden;
  }

  body {
    font-size: 9.2pt;
  }

  .cv-toolbar {
    display: none;
  }

  .cv-sheet {
    width: 210mm;
    height: 297mm;
    margin: 0;
    border: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .cv-heading {
    grid-template-columns: minmax(0, 1fr) 33mm;
    gap: 5mm;
    height: 52mm;
    padding: 6.5mm 8.5mm;
  }

  .eyebrow {
    margin-bottom: 2mm;
    font-size: 7.5pt;
  }

  h1 {
    margin-bottom: 2mm;
    font-size: 28.5pt;
  }

  .profile {
    max-width: none;
    font-size: 8.2pt;
    line-height: 1.36;
  }

  .headline-stack {
    margin: -0.8mm 0 1.4mm;
    font-size: 6.2pt;
  }

  .contact-data {
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
    gap: 1mm 3mm;
    margin-top: 2.2mm;
    font-size: 5.55pt;
  }

  .contact-data svg {
    width: 9px;
    height: 9px;
  }

  .contact-data i {
    width: 10px;
    height: 10px;
    font-size: 4.3pt;
  }

  .contact-data i[data-lucide="map-pin"]::before {
    font-size: 3.5pt;
  }

  .contact-data i[data-lucide="github"]::before {
    font-size: 3.4pt;
  }

  .cv-photo {
    min-height: 40mm;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .recruiter-layout {
    grid-template-columns: minmax(0, 1fr) 56mm;
    height: 245mm;
  }

  .cv-main {
    padding: 4.5mm 5.5mm 6mm 8.5mm;
  }

  .cv-main > section + section {
    margin-top: 4.1mm;
  }

  .cv-sidebar {
    padding: 4.5mm 5mm;
  }

  .cv-sidebar section + section {
    margin-top: 4.3mm;
  }

  .section-title {
    margin-bottom: 2.5mm;
  }

  .section-title h2,
  .cv-sidebar h2 {
    margin-bottom: 1.5mm;
    font-size: 8.15pt;
  }

  .section-title span {
    font-size: 5.8pt;
  }

  .cv-project {
    padding: 3mm;
    break-inside: avoid;
  }

  .cv-project + .cv-project {
    margin-top: 2.5mm;
  }

  .project-heading h3,
  .experience-heading h3 {
    font-size: 8.7pt;
  }

  .project-heading p,
  .experience-heading p,
  .project-heading > a,
  .project-heading > span,
  .experience-heading > span {
    font-size: 6.1pt;
  }

  .cv-project > p,
  .cv-project li,
  .experience-item > p {
    font-size: 7.25pt;
    line-height: 1.28;
  }

  .cv-project > p {
    margin: 2mm 0;
  }

  .cv-project li {
    margin-top: 1mm;
  }

  .project-stack {
    margin: 2.3mm -3mm -3mm !important;
    padding: 1.6mm 3mm;
    font-size: 6.05pt !important;
  }

  .value-grid {
    gap: 2mm;
  }

  .value-grid article {
    padding: 2.5mm;
    break-inside: avoid;
  }

  .value-grid h3 {
    margin-bottom: 1mm;
    font-size: 6.9pt;
  }

  .value-grid p {
    font-size: 7pt;
    line-height: 1.25;
  }

  .achievement-list {
    gap: 1.3mm 3mm;
  }

  .achievement-list li {
    font-size: 6.9pt;
    line-height: 1.25;
  }

  .experience-item {
    padding: 2mm 0;
    break-inside: avoid;
  }

  .experience-item > p {
    margin-top: 1.2mm;
  }

  .stack-group + .stack-group {
    margin-top: 2.4mm;
  }

  .stack-group h3,
  .sidebar-item h3 {
    font-size: 6.9pt;
  }

  .stack-group p,
  .sidebar-item p,
  .compact-copy {
    font-size: 6.65pt;
    line-height: 1.26;
  }

  .sidebar-item {
    padding: 1.5mm 0;
  }

  .side-list li {
    padding: 1.35mm 0;
    font-size: 6.55pt;
    line-height: 1.23;
  }

  .side-list li::before {
    width: 4px;
    height: 4px;
    margin-right: 4px;
    border-width: 1px;
  }
}
