/* ============================================================
   Роман Прищеп — портфолио · тёмный неон/tech
   Палитра и приёмы: без тяжёлых glow/backdrop-фильтров (кроме шапки),
   тонкие градиентные бордеры, CSS-переменные.
   ============================================================ */

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

:root {
  --bg: #05070d;
  --bg-2: #090d17;
  --card: #0b111e;
  --line: rgba(148, 163, 199, .14);
  --line-strong: rgba(148, 163, 199, .28);
  --text: #e9edf6;
  --muted: #93a0b8;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --indigo: #818cf8;
  --grad: linear-gradient(120deg, var(--cyan), var(--indigo) 55%, var(--violet));
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(129, 140, 248, .10), transparent 60%),
    radial-gradient(700px 420px at -10% 30%, rgba(34, 211, 238, .07), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(148, 163, 199, .05) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(148, 163, 199, .05) 47px 48px),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1140px, 100% - 48px); margin-inline: auto; }
.muted { color: var(--muted); }
.sep { color: var(--muted); margin: 0 .55em; }
.ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -3px; }

/* ---------- шапка ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .25s, border-color .25s;
}
.site-header.is-scrolled {
  background: rgba(6, 9, 16, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; background: var(--grad); color: #05070d;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.logo-name { font-family: var(--font-display); font-weight: 500; font-size: 14px; letter-spacing: .02em; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav > a:not(.btn) {
  color: var(--muted); text-decoration: none; font-size: 14.5px;
  transition: color .2s;
}
.site-nav > a:not(.btn):hover, .site-nav > a.is-active:not(.btn) { color: var(--text); }

.burger {
  display: none; margin-left: auto; width: 42px; height: 42px;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 12px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: transform .15s, box-shadow .2s, border-color .2s, background .2s;
}
.btn-sm { padding: 9px 18px; font-size: 13.5px; border-radius: 10px; }
.btn-primary {
  color: #05070d; background: var(--grad);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .25), 0 6px 24px -8px rgba(129, 140, 248, .55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(34, 211, 238, .4), 0 10px 30px -8px rgba(129, 140, 248, .7); }
.btn-ghost { color: var(--text); border: 1px solid var(--line-strong); background: rgba(148, 163, 199, .04); }
.btn-ghost:hover { border-color: var(--cyan); transform: translateY(-2px); }

/* ---------- hero ---------- */
.hero { padding: 168px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, .35); border-radius: 999px;
  padding: 7px 15px; margin-bottom: 26px; background: rgba(34, 211, 238, .06);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.6vw, 54px); line-height: 1.14; letter-spacing: -.01em;
  margin-bottom: 20px;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(16px, 1.6vw, 18.5px); color: var(--muted); max-width: 54ch; margin-bottom: 22px; }
.hero-person { font-size: 17px; margin-bottom: 10px; }
.hero-person strong { font-family: var(--font-display); font-weight: 500; font-size: 16px; letter-spacing: .01em; }
.hero-meta { color: var(--muted); font-size: 15px; margin-bottom: 30px; }
.hero-meta a { color: var(--text); text-decoration: none; border-bottom: 1px dashed var(--line-strong); }
.hero-meta a:hover { color: var(--cyan); border-color: var(--cyan); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; justify-self: center; }
.photo-ring {
  width: min(330px, 78vw); aspect-ratio: 1; padding: 6px; border-radius: 26px;
  background: var(--grad);
  box-shadow: 0 12px 60px -18px rgba(129, 140, 248, .5);
}
.photo-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 21px; display: block; }
.chip {
  position: absolute; font-family: var(--font-mono); font-size: 12px;
  color: var(--text); background: rgba(11, 17, 30, .92);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 14px;
}
.chip-a { top: 6%; left: -12%; }
.chip-b { top: 34%; right: -16%; border-color: rgba(34, 211, 238, .45); }
.chip-c { bottom: 26%; left: -16%; border-color: rgba(167, 139, 250, .45); }
.chip-d { bottom: 4%; right: -6%; }

.facts {
  margin-top: 72px; display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.facts > div { padding: 22px 26px; border-left: 1px solid var(--line); background: rgba(11, 17, 30, .55); }
.facts > div:first-child { border-left: 0; }
.facts dt { font-family: var(--font-display); font-weight: 500; font-size: 17px; margin-bottom: 4px; }
.facts dd { color: var(--muted); font-size: 13.5px; }

/* ---------- секции ---------- */
.section { padding: 96px 0 30px; }
.kicker {
  font-family: var(--font-mono); font-size: 13px; color: var(--cyan);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 3vw, 36px); line-height: 1.2; margin-bottom: 38px;
}
.sub-title {
  font-family: var(--font-mono); font-size: 15px; color: var(--muted);
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  margin: 46px 0 20px; display: flex; align-items: center; gap: 14px;
}
.sub-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px;
  transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.card h3 { font-family: var(--font-display); font-weight: 500; font-size: 16px; margin-bottom: 14px; }
