:root {
  --paper: #ffffff;
  --ink: #111111;
  --muted: #5f5f5f;
  --blue: #2543ff;
  --highlight: rgba(37, 67, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(circle at 10% 10%, rgba(37, 67, 255, 0.08), transparent 20rem),
    linear-gradient(180deg, #ededed 0%, #dddddd 100%);
  color: var(--ink);
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
}

a {
  color: inherit;
}

.resume-shell {
  padding: 24px;
}

.resume-nav {
  width: min(210mm, calc(100vw - 48px));
  margin: 0 auto 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.resume-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resume-link::before {
  content: "←";
}

.resume-link--primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.resume-link--primary::before {
  content: "↗";
}

.paper {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 13mm 15mm 10mm;
  background: var(--paper);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 47mm;
  gap: 12mm;
  align-items: start;
}

.title-line {
  margin: 0 0 9px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 31px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.title-line span {
  color: var(--blue);
  margin: 0 4px;
}

.identity-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 7px;
  font-size: 13.5px;
  line-height: 1.38;
}

.identity-line em {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  margin-right: 5px;
}

.summary {
  margin: 0 0 5px;
  max-width: 122mm;
  font-size: 13.1px;
  line-height: 1.5;
}

.portfolio-line {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.45;
}

.portfolio-line em {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  font-style: italic;
  margin-right: 4px;
}

.portrait {
  width: 47mm;
  height: 47mm;
  border: 2px solid var(--blue);
  border-radius: 999px;
  padding: 4px;
}

.portrait-inner {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: #f3f0ec;
}

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

.section {
  margin-top: 8mm;
}

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

.section-title h2 {
  display: inline-block;
  margin: 0;
  padding-bottom: 3mm;
  min-width: 86mm;
  border-bottom: 2px solid var(--blue);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.entry {
  margin-bottom: 4.1mm;
}

.entry-date {
  margin: 0 0 1.5mm;
  font-size: 12.2px;
  line-height: 1.2;
}

.entry h3 {
  margin: 0 0 1.2mm;
  font-size: 15px;
  line-height: 1.22;
  font-weight: 800;
}

.entry-place {
  display: inline-block;
  margin: 0 0 1.6mm;
  padding: 0 2px;
  background: linear-gradient(180deg, transparent 32%, var(--highlight) 32%);
  font-size: 12.4px;
  line-height: 1.35;
  font-weight: 500;
}

.entry-copy {
  margin: 0;
  font-size: 12.3px;
  line-height: 1.42;
  color: #222222;
}

.entry-note {
  margin: 0;
  color: #7c7c7c;
  font-size: 11.7px;
  line-height: 1.35;
  font-style: italic;
}

.section-experience .entry:last-of-type {
  margin-bottom: 0;
}

.section-skills {
  margin-top: 7mm;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3mm 4mm;
}

.skill-item {
  padding: 2.2mm 2.8mm 2mm;
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.skill-item h3 {
  margin: 0 0 0.8mm;
  font-size: 12.4px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-item p {
  margin: 0;
  font-size: 11.8px;
  line-height: 1.35;
  color: #222222;
}

.footer {
  position: absolute;
  left: 15mm;
  right: 15mm;
  bottom: 8mm;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 11px;
  color: #2f2f2f;
  text-align: right;
}

@page {
  size: A4 portrait;
  margin: 0;
}

@media (max-width: 900px) {
  .resume-shell {
    padding: 12px;
  }

  .resume-nav {
    width: calc(100vw - 24px);
    margin-bottom: 12px;
  }

  .paper {
    width: 100%;
    min-height: auto;
    padding: 24px 20px 56px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .summary {
    max-width: none;
  }

  .portrait {
    width: 140px;
    height: 140px;
  }

  .section-title h2 {
    min-width: 0;
    font-size: 21px;
    letter-spacing: 0.22em;
  }

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

  .footer {
    left: 20px;
    right: 20px;
    bottom: 18px;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .resume-shell {
    padding: 0;
  }

  .resume-nav {
    display: none;
  }

  .paper {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    box-shadow: none;
  }
}
