/* Bauman Robotics — презентации проектов */

:root {
  --bg: #080b12;
  --bg-soft: #0d1119;
  --panel: rgba(19, 24, 34, 0.72);
  --panel-solid: #111722;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf4;
  --muted: #8b94a7;
  --accent: #22d3a6;
  --accent-soft: rgba(34, 211, 166, 0.12);
  --accent-line: rgba(34, 211, 166, 0.32);
  --blue: #6b8cff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 26px 70px -32px rgba(0, 0, 0, 0.95);
  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--bg);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(34, 211, 166, 0.13), transparent 62%),
    radial-gradient(820px 480px at 104% 6%, rgba(107, 140, 255, 0.13), transparent 60%),
    radial-gradient(700px 600px at 50% 118%, rgba(34, 211, 166, 0.07), transparent 65%),
    var(--bg);
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: #9fe9d4;
}

.wrap {
  width: min(var(--wrap), 100% - 40px);
  margin: 0 auto;
  flex: 1 0 auto;
  padding: 34px 0 72px;
}

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(20px, calc((100% - var(--wrap)) / 2));
  background: rgba(8, 11, 18, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; }

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #04150f;
  background: linear-gradient(140deg, var(--accent), #7ef0cd 55%, var(--blue));
}

.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong { font-size: 14.5px; letter-spacing: 0.01em; }
.brand__text small { font-size: 11.5px; color: var(--muted); }

.topbar__nav { display: flex; gap: 6px; }

.topbar__nav a {
  padding: 7px 12px;
  font-size: 13.5px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 9px;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.topbar__nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

/* ------------------------------------------------------------------ hero */

.hero { padding: 26px 0 38px; max-width: 46rem; }

.kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  background: linear-gradient(96deg, #ffffff 6%, #a9f2dd 52%, #9db4ff 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 0;
  font-size: 16.5px;
  color: var(--muted);
  max-width: 58ch;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 26px 0 0;
}

.stat {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.stat b { display: block; font-size: 22px; letter-spacing: -0.01em; }
.stat span { font-size: 12px; color: var(--muted); }

/* ----------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover { border-color: var(--accent-line); transform: translateY(-3px); }

.card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--panel-solid);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s ease;
  filter: saturate(0.92);
}

.card:hover .card__media img { transform: scale(1.04); filter: saturate(1.05); }

.card__index {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 4px 9px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d7fbef;
  background: rgba(4, 12, 10, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  backdrop-filter: blur(6px);
}

.card__body { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; flex: 1; }

.card__title { margin: 0; font-size: 20px; letter-spacing: -0.01em; line-height: 1.25; }
.card__title a:hover { color: var(--accent); }

.card__text { margin: 0; font-size: 14.5px; color: var(--muted); flex: 1; }

.card__actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 2px; }

.card--soon {
  justify-content: center;
  border-style: dashed;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.015);
  box-shadow: none;
}

.card--soon:hover { transform: none; border-color: var(--line-strong); }

.card__soon-body { display: flex; flex-direction: column; gap: 12px; padding: 28px 24px; }

.cards--compact { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* ------------------------------------------------------- badges and chips */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}

.badge--active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.badge--active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(34, 211, 166, 0.55);
  animation: pulse 2.4s ease-out infinite;
}

.badge--soon { color: var(--muted); }

.card__media .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(4, 10, 14, 0.72);
  backdrop-filter: blur(6px);
}

.card__media .badge--active { background: rgba(6, 32, 25, 0.78); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 166, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 211, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 166, 0); }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 3px 9px;
  font-size: 12px;
  color: #c3cbd9;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.tags .badge { border-color: var(--accent-line); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.chip--axis {
  color: #04150f;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(140deg, var(--accent), #8df0d2);
  border-color: transparent;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 550;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  color: #04150f;
  background: linear-gradient(140deg, var(--accent), #8df0d2);
}

.btn--primary:hover { color: #04150f; opacity: 0.92; }

.btn--ghost {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); }

.link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  color: var(--accent);
  border-bottom: 1px solid transparent;
}

.link:hover { color: #9fe9d4; border-bottom-color: var(--accent-line); }

/* ----------------------------------------------------------- breadcrumbs */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 20px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span[aria-hidden] { opacity: 0.4; }

/* ------------------------------------------------------ project hero block */

.phero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  align-items: start;
  padding: 4px 0 34px;
  border-bottom: 1px solid var(--line);
}