.card p { color: var(--muted); font-size: 15px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- обо мне ---------- */
.about-now { margin-bottom: 34px; }
.about-now p { max-width: 78ch; }
.about-now p + p { margin-top: 12px; }
.ai-line { display: flex; gap: 12px; align-items: flex-start; }
.ai-tag {
  flex: none; display: inline-grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: #05070d; background: var(--grad); border-radius: 7px; padding: 3px 8px;
  margin-top: 2px;
}
.about-now .ai-line p { color: var(--text); }
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }

.timeline { list-style: none; }
.timeline li { position: relative; padding: 0 0 30px 26px; border-left: 1px solid var(--line); }
.timeline li:last-child { padding-bottom: 4px; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan);
}
.timeline li:first-child::before { background: var(--cyan); box-shadow: 0 0 10px rgba(34, 211, 238, .7); }
.t-period { font-family: var(--font-mono); font-size: 12.5px; color: var(--cyan); }
.t-body h4 { font-size: 16.5px; font-weight: 600; margin: 6px 0 4px; }
.t-body h4 small { color: var(--muted); font-weight: 400; font-size: 13.5px; margin-left: 8px; }
.t-body p { color: var(--muted); font-size: 14.5px; }

.about-side { display: grid; gap: 20px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: 13px; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 13px;
  background: rgba(148, 163, 199, .05);
}
.lang-list { list-style: none; }
.lang-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.lang-list li:last-child { border-bottom: 0; }
.lang-list span { color: var(--cyan); font-family: var(--font-mono); font-size: 13px; }

/* ---------- портфолио ---------- */
.stub { text-align: left; }
.stub-num { font-family: var(--font-mono); font-size: 12px; color: var(--violet); }
.stub h4 { font-size: 17px; font-weight: 600; margin: 10px 0 6px; }
.stub p { font-size: 14px; }
.pill {
  display: inline-block; margin-top: 16px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: 999px; padding: 5px 12px;
}
.now-line { margin: 18px 0 8px; color: var(--muted); font-size: 14.5px; }
.now-line strong { color: var(--text); }

.feature h4 { font-size: 16.5px; font-weight: 600; margin-bottom: 10px; }
.feature p { font-size: 14.5px; }
.feature-ai {
  position: relative; background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--grad) border-box;
  border: 1.5px solid transparent;
}
.feature-ai h4 { display: flex; align-items: center; gap: 10px; }
.feature-ai ul { list-style: none; margin-top: 4px; }
.feature-ai li {
  position: relative; padding: 6px 0 6px 22px;
  color: var(--muted); font-size: 14.5px;
}
.feature-ai li::before {
  content: "▸"; position: absolute; left: 2px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- аудитории ---------- */
.wide-card { max-width: 860px; }
.check-list { list-style: none; margin-bottom: 6px; }
.check-list li { position: relative; padding: 8px 0 8px 30px; color: var(--text); font-size: 15.5px; }
.check-list li::before {
  content: ""; position: absolute; left: 2px; top: 14px;
  width: 14px; height: 8px; border-left: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan); transform: rotate(-45deg);
}
.section-cta { margin-top: 28px; }

/* ---------- футер ---------- */
.site-footer { margin-top: 80px; padding: 72px 0 34px; border-top: 1px solid var(--line); background: var(--bg-2); }
.contact-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.foot-meta { color: var(--muted); font-size: 14.5px; margin-bottom: 26px; }
.foot-copy { color: var(--muted); font-size: 13px; font-family: var(--font-mono); border-top: 1px solid var(--line); padding-top: 22px; }

/* ---------- reveal-анимации (только при работающем JS — без JS контент виден сразу) ---------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- адаптив ---------- */
@media (max-width: 960px) {
  .hero { padding-top: 130px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: -1; }
  .chip-a { left: -4%; } .chip-b { right: -4%; } .chip-c { left: -6%; } .chip-d { right: -2%; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div:nth-child(3) { border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .about-grid, .grid-3 { grid-template-columns: 1fr; }

  .burger { display: flex; }
  .site-nav {
    position: fixed; top: 68px; left: 0; right: 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(6, 9, 16, .97); border-bottom: 1px solid var(--line);
    padding: 10px 24px 20px; display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
  .nav-cta { margin-top: 16px; text-align: center; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 36px); }
  .facts { grid-template-columns: 1fr; }
  .facts > div { border-left: 0 !important; border-top: 1px solid var(--line); }
  .facts > div:first-child { border-top: 0; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .contact-row .btn { width: 100%; text-align: center; }
}
