/* ---------- Токены ---------- */
:root {
  --green: #1f4a3d;
  --green-deep: #173a30;
  --green-line: rgba(239, 233, 220, 0.16);
  --cream: #efe9dc;
  --cream-2: #e6dfcf;
  --cream-muted: rgba(239, 233, 220, 0.62);
  --paper: #f6f2ea;
  --ochre: #e9b872;
  --ink: #173a30;
  --ink-2: #3d5249;
  --ink-muted: #5f6f67;
  --ink-line: rgba(23, 58, 48, 0.14);

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 1280px;
  --gutter: clamp(16px, 4.4vw, 64px);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--green);
  color: var(--cream);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
i { font-style: normal; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 60; background: var(--cream); color: var(--ink); padding: 8px 12px; border-radius: 8px; }

/* ---------- Плавающая навигация ---------- */
.nav {
  position: fixed; top: 20px; left: 50%; z-index: 40;
  transform: translateX(-50%);
  display: flex; gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(23, 58, 48, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(239, 233, 220, 0.16), 0 10px 30px -12px rgba(0, 0, 0, 0.35);
  max-width: calc(100vw - 24px);
}
.nav a {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.nav a:hover { background: rgba(239, 233, 220, 0.12); }
.nav .nav__home { background: var(--cream); color: var(--ink); font-weight: 500; }

/* ---------- Первый экран ---------- */
.hero {
  position: relative;
  min-height: max(100dvh, 760px);
  padding: 128px var(--gutter) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 32px;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 62% 78%, rgba(233, 184, 114, 0.10), transparent 70%),
    var(--green);
}
.hero__name {
  grid-column: 1 / -1;
  position: relative; z-index: 1;
  font: 700 clamp(2.3rem, 9vw, 8.6rem)/1.02 var(--display);
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--ochre);
}
.hero__name span { display: block; }
.hero__photo {
  position: absolute; z-index: 2;
  left: 55%; bottom: 0;
  height: min(86%, 860px);
  width: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.hero__intro { grid-column: 1; grid-row: 3; position: relative; z-index: 3; max-width: 440px; }
.chip {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(239, 233, 220, 0.3);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.hero__lead { margin: 20px 0 28px; font-size: 20px; line-height: 1.5; color: var(--cream-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero__contacts { grid-column: 2; grid-row: 3; justify-self: end; align-self: end; position: relative; z-index: 3; width: min(100%, 370px); margin: 0; }
.hero__contacts > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center; gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--green-line);
}
.hero__contacts dt { font-size: 13px; color: var(--cream-muted); }
.hero__contacts dd { margin: 0; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.hero__contacts dd a { text-decoration: none; }
.hero__contacts dd a:hover { color: var(--ochre); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 52px;
  border-radius: 999px;
  font: 500 15px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.5s var(--ease), background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--cream { padding: 7px 7px 7px 24px; background: var(--cream); color: var(--ink); }
.btn--cream i {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--green); color: var(--cream);
  transition: transform 0.5s var(--ease);
}
.btn--cream:hover i { transform: translate(2px, -2px) scale(1.06); }
.btn--ghost { padding: 0 24px; color: var(--cream); box-shadow: inset 0 0 0 1px rgba(239, 233, 220, 0.3); }
.btn--ghost:hover { background: rgba(239, 233, 220, 0.1); }

.copy {
  min-height: 30px; padding: 0 12px;
  border: 0; border-radius: 999px;
  background: rgba(239, 233, 220, 0.1);
  color: var(--cream-muted);
  font: 500 12px/1 var(--font);
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), transform 0.3s var(--ease);
}
.copy:hover { background: rgba(239, 233, 220, 0.2); color: var(--cream); }
.copy:active { transform: scale(0.97); }
.copy.is-done { background: var(--ochre); color: var(--ink); }
.copy--icon { display: grid; place-items: center; width: 36px; min-height: 36px; padding: 0; border-radius: 50%; }
.copy--icon.is-done { background: var(--ochre); color: var(--ink); }
.copy--light, .copy--dark { min-height: 44px; padding: 0 20px; font-size: 14px; }
.copy--light { background: var(--cream); color: var(--ink); }
.copy--light:hover { background: var(--ochre); color: var(--ink); }
.copy--dark { background: var(--ink); color: var(--cream); }
.copy--dark:hover { background: var(--green); color: var(--cream); }

/* ---------- Секции ---------- */
.section { padding-block: clamp(80px, 11vw, 160px); }
.section--cream { background: var(--cream); color: var(--ink); }
.section--paper { background: var(--paper); color: var(--ink); }
.section--green { background: var(--green); color: var(--cream); }
.title {
  font: 700 clamp(2rem, 5.6vw, 4.6rem)/1 var(--display);
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 40px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 72px); }
.head__note { margin: 18px 0 0; max-width: 34em; color: var(--ink-muted); }

/* Чем занимаюсь */
.areas { margin: clamp(40px, 6vw, 80px) 0 0; padding: 0; list-style: none; }
.area {
  display: grid;
  grid-template-columns: 140px minmax(0, 5fr) minmax(0, 5fr);
  gap: 16px 40px;
  padding-block: 40px;
  border-top: 1px solid var(--ink-line);
}
.area:last-child { border-bottom: 1px solid var(--ink-line); }
.area__num { font: 700 44px/1 var(--display); letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1.2px var(--green); }
.area h3 { font: 500 clamp(1.3rem, 2.2vw, 1.75rem)/1.2 var(--display); letter-spacing: -0.03em; max-width: 15em; }
.area__text p { margin: 0; color: var(--ink-2); max-width: 46ch; }
.area__text .area__fact {
  margin-top: 16px;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--green); color: var(--cream);
  font-size: 15px; line-height: 1.4;
}

