/* Никита Швец — резюме и проектные кейсы. */
:root {
  color-scheme: dark;
  --bg: #151815;
  --surface: #1c211c;
  --section: #191e19;
  --selected: #2a3328;
  --heading: #eef1e8;
  --ink: #e2e8de;
  --muted: #b5bfb0;
  --accent: #c3d7ad;
  --accent-light: #d1e2bd;
  --border: #3c493c;
  --sans: "Manrope", "Segoe UI", system-ui, sans-serif;
  --wrap: 1140px;
  --pad: clamp(20px, 5vw, 68px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .23em; }
button { color: inherit; font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--selected); color: var(--heading); }

.wrap { width: min(var(--wrap), calc(100% - 2 * var(--pad))); margin-inline: auto; }
.skip {
  position: fixed;
  z-index: 5;
  inset: 8px auto auto 8px;
  padding: 10px 16px;
  background: var(--surface);
  transform: translateY(-150%);
}
.skip:focus { transform: none; }

.bar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(21, 24, 21, .82);
  backdrop-filter: blur(16px) saturate(125%);
  border-bottom: 1px solid var(--border);
}
.bar__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 38px);
}
.bar__brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
  font: 800 clamp(16px, 2vw, 20px)/1.2 var(--sans);
  text-decoration: none;
}
.bar__nav { display: flex; gap: clamp(14px, 2.4vw, 32px); }
.bar__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.contact-icon { width: 18px; height: 18px; flex: none; fill: currentColor; }
.bar a:hover { color: var(--accent); }

h1, h2, h3 {
  color: var(--heading);
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.12;
}
h1 { font-size: clamp(44px, 6.1vw, 78px); }
h2 { font-size: clamp(30px, 4vw, 52px); }

