/* ============================================================
   Иван Барченков — личный сайт
   Дизайн: «швейцарская вёрстка × управленческий отчёт»
   Свет — фарфор и чернила, один акцент — киноварь.
   ============================================================ */

:root {
  /* Светлая палитра (по умолчанию) */
  --bg: #f2f3f1;
  --bg-raise: #fafaf8;
  --bg-dim: #e8eae6;
  --ink: #14171f;
  --ink-soft: #3a4048;
  --muted: #5f6772;
  --line: #d7d9d3;
  --line-strong: #14171f;
  --accent: #d5331f;
  --accent-hover: #b0270f;
  --accent-contrast: #ffffff;
  --data-blue: #2b4bd7;
  --photo-plate: #c9cbc7;

  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-body: 'Golos Text', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12141a;
    --bg-raise: #1a1d25;
    --bg-dim: #171a21;
    --ink: #ecede9;
    --ink-soft: #c9ccc6;
    --muted: #8f96a0;
    --line: #2b2f3a;
    --line-strong: #ecede9;
    --accent: #f4553c;
    --accent-hover: #ff7057;
    --accent-contrast: #16181e;
    --data-blue: #8ca0ff;
    --photo-plate: #262a33;
  }
}
:root[data-theme="dark"] {
  --bg: #12141a;
  --bg-raise: #1a1d25;
  --bg-dim: #171a21;
  --ink: #ecede9;
  --ink-soft: #c9ccc6;
  --muted: #8f96a0;
  --line: #2b2f3a;
  --line-strong: #ecede9;
  --accent: #f4553c;
  --accent-hover: #ff7057;
  --accent-contrast: #16181e;
  --data-blue: #8ca0ff;
  --photo-plate: #262a33;
}

/* ---------- База ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--data-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Типографика ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow b { color: var(--accent); font-weight: 500; }

h1, h2, h3 { text-wrap: balance; }

.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.2;
  max-width: 18em;
}

.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.6; color: var(--ink-soft); max-width: 34em; }

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
}

.brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand .brand-mark { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }

.site-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }

.lang-switch {
  display: flex;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--line);
}
.lang-switch > * {
  padding: 4px 9px;
  text-decoration: none;
  color: var(--muted);
}
.lang-switch .active {
  background: var(--ink);
  color: var(--bg);
}
.lang-switch a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .site-nav { display: none; }
}

/* ---------- Хиро ---------- */

.hero { border-bottom: 1px solid var(--line); overflow: clip; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(48px, 7vw, 104px) clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero-name {
  font-size: clamp(30px, 5vw, 56px);
  margin-top: 14px;
}
.hero-name .accent-dot { color: var(--accent); }

.hero-thesis {
  margin-top: clamp(20px, 3vw, 30px);
  font-size: clamp(17px, 1.9vw, 20px);
  color: var(--ink-soft);
  max-width: 30em;
}
.hero-thesis strong { color: var(--ink); font-weight: 600; }

.hero-roles {
  margin-top: clamp(22px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 2px solid var(--accent);
  padding-left: 16px;
}
.hero-roles li {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.hero-roles li b { color: var(--ink); font-weight: 500; }

.hero-cta { margin-top: clamp(28px, 4vw, 44px); display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 26px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Фото-планшет */

.hero-photo { position: relative; justify-self: end; width: min(100%, 420px); }

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  background: var(--accent);
  z-index: 0;
}

.hero-photo figure {
  position: relative;
  z-index: 1;
  background: var(--photo-plate);
}

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.92);
}

.hero-photo figcaption {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { justify-self: start; width: min(100%, 360px); }
}

/* ---------- Полоса фактов ---------- */

.facts { border-bottom: 1px solid var(--line); background: var(--bg-dim); }

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.fact {
  padding: clamp(22px, 3vw, 34px) clamp(16px, 2vw, 28px);
  border-left: 1px solid var(--line);
}
.fact:first-child { border-left: none; padding-left: 0; }

.fact-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 34px);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.fact-value span { color: var(--accent); }

.fact-label {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 16em;
}

@media (max-width: 900px) {
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: none; padding-left: 0; }
  .fact { border-top: 1px solid var(--line); }
  .fact:nth-child(-n+2) { border-top: none; }
}

/* ---------- Секции ---------- */

.section { padding-block: clamp(56px, 8vw, 112px); border-bottom: 1px solid var(--line); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(20px, 3vw, 48px);
  margin-bottom: clamp(32px, 5vw, 64px);
}
.section-head .eyebrow { padding-top: 6px; }

.section-intro { margin-top: 16px; color: var(--muted); max-width: 36em; }

@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- Консалтинг ---------- */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.offer {
  background: var(--bg);
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: background-color 0.2s ease;
}
.offer:hover { background: var(--bg-raise); }

.offer-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.offer h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.3;
}

.offer p { color: var(--muted); font-size: 15.5px; }