/* Опыт */
.jobs { border-top: 1px solid var(--ink-line); }
.job {
  display: grid;
  grid-template-columns: 200px minmax(0, 5fr) minmax(0, 6fr);
  grid-template-areas: "period org text" "period role text";
  gap: 6px 40px;
  padding-block: 32px;
  border-bottom: 1px solid var(--ink-line);
}
.job h4 { display: contents; }
.job__sep { display: none; }
.job__period { grid-area: period; font: 700 1.1rem/1.3 var(--display); letter-spacing: -0.03em; color: var(--green); }
.job__org { grid-area: org; font: 500 clamp(1.15rem, 1.9vw, 1.45rem)/1.2 var(--display); letter-spacing: -0.03em; }
.job__role { grid-area: role; font-size: 15px; color: var(--ink-muted); }
.job p { grid-area: text; margin: 0; color: var(--ink-2); max-width: 54ch; }

/* Кому проводил */
.audiences { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.aud {
  padding: 32px 28px 36px;
  border-radius: 28px;
  background: var(--green-deep);
  box-shadow: inset 0 0 0 1px rgba(239, 233, 220, 0.08), inset 0 1px 0 rgba(239, 233, 220, 0.06);
}
.aud h4 { margin-bottom: 20px; font: 500 1.05rem/1.3 var(--display); letter-spacing: -0.02em; color: var(--ochre); }
.aud ul, .prose ul { margin: 0; padding: 0; list-style: none; }
.aud li { position: relative; padding: 0 0 0 18px; color: var(--cream-2); font-size: 16px; line-height: 1.5; }
.aud li + li { margin-top: 12px; }
.aud li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 6px; height: 6px; border-radius: 50%; background: var(--ochre); }

