/* zhivetyev.ru */

/* Локальные IBM Plex: те же начертания, что раньше загружались из Google Fonts. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-sans-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-mono-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-mono-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-mono-cyrillic-500.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/ibm-plex-mono-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0B1220;
  --panel: rgba(11, 18, 32, .85);
  --line: #1E293B;
  --line2: #334155;
  --text: #E2E8F0;
  --head: #F1F5F9;
  --soft: #CBD5E1;
  --muted: #94A3B8;
  --dim: #8A9AB0;
  --accent: #5EEAD4;            /* акцентный цвет сайта */
  --accent-bg: rgba(94, 234, 212, .1);
  --danger: #FCA5A5;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 0 32px;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(148, 163, 184, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .05) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #FFFFFF; }
img { max-width: 100%; }
h1, h2, h3, h4, p, figure { margin: 0; }
button, input, textarea { font: inherit; }

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

/* ---------- каркас ---------- */

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 80px;
  padding: 88px 0 64px;
}

.side {
  flex: 0 0 340px;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

main { flex: 1 1 0; min-width: 0; }

.side-intro { display: flex; flex-direction: column; gap: 14px; }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: var(--accent); }
.side .site-name { display: block; font-size: 46px; line-height: 1.05; font-weight: 600; letter-spacing: -.02em; }
.side .site-name a { color: var(--text); }
.role { font-size: 17px; font-weight: 500; color: var(--soft); }
.lead { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 340px; }

.dnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.navbtn { display: flex; align-items: center; gap: 16px; min-height: 44px; color: var(--dim); }
.navline { display: block; flex: 0 0 auto; width: 32px; height: 1px; background: #475569; transition: width .2s, background .2s; }
.navlbl { transition: color .2s; }
.navbtn:hover { color: var(--head); }
.navbtn:hover .navline { width: 48px; }
.navbtn.on { color: var(--head); }
.navbtn.on .navline { width: 64px; background: var(--accent); }

/* ---------- телефон: полоса и меню ---------- */

.mbar, .mmenu { display: none; }

.burger {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line2); color: var(--text); cursor: pointer;
}
.burger .ico-close { display: none; }
.menu-open .burger .ico-open { display: none; }
.menu-open .burger .ico-close { display: block; }

/* ---------- общие элементы страниц ---------- */

.page { display: flex; flex-direction: column; gap: 32px; }
.page.roomy { gap: 40px; }

.ptitle { display: flex; flex-direction: column; gap: 10px; }
.pnum { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.ptitle .page-title { font-size: 36px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: var(--head); }

.sub { font-size: 22px; font-weight: 600; letter-spacing: -.01em; color: var(--head); }

.intro { font-size: 17px; line-height: 1.7; color: var(--muted); }
.hl { color: var(--text); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 12px; }
.tag { padding: 4px 10px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); }