.hero { padding-block: clamp(38px, 7vw, 94px) clamp(50px, 7vw, 96px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .61fr);
  align-items: center;
  gap: clamp(32px, 7vw, 100px);
}
.hero__intro { animation: resume-in .45s ease-out both; }
@keyframes resume-in {
  from { opacity: .7; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__role {
  margin-block: 12px 20px;
  color: var(--accent);
  font-size: clamp(22px, 3.1vw, 42px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.17;
}
.hero__lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 25px; }
.hero__primary, .hero__secondary {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 800;
}
.hero__primary {
  padding-inline: 15px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 10px;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}
.hero__primary:hover { background: var(--accent-light); transform: translateY(-2px); }
.hero__primary:active { transform: translateY(0); }
.hero__primary span { font-size: 18px; line-height: 1; }
.hero__secondary { color: var(--ink); }

.hero__profile {
  position: relative;
  isolation: isolate;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 21px;
  background: linear-gradient(155deg, #364033, #191e19 60%);
}
.portrait {
  overflow: hidden;
  background: var(--selected);
  border-radius: 14px;
}
.portrait img {
  width: 100%;
  aspect-ratio: 4 / 4.7;
  object-fit: cover;
  object-position: center 28%;
}
.hero__contacts {
  display: flex;
  gap: 6px;
  width: fit-content;
  margin-top: 16px;
  padding: 5px;
  border: 1px solid rgba(223, 239, 210, .35);
  border-radius: 12px;
  background: rgba(23, 29, 24, .68);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: inset 0 1px 0 rgba(236, 251, 229, .16), 0 6px 22px rgba(0, 0, 0, .22);
}
.hero__cta {
  flex: 1;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-inline: 12px;
  border-radius: 7px;
  color: #f1f5ed;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: background .18s ease;
}
.hero__cta:hover { background: rgba(223, 239, 210, .13); }
.hero__cta .contact-icon { color: var(--accent); }
.hero__cta:focus-visible, .foot a:focus-visible { outline-color: var(--accent-light); }

.experience {
  padding-block: clamp(42px, 6vw, 80px);
  border-top: 1px solid var(--border);
}
.experience__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
  gap: clamp(24px, 6vw, 90px);
  align-items: start;
}
.experience__roles {
  max-width: 66ch;
  margin: 0;
  padding: 0;
  list-style: none;
}
.experience__roles li {
  padding-block: 13px;
  border-top: 1px solid var(--border);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 700;
  line-height: 1.45;
}
.experience__roles p {
  margin-top: 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
}

.experience__roles--expandable li { padding-block: 0; }
.experience__roles--expandable summary {
  position: relative;
  padding: 13px 32px 13px 0;
  list-style: none;
  cursor: pointer;
}
.experience__roles--expandable summary::-webkit-details-marker { display: none; }
.experience__roles--expandable summary::after {
  content: "";
  position: absolute;
  inset: 20px 8px auto auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}
.experience__roles--expandable details[open] summary::after { transform: rotate(225deg); }
.experience__preview {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}
.experience__roles--expandable p { margin: 0 32px 16px 0; }

.skills__body { max-width: 66ch; }
.skills__body p + p { margin-top: 14px; }
.skills__keywords { color: var(--accent); font-size: 14px; }
.skills__stack { color: var(--muted); font-size: 15px; }

.lab {
  padding-block: clamp(52px, 7.5vw, 106px);
  background: var(--section);
  border-top: 1px solid var(--border);
}
.lab__head { max-width: 840px; margin-bottom: clamp(26px, 4vw, 52px); }
.lab__head h2 { text-wrap: initial; }
.lab__count { display: inline-block; margin-left: .35em; color: var(--accent); font-size: .39em; letter-spacing: 0; vertical-align: top; }
.lab__lead { max-width: 65ch; margin-top: 18px; color: var(--muted); }
.lab__body {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(0, 3fr);
  align-items: start;
  gap: clamp(20px, 3vw, 40px);
}
.lab__index {
  position: sticky;
  top: 90px;
  display: grid;
  max-height: calc(100dvh - 105px);
  overflow-y: auto;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
  border-top: 1px solid var(--border);
}
.idx {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: baseline;
  gap: 3px 8px;
  width: 100%;
  min-height: 48px;
  padding: 11px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease;
}
.idx:focus-visible { outline-offset: -3px; }
.idx:hover { background: var(--selected); }
.idx[aria-selected="true"] { background: var(--selected); color: var(--heading); box-shadow: inset 3px 0 var(--accent); }
.idx[aria-selected="true"]:focus-visible { outline-color: var(--accent-light); }
.idx__num { color: var(--accent); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.idx__ttl { font-size: 14px; font-weight: 750; line-height: 1.35; }
.idx__meta { grid-column: 2; color: var(--muted); font-size: 12px; line-height: 1.4; }
.idx[aria-selected="true"] .idx__num { color: var(--accent-light); }
.idx[aria-selected="true"] .idx__meta { color: #d8e2d2; }

.case {
  min-width: 0;
  padding: clamp(20px, 3.4vw, 46px);
  background: var(--surface);
  border-top: 3px solid var(--heading);
  overflow-wrap: anywhere;
}
.case[hidden] { display: none; }
.case.is-entering { animation: case-in .2s ease-out; }
@keyframes case-in { from { opacity: .68; } to { opacity: 1; } }
.case__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  align-items: baseline;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.case__head h3 { font-size: clamp(28px, 3.5vw, 48px); }
.case__num { color: var(--accent); font-size: 13px; font-weight: 800; }
.case__screenshots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.case__screenshots a { display: block; border: 1px solid var(--border); cursor: zoom-in; }
.case__screenshots a:only-child { grid-column: 1 / -1; }
.case__screenshots a:hover { border-color: var(--accent); }
.case__screenshots img { width: 100%; }
.case__lead { max-width: 68ch; margin-top: 20px; font-size: 16px; line-height: 1.68; }
.case__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin-top: 27px;
}
.case__col { padding-top: 13px; border-top: 1px solid var(--border); }
.lbl, .micro__head { color: var(--accent); font-size: 13px; font-weight: 800; line-height: 1.5; }
.lbl { margin-bottom: 14px; }
.timeline { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.timeline li {
  position: relative;
  counter-increment: step;
  padding-left: 27px;
  font-size: 14.5px;
  line-height: 1.65;
}
.timeline li + li { margin-top: 12px; }
.timeline li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: .22em;
  left: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.micro { margin-top: 34px; padding-top: 17px; border-top: 1px solid var(--border); }
.micro__list {
  display: grid;
  gap: 12px;
  margin: 13px 0 0;
  padding-left: 1.1em;
  font-size: 14.5px;
  line-height: 1.65;
}
.micro__list li::marker { color: var(--accent); }
.micro__list i { color: var(--muted); }
.detail {
  margin-top: 26px;
  padding: clamp(16px, 2vw, 24px);
  background: var(--bg);
}
.detail__text, .case__takeaway { font-size: 14.5px; line-height: 1.7; }
.case__foot { margin-top: 28px; }
.case__takeaway { padding-top: 18px; border-top: 1px solid var(--border); }
.case__takeaway b { color: var(--heading); }
.shot { margin-top: 24px; }
.shot img { width: 100%; border: 1px solid var(--border); }
.shot figcaption { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.foot { padding: 38px 0; border-top: 1px solid var(--border); background: var(--bg); }
.foot h2 { font-size: clamp(22px, 2.5vw, 34px); }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; font-size: 13.5px; }
.foot__links { display: flex; flex-wrap: wrap; column-gap: 16px; }
.foot__links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.foot__links a:hover { color: var(--accent-light); }

@media (max-width: 900px) {

  .lab__body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lab__index { position: static; max-height: none; overflow: visible; }
  .lab__index[hidden] { display: none; }
  .lab__stage--disclosures { border-top: 1px solid var(--border); }
  .lab__disclosure > summary {
    grid-template-columns: 23px minmax(0, 1fr) 24px;
    min-height: 62px;
    padding: 12px 10px;
    list-style: none;
  }
  .lab__disclosure > summary::-webkit-details-marker { display: none; }
  .lab__disclosure > summary::after {
    content: "";
    grid-area: 1 / 3 / span 2 / 4;
    place-self: center;
    width: 9px;
    height: 9px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: translateY(-2px) rotate(45deg);
  }
  .lab__disclosure .idx__ttl { font-size: 16px; }
  .lab__disclosure[open] > summary { background: var(--selected); color: var(--heading); }
  .lab__disclosure[open] > summary:focus-visible { outline-color: var(--accent-light); }
  .lab__disclosure[open] > summary::after { transform: translateY(2px) rotate(225deg); }
  .lab__disclosure[open] .idx__num { color: var(--accent-light); }
  .lab__disclosure[open] .idx__meta { color: #d8e2d2; }
  .lab__disclosure .case {
    padding: clamp(16px, 4.2vw, 28px);
    border-top: 0;
    border-bottom: 1px solid var(--border);
  }
  .lab__disclosure .case__head { display: none; }
  .lab__disclosure .case__screenshots { margin: 0 0 20px; }
  .lab__disclosure .case__lead:first-of-type { margin-top: 0; }
}

@media (max-width: 660px) {
  .bar__inner { min-height: 58px; gap: clamp(10px, 3.5vw, 14px); }
  .bar__brand { white-space: nowrap; }
  .bar__nav { gap: clamp(10px, 3vw, 16px); }
  .bar__nav a { font-size: 12px; }
  html { scroll-padding-top: 72px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__profile { width: 100%; max-width: 420px; }
  .portrait img { aspect-ratio: 4 / 3.55; object-position: center 31%; }
  .experience__grid { grid-template-columns: 1fr; }
  .case__grid { grid-template-columns: 1fr; }
  .case__screenshots { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
