/* =========================================================
   ТОКЕНЫ
   Палитра резюме больше не самостоятельна: цвет/шрифт — алиасы
   на глобальные токены портала (base.css), геометрия (--radius)
   и структура (чертёж/табличка/журнал ТОиР) остаются собственными —
   см. дизайн-бриф §5 и чек-лист «Приоритет 2».
   ========================================================= */
:root {
  --ink:          var(--color-surface);
  --ink-panel:    var(--color-bg);
  --ink-panel-2:  rgba(5, 20, 22, 0.04); /* authored — тон для чередования секций, производный от --color-text */

  --line:         var(--color-text-muted);
  --line-soft:    var(--color-border);

  --accent-strong: var(--color-accent);
  --accent:        var(--color-accent);
  --accent-ink:    var(--color-bg);

  --accent2:      var(--color-accent);
  --accent2-soft: rgba(15, 110, 103, 0.16); /* authored — мягкая заливка вокруг accent2-индикатора */

  --text:       var(--color-text);
  --text-dim:   var(--color-text-muted);
  --text-faint: rgba(5, 20, 22, 0.45); /* authored — третья, более лёгкая ступень текстовой иерархии */

  --font-display: var(--font-body); /* было PT Sans Narrow — унификация по чек-листу */

  --radius:     2px;              /* чертёжная геометрия панелей — сохранена намеренно (не флагована чек-листом) */
  --radius-btn: var(--radius-pill); /* кнопки — по правилу компонента «Кнопки» брифа §3 */
  --container: 980px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  -webkit-font-smoothing: antialiased;
  /* фон/цвет/шрифт/сетка страницы — из base.css (общие с остальным порталом) */
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-strong);
  color: var(--accent-ink);
  padding: 10px 16px;
  z-index: 999;
  font-family: var(--font-mono);
  font-size: 13px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

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

/* =========================================================
   HERO / ТАБЛИЧКА
   ========================================================= */
.hero {
  padding: 64px 24px 40px;
}
.plate {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 44px;
  background: var(--ink-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.plate__corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-strong);
  opacity: 0.75;
}
.plate__corner--tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.plate__corner--tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.plate__corner--bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.plate__corner--br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.plate__eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.plate__name {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0 0 10px;
  color: var(--text);
}
.plate__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}
.plate__subtitle {
  max-width: 62ch;
  color: var(--text-dim);
  font-size: 1.02rem;
  margin: 0;
}
.plate__rule {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 16px);
  margin: 32px 0 28px;
  opacity: 0.7;
}
.plate__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
}
.plate__meta dt {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.plate__meta dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}
.plate__meta a { text-decoration: none; border-bottom: 1px dotted var(--text-faint); }
.plate__meta a:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 720px) {
  .plate { padding: 34px 22px; }
  .plate__meta { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   STATS
   ========================================================= */
.stats { padding: 0 24px 64px; }
.stats__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.stat {
  padding: 26px 20px;
  text-align: center;
  border-left: 1px solid var(--line-soft);
}
.stat:first-child { border-left: none; }
.stat__value {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--accent);
  margin-bottom: 6px;
}
.stat__label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.35;
}

@media (max-width: 720px) {
  .stats__inner { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat { border-bottom: 1px solid var(--line-soft); }
}

/* =========================================================
   SECTIONS — общие
   ========================================================= */
.section { padding: 72px 24px; }
.section--alt { background: var(--ink-panel-2); }
.section__inner {
  max-width: var(--container);
  margin: 0 auto;
}
.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: 0.01em;
  margin: 0 0 16px;
}
.section__lede {
  max-width: 68ch;
  color: var(--text-dim);
  font-size: 1.02rem;
  margin: 0 0 40px;
}

/* =========================================================
   SPEC SHEET (профиль)
   ========================================================= */