.phero h1 {
  margin: 0 0 12px;
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.phero__lead { margin: 0 0 16px; font-size: 16px; color: #b9c1d0; max-width: 46ch; }

.phero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }

.phero__summary {
  margin: 0;
  padding: 20px 22px;
  font-size: 14.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

/* --------------------------------------------------------------- sections */

.section { padding: 40px 0 8px; }

.section__head { margin-bottom: 20px; max-width: 62ch; }

.section__head h2 {
  margin: 0 0 6px;
  font-size: clamp(21px, 2.6vw, 27px);
  letter-spacing: -0.015em;
}

.section__head p { margin: 0; font-size: 14px; color: var(--muted); }

/* ----------------------------------------------------------------- videos */

.videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;   /* портретная карточка выше — остальные не растягиваем */
}

.video {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.2s ease;
}

.video:hover { border-color: var(--accent-line); }

.video__frame { position: relative; aspect-ratio: 16 / 9; background: #05080d; }

/* Портретный ролик (мобильный экран) — рамка «как телефон», по центру карточки */
.video--portrait .video__frame {
  aspect-ratio: 390 / 844;
  width: min(100%, 320px);
  margin: 16px auto 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.video__frame iframe,
.video__player { width: 100%; height: 100%; border: 0; display: block; }
.video__player { position: absolute; inset: 0; background: #000; object-fit: contain; }

.video__facade {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: none;
  display: block;
}

.video__facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.85);
  transition: filter 0.25s ease, transform 0.5s ease;
}

.video__facade:hover img { filter: saturate(1.05) brightness(0.95); transform: scale(1.02); }

.video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 62px;
  height: 62px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(6, 12, 18, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.video__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  border-left: 17px solid #fff;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}

.video__facade:hover .video__play {
  background: rgba(34, 211, 166, 0.9);
  transform: translate(-50%, -50%) scale(1.06);
}

.video__facade:hover .video__play::before { border-left-color: #04150f; }

.video__dur {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #e8ecf4;
  background: rgba(4, 8, 12, 0.78);
  border-radius: 6px;
}

.video__offline {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 20px;
  text-align: center;
  background: repeating-linear-gradient(45deg, #0a0f16, #0a0f16 12px, #0c121a 12px, #0c121a 24px);
}

.video__offline-title { font-weight: 600; color: #cfd6e2; }
.video__offline-note { font-size: 12.5px; color: var(--muted); }

.video__cap { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }

.video__top { display: flex; align-items: center; gap: 9px; }

.video__note { font-size: 12.5px; color: var(--muted); }

.video__title { margin: 0; font-size: 16.5px; letter-spacing: -0.01em; }

.video__extra { margin: 0; font-size: 12.5px; color: #7d8698; }

.video__cap .link { margin-top: auto; }

.video__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

/* ------------------------------------------------------------------ specs */

.specs {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.specs__row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 14px;
  padding: 12px 16px;
  background: #0c111a;
}

.specs__row dt {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

.specs__row dd { margin: 0; font-size: 14.5px; }

/* -------------------------------------------------------------- highlights */

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.highlight {
  padding: 20px 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
}

.highlight__num {
  display: inline-block;
  margin-bottom: 10px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--accent);
}

.highlight h3 { margin: 0 0 8px; font-size: 16.5px; letter-spacing: -0.01em; }
.highlight p { margin: 0; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------- docs */

.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.docs a {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.docs a:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.docs span { font-size: 14px; color: var(--muted); }

/* ----------------------------------------------------------------- footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 22px max(20px, calc((100% - var(--wrap)) / 2));
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: rgba(8, 11, 18, 0.6);
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }
.footer__sep { opacity: 0.4; }
.footer__muted { margin-left: auto; opacity: 0.7; }

/* -------------------------------------------------------------------- 404 */

.hero--404 { padding-top: 60px; }

/* --------------------------------------------------------------- adaptive */

@media (max-width: 900px) {
  .phero { grid-template-columns: 1fr; gap: 20px; }
  .videos { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .wrap { width: min(var(--wrap), 100% - 28px); padding-top: 22px; }
  .brand__text small { display: none; }
  .topbar__nav a:first-child { display: none; }
  .specs__row { grid-template-columns: 1fr; gap: 4px; }
  .docs a { grid-template-columns: 1fr; gap: 4px; }
  .footer__muted { margin-left: 0; }
  .phero__summary { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge--active::before { animation: none; }
  * { transition: none !important; }
}

/* ------------------------------------------------------- кадры и «готово» */

.badge--done {
  color: #a9bcff;
  background: rgba(107, 140, 255, 0.12);
  border-color: rgba(107, 140, 255, 0.34);
}

.stills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.still {
  margin: 0;
  overflow: hidden;
  background: #05080d;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.still img { width: 100%; height: auto; display: block; }

.still figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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