:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --text: #14181f;
  --text-2: #59616e;
  --text-3: #8b93a1;
  --border: #e5e8ec;
  --accent: #0d9373;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(13, 147, 115, 0.1);
  --ok: #18a06c;
  --warn: #d99a26;
  --err: #de5240;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }

.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.accent { color: var(--accent); }
.container { max-width: 1440px; margin: 0 auto; padding: 0 48px; }

h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 24px; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 17px; font-weight: 600; }
a { color: inherit; text-decoration: none; }

/* ---------- Навигация ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { font-weight: 500; font-size: 15px; color: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  position: relative; font-size: 14px; color: var(--text-2);
  padding: 4px 0; transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.is-active { color: var(--text); }
.nav-links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-burger {
  display: none; margin-left: auto;
  width: 40px; height: 40px; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer;
}
.nav-burger span {
  width: 20px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font-size: 14.5px; font-weight: 500; font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--text-3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { border-color: var(--accent); filter: brightness(1.06); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 48px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 75%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 176px 1fr; gap: 36px; align-items: start;
}
.hero-photo img,
.hero-initials {
  width: 176px; height: 220px; border-radius: 20px;
  object-fit: cover; object-position: center top; display: block;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero-initials {
  display: grid; place-items: center; height: 176px;
  font-size: 44px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
}
.avail {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px;
  padding: 4px 12px; margin-bottom: 14px;
}
.avail-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: pulse 2.4s ease-out infinite;
}
.prompt { font-size: 13px; margin: 0 0 10px; }
.prompt::after {
  content: ""; display: inline-block;
  width: 8px; height: 15px; margin-left: 6px;
  background: var(--accent); vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-role { color: var(--text-2); font-size: 16px; margin: 8px 0 0; }
.hero-about { max-width: 680px; margin: 16px 0 0; color: var(--text-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-meta { font-size: 12.5px; color: var(--text-3); margin: 18px 0 0; }

/* ---------- Секции и страницы ---------- */
.section { padding: 44px 0; }
.page-top { padding-top: 56px; }
.page-head { margin-bottom: 28px; }
.page-head .mono { font-size: 13px; margin: 0 0 8px; }
.section-head {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.section-note { font-size: 12.5px; color: var(--text-3); }
.empty {
  border: 1.5px dashed var(--border); border-radius: 14px;
  padding: 28px; text-align: center; color: var(--text-3); font-size: 14.5px;
}

/* ---------- Карточки разделов (главная) ---------- */
.nav-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.nav-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.15s, transform 0.12s;
}
.nav-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.nav-card-title { font-size: 16px; font-weight: 600; }
.nav-card-sub { font-size: 13px; color: var(--text-3); }
.nav-card-arrow { position: absolute; top: 18px; right: 20px; color: var(--text-3); transition: color 0.15s; }
.nav-card:hover .nav-card-arrow { color: var(--accent); }

/* ---------- Статус-плитки ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; min-height: 76px;
}
.tile.skeleton {
  background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.tile-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tile-ok .dot { background: var(--ok); animation: pulse 2.4s ease-out infinite; }
.tile-warn .dot { background: var(--warn); }
.tile-err .dot { background: var(--err); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(24, 160, 108, 0.45); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.tile-val { font-size: 20px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile-note { font-size: 12px; font-weight: 400; color: var(--text-3); }

/* ---------- История аптайма ---------- */
.uptime { margin-top: 16px; }
.uptime-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.uptime-pct { font-size: 15px; font-weight: 600; color: var(--ok); font-variant-numeric: tabular-nums; }
.uptime-range { font-size: 12px; color: var(--text-3); }
.uptime-bars { display: flex; gap: 3px; align-items: flex-end; }
.ubar { flex: 1; height: 28px; border-radius: 3px; min-width: 4px; background: var(--ok); transition: transform 0.1s; }
.ubar:hover { transform: scaleY(1.15); }
.ubar-ok { background: var(--ok); }
.ubar-warn { background: var(--warn); }
.ubar-err { background: var(--err); }
.ubar-skeleton { background: var(--surface-2); }

/* ---------- Стек ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px 28px; }
.skill-cat { font-size: 12px; color: var(--text-3); margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px 10px;
  transition: border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Опыт ---------- */
