:root {
  --ink: #1b1be0;
  --paper: #eaeae6;
  --sheet: 664px;
  --sheet-live: 1000px;
  --side: 360px;
  --type: 1.6;
  --up: 2px;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  hyphens: none;
  -webkit-hyphens: none;
}

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

.stage {
  display: grid;
  grid-template-columns: var(--sheet-live) 240px;
  column-gap: 36px;
  align-items: start;
  width: max-content;
  max-width: calc(100% - 32px);
  margin-top: 0;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: max(32px, calc(50vw - 720px));
  padding: 28px 0 48px;
  position: relative;
}

.sheet {
  grid-column: 1;
  grid-row: 1;
  width: var(--sheet-live);
  max-width: 100%;
  margin: 0;
  padding: 36px 40px 40px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.field-left {
  grid-column: 2;
  grid-row: 1;
  align-items: stretch;
  padding-top: var(--cases-top, 280px);
}

.cases-kicker {
  margin: 0;
  font-size: calc(7.5px * var(--type) + var(--up));
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.14em;
}

.case-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 16px 14px 14px;
  border: 1px solid var(--ink);
  border-radius: 16px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.logo {
  display: block;
  width: auto;
  max-width: 132px;
  height: 24px;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.case-name {
  font-size: calc(13px + var(--up));
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.case-link:hover .case-name,
.case-link:focus-visible .case-name { color: var(--brand); }

.case-link:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

body.is-pop { overflow: hidden; }

.pop[hidden] { display: none; }

.pop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pop-back {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(26, 26, 24, 0.46);
  cursor: pointer;
}

.pop-card {
  position: relative;
  width: min(720px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 12px 12px 18px;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 50px rgba(26, 26, 24, 0.18);
}

.pop-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: calc(20px + var(--up));
  line-height: 1;
  cursor: pointer;
}

.gallery { position: relative; }

.pop-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
}

.gal-prev,
.gal-next {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(234, 234, 230, 0.94);
  color: var(--ink);
  font: inherit;
  font-size: calc(22px + var(--up));
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.gal-prev { left: 10px; }
.gal-next { right: 10px; }

.gallery.is-single .gal-prev,
.gallery.is-single .gal-next,
.gallery.is-single .gal-count { display: none; }

.gal-count {
  margin: 8px 0 0;
  font-size: calc(12px + var(--up));
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
}

.pop-title {
  margin: 4px 28px 0 0;
  font-size: calc(22px + var(--up));
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.4px;
}

.pop-text {
  margin: 6px 0 0;
  font-size: calc(15px + var(--up));
  font-weight: 400;
  line-height: 1.45;
}

.pop-link {
  display: inline-block;
  margin: 8px 0 12px;
  color: var(--ink);
  font-size: calc(14px + var(--up));
  font-weight: 700;
  text-decoration: underline;
}

.pop-link[hidden] { display: none; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pdf {
  position: absolute;
  top: 64px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 6px 16px 6px 18px;
  border: 1.2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: calc(9px * var(--type) + var(--up));
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.18px;
  text-decoration: none;
}

.pdf:hover { text-decoration: none; }
.pdf .arr {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.badge {
  display: inline-flex;
  margin: 0;
  padding: 1px 9px;
  border: 1.2px solid var(--ink);
  border-radius: 999px;
  font-size: calc(9px * var(--type) + var(--up));
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.18px;
}

.who { padding-top: 14px; }

h1 {
  margin: 0;
  font-size: calc(64px + var(--up));
  font-weight: 800;
  line-height: 1;
  letter-spacing: -3.2px;
  white-space: nowrap;
}

.role {
  margin: 6px 0 0;
  font-size: calc(16px * var(--type) + var(--up));
  font-weight: 500;
  line-height: 1.4;
}

.skills { padding: 16px 0 18px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  list-style: none;
  font-size: calc(8.5px * var(--type) + var(--up));
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.rule {
  height: 2px;
  margin: 0;
  border: 0;
  background: var(--ink);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px var(--side);
  align-items: stretch;
}

.maincol { padding: 16px 20px 0 0; }
.side { width: var(--side); padding: 16px 0 0 20px; }

.vrule {
  width: 1px;
  align-self: stretch;
  background: var(--ink);
}

h2 {
  margin: 0 0 8px;
  font-size: calc(15px * var(--type) + var(--up));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.kicker {
  margin: 0 0 8px;
  font-size: calc(7.5px * var(--type) + var(--up));
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.9px;
}

.hits { margin: 0; padding: 0 0 16px; }
.hits li {
  margin: 0 0 3px;
  list-style: none;
  font-size: calc(8.5px * var(--type) + var(--up));
  font-weight: 400;
  line-height: 1.45;
}
.hits li:last-child { margin-bottom: 0; }
.hits strong { font-weight: 700; }

.hair {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--ink);
}

.exp h2 { margin-bottom: 0; }

.job { padding: 14px 0; }

.job h3 {
  margin: 0;
  font-size: calc(10px * var(--type) + var(--up));
  font-weight: 700;
  line-height: 1.3;
}

.job h3 span {
  display: block;
  font-weight: 400;
}

.place,
.when {
  margin: 0;
  font-size: calc(8.5px * var(--type) + var(--up));
  font-weight: 600;
  line-height: 1.4;
}

.when { margin-top: 11px; white-space: nowrap; }

.about {
  margin: 11px 0 0;
  font-size: calc(8px * var(--type) + var(--up));
  font-weight: 500;
  line-height: 1.4;
}

.block { margin-top: 8px; }
.block:first-of-type { margin-top: 5px; }

.block h4 {
  margin: 0;
  font-size: calc(8.5px * var(--type) + var(--up));
  font-weight: 600;
  line-height: 1.45;
}

.block ul { margin: 0; padding: 0; }

.block li {
  margin: 0 0 0 12.75px;
  font-size: calc(8.5px * var(--type) + var(--up));
  font-weight: 400;
  line-height: 1.45;
}

.photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 216 / 236;
  object-fit: cover;
  object-position: center 18%;
}

.profile { padding-top: 14px; }

.profile p,
.contacts p,
.langs li {
  margin: 0;
  font-size: calc(8.5px * var(--type) + var(--up));
  font-weight: 400;
  line-height: 1.5;
}

.profile p + p { margin-top: 8px; }
.profile { padding-bottom: 16px; }

.contacts { padding: 14px 0 16px; }
.contacts p + p { margin-top: 8px; }

.edu { padding: 14px 0 16px; }
.edu article + article { margin-top: 8px; }

.edu h3 {
  margin: 0;
  font-size: calc(8.5px * var(--type) + var(--up));
  font-weight: 600;
  line-height: 1.4;
}

.edu p {
  margin: 1px 0 0;
  font-size: calc(8px * var(--type) + var(--up));
  font-weight: 400;
  line-height: 1.4;
}

.langs { padding: 14px 0 16px; }
.langs ul { margin: 0; padding: 0; }
.langs li { margin: 0; list-style: none; }
.langs li + li { margin-top: 8px; }

.contacts a[href^="mailto"] { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: rise 0.7s ease both; }
  .rule, .hair {
    transform-origin: left center;
    animation: draw-x 0.7s ease 0.12s both;
  }
  .vrule {
    transform-origin: center top;
    animation: draw-y 0.9s ease 0.2s both;
  }
  .photo { animation: fade 0.8s ease 0.25s both; }
  .pdf .arr { transition: transform 0.25s ease; }
  .pdf:hover .arr { transform: translateX(3px); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes draw-x {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes draw-y {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1320px) {
  .stage {
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 18px;
    width: min(1000px, calc(100% - 24px));
    margin-left: auto;
    margin-right: auto;
    padding-top: 16px;
  }
  .cases-kicker { grid-column: 1 / -1; margin-top: 8px; }
  .sheet {
    grid-column: 1 / -1;
    grid-row: auto;
    order: -1;
    width: auto;
    max-width: 100%;
  }
  .field { display: contents; }
  .case-link { width: auto; }
  .pdf { top: 52px; right: 40px; }
}

@media (max-width: 700px) {
  :root { --type: 1; }
  .sheet { padding: 28px 20px 32px; }
  h1 {
    font-size: calc(40px + var(--up));
    letter-spacing: -1.6px;
    white-space: normal;
  }
  .layout { grid-template-columns: 1fr; }
  .vrule { display: none; }
  .maincol { padding-right: 0; }
  .side {
    width: auto;
    padding: 8px 0 0;
    order: -1;
  }
  .photo { width: 180px; height: 196px; }
  .hits li,
  .block li,
  .profile p,
  .contacts p,
  .langs li,
  .chips li,
  .place,
  .when,
  .edu h3 {
    font-size: calc(13px + var(--up));
  }
  .about,
  .edu p,
  .job h3 { font-size: calc(13px + var(--up)); }
  .block h4 { font-size: calc(13px + var(--up)); }
  .kicker { font-size: calc(11px + var(--up)); }
  .badge { font-size: calc(13px + var(--up)); padding: 4px 10px; }
  .pdf { font-size: calc(13px + var(--up)); }
  .pdf { top: 44px; right: 20px; }
}

@media print {
  :root { --type: 1; --side: 236px; --up: 0px; }
  .photo { width: 216px; height: 236px; aspect-ratio: auto; }
  body { background: var(--paper); }
  .stage { display: block; width: auto; margin: 0; padding: 0; }
  .field, .pop { display: none; }
  .sheet { width: var(--sheet); animation: none; }
  .pdf { display: none; }
  .rule, .hair, .vrule, .photo { animation: none; }
  a { text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@page {
  size: 664px 2184px;
  margin: 0;
}