.specsheet {
  border-top: 1px solid var(--line-soft);
  max-width: 640px;
}
.specsheet__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.specsheet__label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}
.specsheet__leader {
  flex: 1;
  border-bottom: 1px dotted var(--text-faint);
  transform: translateY(-4px);
}
.specsheet__value {
  font-size: 0.98rem;
  color: var(--text);
  white-space: nowrap;
}
.specsheet__value a { text-decoration: none; border-bottom: 1px dotted var(--text-faint); }
.specsheet__value a:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   COMPETENCIES — карточки-классификаторы
   ========================================================= */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.card {
  background: var(--ink);
  padding: 28px 24px;
  min-height: 200px;
}
.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
}
.card__text {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-cards { grid-template-columns: 1fr; }
}

/* =========================================================
   EXPERIENCE — журнал (лог) с рельсом
   ========================================================= */
.log {
  position: relative;
  max-width: 760px;
}
.log__entry {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 24px;
  padding-bottom: 48px;
}
.log__entry:last-child { padding-bottom: 0; }
.log__rail {
  position: relative;
}
.log__rail::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 9px;
  width: 1px;
  height: calc(100% + 42px);
  background: var(--line-soft);
}
.log__entry:last-child .log__rail::before { display: none; }
.log__node {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--text-faint);
}
.log__node--active {
  border-color: var(--accent2);
  background: var(--accent2);
  box-shadow: 0 0 0 4px var(--accent2-soft);
}

.log__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.log__period {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
}
.log__status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  border: 1px solid var(--line-soft);
  padding: 2px 8px;
  border-radius: 10px;
}
.log__status--active {
  color: var(--accent2);
  border-color: var(--accent2);
}
.log__company {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  margin: 0 0 4px;
}
.log__role {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--accent2);
  margin: 0 0 14px;
}
.log__summary {
  color: var(--text-dim);
  margin: 0 0 14px;
}
.log__points {
  margin: 0 0 16px;
  padding-left: 18px;
  color: var(--text-dim);
}
.log__points li {
  margin-bottom: 8px;
  font-size: 0.94rem;
}
.log__points li::marker { color: var(--accent); }

.log__result {
  background: var(--ink-panel);
  border-left: 2px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.log__result-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 6px;
}
.log__result p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
}

/* =========================================================
   EDUCATION
   ========================================================= */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.edu-card {
  border: 1px solid var(--line-soft);
  padding: 22px;
  border-radius: var(--radius);
}
.edu-card__year {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
}
.edu-card__school {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.05rem;
  margin: 8px 0 6px;
}
.edu-card__program {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
}

.seal {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 4px;
}
.seal__ring {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 2px solid var(--accent2);
  border-radius: 50%;
  position: relative;
}
.seal__ring::after {
  content: "PhD";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent2);
}
.seal__text {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0;
  max-width: 56ch;
}

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

/* =========================================================
   CONTACTS
   ========================================================= */
.section--contact {
  background: linear-gradient(180deg, var(--ink-panel) 0%, var(--ink-panel-2) 100%);
  border-top: 1px solid var(--line-soft);
}
.section__inner--contact { text-align: left; }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn--primary {
  background: var(--accent-strong);
  color: var(--accent-ink);
  font-weight: 700;
}
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-soft);
}
.btn--ghost:hover { border-color: var(--accent2); color: var(--accent2); }

/* =========================================================
   ПОДВАЛ РЕЗЮМЕ (не путать с общим .footer портала из footer.css)
   ========================================================= */
.resume-signoff {
  padding: 24px;
  border-top: 1px solid var(--line-soft);
}
.resume-signoff__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =========================================================
   REVEAL (скролл-анимация — сдержанная)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   ПЕЧАТЬ
   ========================================================= */
@media print {
  .header-grid-item, .footer-grid-item, .contact-actions .btn--ghost:last-child { display: none; }
  body { background: #fff; color: #111; }
  .plate, .card, .edu-card, .log__result { border-color: #999; background: #fff; }
  .section--contact { background: #fff; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