/* ссылка-заголовок: подчеркивание появляется при наведении */
.plink { color: var(--head); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .2s; }
.plink:hover { color: #FFFFFF; text-decoration-color: currentColor; }

/* ссылка внутри текста */
.tlink, .xp p a, .intro a, .consent a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color .2s;
}
.tlink:hover, .xp p a:hover, .intro a:hover, .consent a:hover { color: #FFFFFF; text-decoration-thickness: 2px; }

.more { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-family: var(--mono); font-size: 13px; color: var(--accent); }

/* ---------- обо мне ---------- */

.bio { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }

.photo { flex: 0 0 256px; position: relative; padding: 8px; }
.corner { position: absolute; width: 18px; height: 18px; border: 0 solid var(--accent); }
.corner.tl { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.corner.tr { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.corner.bl { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.corner.br { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.photo-in { position: relative; height: 360px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.photo-in img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.12) brightness(.95); transition: filter .5s; }
.photo-in::after { content: ''; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: linear-gradient(180deg, rgba(11, 18, 32, 0) 60%, rgba(11, 18, 32, .55) 100%); transition: opacity .5s; pointer-events: none; }
.photo-in:hover img { filter: none; }
.photo-in:hover::after { opacity: 0; }

.bio-text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.7; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: rgba(11, 18, 32, .8); }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 22px 18px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat b { font-size: 34px; font-weight: 600; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--dim); }

.xps { display: flex; flex-direction: column; gap: 8px; margin: -16px -24px 0; }
.xp { display: flex; gap: 24px; padding: 24px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.xp:hover { background: rgba(30, 41, 59, .45); border-color: var(--line); }
.xp-years { flex: 0 0 110px; padding-top: 3px; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.xp-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.xp h4 { font-size: 17px; font-weight: 600; }
.xp p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---------- соцсети ---------- */

.plats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.plat { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); background: var(--panel); transition: border-color .2s; }
.plat:hover { border-color: var(--line2); }
.plat b { font-weight: 600; }
.plat span { font-family: var(--mono); font-size: 12px; color: var(--dim); }

.cols { display: flex; flex-wrap: wrap; gap: 48px; padding-top: 16px; }
.col-videos { flex: 3 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-notes { flex: 2 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

.video { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vcover { position: relative; display: block; overflow: hidden; padding-top: 56.25%; background: #0F172A; border: 1px solid var(--line); }
.vcover img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.vcover:hover img { transform: scale(1.03); }
.vtitle { font-size: 15px; font-weight: 600; line-height: 1.4; }
.video.big { gap: 12px; }
.video.big .vtitle { font-size: 20px; line-height: 1.35; }
.vlinks { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--mono); font-size: 12px; }
.vlinks a { color: var(--dim); }
.vlinks a:hover { color: var(--head); }
.vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
.videos-end { height: 0; border-bottom: 1px solid var(--line); }

.note { display: flex; flex-direction: column; gap: 6px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.note-date { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.note-title { font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--head); }
.note:hover .note-title { color: #FFFFFF; }
.note-text { font-size: 14px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- курсы ---------- */

.courses { display: flex; flex-direction: column; }
.cgroup { padding: 32px 0 12px; border-bottom: 1px solid var(--line2); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.cgroup:first-child { padding-top: 0; }
.crow { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; }
.crow + .crow { border-top: 1px solid var(--line); }
.cmain { flex: 1 1 420px; min-width: 0; display: flex; gap: 20px; align-items: flex-start; padding: 24px 0; }
.cicon { flex: 0 0 56px; display: block; width: 56px; height: 56px; overflow: hidden; border-radius: 10px; background: var(--line); transition: transform .2s; }
.cicon:hover { transform: scale(1.05); }
.cicon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cinfo { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ctitle { font-size: 17px; font-weight: 600; line-height: 1.35; }
.cdesc { font-size: 14px; line-height: 1.6; color: var(--muted); }
.cinfo .tags { padding-top: 4px; gap: 6px; }
.cinfo .tag { padding: 3px 9px; }
.cbuybox { display: flex; align-items: center; gap: 16px; margin-left: auto; padding: 0 0 24px 76px; }
.cprice { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cnow { font-size: 18px; font-weight: 600; color: var(--head); white-space: nowrap; }
.cold { font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: nowrap; }
.cold i { font-style: normal; color: var(--accent); }
.cbuy { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line2); font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; transition: border-color .2s, background .2s; }
.cbuy:hover { border-color: var(--muted); background: rgba(30, 41, 59, .6); }

/* ---------- научная деятельность ---------- */

.sci-top { display: flex; flex-direction: column; gap: 16px; }
.years { display: flex; flex-direction: column; }
.year { display: flex; gap: 24px; }
.year + .year { border-top: 1px solid var(--line2); }
.year-num { flex: 0 0 72px; padding-top: 16px; font-family: var(--mono); font-size: 20px; font-weight: 500; color: var(--head); }
.pubs { flex: 1 1 0; min-width: 0; margin: 0; padding: 0; list-style: none; }
.pub { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: none; }
.pub-n { flex: 0 0 36px; font-family: var(--mono); font-size: 13px; line-height: 1.75; color: var(--accent); }
.pub-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pub-title { font-size: 15px; line-height: 1.5; color: var(--head); }
.pub-authors { font-size: 13px; line-height: 1.5; color: var(--dim); }
.pub-authors b { font-weight: inherit; color: var(--text); }
.pub-journal { font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--dim); }

/* ---------- сертификаты ---------- */

.gallery { display: flex; flex-wrap: wrap; gap: 12px; }
.gallery::after { content: ''; flex-grow: 100000; flex-basis: 0; }
.shot { position: relative; display: block; border: 1px solid var(--line); background: var(--soft); cursor: zoom-in; transition: transform .25s, box-shadow .25s; }
.shot:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, .5); }
.shot i { display: block; }
.shot img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }

.lb { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 48px 24px; background: rgba(2, 6, 23, .94); }
.lb[hidden] { display: none; }
.lb-img { display: block; max-width: calc(100vw - 200px); max-height: calc(100vh - 120px); background: #FFFFFF; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lb-btn { flex: 0 0 48px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line2); background: rgba(15, 23, 42, .9); color: var(--text); cursor: pointer; }
.lb-btn:hover { border-color: var(--muted); }
.lb-close { position: absolute; top: 24px; right: 24px; }
.lb-count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; color: var(--dim); }
.lb-open { overflow: hidden; }

/* ---------- связаться ---------- */

.formbox { display: flex; flex-direction: column; gap: 16px; padding: 28px; border: 1px solid var(--line); background: var(--panel); }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: 0 14px; background: #0F172A; border: 1px solid var(--line2); border-radius: 0; color: var(--text); transition: border-color .2s; }
.field input { height: 44px; }
.field textarea { padding: 12px 14px; min-height: 132px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #64748B; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.ferr { display: none; font-size: 12px; color: var(--danger); }
.field.err input, .field.err textarea { border-color: #F87171; }
.field.err .ferr { display: block; }
.fbottom { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.btn { height: 48px; padding: 0 28px; border: none; background: var(--accent); color: var(--bg); font-family: var(--mono); font-size: 14px; font-weight: 500; cursor: pointer; transition: filter .2s; }
.btn:hover { filter: brightness(1.1); }
.consent { flex: 1 1 240px; font-size: 12px; color: var(--dim); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 16px 20px; border: 1px solid var(--line2); font-size: 15px; line-height: 1.6; }
.notice.ok { border-color: var(--accent); background: var(--accent-bg); color: var(--text); }
.notice.bad { border-color: #F87171; background: rgba(248, 113, 113, .08); color: var(--danger); }

/* ---------- узкий экран ---------- */

@media (max-height: 620px) {
  .side { position: static; }
}

@media (max-width: 1043px) {
  body { padding: 0 16px; }
  .wrap { flex-direction: column; align-items: stretch; gap: 48px; padding: 92px 0 48px; }
  .side { flex: 0 0 auto; position: static; }
  .dnav { display: none; }
  .inner .side { display: none; }  /* на внутренних страницах имя уже есть в верхней полосе */
  main { flex: 0 0 auto; }

  .mbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 40;
    height: 60px; padding: 0 16px;
    background: rgba(11, 18, 32, .92);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .mbar-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 16px; font-weight: 600; color: var(--head); white-space: nowrap; }
  .mbar-page { overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

  .menu-open { overflow: hidden; }
  .menu-open .mmenu {
    display: flex; flex-direction: column;
    position: fixed; top: 60px; left: 0; right: 0; bottom: 0; z-index: 39;
    padding: 16px 16px 32px; background: var(--bg); overflow-y: auto;
  }
  .mnav { display: flex; align-items: center; gap: 16px; min-height: 60px; border-bottom: 1px solid var(--line); font-size: 22px; font-weight: 600; line-height: 1.2; color: var(--soft); }
  .mnav.on { color: #FFFFFF; }
  .mnav-num { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--accent); }

  .lb { gap: 8px; padding: 72px 8px; }
  .lb-img { max-width: calc(100vw - 16px); max-height: calc(100vh - 160px); }
  .lb-prev, .lb-next { position: absolute; bottom: 12px; }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
  .lb-close { top: 12px; right: 16px; }
  .lb-count { bottom: 28px; }
}

@media (max-width: 640px) {
  .side .site-name { font-size: 38px; }
  .ptitle .page-title { font-size: 30px; }
  .photo { flex: 0 0 auto; width: 100%; max-width: 256px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .xps { margin: -8px 0 0; gap: 0; }
  .xp { flex-direction: column; gap: 8px; padding: 18px 0; border: none; border-bottom: 1px solid var(--line); }
  .xp:hover { background: none; }
  .xp-years { flex: 0 0 auto; padding-top: 0; }
  .plats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { gap: 40px; }
  .cmain { flex-basis: 100%; gap: 16px; padding-bottom: 16px; }
  .cbuybox { width: 100%; margin-left: 0; padding-left: 72px; justify-content: space-between; }
  .cprice { align-items: flex-start; }
  .year { flex-direction: column; gap: 0; }
  .year-num { flex: 0 0 auto; }
  .pub { gap: 10px; }
  .formbox { padding: 20px 16px; }
  .frow { grid-template-columns: minmax(0, 1fr); }
}

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