/* Проекты */
.projects { margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink-line); }
.project { border-bottom: 1px solid var(--ink-line); }
.project a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr) 64px;
  grid-template-areas: "name desc go" "meta desc go";
  gap: 8px 40px;
  padding: 40px 0;
  text-decoration: none;
  transition: padding 0.6s var(--ease);
}
.project__name { grid-area: name; font: 700 clamp(2rem, 5.2vw, 4.25rem)/1 var(--display); letter-spacing: -0.05em; transition: color 0.5s var(--ease); }
.project__meta { grid-area: meta; align-self: end; font-size: 14px; color: var(--ink-muted); }
.project__desc { grid-area: desc; align-self: center; color: var(--ink-2); max-width: 46ch; }
.project__go {
  grid-area: go; align-self: center; justify-self: end;
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
  font-size: 20px;
  transition: transform 0.6s var(--ease), background-color 0.4s var(--ease);
}
.project a:hover .project__name { color: var(--green); }
.project a:hover .project__go { transform: rotate(45deg); background: var(--green); }

/* Справка */
.fold {
  border-radius: 28px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ink-line), 0 24px 48px -32px rgba(23, 58, 48, 0.25);
}
.fold + .fold { margin-top: 12px; }
.fold summary {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) 44px;
  align-items: center; gap: 8px 20px;
  padding: 26px 28px;
  cursor: pointer;
  list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold__title { font: 500 clamp(1.1rem, 2vw, 1.4rem)/1.2 var(--display); letter-spacing: -0.03em; }
.fold__hint { font-size: 14px; color: var(--ink-muted); }
.fold__icon {
  position: relative; justify-self: end;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cream);
  transition: transform 0.5s var(--ease), background-color 0.4s var(--ease);
}
.fold__icon::before, .fold__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); }
.fold__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.fold[open] .fold__icon { transform: rotate(45deg); background: var(--ochre); }
.fold summary:hover .fold__icon { background: var(--ochre); }
.fold__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; padding: 0 28px 32px; }
.prose { max-width: 70ch; color: var(--ink-2); }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose h4 { margin: 1.6em 0 0.5em; font-size: 1rem; font-weight: 600; color: var(--ink); }
.prose h4:first-child { margin-top: 0; }
.prose li { position: relative; padding-left: 18px; }
.prose li + li { margin-top: 6px; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.fold__body .copy { align-self: start; }

/* Визитка с собой */
.take { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 16px; margin-top: clamp(40px, 6vw, 72px); align-items: stretch; }
.take__contact {
  display: block;
  padding: 6px;
  border-radius: 32px;
  background: rgba(239, 233, 220, 0.08);
  box-shadow: inset 0 0 0 1px rgba(239, 233, 220, 0.14);
  text-decoration: none;
}
.take__core {
  height: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 32px;
  border-radius: 26px;
  background: var(--cream); color: var(--ink);
  transition: background-color 0.4s var(--ease);
}
.take__contact:hover .take__core { background: #fff; }
.take__core img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.take__title { font: 700 1.6rem/1.1 var(--display); letter-spacing: -0.04em; }
.take__text { color: var(--ink-2); }
.take__meta { margin-top: auto; display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-muted); }
.take__meta i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--cream); transition: transform 0.5s var(--ease); }
.take__contact:hover .take__meta i { transform: translateY(3px); }
.take__slide {
  padding: 6px;
  border-radius: 32px;
  background: rgba(239, 233, 220, 0.08);
  box-shadow: inset 0 0 0 1px rgba(239, 233, 220, 0.14);
  display: grid; gap: 6px;
}
.take__preview { display: block; overflow: hidden; border-radius: 26px; }
.take__preview img { transition: transform 0.9s var(--ease); }
.take__preview:hover img { transform: scale(1.02); }
.take__files { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.file {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 16px 16px 16px 22px;
  border-radius: 22px;
  background: var(--green-deep);
  text-decoration: none;
  transition: background-color 0.4s var(--ease);
}
.file b { font: 700 14px/1 var(--display); color: var(--ochre); }
.file span { font-size: 14px; line-height: 1.35; color: var(--cream-2); }
.file i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(239, 233, 220, 0.12); }
.file:hover { background: #10302a; }

#notfound { min-height: 100dvh; display: grid; place-items: center; }

/* Подвал */
.footer { background: var(--green-deep); padding-block: clamp(80px, 11vw, 150px) 40px; }
.footer__big {
  margin: 0;
  font: 700 clamp(2.6rem, 10vw, 9rem)/0.95 var(--display);
  letter-spacing: -0.055em;
  text-transform: uppercase;
  color: var(--ochre);
}
.footer__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0; list-style: none; }
.footer__links a {
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px 0;
  border-top: 1px solid var(--green-line);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  text-decoration: none;
  transition: color 0.4s var(--ease);
}
.footer__links a span { font-size: 13px; color: var(--cream-muted); }
.footer__links a:hover { color: var(--ochre); }
.footer__small { margin: 72px 0 0; font-size: 13px; color: var(--cream-muted); }