.timeline { display: flex; flex-direction: column; gap: 16px; max-width: 1080px; }
.xp {
  display: grid; grid-template-columns: 210px 1fr; gap: 28px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 26px 30px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.xp:hover { border-color: var(--border-strong, var(--border)); box-shadow: 0 6px 24px -18px rgba(0,0,0,0.35); }
.xp-current { border-left: 3px solid var(--accent); }
.xp-meta { display: flex; flex-direction: column; gap: 10px; }
.xp-period { font-size: 12.5px; color: var(--text-3); letter-spacing: 0.02em; }
.xp-badge {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  font-size: 11.5px; font-weight: 500; color: var(--accent);
  background: var(--accent-soft); border-radius: 20px; padding: 3px 10px;
}
.xp-role { margin: 0 0 12px; font-size: 17px; line-height: 1.35; }
.xp-company { color: var(--text-2); font-weight: 500; }
.xp-summary { margin: 0; color: var(--text); max-width: 680px; line-height: 1.65; font-size: 14.5px; }
.xp-stack { margin-top: 16px; }
@media (max-width: 760px) {
  .xp { grid-template-columns: 1fr; gap: 14px; padding: 20px 22px; }
}

/* ---------- Публикации ---------- */
/* Публикации — список: одна строка = одна публикация, новые выше */
.pub-list {
  list-style: none; margin: 0; padding: 0; max-width: 960px;
  display: flex; flex-direction: column;
}
.pub {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 20px 4px 20px 18px;
  border-top: 1px solid var(--border);
  border-left: 3px solid var(--pub-ink, var(--border));
  transition: background 0.15s;
}
.pub:last-child { border-bottom: 1px solid var(--border); }
.pub:hover { background: var(--surface-2); }
.pub-date {
  flex: 0 0 52px; padding-top: 2px;
  font-size: 15px; font-weight: 600; color: var(--pub-ink, var(--text-2));
  letter-spacing: 0.01em;
}
.pub-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pub-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.pub-kind {
  flex: none; font-size: 11px; font-weight: 500; border-radius: 6px; padding: 2px 8px;
  background: var(--accent-soft); color: var(--accent);
}
.pub-kind-article { background: rgba(127, 119, 221, 0.12); color: #5b52c9; }
.pub-kind-science { background: rgba(55, 138, 221, 0.12); color: #185fa5; }
.pub-kind-talk { background: rgba(13, 147, 115, 0.12); color: #0d9373; }
.pub-kind-podcast { background: rgba(216, 90, 48, 0.12); color: #c14c26; }
.pub-kind-mention { background: rgba(120, 120, 128, 0.14); color: #5c5c66; }
/* цвет левой полосы под тип публикации */
.pub-article  { --pub-ink: #5b52c9; }
.pub-science  { --pub-ink: #185fa5; }
.pub-talk     { --pub-ink: #0d9373; }
.pub-podcast  { --pub-ink: #c14c26; }
.pub-mention  { --pub-ink: #5c5c66; }
.pub-title { font-weight: 550; color: var(--text); }
a.pub-title:hover { color: var(--accent); }
.pub-venue { font-size: 13px; color: var(--text-3); }
.pub-desc { font-size: 13.5px; color: var(--text-2); margin: 2px 0 0; }
.pub-arrow { color: var(--text-3); font-size: 13px; }
.pub-aside {
  flex: 0 0 96px; align-self: center; margin-left: auto;
  display: flex; justify-content: flex-end;
}
.pub-action {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px;
  white-space: nowrap; transition: color 0.15s, border-color 0.15s;
}
.pub-action:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 560px) {
  .pub { gap: 12px; padding-left: 14px; }
  .pub-date { flex-basis: 42px; font-size: 14px; }
  .pub-aside { flex-basis: auto; align-self: flex-start; }
}

/* ---------- Инфраструктура ---------- */
.infra-lead { max-width: 640px; color: var(--text-2); margin: 0 0 10px; }
.infra-note { font-size: 12.5px; color: var(--text-3); margin: 0; }
.arch { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.arch-layer {
  width: 100%; display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 18px;
}
.arch-label { font-size: 12px; color: var(--text-3); min-width: 74px; }
.arch-nodes { display: flex; flex-wrap: wrap; gap: 8px; }
.arch-node {
  font-size: 13.5px; background: var(--surface-2);
  border-radius: 9px; padding: 6px 12px; color: var(--text);
}
.arch-node-accent { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.arch-arrow { color: var(--text-3); font-size: 15px; line-height: 1; }
.pipeline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.pipe-step {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px;
}
.pipe-step-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.pipe-arr { color: var(--text-3); }

/* ---------- Достижения ---------- */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.doc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.12s;
}
.doc:hover { border-color: var(--text-3); transform: translateY(-1px); }
.doc-cat { font-size: 11.5px; color: var(--accent); margin: 0 0 8px; }
.doc-issuer { font-size: 13px; color: var(--text-3); margin: 4px 0 0; }
.doc-desc { font-size: 13.5px; color: var(--text-2); margin: 8px 0 0; }
.doc-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.badges-note { font-size: 12.5px; color: var(--text-3); margin: 32px 0 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 18px; }
.badge {
  width: 118px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform 0.15s;
}
.badge[href]:hover { transform: translateY(-3px); }
.badge img, .badge-circle { width: 72px; height: 72px; border-radius: 50%; }
.badge img { object-fit: contain; }
.badge-circle {
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--border); font-size: 20px; font-weight: 500;
}
.badge-name { font-size: 12.5px; line-height: 1.35; color: var(--text-2); }
.badge-issuer { font-size: 11px; color: var(--text-3); }

/* ---------- Контакты и формы ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1.3fr; gap: 36px; align-items: start; }
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-link { font-size: 14px; color: var(--text-2); transition: color 0.15s; }
.contact-link:hover { color: var(--accent); }
.lead-form { display: flex; flex-direction: column; gap: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
input[type="text"], textarea {
  width: 100%; padding: 10px 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  font-family: inherit; font-size: 14.5px;
  transition: border-color 0.15s; resize: vertical;
}
input[type="text"]:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
::placeholder { color: var(--text-3); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-foot { display: flex; align-items: center; gap: 16px; }
.form-result { font-size: 14px; }
.form-ok { color: var(--ok); margin: 0; }
.form-err { color: var(--err); margin: 0; }

/* ---------- Попап ---------- */
.popup-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 12, 16, 0.5);
  display: grid; place-items: center; padding: 20px;
  opacity: 0; transition: opacity 0.25s ease;
}
.popup-overlay.open { opacity: 1; }
.popup {
  width: 380px; max-width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 26px 28px;
  box-shadow: var(--shadow); position: relative;
  transform: translateY(10px); transition: transform 0.25s ease;
}
.popup-overlay.open .popup { transform: none; }
.popup h3 { font-size: 19px; }
.popup p { color: var(--text-2); font-size: 14.5px; margin: 8px 0 16px; }
.popup form { display: flex; flex-direction: column; gap: 10px; }
.popup-close {
  position: absolute; top: 12px; right: 14px;
  border: none; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--text-3);
}
.popup-close:hover { color: var(--text); }

/* ---------- CTA-полоса ---------- */
.cta-band {
  margin-top: 44px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px 26px;
}
.cta-title { font-size: 17px; font-weight: 600; margin: 0; }
.cta-sub { font-size: 13.5px; color: var(--text-2); margin: 4px 0 0; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Футер ---------- */
.footer { border-top: 1px solid var(--border); padding: 22px 0; margin-top: 40px; }
.footer-inner {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 12.5px; color: var(--text-3);
}
.footer-run { color: var(--accent); }
.footer-run::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  margin-right: 5px; border-radius: 50%; background: var(--accent);
  vertical-align: middle;
}

/* ---------- Адаптив ---------- */
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .nav-burger { display: flex; }
  .nav-links {
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a { padding: 14px 24px; border-top: 1px solid var(--border); }
  .nav-links a.is-active::after { display: none; }
  .nav-links a.is-active { color: var(--accent); }
  .hero { padding: 44px 0 32px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-photo img, .hero-initials { width: 140px; height: 172px; }
  .hero-initials { height: 140px; }
  .contacts { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 32px 0; }
}