.offer-for {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.offer-for::before {
  content: "Формат: ";
  color: var(--muted);
}

@media (max-width: 760px) {
  .offer-grid { grid-template-columns: 1fr; }
}

/* ---------- Компании ---------- */

.company {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(20px, 3vw, 48px);
  padding-block: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line-strong);
}
.company:last-of-type { border-bottom: 1px solid var(--line-strong); }

.company-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.2;
}
.company-name a { color: var(--ink); text-decoration: none; }
.company-name a:hover { color: var(--accent); }

.company-role {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.company-desc p { color: var(--ink-soft); max-width: 40em; }
.company-desc p + p { margin-top: 12px; }

.company-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.company-tags span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .company { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- Путь / Обо мне ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.path { display: flex; flex-direction: column; }

.path-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: clamp(14px, 2vw, 28px);
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.path-row:last-child { border-bottom: 1px solid var(--line); }

.path-year {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 4px;
  white-space: nowrap;
}

.path-text { font-size: 15.5px; color: var(--ink-soft); }
.path-text b { color: var(--ink); font-weight: 600; }

.side-block + .side-block { margin-top: clamp(24px, 3vw, 36px); }
.side-label { margin-bottom: 12px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.side-text { font-size: 15px; color: var(--muted); line-height: 1.6; }

.proofs-wrap { margin-top: clamp(36px, 5vw, 64px); }

.proofs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}

.proof { margin: 0; }

.proof img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--bg-raise);
}

.proof figcaption,
.press-photos figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .path-row { grid-template-columns: 76px 1fr; }
  .proofs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .proofs { grid-template-columns: 1fr; }
  .proof img { aspect-ratio: 4 / 5; }
}

/* Фото в секции выступлений */

.press-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.5vw, 32px);
  margin-bottom: clamp(28px, 4vw, 52px);
}

.press-photos figure { margin: 0; }

.press-photos img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--bg-raise);
}

@media (max-width: 640px) {
  .press-photos { grid-template-columns: 1fr; }
}

.photo-link { text-decoration: none; color: inherit; display: block; }
.photo-link:hover figcaption { color: var(--accent); }

/* Видеополка */

.shelf-label { margin-bottom: 18px; }

.video-shelf { margin-bottom: clamp(36px, 5vw, 60px); }

.video-thumb { position: relative; display: block; overflow: hidden; }

.video-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--bg-raise);
  display: block;
}

.play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  background: var(--accent);
  display: grid;
  place-items: center;
  transition: background-color 0.15s ease;
}
.play::after {
  content: "";
  border-left: 11px solid var(--accent-contrast);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 3px;
}
.video-featured:hover .play,
.video-card:hover .play { background: var(--accent-hover); }

.video-featured {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 0;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-raise);
  margin-bottom: clamp(18px, 2.5vw, 28px);
}
.video-featured .video-thumb img { border: none; }

.video-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.5vw, 36px);
}

.video-kind {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.video-info .video-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.25;
  text-wrap: balance;
}

.video-note { font-size: 15px; color: var(--muted); }

.video-cta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.video-card .video-title {
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.4;
  transition: color 0.15s ease;
}
.video-card:hover .video-title { color: var(--accent); }

@media (max-width: 860px) {
  .video-featured { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .video-grid { grid-template-columns: 1fr; }
}

/* ---------- Принципы ---------- */

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); }

.principle { border-top: 3px solid var(--accent); padding-top: 18px; }

.principle h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  margin-bottom: 10px;
}
.principle p { color: var(--muted); font-size: 15.5px; }

@media (max-width: 860px) {
  .principles { grid-template-columns: 1fr; }
}

/* ---------- Выступления и публикации ---------- */

.press-list { display: flex; flex-direction: column; }

.press-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: clamp(14px, 2.5vw, 40px);
  align-items: baseline;
  padding-block: 18px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.press-item:last-child { border-bottom: 1px solid var(--line); }
.press-item:hover .press-title { color: var(--accent); }

.press-kind {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.press-title { font-weight: 500; font-size: 16.5px; line-height: 1.45; transition: color 0.15s ease; }
.press-where { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }

@media (max-width: 700px) {
  .press-item { grid-template-columns: 1fr; gap: 6px; }
  .press-where { white-space: normal; }
}

/* ---------- Контакты ---------- */

.contact { border-bottom: none; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.contact-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.15;
}

.contact-note { margin-top: 18px; color: var(--muted); max-width: 30em; }

.contact-channels { display: flex; flex-direction: column; }

.contact-channel {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.contact-channel:last-child { border-bottom: 1px solid var(--line); }

.contact-channel .kind {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-channel .value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  text-align: right;
  transition: color 0.15s ease;
}
.contact-channel:hover .value { color: var(--accent); }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Подвал ---------- */

.site-footer { border-top: 1px solid var(--line-strong); }

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Появление при скролле ---------- */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