/* Уведомление о копировании */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  width: max-content; max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 16px;
  background: var(--ochre); color: var(--ink);
  font-size: 15px; font-weight: 500; text-align: center;
  opacity: 0; transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Появление при прокрутке (класс ставит app.js; без JS всё видно) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .hero__name .reveal:nth-child(2) { transition-delay: 0.08s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .hero__photo { left: 60%; height: min(74%, 760px); }
  .area { grid-template-columns: 96px minmax(0, 1fr); }
  .area__text { grid-column: 2; }
  .audiences { grid-template-columns: 1fr 1fr; }
  .job { grid-template-columns: 150px minmax(0, 1fr); grid-template-areas: "period org" "period role" ". text"; }
  .job p { margin-top: 10px; }
  .aud:last-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .nav a:not(.nav__home):nth-child(n+4) { display: none; }
  .hero { display: block; min-height: 0; padding: 104px var(--gutter) 48px; }
  .hero__name { font-size: clamp(1.7rem, 8.4vw, 4.6rem); }
  .hero__photo {
    position: relative; left: auto; transform: none;
    width: min(100%, 420px); height: auto;
    margin: -12px auto 0;
  }
  .hero__intro { max-width: none; margin-top: -2px; padding-top: 28px; border-top: 1px solid var(--green-line); }
  .hero__lead { font-size: 18px; }
  .hero__contacts { width: 100%; margin-top: 36px; }
  .area { grid-template-columns: 1fr; gap: 12px; padding-block: 32px; }
  .area__num { font-size: 32px; }
  .area__text { grid-column: 1; }
  .audiences { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; grid-template-areas: "period" "org" "role" "text"; gap: 6px; padding-block: 26px; }
  .job p { margin-top: 8px; }
  .job__period { font-size: 0.85rem; color: var(--ink-muted); }
  .project a { grid-template-columns: minmax(0, 1fr) 48px; grid-template-areas: "name go" "desc desc" "meta meta"; gap: 14px 16px; padding: 32px 0; }
  .project__go { width: 48px; height: 48px; }
  .fold summary { grid-template-columns: minmax(0, 1fr) 40px; padding: 22px; }
  .fold__hint { grid-column: 1; grid-row: 2; }
  .fold__icon { grid-column: 2; grid-row: 1 / span 2; width: 40px; height: 40px; }
  .fold__body { grid-template-columns: 1fr; padding: 0 22px 26px; }
  .fold__body .copy { justify-self: start; }
  .take { grid-template-columns: 1fr; }
  .take__files { grid-template-columns: 1fr; }
  .footer__links { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 420px) {
  .nav a { padding: 8px 12px; font-size: 13px; }
  .hero__contacts > div { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .hero__contacts dd { font-size: 14px; }
  .btn { flex: 1 1 100%; justify-content: space-between; }
  .btn--ghost { justify-content: center; }
  .take__core { padding: 24px; }
}

@media print {
  .nav, .copy, .hero__actions, .toast, #card { display: none !important; }
  body, .section, .hero, .footer { background: #fff !important; color: #000 !important; }
  .hero__name, .footer__big { color: #000; }
}
